/* ============================================================================
   help-center.css — site-wide "Need Help" guide (see js/help-center.js)

   A full-screen, glassmorphism help experience for the whole dashboard. Cosmic
   palette, Space Grotesk display + Inter body, a Three.js brand emblem in the
   sidebar, and GSAP-choreographed open / section transitions. Built for the
   1440px laptop baseline; reflows to a stacked layout on phones.

   All colour comes from the app tokens (--accent-*, --col-*) with hard-coded
   fallbacks so the panel still themes correctly if a token is missing.
   ========================================================================== */

:root {
  --hc-cyan:   var(--accent-cyan, #38bdf8);
  --hc-violet: var(--accent-violet, #818cf8);
  --hc-teal:   var(--accent-teal, #2dd4bf);
  --hc-ink:    #e7ecf5;
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
#help-center-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482000;            /* above every modal / drawer / toast */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  font-family: var(--font-body, Inter, system-ui, sans-serif);
  background:
    radial-gradient(1100px 700px at 18% 12%, rgba(56,189,248,0.10), transparent 60%),
    radial-gradient(900px 650px at 86% 96%, rgba(129,140,248,0.12), transparent 62%),
    rgba(2,4,12,0.80);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  opacity: 0;                     /* GSAP/transition fades this in */
  transition: opacity 0.28s ease;
}
#help-center-overlay.hc-in { opacity: 1; }

/* ── Shell ───────────────────────────────────────────────────────────────── */
.hc-shell {
  display: flex;
  width: min(1320px, 95vw);
  height: min(900px, 92vh);
  border-radius: 22px;
  overflow: hidden;
  color: var(--hc-ink);
  background:
    linear-gradient(180deg, rgba(13,18,38,0.96) 0%, rgba(8,11,26,0.97) 100%);
  border: 1px solid rgba(56,189,248,0.20);
  box-shadow:
    0 40px 120px rgba(0,0,0,0.62),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 80px rgba(56,189,248,0.06) inset;
  transform-origin: center;
}

/* ════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════════════════ */
.hc-aside {
  flex: 0 0 290px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, rgba(4,7,18,0.72), rgba(4,7,18,0.40));
  border-right: 1px solid rgba(148,163,184,0.12);
}

/* Brand hero with the Three.js emblem behind the title */
.hc-hero {
  position: relative;
  height: 132px;
  flex: 0 0 auto;
  overflow: hidden;
  border-bottom: 1px solid rgba(148,163,184,0.10);
  background:
    radial-gradient(120px 120px at 30% 40%, rgba(56,189,248,0.14), transparent 70%),
    radial-gradient(160px 160px at 80% 80%, rgba(129,140,248,0.12), transparent 72%);
}
.hc-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* CSS-only fallback orb (used when Three.js is unavailable / reduced motion) */
.hc-hero-orb {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(56,189,248,0.9), transparent 60%),
    radial-gradient(circle at 70% 75%, rgba(129,140,248,0.7), transparent 62%);
  box-shadow: 0 0 26px rgba(56,189,248,0.5);
  opacity: 0.0;                   /* shown only by JS when Three.js is absent */
}
.hc-hero-text {
  position: absolute; left: 0; right: 0; bottom: 12px;
  text-align: center; pointer-events: none;
}
.hc-hero-eyebrow {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.26em;
  color: var(--hc-cyan); text-transform: uppercase;
}
.hc-hero-title {
  font-family: var(--font-display, 'Space Grotesk', Inter, sans-serif);
  font-size: 20px; font-weight: 700; letter-spacing: 0.02em; margin-top: 2px;
  color: #fff;
}

/* Search */
.hc-search { padding: 14px 16px 8px; flex: 0 0 auto; }
.hc-search-box { position: relative; }
.hc-search-box svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: rgba(226,232,240,0.45); pointer-events: none;
}
.hc-search input {
  width: 100%; box-sizing: border-box;
  background: rgba(148,163,184,0.08); border: 1px solid rgba(148,163,184,0.16);
  border-radius: 10px; color: var(--hc-ink); font: inherit; font-size: 13px;
  padding: 9px 11px 9px 32px; outline: none; transition: border-color .15s, background .15s;
}
.hc-search input::placeholder { color: rgba(226,232,240,0.4); }
.hc-search input:focus { border-color: rgba(56,189,248,0.5); background: rgba(56,189,248,0.07); }

/* Nav */
.hc-nav { flex: 1 1 auto; overflow-y: auto; padding: 6px 10px 14px; }
.hc-nav::-webkit-scrollbar { width: 8px; }
.hc-nav::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.18); border-radius: 8px; }
.hc-group-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(226,232,240,0.38); padding: 14px 12px 5px;
}
.hc-group-label:first-child { padding-top: 6px; }
.hc-nav button {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%;
  text-align: left; background: transparent; border: none; color: rgba(226,232,240,0.74);
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  padding: 9px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 1px;
  transition: background .15s, color .15s;
}
.hc-nav button::before {
  content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 0; border-radius: 3px; background: var(--hc-cyan);
  transition: height .18s ease;
}
.hc-nav button:hover { background: rgba(56,189,248,0.08); color: #fff; }
.hc-nav button.active { background: rgba(56,189,248,0.15); color: #9fe1ff; }
.hc-nav button.active::before { height: 18px; }
.hc-nav button .hc-ic { flex: 0 0 16px; opacity: 0.82; }
.hc-nav button.active .hc-ic { opacity: 1; }
.hc-hidden { display: none !important; }
.hc-no-results {
  display: none; padding: 18px 14px; font-size: 12.5px; color: rgba(226,232,240,0.5);
}

.hc-aside-foot {
  flex: 0 0 auto; padding: 10px 16px; border-top: 1px solid rgba(148,163,184,0.10);
  font-size: 10.5px; color: rgba(226,232,240,0.45); display: flex; gap: 8px; flex-wrap: wrap;
}
.hc-kbd {
  font-family: ui-monospace, Menlo, monospace; font-size: 10px;
  background: rgba(148,163,184,0.12); border: 1px solid rgba(148,163,184,0.18);
  border-radius: 5px; padding: 1px 5px; color: rgba(226,232,240,0.7);
}

/* ════════════════════════════════════════════════════════════════════════
   MAIN
   ════════════════════════════════════════════════════════════════════════ */
.hc-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.hc-main-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 24px; border-bottom: 1px solid rgba(148,163,184,0.10);
  background: rgba(8,11,26,0.4);
}
.hc-crumb { font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(226,232,240,0.5); }
.hc-crumb b { color: var(--hc-cyan); }
.hc-close {
  flex: 0 0 auto; display: grid; place-items: center;
  background: transparent; border: 1px solid rgba(148,163,184,0.22);
  color: rgba(226,232,240,0.8); width: 32px; height: 32px; border-radius: 9px;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.hc-close:hover { border-color: rgba(240,80,110,0.55); color: #f0506e; background: rgba(240,80,110,0.08); }

.hc-content {
  flex: 1 1 auto; overflow-y: auto; padding: 30px 40px 72px; line-height: 1.66;
  scroll-behavior: smooth;
}
.hc-content::-webkit-scrollbar { width: 10px; }
.hc-content::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.18); border-radius: 8px; }

/* Section header band */
.hc-sec-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--hc-cyan); }
.hc-content h2 {
  font-family: var(--font-display, 'Space Grotesk', Inter, sans-serif);
  font-size: 26px; font-weight: 700; margin: 4px 0 6px; color: #fff; letter-spacing: -0.01em;
}
.hc-content h3 {
  font-size: 15px; font-weight: 700; letter-spacing: 0.01em; margin: 26px 0 8px; color: #9fd8ff;
  display: flex; align-items: center; gap: 8px;
}
.hc-content h4 { font-size: 13px; font-weight: 700; margin: 16px 0 6px; color: #cfe6ff; }
.hc-content p, .hc-content li { font-size: 13.7px; color: rgba(231,236,245,0.86); }
.hc-content p { max-width: 74ch; }
.hc-content ul { margin: 6px 0; padding-left: 20px; }
.hc-content li { margin: 4px 0; }
.hc-content li::marker { color: rgba(56,189,248,0.6); }
.hc-lede { font-size: 14.5px !important; color: rgba(231,236,245,0.72) !important; margin: 2px 0 8px; max-width: 76ch; }
.hc-content b, .hc-content strong { color: #fff; }
.hc-content code {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px;
  background: rgba(56,189,248,0.12); color: #9fe7ff; padding: 1px 6px; border-radius: 5px;
  white-space: nowrap;
}

/* Cards / callouts */
.hc-card {
  background: rgba(148,163,184,0.05); border: 1px solid rgba(148,163,184,0.14);
  border-radius: 14px; padding: 14px 16px; margin: 12px 0; max-width: 78ch;
}
.hc-card > b:first-child { display: block; margin-bottom: 4px; color: #fff; }
.hc-card.cyan  { border-color: rgba(56,189,248,0.30);  background: rgba(56,189,248,0.06); }
.hc-card.violet{ border-color: rgba(129,140,248,0.30); background: rgba(129,140,248,0.06); }
.hc-card.teal  { border-color: rgba(45,212,191,0.30);  background: rgba(45,212,191,0.06); }
.hc-card.amber { border-color: rgba(240,160,32,0.30);  background: rgba(240,160,32,0.06); }
.hc-card.red   { border-color: rgba(240,80,110,0.32);  background: rgba(240,80,110,0.06); }

/* Step list (numbered, employee how-to) */
.hc-steps { list-style: none; counter-reset: hcstep; padding-left: 0; margin: 10px 0; max-width: 78ch; }
.hc-steps li { counter-increment: hcstep; position: relative; padding-left: 38px; margin: 9px 0; }
.hc-steps li::before {
  content: counter(hcstep); position: absolute; left: 0; top: -1px;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display, 'Space Grotesk', sans-serif); font-size: 12px; font-weight: 700;
  color: #04101e; background: linear-gradient(135deg, var(--hc-cyan), var(--hc-violet));
}

/* Tables */
.hc-table-wrap { overflow-x: auto; margin: 10px 0; max-width: 100%; }
.hc-table { width: 100%; border-collapse: collapse; font-size: 12.8px; min-width: 440px; }
.hc-table th, .hc-table td { text-align: left; padding: 7px 11px; border-bottom: 1px solid rgba(148,163,184,0.12); vertical-align: top; }
.hc-table th { color: #9fd8ff; font-weight: 700; font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.hc-table tr:hover td { background: rgba(56,189,248,0.04); }
.hc-table td code { font-size: 11.5px; }

/* Pills */
.hc-pill { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.hc-pill.live  { background: rgba(52,211,153,0.16); color: #6ee7b7; }
.hc-pill.dev   { background: rgba(240,160,32,0.16); color: #fbbf24; }
.hc-pill.crit  { background: rgba(240,80,110,0.16); color: #fda4b4; }
.hc-pill.warn  { background: rgba(240,160,32,0.16); color: #fbbf24; }
.hc-pill.minor { background: rgba(148,163,184,0.16); color: #cbd5e1; }

/* Animated bits driven by JS get this base; reduced-motion neutralises it */
.hc-anim { will-change: transform, opacity; }

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hc-aside { flex-basis: 244px; }
  .hc-content { padding: 26px 28px 64px; }
}
@media (max-width: 760px) {
  #help-center-overlay { padding: 0; }
  .hc-shell { width: 100%; height: 100%; border-radius: 0; flex-direction: column; border: none; }
  .hc-aside { flex: 0 0 auto; border-right: none; border-bottom: 1px solid rgba(148,163,184,0.12); }
  .hc-hero { display: none; }            /* kill the GPU emblem on phones */
  .hc-search { padding: 12px 14px 6px; }
  .hc-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 6px; padding: 4px 12px 10px; }
  .hc-group-label { display: none; }
  .hc-nav button { width: auto; white-space: nowrap; flex: 0 0 auto; }
  .hc-nav button::before { display: none; }
  .hc-aside-foot { display: none; }
  .hc-content { padding: 22px 18px 56px; }
  .hc-content h2 { font-size: 22px; }
  .hc-content p, .hc-lede { max-width: none; }
}

/* ── Reduced motion: no transforms, instant transitions. ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  #help-center-overlay, .hc-shell, .hc-anim { transition: opacity 0.15s linear !important; }
  .hc-content { scroll-behavior: auto; }
}

/* ════════════════════════════════════════════════════════════════════════
   ROADMAP  — a horizontal milestone spine (cards alternate above / below on
   stems), an auto-computed progress fill, and a "you are here" marker. Echoes
   the hand-drawn sketch, styled in the app's glass/cosmic language.
   ════════════════════════════════════════════════════════════════════════ */
.rm-wrap { margin-top: 6px; }

/* Header: big overall % + progress bar */
.rm-head { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; margin: 4px 0 14px; }
.rm-overall { display: flex; align-items: baseline; gap: 8px; }
.rm-overall-num {
  font-family: var(--font-display, 'Space Grotesk', sans-serif); font-weight: 700;
  font-size: 52px; line-height: 0.9; letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--hc-cyan), var(--hc-violet) 55%, var(--hc-teal));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.rm-overall-frac { font-size: 15px; color: rgba(231,236,245,0.55); font-variant-numeric: tabular-nums; }
.rm-head-meta { flex: 1 1 280px; min-width: 220px; }
.rm-head-label { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(231,236,245,0.5); margin-bottom: 7px; }
.rm-bar { position: relative; height: 9px; border-radius: 6px; background: rgba(148,163,184,0.12); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); }
.rm-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  border-radius: 6px; transform-origin: left center;
  background: linear-gradient(90deg, var(--hc-cyan), var(--hc-violet) 55%, var(--hc-teal));
  box-shadow: 0 0 14px rgba(56,189,248,0.5);
}
.rm-bar-ticks { position: absolute; inset: 0; pointer-events: none; }
.rm-bar-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.10); }
.rm-head-sub { font-size: 12.5px; color: rgba(231,236,245,0.66); margin-top: 8px; max-width: 70ch; }

/* Legend */
.rm-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 6px; font-size: 11px; color: rgba(231,236,245,0.6); }
.rm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rm-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.rm-dot.done   { background: var(--hc-teal); box-shadow: 0 0 8px rgba(45,212,191,0.6); }
.rm-dot.active { background: var(--hc-cyan); box-shadow: 0 0 10px rgba(56,189,248,0.8); }
.rm-dot.planned{ background: transparent; border: 1.5px solid rgba(148,163,184,0.5); }

/* Horizontal scroll viewport + track */
.rm-scroll { overflow-x: auto; overflow-y: hidden; padding: 2px 2px 12px; scrollbar-width: thin; }
.rm-scroll::-webkit-scrollbar { height: 9px; }
.rm-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.22); border-radius: 8px; }
.rm-track { position: relative; height: 524px; }

/* Spine + fill (vertical center of the track) */
.rm-spine { position: absolute; top: 240px; height: 3px; border-radius: 3px; background: rgba(148,163,184,0.20); }
.rm-spine-fill {
  position: absolute; top: 239px; height: 5px; border-radius: 4px; transform-origin: left center;
  background: linear-gradient(90deg, var(--hc-cyan), var(--hc-violet) 60%, var(--hc-teal));
  box-shadow: 0 0 16px rgba(56,189,248,0.55);
}

/* Nodes on the spine */
.rm-node {
  position: absolute; top: 240px; width: 18px; height: 18px; border-radius: 50%;
  transform: translate(-50%, -50%); background: #0a0f1f; border: 2px solid rgba(148,163,184,0.45);
  z-index: 3;
}
.rm-node.done   { border-color: var(--hc-teal); background: var(--hc-teal); box-shadow: 0 0 10px rgba(45,212,191,0.6); }
.rm-node.active { border-color: var(--hc-cyan); background: #0a0f1f; box-shadow: 0 0 0 4px rgba(56,189,248,0.18), 0 0 16px rgba(56,189,248,0.7); animation: rm-pulse 2.2s ease-in-out infinite; }
.rm-node.planned{ border-style: dashed; }
@keyframes rm-pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(56,189,248,0.14), 0 0 12px rgba(56,189,248,0.5); } 50% { box-shadow: 0 0 0 6px rgba(56,189,248,0.22), 0 0 20px rgba(56,189,248,0.85); } }

/* Stems from node to card */
.rm-stem { position: absolute; width: 2px; background: linear-gradient(rgba(148,163,184,0.45), rgba(148,163,184,0.12)); transform: translateX(-50%); z-index: 1; }
.rm-stem.up   { top: 194px; height: 46px; }
.rm-stem.down { top: 240px; height: 46px; }

/* Milestone cards */
.rm-card {
  position: absolute; width: 218px; transform: translateX(-50%);
  background: rgba(148,163,184,0.06); border: 1px solid rgba(148,163,184,0.16);
  border-radius: 13px; padding: 12px 13px; cursor: pointer; z-index: 2;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.rm-card.up   { top: 188px; transform: translate(-50%, -100%); }
.rm-card.down { top: 286px; }
.rm-card:hover { background: rgba(56,189,248,0.08); border-color: rgba(56,189,248,0.3); }
.rm-card.sel { border-color: rgba(56,189,248,0.55); background: rgba(56,189,248,0.10); box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.rm-card.done   { border-left: 3px solid var(--hc-teal); }
.rm-card.active { border-left: 3px solid var(--hc-cyan); }
.rm-card.planned{ border-left: 3px solid rgba(148,163,184,0.35); opacity: 0.92; }
.rm-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.rm-stage-no {
  font-family: var(--font-display, 'Space Grotesk', sans-serif); font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; color: #04101e; background: linear-gradient(135deg, var(--hc-cyan), var(--hc-violet));
  padding: 1px 8px; border-radius: 999px;
}
.rm-card.planned .rm-stage-no { background: rgba(148,163,184,0.3); color: #cbd5e1; }
.rm-card-title { font-family: var(--font-display, 'Space Grotesk', sans-serif); font-size: 13.5px; font-weight: 700; color: #fff; line-height: 1.25; margin: 2px 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm-card-sum { font-size: 11.8px; color: rgba(231,236,245,0.74); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rm-card-meter { margin-top: 8px; height: 5px; border-radius: 4px; background: rgba(148,163,184,0.14); overflow: hidden; }
.rm-card-meter > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--hc-cyan), var(--hc-teal)); }
.rm-card-pct { font-size: 10.5px; font-weight: 700; color: rgba(231,236,245,0.6); font-variant-numeric: tabular-nums; }

/* "You are here" marker (full-height dashed line + pill at top) */
.rm-here { position: absolute; top: 30px; bottom: 14px; width: 0; border-left: 2px dashed rgba(56,189,248,0.55); z-index: 5; pointer-events: none; }
.rm-here-pill {
  position: absolute; top: 6px; transform: translateX(-50%); white-space: nowrap;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; color: #04101e;
  background: linear-gradient(135deg, var(--hc-cyan), var(--hc-violet)); padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(56,189,248,0.4); z-index: 6; pointer-events: none;
}

/* Detail panel below the track (selected stage) */
.rm-detail {
  margin-top: 8px; border: 1px solid rgba(148,163,184,0.16); border-radius: 14px;
  background: rgba(148,163,184,0.05); padding: 16px 18px;
}
.rm-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.rm-detail-title { font-family: var(--font-display, 'Space Grotesk', sans-serif); font-size: 17px; font-weight: 700; color: #fff; }
.rm-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 26px; margin-top: 10px; }
.rm-col h5 { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 7px; }
.rm-col.done h5 { color: var(--hc-teal); }
.rm-col.next h5 { color: var(--hc-cyan); }
.rm-col ul { list-style: none; padding: 0; margin: 0; }
.rm-col li { position: relative; padding-left: 20px; font-size: 12.8px; color: rgba(231,236,245,0.85); margin: 5px 0; line-height: 1.45; }
.rm-col.done li::before { content: "✓"; position: absolute; left: 0; color: var(--hc-teal); font-weight: 700; }
.rm-col.next li::before { content: "→"; position: absolute; left: 0; color: var(--hc-cyan); font-weight: 700; }
.rm-hint { font-size: 11.5px; color: rgba(231,236,245,0.5); margin-top: 10px; }

@media (max-width: 760px) {
  .rm-overall-num { font-size: 42px; }
  .rm-detail-grid { grid-template-columns: 1fr; gap: 14px; }
  .rm-scroll { margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .rm-node.active { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   LIGHT MODE
   The whole panel is authored dark-first: near-white ink (--hc-ink #e7ecf5),
   dark navy shell/sidebar gradients, slate rgba(148,163,184,…) borders/fills,
   and many hardcoded light text colours (#fff, #9fd8ff, #cfe6ff, rgba(226/231…)).
   On the light page all of that either vanishes or blazes white. Re-skin onto
   frosted-white glass with dark ink; the overlay backdrop stays dark (scrim is
   correct on both). Accent-driven pills/gradients auto-invert, so they're left.
   ════════════════════════════════════════════════════════════════════════ */
html[data-theme="light"] .hc-shell {
  --hc-ink: var(--text-primary);
  background: linear-gradient(180deg, var(--glass-3, rgba(255,255,255,0.80)) 0%, var(--glass-2, rgba(255,255,255,0.68)) 100%);
  border-color: var(--glass-border-2, rgba(130,100,200,0.32));
  box-shadow:
    0 40px 120px rgba(80,90,160,0.18),
    0 0 0 1px rgba(255,255,255,0.5) inset,
    0 0 80px rgba(2,132,199,0.05) inset;
}

/* Sidebar */
html[data-theme="light"] .hc-aside {
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.30));
  border-right-color: var(--glass-border, rgba(130,100,200,0.18));
}
html[data-theme="light"] .hc-hero { border-bottom-color: var(--glass-border, rgba(130,100,200,0.18)); }
html[data-theme="light"] .hc-hero-title { color: var(--text-primary); }
html[data-theme="light"] .hc-search-box svg { color: var(--text-muted); }
html[data-theme="light"] .hc-search input {
  background: var(--glass-1, rgba(255,255,255,0.52));
  border-color: var(--glass-border, rgba(130,100,200,0.18));
  color: var(--text-primary);
}
html[data-theme="light"] .hc-search input::placeholder { color: var(--text-muted); }
html[data-theme="light"] .hc-nav::-webkit-scrollbar-thumb,
html[data-theme="light"] .hc-content::-webkit-scrollbar-thumb,
html[data-theme="light"] .rm-scroll::-webkit-scrollbar-thumb { background: rgba(130,100,200,0.28); }
html[data-theme="light"] .hc-group-label { color: var(--text-muted); }
html[data-theme="light"] .hc-nav button { color: var(--text-secondary); }
html[data-theme="light"] .hc-nav button:hover { background: rgba(2,132,199,0.08); color: var(--text-primary); }
html[data-theme="light"] .hc-nav button.active { background: rgba(2,132,199,0.12); color: var(--accent-cyan, #0284c7); }
html[data-theme="light"] .hc-no-results { color: var(--text-muted); }
html[data-theme="light"] .hc-aside-foot {
  border-top-color: var(--glass-border, rgba(130,100,200,0.18));
  color: var(--text-muted);
}
html[data-theme="light"] .hc-kbd {
  background: rgba(130,100,200,0.12);
  border-color: rgba(130,100,200,0.24);
  color: var(--text-secondary);
}

/* Main / header */
html[data-theme="light"] .hc-main-head {
  border-bottom-color: var(--glass-border, rgba(130,100,200,0.18));
  background: rgba(255,255,255,0.35);
}
html[data-theme="light"] .hc-crumb { color: var(--text-muted); }
html[data-theme="light"] .hc-close { border-color: var(--glass-border-2, rgba(130,100,200,0.32)); color: var(--text-secondary); }
html[data-theme="light"] .hc-close:hover { border-color: rgba(225,29,72,0.5); color: var(--accent-rose, #e11d48); background: rgba(225,29,72,0.08); }

/* Content typography */
html[data-theme="light"] .hc-content h2 { color: var(--text-primary); }
html[data-theme="light"] .hc-content h3 { color: var(--accent-cyan, #0284c7); }
html[data-theme="light"] .hc-content h4 { color: var(--accent-violet, #4f46e5); }
html[data-theme="light"] .hc-content p,
html[data-theme="light"] .hc-content li { color: var(--text-secondary); }
html[data-theme="light"] .hc-content li::marker { color: var(--accent-cyan, #0284c7); }
html[data-theme="light"] .hc-lede { color: var(--text-secondary) !important; }
html[data-theme="light"] .hc-content b,
html[data-theme="light"] .hc-content strong { color: var(--text-primary); }
html[data-theme="light"] .hc-content code {
  background: rgba(2,132,199,0.10);
  color: var(--accent-cyan, #0284c7);
}

/* Cards / callouts (base neutral card; accent variants auto-invert) */
html[data-theme="light"] .hc-card {
  background: var(--glass-1, rgba(255,255,255,0.52));
  border-color: var(--glass-border, rgba(130,100,200,0.18));
}
html[data-theme="light"] .hc-card > b:first-child { color: var(--text-primary); }

/* Tables */
html[data-theme="light"] .hc-table th,
html[data-theme="light"] .hc-table td { border-bottom-color: var(--glass-border, rgba(130,100,200,0.18)); }
html[data-theme="light"] .hc-table th { color: var(--accent-cyan, #0284c7); }
html[data-theme="light"] .hc-table tr:hover td { background: rgba(2,132,199,0.05); }

/* ── Roadmap ─────────────────────────────────────────────────────────────── */
html[data-theme="light"] .rm-overall-frac,
html[data-theme="light"] .rm-head-sub,
html[data-theme="light"] .rm-legend { color: var(--text-secondary); }
html[data-theme="light"] .rm-head-label { color: var(--text-muted); }
html[data-theme="light"] .rm-bar { background: rgba(130,100,200,0.14); box-shadow: inset 0 0 0 1px rgba(130,100,200,0.10); }
html[data-theme="light"] .rm-bar-tick { background: rgba(130,100,200,0.18); }
html[data-theme="light"] .rm-spine { background: rgba(130,100,200,0.24); }
html[data-theme="light"] .rm-node { background: #fff; border-color: rgba(130,100,200,0.45); }
html[data-theme="light"] .rm-node.active { background: #fff; }
html[data-theme="light"] .rm-stem { background: linear-gradient(rgba(130,100,200,0.45), rgba(130,100,200,0.12)); }
html[data-theme="light"] .rm-card {
  background: var(--glass-1, rgba(255,255,255,0.52));
  border-color: var(--glass-border, rgba(130,100,200,0.18));
}
html[data-theme="light"] .rm-card:hover { background: rgba(2,132,199,0.06); border-color: rgba(2,132,199,0.3); }
html[data-theme="light"] .rm-card.sel { border-color: rgba(2,132,199,0.55); background: rgba(2,132,199,0.10); box-shadow: 0 8px 30px rgba(80,90,160,0.16); }
html[data-theme="light"] .rm-card-title { color: var(--text-primary); }
html[data-theme="light"] .rm-card-sum { color: var(--text-secondary); }
html[data-theme="light"] .rm-card-meter { background: rgba(130,100,200,0.16); }
html[data-theme="light"] .rm-card-pct { color: var(--text-muted); }
html[data-theme="light"] .rm-detail {
  background: var(--glass-1, rgba(255,255,255,0.52));
  border-color: var(--glass-border, rgba(130,100,200,0.18));
}
html[data-theme="light"] .rm-detail-title { color: var(--text-primary); }
html[data-theme="light"] .rm-col li { color: var(--text-secondary); }
html[data-theme="light"] .rm-hint { color: var(--text-muted); }

/* ── Light overrides for JS inline styles ── */
/* help-center.js injects two elements with HARDCODED inline colors that only
   read on the dark canvas. Beat the inline color with [style] + !important so
   dark mode is untouched (these rules apply in light only). */

/* _rmStatusPill('active') → <span class="hc-pill" style="background:rgba(56,189,248,0.18);color:#7dd3fc"> :
   pale-cyan text on a translucent fill is low-contrast on the light roadmap. */
html[data-theme="light"] .hc-content .hc-pill[style] {
  color: var(--accent-cyan, #0284c7) !important;
  background: rgba(2,132,199,0.14) !important;
}

/* Roadmap legend trailing hint span → style="...color:rgba(231,236,245,0.45)" :
   near-white inline color is invisible on the light legend (the inline wins over
   the .rm-legend class rule above, so it needs its own !important override). */
html[data-theme="light"] .rm-legend span[style] {
  color: var(--text-muted) !important;
}
