/* financeninja — layout and components. Built on tokens.css only (no raw colours here). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 var(--fs-md)/1.5 var(--font-ui);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
::selection { background: var(--accent-soft-2); }
.num { font-variant-numeric: tabular-nums; }
svg.ico { width: 20px; height: 20px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 20px 14px; border-right: 1px solid var(--line); background: var(--page);
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--page);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: -.02em;
}
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.brand-sub { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-md);
  color: var(--ink-2); font-weight: 560; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  transition: background var(--t-fast) var(--ease), color var(--t-fast);
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 650; }
.nav-item .ico { width: 20px; height: 20px; flex: none; opacity: .85; }
.nav-item .count { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.nav-foot { margin-top: auto; padding: 12px 10px 0; font-size: var(--fs-xs); color: var(--muted); }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: var(--fs-sm); min-width: 0; }
.crumbs a { color: var(--muted); }
.crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.content { max-width: var(--content-w); margin: 0 auto; padding: 28px 28px 120px; }
.content.wide { max-width: 1080px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; max-width: 1120px; margin: 0 auto; padding: 28px 28px 120px; }
.rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 16px); align-self: start; }

.bottombar { display: none; }
.fab { display: none; }

/* ---------- type ---------- */
.eyebrow { font-size: var(--fs-xs); font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.h1 { font-size: var(--fs-3xl); line-height: 1.12; letter-spacing: -.025em; font-weight: 720; margin: 6px 0 8px; }
.h2 { font-size: var(--fs-xl); line-height: 1.25; letter-spacing: -.015em; font-weight: 680; margin: 0; }
.h3 { font-size: var(--fs-lg); line-height: 1.3; font-weight: 650; margin: 0; }
.lede { color: var(--ink-2); font-size: var(--fs-lg); margin: 0; }
.meta { color: var(--muted); font-size: var(--fs-sm); }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: var(--fs-sm); align-items: center; }
.meta-row .dot::before { content: "·"; margin-right: 14px; color: var(--faint); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, var(--shadow-1); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.btn.soft:hover { background: var(--accent-soft-2); }
.btn.lg { height: 52px; padding: 0 24px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn.xl { height: 60px; padding: 0 30px; font-size: 18px; border-radius: var(--r-lg); font-weight: 680; }
.btn.sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn.icon { width: 40px; padding: 0; }
.btn.block { width: 100%; }
.btn .ico { width: 18px; height: 18px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.kbd {
  font: 600 11px/1 var(--font-mono); padding: 3px 5px; border-radius: 5px; color: var(--muted);
  border: 1px solid var(--line-strong); background: var(--surface); min-width: 18px; text-align: center; display: inline-block;
}
.btn.primary .kbd { color: var(--on-accent); border-color: rgba(255,255,255,.35); background: transparent; }

/* ---------- cards and lists ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card.pad { padding: 20px 22px; }
.card.raised { box-shadow: var(--shadow-2); border-color: transparent; }
.card-title { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; margin-bottom: 12px; }
.card-title .h3 { font-size: var(--fs-md); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.tight { gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-top: 1px solid var(--line);
  color: var(--ink); cursor: pointer; transition: background var(--t-fast); text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%;
}
.list-item:first-child { border-top: 0; }
.list-item:hover { background: var(--surface-2); text-decoration: none; }
.list-item .title { font-weight: 620; }
.list-item .sub { color: var(--muted); font-size: var(--fs-sm); }
.list-item .chev { color: var(--faint); margin-left: auto; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 650; color: var(--ink-2); background: var(--surface-2); border: 1px solid transparent; white-space: nowrap;
}
.chip.outline { background: transparent; border-color: var(--line-strong); }
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip.good { background: var(--good-soft); color: var(--good-ink); }
.chip.bad { background: var(--bad-soft); color: var(--bad-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip.btnchip { cursor: pointer; height: 32px; padding: 0 12px; font-size: var(--fs-sm); border-color: var(--line-strong); background: var(--surface); }
.chip.btnchip:hover { background: var(--surface-2); }
.chip.btnchip[aria-pressed="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.topic-code { font: 700 11px/1 var(--font-ui); letter-spacing: .04em; color: var(--muted); }

/* progress */
.bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: inherit; transition: width var(--t-med) var(--ease); }
.bar.thin { height: 4px; }
.bar .marker { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 2px; opacity: .55; }

/* expand in place */
details.fold { border-top: 1px solid var(--line); }
details.fold:first-of-type { border-top: 0; }
details.fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 22px; user-select: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .h3 { font-size: var(--fs-md); }
details.fold > summary .caret { margin-left: auto; color: var(--faint); transition: transform var(--t-med) var(--ease); }
details.fold[open] > summary .caret { transform: rotate(90deg); }
details.fold > .fold-body { padding: 0 22px 20px; }
details.fold > summary:hover { background: var(--surface-2); }

/* ---------- Today ---------- */
.today-head { margin-bottom: 22px; }
.session-card { padding: 26px 26px 22px; position: relative; overflow: hidden; }
.session-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 16px; flex-wrap: wrap; }
.session-head .session-size { padding-top: 22px; }
.week { display: flex; gap: 6px; flex-wrap: wrap; }
.week .day { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 650; color: var(--muted); background: var(--surface-2); }
.week .day.done { background: var(--good-soft); color: var(--good-ink); }
.week .day.today { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.week .day.miss { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.session-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--m2));
}
.session-size { font-size: var(--fs-sm); color: var(--muted); font-weight: 560; }
.parts { list-style: none; margin: 18px 0 22px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.part { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; }
.part + .part { border-top: 1px dashed var(--line); }
.part-n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--fs-xs); font-weight: 700; background: var(--accent-soft); color: var(--accent-ink);
}
.part-kind { font-size: var(--fs-xs); font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.part-title { font-weight: 620; line-height: 1.35; }
.part-min { font-size: var(--fs-sm); color: var(--muted); }
.start-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.alt-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); align-items: center; }
.alt-row .meta { margin-right: 4px; }

.pace { display: flex; flex-direction: column; gap: 10px; }
.pace-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pace-line b { font-weight: 680; }
.pace-legend { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 14px 16px; }
.stat .label { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.stat .value { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.01em; margin-top: 2px; }
.stat .value small { font-size: var(--fs-sm); color: var(--muted); font-weight: 560; margin-left: 4px; }

/* syllabus map: 103 tiles, grouped by topic */
.map { display: flex; flex-direction: column; gap: 8px; }
.map-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; }
.map-tiles { display: flex; gap: 3px; flex-wrap: wrap; }
.tile { width: 16px; height: 16px; border-radius: 4px; background: var(--m0); border: 1px solid transparent; cursor: pointer; }
.tile[data-m="1"] { background: var(--m1); } .tile[data-m="2"] { background: var(--m2); }
.tile[data-m="3"] { background: var(--m3); } .tile[data-m="4"] { background: var(--m4); }
.tile.next { outline: 2px solid var(--accent); outline-offset: 1px; }
.map-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); align-items: center; }
.map-key span { display: inline-flex; gap: 6px; align-items: center; }
.map-key .tile { width: 12px; height: 12px; cursor: default; }

.pair-card { padding: 18px 20px; }
.pair-q { font-weight: 620; font-size: var(--fs-md); line-height: 1.45; }
.reveal { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.55; }

/* ---------- Lesson ---------- */
.lesson-head { margin-bottom: 20px; }
.lesson-steps { display: flex; gap: 6px; margin: 16px 0 0; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); padding: 6px 10px 6px 8px; border-radius: var(--r-pill); background: var(--surface-2); }
.step .tick { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.step.done { color: var(--good-ink); background: var(--good-soft); }
.step.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.prose { font-family: var(--font-read); font-size: var(--fs-read); line-height: var(--lh-read); color: var(--ink); max-width: var(--read-w); }
.prose p { margin: 0 0 1em; }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .35em 0; }
.prose h3 { font: 680 var(--fs-lg)/1.3 var(--font-ui); margin: 1.6em 0 .5em; letter-spacing: -.01em; }
.prose .katex { font-size: 1.04em; }
.prose figure { margin: 1.2em 0; }
.prose figure img { max-width: 100%; height: auto; display: block; }
.keypoints { list-style: none; padding: 0; margin: 0; counter-reset: kp; display: flex; flex-direction: column; gap: 12px; }
.keypoints li { counter-increment: kp; position: relative; padding-left: 38px; line-height: 1.55; min-height: 26px; }
.keypoints li::before { position: absolute; left: 0; top: 1px; content: counter(kp); font: 700 12px/26px var(--font-ui); text-align: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.tip { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--ink); line-height: 1.5; margin-top: 16px; }
.tip .ico { color: var(--warn-ink); width: 20px; height: 20px; margin-top: 1px; }
.crosslink { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.crosslink:hover { background: var(--accent-soft-2); text-decoration: none; }
.crosslink .sub { display: block; font-weight: 500; font-size: var(--fs-sm); opacity: .85; }

/* ---------- Question / session ---------- */
.session { min-height: 100vh; background: var(--page); }
.session-top {
  position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: auto minmax(0, 720px) auto; justify-content: center; align-items: center; gap: 16px;
  padding: 12px 24px; background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: blur(10px);
}
.session-top .bar { height: 5px; }
.session-where { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; text-align: right; white-space: nowrap; }
.session-body { max-width: 720px; margin: 0 auto; padding: 20px 24px 140px; }
.qcard { padding: 28px 30px; }
.q-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.vignette { font-family: var(--font-read); font-size: 16px; line-height: 1.6; color: var(--ink-2); padding: 14px 16px; border-left: 3px solid var(--line-strong); background: var(--surface-2); border-radius: 0 var(--r-md) var(--r-md) 0; margin-bottom: 16px; }
.stem { font-family: var(--font-read); font-size: 19px; line-height: 1.6; margin: 0 0 20px; }
.polarity { background: var(--warn-soft); color: var(--warn-ink); font-family: var(--font-ui); font-weight: 750; font-size: .86em; letter-spacing: .02em; padding: 1px 6px; border-radius: 5px; text-transform: uppercase; white-space: nowrap; }
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; text-align: left; width: 100%;
  padding: 14px 16px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  font-family: var(--font-read); font-size: 17px; line-height: 1.45; color: var(--ink);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.opt:hover { border-color: var(--line-strong); background: var(--surface-2); }
.opt:active { transform: scale(.995); }
.opt .letter { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 700 14px/1 var(--font-ui); background: var(--surface-2); color: var(--ink-2); }
.opt .state { font: 650 var(--fs-xs)/1 var(--font-ui); display: inline-flex; gap: 6px; align-items: center; }
.opt.chosen { border-color: var(--accent); background: var(--accent-soft); }
.opt.chosen .letter { background: var(--accent); color: var(--on-accent); }
.opt.correct { border-color: var(--good); background: var(--good-soft); }
.opt.correct .letter { background: var(--good); color: #fff; }
.opt.correct .state { color: var(--good-ink); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .letter { background: var(--bad); color: #fff; }
.opt.wrong .state { color: var(--bad-ink); }
.opt.dim { opacity: .55; }
.opt[disabled] { cursor: default; }
.confidence { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.verdict { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); margin-top: 20px; font-weight: 650; }
.verdict.good { background: var(--good-soft); color: var(--good-ink); }
.verdict.bad { background: var(--bad-soft); color: var(--bad-ink); }
.verdict .ico { width: 22px; height: 22px; flex: none; }
.explain { margin-top: 14px; }
.explain .prose { font-size: 17px; }
.why { margin-top: 18px; }
.why .meta { margin-bottom: 8px; display: block; }
.session-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.session-actions .inner { max-width: 720px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }

/* ---------- notes ---------- */
.note-sheet { position: fixed; right: 24px; bottom: 24px; width: 420px; max-width: calc(100vw - 32px); z-index: 50; padding: 16px; }
.note-area { width: 100%; min-height: 140px; resize: vertical; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); padding: 12px 14px; font: 400 16px/1.55 var(--font-read); }
.note-area:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.note-anchor { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.input {
  height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.error-text { color: var(--bad-ink); font-size: var(--fs-sm); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80; background: var(--ink); color: var(--page); padding: 11px 16px; border-radius: var(--r-md); font-weight: 600; font-size: var(--fs-sm); box-shadow: var(--shadow-3); }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty .h3 { color: var(--ink); margin-bottom: 6px; }

/* ---------- phone ---------- */
@media (max-width: 920px) {
  .two-col { grid-template-columns: 1fr; }
  .rail { position: static; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 16px; }
  .crumbs .mid { display: none; }
  .content, .two-col { padding: 18px 16px calc(var(--bottombar-h) + 96px); }
  .bottombar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--bottombar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line);
  }
  .bottombar button, .bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; }
  .bottombar .ico { width: 22px; height: 22px; }
  .bottombar [aria-current="page"] { color: var(--accent); }
  .fab {
    display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(var(--bottombar-h) + 16px + env(safe-area-inset-bottom)); z-index: 41;
    width: 52px; height: 52px; border-radius: 17px; border: 0; background: var(--ink); color: var(--page); box-shadow: var(--shadow-3);
  }
  .fab .ico { width: 22px; height: 22px; }
  .session-card { padding: 22px 18px 18px; }
  .session-head .session-size { padding-top: 0; }
  .session-top { grid-template-columns: auto 1fr auto; }
  .h1 { font-size: var(--fs-2xl); }
  .stat-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 12px; }
  .stat .value { font-size: var(--fs-lg); }
  .qcard { padding: 20px 18px; border-radius: var(--r-md); }
  .stem { font-size: 18px; }
  .opt { font-size: 16px; padding: 12px; grid-template-columns: 30px 1fr; }
  .opt .state { grid-column: 2; }
  .opt .letter { width: 30px; height: 30px; }
  .session-top { padding: 10px 14px; }
  .session-body { padding: 12px 12px 140px; }
  .session-actions { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .kbd { display: none; }
  .note-sheet { left: 8px; right: 8px; bottom: 8px; width: auto; }
  details.fold > summary { padding: 15px 16px; }
  details.fold > .fold-body { padding: 0 16px 18px; }
  .tile { width: 14px; height: 14px; }
  .map-row { grid-template-columns: 36px 1fr; }
}
