/* ============================================================================
   linux+  ::  styles.css
   CompTIA Linux+ (XK0-006) Study Platform
   Authored & designed by Professor Rizwan Virani.

   Visual identity is a deliberate sister to the SOC Range platform: the same
   glass-cockpit, mission-control aesthetic, the same CSS-variable palette,
   the same Chakra Petch / IBM Plex type system, and an identical
   data-theme="light" toggle model. Dark is the default tactical look;
   light is a high-contrast operational dashboard. Only the data and the
   study-specific components below are new.
   ========================================================================== */

:root {
  --bg: #0b1016;
  --panel: #0f1822;
  --panel-2: #13202c;
  --elev: #18242f;
  --line: #1f2e3c;
  --line-soft: rgba(53, 213, 230, .10);
  --ink: #e7eef5;
  --ink-dim: #93a4b6;
  --ink-faint: #5e7184;
  --cyan: #34d5e6;
  --cyan-dim: #1f97a6;
  --green: #46d18a;
  --amber: #ffb454;
  --info: #5aa9e6;
  --low: #46d18a;
  --med: #f7c948;
  --high: #fb8b3c;
  --crit: #fb5071;
  --grc: #a78bfa;
  /* per-domain signature colors used across cards, badges and the analytics */
  --d1: #34d5e6;
  --d2: #fb5071;
  --d3: #a78bfa;
  --d4: #46d18a;
  --d5: #ffb454;
  --f-hud: "Chakra Petch", system-ui, sans-serif;
  --f-ui: "IBM Plex Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --r: 8px;
  color-scheme: dark;
  --shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-2: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 50px -18px rgba(0,0,0,.7);
  --ring: 0 0 0 1px rgba(53,213,230,.25), 0 0 30px -6px rgba(53,213,230,.45);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-ui);
  color: var(--ink);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(53,213,230,.10), transparent 58%),
    radial-gradient(820px 460px at -12% 112%, rgba(255,180,84,.07), transparent 60%),
    linear-gradient(180deg, #0c121a, var(--bg));
  background-attachment: fixed;
}
/* faint engineered grid texture behind everything */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(53,213,230,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,213,230,.035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 50% 20%, #000 30%, transparent 78%);
}
a { color: var(--cyan); text-decoration: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.hud { font-family: var(--f-hud); letter-spacing: .04em; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--f-hud); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* ---------- App shell ---------- */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 22px 90px; position: relative; z-index: 1; }

.topbar {
  display: flex; align-items: center; gap: 14px; padding: 16px 0; margin-bottom: 6px;
  position: static;
  background: linear-gradient(180deg, rgba(11,16,22,.92), rgba(11,16,22,.66) 70%, transparent);
  backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%);
}
.brand { display: flex; align-items: center; gap: 13px; cursor: pointer; color: inherit; }
.brand .mark {
  width: 46px; height: 46px; display: grid; place-items: center;
  color: #04222a; border-radius: 10px; font-weight: 700; font-size: 27px; font-family: var(--f-hud);
  background: linear-gradient(150deg, #5ff0ff, var(--cyan) 55%, #1fb6c6);
  box-shadow: 0 0 0 1px rgba(53,213,230,.5), 0 0 22px rgba(53,213,230,.55);
}
.brand b { font-family: var(--f-hud); letter-spacing: .06em; font-size: 28px; line-height: 1.05; }
.brand small { color: var(--ink-faint); font-size: 13px; letter-spacing: .16em; display: block; }
.brand:hover b { color: var(--cyan); }
.topbar .spacer { flex: 1; }
.pagetag {
  font-family: var(--f-hud); font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-dim); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; white-space: nowrap;
}
/* Audit fix: hide the nowrap page-tag chip and tighten the top bar on
   small screens to prevent top-bar horizontal overflow. */
@media (max-width: 640px) { .pagetag { display: none; } .topbar { gap: 10px; } }
.homebtn { font-family: var(--f-hud); letter-spacing: .06em; }
.homebtn::before { content: "\2302  "; }

/* ---------- Hero ---------- */
.hero { padding: 30px 0 22px; }
.attrib {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 16px;
  font-family: var(--f-hud); font-size: 12px; letter-spacing: .08em;
  color: var(--cyan); border: 1px solid var(--cyan-dim); border-radius: 999px;
  padding: 6px 14px; background: rgba(53,213,230,.07); box-shadow: var(--ring);
}
.attrib .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.hero h1 {
  font-family: var(--f-hud); font-size: clamp(34px, 6vw, 58px); margin: 6px 0 10px;
  line-height: 1.02; letter-spacing: .01em; text-shadow: 0 0 40px rgba(53,213,230,.18);
}
.hero h1 span { color: var(--cyan); text-shadow: 0 0 26px rgba(53,213,230,.55); }
.hero .lede { color: var(--ink-dim); max-width: none; font-size: 18px; line-height: 1.55; }
.hero .examline {
  font-family: var(--f-mono); color: var(--cyan); font-size: 14px; letter-spacing: .02em;
  margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px;
}
.hero .examline b { color: var(--ink); }

/* ---------- Onboarding (what it is / how to use) ---------- */
.howto {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--cyan-dim); border-radius: 12px;
  padding: 20px 22px; margin: 26px 0 6px; box-shadow: var(--ring);
}
.howto h2 { font-family: var(--f-hud); font-size: 18px; margin: 0 0 12px; letter-spacing: .04em; }
.howto ol { margin: 0; padding-left: 20px; color: var(--ink-dim); }
.howto ol li { margin: 7px 0; line-height: 1.55; }
.howto ol li b { color: var(--ink); }

.isnot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
@media (max-width: 760px) { .isnot { grid-template-columns: 1fr; } }
.isnot .col { border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; background: var(--panel); }
.isnot .col.is { border-color: rgba(70,209,138,.35); }
.isnot .col.isnot-col { border-color: rgba(251,80,113,.3); }
.isnot h4 { font-family: var(--f-hud); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 8px; }
.isnot .col.is h4 { color: var(--low); }
.isnot .col.isnot-col h4 { color: var(--crit); }
.isnot ul { margin: 0; padding-left: 18px; color: var(--ink-dim); font-size: 15px; }
.isnot ul li { margin: 6px 0; line-height: 1.5; }

/* ---------- Section heads + grids ---------- */
.secthead {
  font-family: var(--f-hud); font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); margin: 44px 0 4px; display: flex; align-items: center; gap: 12px;
}
.secthead::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.secthead .n { color: var(--cyan); }
.sectsub { color: var(--ink-dim); margin: 0 0 14px; font-size: 15px; max-width: 760px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 16px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }
@media (max-width: 720px) { .grid, .grid.two { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  display: block; text-align: left; width: 100%; color: inherit; cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 38%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 12px; padding: 18px;
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  font-family: var(--f-ui);
}
button.card { font: inherit; }
.card:hover { transform: translateY(-4px); border-color: var(--cyan-dim); box-shadow: var(--shadow-2), var(--ring); }
.card.static { cursor: default; }
.card.static:hover { transform: none; border-color: var(--line); box-shadow: var(--shadow-1); }
.card .kome { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .tag {
  font-family: var(--f-hud); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #04222a; padding: 3px 9px; border-radius: 10px; background: var(--cyan);
}
.card .tag.d1 { background: var(--d1); color: #04222a; }
.card .tag.d2 { background: var(--d2); color: #fff; }
.card .tag.d3 { background: var(--d3); color: #1a1130; }
.card .tag.d4 { background: var(--d4); color: #04220f; }
.card .tag.d5 { background: var(--d5); color: #2a1a00; }
.card .tag.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-faint); }
.card .ico { font-size: 22px; line-height: 1; }
.card h3 { font-family: var(--f-hud); margin: 12px 0 6px; font-size: 19px; letter-spacing: .01em; }
.card .desc { color: var(--ink-dim); font-size: 14px; line-height: 1.5; }
.card .foot {
  margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-faint);
}
.card .foot .go { color: var(--cyan); font-family: var(--f-hud); letter-spacing: .04em; }
.card .weight {
  font-family: var(--f-hud); font-size: 12px; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
/* domain card left signature rail */
.card.domain { position: relative; overflow: hidden; }
.card.domain::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cyan); }
.card.domain.d1::before { background: var(--d1); } .card.domain.d2::before { background: var(--d2); }
.card.domain.d3::before { background: var(--d3); } .card.domain.d4::before { background: var(--d4); }
.card.domain.d5::before { background: var(--d5); }

/* small quiz launch cards */
.qcard { text-align: center; padding: 16px 14px; }
.qcard .num { font-family: var(--f-hud); font-size: 13px; color: var(--ink-faint); letter-spacing: .1em; }
.qcard h3 { font-size: 16px; margin: 8px 0 4px; }
.qcard .desc { font-size: 13px; }

/* ---------- KPI tiles (dashboard analytics) ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-1); }
.kpi .v { font-family: var(--f-hud); font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1; }
.kpi .k { font-size: 11px; letter-spacing: .14em; color: var(--ink-faint); text-transform: uppercase; margin-top: 6px; }
.kpi.good .v { color: var(--low); } .kpi.warn .v { color: var(--amber); } .kpi.crit .v { color: var(--crit); }
.kpi.cyan .v { color: var(--cyan); }

/* ---------- Buttons / chips ---------- */
.btn {
  font-family: var(--f-hud); font-size: 13px; letter-spacing: .05em;
  border: 1px solid var(--line); background: var(--elev); color: var(--ink);
  padding: 9px 15px; border-radius: 7px; cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { transform: translateY(-1px); border-color: var(--cyan-dim); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(180deg, #5ff0ff, var(--cyan) 60%, #16b3c4);
  color: #052027; border-color: transparent; font-weight: 600;
  box-shadow: 0 8px 22px -10px rgba(53,213,230,.8), 0 1px 0 rgba(255,255,255,.4) inset;
}
.btn.primary:hover { box-shadow: 0 12px 30px -10px rgba(53,213,230,.95), 0 1px 0 rgba(255,255,255,.5) inset; }
.btn.ghost { background: transparent; }
.btn.warn { background: var(--amber); color: #2a1a00; border-color: var(--amber); }
.btn.danger { background: transparent; border-color: rgba(251,80,113,.5); color: var(--crit); }
.btn.sm { padding: 6px 11px; font-size: 12px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btnrow { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono);
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--ink-dim); cursor: pointer; background: var(--panel);
}
.chip.on { color: var(--ink); border-color: var(--cyan-dim); background: rgba(53,213,230,.08); }

/* ---------- Workspace (swapped views) ---------- */
#view { animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.crumb { display: flex; align-items: center; gap: 10px; margin: 6px 0 18px; flex-wrap: wrap; }
.crumb .back {
  font-family: var(--f-hud); font-size: 13px; letter-spacing: .04em; cursor: pointer;
  border: 1px solid var(--line); background: var(--elev); color: var(--ink);
  padding: 8px 14px; border-radius: 7px;
}
.crumb .back::before { content: "\2190  "; color: var(--cyan); }
.crumb .back:hover { border-color: var(--cyan-dim); }
.crumb .where { color: var(--ink-faint); font-family: var(--f-mono); font-size: 13px; }

.phead { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.phead h1 { font-family: var(--f-hud); font-size: 26px; margin: 0; letter-spacing: .01em; }
.phead .sub { color: var(--ink-dim); font-size: 15px; }

/* ---------- Reading interface (domain textbook) ---------- */
.reader { display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .reader { grid-template-columns: 1fr; } }
/* Audit fix: let the collapsed reader track shrink below wide-table min-content,
   and scroll wide tables internally instead of overflowing the viewport on mobile. */
.reader > * { min-width: 0; }
@media (max-width: 720px) { .prose table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; } }
.toc {
  position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 104px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow-1);
}
@media (max-width: 900px) { .toc { position: static; max-height: none; overflow: visible; } }
.toc .eyebrow { margin-bottom: 8px; }
.toc a {
  display: block; padding: 7px 10px; border-radius: 7px; color: var(--ink-dim);
  font-size: 14px; line-height: 1.35; border-left: 2px solid transparent;
}
.toc a:hover { background: var(--elev); color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--cyan); background: rgba(53,213,230,.07); }

.prose { max-width: 820px; }
.prose section { scroll-margin-top: 80px; margin-bottom: 30px; }
.prose h2 {
  font-family: var(--f-hud); font-size: 22px; letter-spacing: .02em; margin: 0 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--ink);
}
.prose h3 { font-family: var(--f-hud); font-size: 17px; color: var(--cyan); margin: 22px 0 8px; letter-spacing: .02em; }
.prose p { color: var(--ink); font-size: 15.5px; line-height: 1.72; margin: 10px 0; }
.prose ul, .prose ol { color: var(--ink); font-size: 15.5px; line-height: 1.68; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--ink); }
.prose em { color: var(--cyan); font-style: normal; font-family: var(--f-mono); font-size: .94em; }
.prose .keyterm { color: var(--amber); font-weight: 600; }
.prose blockquote {
  margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--cyan-dim);
  background: var(--panel); border-radius: 0 8px 8px 0; color: var(--ink-dim); font-size: 15px;
}
.prose .callout {
  margin: 16px 0; border: 1px solid var(--line); border-left: 3px solid var(--amber);
  border-radius: 0 10px 10px 0; padding: 13px 16px; background: rgba(255,180,84,.05);
}
.prose .callout .lbl { font-family: var(--f-hud); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.prose .callout.exam { border-left-color: var(--cyan); background: rgba(53,213,230,.05); }
.prose .callout.exam .lbl { color: var(--cyan); }
.prose .callout.scenario { border-left-color: var(--green); background: rgba(70,209,138,.05); }
.prose .callout.scenario .lbl { color: var(--green); }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.prose table th { background: rgba(53,213,230,.1); color: var(--ink); font-family: var(--f-hud); font-size: 12px; letter-spacing: .04em; text-align: left; padding: 8px 11px; border: 1px solid var(--line); }
.prose table td { padding: 8px 11px; border: 1px solid var(--line); color: var(--ink-dim); vertical-align: top; }
/* Mobile-safe code blocks + wide tables: scroll internally instead of widening the page (QA fix) */
.prose pre { overflow-x: auto; max-width: 100%; }
@media (max-width: 720px) { .prose table { display: block; overflow-x: auto; } }

/* ---------- Quiz / question UI ---------- */
.quizwrap { max-width: 820px; margin: 0 auto; }
.qmeta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.progressbar { height: 8px; flex: 1; min-width: 180px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.progressbar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--low)); transition: width .3s ease; }
.qcount { font-family: var(--f-mono); font-size: 13px; color: var(--ink-dim); white-space: nowrap; }
.timer { font-family: var(--f-hud); font-size: 20px; letter-spacing: .04em; color: var(--cyan); font-variant-numeric: tabular-nums; }
.timer.warn { color: var(--amber); } .timer.crit { color: var(--crit); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.qcard-full {
  border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow-1);
}
.qcard-full .qhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qdombadge { font-family: var(--f-hud); font-size: 11px; letter-spacing: .1em; padding: 3px 9px; border-radius: 8px; color: #04222a; background: var(--cyan); }
.qdombadge.d1 { background: var(--d1); } .qdombadge.d2 { background: var(--d2); color: #fff; }
.qdombadge.d3 { background: var(--d3); color:#1a1130; } .qdombadge.d4 { background: var(--d4); color:#04220f; } .qdombadge.d5 { background: var(--d5); color:#2a1a00; }
.qobj { font-family: var(--f-mono); font-size: 12px; color: var(--ink-faint); }
.qflag { margin-left: auto; font-family: var(--f-hud); font-size: 12px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--ink-dim); padding: 6px 11px; border-radius: 7px; }
.qflag.on { color: var(--amber); border-color: var(--amber); background: rgba(255,180,84,.1); }
.qflag::before { content: "\2691  "; }
.qtext { font-size: 18px; line-height: 1.55; margin: 6px 0 18px; color: var(--ink); }
.qtext .mono, .qtext code { font-family: var(--f-mono); background: #0a1119; border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: .9em; color: var(--cyan); }

.opt {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  padding: 13px 15px; margin: 9px 0; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); border-radius: 9px; cursor: pointer; font-size: 15.5px; line-height: 1.45;
  font-family: var(--f-ui); transition: border-color .15s, background .15s, transform .1s;
}
.opt:hover { border-color: var(--cyan-dim); }
.opt .key { font-family: var(--f-hud); font-size: 13px; width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-dim); }
.opt.sel { border-color: var(--cyan); background: rgba(53,213,230,.10); }
.opt.sel .key { background: var(--cyan); color: #04222a; border-color: var(--cyan); }
.opt.correct { border-color: var(--low); background: rgba(70,209,138,.12); }
.opt.correct .key { background: var(--low); color: #04220f; border-color: var(--low); }
.opt.wrong { border-color: var(--crit); background: rgba(251,80,113,.12); }
.opt.wrong .key { background: var(--crit); color: #fff; border-color: var(--crit); }
.opt:disabled { cursor: default; }
.opt .tick { margin-left: auto; font-family: var(--f-hud); font-size: 13px; }

.rationale {
  margin-top: 14px; font-size: 14.5px; color: var(--ink-dim); line-height: 1.6;
  border-left: 3px solid var(--cyan-dim); padding: 10px 14px; background: var(--panel);
  border-radius: 0 8px 8px 0;
}
.rationale .lbl { font-family: var(--f-hud); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); display: block; margin-bottom: 4px; }
.rationale.bad { border-left-color: var(--crit); }
.rationale.bad .lbl { color: var(--crit); }
.qnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* question palette (mock review grid) */
.palette { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 16px; }
.palette button {
  width: 36px; height: 34px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-dim); border-radius: 7px; font-family: var(--f-mono); font-size: 12px; cursor: pointer;
}
.palette button.answered { border-color: var(--cyan-dim); color: var(--ink); background: rgba(53,213,230,.08); }
.palette button.flagged { border-color: var(--amber); color: var(--amber); }
.palette button.current { box-shadow: 0 0 0 2px var(--cyan); color: var(--ink); }

/* ---------- PBQ terminal / fields ---------- */
.pbqwrap { max-width: 920px; margin: 0 auto; }
.pbq-brief { font-size: 16px; line-height: 1.6; color: var(--ink); margin: 0 0 16px; }
.terminal {
  background: #060b11; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-1); margin: 14px 0 18px;
}
.terminal .tbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 13px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border-bottom: 1px solid var(--line);
}
.terminal .tbar .dots { display: flex; gap: 6px; }
.terminal .tbar .dots i { width: 10px; height: 10px; border-radius: 50%; display: block; background: var(--line); }
.terminal .tbar .dots i:nth-child(1) { background: var(--crit); } .terminal .tbar .dots i:nth-child(2) { background: var(--amber); } .terminal .tbar .dots i:nth-child(3) { background: var(--low); }
.terminal .tbar .ttl { font-family: var(--f-mono); font-size: 12px; color: var(--ink-dim); letter-spacing: .04em; }
.terminal pre {
  margin: 0; padding: 14px 16px; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.6;
  color: #c7d6e2; max-height: 56vh; overflow-y: auto;
  /* Long unbroken strings (UUIDs, paths, log lines) wrap instead of forcing
     horizontal scroll; monospace preserved. Scoped to PBQ exhibits only —
     lab terminals use .lab-termlog/.lab-logline and are unaffected. */
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.terminal pre .hl { color: var(--crit); }
.terminal pre .ok { color: var(--low); }
.terminal pre .warnc { color: var(--amber); }
.terminal pre .cy { color: var(--cyan); }
.terminal pre .dim { color: var(--ink-faint); }

.pbq-fields { display: grid; gap: 14px; margin: 4px 0 8px; }
.field {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.field .flabel { font-family: var(--f-hud); font-size: 14px; color: var(--ink); margin-bottom: 4px; letter-spacing: .01em; }
.field .fhint { font-size: 13px; color: var(--ink-faint); margin-bottom: 10px; line-height: 1.45; }
.field select {
  width: 100%; background: #0a1119; color: var(--ink); border: 1px solid var(--line);
  border-radius: 7px; padding: 10px 12px; font-family: var(--f-mono); font-size: 13.5px; cursor: pointer;
}
.field select:focus { border-color: var(--cyan); outline: none; }
.field.correct { border-color: var(--low); box-shadow: inset 3px 0 0 var(--low); }
.field.wrong { border-color: var(--crit); box-shadow: inset 3px 0 0 var(--crit); }
.field .fexplain { margin-top: 10px; font-size: 13.5px; color: var(--ink-dim); line-height: 1.55; display: none; }
.field.graded .fexplain { display: block; }
.field .fexplain .ans { color: var(--low); font-family: var(--f-mono); }

/* ---------- Results dashboard ---------- */
.results { max-width: 880px; margin: 0 auto; }
.scorehero {
  text-align: center; border: 1px solid var(--line); border-radius: 16px; padding: 28px 22px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow-2); margin-bottom: 22px;
}
.scorering { --pct: 0; width: 168px; height: 168px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--panel) 70%, transparent 71%),
              conic-gradient(var(--ringcol, var(--cyan)) calc(var(--pct) * 1%), var(--line) 0); }
.scorering .inner { text-align: center; }
.scorering .pct { font-family: var(--f-hud); font-size: 42px; line-height: 1; }
.scorering .lab { font-family: var(--f-hud); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.verdict { font-family: var(--f-hud); font-size: 24px; margin: 6px 0; }
.verdict.pass { color: var(--low); } .verdict.fail { color: var(--crit); }
.scaled { font-family: var(--f-mono); color: var(--ink-dim); font-size: 14px; }

.dombars { display: grid; gap: 11px; margin: 8px 0; }
.dombar { display: grid; grid-template-columns: 200px 1fr 52px; gap: 12px; align-items: center; }
@media (max-width: 620px) { .dombar { grid-template-columns: 1fr; gap: 4px; } }
.dombar .name { font-size: 14px; color: var(--ink-dim); }
.dombar .track { height: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.dombar .track > i { display: block; height: 100%; border-radius: 7px; }
.dombar .pct { font-family: var(--f-mono); font-size: 13px; text-align: right; }

.reviewlist .ritem { border: 1px solid var(--line); border-left: 3px solid var(--crit); border-radius: 0 9px 9px 0; padding: 13px 16px; margin: 10px 0; background: var(--panel); }
.reviewlist .ritem.ok { border-left-color: var(--low); }
.reviewlist .rq { font-size: 15px; color: var(--ink); margin: 0 0 7px; line-height: 1.5; }
.reviewlist .ra { font-size: 13.5px; color: var(--ink-dim); margin: 3px 0; font-family: var(--f-mono); }
.reviewlist .ra .you.bad { color: var(--crit); } .reviewlist .ra .corr { color: var(--low); }
.reviewlist .robj { font-size: 12px; color: var(--ink-faint); font-family: var(--f-mono); margin-top: 6px; }

/* history table */
.htable { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.htable th { text-align: left; font-family: var(--f-hud); font-size: 12px; letter-spacing: .06em; color: var(--ink-faint); text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.htable td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--ink-dim); }
.htable td .mono { color: var(--ink); }
.htable tr:hover td { background: rgba(53,213,230,.04); }
.pillscore { font-family: var(--f-hud); font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.pillscore.pass { background: rgba(70,209,138,.14); color: var(--low); }
.pillscore.fail { background: rgba(251,80,113,.14); color: var(--crit); }

/* ---------- Resource library list ---------- */
.reslist { display: grid; gap: 12px; }
.resitem {
  display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 11px;
  padding: 15px 17px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow-1);
  color: inherit; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.resitem:hover { transform: translateY(-2px); border-color: var(--cyan-dim); box-shadow: var(--shadow-2), var(--ring); }
.resitem .ricon { font-size: 24px; line-height: 1; margin-top: 2px; }
.resitem h3 { font-family: var(--f-hud); font-size: 17px; margin: 0 0 4px; }
.resitem p { margin: 0; color: var(--ink-dim); font-size: 14px; line-height: 1.5; }
.resitem .host { font-family: var(--f-mono); font-size: 12px; color: var(--cyan); margin-top: 6px; display: block; }

/* ---------- Empty state / misc ---------- */
.empty { text-align: center; color: var(--ink-faint); padding: 26px; font-size: 14px; }
.note { color: var(--ink-faint); font-size: 12.5px; line-height: 1.5; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 26px 0; }

/* ---------- Footer ---------- */
.foot-credit { color: var(--ink-faint); font-size: 12.5px; margin-top: 46px; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 18px; }

/* ---------- Theme toggle FAB ---------- */
.theme-fab {
  position: fixed; bottom: 22px; left: 18px; z-index: 70;
  font-family: var(--f-hud); font-size: 13px; letter-spacing: .04em;
  background: var(--elev); color: var(--ink); border: 1px solid var(--cyan-dim);
  padding: 9px 15px; border-radius: 22px; cursor: pointer;
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.45);
}
.theme-fab:hover { border-color: var(--cyan); box-shadow: 0 6px 26px -8px rgba(53,213,230,.5); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--elev); border: 1px solid var(--cyan-dim); color: var(--ink);
  padding: 11px 18px; border-radius: 9px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 80; font-size: 14px; box-shadow: var(--shadow-2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- modal (confirm) ---------- */
.modal { position: fixed; inset: 0; background: rgba(4,8,12,.74); display: none; place-items: center; z-index: 90; padding: 16px; }
.modal.show { display: grid; }
.modal .box { width: min(480px, 94vw); background: var(--panel-2); border: 1px solid var(--cyan-dim); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-2); }
.modal .box h3 { font-family: var(--f-hud); margin: 0 0 10px; font-size: 20px; }
.modal .box p { color: var(--ink-dim); font-size: 15px; line-height: 1.55; margin: 0 0 18px; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: #24435270 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #2a4a5a, #1c333f); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #356074; background-clip: padding-box; }
::selection { background: rgba(53,213,230,.30); color: #fff; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; transition: none !important; } }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .shell { padding: 0 14px 70px; }
  .hero { padding: 20px 0 16px; }
  .hero h1 { font-size: clamp(28px, 9vw, 40px); }
  .hero .lede { font-size: 16px; }
  .reader { gap: 16px; }
  .qcard-full { padding: 17px 16px; }
  .qtext { font-size: 16px; }
  .phead h1 { font-size: 21px; }
  .theme-fab { bottom: 14px; left: 12px; }
}

/* ============================================================================
   LIGHT THEME  ::  [data-theme="light"]  (set on <html>)
   High-contrast operational dashboard. Mirrors dark exactly; palette only.
   ========================================================================== */
[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f7;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --elev: #eef2f7;
  --line: #d5dde8;
  --line-soft: rgba(11,125,144,.16);
  --ink: #0f1c28;
  --ink-dim: #4a5a6b;
  --ink-faint: #7e8da0;
  --cyan: #0b97ac;
  --cyan-dim: #0c7f92;
  --green: #1f9d57;
  --amber: #b9700a;
  --info: #2c74c0;
  --low: #1f9d57;
  --med: #b07d00;
  --high: #cf5a25;
  --crit: #d23a59;
  --grc: #7c5cd6;
  --d1: #0b97ac; --d2: #d23a59; --d3: #7c5cd6; --d4: #1f9d57; --d5: #b9700a;
  --shadow-1: 0 1px 2px rgba(16,30,45,.06), 0 10px 26px -16px rgba(16,30,45,.22);
  --shadow-2: 0 2px 6px rgba(16,30,45,.08), 0 24px 50px -22px rgba(16,30,45,.30);
  --ring: 0 0 0 1px rgba(11,151,172,.30), 0 10px 28px -10px rgba(11,151,172,.28);
}
[data-theme="light"] body {
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(11,151,172,.07), transparent 58%),
    radial-gradient(820px 460px at -12% 112%, rgba(185,112,10,.05), transparent 60%),
    linear-gradient(180deg, #f6f8fb, #e9eef4);
  background-attachment: fixed;
}
[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(11,151,172,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,151,172,.06) 1px, transparent 1px);
  opacity: .6;
}
[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(246,249,252,.94), rgba(246,249,252,.6) 70%, transparent);
}
[data-theme="light"] .card,
[data-theme="light"] .toc,
[data-theme="light"] .qcard-full,
[data-theme="light"] .field,
[data-theme="light"] .resitem,
[data-theme="light"] .scorehero,
[data-theme="light"] .howto { background: linear-gradient(180deg, #ffffff, #f8fafc); }
[data-theme="light"] .card:hover,
[data-theme="light"] .resitem:hover { border-color: var(--cyan-dim); box-shadow: var(--shadow-2), var(--ring); }
[data-theme="light"] .terminal { background: #0c141d; }   /* keep terminals dark on purpose */
[data-theme="light"] .terminal .tbar { background: #14202c; border-color: #20303f; }
[data-theme="light"] .terminal .tbar .ttl { color: #9fb0c0; }
[data-theme="light"] .field select,
[data-theme="light"] .progressbar,
[data-theme="light"] .palette button { background: #f4f7fb; }
[data-theme="light"] .rationale,
[data-theme="light"] .reviewlist .ritem { background: #f4f7fb; }
[data-theme="light"] .hero h1, [data-theme="light"] .hero h1 span { text-shadow: none; }
[data-theme="light"] .brand .mark { box-shadow: 0 0 0 1px rgba(11,151,172,.4), 0 4px 14px rgba(11,151,172,.35); }
[data-theme="light"] .btn { background: #eef2f7; }
[data-theme="light"] .btn.primary { background: linear-gradient(180deg, #16b0c6, #0b97ac); color: #fff;
  box-shadow: 0 8px 20px -10px rgba(11,151,172,.7), 0 1px 0 rgba(255,255,255,.4) inset; }
[data-theme="light"] * { scrollbar-color: #b9c6d6 transparent; }
[data-theme="light"] *::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #c4d0de, #b3c1d2); border: 2px solid transparent; background-clip: padding-box; }
[data-theme="light"] ::selection { background: rgba(11,151,172,.22); color: #06303a; }

/* ============================================================================
   REFINEMENT PASS — larger type, more breathing room, prominent back nav,
   and cleaner section breaks. Appended last so it refines the base by order.
   ========================================================================== */
body { font-size: 17px; }

/* hero + onboarding */
.hero .lede { font-size: 17.5px; line-height: 1.6; }
.attrib { font-size: 13px; margin: 4px 0 20px; padding: 7px 16px; }
.howto { padding: 26px 30px; }
.howto h2 { font-size: 21px; margin-bottom: 16px; }
.howto ol { padding-left: 22px; }
.howto ol li { margin: 11px 0; line-height: 1.65; font-size: 16px; }
.isnot { gap: 16px; margin-top: 20px; }
.isnot .col { padding: 16px 18px; }
.isnot h4 { font-size: 14px; margin-bottom: 10px; }
.isnot ul li { margin: 9px 0; line-height: 1.6; font-size: 15.5px; }

/* section heads */
.secthead { margin: 56px 0 8px; font-size: 15px; letter-spacing: .16em; }
.sectsub { font-size: 16px; line-height: 1.62; margin-bottom: 20px; }

/* dashboard cards */
.grid { gap: 22px; margin-top: 20px; }
.grid.small { gap: 14px; }
.card { padding: 22px; border-radius: 14px; }
.card h3 { font-size: 20px; margin: 14px 0 8px; }
.card .desc { font-size: 15px; line-height: 1.6; }
.card .foot { margin-top: 16px; padding-top: 14px; font-size: 12.5px; }
.qcard { padding: 18px 16px; }
.qcard h3 { font-size: 17px; }
.kpis { gap: 14px; margin-top: 20px; }
.kpi { padding: 18px; }
.kpi .v { font-size: 32px; }

/* workspace headings */
.phead { margin-bottom: 16px; }
.phead h1 { font-size: 28px; }
.phead .sub { font-size: 16px; }

/* reading interface: bigger text + clear breaks between topics */
.reader { gap: 34px; }
.toc { top: 84px; padding: 16px; }
.toc .eyebrow { margin-bottom: 10px; }
.toc a { font-size: 15px; padding: 9px 11px; margin: 3px 0; line-height: 1.4; }
.prose { max-width: 860px; }
.prose p { font-size: 16.5px; line-height: 1.82; margin: 13px 0; }
.prose ul, .prose ol { font-size: 16.5px; line-height: 1.8; }
.prose li { margin: 8px 0; }
.prose h2 { font-size: 24px; margin: 0 0 16px; padding-bottom: 12px; }
.prose h3 { font-size: 18px; margin: 28px 0 10px; }
.prose section { margin-bottom: 58px; padding-bottom: 42px; border-bottom: 1px solid var(--line); scroll-margin-top: 94px; }
.prose section:last-child { margin-bottom: 24px; padding-bottom: 0; border-bottom: none; }
.prose .callout { margin: 20px 0; padding: 16px 18px; }
.prose blockquote { margin: 20px 0; padding: 14px 18px; font-size: 16px; line-height: 1.7; }
.prose table { margin: 18px 0; font-size: 15px; }
.prose table th, .prose table td { padding: 10px 13px; }

/* quizzes / questions */
.quizwrap { max-width: 860px; }
.qcard-full { padding: 26px 28px; border-radius: 16px; }
.qtext { font-size: 19px; line-height: 1.62; margin: 8px 0 20px; }
.opt { padding: 15px 17px; font-size: 16.5px; margin: 10px 0; }
.rationale { font-size: 15.5px; line-height: 1.65; padding: 13px 16px; }
.qmeta { margin-bottom: 18px; }

/* PBQ */
.pbq-brief { font-size: 17px; line-height: 1.7; }
.field { padding: 16px 18px; }
.field .flabel { font-size: 15px; }
.field select { padding: 11px 13px; font-size: 14px; }

/* ---- Prominent top "Back to Dashboard" button ---- */
.crumb { margin: 8px 0 24px; gap: 14px; }
.crumb .back {
  font-family: var(--f-hud); font-size: 14px; letter-spacing: .04em; cursor: pointer; font-weight: 600;
  border: 1px solid var(--cyan-dim); background: rgba(53,213,230,.10); color: var(--ink);
  padding: 11px 18px; border-radius: 9px;
  transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.crumb .back:hover { border-color: var(--cyan); background: rgba(53,213,230,.16); transform: translateY(-1px); box-shadow: var(--ring); }
.crumb .where { font-size: 13.5px; }

/* ---- Bottom back bar (so readers needn't scroll to the top) ---- */
.backbar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 44px 0 8px; padding-top: 24px; border-top: 1px solid var(--line);
}
.backbar .back.big {
  font-family: var(--f-hud); font-size: 15px; letter-spacing: .04em; cursor: pointer; font-weight: 600;
  background: linear-gradient(180deg, #5ff0ff, var(--cyan) 60%, #16b3c4); color: #052027;
  border: 1px solid transparent; padding: 13px 26px; border-radius: 10px;
  box-shadow: 0 8px 22px -10px rgba(53,213,230,.8), 0 1px 0 rgba(255,255,255,.4) inset;
  transition: transform .12s ease, box-shadow .18s ease;
}
.backbar .back.big::before { content: "\2302  "; }
.backbar .back.big:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(53,213,230,.95), 0 1px 0 rgba(255,255,255,.5) inset; }
.backbar .totop { font-size: 13px; }
[data-theme="light"] .backbar .back.big { background: linear-gradient(180deg, #16b0c6, #0b97ac); color: #fff; box-shadow: 0 8px 20px -10px rgba(11,151,172,.7), 0 1px 0 rgba(255,255,255,.4) inset; }
[data-theme="light"] .crumb .back { background: rgba(11,151,172,.10); border-color: var(--cyan-dim); }

/* mobile refinement */
@media (max-width: 720px) {
  body { font-size: 16.5px; }
  .howto { padding: 20px 18px; }
  .prose p, .prose ul, .prose ol { font-size: 16px; line-height: 1.78; }
  .prose section { margin-bottom: 44px; padding-bottom: 32px; }
  .prose h2 { font-size: 22px; }
  .qcard-full { padding: 18px 17px; }
  .qtext { font-size: 17px; }
  .backbar { flex-direction: column-reverse; align-items: stretch; }
  .backbar .back.big, .backbar .totop { text-align: center; justify-content: center; }
}

/* ============================================================================
   RAPID RECALL FLASHCARDS
   ========================================================================== */
.flashwrap { max-width: 720px; margin: 0 auto; }
.callout-box {
  margin: 22px 0 6px; border: 1px solid var(--line); border-left: 3px solid var(--cyan-dim);
  border-radius: 0 10px 10px 0; padding: 14px 18px; background: var(--panel);
  color: var(--ink-dim); font-size: 14.5px; line-height: 1.6;
}
.callout-box b { color: var(--ink); }
.callout-box em { color: var(--cyan); font-style: normal; font-weight: 600; }

/* 3D flip card */
.flashcard { perspective: 1600px; cursor: pointer; margin: 6px 0 4px; }
.flashcard .inner {
  position: relative; width: 100%; min-height: 320px;
  transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.flashcard.flipped .inner { transform: rotateY(180deg); }
.flashcard .face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px 28px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow-2);
}
.flashcard .face.front { }
.flashcard .face.back { transform: rotateY(180deg); border-color: var(--cyan-dim); }
.flashcard .fmain { font-family: var(--f-hud); font-size: clamp(26px, 5vw, 38px); letter-spacing: .01em; color: var(--ink); line-height: 1.15; }
.flashcard .fmain code { font-family: var(--f-mono); font-size: .8em; color: var(--cyan); }
.flashcard .fback { font-size: 17px; line-height: 1.65; color: var(--ink); max-width: 560px; }
.flashcard .fback b, .flashcard .fback strong { color: var(--cyan); }
.flashcard .fback em { color: var(--amber); font-style: normal; }
.flashcard .ftype {
  position: absolute; top: 16px; left: 16px; font-family: var(--f-hud); font-size: 10px;
  letter-spacing: .16em; padding: 3px 9px; border-radius: 8px;
}
.flashcard .ftype.acr { background: rgba(53,213,230,.14); color: var(--cyan); }
.flashcard .ftype.trm { background: rgba(167,139,250,.16); color: var(--grc); }
.flashcard .fobj { position: absolute; top: 16px; left: 16px; font-family: var(--f-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .04em; }
.flashcard .fhintnote { position: absolute; bottom: 16px; left: 0; right: 0; font-size: 12px; color: var(--ink-faint); font-family: var(--f-mono); }

/* grade + nav row */
.flashgrade { display: flex; gap: 12px; margin-top: 18px; }
.btn.wide { flex: 1; justify-content: center; padding: 13px; }
.gradebtn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 10px; padding: 12px 8px; cursor: pointer; font-family: var(--f-ui);
  transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.gradebtn b { font-family: var(--f-hud); font-size: 15px; letter-spacing: .02em; }
.gradebtn span { font-family: var(--f-mono); font-size: 11px; color: var(--ink-faint); }
.gradebtn:hover { transform: translateY(-2px); }
.gradebtn.miss:hover { border-color: var(--crit); box-shadow: 0 8px 20px -12px var(--crit); }
.gradebtn.miss b { color: var(--crit); }
.gradebtn.almost:hover { border-color: var(--amber); box-shadow: 0 8px 20px -12px var(--amber); }
.gradebtn.almost b { color: var(--amber); }
.gradebtn.got:hover { border-color: var(--low); box-shadow: 0 8px 20px -12px var(--low); }
.gradebtn.got b { color: var(--low); }

@media (max-width: 720px) {
  .flashcard .inner { min-height: 280px; }
  .flashcard .face { padding: 24px 18px; }
  .flashgrade { gap: 8px; }
  .gradebtn { padding: 11px 6px; }
}
@media (prefers-reduced-motion: reduce) { .flashcard .inner { transition: none; } }

/* Wider spacing between domain rows on the analytics page */
.dombars.spaced { gap: 24px; }
.dombars.spaced .dombar { padding-bottom: 4px; }

/* More breathing room between the page title and the start of the reading
   content (TOC box on the left + the first section on the right). Applies to
   every reader-style page: domain study material, Exam Mechanics, Career, etc. */
.reader { margin-top: 34px; }
@media (max-width: 720px) { .reader { margin-top: 24px; } }

/* A single blank line of separation between dashboard sections so the
   00/01/02… groups breathe without feeling spread out. Dashboard only. */
#cards .secthead { margin-top: 70px; }
#cards .secthead:first-child { margin-top: 36px; }
@media (max-width: 720px) { #cards .secthead { margin-top: 52px; } }

/* Section descriptions should wrap to the full container width (like the card
   grid) instead of being capped narrow and breaking onto extra lines. */
.sectsub { max-width: none; }

/* ============================================================================
   COLLAPSIBLE DASHBOARD SECTIONS (multi-open accordion)
   ========================================================================== */
.dashtools { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 30px 0 28px; }
.dashtools-label { font-family: var(--f-hud); font-size: 18px; letter-spacing: .03em; color: var(--ink); }
.dashtools-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.dashtools .dashbtn { font-size: 15px; padding: 10px 18px; }

.dpanel {
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; overflow: hidden;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow-1);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.dpanel.open { border-color: var(--line); }
.dpanel:hover { border-color: var(--cyan-dim); }
.dpanel.pinned:hover { border-color: var(--line); }

.dpanel-head {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: transparent; border: none; color: inherit; cursor: pointer;
  padding: 17px 20px; font-family: var(--f-ui);
}
.dpanel.pinned .dpanel-head { cursor: default; }
.dpanel-head:hover { background: rgba(53,213,230,.05); }
.dpanel.pinned .dpanel-head:hover { background: transparent; }
.dpanel-head .dnum { font-family: var(--f-hud); font-size: 14px; letter-spacing: .08em; color: var(--cyan); }
.dpanel-head .dtitle { font-family: var(--f-hud); font-size: 18px; letter-spacing: .02em; color: var(--ink); }
.dpanel-head .dsummary { margin-left: auto; font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; }
.dpanel-head .dchev { margin-left: 12px; font-family: var(--f-hud); font-size: 24px; line-height: 1; color: var(--ink-faint); transition: transform .25s ease, color .2s ease; }
.dpanel.open .dpanel-head .dchev { transform: rotate(90deg); color: var(--cyan); }
.dpanel-head .dpinned { margin-left: 12px; font-family: var(--f-hud); font-size: 10px; letter-spacing: .14em; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; }

/* Collapsed = fully hidden (display:none), so no first-line sliver can show.
   A subtle fade plays when a section is expanded. */
.dpanel-body { display: none; }
.dpanel.open .dpanel-body { display: block; animation: fade .25s ease; }
.dpanel-inner { overflow: hidden; }
.dpanel-pad { padding: 2px 20px 22px; }
.dpanel-pad .sectsub { margin-top: 0; }
.dpanel-pad .grid:first-child, .dpanel-pad .kpis { margin-top: 6px; }

@media (max-width: 720px) {
  .dpanel-head { padding: 15px 15px; gap: 10px; }
  .dpanel-head .dtitle { font-size: 16px; }
  .dpanel-head .dsummary { display: none; }   /* keep mobile headers tidy */
  .dpanel-pad { padding: 2px 14px 18px; }
}
@media (prefers-reduced-motion: reduce) { .dpanel-body { transition: none; } }

/* "you can collapse sections" tip between progress and section 01 */
.dashnote {
  display: flex; align-items: flex-start; gap: 10px; margin: 26px 2px 28px;
  padding: 12px 16px; border: 1px dashed var(--cyan-dim); border-radius: 10px;
  background: rgba(53,213,230,.05); color: var(--ink-dim); font-size: 14px; line-height: 1.5;
}
.dashnote .ico { font-size: 16px; line-height: 1.4; }
.dashnote b { color: var(--ink); }

/* Larger type in the "How to use this platform" onboarding box */
.howto h2 { font-size: 23px; }
.howto ol li { font-size: 17.5px; line-height: 1.6; margin: 10px 0; }
.isnot h4 { font-size: 15px; }
.isnot ul li { font-size: 16.5px; }


/* ============================================================================
   INDUSTRY CERTIFICATION EXPLORER
   ========================================================================== */
.cert-stats { display: flex; flex-wrap: wrap; gap: 30px; margin: 22px 0 26px; }
.cert-stat .cs-v { font-family: var(--f-hud); font-size: 32px; line-height: 1; color: var(--cyan); }
.cert-stat .cs-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 7px; }

.cert-controls {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin: 0 0 24px;
  padding: 18px; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow-1);
}
.cert-field { display: flex; flex-direction: column; gap: 7px; }
.cert-field.grow { flex: 1; min-width: 220px; }
.cert-flabel { font-family: var(--f-hud); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.cert-sel, .cert-search {
  background: #0a1119; color: var(--ink); border: 1px solid var(--line); border-radius: 7px;
  padding: 11px 13px; font-family: var(--f-ui); font-size: 14px; min-width: 200px;
}
.cert-field.grow .cert-search { width: 100%; min-width: 0; }
.cert-sel:focus, .cert-search:focus { border-color: var(--cyan); outline: none; }
.cert-resetwrap { display: flex; align-items: center; gap: 14px; padding-bottom: 2px; }
.cert-showing { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.cert-card {
  position: relative; text-align: left; cursor: pointer; color: inherit; font-family: var(--f-ui);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-top: 2px solid var(--cyan-dim); border-radius: 12px;
  padding: 18px 18px 16px; box-shadow: var(--shadow-1);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.cert-card:hover { transform: translateY(-4px); border-color: var(--cyan-dim); box-shadow: var(--shadow-2), var(--ring); }
.cert-card .cc-id { position: absolute; top: 13px; right: 15px; font-family: var(--f-mono); font-size: 12px; color: var(--ink-faint); }
.cc-vendor { font-family: var(--f-mono); font-size: 12px; color: var(--ink-faint); letter-spacing: .04em; }
.cc-name { font-family: var(--f-hud); font-size: 18px; margin: 5px 0 6px; line-height: 1.2; color: var(--ink); max-width: 90%; }
.cc-abbr { font-family: var(--f-mono); font-size: 14px; color: var(--cyan); margin-bottom: 11px; }
.cc-cost { font-family: var(--f-hud); font-size: 15px; color: var(--amber); margin-bottom: 13px; }
.cc-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-pill { font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; color: var(--ink-dim); border: 1px solid var(--line); border-radius: 5px; padding: 3px 7px; }

/* drill-down detail overlay */
.cert-modal { position: fixed; inset: 0; background: rgba(4,8,12,.8); z-index: 95; display: none; padding: 4vh 16px; overflow-y: auto; }
.cert-modal.show { display: block; animation: fade .25s ease; }
.cd-box-outer {
  max-width: 1000px; margin: 0 auto; overflow: hidden; border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--cyan-dim); box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.cd-head {
  display: flex; align-items: flex-start; gap: 14px; padding: 24px 26px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(180deg, var(--panel-2), rgba(15,24,34,.96));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cd-meta { flex: 1; min-width: 0; }
.cd-eyebrow { font-family: var(--f-hud); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.cd-head h2 { font-family: var(--f-hud); font-size: 28px; margin: 9px 0 4px; color: var(--ink); line-height: 1.05; }
.cd-abbr { font-family: var(--f-mono); font-size: 16px; color: var(--cyan); margin-bottom: 12px; }
.cd-close { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--cyan-dim); background: var(--elev); color: var(--ink); font-size: 17px; cursor: pointer; transition: border-color .15s, color .15s; }
.cd-close:hover { border-color: var(--cyan); color: var(--cyan); }
.cd-body { padding: 24px 26px 26px; }
.cd-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .cd-boxes { grid-template-columns: 1fr; } }
.cd-box { border: 1px solid var(--line); border-radius: 10px; padding: 15px 16px; background: var(--panel); }
.cd-blabel { font-family: var(--f-hud); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 7px; }
.cd-bval { font-family: var(--f-mono); font-size: 15px; color: var(--ink); line-height: 1.4; }
.cd-container { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-top: 14px; background: var(--panel); }
.cd-clabel { font-family: var(--f-hud); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 9px; }
.cd-cval { font-size: 15px; line-height: 1.68; color: var(--ink-dim); }
.cd-sect { font-family: var(--f-hud); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin: 28px 0 2px; }
.cd-study { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 620px) { .cd-study { grid-template-columns: 1fr; } }
.cd-studygroup { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--panel); }
.cd-list { margin: 9px 0 0; padding-left: 19px; color: var(--ink-dim); font-size: 14px; line-height: 1.6; }
.cd-list li { margin: 6px 0; }
.cd-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

[data-theme="light"] .cert-sel, [data-theme="light"] .cert-search { background: #f4f7fb; }
[data-theme="light"] .cd-head { background: linear-gradient(180deg, #ffffff, rgba(248,250,252,.96)); }

@media (max-width: 720px) {
  .cert-stats { gap: 20px; }
  .cd-head { padding: 18px 16px; } .cd-head h2 { font-size: 22px; }
  .cd-body { padding: 18px 16px 20px; }
}


/* ============================================================================
   TECHNICAL TAXONOMY MAPPING  (drag and drop classification)
   ========================================================================== */
.tax-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 22px; }
.tax-tab { font-family: var(--f-hud); font-size: 13px; letter-spacing: .02em; border: 1px solid var(--line); background: var(--elev); color: var(--ink-dim); padding: 9px 15px; border-radius: 8px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.tax-tab:hover { border-color: var(--cyan-dim); color: var(--ink); }
.tax-tab.on { background: linear-gradient(180deg, rgba(53,213,230,.14), var(--panel)); color: var(--ink); border-color: var(--cyan); }

.tax-banner { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-bottom: none; }
.tax-pill { font-family: var(--f-hud); font-size: 12px; letter-spacing: .1em; color: #04222a; background: var(--cyan); padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.tax-bannertext h3 { font-family: var(--f-hud); font-size: 20px; margin: 0; color: var(--ink); }
.tax-bannertext .tax-sub { color: var(--ink-dim); font-size: 14px; margin-top: 3px; }

.tax-instr { border: 1px solid var(--line); border-top: none; border-radius: 0 0 12px 12px; background: var(--panel); padding: 15px 18px; font-size: 14.5px; line-height: 1.6; color: var(--ink-dim); }
.tax-instr b { color: var(--ink); }

.tax-pool { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; min-height: 64px; margin-top: 20px; padding: 18px; border: 2px dashed var(--line); border-radius: 12px; background: rgba(53,213,230,.03); }
.tax-pool.over { border-color: var(--cyan); background: rgba(53,213,230,.07); }

.tax-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; }
.tax-zone { min-height: 112px; padding: 16px; border: 2px dashed var(--line); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, background .15s; }
.tax-zone.over { border-color: var(--cyan); background: rgba(53,213,230,.05); }
.tax-zonehead { display: flex; align-items: center; gap: 9px; pointer-events: none; }
.tax-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.tax-zonelabel { font-family: var(--f-hud); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }

.tax-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; cursor: grab; user-select: none;
  font-family: var(--f-ui); font-size: 14px; font-weight: 600; line-height: 1.3;
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--cyan-dim);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
.tax-chip:active { cursor: grabbing; }
.tax-chip .tax-text { white-space: normal; overflow-wrap: anywhere; }
.tax-chip:hover { border-color: var(--cyan); }
.tax-chip.dragging { opacity: .45; }
.tax-chip.sel { box-shadow: 0 0 0 2px var(--cyan); }
.tax-chip.placed { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.tax-chip.correct, .tax-chip.wrong { font-weight: 700; }
.tax-chip .tax-x { display: none; cursor: pointer; font-size: 13px; line-height: 1; opacity: .7; }
.tax-chip .tax-x:hover { opacity: 1; }
.tax-chip.placed .tax-x { display: inline; }

.tax-controls { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.tax-summary { display: none; margin-top: 20px; padding: 15px 18px; border-radius: 10px; font-size: 15px; line-height: 1.55; }
.tax-summary.show { display: block; animation: fade .25s ease; }
.tax-summary.ok { background: rgba(70,209,138,.1); border: 1px solid rgba(70,209,138,.4); color: var(--low); }
.tax-summary.bad { background: rgba(251,80,113,.08); border: 1px solid rgba(251,80,113,.35); color: var(--crit); }

@media (max-width: 720px) {
  .tax-zones { grid-template-columns: 1fr; }
  .tax-banner { flex-direction: column; align-items: flex-start; gap: 10px; }
}


/* ============================================================================
   HANDS-ON LABS  (card-flip catalog + full-screen interactive sandbox)
   ========================================================================== */
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 22px; }

/* ----- flip card ----- */
.lab-card { perspective: 1600px; min-height: 340px; }
.lab-card-inner { position: relative; width: 100%; height: 340px; transition: transform .6s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d; }
.lab-card.flipped .lab-card-inner { transform: rotateY(180deg); }
.lab-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid var(--line); border-top: 2px solid var(--cyan-dim); border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow-1);
  padding: 20px; display: flex; flex-direction: column;
}
.lab-front { }
.lab-eyebrow { font-family: var(--f-hud); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.lab-idtag { font-family: var(--f-mono); font-size: 13px; color: var(--cyan); margin-top: 6px; letter-spacing: .04em; }
.lab-title { font-family: var(--f-hud); font-size: 19px; line-height: 1.2; color: var(--ink); margin: 8px 0 10px; }
.lab-desc { font-size: 14px; line-height: 1.6; color: var(--ink-dim); flex: 1; overflow: hidden; }
.lab-front-foot { margin-top: 14px; }
.lab-flipbtn { width: 100%; }

.lab-back { transform: rotateY(180deg); border-top-color: var(--amber); }
.lab-back-title { font-family: var(--f-hud); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }
.lab-obj-scroll { flex: 1; overflow-y: auto; margin-bottom: 12px; }
.lab-obj { margin: 0; padding-left: 18px; color: var(--ink-dim); font-size: 13.5px; line-height: 1.55; }
.lab-obj li { margin: 7px 0; }
.lab-back-actions { display: flex; gap: 10px; }
.lab-back-actions .lab-launch { flex: 1; }

/* ----- full-screen sandbox ----- */
.lab-sandbox {
  position: fixed; inset: 0; z-index: 200; overflow-y: auto;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(53,213,230,.06), transparent), var(--bg);
  display: flex; flex-direction: column;
}
.lab-exitbar { display: flex; justify-content: center; padding: 14px 16px; position: sticky; z-index: 3; }
.lab-exitbar.top { top: 0; background: linear-gradient(180deg, var(--panel-2), rgba(15,24,34,.85)); border-bottom: 1px solid var(--cyan-dim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lab-exitbar.bottom { bottom: 0; background: linear-gradient(0deg, var(--panel-2), rgba(15,24,34,.85)); border-top: 1px solid var(--cyan-dim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lab-exit {
  font-family: var(--f-hud); font-size: 14px; letter-spacing: .06em; cursor: pointer;
  color: #04222a; background: var(--cyan); border: none; border-radius: 9px; padding: 11px 22px;
  box-shadow: 0 6px 22px rgba(53,213,230,.3); transition: transform .12s, box-shadow .12s;
}
.lab-exit:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(53,213,230,.45); }

.lab-sb-main { flex: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; max-width: 1500px; width: 100%; margin: 0 auto; padding: 26px 22px; }
@media (max-width: 920px) { .lab-sb-main { grid-template-columns: 1fr; } }

.lab-sb-left { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lab-sb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.lab-sb-eyebrow { font-family: var(--f-hud); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.lab-sb-title { font-family: var(--f-hud); font-size: 23px; color: var(--ink); margin: 7px 0 0; line-height: 1.15; }
.lab-sb-status { flex: none; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--low); border: 1px solid rgba(70,209,138,.4); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.lab-sb-label { font-family: var(--f-hud); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }

.lab-sb-obj { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.lab-task { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; color: var(--ink-dim); line-height: 1.45; }
.lab-task-box { flex: none; width: 17px; height: 17px; margin-top: 1px; border: 1.5px solid var(--line); border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--low); }
.lab-task.done .lab-task-box { border-color: var(--low); background: rgba(70,209,138,.14); }
.lab-task.done .lab-task-box::after { content: "✔"; }
.lab-task.done .lab-task-label { color: var(--ink); text-decoration: line-through; text-decoration-color: var(--ink-faint); }
.lab-complete-banner { display: none; margin-top: 4px; padding: 11px 14px; border-radius: 9px; font-family: var(--f-hud); font-size: 14px; letter-spacing: .04em; background: rgba(70,209,138,.12); border: 1px solid rgba(70,209,138,.45); color: var(--low); }
.lab-complete-banner.show { display: block; animation: fade .3s ease; }

.lab-sb-config { display: flex; flex-wrap: wrap; gap: 14px; }
.lab-field { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 220px; }
.lab-flabel { font-family: var(--f-hud); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.lab-select { background: #0a1119; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; padding: 11px 13px; font-family: var(--f-ui); font-size: 14px; }
.lab-select:focus { border-color: var(--cyan); outline: none; }

.lab-payload { width: 100%; box-sizing: border-box; min-height: 80px; resize: vertical; background: #0a1119; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 12px 13px; font-family: var(--f-mono); font-size: 13.5px; line-height: 1.5; margin-top: 9px; }
.lab-payload:focus { border-color: var(--cyan); outline: none; }
.lab-exec-row { margin-top: 12px; }

.lab-cmd { display: flex; align-items: center; gap: 10px; background: #0a1119; border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; }
.lab-cmd:focus-within { border-color: var(--cyan); }
.lab-prompt { font-family: var(--f-mono); font-size: 13.5px; color: var(--low); white-space: nowrap; }
.lab-cmd-input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--ink); font-family: var(--f-mono); font-size: 13.5px; }

/* ----- terminal log panel ----- */
.lab-termlog { border: 1px solid var(--cyan-dim); border-radius: 12px; overflow: hidden; background: #05080c; display: flex; flex-direction: column; min-height: 420px; max-height: 78vh; position: sticky; top: 78px; }
.lab-termlog-head { display: flex; align-items: center; gap: 11px; padding: 11px 15px; background: #0a1119; border-bottom: 1px solid var(--cyan-dim); font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .05em; color: var(--cyan); }
.lab-dots { display: inline-flex; gap: 5px; }
.lab-dots i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #2a3947; }
.lab-dots i:first-child { background: #ff5f57; } .lab-dots i:nth-child(2) { background: #febc2e; } .lab-dots i:last-child { background: #28c840; }
.lab-termlog-body { flex: 1; overflow-y: auto; padding: 14px 16px; font-family: var(--f-mono); font-size: 13px; line-height: 1.7; color: #7fe3b0; }
.lab-logline { white-space: pre-wrap; word-break: break-word; }
.lab-logline.ok { color: #58e08f; }
.lab-logline.warn { color: var(--amber); }

[data-theme="light"] .lab-select, [data-theme="light"] .lab-payload, [data-theme="light"] .lab-cmd { background: #f4f7fb; }
[data-theme="light"] .lab-termlog, [data-theme="light"] .lab-termlog-body { background: #061018; }

@media (max-width: 560px) {
  .lab-card-inner, .lab-card { min-height: 380px; } .lab-card-inner { height: 380px; }
  .lab-sb-main { padding: 18px 14px; }
}

/* ===== HANDS-ON LABS GROUPING ADDENDUM ===== */
.lab-sb-headright { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lab-reset { white-space: nowrap; }
.lab-doneflag { display: inline-block; margin-top: 10px; align-self: flex-start; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--low); border: 1px solid rgba(70,209,138,.4); border-radius: 999px; padding: 3px 10px; }
.lab-front.lab-isdone { border-top-color: var(--low); }

/* ===== READINESS SUMMARY ===== */
.rd-hero { border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-top: 10px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: var(--shadow-1); }
.rd-hero.good { border-color: rgba(70,209,138,.5); } .rd-hero.warn { border-color: rgba(247,201,72,.5); } .rd-hero.crit { border-color: rgba(251,80,113,.5); }
.rd-scorewrap { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.rd-score { font-family: var(--f-hud); font-size: 54px; line-height: 1; color: var(--ink); }
.rd-band { font-family: var(--f-hud); font-size: 18px; letter-spacing: .04em; }
.rd-hero.good .rd-band { color: var(--low); } .rd-hero.warn .rd-band { color: var(--amber); } .rd-hero.crit .rd-band { color: var(--crit); }
.rd-meter { height: 12px; border-radius: 999px; background: #0a1119; border: 1px solid var(--line); overflow: hidden; margin: 16px 0 10px; }
.rd-meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--low)); transition: width .5s ease; }
.rd-herosub { font-size: 13px; color: var(--ink-faint); }
.rd-outcome { border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; padding: 14px 18px; margin-top: 16px; background: var(--panel); }
.rd-outcome.good { border-left-color: var(--low); } .rd-outcome.warn { border-left-color: var(--amber); } .rd-outcome.crit { border-left-color: var(--crit); }
.rd-octitle { font-family: var(--f-hud); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; }
.rd-octext { font-size: 15px; line-height: 1.55; color: var(--ink); }
.rd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .rd-cols { grid-template-columns: 1fr; } }
.rd-col { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--panel); }
.rd-col h4 { margin: 0 0 8px; font-family: var(--f-hud); font-size: 13px; letter-spacing: .06em; color: var(--cyan); }
.rd-col ul { margin: 0; padding-left: 18px; color: var(--ink-dim); font-size: 14px; line-height: 1.7; }
.rd-recs { display: flex; flex-direction: column; gap: 10px; }
.rd-rec { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; background: var(--panel); }
.rd-recdot { color: var(--cyan); font-weight: 700; }
.rd-rectext { flex: 1; font-size: 14px; line-height: 1.55; color: var(--ink-dim); }
.rd-note { margin-top: 18px; font-size: 12.5px; color: var(--ink-faint); font-style: italic; }

/* ===== LAB EXIT BAR ADDENDUM ===== */
.lab-exitgroup { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
.lab-exit-reset { background: var(--elev); color: var(--ink); border: 1px solid var(--cyan-dim); box-shadow: none; }
.lab-exit-reset:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); box-shadow: none; }

/* ===== QUIZ RATIONALE DISTRACTOR BREAKDOWN ===== */
.rationale .qwhy { display: block; margin-top: 9px; font-family: var(--f-hud); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); }
.rationale .qd { display: block; margin-top: 5px; font-size: .95em; line-height: 1.5; color: var(--ink-dim); }
.rationale .qd b { color: var(--ink); }

/* ---------- Back-to-top FAB ---------- */
.totop-fab {
  position: fixed; bottom: 74px; left: 18px; z-index: 70;
  font-family: var(--f-hud); font-size: 13px; letter-spacing: .04em;
  background: var(--elev); color: var(--ink); border: 1px solid var(--cyan-dim);
  padding: 9px 15px; border-radius: 22px; cursor: pointer;
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s, border-color .2s, box-shadow .2s;
}
.totop-fab.show { opacity: 1; visibility: visible; transform: translateY(0); }
.totop-fab:hover { border-color: var(--cyan); box-shadow: 0 6px 26px -8px rgba(53,213,230,.5); }
