/* PauseAsk. A tool, not a brochure: quiet surfaces, one typeface, real content.
   Green = actions. Yellow = a pause / a question, nothing else. Green/red ticks = right/wrong. */
:root {
  --ink: #0e1525;
  --ink-2: #2a3345;
  --muted: #5d6578;
  --faint: #8c93a4;
  --bg: #fafbfd;
  --panel: #ffffff;
  --sunk: #f1f3f8;
  --line: #e3e7ef;
  --line-2: #cfd5e1;
  --brand: #2457f5;
  --brand-2: #1a46d8;
  --brand-soft: #eef3ff;
  --yellow: #ffc83d;
  --yellow-soft: #fff6db;
  --yellow-ink: #6b4a00;
  --good: #1b8a4c;
  --good-soft: #e6f5ec;
  --bad: #cf3a2c;
  --bad-soft: #fdeceb;
  --shadow: 0 1px 2px rgba(14, 21, 37, .05), 0 0.375rem 1.25rem -8px rgba(14, 21, 37, .14);
  --shadow-lg: 0 2px 0.375rem rgba(14, 21, 37, .06), 0 1.5rem 3.5rem -16px rgba(14, 21, 37, .3);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: clamp(16px, calc(0.55vw + 8.5px), 22px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 0.9375rem/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 0.1875rem; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 1.875rem; }
h2 { font-size: 1.1875rem; letter-spacing: -0.01em; }
h3 { font-size: 1rem; letter-spacing: -0.005em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 77.5rem; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 600px) { .wrap { padding: 0 1rem; } }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8125rem; }
.hidden, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: 0.875rem; }
.stack-sm > * + * { margin-top: 0.5rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.error { color: var(--bad); font-weight: 600; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: rgba(251, 251, 250, .9); backdrop-filter: blur(0.625rem); border-bottom: 1px solid var(--line); }
.bar .inner { display: flex; align-items: center; gap: 0.75rem; height: 3.75rem; }
.bar.plain { border-bottom-color: transparent; background: transparent; position: static; }
.logo { display: inline-flex; align-items: center; gap: 0.5625rem; color: var(--ink); font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.02em; text-decoration: none; flex: none; }
.mark { display: inline-block; width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Crect width='30' height='30' rx='8' fill='%232457F5'/%3E%3Cpath d='M8 9.5A2.5 2.5 0 0 1 10.5 7h9A2.5 2.5 0 0 1 22 9.5v7a2.5 2.5 0 0 1-2.5 2.5H14l-4 3.5V19h.5A2.5 2.5 0 0 1 8 16.5z' fill='%23fff'/%3E%3Crect x='12.5' y='10' width='2' height='6' rx='1' fill='%232457F5'/%3E%3Crect x='16' y='10' width='2' height='6' rx='1' fill='%232457F5'/%3E%3C/svg%3E") center / contain no-repeat; }
.bar .links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.bar .links a:not(.btn) { padding: 0.4375rem 0.625rem; border-radius: 0.5rem; color: var(--ink-2); font-weight: 600; font-size: 0.875rem; text-decoration: none; white-space: nowrap; }
.bar .links a:not(.btn):hover { background: var(--sunk); }
.divider { width: 1px; height: 1.5rem; background: var(--line); flex: none; }
footer.foot { padding: 1.75rem 0 2.25rem; color: var(--faint); font-size: 0.8125rem; }
footer.foot .inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1.125rem; align-items: center; }
footer.foot a { color: var(--muted); text-decoration: none; }
footer.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4375rem; min-height: 2.375rem; padding: 0.5rem 0.875rem; border: 1px solid var(--line-2); border-radius: 0.5625rem; background: var(--panel); color: var(--ink); font: 650 0.875rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--faint); background: #fcfdfc; }
.btn:focus-visible, .icon:focus-visible, .seg button:focus-visible, .choice:focus-visible, .tab:focus-visible, .tchip:focus-visible, .dot:focus-visible, .sample:focus-visible { outline: 0.1875rem solid rgba(36, 87, 245, .35); outline-offset: 2px; }
.btn-go { border-color: var(--brand); background: var(--brand); color: #fff; }
.btn-go:hover { border-color: var(--brand-2); background: var(--brand-2); }
.btn-ask { border-color: #f0b41c; background: var(--yellow); color: #2b1e00; }
.btn-ask:hover { border-color: #e9ab0e; background: #ffcd4d; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { border-color: transparent; background: var(--sunk); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.btn-lg { min-height: 3rem; padding: 0.75rem 1.25rem; font-size: 0.9688rem; border-radius: 0.6875rem; }
.btn-sm { min-height: 2rem; padding: 0.3125rem 0.625rem; font-size: 0.8438rem; border-radius: 0.5rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 1.0625rem; height: 1.0625rem; flex: none; }
.icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border: 0; border-radius: 0.5rem; background: none; color: var(--muted); cursor: pointer; flex: none; }
.icon:hover { background: var(--sunk); color: var(--ink); }
.icon.danger:hover { background: var(--bad-soft); color: var(--bad); }
.icon svg { width: 1.0625rem; height: 1.0625rem; }

/* ---------- fields ---------- */
label, .label { display: block; margin-bottom: 0.375rem; color: var(--ink-2); font-weight: 650; font-size: 0.8438rem; }
input[type="text"], input[type="url"], textarea, select { width: 100%; min-height: 2.5rem; padding: 0.5625rem 0.75rem; border: 1px solid var(--line-2); border-radius: 0.5625rem; background: var(--panel); color: var(--ink); font: inherit; font-size: 0.9375rem; transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 4.5rem; resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #a0a9a4; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 0.1875rem rgba(36, 87, 245, .16); }
input[type="checkbox"] { accent-color: var(--brand); width: 1.0625rem; height: 1.0625rem; }
.check { display: flex; gap: 0.625rem; align-items: flex-start; margin: 0; color: var(--ink); font-weight: 600; font-size: 0.9062rem; cursor: pointer; }
.check input { margin-top: 2px; flex: none; }
.check small { display: block; margin-top: 1px; color: var(--muted); font-weight: 400; font-size: 0.8125rem; line-height: 1.4; }
.field-row { display: flex; gap: 0.5rem; }
.field-row input { flex: 1; min-width: 0; }

/* ---------- bits ---------- */
.tchip { display: inline-flex; align-items: center; padding: 2px 0.5rem; border: 0; border-radius: 0.375rem; background: var(--yellow-soft); color: var(--yellow-ink); font: 750 0.7812rem/1.4 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
button.tchip { cursor: pointer; }
button.tchip:hover { background: #ffecb0; }
.tag { display: inline-flex; align-items: center; padding: 1px 0.5rem; border-radius: 0.375rem; background: var(--sunk); color: var(--muted); font-size: 0.7812rem; font-weight: 650; white-space: nowrap; }
.notice { display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.6875rem 0.875rem; border-radius: 0.625rem; background: var(--yellow-soft); color: #4d3600; font-size: 0.875rem; }
.notice.green { background: var(--brand-soft); color: #0e2a80; }
.notice.red { background: var(--bad-soft); color: var(--bad); }
.notice svg { width: 1.0625rem; height: 1.0625rem; flex: none; margin-top: 2px; }
.kbd { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3125rem; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 0.3125rem; background: var(--panel); color: var(--muted); font-size: 0.7188rem; font-weight: 750; }
.panel { border: 1px solid var(--line); border-radius: 0.875rem; background: var(--panel); }
.panel.pad { padding: 1.25rem; }

/* ---------- video ---------- */
.video { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 0.75rem; background: #0e1525; }
.video > div, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .cover { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; align-content: center; gap: 0.875rem; padding: 1.75rem; background: rgba(14, 21, 37, .92); color: #fff; text-align: center; }

/* ---------- segmented, tabs ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 0.1875rem; border-radius: 0.5625rem; background: var(--sunk); }
.seg button { padding: 0.3125rem 0.625rem; border: 0; border-radius: 0.4375rem; background: transparent; color: var(--muted); font: 650 0.8125rem var(--font); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tab { margin-bottom: -1px; padding: 0.625rem 0.75rem; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 650 0.9062rem var(--font); cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab.on { border-bottom-color: var(--ink); color: var(--ink); }
.tab .tag { margin-left: 0.25rem; }

/* ---------- dialogs, toasts, menus ---------- */
dialog { width: min(33.75rem, calc(100vw - 2rem)); max-height: calc(100vh - 2.5rem); padding: 0; border: 0; border-radius: 1rem; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(14, 21, 37, .45); }
dialog[open] { animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(0.375rem); } }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1.125rem 1.25rem 0; }
.dlg-body { padding: 0.875rem 1.25rem 1.25rem; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 60; display: flex; align-items: center; gap: 0.875rem; max-width: calc(100vw - 2rem); padding: 0.625rem 1rem; border-radius: 0.625rem; background: var(--ink); color: #fff; font-size: 0.875rem; font-weight: 550; box-shadow: var(--shadow-lg); transform: translateX(-50%); animation: toast .18s ease-out; }
.toast button { padding: 0; border: 0; background: none; color: var(--yellow); font: 700 0.875rem var(--font); cursor: pointer; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 0.5rem); } }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 0.25rem); z-index: 40; min-width: 13.125rem; padding: 0.3125rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--panel); box-shadow: var(--shadow-lg); }
.menu-list button, .menu-list a { display: flex; align-items: center; gap: 0.5625rem; width: 100%; padding: 0.5rem 0.625rem; border: 0; border-radius: 0.5rem; background: none; color: var(--ink); font: 550 0.875rem var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.menu-list button:hover, .menu-list a:hover { background: var(--sunk); }
.menu-list svg { width: 1rem; height: 1rem; color: var(--muted); }
.menu-list .danger, .menu-list .danger svg { color: var(--bad); }
.menu-list hr { margin: 0.3125rem 0; border: 0; border-top: 1px solid var(--line); }

/* ---------- share ---------- */
.linkbox { display: flex; align-items: center; gap: 0.5rem; padding: 0.3125rem 0.3125rem 0.3125rem 0.875rem; border: 1px solid #cbd8ff; border-radius: 0.6875rem; background: var(--brand-soft); }
.linkbox input { flex: 1; min-width: 0; min-height: 2.25rem; padding: 0; border: 0 !important; box-shadow: none !important; background: transparent; color: #0e2a80; font-weight: 700; font-size: 0.9688rem; }
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.ways .way { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.625rem; padding: 0.5rem; border: 1px solid var(--line-2); border-radius: 0.5625rem; background: var(--panel); color: var(--ink); font: 650 0.8438rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.ways .way:hover { border-color: var(--faint); }
.ways .way svg { width: 1.0625rem; height: 1.0625rem; color: var(--brand); flex: none; }
@media (max-width: 480px) { .ways { grid-template-columns: 1fr; } }
.qr { display: grid; place-items: center; padding: 0.75rem; border-radius: 0.75rem; background: var(--sunk); }
.qr svg { width: 12.5rem; height: 12.5rem; border-radius: 0.5rem; background: #fff; }
.keep { padding: 0.875rem; border-radius: 0.75rem; background: var(--sunk); }
.keep input { min-height: 2.125rem; font-size: 0.8438rem; }

/* ---------- start screen (the homepage) ---------- */
.start { max-width: 47.5rem; margin: 0 auto; padding: 9vh 0 2.5rem; }
.start h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.03em; }
.start .sub { margin: 0.625rem 0 1.625rem; color: var(--muted); font-size: 1.0312rem; max-width: 52ch; }
.paste { display: flex; gap: 0.5rem; padding: 0.375rem; border: 1px solid var(--line-2); border-radius: 0.875rem; background: var(--panel); box-shadow: var(--shadow); }
.paste:focus-within { border-color: var(--brand); box-shadow: 0 0 0 0.1875rem rgba(36, 87, 245, .16), var(--shadow); }
.paste input { flex: 1; min-width: 0; min-height: 2.875rem; border: 0 !important; box-shadow: none !important; background: transparent; font-size: 1.0312rem; }
@media (max-width: 520px) { .paste { flex-direction: column; } }
.samples-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2.5rem 0 0.75rem; }
.samples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.875rem; }
@media (max-width: 720px) { .samples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sample { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sample .th { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0.625rem; background: #0e1525; }
.sample .th img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.sample:hover .th img { transform: scale(1.04); }
.sample b { display: block; margin-top: 0.5rem; font-size: 0.875rem; font-weight: 650; line-height: 1.3; }
.sample span { display: block; color: var(--muted); font-size: 0.8125rem; }
.draft { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.125rem; padding: 0.625rem 0.75rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--panel); }
.draft img { width: 4rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.375rem; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 3rem; padding-top: 1.375rem; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .how { grid-template-columns: 1fr; gap: 0.75rem; } }
.how p { color: var(--muted); font-size: 0.875rem; }
.how b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 0.9062rem; }

/* ---------- editor ---------- */
.title-field { flex: 1; min-width: 0; max-width: 27.5rem; min-height: 2.25rem !important; padding: 0.375rem 0.625rem !important; border-color: transparent !important; background: transparent !important; font-weight: 700 !important; font-size: 1rem !important; }
.title-field:hover { background: var(--sunk) !important; }
.title-field:focus { border-color: var(--brand) !important; background: var(--panel) !important; }
.state { color: var(--faint); font-size: 0.8125rem; white-space: nowrap; }
@media (max-width: 700px) { .state, .hide-sm { display: none !important; } }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 25rem; gap: 1.25rem; align-items: start; padding: 1.25rem 0 3rem; }
@media (max-width: 1040px) { .editor { grid-template-columns: 1fr; } }
.side { position: sticky; top: 5rem; display: flex; flex-direction: column; max-height: calc(100vh - 6rem); }
@media (max-width: 1040px) { .side { position: static; max-height: none; } }
.side .list { flex: 1; min-height: 0; overflow: auto; padding: 2px; margin: 0 -2px; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.625rem; }
.timeline { position: relative; height: 2.125rem; margin: 0.625rem 0.25rem 0; cursor: pointer; user-select: none; touch-action: none; }
.timeline .track { position: absolute; left: 0; right: 0; top: 0.9375rem; height: 0.25rem; border-radius: 0.25rem; background: var(--line-2); }
.timeline .played { position: absolute; left: 0; top: 0.9375rem; width: 0; height: 0.25rem; border-radius: 0.25rem; background: var(--brand); }
.timeline .head { position: absolute; top: 0.5625rem; width: 2px; height: 1rem; margin-left: -1px; border-radius: 2px; background: var(--brand); }
.timeline .trim { position: absolute; top: 0.9375rem; height: 0.25rem; background: repeating-linear-gradient(90deg, #aab4ae 0 0.1875rem, transparent 0.1875rem 0.375rem); }
.dot { position: absolute; top: 0.4375rem; width: 1.25rem; height: 1.25rem; margin-left: -10px; padding: 0; border: 0.1875rem solid var(--bg); border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1px rgba(107, 75, 0, .3); cursor: pointer; transition: transform .1s; }
.dot:hover, .dot.on { transform: scale(1.2); box-shadow: 0 0 0 2px var(--yellow-ink); }
.dot.note { border-width: 0.3125rem; border-color: var(--yellow); background: var(--bg); }
.addrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.addrow .hint { color: var(--muted); font-size: 0.8438rem; }
.qcard { margin-bottom: 0.5rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--panel); }
.qcard.open { border-color: #f0c44a; box-shadow: 0 0 0 1px #f0c44a, var(--shadow); }
.qhead { display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.6875rem 0.5rem 0.6875rem 0.75rem; cursor: pointer; }
.qhead .qt { flex: 1; min-width: 0; font-weight: 650; font-size: 0.9062rem; line-height: 1.35; }
.qhead .qt small { display: block; margin-top: 2px; color: var(--muted); font-weight: 500; font-size: 0.7812rem; }
.qbody { padding: 0 0.75rem 0.75rem; }
.qbody .stack > * + * { margin-top: 0.75rem; }
.opt { display: flex; align-items: center; gap: 0.375rem; margin-bottom: 0.375rem; }
.opt .k { display: grid; place-items: center; flex: none; width: 1.5rem; color: var(--faint); font-weight: 750; font-size: 0.8125rem; }
.opt input[type="text"] { min-height: 2.25rem; padding: 0.4375rem 0.625rem; font-size: 0.9062rem; }
.right-btn { display: inline-flex; flex: none; align-items: center; gap: 0.25rem; min-height: 2.25rem; padding: 0 0.5625rem; border: 1px solid var(--line-2); border-radius: 0.5rem; background: var(--panel); color: var(--muted); font: 650 0.7812rem var(--font); cursor: pointer; white-space: nowrap; }
.right-btn:hover { border-color: var(--good); color: var(--good); }
.right-btn.on { border-color: var(--good); background: var(--good); color: #fff; }
.right-btn svg { width: 0.8125rem; height: 0.8125rem; stroke-width: 3; }
.nudge { display: inline-flex; align-items: center; gap: 1px; padding: 2px; border-radius: 0.5rem; background: var(--sunk); }
.nudge button { min-width: 1.875rem; height: 1.75rem; border: 0; border-radius: 0.375rem; background: transparent; color: var(--ink-2); font: 700 0.7812rem var(--font); cursor: pointer; }
.nudge button:hover { background: var(--panel); }
.nudge .tchip { margin: 0 0.25rem; font-size: 0.8125rem; }
.empty { padding: 1.375rem 1.125rem; border: 1px dashed var(--line-2); border-radius: 0.75rem; color: var(--muted); font-size: 0.875rem; text-align: center; }
.empty b { display: block; margin-bottom: 0.25rem; color: var(--ink); font-size: 0.9375rem; }
details.settings { margin-top: 0.625rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--panel); }
details.settings summary { display: flex; align-items: center; justify-content: space-between; padding: 0.6875rem 0.75rem; cursor: pointer; list-style: none; font-weight: 650; font-size: 0.875rem; }
details.settings summary::-webkit-details-marker { display: none; }
details.settings summary::after { content: ""; width: 0.4375rem; height: 0.4375rem; margin-right: 0.25rem; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); transition: transform .15s; }
details.settings[open] summary::after { transform: rotate(-135deg); }
details.settings .inner { padding: 2px 0.75rem 0.875rem; }
.time-input { width: 5.25rem !important; min-height: 2.125rem !important; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- student page ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 22.5rem; gap: 1.25rem; align-items: start; padding: 1.25rem 0 2.5rem; }
@media (max-width: 1000px) { .watch { grid-template-columns: 1fr; gap: 0.875rem; } }
.rail { position: sticky; top: 5rem; }
@media (max-width: 1000px) { .rail { position: static; } }
.ask { padding: 1.125rem; border-radius: 0.875rem; background: var(--panel); box-shadow: 0 0 0 2px var(--yellow), var(--shadow); animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(0.375rem); } }
.ask-top { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; margin-bottom: 0.625rem; color: var(--muted); font-size: 0.8438rem; font-weight: 650; }
.q-text { margin: 0 0 0.875rem; font-size: 1.125rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; white-space: pre-wrap; }
.waiting { padding: 1.125rem; border: 1px solid var(--line); border-radius: 0.875rem; background: var(--panel); }
.waiting .next { display: flex; align-items: center; gap: 0.625rem; margin-top: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 0.625rem; background: var(--sunk); font-size: 0.875rem; }
.choices { display: grid; gap: 0.5rem; }
.choice { display: flex; align-items: center; gap: 0.6875rem; width: 100%; min-height: 3rem; padding: 0.5rem 0.75rem 0.5rem 0.5rem; border: 1px solid var(--line-2); border-radius: 0.6875rem; background: var(--panel); color: var(--ink); font: 550 0.9688rem/1.3 var(--font); text-align: left; cursor: pointer; transition: border-color .1s, background .1s; }
.choice:hover:not([disabled]) { border-color: var(--faint); background: #fcfdfc; }
.choice .k { display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 0.4375rem; background: var(--sunk); color: var(--muted); font-weight: 750; font-size: 0.8125rem; }
.choice .mark { display: flex; align-items: center; justify-content: center; flex: none; width: 1.375rem; height: 1.375rem; margin-left: auto; border-radius: 50%; color: #fff; }
.choice .mark svg { width: 0.8125rem; height: 0.8125rem; stroke-width: 3.2; }
.choice.picked { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.choice.picked .k { background: var(--brand); color: #fff; }
.choice.right { border-color: var(--good); background: var(--good-soft); box-shadow: 0 0 0 1px var(--good); }
.choice.right .k, .choice.right .mark { background: var(--good); color: #fff; }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); box-shadow: 0 0 0 1px var(--bad); }
.choice.wrong .k, .choice.wrong .mark { background: var(--bad); color: #fff; }
.choice[disabled] { cursor: default; }
.feedback { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 0.625rem; font-weight: 650; font-size: 0.9062rem; }
.feedback svg { width: 1.125rem; height: 1.125rem; flex: none; }
.feedback.good { background: var(--good-soft); color: var(--good); }
.feedback.bad { background: var(--bad-soft); color: var(--bad); }
.feedback.plain { background: var(--sunk); color: var(--ink-2); }
.ask-actions { display: flex; gap: 0.5rem; justify-content: space-between; align-items: center; margin-top: 0.875rem; }
.progress { display: flex; gap: 0.25rem; }
.progress span { flex: 1; height: 0.3125rem; border-radius: 0.5625rem; background: var(--line); transition: background .2s; }
.progress span.done { background: var(--brand); }
.progress span.now { background: var(--yellow); }
.join { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.25rem; align-items: center; max-width: 60rem; margin: 7vh auto 2.5rem; }
@media (max-width: 800px) { .join { grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.25rem; } }
.join .th { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0.75rem; background: #0e1525; box-shadow: var(--shadow); }
.join .th img { width: 100%; height: 100%; object-fit: cover; }
.join h1 { font-size: 1.75rem; }
.join .meta { margin: 0.5rem 0 1.375rem; color: var(--muted); }
.result { max-width: 40rem; margin: 6vh auto 2.5rem; }
.score { display: flex; align-items: baseline; gap: 0.625rem; margin: 0.625rem 0 0.25rem; }
.score b { font-size: 2.875rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.review { list-style: none; margin: 0; padding: 0; }
.review li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.875rem 0; border-top: 1px solid var(--line); }
.review .res { display: flex; align-items: center; justify-content: center; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--sunk); color: var(--muted); }
.review .res svg { width: 0.8125rem; height: 0.8125rem; stroke-width: 3.2; }
.review .res.good { background: var(--good-soft); color: var(--good); }
.review .res.bad { background: var(--bad-soft); color: var(--bad); }
.made { display: inline-flex; align-items: center; gap: 0.4375rem; color: var(--faint); font-size: 0.8125rem; text-decoration: none; }
.made:hover { color: var(--ink); }
.made .mark { width: 1.25rem; height: 1.25rem; border-radius: 0.375rem; }

/* ---------- results ---------- */
.res-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.875rem; padding: 1.5rem 0 1.125rem; }
.res-head h1 { font-size: 1.625rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 0.875rem; background: var(--panel); }
.stats > div { padding: 0.875rem 1.125rem; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats > div:nth-child(3) { border-left: 0; } .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.stats .v { display: block; font-size: 1.625rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.stats .l { color: var(--muted); font-size: 0.8125rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 0.875rem; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfa; }
th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-size: 0.7812rem; font-weight: 700; white-space: nowrap; }
th button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
th button:hover { color: var(--ink); }
.cell { display: inline-flex; align-items: center; gap: 0.3125rem; max-width: 13.75rem; overflow: hidden; padding: 2px 0.5rem 2px 0.1875rem; border-radius: 6.1875rem; font-weight: 650; font-size: 0.8125rem; white-space: nowrap; text-overflow: ellipsis; }
.cell i { display: flex; align-items: center; justify-content: center; flex: none; width: 1.125rem; height: 1.125rem; border-radius: 50%; font-style: normal; }
.cell i svg { width: 0.6875rem; height: 0.6875rem; stroke-width: 3.4; }
.cell.right { background: var(--good-soft); color: var(--good); }
.cell.right i { background: var(--good); color: #fff; }
.cell.wrong { background: var(--bad-soft); color: var(--bad); }
.cell.wrong i { background: var(--bad); color: #fff; }
.cell.plain { padding-left: 0.5rem; border-radius: 0.375rem; background: var(--sunk); color: var(--ink-2); font-weight: 550; }
.cell.none { padding-left: 0; background: none; color: #aab2ad; font-weight: 500; }
.pct { display: inline-block; min-width: 2.875rem; padding: 2px 0.5rem; border-radius: 0.375rem; background: var(--sunk); font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; }
.pct.hi { background: var(--good-soft); color: var(--good); }
.pct.lo { background: var(--bad-soft); color: var(--bad); }
.qres { padding: 1.125rem; border: 1px solid var(--line); border-radius: 0.875rem; background: var(--panel); }
.qres + .qres { margin-top: 0.625rem; }
.qres-head { display: flex; gap: 0.625rem; align-items: flex-start; justify-content: space-between; margin-bottom: 0.75rem; }
.qres-head h3 { font-size: 1rem; line-height: 1.35; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 4rem; gap: 0.625rem; align-items: center; margin-top: 0.375rem; }
.meter { position: relative; overflow: hidden; min-height: 2.375rem; padding: 0.5rem 0.75rem; border-radius: 0.5625rem; background: var(--sunk); font-size: 0.9062rem; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 0.5625rem; background: #dfe5e1; }
.meter span { position: relative; display: flex; align-items: center; gap: 0.4375rem; }
.meter.right i { background: #c9ebd6; }
.meter.right span { color: var(--good); font-weight: 700; }
.meter span svg { width: 0.875rem; height: 0.875rem; stroke-width: 3; }
.bar-row .n { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.bar-row .n small { display: block; color: var(--muted); font-weight: 500; font-size: 0.75rem; }
.answers { list-style: none; margin: 0; padding: 0; max-height: 21.25rem; overflow: auto; }
.answers li { padding: 0.625rem 0; border-top: 1px solid var(--line); font-size: 0.9062rem; white-space: pre-wrap; }
.answers li:first-child { border-top: 0; }
.answers b { display: block; color: var(--muted); font-size: 0.7812rem; }

/* ---------- my lessons ---------- */
.lessons { border: 1px solid var(--line); border-radius: 0.875rem; background: var(--panel); }
.lesson { display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem 0.875rem; border-top: 1px solid var(--line); }
.lesson:first-child { border-top: 0; }
.lesson .th { flex: none; width: 6.5rem; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0.5rem; background: #0e1525; }
.lesson .th img { width: 100%; height: 100%; object-fit: cover; }
.lesson h3 a { color: var(--ink); text-decoration: none; }
.lesson h3 a:hover { text-decoration: underline; }
@media (max-width: 640px) { .lesson { flex-wrap: wrap; } .lesson .th { width: 5.25rem; } }

/* ---------- text pages ---------- */
.prose { max-width: 43.75rem; margin: 0 auto; padding: 2.5rem 0 1.25rem; }
.prose h1 { margin-bottom: 0.75rem; }
.prose h2 { margin: 1.875rem 0 0.5rem; font-size: 1.25rem; }
.prose p, .prose li { color: var(--ink-2); font-size: 1rem; line-height: 1.7; }
.prose p + p { margin-top: 0.625rem; }
.prose ul { padding-left: 1.25rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.ask-actions .btn-go { margin-left: auto; }

/* ---------- timeline: scrubbing and moving questions ---------- */
.timeline { height: 2.5rem; }
.timeline .track, .timeline .played, .timeline .trim { top: 1.125rem; transition: height .12s, top .12s; }
.timeline .head { top: 0.6875rem; height: 1.125rem; }
.timeline .dot { top: 0.625rem; cursor: grab; touch-action: none; }
.timeline:hover .track, .timeline:hover .played, .timeline.dragging .track, .timeline.dragging .played { top: 1.0625rem; height: 0.375rem; }
.timeline.dragging, .timeline.dragging .dot { cursor: grabbing; }
.timeline .tip { position: absolute; top: -18px; z-index: 3; padding: 2px 0.4375rem; border-radius: 0.375rem; background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%); pointer-events: none; }

/* ---------- student page: video as big as the screen allows, questions big on the right ---------- */
.wrap.wide { max-width: 160rem; }
.watch {
  --h: calc(100vh - 8rem);
  grid-template-columns: minmax(0, calc(var(--h) * 16 / 9)) clamp(21.25rem, 29vw, 31.25rem);
  justify-content: center;
  gap: clamp(1rem, 1.6vw, 1.75rem);
  padding: 1rem 0 1.5rem;
}
.watch .rail { top: 4.75rem; max-height: var(--h); overflow: auto; padding: 2px; }
.watch .ask, .watch .waiting { padding: clamp(1.125rem, 1.6vw, 1.75rem); border-radius: 1rem; }
.watch .ask-top { font-size: clamp(0.8125rem, .9vw, 1rem); margin-bottom: clamp(0.625rem, 1vw, 1rem); }
.watch .ask-top .tchip { font-size: clamp(0.7812rem, .85vw, 0.9375rem); }
.watch .q-text { font-size: clamp(1.1875rem, 1.55vw, 1.875rem); margin-bottom: clamp(0.875rem, 1.3vw, 1.5rem); }
.watch .choices { gap: clamp(0.5rem, .7vw, 0.75rem); }
.watch .choice { min-height: clamp(3.25rem, 4vw, 4.625rem); padding: 0.625rem 0.875rem 0.625rem 0.625rem; gap: clamp(0.625rem, .9vw, 1rem); border-radius: 0.8125rem; font-size: clamp(1rem, 1.15vw, 1.3125rem); }
.watch .choice .k { width: clamp(1.875rem, 2.2vw, 2.5rem); height: clamp(1.875rem, 2.2vw, 2.5rem); border-radius: 0.5625rem; font-size: clamp(0.8125rem, .95vw, 1.0625rem); }
.watch .choice .mark { width: clamp(1.375rem, 1.6vw, 1.75rem); height: clamp(1.375rem, 1.6vw, 1.75rem); }
.watch textarea { min-height: clamp(6rem, 9vw, 10rem); font-size: clamp(1rem, 1.1vw, 1.25rem); }
.watch .feedback { font-size: clamp(0.9375rem, 1vw, 1.125rem); padding: 0.75rem 0.875rem; }
.watch .ask-actions .btn-go { min-height: clamp(2.75rem, 3.2vw, 3.5rem); padding: 0.625rem clamp(1.125rem, 1.5vw, 1.625rem); font-size: clamp(0.9375rem, 1vw, 1.125rem); border-radius: 0.6875rem; }
.watch .waiting b { font-size: clamp(1rem, 1.1vw, 1.25rem); }
.watch .waiting p, .watch .waiting .next { font-size: clamp(0.875rem, .95vw, 1.0625rem); }
@media (max-width: 1000px) {
  .watch { grid-template-columns: 1fr; padding-top: 0.75rem; }
  .watch .rail { position: static; max-height: none; overflow: visible; }
}
@media (min-width: 1001px) {
  .watch { align-items: stretch; }
  .watch .rail { display: flex; flex-direction: column; }
  .watch .ask, .watch .waiting { flex: 1; display: flex; flex-direction: column; }
  .watch .ask-actions { margin-top: auto; padding-top: 0.875rem; }
  .watch .waiting { justify-content: center; }
}

/* account button */
.avatar { display: grid; place-items: center; width: 2.125rem; height: 2.125rem; overflow: hidden; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--brand-soft); color: var(--brand); font: 800 0.875rem var(--font); cursor: pointer; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar:hover { border-color: var(--faint); }
.signin-nudge { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.875rem; border: 1px solid var(--line); border-radius: 0.75rem; }

/* the editor uses more of the screen */
body.editing .wrap { max-width: 96rem; }
body.editing .editor { grid-template-columns: minmax(0, 1fr) 27rem; }
@media (max-width: 1040px) { body.editing .editor { grid-template-columns: 1fr; } }
.skip-box { margin-top: 0.5rem; padding-top: 0.875rem; border-top: 1px solid var(--line); }
.skip-box p { margin-top: 0.25rem; }
