/* Avandy Tutoring. Tokens follow the shared Avandy Design Language (same values as the Portal and School foundations). */
:root {
  --ink: #172d3a; --ink-hover: #234556; --paper: #f7f5f0; --surface: #fcfbf8; --surface-subtle: #edebe5; --surface-selected: #e5e2d9;
  --text-secondary: #58666a; --line: #d7d8d2; --line-strong: #bfc5c2; --accent: #b9915b; --accent-text: #8a6332; --accent-subtle: #f2e7d8;
  --positive-text: #31533d; --positive-subtle: #eef4ee; --warning-text: #6b4a1c; --warning-subtle: #f6eedd; --danger-text: #7a342a; --danger-subtle: #f9eeeb;
  --radius: 10px;
}
* { box-sizing: border-box; }
/* The hidden attribute always wins, whatever display a component class sets. */
[hidden] { display: none !important; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font-family: Arial, Helvetica, "PingFang SC", "PingFang HK", "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.55; }
a { color: var(--ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: #e5d3b8; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 .6rem; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
p { margin: .5rem 0; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; letter-spacing: .01em; }
.brand span { color: var(--accent-text); font-weight: 400; }
.top nav { margin-left: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.top nav form { margin: 0; }
.who { color: var(--text-secondary); }
main { max-width: 760px; margin: 0 auto; padding: 24px 20px 56px; }
main.wide { max-width: 1120px; }
/* Engineering administration and the testing lane use the desktop width; reading pages stay at 760px. */
main.admin { max-width: 1440px; }
.foot { border-top: 1px solid var(--line); padding: 16px 20px 28px; color: var(--text-secondary); font-size: .85rem; max-width: 1120px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 16px 0; }
.card.narrow, .narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 2.1rem; max-width: 18em; }
.eyebrow { color: var(--accent-text); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; }
.lede { font-size: 1.1rem; color: var(--text-secondary); max-width: 38em; }
.steps { padding-left: 1.2rem; } .steps li { margin: .45rem 0; }
.muted { color: var(--text-secondary); } .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82em; color: var(--text-secondary); }
.langs { font-size: .9rem; color: var(--text-secondary); margin: 0 0 8px; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .03em; vertical-align: middle; }
.badge-uat { background: var(--accent-subtle); color: var(--accent-text); border: 1px solid var(--accent); }
.badge-fixture { background: var(--surface-subtle); color: var(--text-secondary); border: 1px dashed var(--line-strong); font-weight: 400; }
.pill { display: inline-block; font-size: .8rem; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-subtle); }
.pill-ok { background: var(--positive-subtle); color: var(--positive-text); border-color: #b9cfbf; }
.pill-warn { background: var(--warning-subtle); color: var(--warning-text); border-color: #dcc79d; }
.pill-info { background: var(--accent-subtle); color: var(--accent-text); border-color: #dcc7a6; }
.pill-muted { color: var(--text-secondary); }
.note { border-radius: 8px; padding: 10px 14px; border: 1px solid var(--line); background: var(--surface-subtle); }
.note-ok { background: var(--positive-subtle); border-color: #b9cfbf; color: var(--positive-text); }
.note-warn { background: var(--warning-subtle); border-color: #dcc79d; color: var(--warning-text); }
label { display: block; margin: 12px 0; font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], select, textarea { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; padding: 10px 14px; } legend { font-weight: 600; padding: 0 6px; font-size: .95rem; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 8px 0; } .check input { margin-top: 4px; }
.button { display: inline-block; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; text-align: center; }
.button:hover { background: var(--surface-selected); }
.button-primary { background: var(--ink); color: #fff; } .button-primary:hover { background: var(--ink-hover); }
.button[disabled] { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; } .inline { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin: 10px 0; } .inline label { margin: 0; min-width: 180px; }
.rules, .hint-quiet { color: var(--text-secondary); font-size: .92rem; }
.stats, .tally, .actions { list-style: none; padding: 0; margin: 12px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.stats li { background: var(--surface-subtle); border-radius: 8px; padding: 8px 12px; }
.tally li { background: var(--surface-subtle); border-radius: 8px; padding: 8px 12px; min-width: 104px; display: flex; flex-direction: column; } .tally b { font-size: 1.25rem; } .tally span { font-size: .78rem; color: var(--text-secondary); }
.actions { flex-direction: column; }
table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .92rem; } th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; } thead th { color: var(--text-secondary); font-weight: 600; font-size: .82rem; }
/* Only a table scrolls sideways, inside its own container: never its card, heading, notes or controls. */
.table-scroll { overflow-x: auto; max-width: 100%; margin: 10px 0; } .table-scroll > table { margin: 0; }
.card { overflow-wrap: break-word; min-width: 0; }
details { border-top: 1px solid var(--line); padding: 8px 0; } summary { cursor: pointer; font-weight: 600; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--surface-subtle); padding: 12px; border-radius: 8px; font-size: .9rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; } .kv dt { color: var(--text-secondary); } .kv dd { margin: 0; }
.personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; } .personas .button { width: 100%; font-weight: 400; }
.schedule { padding-left: 2.2rem; max-height: 320px; overflow: auto; } .schedule li { margin: 4px 0; } .step-locked { color: var(--text-secondary); }
.funnel { padding-left: 1.2rem; }
.score { font-size: 1.2rem; } .score b { font-size: 1.7rem; }
/* Sessions */
body.focus .foot { display: none; }
.session-bar { min-height: 46px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.session-bar form { margin: 0; }
.timer b { font-variant-numeric: tabular-nums; font-size: 1.05rem; } .timer-low b { color: var(--danger-text); }
.progress-chip { color: var(--text-secondary); }
.question .stem { font-size: 1.08rem; margin: 6px 0 14px; } .stem p { margin: .6rem 0; }
math { font-size: 1.12em; } .math-block { display: block; margin: .7rem 0; overflow-x: auto; }
.figure { margin: 10px 0 16px; } .figure svg { max-width: 100%; height: auto; }
.options { border: 0; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.option { display: flex; gap: 12px; align-items: center; margin: 0; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 400; }
.option:hover { background: var(--surface-subtle); } .option:has(input:checked) { border-color: var(--ink); background: var(--surface-selected); box-shadow: inset 0 0 0 1px var(--ink); }
.option input { flex: none; } .letter { font-weight: 700; width: 1.2em; flex: none; } .option .text p { margin: 0; }
.free-row { display: flex; align-items: center; gap: 8px; } .free-row input { max-width: 260px; } .unit { color: var(--text-secondary); }
.invite { margin: 14px 0 0; padding: 10px 12px; background: var(--accent-subtle); border-radius: 8px; }
.help-route { font-size: .9rem; margin-top: 8px; }
.learning-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.learning-grid:has(.evan:not([hidden])) { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); }
.evan { background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px; margin: 16px 0; position: sticky; top: 64px; }
.evan header { display: flex; gap: 10px; align-items: center; } .evan header > div:nth-child(2) { display: flex; flex-direction: column; flex: 1; line-height: 1.2; }
.evan-face { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.evan.speaking .evan-face { box-shadow: 0 0 0 4px var(--accent-subtle), 0 0 0 6px var(--accent); }
.evan-media { font-size: .85rem; color: var(--text-secondary); margin: 8px 0; }
.evan-stage { position: relative; width: 168px; height: 168px; margin: 10px auto 4px; border-radius: 50%; overflow: hidden; background: var(--surface-subtle); }
.evan-stage video, .evan-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.evan-stage:not(.live)::after { content: "Connecting…"; position: absolute; inset: 0; display: grid; place-items: center; font-size: .85rem; color: var(--text-secondary); }
/* Background keyed out: no frame at all. Evan is drawn on a transparent canvas and sits directly on the page; the
   (invisible) video keeps playing for his voice. Without a key colour he stays in the round frame above. */
.evan-stage.keyed { width: min(100%, 232px); height: 232px; border-radius: 0; background: transparent; overflow: visible; margin: 4px auto 0; }
.evan-stage.keyed canvas { object-fit: contain; object-position: center bottom; -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%); mask-image: linear-gradient(to bottom, #000 86%, transparent 100%); }
.evan-stage.keyed video, .evan-stage video.keyed { opacity: 0; pointer-events: none; }
.evan-stage.keyed:not(.live)::after { align-items: end; padding-bottom: 12px; }
.evan.speaking .evan-stage:not(.keyed) { box-shadow: 0 0 0 3px var(--accent); }
/* With Evan's picture showing, the conversation takes less height so the panel stays within the screen. */
.evan:has(.evan-stage:not([hidden])) .evan-log { max-height: 26vh; }
.evan-caption { text-align: center; font-size: .9rem; margin: 4px 0 8px; min-height: 1.3em; } .evan-caption p { margin: 0; }
.evan-working { margin: 8px 0; font-size: .9rem; } .evan-working summary { cursor: pointer; color: var(--accent); }
.evan-working textarea { width: 100%; margin: 6px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.evan-working .row { align-items: center; gap: 10px; flex-wrap: wrap; }
.evan-tag { display: block; font-size: .75rem; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.turn-working { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.evan-note { font-size: .8rem; margin: 4px 0 0; }
.evan-log { list-style: none; margin: 10px 0; padding: 0; max-height: 44vh; overflow-y: auto; display: grid; gap: 8px; }
.turn { padding: 8px 12px; border-radius: 10px; max-width: 94%; } .turn p { margin: 0 0 .3rem; }
.turn-evan { background: var(--surface-subtle); justify-self: start; } .turn-student { background: var(--ink); color: #fff; justify-self: end; }
.turn-hint { border-left: 3px solid var(--accent); } .turn-solution { border-left: 3px solid var(--warning-text); background: var(--warning-subtle); }
.evan form { display: flex; gap: 8px; } .evan form input { margin: 0; }
.evan-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.chip { font: inherit; font-size: .85rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; }
.evan-controls { font-size: .85rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 6px 0 0; } .evan-controls .check { margin: 0; }
.evan-line { font-style: italic; color: var(--text-secondary); }
.exam-nav { display: flex; flex-wrap: wrap; gap: 6px; position: sticky; top: 46px; background: var(--paper); padding: 8px 0; margin: 0; border-bottom: 1px solid var(--line); z-index: 4; }
.exam-nav a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; text-decoration: none; background: #fff; font-size: .9rem; }
.exam-nav a.answered { background: var(--ink); color: #fff; border-color: var(--ink); } .exam-nav a.flagged { box-shadow: inset 0 -4px 0 var(--accent); }
.exam .question { scroll-margin-top: 150px; } .exam .question h2 { margin: 0; }
.day { display: flex; flex-wrap: wrap; gap: 8px; } .slot { margin: 0; font-weight: 400; } .slot input { position: absolute; opacity: 0; }
.slot span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); } .slot input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 820px) {
  .learning-grid:has(.evan:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .evan { position: static; } .evan-log { max-height: 34vh; }
  .hero h1 { font-size: 1.6rem; } main { padding: 16px 14px 40px; } .card { padding: 16px; }
  .inline label { min-width: 100%; }
}
/* Diagnostic report: header with the print button, plain lists, and a layout that reads on a phone and on paper. */
.report-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; } .report-head h1 { margin: 0; }
.report .times { font-size: .93rem; margin: 6px 0 0; } .report .times span { white-space: nowrap; }
.report li { margin: 6px 0; } .report h2 { margin-top: 22px; } .report ul.compact li { margin: 3px 0; }
.report-table td, .report-table th { vertical-align: top; }
.button.busy { opacity: .7; pointer-events: none; }
.exam-step { display: flex; justify-content: space-between; margin: 12px 0 0; font-size: .92rem; }
@media (max-width: 560px) {
  .report-table thead { display: none; }
  .report-table, .report-table tbody, .report-table tr, .report-table td { display: block; width: 100%; }
  .report-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .report-table td { border: 0; padding: 2px 0; }
  .report-table td:first-child, .report-table td:nth-child(2) { display: inline; } .report-table td:first-child { font-weight: 700; margin-right: 6px; }
  .tally li { min-width: calc(50% - 6px); }
}
@media print {
  @page { margin: 14mm 13mm; }
  html, body { background: #fff !important; font-size: 11pt; }
  .no-print, .langs, .skip { display: none !important; }
  main { max-width: none; margin: 0; padding: 0; }
  .card { margin: 0; background: none; box-shadow: none; }
  .report h2 { margin-top: 14px; break-after: avoid; } .report li, .report-table tr, .tally li, .note { break-inside: avoid; }
  .tally li { background: none; border: 1px solid #c9c4b8; }
  .pill { border: 1px solid #999; background: none !important; color: #000 !important; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .top, .foot, .button, .session-bar { display: none; } .card { border: 0; padding: 0; } }

.evan form input.hearing { font-style: italic; border-color: var(--accent); }

/* Sprint 11: daily-use workspaces */
.next-step { border-left: 4px solid #0b6b53; }
.next-step .lede { font-size: 1.15rem; margin: 0.25rem 0 0.75rem; }
.next-step .eyebrow { margin: 0; }
.workspace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.workspace-grid .card { margin: 0; }
.workspace-grid form { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem; }
.prep h3 { margin-top: 1.25rem; }

/* Consultation choices under the Free Diagnostic report: WhatsApp, WeChat and (optional) booking */
.consult-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.consult-option { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fff; }
.consult-option h3 { margin: 0 0 8px; font-size: 1rem; }
.consult-option p { margin: 6px 0; }
.consult-primary { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.reference { margin: 12px 0 4px; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-subtle); }
.reference .code { font-size: 1.1rem; letter-spacing: .04em; margin: 0 8px; }
.reference p { margin: 6px 0 0; }
.button-small { padding: 4px 10px; font-size: .85rem; }
.qr { display: block; width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.booking-row { border-top: 1px solid var(--line); padding: 10px 0; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; align-items: end; margin: 8px 0; }
.inline-form .button { justify-self: start; }

/* Sprint 12: reports and their charts (server-rendered SVG; colours here because the page allows no inline style) */
.rpt h2 { margin-top: 1.75rem; }
.rpt .rpt-id { border-top: 1px solid #d9dedf; margin-top: 2rem; padding-top: 0.75rem; font-size: 0.85rem; }
.chart-figure { margin: 0.75rem 0; overflow-x: auto; }
.chart { max-width: 100%; height: auto; display: block; }
.chart .grid { stroke: #d9dedf; stroke-width: 1; }
.chart .expected { stroke: #172d3a; stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .trace { fill: none; stroke: #6d7b83; stroke-width: 1.5; }
.chart .axis { font-size: 11px; fill: #4a5a63; }
.chart .bar-count { font-size: 11px; fill: #fff; font-weight: 600; }
.chart .bar-label { font-size: 12px; fill: #172d3a; font-weight: 600; }
.chart .mark-none { stroke: #8a959b; stroke-width: 2; fill: none; }
.c-first { fill: #0b6b53; background: #0b6b53; }
.c-other { fill: #c98a1b; background: #c98a1b; }
.c-helped { fill: #3b6ea8; background: #3b6ea8; }
.c-none { fill: #b9c0c4; background: #b9c0c4; }
.c-time { fill: #6d7b83; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; padding: 0; margin: 0.4rem 0; font-size: 0.85rem; }
.legend .swatch { display: inline-block; width: 0.8rem; height: 0.8rem; margin-right: 0.35rem; vertical-align: -0.1rem; border-radius: 2px; }
.report-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media print { .rpt details { display: block; } .rpt details > summary { list-style: none; } .chart-figure { break-inside: avoid; } .rpt table { break-inside: auto; } }
/* ---- Examination with sections of its own kind (UCAT): one question at a time ---- */
.exam-tools { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.exam-tools .button, .exam-foot .button { padding: 6px 14px; } .exam-tools [aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.exam-q { display: grid; gap: 18px; padding: 16px 0; } .exam-q[hidden], .exam-review[hidden], .exam-foot[hidden], .calculator[hidden] { display: none; }
.exam-q.with-stimulus { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.exam-stimulus { background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 14px 16px; max-height: calc(100vh - 210px); overflow: auto; }
.exam-question { background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 14px 16px; }
.exam-question h2 { margin: 0; font-size: 1.05rem; } .stimulus h3 { margin: 0 0 8px; font-size: 1rem; } .stimulus-body p { margin: .6rem 0; }
.section-exam:not(.js-single) .exam-foot, .section-exam:not(.js-single) .exam-tools [data-flag-current], .section-exam:not(.js-single) .exam-tools [data-review-open] { display: none; }
.section-exam:not(.js-single) .exam-review[hidden] { display: block; }
.exam-foot { display: flex; justify-content: space-between; gap: 12px; position: sticky; bottom: 0; background: var(--paper); padding: 10px 0; border-top: 1px solid var(--line); }
.exam-review .exam-nav { position: static; border: 0; }
.data-table { overflow-x: auto; margin: 10px 0; } .data-table table { border-collapse: collapse; width: 100%; } .data-table caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.data-table th, .data-table td { border: 1px solid var(--line-strong); padding: 6px 10px; text-align: left; font-variant-numeric: tabular-nums; }
.compound { border: 0; padding: 0; margin: 10px 0; } .answer-table { border-collapse: collapse; width: 100%; }
.answer-table th, .answer-table td { border: 1px solid var(--line-strong); padding: 8px 10px; } .answer-table thead th { font-size: .85rem; text-align: center; }
.answer-table thead th:first-child, .answer-table tbody th { text-align: left; font-weight: 400; } .answer-table tbody th p { margin: 0; display: inline; }
.answer-table td { text-align: center; width: 6.5rem; } .answer-table .cell { display: block; margin: 0; cursor: pointer; padding: 4px; }
.calculator { position: fixed; right: 18px; bottom: 76px; z-index: 20; width: 232px; background: #fff; border: 1px solid var(--ink); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 10px; }
.calculator-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 6px; cursor: move; touch-action: none; user-select: none; } .calculator-close { border: 0; background: none; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.calculator-display { display: block; text-align: right; font-size: 1.4rem; font-variant-numeric: tabular-nums; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; margin-bottom: 8px; min-height: 2.2rem; overflow: hidden; }
.calculator-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .calculator-keys button { padding: 9px 0; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); font-size: 1rem; cursor: pointer; }
.section-exam .timer-low b { color: #8a6100; background: #fff3c4; padding: 0 4px; border-radius: 4px; }
@media (max-width: 860px) { .exam-q.with-stimulus { grid-template-columns: 1fr; } .exam-stimulus { max-height: 42vh; } .calculator { right: 8px; bottom: 70px; } }
.exam-switch { display: flex; gap: 6px; margin: 4px 0 10px; } .exam-switch a, .exam-switch b { padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; font-size: .9rem; } .exam-switch b { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---- Long identifiers, administration and the internal testing lane ---------------------------------------------- */
.long-id { overflow-wrap: anywhere; word-break: break-word; background: none; padding: 0; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dd { margin-bottom: 6px; } }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; margin: 16px 0; } .hub-grid > .card { margin: 0; }
.hub-primary { border-color: var(--ink); }
.card-danger { border-style: dashed; border-color: var(--line-strong); }
.release-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; margin: 12px 0; }
.release { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.release-active { border-color: #b9cfbf; box-shadow: inset 4px 0 0 var(--positive-text); }
.release h3 { margin: 0; font-size: 1rem; } .release-status { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.release-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: .9rem; } .release-facts dt { color: var(--text-secondary); } .release-facts dd { margin: 0; min-width: 0; }
.release-activate { display: grid; gap: 6px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; } .release-activate label { margin: 0; } .release-activate .button { justify-self: start; }
.history li { overflow-wrap: anywhere; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin: 16px 0; } .modes > .card { margin: 0; display: flex; flex-direction: column; } .modes > .card .mode-go { margin-top: auto; }
.exam-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; } .exam-switch a { text-decoration: none; } .exam-switch [aria-current="page"] { background: var(--ink); color: #fff; }
.direct-url { font-size: .82rem; color: var(--text-secondary); overflow-wrap: anywhere; margin: 6px 0 0; }
.choices { display: grid; gap: 10px; margin: 12px 0; } .choice { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fff; } .choice > div { min-width: 0; flex: 1 1 280px; } .choice h3 { margin: 0 0 2px; font-size: 1rem; } .choice p { margin: 0; }
