/* salarii-si-pensii-moldova — Moldovan Banknote & Payslip Print aesthetic
 * Local WOFF2 fonts (latin-ext + latin covering ă â î ș ț – − · „ ” ’).
 * Dual theme (Light banknote ivory + Dark obsidian plum), WCAG AAA >= 7:1 text contrast.
 */

/* --- Local @font-face declarations --- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/fraunces-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Fraunces";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/fraunces-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/ibmplexsans-normal-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/ibmplexsans-normal-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/ibmplexsans-normal-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/ibmplexsans-normal-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/source-serif-4-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/source-serif-4-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-serif-4-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Source Serif 4";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-serif-4-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Semantic Theme Tokens --- */
:root {
  color-scheme: light dark;
  --font-display: "Fraunces", Georgia, serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-ui: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Light banknote-ivory defaults */
  --bg: #f6f4ef;
  --bg-2: #ece8df;
  --surface: #fbf9f5;
  --fg: #17131c;
  --mut: #484050;
  --acc: #7a1c42;
  --acc-2: #09544e;
  --on-acc: #fbf9f5;
  --on-acc-2: #fbf9f5;
  --line: #cfc7ba;
  --line-soft: #dcd5c9;
  --line-strong: #7b7265;
  --focus-ring: #7a1c42;

  /* Sequential & Diverging Map + Chart Palettes (Light) */
  --map-s0: #ece6db;
  --map-s1: #dfd0d6;
  --map-s2: #c99fb0;
  --map-s3: #ad6582;
  --map-s4: #8e3358;
  --map-s5: #641435;

  --map-t0: #e5eee9;
  --map-t1: #bcdbd5;
  --map-t2: #7dbdb4;
  --map-t3: #3e968c;
  --map-t4: #156e66;
  --map-t5: #084843;

  --map-d0: #6b1538; /* <0.55 */
  --map-d1: #932e54; /* 0.55-0.65 */
  --map-d2: #bb6281; /* 0.65-0.75 */
  --map-d3: #d9a4b5; /* 0.75-0.99 */
  --map-d4: #248a80; /* 1.00-1.99 Balti */
  --map-d5: #084c46; /* >=2.00 Chisinau */

  --map-stroke: #f6f4ef;
  --map-stroke-sel: #17131c;
  --map-hatch-bg: #e7e2d7;
  --map-hatch-fg: #8c8276;
  --river-stroke: #3c6e82;

  --mm-bg: #e2dcd0;
  --mm-stroke: #8a8072;
  --mm-nonrep-bg: #ece7de;
  --mm-nonrep-stroke: #a19789;

  --bar-neg: #7a1c42;
  --bar-pos: #09544e;
  --bar-track: #e6e0d5;
  --chart-grid: #d7d0c4;
  --chart-nat: #17131c;
  --chart-chi: #09544e;
  --chart-sel: #7a1c42;
  --chart-f: #7a1c42;
  --chart-m: #09544e;

  --to-top-bg: var(--surface);
  --to-top-fg: var(--fg);

  --col: 64rem;
  --measure: 42rem;
  --gut: 1.25rem;
  --topbar-h: 46px;

  accent-color: var(--acc);
  scrollbar-color: var(--line-strong) var(--bg-2);
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131018;
  --bg-2: #1c1724;
  --surface: #211b2a;
  --fg: #f4eff7;
  --mut: #c7bed2;
  --acc: #f59bbd;
  --acc-2: #6ce0d5;
  --on-acc: #131018;
  --on-acc-2: #131018;
  --line: #393047;
  --line-soft: #2c2437;
  --line-strong: #7d7190;
  --focus-ring: #6ce0d5;

  --map-s0: #292233;
  --map-s1: #45293e;
  --map-s2: #6b3151;
  --map-s3: #993f6a;
  --map-s4: #cb6392;
  --map-s5: #f59bbd;

  --map-t0: #1e2d2e;
  --map-t1: #1f4746;
  --map-t2: #226b67;
  --map-t3: #2d948d;
  --map-t4: #48beb4;
  --map-t5: #7de8dd;

  --map-d0: #8f234c;
  --map-d1: #b43e6b;
  --map-d2: #d66892;
  --map-d3: #ea9ab8;
  --map-d4: #36b2a6;
  --map-d5: #6ce0d5;

  --map-stroke: #131018;
  --map-stroke-sel: #f4eff7;
  --map-hatch-bg: #1a1522;
  --map-hatch-fg: #5e546f;
  --river-stroke: #6fa7bd;

  --mm-bg: #2a2236;
  --mm-stroke: #7a6b94;
  --mm-nonrep-bg: #1d1727;
  --mm-nonrep-stroke: #5c4f73;

  --bar-neg: #e37ba4;
  --bar-pos: #5fd6cb;
  --bar-track: #262030;
  --chart-grid: #342b42;
  --chart-nat: #f4eff7;
  --chart-chi: #6ce0d5;
  --chart-sel: #f59bbd;
  --chart-f: #f59bbd;
  --chart-m: #6ce0d5;
}

@supports not (scrollbar-color: auto) {
  :root { scrollbar-width: auto; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--bg-2); }
  ::-webkit-scrollbar-thumb { background: var(--line-strong); }
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: 100%;
  line-height: 1.62;
  scroll-padding-top: calc(var(--topbar-h) + 1.25rem);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  overflow-x: clip;
}
a {
  color: var(--acc);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--acc-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.num, .tabular {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--acc);
  color: var(--on-acc);
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

/* Reading rail width adjustment: strictly outside content column, hidden below 1480px */
@media (min-width: 1100px) and (max-width: 1479px) {
  .rail { display: none; }
}
@media (min-width: 1480px) {
  .rail {
    --col: 64rem;
    --gut: 1.5rem;
    display: flex;
  }
}

section[id], .workbench, .editorial-sec {
  scroll-margin-top: calc(var(--topbar-h) + 1.15rem);
}

/* --- Slim Topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-ui);
}
.topbar-inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.topbar-brand:hover { color: var(--acc); }
.brand-seal {
  width: 20px;
  height: 20px;
  color: var(--acc);
  flex: none;
}
.topbar-nav {
  display: none;
  align-items: center;
  gap: 1.15rem;
  font-size: 0.84rem;
}
.topbar-nav a {
  color: var(--mut);
  text-decoration: none;
  font-weight: 500;
}
.topbar-nav a:hover, .topbar-nav a:focus-visible { color: var(--fg); text-decoration: underline; }
@media (min-width: 820px) {
  .topbar-nav { display: flex; }
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lang-switch, .theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 36px;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.lang-switch:hover, .theme-btn:hover {
  border-color: var(--acc);
  color: var(--acc);
}
@media (pointer: coarse) {
  .lang-switch, .theme-btn { min-height: 44px; min-width: 44px; }
}
.scroll-rail-bar {
  position: relative;
  height: 2px;
  background: var(--line-soft);
  overflow: hidden;
}
.scroll-rail-fill {
  height: 100%;
  width: 100%;
  background: var(--acc);
  transform-origin: left center;
  transform: scaleX(0);
}

/* --- Page Shell & Editorial Ledger Framing --- */
.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero-header {
  padding: 0.9rem 0 0.72rem;
  border-bottom: 3px double var(--line-strong);
}
@media (min-width: 780px) {
  .hero-header { padding: 1.05rem 0 0.82rem; }
}
.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin: 0 0 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--acc);
}
.kicker-sep { color: var(--line-strong); }
.kicker-meta { color: var(--mut); font-weight: 500; text-transform: none; letter-spacing: 0.01em; }

h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.48rem, 2.85vw, 2.22rem);
  line-height: 1.11;
  letter-spacing: -0.015em;
  max-width: 60rem;
}
.lead {
  margin: 0;
  max-width: 60rem;
  font-size: clamp(0.96rem, 1.2vw, 1.04rem);
  line-height: 1.48;
  color: var(--fg);
}

/* Key Ledger Strip (4 banknote-stub counters) */
.ledger-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.95rem;
}
@media (min-width: 780px) {
  .ledger-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ledger-cell {
  padding: 0.5rem 0.65rem 0.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}
@media (min-width: 780px) {
  .ledger-cell {
    padding: 0.6rem 0.85rem;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .ledger-cell:first-child { padding-left: 0; }
  .ledger-cell:last-child { border-right: 0; padding-right: 0; }
}
.ledger-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mut);
  margin-bottom: 0.1rem;
  line-height: 1.25;
}
.ledger-val {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.16rem, 1.85vw, 1.48rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.ledger-val.is-acc { color: var(--acc); }
.ledger-val.is-acc2 { color: var(--acc-2); }
.ledger-sub {
  display: block;
  margin-top: 0.12rem;
  font-family: var(--font-ui);
  font-size: 0.73rem;
  color: var(--mut);
  line-height: 1.28;
}
@media (max-width: 520px) {
  .ledger-sub { display: none; }
}

/* --- Main Workbench: Payslip Comparator + Choropleth Map --- */
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  padding-bottom: 2rem;
  border-bottom: 3px double var(--line-strong);
}
@media (min-width: 960px) {
  .workbench {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: 2rem;
    align-items: start;
  }
}

/* Payslip Ledger Panel (left) */
.payslip-panel {
  border-top: 2px solid var(--fg);
  border-bottom: 2px solid var(--fg);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 0.95rem 1.05rem 0.9rem;
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--line-strong);
  margin-bottom: 0.75rem;
}
.panel-head-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}
.panel-code {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mut);
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.calc-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}
@media (min-width: 520px) {
  .calc-top-row {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: end;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.field label, .mode-fieldset legend {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
}
.input-row {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
}
.input-row:focus-within {
  border-color: var(--acc);
}
.input-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: max(1rem, 1.12rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0.55rem 0.7rem;
  min-height: 48px;
}
.input-row input:focus { outline: none; }
.input-row input:user-invalid, .input-row input[aria-invalid="true"] {
  background: color-mix(in srgb, var(--acc) 10%, var(--bg));
}
.input-unit {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  border-left: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mut);
  background: var(--bg-2);
}
.field-error {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--acc);
}

/* Radio Mode Switch (Brut / Net) */
.mode-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.mode-fieldset legend {
  padding: 0;
  margin-bottom: 0.3rem;
}
.radio-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
}
.radio-opt {
  position: relative;
}
.radio-opt input {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.radio-opt label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.4rem 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  text-align: center;
}
.radio-opt + .radio-opt label {
  border-left: 1px solid var(--line);
}
.radio-opt input:checked + label {
  background: var(--acc);
  color: var(--on-acc);
}
.radio-opt input:focus-visible + label {
  outline: 2px solid var(--focus-ring);
  outline-offset: -3px;
}

/* Quick presets: crisp 2x2 grid (zero orphan 3+1 wrapping) */
.preset-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}
@media (min-width: 560px) {
  .preset-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.preset-btn, .reset-btn {
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding: 0.34rem 0.42rem;
  min-height: 36px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-btn:hover, .reset-btn:hover {
  border-color: var(--acc);
  color: var(--acc);
}
.preset-btn[data-active="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.reset-btn {
  border-style: dashed;
  color: var(--acc);
  border-color: var(--acc);
  font-weight: 600;
  padding: 0.32rem 0.55rem;
}
@media (pointer: coarse) {
  .preset-btn, .reset-btn { min-height: 44px; padding: 0.4rem 0.55rem; }
}

.select-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  align-items: end;
}
@media (min-width: 520px) {
  .select-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.field select {
  width: 100%;
  min-height: 46px;
  padding: 0.45rem 0.6rem;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: max(1rem, 0.88rem);
}

/* Payslip Output Stub */
.stub-out {
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  border-top: 2px solid var(--line-strong);
}
.stub-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}
.stub-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: baseline;
}
.stub-k {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mut);
}
.stub-v {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stub-v.is-net { color: var(--acc-2); }
.stub-v.is-gross { color: var(--fg); }

.deduction-line {
  margin: 0 0 0.85rem;
  padding: 0.48rem 0.65rem;
  background: var(--bg-2);
  border-left: 3px solid var(--acc);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* Live 35-District SVG Ruler */
.ruler-box {
  margin: 0.75rem 0 0.9rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--bg);
}
.ruler-verdict {
  margin: 0 0 0.45rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
}
.ruler-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.ruler-track { stroke: var(--line-strong); stroke-width: 1.5; }
.ruler-tick { stroke: var(--mut); stroke-width: 1.5; opacity: 0.6; }
.ruler-tick-nat { stroke: var(--chart-nat); stroke-width: 2.2; }
.ruler-tick-sel { stroke: var(--acc-2); stroke-width: 2.8; }
.ruler-pin { fill: var(--acc); stroke: var(--surface); stroke-width: 1.5; }
.ruler-lbl {
  font-family: var(--font-ui);
  font-size: 10.5px;
  fill: var(--mut);
  font-variant-numeric: tabular-nums;
}
.ruler-lbl-strong {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  fill: var(--acc);
  font-variant-numeric: tabular-nums;
}

/* 3-column comparison readout */
.comp-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0;
  margin-bottom: 0.8rem;
}
@media (max-width: 480px) {
  .comp-metrics { grid-template-columns: 1fr; gap: 0.5rem; }
}
.comp-m-k {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.73rem;
  color: var(--mut);
  line-height: 1.3;
}
.comp-m-v {
  display: block;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  margin-top: 0.1rem;
}
.comp-m-s {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--mut);
  line-height: 1.3;
}

.stub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.stub-note {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--mut);
}

/* --- Choropleth Map Panel (right) --- */
.map-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.layer-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}
.layer-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.38rem 0.55rem;
  min-height: 38px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.layer-btn:hover { border-color: var(--acc); color: var(--acc); }
.layer-btn[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
@media (pointer: coarse) {
  .layer-btn { min-height: 44px; }
}

.map-stage {
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.6rem 0.65rem 0.5rem;
}
.map-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--mut);
}
.map-svg {
  display: block;
  width: 100%;
  max-height: 445px;
  height: auto;
}
.dist-poly {
  stroke: var(--map-stroke);
  stroke-width: 1.1;
  stroke-linejoin: round;
  cursor: pointer;
  transition: opacity 0.12s ease;
}
.dist-poly:hover, .dist-poly:focus-visible {
  stroke: var(--map-stroke-sel);
  stroke-width: 2.4;
  outline: none;
}
.dist-poly.is-selected {
  stroke: var(--map-stroke-sel);
  stroke-width: 2.8;
}
.dist-nonrep {
  fill: url(#hatch-nonrep);
  stroke: var(--map-hatch-fg);
  stroke-width: 0.9;
}
.river-line {
  fill: none;
  stroke: var(--river-stroke);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0.85;
}
.map-label {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  fill: var(--fg);
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}
.map-river-lbl {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 10px;
  fill: var(--mut);
  pointer-events: none;
}

/* Choropleth color classes (all themed via CSS vars, zero inline colors) */
.c-s0 { fill: var(--map-s0); }
.c-s1 { fill: var(--map-s1); }
.c-s2 { fill: var(--map-s2); }
.c-s3 { fill: var(--map-s3); }
.c-s4 { fill: var(--map-s4); }
.c-s5 { fill: var(--map-s5); }
.c-t0 { fill: var(--map-t0); }
.c-t1 { fill: var(--map-t1); }
.c-t2 { fill: var(--map-t2); }
.c-t3 { fill: var(--map-t3); }
.c-t4 { fill: var(--map-t4); }
.c-t5 { fill: var(--map-t5); }
.c-d0 { fill: var(--map-d0); }
.c-d1 { fill: var(--map-d1); }
.c-d2 { fill: var(--map-d2); }
.c-d3 { fill: var(--map-d3); }
.c-d4 { fill: var(--map-d4); }
.c-d5 { fill: var(--map-d5); }

.map-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 15;
  max-width: 230px;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.35;
}
.map-tooltip strong { display: block; font-size: 0.84rem; }
.map-tooltip .tt-hint { display: block; color: var(--mut); margin-top: 0.15rem; font-size: 0.72rem; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.85rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--mut);
}
.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.leg-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1px solid var(--line-strong);
  flex: none;
}
.leg-swatch.sw-hatch {
  background: repeating-linear-gradient(
    -45deg,
    var(--map-hatch-bg),
    var(--map-hatch-bg) 3px,
    var(--map-hatch-fg) 3px,
    var(--map-hatch-fg) 4.5px
  );
}
.leg-swatch.c-s0 { background: var(--map-s0); }
.leg-swatch.c-s1 { background: var(--map-s1); }
.leg-swatch.c-s2 { background: var(--map-s2); }
.leg-swatch.c-s3 { background: var(--map-s3); }
.leg-swatch.c-s4 { background: var(--map-s4); }
.leg-swatch.c-s5 { background: var(--map-s5); }
.leg-swatch.c-t0 { background: var(--map-t0); }
.leg-swatch.c-t1 { background: var(--map-t1); }
.leg-swatch.c-t2 { background: var(--map-t2); }
.leg-swatch.c-t3 { background: var(--map-t3); }
.leg-swatch.c-t4 { background: var(--map-t4); }
.leg-swatch.c-t5 { background: var(--map-t5); }
.leg-swatch.c-d0 { background: var(--map-d0); }
.leg-swatch.c-d1 { background: var(--map-d1); }
.leg-swatch.c-d2 { background: var(--map-d2); }
.leg-swatch.c-d3 { background: var(--map-d3); }
.leg-swatch.c-d4 { background: var(--map-d4); }
.leg-swatch.c-d5 { background: var(--map-d5); }

/* Anchored District Snapshot Strip directly under the map */
.map-snapshot {
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--acc);
  background: var(--bg-2);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-ui);
}
.snap-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.45rem;
}
.snap-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
}
.snap-link {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.snap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.85rem;
  font-size: 0.82rem;
}
.snap-k { display: block; font-size: 0.72rem; color: var(--mut); }
.snap-v { display: block; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fg); line-height: 1.25; }
.snap-s { display: block; font-size: 0.72rem; color: var(--mut); font-variant-numeric: tabular-nums; }

/* --- Editorial Sections Below the Fold --- */
.editorial-sec {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}
.editorial-sec:last-of-type { border-bottom: 0; }
.sec-head {
  max-width: var(--measure);
  margin-bottom: 1.35rem;
}
.sec-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--acc);
}
h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.42rem, 2.5vw, 1.92rem);
  font-weight: 700;
  line-height: 1.18;
}
h3 {
  margin: 1.25rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
}
.prose {
  max-width: var(--measure);
}
.prose p { margin: 0 0 0.9rem; }
.prose p:last-child { margin-bottom: 0; }

/* Charts Container */
.chart-frame {
  border-top: 2px solid var(--fg);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 1.1rem 1rem 0.9rem;
  margin-top: 1.15rem;
}
.chart-bar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-ui);
}
.chart-controls-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
}
.chart-controls-group label {
  font-size: 0.82rem;
  font-weight: 600;
}
.chart-controls-group select {
  min-height: 40px;
  padding: 0.35rem 0.6rem;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: max(1rem, 0.88rem);
}
.chart-svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart-caption {
  margin: 0.65rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--mut);
}

/* Diverging Balance SVG */
.bal-axis { stroke: var(--line-strong); stroke-width: 1.5; }
.bal-grid { stroke: var(--chart-grid); stroke-width: 1; stroke-dasharray: 2 3; }
.bal-bar-pos { fill: var(--bar-pos); }
.bal-bar-neg { fill: var(--bar-neg); }
.bal-row-link { cursor: pointer; }
.bal-row-link:hover rect { opacity: 0.82; }
.bal-name {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  fill: var(--fg);
}
.bal-val {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  fill: var(--mut);
  font-variant-numeric: tabular-nums;
}
.bal-val-strong {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  fill: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* Trajectory & Time Slider */
.year-player {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  margin-bottom: 0.9rem;
  font-family: var(--font-ui);
}
.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--fg);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.play-btn:hover { border-color: var(--acc); color: var(--acc); }
.year-range {
  flex: 1;
  min-width: 150px;
  min-height: 36px;
}
.year-readout {
  font-size: 0.86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.traj-grid { stroke: var(--chart-grid); stroke-width: 1; }
.traj-axis-lbl {
  font-family: var(--font-ui);
  font-size: 11px;
  fill: var(--mut);
  font-variant-numeric: tabular-nums;
}
.traj-line-chi { fill: none; stroke: var(--chart-chi); stroke-width: 2.3; }
.traj-line-nat { fill: none; stroke: var(--chart-nat); stroke-width: 2.1; stroke-dasharray: 5 3; }
.traj-line-sel { fill: none; stroke: var(--chart-sel); stroke-width: 2.8; }
.traj-line-pen { fill: none; stroke: var(--acc-2); stroke-width: 2.2; stroke-dasharray: 2 3; }
.traj-cursor { stroke: var(--line-strong); stroke-width: 1.4; stroke-dasharray: 3 3; }
.traj-dot-chi { fill: var(--chart-chi); }
.traj-dot-nat { fill: var(--chart-nat); }
.traj-dot-sel { fill: var(--chart-sel); }

.chart-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--fg);
  margin-bottom: 0.65rem;
}
.cl-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.cl-line { display: inline-block; width: 20px; height: 3px; }
.cl-chi { background: var(--chart-chi); }
.cl-nat { background: repeating-linear-gradient(90deg, var(--chart-nat) 0 6px, transparent 6px 9px); }
.cl-sel { background: var(--chart-sel); }
.cl-f { background: var(--chart-f); height: 9px; width: 9px; border-radius: 50%; }
.cl-m { background: var(--chart-m); height: 9px; width: 9px; border-radius: 50%; }

/* Gender Gap Split Grid */
.two-col-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}
@media (min-width: 820px) {
  .two-col-charts { grid-template-columns: 1fr 1fr; }
}
.gap-line { stroke: var(--line-strong); stroke-width: 2; }
.gap-dot-f { fill: var(--chart-f); stroke: var(--surface); stroke-width: 1.5; }
.gap-dot-m { fill: var(--chart-m); stroke: var(--surface); stroke-width: 1.5; }

/* Sector Matrix Bars */
.sector-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.sector-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line-soft);
}
.sector-row:last-child { border-bottom: 0; padding-bottom: 0; }
.sector-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  font-family: var(--font-ui);
}
.sector-name { font-size: 0.9rem; font-weight: 600; color: var(--fg); }
.sector-nums { font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--fg); }
.sector-meta { font-size: 0.78rem; color: var(--mut); font-weight: 400; }
.sector-track {
  display: block;
  width: 100%;
  height: 10px;
  background: var(--bar-track);
  overflow: hidden;
}
.sector-fill {
  fill: var(--acc);
}
.sector-fill.is-top { fill: var(--acc-2); }

/* --- Responsive Directory Table (modern-web-guidance: responsive-table) --- */
.dir-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-ui);
}
.dir-search {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}
.dir-search label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.dir-search input {
  width: 100%;
  min-height: 46px;
  padding: 0.45rem 0.7rem;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: max(1rem, 0.94rem);
}
.dir-sort-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.sort-btn {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.38rem 0.62rem;
  min-height: 38px;
  cursor: pointer;
}
.sort-btn[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  border-top: 2px solid var(--fg);
  border-bottom: 2px solid var(--fg);
  background: var(--surface);
  container-type: inline-size;
}
.dir-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}
.dir-table caption {
  text-align: left;
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  color: var(--mut);
  border-bottom: 1px solid var(--line);
}
.dir-table thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: var(--bg-2);
  color: var(--fg);
  font-weight: 600;
  font-size: 0.78rem;
  text-align: right;
  padding: 0.6rem 0.65rem;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.dir-table thead th:first-child,
.dir-table thead th:nth-child(2) { text-align: left; }
.dir-table tbody th,
.dir-table tbody td {
  padding: 0.56rem 0.65rem;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}
.dir-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left;
  font-weight: 600;
}
.dir-table tbody td:first-child { text-align: left; color: var(--mut); }
.dir-table tbody tr:hover th,
.dir-table tbody tr:hover td { background: var(--bg-2); }
.dir-table tbody tr.is-extra-hidden { display: none; }
.ratio-hi { color: var(--acc-2); font-weight: 700; }
.ratio-lo { color: var(--acc); font-weight: 700; }

@container (width < 640px) {
  .dir-table, .dir-table thead, .dir-table tbody, .dir-table tr, .dir-table th, .dir-table td {
    display: block;
  }
  .dir-table thead { display: none; }
  .dir-table tbody tr {
    border-bottom: 1.5px solid var(--line-strong);
    padding: 0.45rem 0.65rem;
  }
  .dir-table tbody th {
    position: sticky;
    inset-block-start: 0;
    background: var(--bg-2);
    padding: 0.4rem 0.5rem;
    margin: -0.45rem -0.65rem 0.35rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.94rem;
  }
  .dir-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: right;
    padding: 0.25rem 0;
    border-bottom: 1px dotted var(--line-soft);
    white-space: normal;
  }
  .dir-table tbody td:last-child { border-bottom: 0; }
  .dir-table tbody td::before {
    font-weight: 600;
    color: var(--mut);
    text-align: left;
  }
  .dir-table tbody td:nth-child(1)::before { content: var(--l-1); }
  .dir-table tbody td:nth-child(3)::before { content: var(--l-3); }
  .dir-table tbody td:nth-child(4)::before { content: var(--l-4); }
  .dir-table tbody td:nth-child(5)::before { content: var(--l-5); }
  .dir-table tbody td:nth-child(6)::before { content: var(--l-6); }
  .dir-table tbody td:nth-child(7)::before { content: var(--l-7); }
  .dir-table tbody td:nth-child(8)::before { content: var(--l-8); }
  .dir-table tbody td:nth-child(9)::before { content: var(--l-9); }
}

.dir-table.is-ro {
  --l-1: "Loc";
  --l-3: "Salariu brut 2025";
  --l-4: "Net estimat";
  --l-5: "Pensie medie 2026";
  --l-6: "Salariați (31 dec.)";
  --l-7: "Pensionari (1 ian.)";
  --l-8: "Salariați / pensionar";
  --l-9: "Pensionari care lucrează";
}
.dir-table.is-en {
  --l-1: "Rank";
  --l-3: "2025 gross";
  --l-4: "Est. net";
  --l-5: "2026 pension";
  --l-6: "Workers (31 Dec)";
  --l-7: "Pensioners (1 Jan)";
  --l-8: "Workers / pensioner";
  --l-9: "Working pensioners";
}

.expand-bar {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.expand-btn {
  border: 1.5px solid var(--fg);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  min-height: 44px;
  cursor: pointer;
}
.expand-btn:hover { border-color: var(--acc); color: var(--acc); }

/* --- Dossier Pages (70 Static District Pages) --- */
.breadcrumb {
  margin: 1rem 0 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--mut);
}
.dossier-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0.5rem 0 1.5rem;
  border-bottom: 3px double var(--line-strong);
}
@media (min-width: 780px) {
  .dossier-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    align-items: center;
  }
}
.minimap-box {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.6rem;
}
.minimap-svg {
  display: block;
  width: 100%;
  max-height: 230px;
  height: auto;
}
.mm-bg { fill: var(--mm-bg); stroke: var(--mm-stroke); stroke-width: 1.25; stroke-linejoin: round; }
.mm-hl { fill: var(--acc); stroke: var(--fg); stroke-width: 2.1; stroke-linejoin: round; }
.mm-nonrep { fill: var(--mm-nonrep-bg); stroke: var(--mm-nonrep-stroke); stroke-width: 0.9; stroke-dasharray: 2.5 2.5; }

.dossier-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (min-width: 780px) {
  .dossier-grid { grid-template-columns: 1fr 1fr; }
}
.dossier-block {
  border-top: 2px solid var(--fg);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 1rem 1.05rem;
}
.kv-list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
}
.kv-list dt { color: var(--mut); border-bottom: 1px dotted var(--line-soft); padding-bottom: 0.35rem; }
.kv-list dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; border-bottom: 1px dotted var(--line-soft); padding-bottom: 0.35rem; }

.dossier-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  font-family: var(--font-ui);
}
.cta-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  background: var(--acc);
  color: var(--on-acc);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}
.cta-link:hover { background: var(--acc-2); color: var(--on-acc-2); }

.neighbor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.86rem;
}

/* --- Methodology & Bounded Footer --- */
.sources-list {
  padding-left: 1.25rem;
  margin: 0.75rem 0 0;
  max-width: var(--measure);
}
.sources-list li {
  margin-bottom: 0.45rem;
  font-size: 0.94rem;
}
.site-footer {
  margin-top: 2.5rem;
  border-top: 3px double var(--line-strong);
  background: var(--bg-2);
  padding: 1.5rem 0 2.25rem;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  color: var(--mut);
}
.footer-inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.15rem;
}

/* Status & Accessibility Helpers */
.status-msg {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--acc-2);
  min-height: 1.2em;
}

@media (prefers-reduced-motion: reduce) {
  .dist-poly, .scroll-rail-fill { transition: none; }
}
@media (forced-colors: active) {
  .radio-opt input:checked + label, .layer-btn[aria-pressed="true"], .sort-btn[aria-pressed="true"] {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
}
