:root {
  --paper: #f7f2ec;
  --sheet: #fffdfa;
  --ink: #202124;
  --muted: #6f6a65;
  --line: #d7cec4;
  --cyan: #16b8c7;
  --cyan-dark: #0b7f89;
  --plum: #6f234e;
  --plum-dark: #4a1735;
  --white: #ffffff;
  --max: 1220px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.65; }
a { color: inherit; }
a:hover { color: var(--cyan-dark); }
a:active { color: var(--plum); }
a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
p { margin: 0; font-size: 16px; }
h1, h2, h3 { margin: 0; line-height: 1.08; }
h1 { font-size: 40px; letter-spacing: -0.05em; }
h2 { font-size: 28px; letter-spacing: -0.03em; }
h3 { font-size: 16px; }
.shell { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }

.site-header { background: var(--plum-dark); color: var(--white); }
.header-row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--white); font-size: 21px; font-weight: 800; text-decoration: none; letter-spacing: -0.03em; }
.region-nav { color: #e5cbd8; font-size: 13px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.hero { padding: 52px 0 74px; background: var(--paper); }
.hero-sheet { display: grid; grid-template-columns: 160px minmax(0, 1fr) 300px; min-height: 390px; background: var(--sheet); border: 1px solid var(--line); }
.hero-index { display: flex; flex-direction: column; justify-content: space-between; padding: 28px 24px; background: var(--cyan); }
.hero-index span { color: var(--plum-dark); font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -.07em; }
.hero-index p { color: var(--plum-dark); font-size: 12px; font-weight: 800; letter-spacing: .15em; writing-mode: vertical-rl; transform: rotate(180deg); }
.hero-main { display: flex; flex-direction: column; justify-content: center; padding: 54px 58px; }
.eyebrow, .section-label { margin-bottom: 13px; color: var(--plum); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lead { max-width: 650px; margin-top: 26px; color: var(--muted); font-size: 18px; line-height: 1.8; }
.hero-data { border-left: 1px solid var(--line); }
.hero-data article { min-height: 129px; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.hero-data article:last-child { border-bottom: 0; }
.hero-data strong { display: block; color: var(--cyan-dark); font-size: 34px; line-height: 1; }
.hero-data p { margin-top: 10px; color: var(--muted); font-size: 14px; }

.counties { padding: 94px 0 112px; background: var(--sheet); }
.registry-head { display: grid; grid-template-columns: 80px minmax(280px, .75fr) minmax(0, 1.25fr); gap: 34px; align-items: end; margin-bottom: 52px; }
.registry-no, .cities-no, .structure-no { color: var(--cyan-dark); font-size: 46px; font-weight: 800; line-height: 1; }
.registry-head > p { max-width: 660px; color: var(--muted); }
.registry { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; align-items: start; }
.registry-column { min-width: 0; border-top: 5px solid var(--plum); }
.offset-a { margin-top: 64px; }
.offset-b { margin-top: 104px; }
.letter { padding: 18px 0 16px; color: var(--cyan-dark); font-size: 29px; font-weight: 800; line-height: 1; border-bottom: 1px solid var(--line); }
.registry-column ol { margin: 0; padding: 0; list-style: none; }
.registry-column li { min-height: 55px; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; align-items: center; border-bottom: 1px solid var(--line); }
.registry-column li span { color: #a09891; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.registry-column h3 { overflow-wrap: anywhere; }

.cities { padding: 86px 0 0; background: var(--plum); color: var(--white); }
.cities-head { display: grid; grid-template-columns: 80px 1fr; gap: 34px; align-items: baseline; padding-bottom: 36px; }
.cities-head h2 { color: var(--white); }
.light { color: #8ce7ef; }
.city-register article { border-top: 1px solid #8e5473; }
.city-register article:nth-child(even) { background: var(--plum-dark); }
.city-row { min-height: 108px; display: grid; grid-template-columns: 70px minmax(220px, .8fr) minmax(0, 1.2fr); gap: 26px; align-items: center; }
.city-row span { color: #8ce7ef; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.city-row h3 { color: var(--white); font-size: 24px; }
.city-row p { color: #dec6d3; font-size: 14px; }

.structure { padding: 90px 0 96px; background: var(--cyan); }
.structure-sheet { display: grid; grid-template-columns: 90px minmax(260px, .75fr) minmax(0, 1.25fr); gap: 38px; align-items: start; }
.structure-sheet .section-label { color: var(--plum-dark); }
.structure-sheet > p { max-width: 720px; color: #174d52; padding-top: 6px; }

.site-footer { background: var(--paper); border-top: 1px solid var(--line); }
.footer-row { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 14px; }
.footer-row a { color: var(--plum-dark); font-weight: 700; text-underline-offset: 4px; }

@media (max-width: 980px) {
  .hero-sheet { grid-template-columns: 110px minmax(0, 1fr); }
  .hero-data { grid-column: 1 / 3; display: grid; grid-template-columns: repeat(3, 1fr); border-left: 0; border-top: 1px solid var(--line); }
  .hero-data article { min-height: 110px; border-right: 1px solid var(--line); border-bottom: 0; }
  .hero-data article:last-child { border-right: 0; }
  .registry-head, .structure-sheet { grid-template-columns: 1fr; gap: 28px; }
  .registry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offset-a, .offset-b { margin-top: 0; }
}

@media (max-width: 680px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .header-row { min-height: 64px; }
  .hero { padding-top: 28px; }
  .hero-sheet { grid-template-columns: 1fr; }
  .hero-index { min-height: 90px; flex-direction: row; align-items: center; }
  .hero-index span { font-size: 48px; }
  .hero-index p { writing-mode: horizontal-tb; transform: none; }
  .hero-main { padding: 38px 24px 44px; }
  h1 { font-size: 40px; overflow-wrap: anywhere; }
  .lead { font-size: 17px; }
  .hero-data { grid-column: auto; grid-template-columns: 1fr; }
  .hero-data article { border-right: 0; border-bottom: 1px solid var(--line); }
  .counties, .cities, .structure { padding-top: 64px; }
  .counties, .structure { padding-bottom: 64px; }
  .registry { grid-template-columns: 1fr; }
  .city-row { grid-template-columns: 48px 1fr; gap: 16px; }
  .city-row p { grid-column: 2; margin-top: -18px; padding-bottom: 16px; }
  .footer-row { min-height: 90px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; }
}


/* Rozszerzenia podstron tematycznych */
.region-nav { display: flex; align-items: center; gap: 9px; }
.region-nav a { color: #e5cbd8; text-decoration: none; }
.region-nav strong { color: var(--white); font-size: 13px; }
.nav-sep { color: #a4758e; }

.editorial { padding: 92px 0 100px; background: var(--sheet); border-top: 1px solid var(--line); }
.editorial:nth-of-type(even) { background: var(--paper); }
.editorial-head { display: grid; grid-template-columns: 80px minmax(280px, .75fr) minmax(0, 1.25fr); gap: 34px; align-items: start; margin-bottom: 44px; }
.editorial-head > p { max-width: 690px; color: var(--muted); }
.editorial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.editorial-card { min-height: 250px; padding: 32px 30px 34px; background: var(--sheet); }
.editorial-card h3 { margin-bottom: 20px; color: var(--plum-dark); font-size: 20px; }
.editorial-card p { color: var(--muted); }

.local-callout, .local-links { padding: 86px 0; background: var(--cyan); }
.local-callout-sheet { display: grid; grid-template-columns: 90px minmax(260px, .75fr) minmax(0, 1.25fr); gap: 38px; align-items: start; }
.local-callout-sheet .section-label { color: var(--plum-dark); }
.local-callout-sheet > p { color: #174d52; padding-top: 6px; }
.local-callout-sheet a { color: var(--plum-dark); font-weight: 800; text-underline-offset: 4px; }

.topic-section { padding: 96px 0 104px; background: var(--plum-dark); color: var(--white); }
.topic-head { display: grid; grid-template-columns: 80px 1fr; gap: 34px; align-items: baseline; margin-bottom: 42px; }
.topic-head .section-label { color: #8ce7ef; }
.topic-head h2 { color: var(--white); }
.topic-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #81516d; border-left: 1px solid #81516d; }
.topic-card { min-height: 245px; display: block; padding: 28px 24px; color: var(--white); text-decoration: none; border-right: 1px solid #81516d; border-bottom: 1px solid #81516d; }
.topic-card:hover { background: var(--plum); color: var(--white); }
.topic-card span { color: #8ce7ef; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.topic-card h3 { margin-top: 34px; font-size: 21px; }
.topic-card p { margin-top: 16px; color: #dec6d3; font-size: 14px; line-height: 1.6; }

.name-section { padding: 92px 0 104px; background: var(--paper); border-top: 1px solid var(--line); }
.name-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.name-item { min-height: 64px; display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; padding: 12px 16px; background: var(--sheet); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.name-item span { color: #a09891; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.name-item strong { font-size: 14px; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .editorial-head, .local-callout-sheet { grid-template-columns: 1fr; gap: 28px; }
  .editorial-grid { grid-template-columns: 1fr; }
  .editorial-card { min-height: 0; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .name-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .region-nav strong { display: none; }
  .nav-sep { display: none; }
  .editorial, .topic-section, .name-section, .local-callout, .local-links { padding-top: 64px; padding-bottom: 64px; }
  .topic-grid, .name-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 0; }
}
