/* ==========================================================================
   Theme layer — light / dark (29-10-2026)
   Light = default. Dark = html[data-theme="dark"]:not(.hc).
   Sirf palette + surfaces override karta hai; layout/type same rehta hai.
   ========================================================================== */

html[data-theme="dark"]:not(.hc) {
  --paper: #121C2B;
  --page: #0A121E;
  --mist: #0E1826;
  --ivory: #131E2D;
  --line: #24334A;
  --line-2: #2E405C;
  --hair: rgba(255, 255, 255, .09);

  --ink: #E9EFF8;
  --ink-2: #C3D0E2;
  --ink-3: #93A3B8;

  --teal: #5FD3B9;
  --teal-2: #7BE0C8;
  --teal-soft: rgba(95, 211, 185, .14);
  --teal-line: rgba(95, 211, 185, .32);

  --sh-1: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 18px -8px rgba(0, 0, 0, .55);
  --sh-2: 0 2px 4px rgba(0, 0, 0, .45), 0 18px 40px -18px rgba(0, 0, 0, .7);
  --sh-3: 0 30px 70px -28px rgba(0, 0, 0, .8);
  --sh-inset: inset 0 0 0 1px rgba(255, 255, 255, .06);

  color-scheme: dark;
}

html[data-theme="dark"]:not(.hc) body {
  background: var(--page);
  color: var(--ink);
}

/* ---- chrome ------------------------------------------------------------- */
html[data-theme="dark"]:not(.hc) .gov-top,
html[data-theme="dark"]:not(.hc) .gov-head,
html[data-theme="dark"]:not(.hc) .gov-footer {
  background: #060E18;
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"]:not(.hc) .gov-top a,
html[data-theme="dark"]:not(.hc) .gov-name,
html[data-theme="dark"]:not(.hc) .gov-sub,
html[data-theme="dark"]:not(.hc) .gov-nav a,
html[data-theme="dark"]:not(.hc) .gov-footer h4,
html[data-theme="dark"]:not(.hc) .gov-footer h5,
html[data-theme="dark"]:not(.hc) .gov-footer p,
html[data-theme="dark"]:not(.hc) .gov-footer a,
html[data-theme="dark"]:not(.hc) .gov-footer li { color: var(--ink-2); }
html[data-theme="dark"]:not(.hc) .gov-name { color: #fff; }
html[data-theme="dark"]:not(.hc) .gov-nav a[aria-current="page"],
html[data-theme="dark"]:not(.hc) .gov-nav a.active { color: var(--teal-2); }

html[data-theme="dark"]:not(.hc) .gov-lang .on {
  background: #1B2A3F;
  color: #fff;
  border-color: var(--line);
}
html[data-theme="dark"]:not(.hc) .a11y-btn {
  border-color: var(--line);
  color: var(--ink-2);
  background: transparent;
}
html[data-theme="dark"]:not(.hc) .a11y-btn:hover { background: rgba(255, 255, 255, .08); }
html[data-theme="dark"]:not(.hc) #hcToggle[aria-pressed="true"] {
  background: var(--teal);
  color: #06121F;
  border-color: var(--teal);
}
html[data-theme="dark"]:not(.hc) .gov-search input {
  background: #0E1826;
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"]:not(.hc) .gov-search input::placeholder { color: var(--ink-3); }

/* ---- bands / sections --------------------------------------------------- */
html[data-theme="dark"]:not(.hc) .band-x,
html[data-theme="dark"]:not(.hc) .band-mist,
html[data-theme="dark"]:not(.hc) .band-ivory { background: var(--page); }
html[data-theme="dark"]:not(.hc) .band-deep,
html[data-theme="dark"]:not(.hc) .band-navy { background: #060E18; }

/* ---- cards and panels --------------------------------------------------- */
html[data-theme="dark"]:not(.hc) :where(.card, .news-card, .leader-card, .obj-card, .block-card,
  .gallery-item, .faq-item, .panel-x, .svc-x .card, .news-x, .person, .benefit-card,
  .contact-x .tile, .bv-issue, .bv-toc, .bv-doc-side, .bv-sm-group, .exec-lead,
  .scale-sub, .scale-grid, .dash, .dash-head, .dash-foot, .dash-src, .metric,
  .info-head, .info-pin, .pres, .lookup, .form-card, .table-wrap, .qr-img,
  .member-card, .card-x, .box-x) {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"]:not(.hc) :where(.card, .news-card, .panel-x, .dash, .pres, .metric) {
  box-shadow: var(--sh-1) !important;
}

/* leadership directory rows */
html[data-theme="dark"]:not(.hc) .lead-entry:hover,
html[data-theme="dark"]:not(.hc) .leader-section .leader-card:hover { background: rgba(255, 255, 255, .04) !important; }
html[data-theme="dark"]:not(.hc) .lead-entry,
html[data-theme="dark"]:not(.hc) .leader-section .leader-card { border-color: var(--line) !important; }
html[data-theme="dark"]:not(.hc) .leader-photo,
html[data-theme="dark"]:not(.hc) .lead-entry figure { background: #1A2637; }

/* hero + chips (navy hero already, chips ko dark karo) */
html[data-theme="dark"]:not(.hc) .hero-v3 { background: #060E18; }
html[data-theme="dark"]:not(.hc) :where(.hv3-trust, .hv3-plate, .hv3-seal) {
  background: #101E30 !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"]:not(.hc) .hv3-stats { border-color: var(--line); }
html[data-theme="dark"]:not(.hc) .svc-row--lead { background: #12233A !important; border-color: var(--line) !important; }

/* ---- typography --------------------------------------------------------- */
html[data-theme="dark"]:not(.hc) :where(h1, h2, h3, h4, h5, h6, strong, b) { color: var(--ink); }
html[data-theme="dark"]:not(.hc) :where(p, li, dd, td, th, label, span) { color: inherit; }
html[data-theme="dark"]:not(.hc) :where(.eyebrow, .kicker) { color: var(--teal); }
html[data-theme="dark"]:not(.hc) .crumbs,
html[data-theme="dark"]:not(.hc) .crumbs a { color: var(--ink-3); }
html[data-theme="dark"]:not(.hc) .sec-head p,
html[data-theme="dark"]:not(.hc) .muted,
html[data-theme="dark"]:not(.hc) .sub,
html[data-theme="dark"]:not(.hc) small { color: var(--ink-3); }
html[data-theme="dark"]:not(.hc) a { color: var(--teal-2); }
html[data-theme="dark"]:not(.hc) a.btn-primary { color: #fff; }

/* ---- buttons ------------------------------------------------------------ */
html[data-theme="dark"]:not(.hc) .btn-outline {
  border-color: var(--line-2);
  color: var(--ink);
  background: transparent;
}
html[data-theme="dark"]:not(.hc) .btn-outline:hover { background: rgba(255, 255, 255, .07); }
html[data-theme="dark"]:not(.hc) :where(.btn-ghost, .text-link) { color: var(--teal-2); }

/* ---- forms -------------------------------------------------------------- */
html[data-theme="dark"]:not(.hc) :where(input, select, textarea) {
  background: #0E1826 !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"]:not(.hc) :where(input, textarea)::placeholder { color: var(--ink-3); }
html[data-theme="dark"]:not(.hc) option { background: #0E1826; color: var(--ink); }
html[data-theme="dark"]:not(.hc) :where(input, select, textarea):focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(95, 211, 185, .18);
}

/* ---- tables ------------------------------------------------------------- */
html[data-theme="dark"]:not(.hc) table { border-color: var(--line); }
html[data-theme="dark"]:not(.hc) th { background: #0E1826; color: var(--ink-2); }
html[data-theme="dark"]:not(.hc) td, html[data-theme="dark"]:not(.hc) th { border-color: var(--line); }
html[data-theme="dark"]:not(.hc) tr:hover td { background: rgba(255, 255, 255, .03); }

/* ---- misc --------------------------------------------------------------- */
html[data-theme="dark"]:not(.hc) hr,
html[data-theme="dark"]:not(.hc) .rule,
html[data-theme="dark"]:not(.hc) .sec-head { border-color: var(--line); }
html[data-theme="dark"]:not(.hc) .district-grid a:hover { background: rgba(255, 255, 255, .06); }
html[data-theme="dark"]:not(.hc) ::selection { background: rgba(95, 211, 185, .3); color: #fff; }
html[data-theme="dark"]:not(.hc) .scroll-progress { background: var(--teal); }
html[data-theme="dark"]:not(.hc) img { color-scheme: dark; }

/* mode toggle button */
.mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-size: .82rem;
  line-height: 1;
  opacity: .9;
}
.mode-btn:hover { opacity: 1; }
html[data-theme="dark"]:not(.hc) .mode-btn { border-color: var(--line-2); color: var(--ink); }
/* ---- language switch buttons ------------------------------------------- */
.gov-lang .lang-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: .18rem .5rem;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.6;
}
.gov-lang .lang-btn:hover { background: rgba(255, 255, 255, .12); }
.gov-lang .lang-btn.on {
  background: #fff;
  color: #0A2240;
  border-color: #fff;
}
html[data-theme="dark"]:not(.hc) .gov-lang .lang-btn.on {
  background: var(--teal);
  color: #06121F;
  border-color: var(--teal);
}
/* ---- surfaces found in audit (29-10-2026) -------------------------------- */
html[data-theme="dark"]:not(.hc) .crumbs,
html[data-theme="dark"]:not(.hc) .crumbs-in {
  background: transparent !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"]:not(.hc) .crumbs a,
html[data-theme="dark"]:not(.hc) .crumbs span { color: var(--ink-3) !important; }
html[data-theme="dark"]:not(.hc) :where(.popup-card, .popup-box, .modal-card, .modal-box) {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
/* ---- homepage blocks found in audit ------------------------------------- */
html[data-theme="dark"]:not(.hc) :where(.info, .info-all, .info-head, .info-pin, .info-body,
  .search-x, .pres-photo, .bene-ico, .benefit-icon, .icon-tile) {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"]:not(.hc) .info-all:hover { background: rgba(255, 255, 255, .06) !important; }
html[data-theme="dark"]:not(.hc) .pres-photo { background: #16233A !important; }
/* ---- forms / membership ------------------------------------------------- */
html[data-theme="dark"]:not(.hc) :where(.mode-opt, .mode-opt.is-on, .consent-row, .form-card,
  .form-note, .field, .verify-box, .benefit-list li, .mini-card) {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"]:not(.hc) .mode-opt.is-on {
  background: rgba(95, 211, 185, .14) !important;
  border-color: var(--teal) !important;
}
html[data-theme="dark"]:not(.hc) :where(.mode-opt, .consent-row):hover { background: rgba(255, 255, 255, .06) !important; }
html[data-theme="dark"]:not(.hc) :where(.empty-icon, .no-result .ico, .state-icon) {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--teal);
}
/* ---- about / long-form pages -------------------------------------------- */
html[data-theme="dark"]:not(.hc) :where(.about-block, .section.reveal, .about-card,
  .structure-row, .value-card, .timeline-item, .rules-card) {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"]:not(.hc) :where(.about-block, .rules-card, .timeline-item) li {
  background: transparent !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"]:not(.hc) .section.reveal { background: transparent !important; }
/* ---- about: 5-level structure rows -------------------------------------- */
html[data-theme="dark"]:not(.hc) #structure > div,
html[data-theme="dark"]:not(.hc) #structure > div > div,
html[data-theme="dark"]:not(.hc) #structure > div > div > div {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"]:not(.hc) #structure { background: transparent !important; }
/* ---- leadership facts rail (dark) --------------------------------------- */
html[data-theme="dark"]:not(.hc) .exec-facts { border-color: var(--line); }
html[data-theme="dark"]:not(.hc) .exec-facts .ef-item { border-color: var(--line); }
html[data-theme="dark"]:not(.hc) .exec-facts .ef-item strong { color: var(--ink); }
html[data-theme="dark"]:not(.hc) .exec-facts .ef-item span { color: var(--ink-3); }
html[data-theme="dark"]:not(.hc) .exec-facts .ef-link { color: var(--teal-2); }
/* ==========================================================================
   Contrast fixes (29-10-2026)
   Dark mode: section links, FAQ questions aur primary button ka text
   navy tha — dark background par ghul jaata tha.
   ========================================================================== */
html[data-theme="dark"]:not(.hc) .sec-link,
html[data-theme="dark"]:not(.hc) .sec-head .sec-link,
html[data-theme="dark"]:not(.hc) .faq-x summary,
html[data-theme="dark"]:not(.hc) details > summary,
html[data-theme="dark"]:not(.hc) .dist-index a,
html[data-theme="dark"]:not(.hc) .dist-index-all,
html[data-theme="dark"]:not(.hc) .le-role,
html[data-theme="dark"]:not(.hc) .ef-link,
html[data-theme="dark"]:not(.hc) .text-link {
  color: var(--teal-2) !important;
}

html[data-theme="dark"]:not(.hc) .btn-primary,
html[data-theme="dark"]:not(.hc) .hero-v3 .btn-primary,
html[data-theme="dark"]:not(.hc) .hv3-cta .btn-primary {
  background: #17477F !important;
  border-color: #2B5F9E !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"]:not(.hc) .btn-primary:hover,
html[data-theme="dark"]:not(.hc) .hero-v3 .btn-primary:hover {
  background: #1D5596 !important;
}
html[data-theme="dark"]:not(.hc) .btn-outline {
  border-color: #3A5A85 !important;
  color: #E9EFF8 !important;
  background: rgba(255, 255, 255, .06) !important;
}
html[data-theme="dark"]:not(.hc) .btn-outline:hover { background: rgba(255, 255, 255, .12) !important; }

/* ==========================================================================
   High contrast + dark theme — jab dono on hon
   HC ka maqsad maximum contrast hai, isliye main content black-on-white.
   ========================================================================== */
html.hc main :where(a, summary, p, li, span, h1, h2, h3, h4, h5, h6, strong, small, label, td, th, dt, dd, figcaption, blockquote, cite) {
  color: #000 !important;
}
html.hc main :where(.btn-primary, .btn-outline, button, .sec-link) {
  background: #000 !important;
  color: #fff !important;
  border: 1px solid #000 !important;
}
html.hc main :where(.btn-primary, .btn-outline, button, .sec-link) * { color: #fff !important; }
html.hc main :where(.band-navy, .band-deep, .hero-v3, .hv3-stats, .contact-x .tile, .pres) {
  background: #fff !important;
  color: #000 !important;
}
html.hc main :where(.hero-v3, .band-navy, .band-deep) :where(a, span, p, h1, h2, h3, li, strong) { color: #000 !important; }
html.hc .gov-top, html.hc .gov-head, html.hc .gov-footer { background: #000 !important; }
html.hc .gov-top *, html.hc .gov-head *, html.hc .gov-footer * { color: #fff !important; }
/* HC: navy page headers bhi white ho jayein, warna black text ghul jata hai */
html.hc main :where(.page-header, .hero, .popup-header, .cert-header, .contact-info,
  .benefits-card, .band-navy, .band-deep, .band-x.band-deep, .hero-v3, .hv3-stats,
  .svc-row--lead, .pres, .dash, .metric) {
  background: #fff !important;
  color: #000 !important;
  border-color: #000 !important;
}
html.hc main :where(.page-header, .hero, .popup-header, .cert-header, .contact-info,
  .band-navy, .band-deep, .band-x.band-deep, .hero-v3, .hv3-stats, .pres, .dash, .metric)
  :where(a, span, p, h1, h2, h3, h4, li, strong, small, blockquote, cite, div) {
  color: #000 !important;
}
html.hc main :where(.page-header, .band-navy, .band-deep, .hero-v3)::before,
html.hc main :where(.page-header, .band-navy, .band-deep, .hero-v3)::after {
  display: none !important;
}
html.hc main .svc-row--lead { background: #000 !important; color: #fff !important; }
html.hc main .svc-row--lead :where(a, span, strong, div) { color: #fff !important; }
/* ==========================================================================
   HC final pass (last in file — order matters)
   1) sab text black  2) buttons/lead row black bg  3) unke andar text white
   ========================================================================== */
html.hc body main :where(a, span, p, li, h1, h2, h3, h4, h5, h6, strong, small,
  label, td, th, summary, div, blockquote, cite, dt, dd, figcaption) {
  color: #000 !important;
}
html.hc body main :where(.btn, button, .sec-link, .svc-go, .svc-row--lead) {
  background: #000 !important;
  border-color: #000 !important;
}
html.hc body main :where(.btn, button, .sec-link, .svc-go, .svc-row--lead) :where(*) {
  color: #fff !important;
}
html.hc body main :where(a.btn, button, .sec-link, .svc-go) {
  color: #fff !important;
}
/* language switch (top bar, black header) */
html.hc body .gov-lang .lang-btn {
  background: transparent !important;
  color: #fff !important;
  border-color: #fff !important;
}
html.hc body .gov-lang .lang-btn.on {
  background: #fff !important;
  color: #000 !important;
}
/* HC: lead service row ko white rakho (black-on-black se bachne ke liye) */
html.hc body main .svc-row--lead {
  background: #fff !important;
  border: 1px solid #000 !important;
}
html.hc body main .svc-row--lead :where(*) { color: #000 !important; }
html.hc body main .svc-row--lead .svc-go { color: #000 !important; text-decoration: underline; }
/* lead row ka action link transparent rakho (HC) */
html.hc body main .svc-row--lead .svc-go {
  background: transparent !important;
  border-color: transparent !important;
  color: #000 !important;
  text-decoration: underline;
}
/* HC: header ke chhote buttons bhi saaf dikhein */
html.hc .a11y-btn,
html.hc .mode-btn,
html.hc .gov-a11y button {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #000 !important;
}
html.hc .gov-lang .lang-btn { color: #fff !important; border-color: #fff !important; }
html.hc .gov-lang .lang-btn.on { background: #fff !important; color: #000 !important; }

/* ==========================================================================
   Mirror-fix pass (29-10-2026)
   Kaaran: pages ke andar inline styles (color:var(--navy), color:var(--muted),
   color:#0A2240, background:var(--card,#fff) ...) normal dark rules ko haraa
   dete hain, aur kuch surfaces dark list me hi nahi the. Sab kuch sirf dark
   scope ke andar — light mode bilkul waisa hi rehta hai.
   ========================================================================== */

/* 1) Token bridges — inline var() usages yahin se flip hote hain */
html[data-theme="dark"]:not(.hc) {
  --card: #121C2B;
  --border: #24334A;
  --muted: #93A3B8;
}

/* 2) Inline colour guards — inline style ko sirf !important haraata hai */
html[data-theme="dark"]:not(.hc) [style*="color:var(--navy)" i],
html[data-theme="dark"]:not(.hc) [style*="color: var(--navy)" i],
html[data-theme="dark"]:not(.hc) [style*="color:#0A2240" i],
html[data-theme="dark"]:not(.hc) [style*="color: #0A2240" i],
html[data-theme="dark"]:not(.hc) [style*="color:#0F1B2D" i],
html[data-theme="dark"]:not(.hc) [style*="color: #0F1B2D" i] {
  color: var(--ink) !important;
}
html[data-theme="dark"]:not(.hc) [style*="color:var(--blue)" i],
html[data-theme="dark"]:not(.hc) [style*="color: var(--blue)" i],
html[data-theme="dark"]:not(.hc) [style*="color:#123A6D" i],
html[data-theme="dark"]:not(.hc) [style*="color: #123A6D" i],
html[data-theme="dark"]:not(.hc) [style*="color:#004D40" i],
html[data-theme="dark"]:not(.hc) [style*="color: #004D40" i] {
  color: var(--teal-2) !important;
}
html[data-theme="dark"]:not(.hc) [style*="color:var(--muted)" i],
html[data-theme="dark"]:not(.hc) [style*="color: var(--muted)" i],
html[data-theme="dark"]:not(.hc) [style*="color:#4B5563" i],
html[data-theme="dark"]:not(.hc) [style*="color: #4B5563" i],
html[data-theme="dark"]:not(.hc) [style*="color:#5B6472" i],
html[data-theme="dark"]:not(.hc) [style*="color: #5B6472" i],
html[data-theme="dark"]:not(.hc) [style*="color:#5B6878" i],
html[data-theme="dark"]:not(.hc) [style*="color: #5B6878" i],
html[data-theme="dark"]:not(.hc) [style*="color:#2C3A4D" i],
html[data-theme="dark"]:not(.hc) [style*="color: #2C3A4D" i] {
  color: var(--ink-3) !important;
}

/* 3) Surfaces jo pehli list me reh gaye the */
html[data-theme="dark"]:not(.hc) :where(.contact-form, .location-card,
  .filter-btn, .credits-table, .map-card, .qr-wrap, .verify-card) {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"]:not(.hc) .contact-form :where(label, h3, .subtitle) { color: var(--ink) !important; }
html[data-theme="dark"]:not(.hc) .contact-form :where(.muted-opt, .form-help) { color: var(--ink-3) !important; }

/* gallery filter chips */
html[data-theme="dark"]:not(.hc) .filter-btn {
  background: #16233A !important;
  border: 1px solid var(--line-2) !important;
  color: var(--ink-2) !important;
}
html[data-theme="dark"]:not(.hc) .filter-btn:hover { background: rgba(255, 255, 255, .08) !important; color: var(--ink) !important; }
html[data-theme="dark"]:not(.hc) :where(.filter-btn.on, .filter-btn.is-on, .filter-btn.active) {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
  color: #06121F !important;
}

/* ghost / light buttons dark surface par */
html[data-theme="dark"]:not(.hc) .btn-ghost {
  background: #16233A !important;
  border-color: var(--line-2) !important;
  color: var(--teal-2) !important;
}
html[data-theme="dark"]:not(.hc) .btn-ghost:hover { background: rgba(255, 255, 255, .1) !important; color: #fff !important; }

/* FAQ answers + card body copy */
html[data-theme="dark"]:not(.hc) :where(.faq-a, .faq-item p, .card p, .obj-card p, .policy-card p) {
  color: var(--ink-3) !important;
}

/* 404 watermark */
html[data-theme="dark"]:not(.hc) .error-code { color: rgba(95, 211, 185, .18) !important; }

/* ==========================================================================
   Final sweep (29-10-2026) — jo surfaces/tokens ab tak dark me chhoot gaye
   the. Kaaran do:
   1) style.css/gov.css ke purane tokens (--text, --surface, --bg, --grey-50/
      100, --green-dark, --danger) dark me flip hi nahi hote the, isliye unko
      use karne wale sab elements dark surface par dark text dikha rahe the.
   2) kuch components ne background hard-code #fff kiya hai aur woh dark list
      me nahi the (.alert-x, .bv-pol-card, .bv-noresult, .bv-res-list,
      .combo-list) — unka text light ho jata tha, surface white reh jati thi.
   Sab kuch sirf dark scope ke andar; light mode bilkul untouched.
   ========================================================================== */

/* 1) legacy token bridges ------------------------------------------------ */
html[data-theme="dark"]:not(.hc) {
  --bg: #0A121E;
  --surface: #0E1826;
  --card: #121C2B;
  --border: #24334A;
  --text: #E9EFF8;
  --text-muted: #93A3B8;
  --text-subtle: #93A3B8;
  --muted: #93A3B8;
  --grey-50: #16233A;
  --grey-100: #1B2A3F;
  --green-dark: #5FD3B9;
  --danger: #FF8A80;
}

/* 2) homepage announcement ribbon --------------------------------------- */
html[data-theme="dark"]:not(.hc) .alert-x {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  border-left: 0 !important;
  box-shadow: var(--sh-1) !important;
}
html[data-theme="dark"]:not(.hc) .alert-x .a-body { background: transparent !important; }
html[data-theme="dark"]:not(.hc) .alert-x .a-item { color: var(--ink-2) !important; }
html[data-theme="dark"]:not(.hc) .alert-x .a-more { color: var(--teal-2) !important; }
html[data-theme="dark"]:not(.hc) .alert-x .a-tag {
  background: var(--teal-soft) !important;
  border-color: var(--teal-line) !important;
  color: var(--teal-2) !important;
}
html[data-theme="dark"]:not(.hc) .alert-x .a-dots button { background: var(--line-2) !important; }
html[data-theme="dark"]:not(.hc) .alert-x .a-dots button[aria-current="true"] { background: var(--teal) !important; }

/* 3) policies + search list cards --------------------------------------- */
html[data-theme="dark"]:not(.hc) :where(.bv-pol-card, .bv-noresult, .bv-res-list a) {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  color: var(--ink);
}
html[data-theme="dark"]:not(.hc) .bv-pol-card { border-left: 3px solid var(--teal) !important; }
html[data-theme="dark"]:not(.hc) .bv-noresult { border-style: dashed !important; }
html[data-theme="dark"]:not(.hc) :where(.bv-pol-txt strong, .bv-res-list strong) { color: var(--ink) !important; }
html[data-theme="dark"]:not(.hc) :where(.bv-pol-txt small, .bv-res-list small) { color: var(--ink-3) !important; }
html[data-theme="dark"]:not(.hc) .bv-res-list a:hover {
  background: rgba(255, 255, 255, .05) !important;
  border-color: var(--teal) !important;
}
html[data-theme="dark"]:not(.hc) .bv-pol-card:hover { box-shadow: var(--sh-2) !important; }

/* 4) membership form district suggestions ------------------------------- */
html[data-theme="dark"]:not(.hc) .combo-list {
  background: var(--paper) !important;
  border-color: var(--line) !important;
  box-shadow: var(--sh-2) !important;
}
html[data-theme="dark"]:not(.hc) .combo-list li { color: var(--ink-2) !important; }
html[data-theme="dark"]:not(.hc) :where(.combo-list li:hover, .combo-list li[aria-selected="true"]) {
  background: rgba(255, 255, 255, .07) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"]:not(.hc) .combo-list li b { color: var(--ink) !important; }
html[data-theme="dark"]:not(.hc) .combo-list li .en,
html[data-theme="dark"]:not(.hc) .combo-empty { color: var(--ink-3) !important; }

/* 5) pinned notice tag — maroon par teal text 4.17:1 tha ------------------ */
html[data-theme="dark"]:not(.hc) .info-pin .pin-tag { color: #FFFFFF !important; }

/* ==========================================================================
   HC (high contrast) — membership popup
   Kaaran: popup ka header navy hai, par HC ka "sab text black" rule uspar bhi
   lag raha tha (black-on-navy = 1.3:1). HC me popup ko bhi white panel banao.
   ========================================================================== */
html.hc .popup-card {
  background: #FFFFFF !important;
  border: 1px solid #000000 !important;
}
html.hc .popup-header {
  background: #FFFFFF !important;
  color: #000000 !important;
  border-bottom: 3px solid #000000 !important;
}
html.hc .popup-header :where(h3, p, span, strong, div, i) { color: #000000 !important; }
html.hc .popup-close {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 1px solid #000000 !important;
}
html.hc .popup-body :where(p, li, span, strong, div) { color: #000000 !important; }
html.hc .popup-features li .tick,
html.hc .popup-features li .tick-svg { color: #000000 !important; stroke: #000000 !important; }

/* HC: pinned notice ka maroon tag — black text 3.2:1 de raha tha */
html.hc .info-pin .pin-tag,
html.hc .pin-tag {
  background: #000000 !important;
  color: #FFFFFF !important;
  border: 1px solid #000000 !important;
}

/* ==========================================================================
   VISIBILITY FIX (31-10-2026) — nav drawer / hover / high-contrast
   premium.css mobile drawer ko background:#fff deta hai; dark theme me
   links var(--ink-2) (light) ho jaate hain -> light-on-white = invisible
   menu. Drawer ko dark theme me dark surface dete hain. Light theme
   (data-theme="light") par inka koi asar nahi.
   ========================================================================== */
@media (max-width: 1040px) {
  html[data-theme="dark"]:not(.hc) .gov-nav {
    background: #0B1624;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.85);
  }
}
html[data-theme="dark"]:not(.hc) .gov-nav a {
  color: var(--ink-2);
  border-bottom-color: var(--hair);
}
html[data-theme="dark"]:not(.hc) .gov-nav a:hover,
html[data-theme="dark"]:not(.hc) .gov-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  color: #FFFFFF;
}
html[data-theme="dark"]:not(.hc) .gov-nav a.active,
html[data-theme="dark"]:not(.hc) .gov-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--teal-2);
}
html[data-theme="dark"]:not(.hc) .gov-nav a.active::after { display: none; }

/* High-contrast mode: drawer black + white text (premium #fff ko override) */
html.hc .gov-nav { background: #000000 !important; }
html.hc .gov-nav a { border-bottom-color: #FFFFFF !important; }