/* ───────── Tokens (styled after the Nodex site) ───────── */
@font-face { font-family: "Manrope"; src: url("Manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
:root {
  --bg: #15171c;
  --bg-grad: none;
  --surface: #1e2127;
  --surface-2: #23262d;
  --surface-3: #2c3038;
  --border: #2c3038;
  --border-strong: #3d424c;
  --text: #e6e8ec;
  --text-soft: #c4c8d0;
  --muted: #8a909a;
  --faint: #5d636e;
  --accent: #5a86c8;
  --accent-strong: #4772b3;
  --accent-soft: rgba(71, 114, 179, 0.16);
  --violet: #ffd23f;
  --good: #3ddc84;
  --good-soft: rgba(61, 220, 132, 0.12);
  --warn: #f2a93b;
  --warn-soft: rgba(242, 169, 59, 0.12);
  --bad: #ef5b5b;
  --bad-soft: rgba(239, 91, 91, 0.12);
  --unseen: #2c3038;
  --shadow: none;
  --radius: 0px;
  --radius-sm: 4px;
  --sans: "Manrope", system-ui, sans-serif;
  --serif: "Manrope", system-ui, sans-serif;
  --mono: "Manrope", system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f5f1;
  --bg-grad: none;
  --surface: #ffffff;
  --surface-2: #f7f7fa;
  --surface-3: #eef0f5;
  --border: #e2e4ea;
  --border-strong: #cdd1db;
  --text: #1a1d24;
  --text-soft: #353a46;
  --muted: #646d7d;
  --accent: #3a64a3;
  --accent-strong: #4772b3;
  --accent-soft: rgba(71, 114, 179, 0.1);
  --violet: #c99a00;
  --good: #158a57;
  --good-soft: rgba(21, 138, 87, 0.1);
  --warn: #a96a00;
  --warn-soft: rgba(169, 106, 0, 0.1);
  --bad: #cc3b52;
  --bad-soft: rgba(204, 59, 82, 0.09);
  --unseen: #d7dbe4;
  --shadow: none;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
kbd {
  font-family: var(--mono); font-size: 0.78em;
  background: var(--surface-3); border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 6px; color: var(--text-soft);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ───────── Top bar ───────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 10px clamp(16px, 3vw, 32px);
  background: var(--bg);
  
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; flex-shrink: 0; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 4px;
  background: var(--accent-strong);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: .01em; }
.brand-sub { font-size: 11.5px; color: var(--muted); }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--muted); padding: 7px 11px; border-radius: 4px; white-space: nowrap; font-size: 14px; font-weight: 500;
  text-decoration: none;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-3); }
.topbar-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; color: var(--text-soft); font-weight: 700;
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }

main { max-width: 1080px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 32px) 80px; outline: none; }
.loading { color: var(--muted); padding: 60px 0; text-align: center; }

/* ───────── Generic ───────── */
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 3.4vw, 34px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.lede { color: var(--text-soft); font-size: 17px; margin: 0 0 22px; max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 16px; border-radius: 4px; border: 1px solid var(--border-strong);
  background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text);
  text-decoration: none !important; transition: transform .06s ease, background .15s ease;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 13.5px; border-radius: 4px; }
.btn.big { padding: 14px 22px; font-size: 16.5px; border-radius: 4px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 2px; background: var(--surface-3); color: var(--text-soft);
  border: 1px solid var(--border);
}
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
hr.soft { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

/* Mastery bar */
.mbar { height: 6px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.mbar > span { display: block; height: 100%; border-radius: 2px; background: var(--accent); transition: width .4s ease; }
.mbar.good > span { background: var(--good); }
.mbar.warn > span { background: var(--warn); }
.mbar.bad > span { background: var(--bad); }

/* ───────── Home ───────── */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } }
.hero-main { padding: 26px; position: relative; overflow: hidden; }
.hero-main::after {
  content: ""; position: absolute; inset: auto -60px -80px auto; width: 260px; height: 260px; border-radius: 50%;
  background: none; pointer-events: none;
}
.countdown { font-size: 13px; font-weight: 600; color: var(--warn); letter-spacing: .02em; text-transform: uppercase; margin-bottom: 8px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 14px; }
.stat .num { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.stat .lbl { font-size: 12.5px; color: var(--muted); }
.ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring > div { width: 76px; height: 76px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 750; font-size: 20px; }
.mode-card { display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: border-color .15s, transform .1s; text-align: left; }
.mode-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.mode-card .mode-icon { font-size: 20px; width: 38px; height: 38px; border-radius: 4px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.mode-card h3 { margin: 4px 0 0; }
.mode-card p { margin: 0; color: var(--muted); font-size: 14px; }
.weak-list { display: flex; flex-direction: column; gap: 8px; }
.weak-item { display: grid; grid-template-columns: 1fr 120px auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
@media (max-width: 560px) { .weak-item { grid-template-columns: 1fr auto; } .weak-item .mbar { display: none; } }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { margin: 0; }

/* ───────── Session / question ───────── */
.session-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.progress { flex: 1; height: 8px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent-strong); border-radius: 0; transition: width .35s ease; }
.session-meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.qcard { padding: clamp(18px, 3vw, 30px); }
.qtype { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.qprompt { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.45; font-weight: 600; margin: 0 0 20px; }
.qprompt.statement { font-family: var(--serif); font-weight: 500; font-size: clamp(19px, 2.3vw, 22px); }
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; text-align: left;
  padding: 13px 15px; border-radius: 4px; border: 1.5px solid var(--border); background: var(--surface-2);
  cursor: pointer; transition: border-color .12s, background .12s; line-height: 1.45; font-size: 15.5px;
}
.opt:hover:not([disabled]) { border-color: var(--accent); background: var(--accent-soft); }
.opt .key {
  width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center; font-family: var(--mono);
  font-size: 13px; font-weight: 700; background: var(--surface-3); color: var(--muted); margin-top: 1px;
}
.opt[disabled] { cursor: default; }
.opt.correct { border-color: var(--good); background: var(--good-soft); }
.opt.correct .key { background: var(--good); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .key { background: var(--bad); color: #fff; }
.opt.dim { opacity: .55; }
.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf-row .opt { grid-template-columns: 30px 1fr; font-weight: 650; font-size: 17px; padding: 16px; }

/* Matching */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .match { grid-template-columns: 1fr; } }
.match-col { display: flex; flex-direction: column; gap: 8px; }
.match-col h4 { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.m-item {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; text-align: left;
  border: 1.5px solid var(--border); background: var(--surface-2); border-radius: 4px; padding: 10px 12px; cursor: pointer; font-size: 14.5px; line-height: 1.4;
}
.m-item:hover:not([disabled]) { border-color: var(--accent); }
.m-item .key { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.m-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.m-item .assigned { display: block; margin-top: 6px; font-size: 12.5px; color: var(--accent); font-weight: 650; }
.m-item.ok { border-color: var(--good); background: var(--good-soft); }
.m-item.no { border-color: var(--bad); background: var(--bad-soft); }
.m-item .fix { display: block; margin-top: 6px; font-size: 13px; color: var(--good); font-weight: 600; }
.m-item[disabled] { cursor: default; }

/* Explain */
textarea {
  width: 100%; min-height: 150px; resize: vertical; padding: 14px; border-radius: 4px; border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text); font: 15.5px/1.55 var(--serif);
}
textarea:focus { outline: none; border-color: var(--accent); }
.checklist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; font-size: 14.5px; }
.checklist input { margin-top: 3px; accent-color: var(--good); width: 16px; height: 16px; }
.rate-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 560px) { .rate-row { grid-template-columns: 1fr; } }
.rate-row .btn.bad-btn { border-color: var(--bad); color: var(--bad); }
.rate-row .btn.warn-btn { border-color: var(--warn); color: var(--warn); }
.rate-row .btn.good-btn { border-color: var(--good); color: var(--good); }

/* Feedback & lesson */
.feedback { margin-top: 18px; border-radius: 4px; padding: 16px 18px; border: 1px solid var(--border); background: var(--surface-2); }
.feedback.good { border-color: color-mix(in srgb, var(--good) 45%, transparent); background: var(--good-soft); }
.feedback.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-soft); }
.feedback .fb-title { font-weight: 750; font-size: 16px; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.feedback p { margin: 6px 0; }
.source { font-size: 13px; color: var(--muted); margin-top: 8px; }
.source::before { content: "Source · "; font-weight: 650; }
.lesson { margin-top: 16px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--surface); overflow: hidden; }
.lesson-head { padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lesson-head .eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 750; }
.lesson-head h3 { margin: 0; font-size: 18px; width: 100%; }
.lesson-body { padding: 16px 18px 6px; }
.lblock { margin-bottom: 16px; }
.lblock h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.lblock .prose { font-family: var(--serif); font-size: 16.5px; line-height: 1.65; color: var(--text); }
.lblock .prose p { margin: 0 0 10px; }
.tempting { border-left: 3px solid var(--warn); padding: 10px 14px; background: var(--warn-soft); border-radius: 0; }
.tempting .yours { font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.example { border-left: 3px solid var(--violet); padding: 10px 14px; background: color-mix(in srgb, var(--violet) 10%, transparent); border-radius: 0; font-family: var(--serif); font-size: 16px; }
.confusions { display: flex; flex-direction: column; gap: 8px; }
.confusion { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 10px 12px; font-size: 14.5px; }
.confusion strong { color: var(--warn); }
.conn-list { display: flex; flex-wrap: wrap; gap: 8px; }
.conn { cursor: pointer; }
.retest-note { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 14px; color: var(--text-soft); }
.continue-bar { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; align-items: center; }
.continue-bar .hint { color: var(--muted); font-size: 13px; margin-right: auto; }

/* Rapid */
.timer { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; margin: -6px 0 16px; }
.timer > span { display: block; height: 100%; background: var(--warn); width: 100%; }
.rapid-flash { margin-top: 14px; font-weight: 700; }

/* Summary */
.summary-score { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.summary-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.summary-row { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14.5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.good { background: var(--good); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); }

/* ───────── Mastery map ───────── */
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.map-legend span { display: inline-flex; gap: 6px; align-items: center; }
.swatch { width: 12px; height: 12px; border-radius: 4px; }
.map-group { margin-bottom: 28px; }
.map-group > h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.map-section { margin-bottom: 18px; }
.map-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.map-section-head h3 { margin: 0; font-size: 16px; }
.map-section-head .mbar { width: 120px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.tile {
  text-align: left; border-radius: 4px; padding: 10px 12px; border: 1px solid var(--border); cursor: pointer;
  background: var(--surface); display: flex; flex-direction: column; gap: 7px; min-height: 74px; font-size: 13.5px; line-height: 1.3;
  position: relative;
}
.tile:hover { border-color: var(--accent); }
.tile .t-title { font-weight: 650; }
.tile .t-meta { font-size: 12px; color: var(--muted); margin-top: auto; display: flex; justify-content: space-between; }
.tile.s-unseen { border-left: 4px solid var(--unseen); }
.tile.s-weak { border-left: 4px solid var(--bad); }
.tile.s-learning { border-left: 4px solid var(--warn); }
.tile.s-mastered { border-left: 4px solid var(--good); }
.tile.due::after { content: "due"; position: absolute; top: 8px; right: 9px; font-size: 10.5px; font-weight: 750; color: var(--warn); text-transform: uppercase; letter-spacing: .05em; }

/* ───────── Notes ───────── */
.notes-layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .notes-layout { grid-template-columns: 1fr; } .notes-nav { position: static !important; max-height: none !important; } }
.notes-nav { position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 4px; }
.notes-nav a { display: block; padding: 5px 10px; border-radius: 4px; color: var(--muted); font-size: 14px; text-decoration: none; }
.notes-nav a:hover { background: var(--surface-2); color: var(--text); }
.notes-nav .ng { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 10px 4px; font-weight: 700; }
.search { width: 100%; padding: 11px 14px; border-radius: 4px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 15px; margin-bottom: 16px; }
.search:focus { outline: none; border-color: var(--accent); }
.note-section h2 { margin: 26px 0 4px; }
.note-section > p { margin: 0 0 12px; color: var(--muted); }
.note { margin-bottom: 12px; padding: 0; overflow: hidden; }
.note > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; }
.note > summary::-webkit-details-marker { display: none; }
.note > summary h3 { margin: 0; font-size: 17px; }
.note > summary .sum { grid-column: 1 / -1; color: var(--text-soft); font-size: 14.5px; margin: 0; }
.note > summary .guide { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.note .mbar { width: 90px; }
.note[open] > summary { border-bottom: 1px solid var(--border); }
.note-body { padding: 16px 18px; }
.keyfacts { margin: 0; padding-left: 18px; font-size: 14.5px; }
.keyfacts li { margin: 3px 0; }
.note-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
mark { background: var(--warn-soft); color: inherit; border-radius: 4px; padding: 0 2px; }

/* ───────── Essays ───────── */
.essay-card { cursor: pointer; text-align: left; }
.essay-card:hover { border-color: var(--accent); }
.essay-card p { margin: 6px 0 10px; color: var(--text-soft); font-size: 14.5px; }
.outline { margin: 8px 0 0; padding-left: 20px; }
.outline li { margin: 6px 0; }
.model { font-family: var(--serif); font-size: 16.5px; line-height: 1.7; }

/* ───────── Drill picker ───────── */
.drill-row { display: grid; grid-template-columns: 1fr 140px auto; gap: 14px; align-items: center; }
@media (max-width: 560px) { .drill-row { grid-template-columns: 1fr auto; } .drill-row .mbar { display: none; } }

/* ───────── Overlay ───────── */
.overlay { position: fixed; inset: 0; background: rgba(5, 7, 12, 0.55); display: grid; place-items: center; z-index: 50; padding: 16px; backdrop-filter: blur(3px); }
.overlay[hidden] { display: none; }
.dialog { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; padding: 22px; max-width: 520px; width: 100%; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.kbd-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14.5px; align-items: center; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--border-strong); padding: 10px 16px; border-radius: 4px; box-shadow: var(--shadow); z-index: 60; font-size: 14px; }

@media (max-width: 640px) {
  .brand-sub { display: none; }
  .brand-text { display: none; }
  .topbar { gap: 10px; }
  .tf-row { grid-template-columns: 1fr; }
  main { padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* "I don't know" + option breakdown + plain English */
.opt.idk { border-style: dashed; color: var(--muted); }
.opt.idk:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.feedback.idk { background: var(--accent-soft); border-color: transparent; }
.feedback.idk .fb-title { color: var(--accent); }
.simple { padding: 12px 14px; border-radius: 4px; background: var(--accent-soft); font-size: 16px; line-height: 1.55; }
.breakdown { display: grid; gap: 8px; }
.bd { padding: 10px 12px; border-radius: 4px; border-left: 3px solid var(--bad); background: var(--bad-soft); }
.bd.ok { border-left-color: var(--good); background: var(--good-soft); }
.bd.picked { outline: 1px solid currentColor; outline-offset: -1px; }
.bd-opt { font-weight: 600; margin-bottom: 3px; }
.bd-why { font-size: 14px; }
.bd-more { margin-top: 10px; }
.bd-more summary { cursor: pointer; font-size: 14px; color: var(--accent); }
.bd-more .lblock { margin-top: 10px; }
.basic-btn { width: auto; padding: 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.basic-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
details.textbook { margin-top: 4px; }
details.textbook > summary { cursor: pointer; color: var(--accent); font-size: 14px; margin-bottom: 10px; }
.basic-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.basic-btn .tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .6; }
.basic-btn.on .tdot { background: #fff; opacity: 1; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }

/* ───────── Nodex look: flat panels, heavy headings, blue buttons ───────── */
h1, h2, h3, .fb-title, .brand-text strong { font-weight: 800; letter-spacing: 0; }
h1 { font-size: 34px; }
.lede, .sub { color: var(--muted); font-weight: 500; }
.prose, .lblock .prose, .model, .example, .simple, .bd-why, .confusion, .qprompt.statement { font-weight: 500; }
.qprompt { font-weight: 700; }
.btn.primary { font-weight: 800; }
.btn.primary:hover { filter: none; background: var(--accent); border-color: var(--accent); }
.btn:active { transform: none; }
.nav a { color: var(--muted); font-weight: 600; }
.nav a:hover { background: none; color: var(--text); }
.nav a.active { background: none; color: var(--text); }
.card:hover, .mode-card:hover { border-color: var(--border-strong); }
.brand-mark { border-radius: 4px; }
.chip.accent, .chip.good, .chip.warn, .chip.bad { border-color: currentColor; background: transparent; }
.opt, .m-item { background: var(--surface); }
.opt:hover:not(:disabled) { border-color: var(--muted); }
.basic-btn.on { background: var(--accent-strong); border-color: var(--accent-strong); }
.mode-icon { display: none !important; }

/* ───────── Study guide tab ───────── */
.gsec { margin-bottom: 14px; }
.gsec h2 { margin-bottom: 10px; }
.glist { list-style: none; margin: 0; padding: 0; }
.gitem { position: relative; border-top: 1px solid var(--border); cursor: help; outline: none; }
.gitem:first-child { border-top: 0; }
.gitem.sub .gline { padding-left: 30px; }
.gitem.sub .gline::before { content: "–"; position: absolute; left: 12px; color: var(--faint); }
.gline { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 8px; }
.gtext { flex: 1; font-weight: 600; }
.gitem.sub .gtext { font-weight: 500; color: var(--text-soft); }
.gitem:hover > .gline, .gitem:focus-within > .gline, .gitem.open > .gline { background: var(--surface-2); }
.gbars { display: flex; gap: 3px; flex-shrink: 0; }
.gbars .mbar { width: 36px; }
.gpop { display: none; margin: 0 8px 10px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--accent-strong); border-left-width: 3px; }
.gitem:hover > .gpop, .gitem:focus-within > .gpop { display: block; position: absolute; top: 100%; left: 0; right: 0; margin: 0 8px; z-index: 20; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.gitem.open > .gpop { display: block; position: static; margin: 0 8px 10px; pointer-events: auto; box-shadow: none; }
.gpop-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin-bottom: 6px; }
.gtip { font-weight: 500; line-height: 1.6; }
.gsimple { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-weight: 500; color: var(--text-soft); font-size: 14.5px; }
.gsimple .eyebrow { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 2px; }
.gactions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.gconcepts { display: flex; flex-wrap: wrap; gap: 6px; }
@media (hover: none) { .gitem:hover > .gpop { display: none; } .gitem.open > .gpop { display: block; } }
