/* wisdom.wiastandards.com — site theme overlay: LIGHT (2026-10-29, family56 bundle D).
   ORIGINAL look = DARK (index.html inline <style> 22~195, :root 7 tokens --gold --cyan --magenta --neon-green --bg-dark
   --bg-card --border; browse.html has its OWN inline <style> with different token names --primary --bg --bg-card --text
   --text-muted --border). Live files untouched. Every rule below is scoped to html[data-theme="light"], so with nothing
   saved (data-theme="dark") the pages render exactly as before. Load this file at the END of <head> (after the page's
   inline <style>; the wia-site-theme engine sets <html data-theme> before first paint). color-scheme: engine, not here.

   Pages: index.html (+ 87 language copies /<lang>/index.html — identical shell, same inline CSS) · browse.html (own shell:
   centered .header / .nav chips / .lang-switch / .doc-grid / .footer) · md-viewer.html and ai-connect/ are NOT themed
   (own heads, no .header; out of scope — they just follow the cookie with their original look).
   The language modal (#wiaNavLangModal, /components/language-modal/language-modal.js) is already a WHITE card with
   #1f2937 text — only its rgba(0,0,0,.95) backdrop is darkened here. (It has no trigger on this site anyway.)

   Light palette                                         contrast (on #fff / #f7f8fb)
   ─ page   #f7f8fb   card #fff   band #eef1f6   header #fff
   ─ text   #0f172a (17.9 / 16.8)   muted #475569 (7.6 / 7.1)   nav/body-2 #334155 (10.3)
   ─ line   #e2e8f0 (decorative only)   CONTROL border #7b879c (3.6:1 — lang chips, browse nav chips)
   ─ gold   #ffd700 → text #854d0e (6.9) · lines/hover #b45309 (5.0) · FILLED gold chip keeps #ffd700 with #1a1300 text (14.6)
   ─ cyan   #00d4ff → #0e7490 (5.3)   magenta #ff00ff → #a21caf (6.6)   neon-green #00ff88 → #15803d (5.0)
   ─ coral  #ff6b6b (hero h1 gradient end) → #b91c1c (6.5)
   Kept DARK on purpose: .network-section (the d3 force graph draws white node labels, gold rgba links and a glow filter
   straight into SVG attributes from JS — a dark panel is the only way it stays readable; it is framed as a card).
   !important only where the page uses inline style="…": the A11Y self-audit caption color:#94a3b8 in the footer. */

/* ===== tokens — index.html + 87 copies ===== */
html[data-theme="light"] {
  --gold: #854d0e;          /* was #ffd700 — hero 弘益人間, stat numbers, network title, footer 弘益人間, link hovers */
  --cyan: #0e7490;          /* was #00d4ff — nav .highlight, category titles/lines, doc-card path */
  --magenta: #a21caf;       /* was #ff00ff — only inside doc-card gradient tint */
  --neon-green: #15803d;    /* was #00ff88 — category count */
  --bg-dark: #f7f8fb;
  --bg-card: #ffffff;
  --border: #e2e8f0;        /* decorative; the .lang-btn control border is re-pinned to #7b879c below */
  /* browse.html tokens (same file serves both pages; unknown names are harmless on index) */
  --primary: #854d0e;       /* was #ffd700 */
  --bg: #f7f8fb;            /* was #0f172a */
  --text: #0f172a;          /* was #f8fafc */
  --text-muted: #475569;    /* was #94a3b8 */
}
html[data-theme="light"] body { background: #f7f8fb; color: #0f172a; }
html[data-theme="light"] ::selection { background: rgba(133, 77, 14, .18); }

/* ===== header (index: flex space-between, sticky; gradient #1a1a2e→#16213e) ===== */
html[data-theme="light"] .header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}
html[data-theme="light"] .logo { color: #0f172a; }
html[data-theme="light"] .nav-links a { color: #334155; }
html[data-theme="light"] .nav-links a:hover { color: #854d0e; }
html[data-theme="light"] .nav-links a.highlight { color: #0e7490; border-color: #0e7490; }
html[data-theme="light"] .nav-links a.highlight:hover { background: #0e7490; color: #fff; }
html[data-theme="light"] .nav-links a:focus-visible { outline: 2px solid #0e7490; outline-offset: 2px; }
/* EN/KO document-language chips: var(--border) is decorative-grey → control border must reach 3:1 */
html[data-theme="light"] .lang-btn { color: #334155; border-color: #7b879c; background: #fff; }
html[data-theme="light"] .lang-btn:hover { border-color: #b45309; color: #854d0e; }
/* active chip: page rule is background:var(--gold) + color:#000 — with --gold now #854d0e that would be black-on-brown,
   so the FILL stays real gold and the text is pinned dark (14.6:1) */
html[data-theme="light"] .lang-btn.active { background: #ffd700; color: #1a1300; border-color: #b45309; }
html[data-theme="light"] .lang-btn:focus-visible { outline: 2px solid #0f172a; outline-offset: 2px; }

/* mobile ☰ (three white bars) + drawer (#1a1a2e) + overlay */
html[data-theme="light"] .mobile-menu-btn span { background: #0f172a; }
html[data-theme="light"] .mobile-nav-overlay { background: rgba(15, 23, 42, .45); }
html[data-theme="light"] .mobile-nav-drawer { background: #fff; border-left-color: #e2e8f0; box-shadow: -8px 0 30px rgba(15, 23, 42, .12); }
html[data-theme="light"] .mobile-nav-drawer a { color: #334155; }
html[data-theme="light"] .mobile-nav-drawer a:hover { background: #fef3c7; color: #854d0e; }
html[data-theme="light"] .mobile-nav-close { color: #475569; }

/* ===== hero (gradient #1a1a2e→#2d1b4e→#1a1a2e + radial gold haze) ===== */
html[data-theme="light"] .hero { background: linear-gradient(135deg, #eef1f6 0%, #f1ecfa 50%, #eef1f6 100%); }
html[data-theme="light"] .hero::before { background: radial-gradient(circle at 50% 50%, rgba(133, 77, 14, .08) 0%, transparent 50%); }
/* h1 is gradient text gold→coral; same technique, darker stops (both ≥ 6.5:1 on the hero band) */
html[data-theme="light"] .hero h1 { background: linear-gradient(90deg, #854d0e, #b91c1c); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .hero-subtitle { color: #334155; }
html[data-theme="light"] .hero-philosophy { color: #854d0e; text-shadow: none; }
html[data-theme="light"] .hero-philosophy-desc,
html[data-theme="light"] .hero-tagline,
html[data-theme="light"] .hero-stat-label { color: #475569; }
html[data-theme="light"] .hero-stat-num { color: #854d0e; }

/* ===== network section — intentionally stays a DARK card (d3 draws white labels / gold links into SVG attrs) ===== */
html[data-theme="light"] .network-section {
  background: #141627;
  border-color: #d9d2c0;                       /* soft gold-grey edge instead of neon gold on the light page */
  box-shadow: 0 8px 30px rgba(15, 23, 42, .12);
}
html[data-theme="light"] .network-header { background: linear-gradient(90deg, rgba(255, 215, 0, .10), transparent, rgba(255, 215, 0, .10)); border-bottom-color: rgba(255, 215, 0, .25); }
html[data-theme="light"] .network-title { color: #ffd700; }              /* inside the dark card the original gold is right (13.9:1) */
html[data-theme="light"] .network-subtitle,
html[data-theme="light"] .legend-item { color: #b8bcc8; }                 /* #888 was 5.1:1 on #141627 → 8.4:1 */
html[data-theme="light"] .network-legend { border-top-color: rgba(255, 215, 0, .25); }
html[data-theme="light"] #networkTooltip { background: rgba(20, 22, 39, .97); border-color: #ffd700; color: #fff; }

/* ===== category dividers + document cards (rendered by renderDocSections(), classes fixed) ===== */
html[data-theme="light"] .category-line { background: linear-gradient(90deg, transparent, #0e7490, transparent); }
html[data-theme="light"] .category-title { color: #0e7490; text-shadow: none; }
html[data-theme="light"] .category-count { color: #15803d; }
html[data-theme="light"] .doc-card {
  background: #fff;                            /* was a cyan/magenta 5 % tint over the dark page */
  border-color: #cbd5e1;                       /* card edge, 1.6:1 decorative; the hover edge below is 5.3:1 */
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}
html[data-theme="light"] .doc-card::before { background: linear-gradient(90deg, transparent, rgba(14, 116, 144, .08), transparent); }
html[data-theme="light"] .doc-card:hover { border-color: #0e7490; box-shadow: 0 10px 30px rgba(14, 116, 144, .18); }
html[data-theme="light"] .doc-card .doc-title { color: #0f172a; }
html[data-theme="light"] .doc-card .doc-path { color: #0e7490; opacity: 1; }   /* opacity .7 on #0e7490 would drop below 4.5:1 */
html[data-theme="light"] .doc-card:focus-visible { outline: 2px solid #0e7490; outline-offset: 2px; }

/* ===== footer ===== */
html[data-theme="light"] .footer { border-top-color: #e2e8f0; background: #eef1f6; }
html[data-theme="light"] .footer-philosophy { color: #854d0e; }
html[data-theme="light"] .footer-tagline,
html[data-theme="light"] .footer-copy { color: #475569; }
html[data-theme="light"] .footer-links a { color: #334155; }
html[data-theme="light"] .footer-links a:hover { color: #854d0e; text-decoration: underline; }
/* index.html 363: A11Y self-audit caption <div style="font-size:10px;color:#94a3b8"> — 2.4:1 on #eef1f6 → inline needs !important */
html[data-theme="light"] .footer div[style*="color:#94a3b8"] { color: #475569 !important; }
/* promo banner (wiabook.com/site-kit/promo-banner/loader.js, async) draws its own dark card — self-contained, left as is */

/* ===== language modal (language-modal.js injects a white card; only the backdrop is near-black) ===== */
html[data-theme="light"] #wiaNavLangModal { background: rgba(15, 23, 42, .55); }
/* the card's own greys: tab/search borders #e5e7eb are 1.3:1 — lift the interactive ones to 3:1 while the page is light */
html[data-theme="light"] .wia-nav-modal-tab { border-color: #7b879c; }
html[data-theme="light"] .wia-nav-modal-tab.active { border-color: #667eea; }
html[data-theme="light"] .wia-nav-lang-search { border-color: #7b879c !important; }   /* kit rule is border:… !important */
html[data-theme="light"] .wia-nav-lang-item { border-color: #7b879c; }
html[data-theme="light"] .wia-nav-lang-item:hover,
html[data-theme="light"] .wia-nav-lang-item.selected { border-color: #4338ca; }
html[data-theme="light"] .wia-nav-modal-footer,
html[data-theme="light"] .wia-nav-modal-footer div[style*="color:#888"] { color: #475569 !important; }  /* inline #888 = 3.5:1 on #f8f9fa */
html[data-theme="light"] .wia-nav-modal-footer a { color: #4338ca; }

/* ===== browse.html (own inline <style>; tokens above do most of it — leftovers here) ===== */
html[data-theme="light"] .back-link { color: #334155; }
html[data-theme="light"] .back-link:hover { color: #854d0e; }
/* browse's .header is a centered block (NOT the index flex header) — the index .header rule above gives it a white
   background + bottom line, which is fine; keep its h1 gold-brown */
html[data-theme="light"] .header h1 { color: #854d0e; }
html[data-theme="light"] .header p { color: #475569; }
/* pillar chips: var(--border) is decorative → control border 3:1 */
html[data-theme="light"] .nav a { color: #334155; border-color: #7b879c; background: #fff; }
html[data-theme="light"] .nav a:hover,
html[data-theme="light"] .nav a.active { border-color: #b45309; color: #854d0e; background: #fef3c7; }
html[data-theme="light"] .nav a:focus-visible { outline: 2px solid #0f172a; outline-offset: 2px; }
html[data-theme="light"] .stat-num { color: #854d0e; }
html[data-theme="light"] .stat-label,
html[data-theme="light"] .loading { color: #475569; }
html[data-theme="light"] .doc-card .path { color: #475569; }
html[data-theme="light"] .doc-card a { color: #854d0e; }        /* browse card title link (index uses .doc-title) */
html[data-theme="light"] .doc-card:hover { border-color: #b45309; }  /* browse hover (index .doc-card:hover above sets cyan; this later rule wins for both — same hue family, acceptable) */
html[data-theme="light"] .doc-card:hover.doc-card[href] { border-color: #0e7490; }  /* …except index cards, which are <a href> — keep their cyan edge */

/* ===== generic focus ring for the two header buttons the engine will add next to .lang-switch / ☰ ===== */
html[data-theme="light"] .header button:focus-visible { outline: 2px solid #0f172a; outline-offset: 2px; }
