/* v40 TN Desk . shared design system
   Source canon: github.com/vinaylp/tn2026-counting-desk app/globals.css
   Identity: warm paper, newsroom desk, Tamil-script eyebrows. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,500&family=Noto+Serif+Tamil:wght@400;600;700&display=swap");

:root {
  color-scheme: light;
  --paper: #f4efe4;
  --paper-2: #ece5d6;
  --paper-3: #fffaf0;
  --paper-wash: rgba(255, 250, 240, 0.72);
  --body-mid: #f1ebdd;
  --body-end: #ede4d3;
  --grid-line: rgba(17, 17, 17, 0.035);
  --surface: rgba(255, 250, 240, 0.64);
  --surface-strong: rgba(255, 250, 240, 0.98);
  --surface-muted: rgba(255, 250, 240, 0.25);
  --shadow-soft: rgba(17, 17, 17, 0.16);
  --ink: #111111;
  --ink-2: #24201c;
  --graphite: #5e5a52;
  --graphite-2: #8a8175;
  --rule: #171412;
  --rule-hair: #c9bfad;
  --rule-soft: rgba(17, 17, 17, 0.11);
  --live: #b87419;
  --live-wash: rgba(184, 116, 25, 0.1);
  --certified: #aa7a1b;
  --certified-wash: rgba(170, 122, 27, 0.12);
  --danger: #a84938;
  --danger-wash: rgba(168, 73, 56, 0.11);
  --success: #347151;
  --success-wash: rgba(52, 113, 81, 0.11);
  --civic-red: #8b1f2b;
  --result-accent: #8b1f2b;
  --result-accent-strong: #8b1f2b;
  --result-accent-ink: #fffaf0;
  --confidence-medium: #6b661c;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-tamil: "Noto Serif Tamil", Georgia, serif;
  --motion: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 8px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #101411;
  --paper-2: #171c18;
  --paper-3: #20261f;
  --paper-wash: rgba(32, 38, 31, 0.74);
  --body-mid: #121813;
  --body-end: #0c100d;
  --grid-line: rgba(244, 239, 228, 0.045);
  --surface: rgba(32, 38, 31, 0.78);
  --surface-strong: rgba(32, 38, 31, 0.98);
  --surface-muted: rgba(32, 38, 31, 0.36);
  --shadow-soft: rgba(0, 0, 0, 0.42);
  --ink: #f3efe4;
  --ink-2: #ded6c7;
  --graphite: #b8b0a1;
  --graphite-2: #8e8778;
  --rule: #ede5d5;
  --rule-hair: #494336;
  --rule-soft: rgba(244, 239, 228, 0.12);
  --live: #d99b3b;
  --live-wash: rgba(217, 155, 59, 0.16);
  --certified: #d6b55c;
  --certified-wash: rgba(214, 181, 92, 0.16);
  --danger: #d06a5b;
  --success: #6fb58a;
  --civic-red: #d1848a;
  --result-accent: #d0ad6a;
  --result-accent-strong: #7e622f;
  --result-accent-ink: #f7efe0;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  overflow-x: clip;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), var(--grid-line) calc(100% - 1px)),
    linear-gradient(180deg, var(--paper) 0%, var(--body-mid) 52%, var(--body-end) 100%);
  background-color: var(--paper);
  background-size: 24px 24px, auto;
  font-family: var(--font-ui);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 16px;
  line-height: 1.55;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.62'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

:root[data-theme="dark"] body::after {
  opacity: 0.055;
  mix-blend-mode: screen;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; transition: color var(--motion); }

::selection { background: var(--certified-wash); color: var(--ink); }

/* === App shell with vertical hairline rules === */
.app-shell {
  position: relative;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 18px 30px 40px;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule-hair);
  opacity: 0.58;
  pointer-events: none;
  z-index: 1;
}
.app-shell::before { left: 18px; }
.app-shell::after { right: 18px; }

@media (max-width: 720px) {
  .app-shell { padding: 14px 18px 32px; }
  .app-shell::before { left: 10px; }
  .app-shell::after { right: 10px; }
}

/* === Disclaimer banner === */
.disclaimer {
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid var(--rule-hair);
  background: var(--paper-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: var(--graphite);
}
.disclaimer strong { color: var(--ink); font-weight: 600; }
.disclaimer a { color: var(--civic-red); border-bottom: 1px solid currentColor; }
.disclaimer a:hover { color: var(--ink); }

/* === Masthead (.topbar) . newspaper border device === */
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 14px 0 14px;
  border-top: 4px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 7px 0 0 var(--rule-hair);
  margin-bottom: 24px;
}

@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr; gap: 12px; padding: 12px 0; }
}

.topbar h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.92;
}

.topbar-kicker {
  margin: 0 0 8px;
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.topbar-kicker .tamil {
  color: var(--ink);
  font-family: var(--font-tamil);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .topbar-actions { justify-content: flex-start; }
}

/* === Text button (nav links) === */
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--rule-hair);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--motion), border-color var(--motion);
}
.text-button:hover { background: var(--paper-3); border-color: var(--ink); }
.text-button[aria-current="page"] { background: var(--ink); color: var(--paper-3); border-color: var(--ink); }

/* === Theme toggle === */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule-hair);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.theme-toggle::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: inset 4px 0 0 var(--paper);
}

/* === Eyebrow / kicker labels === */
.eyebrow {
  margin: 0 0 8px;
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

/* === Sub-nav (sticky anchors within a page) === */
.subnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper-wash);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule-hair);
  margin: 0 -30px 36px;
  padding: 10px 30px;
}
@media (max-width: 720px) { .subnav { margin: 0 -18px 28px; padding: 10px 18px; } }

.subnav-inner {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: center;
}
.subnav-inner::-webkit-scrollbar { display: none; }

.subnav a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--graphite);
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--motion), border-color var(--motion);
}
.subnav a:hover { color: var(--ink); }
.subnav a.active { color: var(--civic-red); border-bottom-color: var(--civic-red); }
.subnav a .count { color: var(--graphite-2); margin-left: 4px; }
.subnav a.active .count { color: var(--civic-red); }
.subnav .updated { font-family: var(--font-mono); font-size: 11px; color: var(--graphite); white-space: nowrap; margin-left: auto; }
@media (max-width: 1024px) { .subnav .updated { display: none; } }

/* === Sections === */
section.block { padding-top: 56px; }
@media (max-width: 720px) { section.block { padding-top: 40px; } }

.section-head { margin-bottom: 24px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head .left { display: flex; flex-direction: column; gap: 6px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.02;
  letter-spacing: 0;
  margin: 0;
  color: var(--ink);
}
.section-title .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--graphite);
  margin-left: 14px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  vertical-align: 8px;
}
.section-tagline { font-size: 14px; color: var(--graphite); margin: 0; max-width: 560px; line-height: 1.5; }

/* === Hero stats strip === */
.ctx {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 28px 0 32px;
  border-top: 1px solid var(--rule-hair);
  border-bottom: 1px solid var(--rule-hair);
}
@media (max-width: 900px) { .ctx { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .ctx { grid-template-columns: 1fr; } }
.ctx-cell {
  padding: 18px 22px;
  border-right: 1px solid var(--rule-hair);
}
.ctx-cell:last-child { border-right: none; }
@media (max-width: 900px) {
  .ctx-cell:nth-child(2n) { border-right: none; }
  .ctx-cell:nth-child(-n+2) { border-bottom: 1px solid var(--rule-hair); }
}
@media (max-width: 480px) {
  .ctx-cell { border-right: none; border-bottom: 1px solid var(--rule-hair); }
  .ctx-cell:last-child { border-bottom: none; }
}
.ctx-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  margin: 0;
}
.ctx-value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.05;
  margin-top: 8px;
  color: var(--ink);
}
.ctx-value.num {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.02em;
  color: var(--civic-red);
}
.ctx-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  margin-top: 6px;
  letter-spacing: 0.03em;
}

/* === Search bar === */
.searchbar {
  margin: 28px 0 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.searchbar input {
  flex: 1 1 360px;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 16px;
  border: 1px solid var(--rule-hair);
  border-radius: var(--radius);
  background: var(--paper-3);
  color: var(--ink);
}
.searchbar input:focus { outline: 2px solid var(--civic-red); outline-offset: -1px; border-color: var(--civic-red); }
.searchbar .hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  letter-spacing: 0.04em;
}
.searchbar .hint kbd {
  background: var(--paper-3);
  border: 1px solid var(--rule-hair);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink);
}
.searchbar .result-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  letter-spacing: 0.04em;
}

/* === Verification badge (C / R / V) === */
.vbadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border: 1px solid;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  vertical-align: 3px;
  margin-left: 6px;
  cursor: help;
}
.vbadge.c { color: var(--certified); border-color: var(--certified); background: var(--certified-wash); }
.vbadge.r { color: var(--live); border-color: var(--live); background: var(--live-wash); }
.vbadge.v { color: var(--graphite-2); border-color: var(--graphite-2); }

/* === Cards / profile cards === */
.card,
.profile-card {
  background: var(--paper-3);
  border: 1px solid var(--rule-hair);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 0 var(--rule-soft), 0 6px 16px -8px var(--shadow-soft);
  transition: border-color var(--motion), transform var(--motion);
}
.profile-card { cursor: pointer; }
.profile-card:hover { border-color: var(--ink); }
.profile-card:focus-visible { outline: 2px solid var(--civic-red); outline-offset: 2px; }

.profile-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.profile-card .name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}
.profile-card .batch {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--civic-red);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.profile-card .role { font-size: 13px; color: var(--graphite); margin-top: 4px; }
.profile-card .field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-top: 18px;
}
.profile-card .field-value { font-size: 14px; font-weight: 500; margin-top: 4px; line-height: 1.4; color: var(--ink); }
.profile-card .footer-row {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-hair);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  letter-spacing: 0.04em;
}
.profile-card .open { color: var(--civic-red); }

.profiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* === Ministry blocks === */
.ministries { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .ministries { grid-template-columns: 1fr; } }
.ministry {
  background: var(--paper-3);
  border: 1px solid var(--rule-hair);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 0 var(--rule-soft);
}
.ministry h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--ink);
}
.ministry .pair { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dotted var(--rule-hair); font-size: 14px; }
.ministry .pair:last-of-type { border-bottom: none; }
.ministry .pair .k {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  padding-top: 3px;
}
.ministry .pair .v { font-weight: 500; line-height: 1.4; color: var(--ink); }
.ministry .pair .v .meta {
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 2px;
  letter-spacing: 0.03em;
}
.ministry .agencies-line {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-hair);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  line-height: 1.6;
  letter-spacing: 0.03em;
}
.ministry .agencies-line strong { color: var(--ink); font-weight: 600; }

/* === Tables (newspaper style) === */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule-hair);
  border-radius: var(--radius);
  background: var(--paper-3);
  box-shadow: 0 1px 0 var(--rule-soft);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 13px 18px;
  vertical-align: top;
}
th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule-hair);
}
tbody tr { border-top: 1px solid var(--rule-hair); transition: background var(--motion); }
tbody tr:hover { background: var(--paper-2); }
td .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  margin-top: 3px;
  letter-spacing: 0.03em;
}
td .name-cell { font-family: var(--font-display); font-weight: 500; font-size: 16px; color: var(--ink); line-height: 1.2; }

/* === Districts coverage banner === */
.districts-coverage {
  background: var(--paper-3);
  border: 1px solid var(--rule-hair);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}
.districts-coverage .num {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 22px;
  color: var(--civic-red);
  letter-spacing: -0.02em;
}
.districts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.district {
  border: 1px solid var(--rule-hair);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--paper-3);
  font-size: 14px;
  box-shadow: 0 1px 0 var(--rule-soft);
}
.district .label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
}
.district .name { font-family: var(--font-display); font-weight: 500; font-size: 16px; margin-top: 4px; color: var(--ink); line-height: 1.2; }
.district .meta { color: var(--graphite); font-family: var(--font-mono); font-size: 11px; margin-top: 4px; letter-spacing: 0.03em; }

/* === Timeline === */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--certified);
}
.timeline-item { position: relative; padding-bottom: 28px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--certified);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item .date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--civic-red);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.timeline-item .headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  margin: 4px 0 8px;
  line-height: 1.25;
  color: var(--ink);
}
.timeline-item .detail { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.timeline-item ul { margin: 8px 0 0; padding-left: 18px; }
.timeline-item li { font-size: 14px; line-height: 1.5; margin-bottom: 5px; color: var(--ink-2); }
.timeline-item .src {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--graphite);
  margin-top: 8px;
  letter-spacing: 0.03em;
}

/* === Modal === */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.65);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  margin: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.modal-header {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--rule-hair);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.modal-header .name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
.modal-header .role { font-size: 13px; color: var(--graphite); margin-top: 4px; }
.modal-close {
  background: none;
  border: 1px solid var(--rule-hair);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  color: var(--graphite);
  transition: color var(--motion), border-color var(--motion);
}
.modal-close:hover { color: var(--ink); border-color: var(--ink); }
.modal-body { padding: 22px 26px 26px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 22px;
  border-top: 1px solid var(--rule-hair);
  border-bottom: 1px solid var(--rule-hair);
}
@media (max-width: 600px) { .stats-grid { grid-template-columns: 1fr; } }
.stat { padding: 14px 18px; border-right: 1px solid var(--rule-hair); }
.stat:last-child { border-right: none; }
@media (max-width: 600px) { .stat { border-right: none; border-bottom: 1px solid var(--rule-hair); } .stat:last-child { border-bottom: none; } }
.stat .label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
}
.stat .value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  margin-top: 4px;
  color: var(--ink);
}
.stat .value.sm { font-family: var(--font-ui); font-size: 14px; font-weight: 500; line-height: 1.35; }
.modal-section { margin-bottom: 22px; }
.modal-section h3 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
  margin: 0 0 10px;
}
.modal-section ul { margin: 0; padding-left: 16px; }
.modal-section li { margin-bottom: 6px; line-height: 1.5; color: var(--ink-2); }
.modal-section p { color: var(--ink-2); margin: 0; line-height: 1.6; }
.sources { border-top: 1px solid var(--rule-hair); padding-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--graphite); line-height: 1.6; letter-spacing: 0.03em; }
.sources .label { font-weight: 600; color: var(--ink); letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; margin-bottom: 4px; display: block; }

/* === Footer === */
footer { margin-top: 96px; padding: 40px 0; border-top: 1px solid var(--rule-hair); text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--graphite); letter-spacing: 0.04em; }
footer .disclaimer-text { max-width: 640px; margin: 0 auto; line-height: 1.7; }
footer .ver { font-family: var(--font-mono); font-size: 10px; margin-top: 12px; color: var(--graphite-2); }
footer .report-error { display: inline-block; margin-top: 8px; color: var(--civic-red); border-bottom: 1px solid currentColor; text-transform: uppercase; letter-spacing: 0.06em; }
footer .report-error:hover { color: var(--ink); }

/* === Misc === */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.mono { font-family: var(--font-mono); }

@media print {
  .subnav, .searchbar, .modal-backdrop, .topbar-actions, .disclaimer { display: none !important; }
  body { background: white; }
  .profile-card, .ministry, .district { break-inside: avoid; box-shadow: none; }
  .app-shell::before, .app-shell::after { display: none; }
}
