/* Szlak pamięci: znaki szlaku, drogowskazy i trasa z przystankami. Kroje lokalne na licencji OFL: Signika i Literata */
@font-face {
  font-family: 'Signika';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('szlak-fonts/signika-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Signika';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('szlak-fonts/signika-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Signika';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('szlak-fonts/signika-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Signika';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('szlak-fonts/signika-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Literata';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('szlak-fonts/literata-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Literata';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('szlak-fonts/literata-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Literata';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('szlak-fonts/literata-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Literata';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('szlak-fonts/literata-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Literata';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('szlak-fonts/literata-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Literata';
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url('szlak-fonts/literata-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --sp-las: #1e4a3a; /* panel nawigacji */
  --sp-bor: #143428; /* nagłówki, najciemniejsza zieleń */
  --sp-polana: #f1f6ee; /* tło strony */
  --sp-sciezka: #b9cdb9; /* linia trasy */
  --sp-mech: #dde8da; /* jasne wypełnienia */
  --sp-notes: #fff4c2; /* notatka przed wyjazdem */
  --sp-czerwony: #d7263d;
  --sp-niebieski: #1f6fd1;
  --sp-zielony: #1f8648; /* biały tekst na tym tle ma kontrast 4,6:1 */
  --sp-zolty: #f5c518;
  --sp-czarny: #1a1d1a;
  --sp-tusz: #1f2d27;
  --sp-szary: #4c5f55;
  --sp-kreska: #cbdbc9;
  --sp-sign: 'Signika', 'Trebuchet MS', 'Segoe UI', sans-serif;
  --sp-text: 'Literata', Georgia, 'Times New Roman', serif;
  --sp-gutter: 76px; /* odstęp treści od lewej krawędzi trasy */
  --sp-spine: 28px; /* oś linii trasy */
  --sp-trail: var(--sp-czarny);
  --sp-ontrail: #fff;
}

/* Kolor szlaku: strona i każdy element listy mają własny */
.sp-trail-red {
  --sp-trail: var(--sp-czerwony);
  --sp-ontrail: #fff;
}

.sp-trail-blue {
  --sp-trail: var(--sp-niebieski);
  --sp-ontrail: #fff;
}

.sp-trail-green {
  --sp-trail: var(--sp-zielony);
  --sp-ontrail: #fff;
}

.sp-trail-yellow {
  --sp-trail: var(--sp-zolty);
  --sp-ontrail: var(--sp-czarny);
}

.sp-trail-black {
  --sp-trail: var(--sp-czarny);
  --sp-ontrail: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--sp-polana);
  color: var(--sp-tusz);
  font: 400 18px/1.65 var(--sp-text);
}

a {
  color: var(--sp-bor);
  text-underline-offset: .2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 3px solid var(--sp-niebieski);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--sp-sign);
  color: var(--sp-bor);
  line-height: 1.1;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.3rem, 4.4vw, 3.8rem);
  letter-spacing: -.012em;
  margin-bottom: 18px;
  max-width: 19ch;
  text-wrap: balance;
}

h2 {
  font-weight: 700;
  font-size: clamp(1.55rem, 2.3vw, 2.05rem);
  margin-bottom: 14px;
}

h3 {
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 8px;
}

p {
  margin-bottom: 16px;
  max-width: 66ch;
}

img {
  max-width: 100%;
}

.sp-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sp-jump {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 50;
  background: #fff;
  color: var(--sp-czarny);
  padding: 12px 18px;
  border: 2px solid var(--sp-czarny);
  border-radius: 5px;
  font: 600 1rem/1.2 var(--sp-sign);
}

.sp-jump:focus {
  top: 14px;
}

/* Znak szlaku: biały, kolor, biały */
.sp-blaze {
  display: inline-block;
  flex: none;
  width: 22px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(#fff 0 33.4%, var(--sp-trail) 33.4% 66.6%, #fff 66.6%);
  box-shadow: 0 0 0 1px rgba(26, 29, 26, .3);
}

/* Układ: panel z boku, trasa obok */
.sp-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sp-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sp-panel {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  background: var(--sp-las);
  color: #fff;
  padding: 34px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.sp-panel a:focus-visible {
  outline-color: var(--sp-zolty);
}

.sp-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.sp-brandmark {
  display: block;
  border-radius: 3px;
}

.sp-brandname {
  font: 700 1.7rem/1.05 var(--sp-sign);
  letter-spacing: -.01em;
}

.sp-brandline {
  grid-column: 1/-1;
  font: italic 400 .92rem/1.45 var(--sp-text);
  color: #cfe0d4;
}

.sp-menu {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, .24);
}

.sp-menu a {
  color: #fff;
  text-decoration: none;
  font: 600 1.04rem/1.3 var(--sp-sign);
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .24);
}

.sp-menu a:hover,
.sp-stopmenu a:hover {
  color: var(--sp-zolty);
}

.sp-stopmenu {
  display: grid;
  gap: 2px;
}

.sp-stopmenu p {
  margin: 0 0 8px;
  font: 600 .9rem/1.3 var(--sp-sign);
  color: #bcd3c4;
}

.sp-stopmenu a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font: 600 .98rem/1.3 var(--sp-sign);
  padding: 7px 0;
}

.sp-legend {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .24);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
  font: 600 .9rem/1.2 var(--sp-sign);
  color: #dbe8df;
}

.sp-legend li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sp-legend li:last-child {
  grid-column: 1/-1;
}

.sp-panelnote {
  margin: auto 0 0;
  font: italic 400 .88rem/1.5 var(--sp-text);
  color: #b9cfc0;
}

/* Wyszukiwarka */
.sp-find {
  position: relative;
}

.sp-find[hidden],
.sp-findlist[hidden],
.sp-findnote[hidden] {
  display: none;
}

.sp-findrow {
  display: flex;
  background: #fff;
  border: 2px solid var(--sp-czarny);
  border-radius: 6px;
  overflow: hidden;
}

.sp-findrow:focus-within {
  box-shadow: 0 0 0 3px var(--sp-zolty), 0 0 0 5px var(--sp-czarny);
}

.sp-find input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  font: 400 1rem/1.3 var(--sp-text);
  color: var(--sp-tusz);
}

.sp-find input:focus {
  outline: 0;
}

.sp-find input::placeholder {
  color: #63746a;
}

.sp-find button {
  border: 0;
  border-left: 2px solid var(--sp-czarny);
  background: var(--sp-zolty);
  color: var(--sp-czarny);
  font: 700 .98rem/1 var(--sp-sign);
  padding: 0 15px;
  cursor: pointer;
}

.sp-find button:hover {
  background: #ffd84a;
}

.sp-findlist {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  color: var(--sp-tusz);
  border: 2px solid var(--sp-czarny);
  border-radius: 6px;
  max-height: 60vh;
  overflow: auto;
  text-align: left;
}

.sp-findlist a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--sp-tusz);
  text-decoration: none;
}

.sp-findlist a:hover,
.sp-findlist [aria-selected="true"] a {
  background: var(--sp-notes);
}

.sp-findname {
  font: 600 1rem/1.3 var(--sp-sign);
}

.sp-findwhere {
  grid-column: 2;
  font-size: .82rem;
  line-height: 1.3;
  color: var(--sp-szary);
}

.sp-findnote {
  margin: 8px 0 0;
  font-size: .9rem;
  line-height: 1.45;
}

.sp-panel .sp-findnote {
  color: #e3eee6;
}

.sp-find-wide {
  max-width: 640px;
  margin: 24px 0 16px;
}

.sp-find-wide label {
  display: block;
  font: 600 1.02rem/1.3 var(--sp-sign);
  color: var(--sp-bor);
  margin-bottom: 8px;
}

.sp-find-wide input {
  padding: 15px 16px;
  font-size: 1.1rem;
}

.sp-find-wide button {
  padding: 0 26px;
  font-size: 1.08rem;
}

/* Okruszki i komunikat */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px clamp(18px, 4vw, 52px) 0;
}

main > .sp-route {
  flex: 1;
}

.sp-breadcrumb {
  font: 600 .88rem/1.4 var(--sp-sign);
  color: var(--sp-szary);
  padding: 0 0 18px;
}

.sp-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-breadcrumb li+li::before {
  content: '›';
  margin-right: 10px;
  color: var(--sp-szary);
}

.sp-breadcrumb a {
  color: var(--sp-szary);
}

.sp-alert {
  max-width: 960px;
  background: var(--sp-notes);
  border: 2px solid var(--sp-czarny);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 1rem;
  margin: 0 0 20px;
}

/* Trasa: linia z kropką na początku, przystanki ze znakiem */
.sp-route {
  position: relative;
  max-width: 960px;
  padding: 0 0 64px var(--sp-gutter);
  background: linear-gradient(var(--sp-sciezka), var(--sp-sciezka)) no-repeat calc(var(--sp-spine) - 3px) 26px / 6px calc(100% - 26px);
}

.sp-opening {
  position: relative;
  padding: 6px 0 26px;
}

.sp-opening::before {
  content: '';
  position: absolute;
  left: calc(var(--sp-spine) - var(--sp-gutter) - 14px);
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sp-trail) 0 34%, #fff 36%);
  box-shadow: 0 0 0 1.5px rgba(26, 29, 26, .4);
}

.sp-geography {
  font: 600 1.02rem/1.3 var(--sp-sign);
  color: var(--sp-szary);
  margin-bottom: 12px;
}

.sp-intro {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 0;
}

.sp-tally {
  font: 600 1rem/1.4 var(--sp-sign);
  color: var(--sp-szary);
  margin: 0;
}

.sp-opening-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  gap: 34px;
  align-items: start;
}

.sp-stop {
  padding: 38px 0 0;
}

.sp-stop > h2 {
  position: relative;
}

.sp-stop > h2 > .sp-blaze {
  position: absolute;
  left: calc(var(--sp-spine) - var(--sp-gutter) - 18px);
  top: .12em;
  width: 36px;
  height: 22px;
  border-radius: 3px;
}

.sp-stop > p {
  max-width: 64ch;
}

/* Drogowskaz: biała tabliczka z kolorowym grotem */
.sp-plate {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 9px 48px 9px 16px;
  background: linear-gradient(90deg, #fff 0 calc(100% - 30px), var(--sp-trail) calc(100% - 30px));
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
  border-radius: 5px 0 0 5px;
  color: var(--sp-czarny);
}

.sp-plate strong {
  font: 700 1.08rem/1.2 var(--sp-sign);
}

.sp-plate > span {
  font: 600 .86rem/1.2 var(--sp-sign);
  color: var(--sp-szary);
}

.sp-signpost {
  display: block;
  text-decoration: none;
  filter: drop-shadow(0 2px 0 rgba(20, 52, 40, .24));
}

.sp-signpost:hover .sp-plate {
  background: linear-gradient(90deg, var(--sp-notes) 0 calc(100% - 30px), var(--sp-trail) calc(100% - 30px));
}

.sp-signposts {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px 22px;
}

.sp-waymark {
  display: inline-block;
  max-width: 100%;
  margin: 22px 0 0;
  filter: drop-shadow(0 2px 0 rgba(20, 52, 40, .24));
}

.sp-waymark .sp-plate {
  display: inline-grid;
  gap: 1px;
  justify-content: start;
  min-width: min(310px, 100%);
  padding: 12px 60px 13px 18px;
}

.sp-waymark .sp-plate > span:first-child {
  font: 600 .84rem/1.2 var(--sp-sign);
  color: var(--sp-szary);
}

.sp-waymark .sp-plate strong {
  font-size: 1.5rem;
  line-height: 1.15;
}

.sp-waymark .sp-plate > span:last-child {
  font: 400 .92rem/1.35 var(--sp-text);
  color: var(--sp-tusz);
  white-space: normal;
}

.sp-foldmore {
  margin: 18px 0 0;
  max-width: 420px;
}

/* Zdjęcia */
.sp-view {
  margin: 4px 0 0;
}

.sp-view img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--sp-mech);
}

.sp-view figcaption {
  margin-top: 9px;
  font-size: .92rem;
  line-height: 1.45;
}

.sp-view figcaption strong {
  font: 600 1rem/1.3 var(--sp-sign);
  color: var(--sp-bor);
  margin-right: 6px;
}

.sp-view-modest {
  max-width: 500px;
}

.sp-view-tall {
  max-width: 420px;
}

.sp-view-tall img {
  max-height: 640px;
}

.sp-view-tall figcaption strong {
  display: block;
  margin: 0 0 2px;
}

.sp-credit {
  font-size: .82rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--sp-szary);
}

.sp-credit a {
  color: inherit;
}

.sp-snapshots {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px 20px;
}

.sp-snapshots figure {
  margin: 0;
}

.sp-snapshots img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 5px;
  background: var(--sp-mech);
}

.sp-snapshots figcaption {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}

.sp-snapshots strong {
  position: relative;
  padding-left: 32px;
  font: 600 1.04rem/1.3 var(--sp-sign);
  color: var(--sp-bor);
}

.sp-snapshots strong > .sp-blaze {
  position: absolute;
  left: 0;
  top: .28em;
}

.sp-snapshots strong a {
  text-decoration: none;
}

.sp-snapshots strong a:hover {
  text-decoration: underline;
}

.sp-snapshots figcaption > span {
  font-size: .9rem;
  line-height: 1.4;
  color: var(--sp-szary);
}

.sp-snapshots .sp-nid {
  justify-self: start;
}

/* Karta gminy */
.sp-orientation {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.sp-quickfacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.sp-quickfacts > div {
  background: #fff;
  border-radius: 5px;
  padding: 10px 0 9px;
  box-shadow: 0 0 0 1px rgba(26, 29, 26, .22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sp-quickfacts dt {
  font: 600 .86rem/1.25 var(--sp-sign);
  color: var(--sp-szary);
  padding: 0 12px 8px;
}

.sp-quickfacts dd {
  margin: 0;
  padding: 5px 12px 6px;
  background: var(--sp-trail);
  color: var(--sp-ontrail);
  font: 700 2rem/1.05 var(--sp-sign);
  font-variant-numeric: tabular-nums;
}

.sp-quickfacts dd.sp-textvalue {
  font-size: 1.2rem;
  line-height: 1.75;
}

.sp-notebook,
.sp-visiting {
  background: var(--sp-notes);
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: 0 0 0 1px rgba(26, 29, 26, .18);
}

.sp-notebook h3 {
  margin-bottom: 8px;
}

.sp-notebook p,
.sp-visiting p {
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 10px;
  max-width: none;
}

.sp-notebook p:last-child,
.sp-visiting p:last-child {
  margin-bottom: 0;
}

.sp-notebook .sp-mapreference {
  font-size: .88rem;
  color: var(--sp-szary);
}

.sp-visiting {
  max-width: 720px;
}

.sp-historygrid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-top: 18px;
}

.sp-layers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.sp-layers li {
  display: grid;
  grid-template-columns: 6.4rem minmax(0, 1fr) 2.6rem;
  gap: 12px;
  align-items: center;
}

.sp-layername {
  font: 600 1rem/1.2 var(--sp-sign);
  color: var(--sp-bor);
}

.sp-layerbar {
  height: 16px;
  background: var(--sp-mech);
  border-radius: 3px;
  overflow: hidden;
}

.sp-layerbar > span {
  display: block;
  height: 100%;
  min-width: 4px;
  background: var(--sp-las);
  border-radius: 3px;
}

.sp-layers strong {
  font: 700 1.02rem/1 var(--sp-sign);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sp-oldest h3 {
  margin-bottom: 12px;
}

.sp-oldest ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.sp-oldest li {
  position: relative;
  padding-left: 34px;
  display: grid;
  gap: 1px;
}

.sp-oldest li > .sp-blaze {
  position: absolute;
  left: 0;
  top: .4em;
}

.sp-oldestdate {
  font: 600 .92rem/1.3 var(--sp-sign);
  color: var(--sp-szary);
}

.sp-oldest a {
  font: 600 1.04rem/1.3 var(--sp-sign);
}

.sp-oldest li > span:last-child {
  font-size: .9rem;
  line-height: 1.35;
  color: var(--sp-szary);
}

.sp-villages {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  columns: 3 210px;
  column-gap: 34px;
}

.sp-villages li {
  break-inside: avoid;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dotted #9db39f;
}

.sp-villages strong {
  font: 600 1.02rem/1.3 var(--sp-sign);
  color: var(--sp-bor);
}

.sp-villages span {
  font-size: .88rem;
  color: var(--sp-szary);
  white-space: nowrap;
}

.sp-kinds {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 10px;
}

.sp-kinds li {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border-radius: 5px;
  padding: 7px 12px;
  box-shadow: 0 0 0 1px rgba(26, 29, 26, .2);
  font: 600 .98rem/1.2 var(--sp-sign);
  color: var(--sp-bor);
}

.sp-kinds strong {
  font-weight: 700;
  color: var(--sp-szary);
  font-variant-numeric: tabular-nums;
}

/* Gęsty spis miejsc */
.sp-places {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  columns: 2 300px;
  column-gap: 38px;
}

.sp-places li {
  position: relative;
  break-inside: avoid;
  padding: 7px 0 8px 34px;
}

.sp-places li > .sp-blaze {
  position: absolute;
  left: 0;
  top: .82em;
}

.sp-places a {
  font: 600 1.05rem/1.3 var(--sp-sign);
  text-decoration: none;
}

.sp-places a:hover {
  text-decoration: underline;
}

.sp-places li > span:last-child {
  display: block;
  font-size: .86rem;
  line-height: 1.35;
  color: var(--sp-szary);
}

.sp-blank {
  background: var(--sp-mech);
  border-radius: 6px;
  padding: 16px 18px;
  font-size: 1rem;
}

/* Pełny spis z rejestru */
.sp-fullregister,
.sp-fold {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(26, 29, 26, .22);
}

.sp-fullregister > summary,
.sp-fold > summary {
  cursor: pointer;
  padding: 13px 18px;
  font: 600 1.02rem/1.3 var(--sp-sign);
  color: var(--sp-bor);
}

.sp-fullregister[open] > summary,
.sp-fold[open] > summary {
  border-bottom: 1px solid var(--sp-kreska);
}

.sp-fold > .sp-places,
.sp-fold > .sp-foldmore,
.sp-fold > .sp-blank {
  margin: 14px 18px 16px;
}

.sp-fold-quiet {
  margin-top: 16px;
  background: transparent;
  box-shadow: 0 0 0 1px var(--sp-kreska);
}

.sp-fold-quiet > summary {
  font-size: .95rem;
  color: var(--sp-szary);
}

.sp-quietlist {
  list-style: none;
  margin: 12px 18px 14px;
  padding: 0;
  columns: 4 150px;
  column-gap: 24px;
  font: 600 .95rem/1.3 var(--sp-sign);
}

.sp-quietlist li {
  break-inside: avoid;
  padding: 4px 0;
}

.sp-quietlist a {
  color: var(--sp-szary);
}

.sp-registerkey {
  margin: 12px 18px 0;
  font-size: .88rem;
  color: var(--sp-szary);
  max-width: none;
}

.sp-inventory {
  list-style: none;
  margin: 0;
  padding: 0 18px 4px;
}

.sp-inventory > li {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.1fr) minmax(0, 1.1fr) 6.6rem auto;
  gap: 2px 18px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--sp-kreska);
}

.sp-inventory > li:last-child {
  border-bottom: 0;
}

.sp-objectname h3 {
  position: relative;
  margin: 0;
  padding-left: 32px;
  font-size: 1.04rem;
  line-height: 1.3;
}

.sp-objectname h3 > .sp-blaze {
  position: absolute;
  left: 0;
  top: .28em;
}

.sp-objectname p {
  margin: 1px 0 0;
  padding-left: 32px;
  font-size: .88rem;
  line-height: 1.4;
  color: var(--sp-szary);
}

.sp-objectfacts {
  display: contents;
}

.sp-objectfacts dd {
  margin: 0;
  font-size: .92rem;
  line-height: 1.4;
}

.sp-nid {
  font: 600 .9rem/1.3 var(--sp-sign);
  white-space: nowrap;
}

.sp-inventory-brief {
  padding: 0;
  border-top: 1px solid var(--sp-kreska);
}

.sp-inventory-brief > li {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
}

.sp-objectkind {
  margin: 0;
  font-size: .92rem;
  line-height: 1.4;
  color: var(--sp-szary);
}

.sp-footnote {
  margin: 14px 0 0;
  font-size: .92rem;
  color: var(--sp-szary);
}

.sp-moreplaces {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px 22px;
  align-items: stretch;
}

.sp-moreplaces > li,
.sp-moreplaces .sp-signpost {
  display: grid;
}

.sp-nonext {
  grid-column: 1/-1;
  background: var(--sp-mech);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 1rem;
}

.sp-unmarked {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: center;
  gap: 0 8px;
  min-height: 46px;
  padding: 9px 16px;
  border: 1px dashed #8fa893;
  border-radius: 5px;
  font-family: var(--sp-sign);
  color: var(--sp-szary);
}

.sp-unmarked strong {
  font-weight: 600;
}

.sp-unmarked span {
  font-size: .86rem;
  white-space: nowrap;
}

/* Karta rezydencji */
.sp-estatefacts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 18px;
}

.sp-estatefacts > div {
  background: #fff;
  border-radius: 5px;
  padding: 10px 0 9px;
  box-shadow: 0 0 0 1px rgba(26, 29, 26, .22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sp-estatefacts dt {
  font: 600 .86rem/1.25 var(--sp-sign);
  color: var(--sp-szary);
  padding: 0 12px 8px;
}

.sp-estatefacts dd {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 6px 12px 7px;
  background: var(--sp-trail);
  color: var(--sp-ontrail);
  font: 700 1.16rem/1.25 var(--sp-sign);
  overflow-wrap: anywhere;
}

/* Etykiety i pasy koloru trzymają wspólne wiersze, więc dłuższa wartość nie rozjeżdża sąsiednich tabliczek */
@supports (grid-template-rows: subgrid) {
  .sp-estatefacts > div {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
    justify-content: stretch;
  }
}

.sp-records {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.sp-records > article {
  background: #fff;
  border-radius: 6px;
  padding: 16px 18px 15px;
  box-shadow: 0 0 0 1px rgba(26, 29, 26, .22);
}

.sp-recordheading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 26px;
  flex-wrap: wrap;
}

.sp-recordheading h3 {
  position: relative;
  margin: 0;
  padding-left: 34px;
  font-size: 1.3rem;
  line-height: 1.2;
}

.sp-recordheading h3 > .sp-blaze {
  position: absolute;
  left: 0;
  top: .26em;
}

.sp-recordheading p {
  margin: 0;
  font-size: .9rem;
  color: var(--sp-szary);
}

.sp-recordheading p strong {
  font: 700 1rem/1 var(--sp-sign);
  color: var(--sp-bor);
  font-variant-numeric: tabular-nums;
}

.sp-records dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 14px 0;
}

.sp-records dt {
  font: 600 .84rem/1.25 var(--sp-sign);
  color: var(--sp-szary);
}

.sp-records dd {
  margin: 2px 0 0;
  font-size: .98rem;
  line-height: 1.4;
}

.sp-reading p {
  font-size: 1.06rem;
}

/* Strony wykazu dopisywane przez silnik */
main > nav:not(.sp-breadcrumb) {
  max-width: 960px;
  margin-top: -34px;
  padding: 0 0 46px var(--sp-gutter);
  background: linear-gradient(var(--sp-sciezka), var(--sp-sciezka)) no-repeat calc(var(--sp-spine) - 3px) 0 / 6px 100%;
  font: 600 1rem/1.5 var(--sp-sign);
  color: var(--sp-szary);
}

main > nav:not(.sp-breadcrumb) p {
  margin: 0 0 8px;
}

main > nav:not(.sp-breadcrumb) a {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 8px 14px;
  background: #fff;
  border: 2px solid var(--sp-czarny);
  border-radius: 5px;
  color: var(--sp-czarny);
  text-decoration: none;
}

main > nav:not(.sp-breadcrumb) a:hover {
  background: var(--sp-notes);
}

/* W wykazie zabytków silnik rozdziela odsyłacze kropką; tu odsyłacze są przyciskami, więc kropka znika */
main > nav[aria-label$="zabytków"] {
  font-size: 0;
}

main > nav[aria-label$="zabytków"] p,
main > nav[aria-label$="zabytków"] a {
  font-size: 1rem;
}

/* Koniec trasy */
.sp-colophon {
  position: relative;
  max-width: calc(960px + 2 * clamp(18px, 4vw, 52px));
  margin: 0;
  padding: 34px clamp(18px, 4vw, 52px) 38px calc(clamp(18px, 4vw, 52px) + var(--sp-gutter));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 30px;
  align-items: start;
}

.sp-colophon::before {
  content: '';
  position: absolute;
  left: calc(clamp(18px, 4vw, 52px) + var(--sp-spine) - 14px);
  top: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sp-trail) 0 34%, #fff 36%);
  box-shadow: 0 0 0 1.5px rgba(26, 29, 26, .4);
}

.sp-footline strong {
  font: 700 1.5rem/1.1 var(--sp-sign);
  color: var(--sp-bor);
}

.sp-footline p {
  margin: 6px 0 0;
  font-size: .95rem;
  color: var(--sp-szary);
}

.sp-footlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 6px;
  font: 600 1rem/1.3 var(--sp-sign);
}

.sp-creditdetails {
  grid-column: 1/-1;
  border-top: 1px solid var(--sp-kreska);
  padding-top: 14px;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--sp-szary);
}

.sp-creditdetails summary {
  cursor: pointer;
  width: fit-content;
  font: 600 .95rem/1.3 var(--sp-sign);
  color: var(--sp-bor);
}

.sp-creditdetails p {
  margin: 10px 0 0;
  max-width: 100ch;
}

.sp-creditdetails ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.sp-creditdetails a {
  color: inherit;
}

@media (max-width:1100px) {
  .sp-estatefacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sp-inventory > li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sp-objectfacts {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
    grid-column: 1/-1;
    padding-left: 32px;
  }

  .sp-inventory > li > .sp-nid {
    grid-column: 2;
    grid-row: 1;
  }

  .sp-inventory-brief > li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sp-inventory-brief .sp-objectkind {
    grid-column: 1/-1;
    padding-left: 32px;
  }
}

@media (max-width:960px) {
  :root {
    --sp-gutter: 50px;
    --sp-spine: 18px;
  }

  .sp-layout {
    display: block;
  }

  .sp-panel {
    position: static;
    height: auto;
    overflow: visible;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    padding: 14px 18px;
  }

  .sp-brand {
    grid-template-columns: auto auto;
    gap: 0 12px;
  }

  .sp-brandname {
    font-size: 1.4rem;
  }

  .sp-brandmark {
    width: 38px;
    height: 24px;
  }

  .sp-brandline,
  .sp-panelnote,
  .sp-stopmenu {
    display: none;
  }

  .sp-legend {
    flex: 1 1 100%;
    order: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 8px 0 0;
    font-size: .82rem;
  }

  .sp-legend li:last-child {
    grid-column: auto;
  }

  .sp-menu {
    flex-direction: row;
    gap: 20px;
    border: 0;
    margin-left: auto;
  }

  .sp-menu a {
    border: 0;
    padding: 6px 0;
    font-size: .98rem;
  }

  .sp-panel .sp-find {
    flex: 1 1 100%;
    order: 3;
  }

  main {
    padding-top: 18px;
  }

  .sp-orientation,
  .sp-historygrid,
  .sp-opening-split {
    grid-template-columns: 1fr;
  }

  .sp-records dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:600px) {
  :root {
    --sp-gutter: 36px;
    --sp-spine: 12px;
  }

  body {
    font-size: 17px;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 2.5rem);
  }

  .sp-panel {
    gap: 8px 14px;
    padding: 12px 14px;
  }

  .sp-legend {
    display: none;
  }

  .sp-menu {
    gap: 14px;
  }

  .sp-menu a {
    font-size: .9rem;
  }

  .sp-brandname {
    font-size: 1.25rem;
  }

  main {
    padding-inline: 14px;
  }

  .sp-intro {
    font-size: 1.08rem;
  }

  .sp-opening::before {
    width: 22px;
    height: 22px;
    left: calc(var(--sp-spine) - var(--sp-gutter) - 11px);
    top: 14px;
  }

  .sp-stop {
    padding-top: 32px;
  }

  .sp-stop > h2 > .sp-blaze {
    width: 24px;
    height: 15px;
    left: calc(var(--sp-spine) - var(--sp-gutter) - 12px);
    top: .3em;
  }

  .sp-quickfacts {
    grid-template-columns: 1fr;
  }

  .sp-quickfacts > div {
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
  }

  .sp-quickfacts dt {
    flex: 1;
    padding: 10px 12px;
  }

  .sp-quickfacts dd {
    display: flex;
    align-items: center;
    min-width: 5.4rem;
    justify-content: center;
    font-size: 1.5rem;
  }

  .sp-quickfacts dd.sp-textvalue {
    font-size: 1.02rem;
    line-height: 1.2;
  }

  .sp-estatefacts {
    gap: 9px;
  }

  .sp-estatefacts dd {
    font-size: 1.02rem;
  }

  .sp-signposts,
  .sp-moreplaces {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .sp-signposts .sp-plate {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
  }

  .sp-snapshots {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sp-snapshots figure {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .sp-snapshots img {
    aspect-ratio: 1/1;
  }

  .sp-snapshots figcaption {
    margin-top: 0;
  }

  .sp-layers li {
    grid-template-columns: 5.4rem minmax(0, 1fr) 2rem;
    gap: 8px;
  }

  .sp-inventory {
    padding-inline: 12px;
  }

  .sp-inventory-brief {
    padding-inline: 0;
  }

  .sp-inventory-brief > li {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-inventory-brief > li > .sp-nid {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    padding-left: 32px;
  }

  .sp-registerkey {
    margin-inline: 12px;
  }

  .sp-find-wide button {
    padding: 0 16px;
  }

  .sp-colophon {
    grid-template-columns: 1fr;
    padding-left: calc(14px + var(--sp-gutter));
    padding-right: 14px;
  }

  .sp-colophon::before {
    left: calc(14px + var(--sp-spine) - 11px);
    width: 22px;
    height: 22px;
    top: -11px;
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
}
