/* wialanguages.com — site theme: DARK overlay (2026-10-29, family56 bundle D).
   ORIGINAL look = PURPLE GRADIENT page (#667eea→#764ba2) with WHITE cards, :root tokens NONE. Per page the CSS is an
   inline <style>: index.html (~200 lines), languages/index.html (list, ~30 lines), languages/<slug>/index.html ×125
   (template tools/merge_and_render.py — body gradient = category colour {c}→{c}dd, white .header/.section cards).
   The shell (header/footer/mobile nav/family modal) is drawn by /assets/wv-site-kit.js, which injects its own <style>
   at the END of <head> at runtime — i.e. AFTER this file. Our shell rules therefore use higher specificity than the
   kit's single-class selectors (html[data-theme] .x = 0,1,1 beats .x = 0,1,0 regardless of order) — fine.
   Live files are NOT changed. Load this file right before </head> (after the page's inline <style>); the engine sets
   <html data-theme="light|dark"> before first paint. Every rule is scoped to html[data-theme="dark"] → 0 px change
   when nothing is saved. color-scheme is set by the engine — not here. donate.html is out of scope (own payment page).

   Design: the page gradient becomes a near-black purple, the white cards become #14161f, the animated rainbow header /
   footer of the kit are KEPT (brand; white text on saturated colour already) — only the mobile nav sheet and the family
   modal, already dark, get hairlines. Category accent colours on language pages (#2196f3 / #4caf50 / #ff9800 as title +
   badge) stay: on the #14161f card they are 5.0:1 / 5.6:1 / 8.2:1 (titles are 2.6rem → large-text rule 3:1).

   Dark palette (ratios against page #0f0d1a / card #14161f):
   ┌──────────────────┬──────────┬──────────────────────────────────────────────────────────────────┐
   │ page gradient    │ #15122a→#0f0d1a  (replaces #667eea→#764ba2 / {category}→{category}dd)       │
   │ card             │ #14161f  │ language cards, list cards, .header/.section on language pages    │
   │ card hover       │ #1a1d2a  │                                                                    │
   │ text             │ #e9ecf2  │ 16.1:1 page · 15.2:1 card  (was #333 / #222)                      │
   │ text-2           │ #b8c0d0  │ 10.4:1 · 9.9:1             (was #444 / #666 — native names)        │
   │ text-muted       │ #a3abbd  │  8.3:1 · 7.8:1             (was #757575 / #888 / #999 / #777)      │
   │ line             │ #2a2d3d  │ hairline (table rows, card edges)                                 │
   │ control border   │ #6b7389  │ search input 4.0:1 on page                                        │
   │ white-on-page    │ #fff kept for hero / phase titles / breadcrumbs (already white in source)    │
   │ status bars      │ extinct #ef5350 · endangered #ffa726 · minority #66bb6a · major #42a5f5 (3:1+)│
   │ chip             │ rgba(255,255,255,.08) replaces rgba(0,0,0,.1) speaker-count on cards         │
   └──────────────────┴──────────┴──────────────────────────────────────────────────────────────────┘
   !important: 1 declaration — the language page "set site language" button is inline-styled
   (background:{category};color:#fff) → see "language page" block. */

/* ===== page ===== */
html[data-theme="dark"] body {
  /* index + list: linear-gradient(135deg,#667eea,#764ba2); language pages: category→category dd. One dark purple for all. */
  background: linear-gradient(135deg, #15122a 0%, #0f0d1a 100%);
  color: #e9ecf2;
}
html[data-theme="dark"] ::selection { background: rgba(167, 139, 250, .32); }

/* ===== kit shell (wv-site-kit.js STYLES, injected at runtime after this file) ===== */
/* header/footer rainbow gradients + white text are kept. Hairlines and the mobile sheet get a touch darker. */
html[data-theme="dark"] .wv-header { border-bottom-color: rgba(0, 0, 0, .35); }
html[data-theme="dark"] .wv-mobile-nav { background: rgba(11, 13, 18, .98); }
html[data-theme="dark"] .wv-mobile-nav a { border-bottom-color: #2a2d3d; }
html[data-theme="dark"] .wv-nav-link:focus-visible,
html[data-theme="dark"] .wv-lang-btn:focus-visible,
html[data-theme="dark"] .wv-login-btn:focus-visible,
html[data-theme="dark"] .wv-mobile-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html[data-theme="dark"] .wv-footer { border-top-color: rgba(0, 0, 0, .35); }
html[data-theme="dark"] .wv-family-modal-content { background: linear-gradient(180deg, #0f1118 0%, #14161f 100%); border-color: #2a2d3d; }
html[data-theme="dark"] .wv-family-modal-header { background: rgba(20, 22, 31, .92); border-bottom-color: #2a2d3d; }
html[data-theme="dark"] .wv-family-item { background: rgba(255, 255, 255, .05); border-color: #2a2d3d; }
html[data-theme="dark"] .wv-family-item:hover { background: rgba(255, 255, 255, .10); border-color: #3a3f55; }
/* .wv-sns-label is #ff00ff neon on the rainbow footer — kit-owned, same in both themes, left alone */

/* ===== index.html ===== */
html[data-theme="dark"] .hero { color: #fff; }
html[data-theme="dark"] .hero h1 { text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .hero p { opacity: .9; }
html[data-theme="dark"] .stat-number { color: #fff; }
html[data-theme="dark"] .stat-label { color: #d6dbe6; opacity: 1; }        /* 12.9:1 */
html[data-theme="dark"] .search-wrap input {
  /* source: border:none, white UA background, black text */
  background: #14161f; color: #e9ecf2; border: 1px solid #6b7389;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .5);
}
html[data-theme="dark"] .search-wrap input::placeholder { color: #a3abbd; }
html[data-theme="dark"] .search-wrap input:focus { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(165, 180, 252, .25), 0 4px 15px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .phase-title { color: #fff; border-bottom-color: #3a3f55; }
html[data-theme="dark"] .language-card { background: #14161f; border: 1px solid #2a2d3d; color: #e9ecf2; }
html[data-theme="dark"] .language-card:hover { background: #1a1d2a; border-color: #3a3f55; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .language-card:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
/* status bars (border-left 5px) — lifted one step so each is ≥ 3:1 on the card */
html[data-theme="dark"] .extinct { border-left-color: #ef5350; }
html[data-theme="dark"] .endangered { border-left-color: #ffa726; }
html[data-theme="dark"] .minority { border-left-color: #66bb6a; }
html[data-theme="dark"] .major { border-left-color: #42a5f5; }
html[data-theme="dark"] .language-name { color: #e9ecf2; }
html[data-theme="dark"] .language-native { color: #b8c0d0; }
html[data-theme="dark"] .language-status { color: #a3abbd; }
html[data-theme="dark"] .speaker-count { background: rgba(255, 255, 255, .08); color: #d6dbe6; }
html[data-theme="dark"] .no-result { color: #d6dbe6; }

/* ===== languages/index.html (list) ===== */
html[data-theme="dark"] .wrap > h1,
html[data-theme="dark"] .sub { color: #fff; }   /* NOT a bare h1 — language pages use <h1 class="language-title"> in the category colour */
html[data-theme="dark"] .cat h2 { color: #fff; border-bottom-color: #3a3f55; }
html[data-theme="dark"] .card { background: #14161f; border: 1px solid #2a2d3d; color: #e9ecf2; }
html[data-theme="dark"] .card:hover { background: #1a1d2a; border-color: #3a3f55; box-shadow: 0 8px 20px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .card:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
html[data-theme="dark"] .card .native { color: #b8c0d0; }
html[data-theme="dark"] .card .meta { color: #a3abbd; }
html[data-theme="dark"] .site-lang-badge { opacity: .8; }
html[data-theme="dark"] .home { color: #fff; }

/* ===== languages/<slug>/index.html ×125 (template) ===== */
html[data-theme="dark"] .breadcrumb a { color: #fff; opacity: .9; }
html[data-theme="dark"] .breadcrumb a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html[data-theme="dark"] .header,
html[data-theme="dark"] .section { background: #14161f; border: 1px solid #2a2d3d; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); color: #e9ecf2; }
/* .language-title keeps the category colour (#2196f3 5.0:1 / #4caf50 5.6:1 / #ff9800 8.2:1 on the card; 2.6rem) */
html[data-theme="dark"] .language-native { color: #b8c0d0; }
/* .status-badge: background {category}22 + category text — the 13 % tint on the dark card is a faint chip, text ≥ 5:1 → kept */
html[data-theme="dark"] .section h2 { color: #e9ecf2; }
html[data-theme="dark"] .section p { color: #b8c0d0; }
html[data-theme="dark"] .info-table th,
html[data-theme="dark"] .info-table td { border-bottom-color: #2a2d3d; }
html[data-theme="dark"] .info-table th { color: #a3abbd; }
html[data-theme="dark"] .info-table td { color: #e9ecf2; }
html[data-theme="dark"] .note { color: #a3abbd; }
html[data-theme="dark"] .back a { color: #fff; }
html[data-theme="dark"] .back a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* "use this site in <language>" button (template line ~76): inline style="background:{category};color:#fff;…" —
   white on #4caf50 is 2.9:1 and on #2196f3 3.1:1 in BOTH themes (template issue). Only the dark side is fixed here,
   with !important because the colour is inline: dark text on the category fill (≥ 8:1). */
html[data-theme="dark"] .section button[onclick*="wv-language"] { color: #0b0d12 !important; font-weight: 700; }
html[data-theme="dark"] .section button[onclick*="wv-language"]:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ===== language modal (smilestory.ai central copy, fallback /components/language-modal/language-modal.js) =====
   Both draw #wiaNavLangModal / .wia-nav-modal-* with a white card; the central copy is loaded cross-origin and cannot
   be edited from here — the class names are the same family as wiatalk's local copy, so the same dark rules apply. */
html[data-theme="dark"] .wia-nav-modal-content { background: #14161f; border: 1px solid #2a2d3d; box-shadow: 0 24px 60px rgba(0, 0, 0, .7); }
html[data-theme="dark"] .wia-nav-modal-tabs { background: #10121a; border-bottom-color: #2a2d3d; }
html[data-theme="dark"] .wia-nav-modal-tab { background: #14161f; border-color: #6b7389; color: #e9ecf2; }
html[data-theme="dark"] .wia-nav-modal-tab:hover { background: #1c2030; }
html[data-theme="dark"] .wia-nav-modal-tab.active { background: linear-gradient(135deg, #4f5fd8, #6b3fa0); color: #fff; border-color: #8c9cff; }
html[data-theme="dark"] .wia-nav-modal-body { background: #14161f; }
html[data-theme="dark"] .wia-nav-lang-search { background: #0f0d1a; color: #e9ecf2; }   /* its 2px #e5e7eb border is source-!important — a light line on dark passes 3:1 */
html[data-theme="dark"] .wia-nav-lang-search::placeholder { color: #a3abbd; }
html[data-theme="dark"] .wia-nav-lang-count { background: rgba(165, 180, 252, .14); color: #c7d2fe; }
html[data-theme="dark"] .wia-nav-lang-item { background: #0f0d1a; border-color: #6b7389; color: #e9ecf2; }
html[data-theme="dark"] .wia-nav-lang-item:hover { background: rgba(165, 180, 252, .16); border-color: #a5b4fc; }
html[data-theme="dark"] .wia-nav-lang-item.selected { background: rgba(165, 180, 252, .22); border-color: #a5b4fc; }
html[data-theme="dark"] .wia-nav-lang-item:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
html[data-theme="dark"] .wia-nav-modal-footer { background: #10121a; border-top-color: #2a2d3d; color: #a3abbd; }
html[data-theme="dark"] .wia-nav-modal-footer a { color: #a5b4fc; }

/* ===== promo banner (wiabook loader.js, self-styled dark card) / family-pin box (wia-lang-bridge.js, inline dark) =====
   already dark — nothing to override. */
