/* wiabraille.com — site theme: DARK overlay (2026-10-29, family56 bundle D).
   ORIGINAL look = LIGHT (css/style.css 2,033 lines, :root tokens 8 — body #FFFFFF / text #1F2937; the tail "Fix" blocks
   (lines 1811–2033) pin the navbar / hero / UNESCO / CTA bands to a PURPLE gradient #667eea→#764ba2 with !important).
   style.css is NOT changed. Load this file LAST in <head> (after css/style.css — learn/* use ../css/style.css — and after
   pricing.html's inline .free-box <style> and api-docs.html's inline <style>), with the wia-site-theme engine setting
   <html data-theme="light|dark"> before first paint. Every rule below is scoped to html[data-theme="dark"], so with
   nothing saved the page renders exactly as before (0 px difference). color-scheme is set by the engine — not here.

   Pages: index about pricing api-docs demo philosophy enterprise press learn/index learn/basics (10 share the static
   nav.navbar + footer.footer; api-docs has its own inline CSS, covered in the last section). ai-connect/index.html has
   no navbar and only inline CSS → follows the cookie, not themed.

   Design decision: the purple bands (navbar, hero, UNESCO, CTA, creator quote) and the white-on-purple buttons are
   ALREADY dark-ish saturated surfaces with white text — they are kept as they are (no !important fight), and only the
   white / #F9FAFB surfaces between them go dark. Result: purple bands on a near-black page.

   Dark palette (ratios measured against page #0b0d12 / card #14161f):
   ┌──────────────────┬──────────┬──────────────────────────────────────────────────────────────────┐
   │ page bg          │ #0b0d12  │ body, .section, white !important bands (creator) via !important   │
   │ band / card      │ #14161f  │ --color-bg-light (problem/creator bands, example boxes, table th) │
   │ card raised      │ #181b27  │ hover state of cards                                              │
   │ text             │ #e9ecf2  │ 16.4:1 · 15.2:1   (--color-text)                                  │
   │ text-light       │ #a3abbd  │  8.4:1 · 7.8:1    (--color-text-light)                            │
   │ line             │ #2a2d3d  │ hairline only (--color-border); controls use --t-ctrl             │
   │ control border   │ #6b7389  │ 4.1:1 page · 3.8:1 card  (textarea, select, example/answer btns)  │
   │ primary (blue)   │ #7fa8ff  │ 8.3:1 · 7.7:1  (--color-primary: links, accent bars, dots)        │
   │ primary fill     │ #1e3a8a→#1e40af │ gradients that carry white text (page-header, stat-card, step)│
   │ secondary (amber)│ #F59E0B kept (8.6:1 on page) — as FILL gets #1a1300 text                     │
   │ accent (green)   │ #34d399  │ 10.1:1 (--color-accent, list marks)                               │
   │ purple bands     │ #667eea→#764ba2 kept (source !important; white text, large headings)         │
   │ footer           │ #07080c  │ links #b8c0d0 11:1, caption #94a3b8 7.8:1                         │
   └──────────────────┴──────────┴──────────────────────────────────────────────────────────────────┘
   !important: used ONLY in the "creator section" block — the source pins that band WHITE with !important (lines
   1990–2022), which cannot be beaten by specificity. Every such declaration carries a comment. No inline style="" in
   the shell needs covering (index 264/288 are white text inside the purple UNESCO band — already correct). */

/* ===== tokens (style.css :root) ===== */
html[data-theme="dark"] {
  --color-primary: #7fa8ff;        /* links, accent bars, braille dots, focus ring, timeline */
  --color-accent: #34d399;         /* vision list marks */
  --color-text: #e9ecf2;           /* body text (NB: .footer uses it as BACKGROUND → re-pinned below) */
  --color-text-light: #a3abbd;
  --color-bg: #0b0d12;
  --color-bg-light: #14161f;       /* bands, example boxes, lang-toggle (purple-bar !important wins there) */
  --color-border: #2a2d3d;         /* hairlines; controls re-pinned to --t-ctrl */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .5);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, .55);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .6);
  /* overlay-only */
  --t-bg: #0b0d12;
  --t-card: #14161f;
  --t-card-2: #181b27;
  --t-line: #2a2d3d;
  --t-ctrl: #6b7389;
  --t-text-2: #b8c0d0;
  --t-fill: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);   /* white text 10.4:1 / 8.7:1 */
}
html[data-theme="dark"] body { background-color: var(--t-bg); color: var(--color-text); }
html[data-theme="dark"] ::selection { background: rgba(127, 168, 255, .28); }
/* style.css line 64 sets a{color:white} globally (an existing bug on the white page); on the dark page white links are
   legible but un-link-like, so links become primary blue. Specific link rules (nav, buttons, footer) are re-pinned. */
html[data-theme="dark"] a { color: var(--color-primary); }
html[data-theme="dark"] a:hover { color: #fbbf24; }
html[data-theme="dark"] :focus-visible { outline-color: var(--color-primary); }

/* ===== navbar — stays the purple gradient (source !important). Only the mobile dropdown (white) is re-coloured. ===== */
html[data-theme="dark"] .nav-toggle span { background-color: #fff; }
html[data-theme="dark"] .nav-toggle:focus-visible,
html[data-theme="dark"] .lang-toggle:focus-visible,
html[data-theme="dark"] .nav-menu a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
@media (max-width: 768px) {
  html[data-theme="dark"] .nav-menu {
    background-color: var(--t-card);
    border: 1px solid var(--t-line);
    border-top: 0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .6);
  }
  /* source: .nav-menu.active a{color:var(--color-text)!important} → token above already makes them #e9ecf2 */
  html[data-theme="dark"] .nav-menu.active a:hover,
  html[data-theme="dark"] .nav-menu.active a.active { color: var(--color-primary) !important; }  /* source pins the colour with !important (line 286) */
  html[data-theme="dark"] .nav-menu .lang-toggle { border-color: var(--t-ctrl) !important; }     /* source border:1px solid white !important (1986) — white box on dark card is fine but loud */
}

/* ===== hero (purple !important band — kept). The absolutely-positioned braille dots are white at .1 opacity — fine. ===== */
html[data-theme="dark"] .hero { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08); }
html[data-theme="dark"] .hero-cta .btn-primary:focus-visible,
html[data-theme="dark"] .hero-cta .btn-secondary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ===== generic sections ===== */
html[data-theme="dark"] .section { background-color: var(--t-bg); }
html[data-theme="dark"] .section-title { color: var(--color-text); }
html[data-theme="dark"] .page-header {
  /* source: linear-gradient(var(--color-primary), #1D4ED8) + white text — with primary lifted to #7fa8ff the band would turn pale → deep blue fill */
  background: var(--t-fill);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .page-header h1,
html[data-theme="dark"] .page-header p { color: #fff; }

/* ===== buttons outside the purple bands (.btn-primary/.btn-secondary are source-!important white/transparent — kept;
   they sit on purple in the hero/CTA. On dark .section backgrounds a white primary button reads as a light pill with
   purple text 4.6:1 — acceptable) ===== */
html[data-theme="dark"] .btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

/* ===== index: problem / solution / how / creator ===== */
html[data-theme="dark"] .problem-section { background-color: var(--t-card); border-top: 1px solid var(--t-line); border-bottom: 1px solid var(--t-line); }
html[data-theme="dark"] .problem-item { background: var(--t-bg); border: 1px solid var(--t-line); }
html[data-theme="dark"] .solution-item { background: var(--t-card); border-left-color: var(--color-primary); }
html[data-theme="dark"] .solution-number { color: var(--color-primary); opacity: .55; }
html[data-theme="dark"] .step-number {
  /* source: background:white; color:white (number invisible) — give the badge a blue fill so the step number can be read */
  background: var(--t-fill); color: #fff; box-shadow: 0 4px 12px rgba(30, 64, 175, .45);
}
html[data-theme="dark"] .step-arrow { color: var(--t-ctrl); }
html[data-theme="dark"] .example-item { background: var(--t-card); border: 1px solid var(--t-line); }
html[data-theme="dark"] .example-braille { color: #fff; }
html[data-theme="dark"] .example-label,
html[data-theme="dark"] .example-note { color: var(--color-text-light); }
/* creator section: source pins background:white !important + #2d3748 text !important (lines 1990–2022).
   !important here is unavoidable — a white band inside the dark page otherwise. */
html[data-theme="dark"] .creator-section { background: var(--t-card) !important; border-top: 1px solid var(--t-line); border-bottom: 1px solid var(--t-line); }
html[data-theme="dark"] .creator-section .section-title,
html[data-theme="dark"] .creator-info h3,
html[data-theme="dark"] .creator-info h4,
html[data-theme="dark"] .creator-details p,
html[data-theme="dark"] .creator-details strong { color: var(--color-text) !important; }     /* source !important #2d3748 */
html[data-theme="dark"] .creator-details em { color: var(--t-text-2) !important; }           /* source !important #4a5568 */
html[data-theme="dark"] .creator-details a { color: #a5b4fc !important; }                    /* source !important #667eea (3.9:1 on card) → 9.5:1 */
/* .creator-quote keeps background:#667eea !important + white text (8.1:1 … large italic) — unchanged */

/* ===== UNESCO / CTA bands — purple !important, kept. Badge chips are rgba white .15 on purple — fine. ===== */
html[data-theme="dark"] .unesco-section,
html[data-theme="dark"] .cta-section { border-top: 1px solid rgba(255, 255, 255, .08); }

/* ===== footer — source: background:var(--color-text) (now near-white!) → re-pinned ===== */
html[data-theme="dark"] .footer { background-color: #07080c; color: var(--t-text-2); border-top: 1px solid var(--t-line); }
html[data-theme="dark"] .footer-section h4 { color: var(--color-text); }
html[data-theme="dark"] .footer-section a { color: var(--t-text-2); }
html[data-theme="dark"] .footer-section a:hover { color: #fff; }
html[data-theme="dark"] .footer-section a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
html[data-theme="dark"] .footer-bottom { border-top-color: var(--t-line); color: #94a3b8; }   /* 7.8:1 */
/* index 343 a11y caption style="font-size:10px;color:#94a3b8" sits in the footer — 7.8:1, left alone */

/* ===== demo page ===== */
html[data-theme="dark"] .demo-label { color: var(--color-text); }
html[data-theme="dark"] .demo-textarea {
  background: var(--t-card); color: var(--color-text); border-color: var(--t-ctrl);
}
html[data-theme="dark"] .demo-textarea::placeholder { color: var(--color-text-light); }
html[data-theme="dark"] .demo-textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(127, 168, 255, .22); }
html[data-theme="dark"] .demo-output { background: var(--t-card); border: 1px solid var(--t-line); color: var(--color-text); }
html[data-theme="dark"] .braille-output { color: #fff; }
html[data-theme="dark"] .example-btn { background: var(--t-card); border-color: var(--t-ctrl); color: var(--color-text); }
html[data-theme="dark"] .example-btn:hover { background-color: var(--t-card-2); border-color: var(--color-primary); color: var(--color-primary); }

/* ===== learn pages: table, quiz ===== */
html[data-theme="dark"] .learn-table td { border-bottom-color: var(--t-line); }
html[data-theme="dark"] .learn-table th { background-color: var(--t-card); color: var(--color-text); }
html[data-theme="dark"] .learn-table .braille { color: #fff; }
html[data-theme="dark"] .result-card { background: var(--t-card); border: 1px solid var(--t-line); }
html[data-theme="dark"] .answer-btn { background: var(--t-card); border-color: var(--t-ctrl); color: var(--color-text); }
html[data-theme="dark"] .answer-btn:hover:not(:disabled) { background-color: var(--t-card-2); border-color: var(--color-primary); }
html[data-theme="dark"] .feedback.correct { background-color: #0f2e22; color: #6ee7b7; border: 1px solid #1f5a3f; }   /* 9.6:1 */
html[data-theme="dark"] .feedback.incorrect { background-color: #3a1517; color: #fca5a5; border: 1px solid #7a2a2e; } /* 8.9:1 */
html[data-theme="dark"] .quiz-progress { background: var(--t-card); border: 1px solid var(--t-line); }
html[data-theme="dark"] .progress-text { color: var(--color-text-light); }
html[data-theme="dark"] .progress-bar { background: #1f2231; }
html[data-theme="dark"] .braille-cell { background: var(--t-card); border: 1px solid var(--t-line); box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .braille-dot { background: #4b5168; }          /* inactive dot 3.1:1 on card */
html[data-theme="dark"] .braille-dot.active { background: var(--color-primary); box-shadow: 0 0 10px rgba(127, 168, 255, .55); }
html[data-theme="dark"] .path-card { background: var(--t-card); border: 1px solid var(--t-line); box-shadow: 0 4px 6px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .path-card:hover { box-shadow: 0 20px 40px rgba(0, 0, 0, .6); border-color: #3a3f55; }
html[data-theme="dark"] .path-badge { background: var(--color-secondary); color: #1a1300; }   /* amber fill: dark text 9.9:1 (white was 2.1:1) */

/* ===== about / philosophy / enterprise / press — cards & blocks ===== */
html[data-theme="dark"] .content-block,
html[data-theme="dark"] .principle-item,
html[data-theme="dark"] .problem-card,
html[data-theme="dark"] .vision-item,
html[data-theme="dark"] .join-card,
html[data-theme="dark"] .value-card,
html[data-theme="dark"] .media-kit-card,
html[data-theme="dark"] .press-item,
html[data-theme="dark"] .contact-form,
html[data-theme="dark"] .partner-placeholder { background: var(--t-card); border: 1px solid var(--t-line); box-shadow: 0 4px 6px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .principle-item,
html[data-theme="dark"] .press-item { border-left: 4px solid var(--color-primary); }   /* keep the accent bar after the border reset above */
html[data-theme="dark"] .problem-card { border-top: 4px solid var(--color-secondary); }
html[data-theme="dark"] .value-card { border-top: 4px solid var(--color-primary); }
html[data-theme="dark"] .value-card:hover { border-top-color: var(--color-secondary); }
html[data-theme="dark"] .content-block:hover,
html[data-theme="dark"] .principle-item:hover,
html[data-theme="dark"] .vision-item:hover,
html[data-theme="dark"] .join-card:hover,
html[data-theme="dark"] .value-card:hover,
html[data-theme="dark"] .media-kit-card:hover,
html[data-theme="dark"] .press-item:hover { box-shadow: 0 15px 30px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .content-block h2,
html[data-theme="dark"] .vision-item h3,
html[data-theme="dark"] .feature-item h3,
html[data-theme="dark"] .value-card h3,
html[data-theme="dark"] .join-card h3,
html[data-theme="dark"] .press-item h3,
html[data-theme="dark"] .principle-item h3 { color: var(--color-text); }   /* source colours several of these "white" (invisible on white) */
html[data-theme="dark"] .problem-card h3 { color: #fbbf24; }
html[data-theme="dark"] .press-date { color: var(--color-primary); }
html[data-theme="dark"] .join-card p,
html[data-theme="dark"] .value-card p,
html[data-theme="dark"] .partner-placeholder { color: var(--color-text-light); }
html[data-theme="dark"] .feature-item { background: var(--t-card); border: 1px solid var(--t-line); }
html[data-theme="dark"] .feature-item:hover { background: var(--t-card-2); box-shadow: 0 10px 20px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .partner-section { background: var(--t-card); border: 1px solid var(--t-line); }
html[data-theme="dark"] .partner-logos { opacity: .7; }
/* light-indigo tinted blocks (#EEF2FF→#E0E7FF) → navy tint */
html[data-theme="dark"] .quote-block,
html[data-theme="dark"] .vision-section,
html[data-theme="dark"] .quote-highlight { background: linear-gradient(135deg, #141a33 0%, #11162a 100%); }
html[data-theme="dark"] .quote-block { border-left-color: var(--color-primary); }
html[data-theme="dark"] .quote-highlight { border-left-color: var(--color-secondary); color: var(--color-text); }
html[data-theme="dark"] .quote-block blockquote { color: var(--color-text); }
html[data-theme="dark"] .quote-block cite { color: var(--color-text-light); }
/* already-dark navy blocks (#1E293B→#0F172A): philosophy header, large quote, tech example, section-dark — add an edge */
html[data-theme="dark"] .philosophy-header,
html[data-theme="dark"] .quote-block.large-quote,
html[data-theme="dark"] .section-dark { border: 1px solid #1f2a44; }
html[data-theme="dark"] .tech-example { border: 1px solid #1f2a44; }
html[data-theme="dark"] .tech-example h4 { color: #fbbf24; }
/* gradient-clipped headings: primary→#9333EA; with the new primary the mix is #7fa8ff→#c084fc (both ≥ 7:1) */
html[data-theme="dark"] .gradient-text,
html[data-theme="dark"] .text-gradient,
html[data-theme="dark"] .philosophy-section h2 { background: linear-gradient(135deg, #7fa8ff 0%, #c084fc 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
/* white-text fills that used var(--color-primary) as gradient start → deep blue so white stays ≥ 8:1 */
html[data-theme="dark"] .stat-card { background: var(--t-fill); }
html[data-theme="dark"] .stat-card .stat-label { color: #dbe4ff; }
html[data-theme="dark"] .cta-philosophy { background: linear-gradient(135deg, #3730a3 0%, #6b21a8 100%); }
html[data-theme="dark"] .highlight-box { background: linear-gradient(135deg, #b45309 0%, #c2410c 100%); box-shadow: 0 10px 20px rgba(0, 0, 0, .5); }  /* white 4.7:1 / 4.9:1 */
html[data-theme="dark"] .timeline-item::before { border-color: var(--t-bg); }       /* ring was 4px white */
html[data-theme="dark"] .timeline-date { color: var(--color-primary); }
html[data-theme="dark"] .timeline-content p { color: var(--color-text-light); }
html[data-theme="dark"] .counter { color: #fff; }
/* forms (enterprise contact) */
html[data-theme="dark"] .form-label { color: var(--color-text); }
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-textarea,
html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea,
html[data-theme="dark"] .contact-form select { background: var(--t-bg); color: var(--color-text); border-color: var(--t-ctrl); }
html[data-theme="dark"] .contact-form input::placeholder,
html[data-theme="dark"] .contact-form textarea::placeholder { color: var(--color-text-light); }
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .contact-form input:focus,
html[data-theme="dark"] .contact-form textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(127, 168, 255, .22); outline: none; }
html[data-theme="dark"] .contact-form option { background: var(--t-card); color: var(--color-text); }
html[data-theme="dark"] .card-hover:hover { box-shadow: 0 20px 40px rgba(0, 0, 0, .6); }

/* ===== pricing.html inline <style> (.free-box white card) ===== */
html[data-theme="dark"] .free-box { background: var(--t-card); border: 1px solid var(--t-line); box-shadow: 0 4px 20px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .free-box .limits { background: var(--t-bg); border: 1px solid var(--t-line); }
html[data-theme="dark"] .free-box code { background: #1f2231; color: #c7d2fe; }

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

/* ===== api-docs.html — its own inline CSS (does not load style.css): body #f8f9fa, white .section cards, #2d3748 text ===== */
html[data-theme="dark"] body:has(.api-hero) { background: var(--t-bg); color: var(--color-text); }
html[data-theme="dark"] .api-hero { border-bottom: 1px solid rgba(255, 255, 255, .08); }   /* purple gradient kept */
html[data-theme="dark"] .main-content .section { background: var(--t-card); border: 1px solid var(--t-line); box-shadow: 0 4px 20px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .section h2 { color: var(--color-text); }
html[data-theme="dark"] .section h3 { color: var(--t-text-2); }
html[data-theme="dark"] .inline-code { background: #1f2231; color: #c7d2fe; }
html[data-theme="dark"] .code-block { border: 1px solid #1f2a44; }       /* #1e293b block already dark */
html[data-theme="dark"] .base-url-box { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
html[data-theme="dark"] .api-table th { background: var(--t-bg); color: var(--t-text-2); }
html[data-theme="dark"] .api-table th,
html[data-theme="dark"] .api-table td { border-bottom-color: var(--t-line); }
html[data-theme="dark"] .method.get { background: #0f2e22; color: #6ee7b7; }
html[data-theme="dark"] .method.post { background: #172554; color: #bfdbfe; }
html[data-theme="dark"] .endpoint-card { border-color: #3a3f55; }
html[data-theme="dark"] .endpoint-header { background: var(--t-bg); border-bottom: 1px solid var(--t-line); }
html[data-theme="dark"] .endpoint-desc { color: var(--color-text-light); }
html[data-theme="dark"] .note { background: #2a2110; border-left-color: #fbbf24; color: var(--color-text); }
html[data-theme="dark"] .ok { background: #0f2e22; border-left-color: #34d399; color: var(--color-text); }
html[data-theme="dark"] .main-content .card { border-color: #3a3f55; background: var(--t-bg); }
html[data-theme="dark"] .card .big { color: #a5b4fc; }
html[data-theme="dark"] .card .small { color: var(--color-text-light); }
html[data-theme="dark"] body:has(.api-hero) footer { background: #07080c; border-top: 1px solid var(--t-line); }
html[data-theme="dark"] body:has(.api-hero) footer a { color: var(--t-text-2); opacity: 1; }
html[data-theme="dark"] body:has(.api-hero) footer a:hover { color: #fff; }
/* api-docs navbar is its own (non-!important) purple gradient with white links — kept, same look as the other pages */
