/* Colors, fonts and sizes come from theme.css (shared with the diagnostic). The nav bar is chrome.css. */
:root { font-family: var(--sans); font-size: var(--fs-body); line-height: 1.5; color: var(--ink); background: var(--bg); }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
kbd { font: 500 11.5px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--sheet); color: var(--muted); }


/* page: left-aligned content at one width, the same as the diagnostic's */
main { max-width: var(--page-w); margin: 0 auto; padding-block: 32px 96px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
/* panels: flat, thin border, no fill. A panel that holds the page title is no panel at all. */
.card { background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 28px; }
.card:has(> .form-head), .card:has(> .card-head) { border: 0; padding: 0; border-radius: 0; }
.card.center { padding: 40px 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
h1 .muted { font-size: 17px; font-weight: 400; letter-spacing: 0; }
h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.3; margin: 24px 0 10px; }
.card > h2:first-child, section.card > h2:first-child { margin-top: 0; }
h2 .muted.small, h2 .small { font-weight: 400; }
.form-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.keys { margin: 0; color: var(--muted); font-size: 12px; }
/* small uppercase tracked label above an item's name, as on the diagnostic ("READING AND WRITING") */
.kicker { display: block; font-size: var(--fs-kicker); font-weight: 500; text-transform: uppercase; letter-spacing: var(--kicker-track); color: var(--muted); line-height: 1.4; }
/* callout: a left rule, not a box */
.note { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; color: var(--muted); font-size: 14px; margin: 0 0 18px; }

/* forms */
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.block { margin-top: 14px; }
label.check { flex-direction: row; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); align-self: end; padding-bottom: 8px; }
input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; width: 100%;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.invalid { outline: 2px solid var(--bad) !important; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }

fieldset.sticky-row { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px 12px; margin: 0 0 14px; display: grid; grid-template-columns: 150px 1fr 190px 80px 90px; gap: 10px; }
fieldset legend { font-size: 11px; color: var(--muted); padding: 0 4px; text-transform: uppercase; letter-spacing: .04em; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px 12px; }
.grid .f-small { grid-column: span 1; }
.grid label { grid-column: span 2; }
.grid .f-small, .grid label.check { grid-column: span 1; }
.grid .f-skill { grid-column: span 3; }
.grid .f-domain { grid-column: span 2; }
.grid .f-error { grid-column: span 2; }
.grid .f-note { grid-column: span 3; }
.grid.missing { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.grid.missing p { grid-column: 1 / -1; margin: 0; }

button { font: inherit; font-weight: 600; font-size: 14px; border: 1px solid var(--field-line); background: var(--sheet); color: var(--ink); border-radius: 999px; padding: 8px 18px; cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.primary kbd { background: transparent; color: inherit; border-color: currentColor; opacity: .7; }
button.link { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 400; border-radius: 0; }
button.danger { color: var(--bad); }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.spacer { flex: 1; }
.danger-zone { text-align: right; margin-top: -8px; }

/* autocomplete */
.ac-wrap { position: relative; display: block; }
.ac { position: absolute; left: 0; right: 0; top: 100%; margin-top: 2px; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.12); overflow: hidden; }
.ac-item { padding: 6px 10px; font-size: 14px; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.ac-item.on { background: var(--accent); color: var(--accent-ink); }
.ac-hint { opacity: .65; font-size: 12px; white-space: nowrap; }

/* screenshot */
.drop { margin-top: 14px; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; color: var(--muted); font-size: 13px; }
.drop.over { border-color: var(--accent); background: var(--row-hover); }
.drop-preview img { max-height: 120px; max-width: 360px; border-radius: 4px; display: block; }
.drop.has-image .drop-hint { display: none; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--row-hover); }
tr.unreviewed td { background: color-mix(in srgb, var(--warn) 7%, transparent); }
.icons span { margin-left: 2px; }
.tag { font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 4px; border: 1px solid currentColor; }
.tag.rw { color: var(--rw); }
.tag.math { color: var(--math); }
.err-tag { font-size: 12px; padding: 1px 7px; border-radius: 10px; background: var(--row-hover); white-space: nowrap; }
.err-tag.e-content { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.err-tag.e-careless, .err-tag.e-misread { background: color-mix(in srgb, var(--warn) 22%, transparent); }
.err-tag.e-time { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.empty { padding: 12px 0; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select, .filters input[type=search] { width: auto; }
.filters input[type=search] { min-width: 240px; }
.filters label.check { padding: 0; align-self: center; }
.chip { font-size: 13px; padding: 3px 8px; border-radius: 12px; background: var(--row-hover); }

/* import */
.steps { margin: 0 0 14px; padding-left: 20px; line-height: 1.7; }
.sessions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.sessions label { width: 150px; }
.table-scroll { overflow-x: auto; }
table.preview td { padding: 3px 4px; }
table.preview input, table.preview select { padding: 4px 6px; font-size: 14px; }
table.preview .w-num { width: 58px; }
table.preview .w-ans { width: 90px; }
table.preview tr.st-right td, table.preview tr.st-dup td { opacity: .5; }
table.preview tr.st-ignore td { opacity: .3; text-decoration: line-through; }

/* review */
.review-facts { font-size: 15px; line-height: 1.7; margin: 0 0 14px; }

/* tutor */
.tutor-group h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.tutor-item { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.tutor-main { flex: 1; }
.tutor-main p { margin: 6px 0; }
.tutor-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: 14px; white-space: nowrap; }
img.shot { max-width: 100%; max-height: 360px; border: 1px solid var(--line); border-radius: 6px; margin-top: 6px; }

/* flash + toast */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: color-mix(in srgb, var(--math) 14%, var(--card)); border: 1px solid var(--line); }
.flash.error { background: color-mix(in srgb, var(--bad) 14%, var(--card)); }
.flash.warn { background: color-mix(in srgb, var(--warn) 14%, var(--card)); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: .18s; background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 8px; font-size: 14px; pointer-events: none; max-width: 80vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--bad); color: #fff; }

@media (max-width: 800px) {
  fieldset.sticky-row, .grid { grid-template-columns: 1fr 1fr; }
  .grid label, .grid .f-skill, .grid .f-note, .grid .f-domain, .grid .f-error { grid-column: span 2; }
}
@media print {
  .top, .no-print, .flash { display: none !important; }
  .card { border: 0; padding: 0; }
  body, :root { background: #fff; color: #000; }
}

/* library */
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs .sep { color: var(--muted); margin: 0 .35em; }
h1 .crumbs a:last-child { color: var(--ink); }
a.button { display: inline-block; text-decoration: none; border: 1px solid var(--field-line); border-radius: 999px; padding: 8px 18px; color: var(--ink); font-weight: 600; font-size: 14px; background: var(--sheet); }
a.button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.source-group h2 { display: flex; gap: 10px; align-items: baseline; }
.source-group h2 a:first-child { color: var(--ink); text-decoration: none; }
.set-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.set-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.set-card:hover { border-color: var(--accent); }
.meter { height: 6px; border-radius: 3px; background: var(--row-hover); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--math); }
tr.is-empty td { color: var(--muted); }
fieldset.template { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.dsat-counts { display: flex; gap: 12px; flex-wrap: wrap; padding-left: 24px; }
.dsat-counts label { width: 170px; }
.plain-count { flex-direction: row; align-items: center; gap: 8px; padding-left: 24px; font-size: 14px; color: var(--ink); }
.plain-count input { width: 80px; }

/* set grid */
.part h2 { display: flex; gap: 12px; align-items: baseline; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, 44px); gap: 6px; margin-bottom: 8px; }
.slot { position: relative; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 6px; text-decoration: none; font-variant-numeric: tabular-nums; font-size: 14px; user-select: none; }
.slot.empty { border: 1px dashed var(--line); color: var(--muted); }
.slot.filled { border: 1px solid var(--line); background: var(--row-hover); color: var(--ink); }
.slot.missed { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.slot i { position: absolute; top: -6px; right: -6px; font-style: normal; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; display: flex; align-items: center; justify-content: center; }
.slot:hover { border-color: var(--accent); }
.slot.sample { display: inline-flex; width: 30px; height: 24px; margin: 0 4px 0 10px; vertical-align: middle; font-size: 12px; }
.mark-controls { display: flex; gap: 10px; align-items: center; }
.mark-controls .mark-only, .legend .mark-hint { display: none; }
#grid-form.marking .mark-controls .mark-only, #grid-form.marking .legend .mark-hint { display: inline-flex; gap: 10px; align-items: center; }
#grid-form.marking .mark-controls > [data-mark-toggle] { display: none; }
#grid-form.marking .slot { cursor: crosshair; }
.slot.picked { background: var(--bad) !important; color: #fff !important; border-color: var(--bad); }
label.inline { flex-direction: row; align-items: center; gap: 6px; }
label.inline input { width: auto; }

/* question + practice */
.qtext { font-size: 16px; line-height: 1.55; }
details.method { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
details.method summary { cursor: pointer; font-weight: 600; }
.review-q { margin-bottom: 14px; }
.choices { font-size: 16px; line-height: 1.8; }
.slot-hint { margin: 12px 0 0; }
h3 { font-size: var(--fs-h3); font-weight: 600; margin: 16px 0 6px; }

/* bulk upload */
.bulk-drop { border: 2px dashed var(--line); border-radius: 10px; padding: 34px; text-align: center; cursor: pointer; line-height: 1.7; }
.bulk-drop.over, .bulk-drop:focus { border-color: var(--accent); background: var(--row-hover); outline: none; }
.bulk-table img.thumb { height: 54px; max-width: 120px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); display: block; }
.bulk-table td { vertical-align: middle; }
.ok { color: var(--math); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
.warn-text { color: var(--warn); }
.part-actions { font-weight: 400; margin-left: auto; }

/* tagging pass */
.tag-top { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.meter.wide { flex: 1; height: 8px; }
.tag-card { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.tag-shot img { width: 100%; max-height: calc(100vh - 190px); object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tag-fields { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 70px; }
.tag-fields h2 { margin: 0; font-size: 15px; }
input.big { font-size: 20px; padding: 10px 12px; }
@media (max-width: 800px) { .tag-card { grid-template-columns: 1fr; } }

/* library reference cards */
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.view-toggle a { padding: 4px 10px; border-radius: 6px; text-decoration: none; color: var(--muted); font-size: 13px; }
.view-toggle a.on { background: var(--row-hover); color: var(--ink); font-weight: 600; }
.ref-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.ref-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ref-card.was-missed { border-color: var(--bad); box-shadow: inset 3px 0 0 var(--bad); }
.ref-card header { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.ref-card img.shot { max-height: 420px; object-fit: contain; }
.ref-card details summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.missed-badge { color: var(--bad); font-weight: 700; font-size: 13px; white-space: nowrap; }

.m2-row { display: flex; gap: 14px; align-items: center; margin: -4px 0 10px; flex-wrap: wrap; }
.m2-row select { width: auto; padding: 3px 6px; font-size: 13px; }

/* PDFs */
.pdf-list td { vertical-align: middle; }
.pdf-list select { width: auto; max-width: 280px; }
.pdf-list form.inline { display: inline; }

/* session page */
.banner { display: block; padding: 12px 16px; margin-bottom: 16px; border-radius: 10px; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--warn) 18%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.banner:hover { border-color: var(--warn); }
.session-top { display: grid; grid-template-columns: 200px 1fr 160px; gap: 12px; align-items: start; }
.session-top .new-set, .new-set { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 90px; gap: 8px; margin-top: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 8px; }
.new-set[hidden], [data-new-source-name][hidden], [data-new-count][hidden] { display: none; }
.session-single { display: flex; gap: 12px; margin-top: 14px; }
.session-single label { width: 220px; }
.session-rows { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.session-row { display: grid; grid-template-columns: 200px 190px 1fr; grid-template-areas: "label ver wrong" "hint hint hint"; gap: 6px 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.session-row .row-label { grid-area: label; font-weight: 600; }
.session-row label.inline { grid-area: ver; }
.session-row .row-wrong { grid-area: wrong; flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.session-row .row-wrong input { font-size: 17px; font-family: var(--mono); }
.session-row .row-hint { grid-area: hint; font-size: 13px; line-height: 1.9; }
.chip.known { background: color-mix(in srgb, var(--math) 18%, transparent); }
.known { margin: 0 0 12px; }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; }
nav.tabs { display: flex; gap: 4px; margin: -6px 0 14px; border-bottom: 1px solid var(--line); }
nav.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
nav.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
@media (max-width: 800px) { .session-top, .session-row, .new-set { grid-template-columns: 1fr; grid-template-areas: none; } .session-row > * { grid-area: auto !important; } }

/* versions, locks, kinds */
.not-taken { font-size: 12px; font-weight: 600; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 1px 8px; }
.kind-tag { font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.m2-preview { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m2-preview button { text-align: left; padding: 6px; border-radius: 8px; border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.m2-preview button.on { border-color: var(--accent); }
.m2-preview img { width: 100%; max-height: 230px; object-fit: contain; object-position: top; display: block; margin-top: 4px; }
.locked-note { font-size: 13px; }

/* ---------- Stage 2: dashboard (colors validated: dataviz reference palette, light + dark) ---------- */
/* validated with the dataviz checker (light on #f6f7f5, dark on #121618): teal+orange passes;
   the six error types pass (violet replaces blue). Orange/aqua/yellow/magenta sit under 3:1 in light
   mode, which is why every chart has a table view. */
.viz-root {
  --surface-1: var(--bg); --text-secondary: var(--muted); --grid: var(--line); --tooltip-bg: var(--ink); --tooltip-ink: var(--bg);
  --series-1: #00897b; --series-2: #eb6834;
  --err-content: #6250d6; --err-careless: #eb6834; --err-misread: #1baf7a; --err-time: #eda100;
  --err-trap: #e87ba4; --err-guessed: #008300; --err-none: #c3c2b7;
}
@media (prefers-color-scheme: dark) {
  .viz-root {
    --series-1: #1fa595; --series-2: #d95926;
    --err-content: #9085e9; --err-careless: #d95926; --err-misread: #199e70; --err-time: #c98500;
    --err-trap: #d55181; --err-guessed: #0ca30c; --err-none: #5c5b56;
  }
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg a { padding: 6px 10px; text-decoration: none; color: var(--muted); font-size: 13px; border-right: 1px solid var(--line); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--row-hover); color: var(--ink); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--ink); }
a.tile:hover { border-color: var(--accent); }
.tile.warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); }
.tile-n { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-l { font-size: 13px; color: var(--muted); }
.verdicts { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); line-height: 1.6; }
.verdicts p { margin: 4px 0; }
.leaks td { vertical-align: middle; }
.mix { display: flex; gap: 2px; width: 180px; height: 10px; }
.mix span { border-radius: 2px; min-width: 4px; }
.mix-label { display: block; color: var(--muted); margin-top: 3px; }
.seg-content { background: var(--err-content); } .seg-careless { background: var(--err-careless); }
.seg-misread { background: var(--err-misread); } .seg-time { background: var(--err-time); }
.seg-trap { background: var(--err-trap); } .seg-guessed { background: var(--err-guessed); } .seg-none { background: var(--err-none); }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart-grid .card { margin-bottom: 0; }
.chart-grid + .card { margin-top: 18px; }
.chart-box { position: relative; height: 260px; }
.table-view { margin-top: 10px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--muted); }
@media (max-width: 800px) { .chart-grid { grid-template-columns: 1fr; } }

/* ---------- retry ---------- */
.retry-banner { background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.retry-q img.shot { max-height: calc(100vh - 330px); width: auto; max-width: 100%; }
.drill-q img.drill-img { display: block; max-height: calc(100vh - 300px); width: auto; max-width: 100%; margin: 4px 0 12px; }
.result-mark { font-size: 22px; font-weight: 700; margin: 0 0 10px; }
.result-mark.right { color: var(--math); } .result-mark.wrong { color: var(--bad); }
details.reveal { margin: 12px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; }
details.reveal summary { cursor: pointer; font-weight: 600; }
.steps-dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.steps-dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); }
.steps-dots i.done { background: var(--math); border-color: var(--math); }
.upcoming-day { margin: 10px 0 4px; font-weight: 600; font-size: 14px; }


/* ---------- drill ---------- */
.drill-skills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 12px 0; }
fieldset.pick { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
fieldset.pick legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
fieldset.pick label.check { padding: 2px 0; font-size: 14px; align-self: stretch; align-items: flex-start; text-align: left; }
fieldset.pick label.check input { margin-top: 3px; flex: none; }
fieldset.pick label.check .n-real { margin-left: auto; padding-left: 8px; white-space: nowrap; }
.drill-clock { font: 600 20px var(--mono); font-variant-numeric: tabular-nums; }
.drill-clock.over { color: var(--bad); }
.choices-list { font-size: 16px; line-height: 1.9; }
.acc { display: inline-block; width: 64px; height: 8px; border-radius: 4px; background: var(--row-hover); overflow: hidden; vertical-align: middle; }
.acc > span { display: block; height: 100%; width: var(--p); background: var(--math); }
td .acc { width: 100%; max-width: 260px; }
.w-num { width: 70px; }

/* ---------- form controls (themed; icons come from theme.css) ---------- */
[hidden] { display: none !important; }
label { font-size: 12px; font-weight: 400; color: var(--muted); gap: 5px; }
input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  font-weight: 500; background-color: var(--field); border: 1px solid var(--field-line); border-radius: 8px;
  transition: border-color .12s, box-shadow .12s;
}
input[type=text], input[type=number], input[type=date], input[type=search], select { height: var(--field-h); padding: 0 11px; }
textarea { padding: 8px 11px; font-weight: 400; }
input:hover, select:hover, textarea:hover { border-color: var(--field-hover); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; font-weight: 400; }
select:not([multiple]) {
  -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer;
  background-image: var(--chevron); background-repeat: no-repeat; background-position: right 12px center; background-size: 11px 8px;
}
select option, select optgroup { background: var(--card); color: var(--ink); }
input[type=date] { cursor: text; }
input[type=date]::-webkit-calendar-picker-indicator {
  background: var(--calendar) center / 16px 16px no-repeat; width: 16px; height: 16px; padding: 5px; margin-right: -5px;
  border-radius: 6px; cursor: pointer; opacity: 1;
}
input[type=date]::-webkit-calendar-picker-indicator:hover { background-color: var(--row-hover); }
input[type=date]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
.invalid, .invalid:focus { outline: none !important; border-color: var(--bad) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 25%, transparent) !important; }
/* compact controls inside tables and toolbars keep their smaller size */
.m2-row select, table.preview select, table.preview input, .pdf-list select { height: 30px; font-size: 13px; padding-left: 8px; }
.m2-row select, table.preview select, .pdf-list select { padding-right: 26px; background-position: right 9px center; }

button { transition: filter .12s, background-color .12s, border-color .12s; }
button:hover:not(:disabled):not(.primary):not(.link), a.button:not(.primary):hover { border-color: var(--field-hover); }
button.primary:hover:not(:disabled), a.button.primary:hover { filter: brightness(1.08); }
button:disabled, button:disabled:hover { cursor: not-allowed; opacity: .42; filter: none; }

/* ---------- polish: session page ---------- */
.fgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.fgrid .c2 { grid-column: span 2; } .fgrid .c3 { grid-column: span 3; } .fgrid .c4 { grid-column: span 4; }
.session-top { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.fgrid:has(.new-set:not([hidden])) .f-test { grid-column: span 9; }
.session-single { display: grid; margin-top: 14px; }
.session-single label { width: auto; }
.card-head { margin-bottom: 18px; }
.card-head h1 { font-size: 21px; letter-spacing: -0.01em; }
.card-head .hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.card-head .hint kbd { font-size: 11px; padding: 0 3px; }
.session-card { padding: 22px 24px 18px; }
.session-row { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 7fr); background: color-mix(in srgb, var(--row-hover) 40%, transparent); }
.session-card .actions { margin-top: 20px; }
.alt-links { margin: 16px -24px -18px; padding: 11px 24px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted);
  display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; border-radius: 0 0 10px 10px; background: color-mix(in srgb, var(--row-hover) 45%, transparent); }
.alt-links a { color: var(--muted); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--muted) 40%, transparent); text-underline-offset: 2px; }
.alt-links a:hover { color: var(--ink); text-decoration-color: currentColor; }
.empty-state { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center;
  min-height: 112px; padding: 20px; border: 1.5px dashed var(--field-line); border-radius: 10px; color: var(--muted); font-size: 13.5px; }
.empty-state strong { color: var(--ink); font-size: 14.5px; font-weight: 600; }
.session-rows .empty-state { margin: 0; }
.home-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 18px; }
.home-tiles .tile { background: var(--card); padding: 14px 16px; min-height: 92px; justify-content: space-between; }
.tile-n.tile-text { font-size: 16px; line-height: 1.3; padding-top: 4px; }
h2.card-title { margin: 0 0 10px; }
@media (max-width: 800px) {
  .fgrid .c2, .fgrid .c3, .fgrid .c4, .fgrid:has(.new-set:not([hidden])) .f-test { grid-column: 1 / -1; }
  .home-tiles { grid-template-columns: 1fr 1fr; }
}
button.primary:disabled, button.primary:disabled:hover { opacity: 1; background: var(--row-hover); border-color: var(--line); color: var(--muted); }
button.primary:disabled kbd { opacity: .6; }
.session-row .row-wrong input::placeholder { font: 400 14px -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }

/* ======================================================================================
   Editorial layer: the diagnostic's look applied to every app page.
   Flat panels, thin rules, teal accent, tracked uppercase labels, left-rule callouts.
   ====================================================================================== */

/* callouts: a rule on the left, never a filled box */
.flash, .banner { background: none; border: 0; border-left: 3px solid var(--good); border-radius: 0; padding: 4px 0 4px 14px; margin: 0 0 22px; color: var(--ink); }
.flash.error { background: none; border-left-color: var(--bad); }
.flash.warn { background: none; border-left-color: var(--mark); }
.banner { display: block; text-decoration: none; border-left-color: var(--mark); }
.banner:hover { border-color: var(--mark); }
.banner:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.retry-banner { background: none; border-left-color: var(--accent); }
.retry-banner:hover { border-color: var(--accent); }
.verdicts { border-top: 0; border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; margin-top: 22px; }
details.reveal { border: 0; border-left: 3px solid var(--accent); border-radius: 0; padding: 4px 0 4px 14px; margin: 16px 0; }
details.method { border-top: 0; border-left: 3px solid var(--line); padding: 2px 0 2px 14px; }

/* tables: quiet headers, thin rules */
th { font-size: var(--fs-kicker); font-weight: 500; text-transform: uppercase; letter-spacing: var(--kicker-track); color: var(--muted); padding: 8px; }
td { padding: 10px 8px; }
tr[data-href]:hover td { background: var(--chip); }
tr.unreviewed td { background: color-mix(in srgb, var(--mark) 8%, transparent); }

/* tags and chips */
.tag { border: 0; padding: 0; font-size: 11px; font-weight: 600; letter-spacing: var(--kicker-track); text-transform: uppercase; }
.chip, .err-tag { background: var(--chip); border-radius: 999px; }
.kind-tag, .not-taken { border-radius: 999px; }

/* stat tiles: the diagnostic's score boxes */
.tiles { gap: 12px; margin: 8px 0 4px; }
.tile, .home-tiles .tile { background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; gap: 4px; }
a.tile:hover { border-color: var(--accent); }
.tile.warn { border-color: color-mix(in srgb, var(--mark) 55%, var(--line)); }
.tile-n { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.tile-n.tile-text { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.tile-l { font-size: 13px; color: var(--muted); }

/* empty states: one bordered look everywhere */
.empty, .empty-state { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center;
  min-height: 104px; padding: 22px; border: 1.5px dashed var(--field-line); border-radius: var(--radius); color: var(--muted); font-size: 14px; margin: 0; }
.empty-state strong { color: var(--ink); font-size: 15px; font-weight: 600; }

/* segmented control + tabs: teal */
.seg { border-radius: 999px; border-color: var(--field-line); }
.seg a { padding: 6px 14px; border-right-color: var(--field-line); }
.seg a.on { background: var(--accent-soft); color: var(--accent); }
.view-toggle a { border-radius: 999px; }
.view-toggle a.on { background: var(--accent-soft); color: var(--accent); }

/* progress bars use the accent, like the diagnostic's domain bars */
.meter, .acc { background: var(--chip); }
.meter span, .acc > span { background: var(--accent); }
.steps-dots i.done { background: var(--accent); border-color: var(--accent); }

/* library */
.source-group { margin-bottom: 30px; }
.source-group h2 { font-size: var(--fs-kicker); font-weight: 500; text-transform: uppercase; letter-spacing: var(--kicker-track); color: var(--muted); margin: 0 0 10px; }
.source-group h2 a:first-child { color: var(--muted); }
.source-group h2 a.small { text-transform: none; letter-spacing: 0; font-size: 13px; }
.set-cards { gap: 12px; }
.set-card { border-radius: var(--radius-sm); padding: 14px; gap: 8px; }
.set-card:hover { border-color: var(--accent); }
.set-card strong { font-weight: 600; font-size: 15.5px; }
.ref-card { border-radius: var(--radius); padding: 14px 16px; }
fieldset.pick, fieldset.template, fieldset.sticky-row { border-radius: var(--radius-sm); }
fieldset.pick legend, fieldset legend { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: var(--kicker-track); }

/* question text reads like the test: serif, as on the diagnostic */
.qtext, .choices, .choices-list { font-family: var(--serif); font-size: 17px; line-height: 1.6; }

/* tutor */
.tutor-group h2 { border-bottom: 0; padding-bottom: 0; margin-top: 30px; }
.tutor-item { border-bottom: 1px solid var(--line); padding: 16px 0; }

/* session page inside the editorial layout */
.session-card { padding: 0; }
.session-row { background: none; border-color: var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.session-row .row-label { font-weight: 600; font-size: 15.5px; }
.session-row .row-label .kicker { font-weight: 500; font-size: 11px; margin-bottom: 1px; }
.alt-links { margin: 22px 0 0; padding: 14px 0 0; background: none; border-radius: 0; }
h2.card-title { margin: 0 0 12px; }
.home-tiles { margin: 0 0 28px; }
.card-head h1 { font-size: var(--fs-h1); }
.card-head .hint { margin-top: 6px; }
.tutor-ref .kicker { margin-bottom: 2px; }
/* "done" screens (All tagged, All confirmed, End of the list): text on the page, no box */
.card.center { border: 0; border-radius: 0; padding: 8px 0 0; }
.card.center h1 { margin-bottom: 8px; }
.card.center a.button { margin-right: 16px; }
/* keyboard focus on pill buttons: a ring just outside the pill */
button:focus-visible, a.button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a.button:focus:not(:focus-visible) { outline: none; }

/* stat tiles: quiet one-line label on top, the value below */
.tile, .home-tiles .tile { justify-content: flex-start; gap: 6px; min-height: 0; }
.tile-l { font-size: var(--fs-kicker); font-weight: 500; text-transform: uppercase; letter-spacing: var(--kicker-track); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-n { min-height: 38px; display: flex; align-items: flex-end; }
.tile-n.tile-text { font-size: 19px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: block; white-space: nowrap; padding-top: 8px; }

/* a panel's own border is enough: no dashed box inside a bordered panel */
.card:not(:has(> .form-head)):not(:has(> .card-head)) .empty-state,
.card:not(:has(> .form-head)):not(:has(> .card-head)) .empty {
  border: 0; min-height: 0; padding: 6px 0 2px; align-items: flex-start; text-align: left; }

/* ---------- coach ---------- */
.plan-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.task { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 16px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.task-n { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--field-line); display: grid; place-items: center;
  font-weight: 600; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.task:has(.primary) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.task:has(.primary) .task-n { border-color: var(--accent); color: var(--accent); }
.task-body h2 { margin: 2px 0 6px; font-size: 17px; }
.task-body p { margin: 0; color: var(--muted); font-size: 14px; max-width: 62ch; }
.task-act { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.task.done { opacity: .6; }
.task.done .task-n { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.task.done h2 { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.delta { font-size: 13px; font-weight: 600; letter-spacing: 0; margin-left: 8px; align-self: center; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.status-head { display: flex; align-items: center; gap: 8px; margin: 26px 0 6px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.s-needs-work { background: var(--bad); } .s-improving { background: var(--mark); } .s-solid { background: var(--good); }
.skill-table td { vertical-align: middle; }
@media (max-width: 720px) {
  .task { grid-template-columns: 30px minmax(0, 1fr); }
  .task-act { grid-column: 2; align-items: flex-start; text-align: left; }
}
form.inline { display: inline; }
button.link { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }

/* ---------- scores ---------- */
.fgrid .c1 { grid-column: span 1; }
.fgrid .f-score { grid-column: span 2; }
.score-total { display: flex; flex-direction: column; gap: 5px; }
.score-total [data-score-total] { height: var(--field-h); display: flex; align-items: center; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.score-table td { vertical-align: middle; }
.score-table .kicker { font-size: 11px; }
.coach-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 800px) { .coach-tiles { grid-template-columns: 1fr 1fr; } }
.score-total .kicker { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; line-height: 1.5; }
.viz-root .table-scroll { margin-top: 18px; }

/* ---------- session rows: optional minutes, for pacing ---------- */
.session-row { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 6fr) minmax(0, 1.3fr); grid-template-areas: "label ver wrong min" "hint hint hint hint"; }
.session-row .row-min { grid-area: min; flex-direction: row; align-items: center; gap: 8px; font-size: 13px; }
.session-row .row-min input { width: 100%; min-width: 52px; font-family: var(--mono); text-align: center; padding: 0 6px; }
.session-row .row-min input::placeholder { font-family: var(--mono); }

/* ---------- dashboard: pacing + traps ---------- */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split-2 > .card { margin-bottom: 28px; }
.pace-table td { vertical-align: middle; }
.trap-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.trap-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.card .note { margin: 14px 0 0; }
@media (max-width: 800px) { .split-2 { grid-template-columns: 1fr; } }

/* ---------- coach: goal ---------- */
.goal-bar { display: flex; gap: 28px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 4px 0 18px; }
.goal-count { display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.goal-days { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.goal-text { flex: 1; font-size: 14.5px; }
.goal-text p { margin: 0 0 8px; }
.goal-edit summary { cursor: pointer; color: var(--accent); font-size: 13.5px; }
.goal-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.goal-form label { width: 180px; }
@media (max-width: 720px) { .goal-bar { flex-direction: column; gap: 12px; } }
.export-table td { vertical-align: middle; }

/* ---------- drill: College Board question text + one-tap choices ---------- */
.drill-q { max-width: 860px; }
.drill-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.drill-head form { margin: 0; }
.qb-body { font-family: var(--serif); font-size: 17px; line-height: 1.6; color: var(--ink); }
.qb-body p { margin: 0 0 12px; }
.qb-body .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qb-body figure { margin: 0 0 16px; }
.qb-body svg { display: block; max-width: 100%; height: auto; margin: 0 auto; background: #fff; border-radius: var(--radius-sm); padding: 6px; }
.qb-body table { border-collapse: collapse; margin: 0 auto 16px; font-family: var(--sans); font-size: 14px; max-width: 100%; }
.qb-body caption { font-weight: 600; padding-bottom: 6px; }
.qb-body th, .qb-body td { border: 1px solid var(--line); padding: 5px 10px; text-align: center; }
.qb-body th { background: var(--row-hover); }
.qb-body blockquote { margin: 0 0 12px; padding-left: 14px; border-left: 3px solid var(--line); }
.qb-body ul { margin: 0 0 12px; padding-left: 22px; }
.qb-body .paired_passage { margin-bottom: 10px; }
.choice-list { display: grid; gap: 8px; margin: 16px 0 4px; }
.choice { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.45; cursor: pointer; }
.choice:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.choice:disabled { cursor: default; opacity: 1; color: var(--ink); }
.choice-l { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; }
.choice-t p { margin: 0; }
.choice.picked { border-color: var(--accent); }
.choice.is-right { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--card)); }
.choice.is-right .choice-l { background: var(--good); border-color: var(--good); color: #fff; }
.choice.is-wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--card)); }
.choice.is-wrong .choice-l { background: var(--bad); border-color: var(--bad); color: #fff; }
.verdict { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.verdict.right .result-mark { color: var(--good); }
.verdict.wrong .result-mark { color: var(--bad); }
.verdict .why { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.chip-btn { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--chip); color: var(--ink); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); }
@media (max-width: 600px) { .qb-body { font-size: 16px; } .choice { font-size: 15px; padding: 9px 11px; } }
.qb-choices { font-family: var(--serif); font-size: 16px; line-height: 1.5; padding-left: 26px; margin: 4px 0 14px; }
.qb-choices li { margin-bottom: 6px; }
.qb-choices p { margin: 0; }
.why-wrong { border-left: 3px solid var(--bad); padding: 4px 0 4px 14px; margin: 12px 0; }
.why-wrong .kicker { color: var(--bad); margin-bottom: 4px; }
.why-wrong p { margin: 0; font-size: 15px; line-height: 1.55; }
.qb-body math, .choice-t math, .qb-choices math { math-style: normal; font-size: 1.05em; }   /* full-size fractions, as on the test */
.qb-body img.math-img, .choice-t img.math-img { vertical-align: middle; max-width: 100%; }
/* Older released math questions draw equations as dark images on a transparent background: flip them in dark mode */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.math-img { filter: invert(1) hue-rotate(180deg); } }
:root[data-theme="dark"] img.math-img { filter: invert(1) hue-rotate(180deg); }

/* ---------- Desmos section ---------- */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 8px; }
.tech { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.tech-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tech h2 { margin: 0; font-size: 16px; }
.tech .tip { color: var(--muted); margin: 0; flex: 1; }
.tech button { align-self: flex-start; }
.desmos-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.desmos-split .drill-q { max-width: none; }
.desmos-calc { position: sticky; top: calc(var(--nav-h, 56px) + 10px); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.desmos-calc iframe { width: 100%; height: calc(100vh - var(--nav-h, 56px) - 70px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.tech-tip { margin: 0 0 12px; }
.tech-tip p { margin: 6px 0 0; }
@media (max-width: 900px) { .desmos-split { grid-template-columns: 1fr; } .desmos-calc { position: static; } .desmos-calc iframe { height: 460px; } }
main:has(.desmos-split) { max-width: min(1600px, calc(100vw - 32px)); padding-top: 16px; }   /* room for question + calculator */
.qb-body img.deck-fig { display: block; max-width: min(100%, 520px); height: auto; margin: 0 auto 12px; border-radius: var(--radius-sm); background: #fff; }

/* ---------- accounts ---------- */
.auth-main { max-width: 420px; padding-top: 10vh; }
.auth-card { display: flex; flex-direction: column; gap: 12px; }
.auth-card h1 { margin: 0; }
.auth-card button.primary { align-self: flex-start; }
.invite-link { display: flex; gap: 8px; }
.invite-link input { flex: 1; font-family: var(--mono); font-size: 13px; }
