:root {
  --bg: #0a0e14;
  --bg-elev: #0f1620;
  --panel: #121b27;
  --panel-2: #16212f;
  --border: #1e2b3a;
  --border-2: #26374a;
  --text: #e6edf3;
  --text-dim: #8b9bb0;
  --text-mute: #5a6b80;
  --accent: #4bd0c8;
  --accent-2: #3a9bd6;
  --green: #26d07c;
  --green-dim: #1a7f52;
  --red: #ff5c6c;
  --red-dim: #a83644;
  --yellow: #f0b429;
  --purple: #b57bff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --font: -apple-system, "SF Pro Display", "Inter", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, monospace;
}
/* accessibility */
body.cb { --green: #4c8bf5; --green-dim: #2c5aa8; --red: #f0a020; --red-dim: #a8701a; }
body { font-size: var(--base-font, 14px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 14px; line-height: 1.5; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
#app { display: grid; grid-template-columns: 232px 1fr; height: 100vh; height: 100dvh; }

/* ---------- sidebar ---------- */
#sidebar {
  background: linear-gradient(180deg, #0d141d, #0a0e14);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 0;
  -webkit-app-region: drag;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 46px 20px 18px; font-weight: 700; font-size: 16px; letter-spacing: .2px;
}
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-size: 16px;
  box-shadow: 0 0 16px rgba(75,208,200,.35);
}
.nav { padding: 8px; flex: 1; -webkit-app-region: no-drag; overflow-y: auto; min-height: 0; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); cursor: pointer; font-weight: 500;
  transition: all .12s ease; margin-bottom: 2px;
}
.nav-item .ic { width: 18px; text-align: center; opacity: .9; font-size: 15px; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(75,208,200,.16), rgba(75,208,200,.04));
  color: var(--text); box-shadow: inset 2px 0 0 var(--accent);
}
.side-foot { padding: 14px 18px; border-top: 1px solid var(--border);
  -webkit-app-region: no-drag; }
.streak { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 12.5px; }
.streak b { color: var(--yellow); }

/* ---------- main ---------- */
#main { overflow-y: auto; padding: 28px 34px 40px; -webkit-app-region: no-drag; }
.topbar { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.topbar h1 { font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
.topbar .sub { color: var(--text-mute); font-size: 13px; }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-mute); font-weight: 600; margin-bottom: 12px; }
.stat { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat.sm { font-size: 20px; }
.stat-label { color: var(--text-dim); font-size: 12.5px; margin-top: 3px; }
.pos { color: var(--green); } .neg { color: var(--red); } .mut { color: var(--text-mute); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border-2);
}
.chip.sm { font-size: 10.5px; padding: 1px 6px; white-space: nowrap; }
.chip.green { background: rgba(38,208,124,.12); color: var(--green); border-color: rgba(38,208,124,.3); }
.chip.red { background: rgba(255,92,108,.12); color: var(--red); border-color: rgba(255,92,108,.3); }
.chip.real { background: rgba(181,123,255,.14); color: var(--purple); border-color: rgba(181,123,255,.35); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border-2);
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all .12s ease; font-family: var(--font);
}
.btn:hover { background: #1d2b3b; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; color: #062028; }
.btn.green { background: linear-gradient(135deg, var(--green), var(--green-dim)); border: none; color: #04160d; }
.btn.red { background: linear-gradient(135deg, var(--red), var(--red-dim)); border: none; color: #fff; }
.btn.ghost { background: transparent; }
.btn.lg { padding: 14px 26px; font-size: 15px; }
.btn.block { width: 100%; }
.btn kbd { font-family: var(--mono); font-size: 11px; opacity: .7; background: rgba(0,0,0,.25);
  padding: 1px 5px; border-radius: 4px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ---------- drill cards ---------- */
.drill-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; cursor: pointer; transition: all .15s ease; position: relative; overflow: hidden;
}
.drill-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: 0 12px 34px rgba(0,0,0,.4); }
.drill-card .icon { font-size: 26px; margin-bottom: 12px; }
.drill-card h4 { font-size: 16px; margin-bottom: 5px; }
.drill-card p { color: var(--text-dim); font-size: 13px; }
.drill-card.soon { opacity: .55; cursor: default; }
.drill-card.soon:hover { transform: none; }
.drill-card .badge-soon { position: absolute; top: 14px; right: 14px; font-size: 10px;
  text-transform: uppercase; letter-spacing: .5px; color: var(--text-mute); }
.drill-card.featured { grid-column: span 2; background: linear-gradient(135deg, #14202e, #101824);
  border-color: rgba(75,208,200,.3); }

/* ---------- meters / gauges ---------- */
.meter { height: 8px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s ease; }
.meter.green > i { background: linear-gradient(90deg, var(--green), #7ef0b0); }
.meter.red > i { background: linear-gradient(90deg, var(--red), #ff9aa4); }
.meter.yellow > i { background: linear-gradient(90deg, var(--yellow), #ffd97a); }

/* ---------- chart panel ---------- */
.chart-wrap { position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: #0b1119; }
#chart { width: 100%; height: 420px; }
.chart-hud { position: absolute; top: 12px; left: 14px; display: flex; gap: 10px; z-index: 3; }
.hud-pill { background: rgba(10,16,24,.82); backdrop-filter: blur(6px); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 6px 12px; font-family: var(--mono); font-size: 13px; }
.hud-pill .k { color: var(--text-mute); font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; display: block; }
.hud-pill .v { font-weight: 700; font-size: 15px; }

/* ---------- drill layout ---------- */
.drill-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.drill-head .tk { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.drill-head .side { padding: 4px 11px; border-radius: 7px; font-weight: 700; font-size: 13px; }
.drill-head .side.long { background: rgba(38,208,124,.15); color: var(--green); }
.drill-head .side.short { background: rgba(255,92,108,.15); color: var(--red); }
.progress-dots { display: flex; gap: 6px; margin-left: auto; }
.progress-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.progress-dots i.done { background: var(--accent); }
.progress-dots i.cur { background: var(--text); box-shadow: 0 0 8px var(--accent); }
.actions { display: flex; gap: 12px; margin-top: 18px; }
.reveal { margin-top: 18px; padding: 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); }
.reveal.win { border-color: rgba(38,208,124,.4); }
.reveal.loss { border-color: rgba(255,92,108,.4); }
.reveal .verdict { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.reveal .lesson { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }
.big-r { font-family: var(--mono); font-weight: 800; font-size: 15px; }

/* headline card */
.headline-card { background: linear-gradient(135deg, #16212f, #101824);
  border: 1px solid var(--border-2); border-radius: var(--radius); padding: 26px; }
.headline-card .quote { font-size: 20px; font-weight: 600; line-height: 1.45; color: #fff; }
.headline-card .ctx { color: var(--text-mute); font-size: 13px; margin-top: 10px; }

.fade-in { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.empty { color: var(--text-mute); text-align: center; padding: 40px; }

/* markdown (report view) */
.md { max-width: 900px; }
.md-h1 { font-size: 26px; margin: 8px 0 14px; letter-spacing: -.5px; }
.md-h2 { font-size: 18px; margin: 24px 0 10px; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.md-h3 { font-size: 14px; margin: 18px 0 8px; color: var(--text); text-transform: uppercase; letter-spacing: .5px; }
.md p { color: var(--text-dim); margin: 8px 0; line-height: 1.65; }
.md ul { margin: 8px 0 8px 22px; color: var(--text-dim); }
.md li { margin: 4px 0; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.md code { font-family: var(--mono); background: var(--panel-2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.md-table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13px; }
.md-table th { text-align: left; padding: 8px 12px; background: var(--panel-2); color: var(--text-mute);
  font-size: 11px; text-transform: uppercase; border-bottom: 1px solid var(--border-2); }
.md-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); font-family: var(--mono); }
.md-table tr:hover td { background: rgba(75,208,200,.04); }
/* sliders (US-A4) */
input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 6px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: grab;
}
input[type="range"]::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.1); }

/* playbook */
.pb-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.pb-nav .btn { font-size: 12.5px; padding: 8px 14px; }
.md .tip { background: rgba(75,208,200,.08); border: 1px solid rgba(75,208,200,.25); border-radius: 8px;
  padding: 10px 14px; margin: 12px 0; color: var(--text); }
.md ul { line-height: 1.7; }
.md li b, .md p b { color: var(--text); }

/* 📖 lessons & figures */
.lesson { max-width: 940px; display: flex; flex-direction: column; gap: 14px; }
.fig h3 { margin-bottom: 10px; }
.fig-callouts { margin-top: 12px; display: grid; gap: 6px; font-size: 12.8px; color: var(--text-dim); line-height: 1.5; }
.fig-callouts b { font-size: 14px; margin-right: 4px; }

/* 🧠 coach drawer */
#coach-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 1000;
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border-2);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-size: 24px;
  cursor: pointer; box-shadow: 0 8px 24px rgba(75,208,200,.35); transition: transform .15s;
}
#coach-fab:hover { transform: scale(1.08); }
#coach-fab.active { filter: brightness(1.15); }
#coach-drawer {
  position: fixed; top: 0; right: -420px; width: 400px; height: 100vh; height: 100dvh; z-index: 999;
  background: var(--bg-elev); border-left: 1px solid var(--border-2);
  display: flex; flex-direction: column; transition: right .25s ease;
  box-shadow: -12px 0 40px rgba(0,0,0,.5);
}
#coach-drawer.open { right: 0; }
.coach-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
#coach-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.coach-msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.coach-msg.me { align-self: flex-end; background: linear-gradient(135deg, rgba(75,208,200,.18), rgba(58,155,214,.14)); border: 1px solid rgba(75,208,200,.3); }
.coach-msg.ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--border); }
.coach-msg.pulse::after { content: "▍"; animation: blink 1s infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.coach-inputrow { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }
#coach-in { flex: 1; padding: 11px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text); font-size: 13.5px; outline: none; }
#coach-in:focus { border-color: var(--accent); }

/* toasts */
#toast-root { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 1000; }
.toast { background: var(--panel); border: 1px solid var(--border-2); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.5); min-width: 240px; max-width: 360px;
  opacity: 0; transform: translateX(20px); transition: all .25s ease; font-size: 13.5px; }
.toast.show { opacity: 1; transform: none; }
.toast.win { border-left-color: var(--green); }
.toast.loss { border-left-color: var(--red); }
.toast.unlock { border-left-color: var(--yellow); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1c2836; border-radius: 8px; border: 2px solid var(--bg); }

/* ============================================================================
   RESPONSIVE (added in review R3)
   The layout was built for a fixed Electron window — a 232px sidebar plus
   multi-column grids — and had NO media queries at all. On the web that is
   unusable below ~900px: on a 390px phone the nav alone ate 60% of the screen.
   Desktop is unaffected: the Electron window is 1280x900, well above every
   breakpoint here.
   ============================================================================ */

/* --- tablets and small laptops: sidebar becomes a scrollable top strip --- */
@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 100vh; height: 100dvh; }
  #sidebar { display: flex; flex-direction: row; align-items: center; gap: 6px;
             border-right: none; border-bottom: 1px solid var(--border-2);
             overflow-x: auto; overflow-y: hidden; padding: 6px 8px; }
  #sidebar .brand { flex: 0 0 auto; margin: 0 8px 0 0; }
  #sidebar .side-foot { display: none; }          /* streak/belt/build stamp */
  .nav { display: flex; flex-direction: row; gap: 4px; padding: 0;
         overflow-x: auto; overflow-y: hidden; flex: 1 1 auto; min-height: 0; }
  .nav-item { flex: 0 0 auto; white-space: nowrap; padding: 7px 10px; font-size: 12.5px; }
  #main { padding: 16px 14px calc(40px + env(safe-area-inset-bottom, 0px)); }
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  /* wide content must scroll inside its own box, never the page */
  .tbl-wrap, .card { max-width: 100%; }
  table.tbl { display: block; overflow-x: auto; white-space: nowrap; }
}

/* --- phones --- */
@media (max-width: 620px) {
  #main { padding: 12px 10px calc(40px + env(safe-area-inset-bottom, 0px)); }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .topbar h1 { font-size: 20px; }
  .stat { font-size: 26px; }
  .stat.sm { font-size: 18px; }
  .drill-head { flex-wrap: wrap; gap: 6px; }
  .chart-wrap > div { min-height: 240px; }          /* charts stay usable */
  .actions { flex-wrap: wrap; }
  .actions .btn, .btn.lg { width: 100%; }           /* thumb-sized targets */
  .actions .btn.ghost, .actions .chip { width: auto; }
  .fig-callouts { font-size: 11.5px; }
  /* the diagram SVGs are viewBox-scaled, but their wrappers must allow scroll */
  .dg-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* !important is deliberate: auth.js sets position inline, and an inline
     style would otherwise keep the chip on top of the mobile nav strip.
     `bottom` clears the 52px coach button rather than sitting on it — at
     bottom:10px the chip overlapped the FAB by 52x16px and a tap aimed at the
     coach landed on "sign out". */
  #dojo-auth { top: auto !important; bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; right: 10px !important; }
  /* On a phone the chip is a floating 262px bar sitting on top of whatever is
     underneath it. Collapse it to the status dot plus the action; the address is
     already visible in Settings. */
  #dojo-auth .auth-who { display: none; }
  #dojo-auth .auth-chip { opacity: .92; }

  /* nothing floats over a full-bleed drawer */
  :root:has(#coach-drawer.open) #dojo-auth { display: none; }
  :root:has(#coach-drawer.open) #coach-fab { display: none; }

  /* The coach drawer is a fixed 400px, which does not fit a 375px phone: it
     rendered at left:-25 with its text input at left:-10, i.e. off the screen
     and impossible to type into. Full-bleed below this breakpoint; the slide-in
     transition still works because the closed offset matches the width. */
  #coach-drawer { width: 100vw; right: -100vw; }
  #coach-drawer.open { right: 0; }
}

/* --- respect reduced-motion (review R4) --- */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in * { animation: none !important; transition: none !important; }
}

/* --- chart zoom controls (bottom-right so they clear the HUD pills top-left) --- */
.zoom-ctl { position: absolute; right: 10px; bottom: 10px; z-index: 4;
            display: flex; gap: 4px; opacity: .45; transition: opacity .15s; }
.chart-wrap:hover .zoom-ctl, .zoom-ctl:focus-within, .zoom-ctl:hover { opacity: 1; }
.zoom-ctl button {
  width: 26px; height: 26px; line-height: 1; padding: 0;
  background: rgba(10,16,24,.88); backdrop-filter: blur(6px);
  border: 1px solid var(--border-2); border-radius: 6px;
  color: var(--text-dim); font-size: 14px; font-family: var(--mono); cursor: pointer;
}
.zoom-ctl button:hover { color: var(--text); border-color: var(--accent); }
/* touch targets need to be bigger than a mouse cursor's */
@media (max-width: 620px) {
  .zoom-ctl { opacity: 1; gap: 6px; }
  .zoom-ctl button { width: 34px; height: 34px; font-size: 16px; }
}

/* --- ADTA brand lockup in the sidebar --- */
.brand-txt { display: inline-flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 15px; letter-spacing: .5px; color: var(--text); }
.brand-txt i { font-style: normal; font-size: 9.5px; letter-spacing: .3px; color: var(--text-mute); white-space: nowrap; }
@media (max-width: 900px) { .brand-txt i { display: none; } }

/* ---------- history rows ---------- */
.hist-row {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 5px 0; border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--text);
}
.hist-row:last-child { border-bottom: 0; }
.hist-row .mut { color: var(--text-mute); }

/* ---------- flashcards ---------- */
.cd-card { min-height: 220px; display: flex; flex-direction: column; gap: 12px; }
.cd-meta { display: flex; gap: 10px; align-items: center; font-size: 11.5px; }
.cd-q { font-size: 19px; line-height: 1.5; color: var(--text); font-weight: 500; }
.cd-a { font-size: 17px; line-height: 1.55; color: var(--accent); font-weight: 600; }
.cd-blank { color: var(--yellow); letter-spacing: 1px; }
.cd-fill { color: var(--accent); }
.cd-opts { margin: 12px 0 0 20px; display: grid; gap: 6px; font-size: 14.5px; color: var(--text-dim); }
.cd-why { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
          font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
.cd-src { margin-top: 8px; font-size: 11px; color: var(--text-mute); font-family: var(--mono); }
.cd-actions { display: flex; gap: 10px; margin-top: 14px; }
.cd-actions .btn { flex: 1; flex-direction: column; gap: 2px; }
.cd-ivl { display: block; font-size: 11px; opacity: .75; font-family: var(--mono); }
.cd-forecast { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: 10px; }
.cd-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.cd-bar > div { width: 100%; background: linear-gradient(180deg, var(--accent), var(--accent-2));
                border-radius: 2px 2px 0 0; min-height: 1px; }
@media (max-width: 620px) {
  .cd-q { font-size: 17px; }
  /* The four grade buttons wrap to 2x2 and used to sit at the end of a long
     card, which on a phone put the bottom row underneath the browser's own
     toolbar — unreachable, and tapping near it hit the browser instead. Pin the
     bar to the bottom of the scroll container and pad it past the home
     indicator / toolbar with the safe-area inset. */
  .cd-actions {
    position: sticky; bottom: 0; z-index: 6;
    flex-wrap: wrap;
    margin: 14px -10px 0;
    padding: 10px 10px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(10,14,20,0) 0%, var(--bg) 26%, var(--bg) 100%);
  }
  .cd-actions .btn { flex: 1 1 calc(50% - 5px); min-height: 52px; }
  /* Nothing floats over the grade bar while a session is running: the coach
     button sat on top of "Hard" and the account chip on top of the card. */
  :root.studying #coach-fab,
  :root.studying #dojo-auth { display: none !important; }
}
.cd-table th, .cd-table td { padding: 9px 14px; }
.cd-table th:not(:first-child), .cd-table td:not(:first-child):not(:last-child) { text-align: right; }
.cd-table td:last-child { text-align: right; }
.cd-deckcell { white-space: normal; min-width: 300px; }
.cd-deckcell b { display: block; font-size: 13.5px; }
.cd-ic { display: inline-block; width: 22px; }
.cd-deckdesc { font-size: 11.5px; white-space: normal; max-width: 420px; margin-top: 2px; line-height: 1.45; }
@media (max-width: 900px) { .cd-deckdesc { display: none; } .cd-deckcell { min-width: 0; } }

/* ---------- shadow trading ---------- */
.stat.sm { font-size: 19px; }
#sh-feed > div { padding: 3px 0; border-bottom: 1px solid var(--border); }
#sh-feed > div:last-child { border-bottom: 0; }
@media (max-width: 620px) {
  #sh-feed { max-height: 140px; }
  .cd-actions, #sh-long, #sh-short { min-height: 48px; }
}
.sys-corr td, .sys-corr th { text-align: center; font-family: var(--mono); font-size: 12px; }
.sys-corr td:first-child, .sys-corr th:first-child { text-align: left; font-family: var(--font); }
