/* BharatInfo — CLASSIC look (the original stylesheet, preserved). Used by classic/*.html.
 * Fixes applied 2026-11-29 keep the same look; see the block at the end of this file. */
:root {
  --saffron: #FF9933;
  --green: #138808;
  --navy: #000080;
  --ink: #1c2430;
  --muted: #5b6673;
  --line: #e2e6ec;
  --bg: #f6f7f9;
  --card: #ffffff;
  --card-2: #fbfcfe;
  --shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --radius: 12px;
  --elected: #c2410c;
  --elected-bg: #fff4ec;
  --admin: #1d4ed8;
  --admin-bg: #eef3ff;
  --tax: #047857;
  --tax-bg: #eafaf3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--navy); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand .tri { width: 26px; height: 18px; border-radius: 3px; overflow: hidden; display: inline-flex; flex-direction: column; box-shadow: var(--shadow); }
.brand .tri span { flex: 1; }
.brand .tri .s1 { background: var(--saffron); }
.brand .tri .s2 { background: #fff; }
.brand .tri .s3 { background: var(--green); }
.brand small { font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px;
  padding: 7px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.active { background: var(--ink); color: #fff; }

/* ---------- Layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 80px; }
.page-head { margin: 8px 0 20px; }
.page-head h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--muted); max-width: 70ch; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { text-decoration: none; }

/* ---------- Landing hero ---------- */
.hero { text-align: center; padding: 30px 0 10px; }
.hero h1 { font-size: 40px; margin: 0 0 10px; letter-spacing: -.03em; }
.hero p { color: var(--muted); max-width: 60ch; margin: 0 auto; font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 34px; }
.card-link {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.card-link:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(16,24,40,.10); }
.card-link .tag { display:inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.card-link h2 { margin: 0 0 8px; font-size: 20px; }
.card-link p { margin: 0; color: var(--muted); font-size: 14px; }
.tag.elected { background: var(--elected-bg); color: var(--elected); }
.tag.admin { background: var(--admin-bg); color: var(--admin); }
.tag.tax { background: var(--tax-bg); color: var(--tax); }

/* ---------- Level sections ---------- */
.level { margin: 26px 0; }
.level > h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 0 0 12px; display: flex; align-items: center; gap: 10px;
}
.level > h2::after { content:""; flex:1; height:1px; background: var(--line); }

/* ---------- Tree / nodes ---------- */
.tree { display: flex; flex-direction: column; gap: 10px; }
.node {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.node.depth-1 { margin-left: 22px; }
.node.depth-2 { margin-left: 44px; }
.node.depth-3 { margin-left: 66px; }
.node-head {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer;
  user-select: none;
}
.node-head:hover { background: var(--card-2); }
.twist { width: 16px; color: var(--muted); transition: transform .15s ease; flex: none; font-size: 12px; }
.node.open > .node-head .twist { transform: rotate(90deg); }
.node-title { font-weight: 700; font-size: 15px; }
.node-sub { color: var(--muted); font-size: 13px; font-weight: 500; }
.node-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill.branch { background: #eef2f7; color: #475569; }
.pill.elected-in { background: #ecfdf5; color: #047857; }
.pill.appointed { background: #eff6ff; color: #1d4ed8; }
.pill.count { background: #f1f5f9; color: #64748b; }

.node-body { padding: 0 16px 14px 44px; display: none; }
.node.open > .node-body { display: block; }
.node-body .row { margin: 8px 0; }
.node-body .row .k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.node-body .row .v { font-size: 14px; }
.node-body ul { margin: 4px 0 0; padding-left: 18px; }
.node-body li { margin: 3px 0; font-size: 14px; }

/* subject chips (overlap tags) */
.subjects { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip {
  font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  background: #f1f5f9; color: #475569; border: 1px solid transparent; transition: all .1s ease;
}
.chip:hover { border-color: #cbd5e1; }
.chip.hot { background: #fde68a; color: #92400e; border-color: #f59e0b; font-weight: 700; }

.node.subject-hit { outline: 2px solid #f59e0b; outline-offset: -2px; }
/* dim only the node itself — a highlighted child inside a dimmed parent must stay visible */
.node.dimmed > .node-head, .node.dimmed > .node-body { opacity: .38; }

/* ---------- Controls ---------- */
.controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 18px; position: sticky; top: var(--header-h, 58px); z-index: 30;
}
.controls .grow { flex: 1; min-width: 180px; }
.controls input[type="search"] {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px;
}
.btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--bg); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.hint {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
}
.overlap-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* finder step ladders */
.steps { margin: 6px 0 0; padding-left: 20px; }
.steps li { margin: 7px 0; font-size: 14px; }
ul.steps, ul.steps li { list-style: none; } ul.steps { padding-left: 0; } /* ol.steps keeps its numbers (escalation order) */
ul.steps li { margin: 6px 0; }
.steps .pill { margin-right: 6px; }
a.chip { text-decoration: none; }

/* ---------- Tables (tax page) ---------- */
.tblwrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--card-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tr:last-child td { border-bottom: none; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.badge.direct { background: #eff6ff; color: #1d4ed8; }
.badge.indirect { background: #fef3c7; color: #b45309; }
.badge.union { background: #ede9fe; color: #6d28d9; }
.badge.state { background: #dcfce7; color: #15803d; }
.badge.local { background: #ffe4e6; color: #be123c; }
.badge.shared { background: #f1f5f9; color: #475569; }

.section-title { font-size: 20px; margin: 30px 0 12px; }
.callout {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--saffron);
  border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow); margin: 16px 0;
}
.callout h3 { margin: 0 0 6px; font-size: 16px; }
.callout p { margin: 0; color: var(--muted); font-size: 14px; }

footer { color: var(--muted); font-size: 13px; text-align: center; padding: 30px 20px; border-top: 1px solid var(--line); margin-top: 40px; }
.disclaimer { max-width: 70ch; margin: 0 auto; }

/* ---------- Fixes 2026-11-29 (same look; behaviour & accessibility) ---------- */
/* Subject highlighter bar — previously styled only inline on overlap.html, so it was unstyled on
   the People's Representatives / Administrative pages. */
.subject-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.subject-bar-label { margin-right: 6px; }

/* Clickable rows and chips are real <button>s now (keyboard-operable) — reset them to the old look. */
button.node-head { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.node-main { display: block; }
.node-main .node-sub { display: block; }
button.chip { font-family: inherit; line-height: 1.5; }
.chip[aria-pressed="true"] { background: #fde68a; color: #92400e; border-color: #f59e0b; font-weight: 700; }
.chip-static { cursor: default; }
.chip-static:hover { border-color: transparent; }
.btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Status lines & notices */
.search-status { font-size: 13px; color: var(--muted); margin: 0 2px 10px; min-height: 1.2em; }
.notice {
  background: #eef3ff; border: 1px solid #c7d7fe; color: #1e3a8a;
  padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
}

/* Overlap result columns (were inline styles) — stack on narrow screens */
.overlap-cols { grid-template-columns: 1fr 1fr; align-items: start; }
.col-elected { color: var(--elected); }
.col-admin { color: var(--admin); }
@media (max-width: 640px) { .overlap-cols { grid-template-columns: 1fr; } }

/* Interactive | Classic switch (header) */
.mode-switch {
  display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 2px; background: var(--bg); font-size: 13px; font-weight: 600;
}
.mode-switch a, .mode-switch span { padding: 5px 11px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.mode-switch a:hover { color: var(--ink); background: var(--card); }
.mode-switch [aria-current] { background: var(--ink); color: #fff; }

/* Tax legend — the Union dot now matches the Union badge colour (was blue vs violet) */
.dot-union { background: #6d28d9; }
.dot-state { background: #15803d; }
.dot-local { background: #be123c; }
.dot-shared { background: #475569; }
.callout-resolved { border-left-color: var(--navy); }
