/* ── Light theme (opt-in via data-theme="light" on <html>) ──────────
   Palette-only swap. Keeps every structural rule above; the terminal
   chrome (window headers, $ prompts, box-drawing separators) reads as
   editorial-light because tokens carry the colors.
   ============================================================= */
:root[data-theme="light"] {
  --bg:          #f7f8fb;
  --bg-1:        #ffffff;
  --bg-2:        #eef2ff;
  --bg-3:        #e2e8f0;
  --surface:     #ffffff;
  --border:      #e2e8f0;
  --border-dim:  #eef2ff;
  --border-soft: #cbd5e1;

  --fg:          #0b1120;
  --fg-dim:      #1e293b;
  --fg-mute:     #64748b;
  --fg-faint:    #94a3b8;

  --green:        #4f46e5;
  --green-dim:    #3730a3;
  --green-faint:  #c7d2fe;
  --amber:        #ea580c;
  --amber-dim:    #9a3412;
  --amber-faint:  #fed7aa;

  --danger:       #dc2626;
  --danger-dim:   #991b1b;

  --accent-soft:  #eef2ff;
  --threat-soft:  #fff7ed;
  --safe-soft:    #ecfdf5;
}

/* Hamburger icon stroke flips dark in light mode */
:root[data-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(11,17,32,.75)' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Subtle gradients that hardcoded green/amber swap to indigo/rust in light */
:root[data-theme="light"] .page-header {
  background:
    radial-gradient(800px 240px at 90% 0%, rgba(79,70,229,0.05), transparent 65%),
    var(--bg);
}
:root[data-theme="light"] .paper-banner,
:root[data-theme="light"] .reader-hero {
  background:
    radial-gradient(900px 400px at 90% -10%, rgba(79,70,229,0.06), transparent 70%),
    radial-gradient(700px 500px at -10% 40%, rgba(234,88,12,0.04), transparent 70%),
    var(--bg);
}

/* Reader figure SVGs already have white bg; keep that in both themes */
