/* Colours, type and shapes follow the main tuition site (site/styles.css in dean-quartermaine-accountancy-tuition). */
:root {
  --green-950: #092e27;
  --green-900: #0b4439;
  --green-800: #0f5f4f;
  --green-700: #137b64;
  --green-600: #169a72;
  --green-100: #e3f3ec;
  --lime: #c8f16b;
  --gold: #f5c554;
  --gold-soft: #fdf1d3;
  --cream: #f7f2e7;
  --paper: #fffdf8;
  --white: #ffffff;
  --ink: #10251f;
  --muted: #5c6d67;
  --line: #dfe7e2;
  --danger: #b63838;
  --danger-soft: #fbeaea;
  --shadow: 0 24px 60px rgba(9, 46, 39, 0.14);
  --shadow-soft: 0 12px 30px rgba(9, 46, 39, 0.09);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --container: min(1120px, calc(100% - 32px));
  --transition: 180ms ease;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green-800); }
button, input, select, textarea { font: inherit; color: inherit; }
main { flex: 1; }
.container { width: var(--container); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 999; background: var(--lime); color: var(--ink); padding: 12px 18px; border-radius: 8px; font-weight: 800; transition: top var(--transition); }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Developing-tool notice */
.site-banner { background: var(--gold-soft); border-bottom: 1px solid #f1dca4; }
.site-banner p { margin: 0; padding: 8px 0; font-size: 0.85rem; text-align: center; color: #7a5a0c; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(15, 95, 79, 0.08); }
.nav-wrap { min-height: 82px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; min-width: 0; max-width: 300px; text-decoration: none; flex: 0 0 auto; }
.brand img.brand-logo { width: clamp(248px, 18vw, 285px); height: auto; max-width: 100%; }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav a { text-decoration: none; font-weight: 750; font-size: clamp(0.82rem, 0.78vw, 0.92rem); line-height: 1.2; color: #29433b; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green-700); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 8px; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; background: var(--green-800); color: var(--white); border: 0; border-radius: 999px; text-decoration: none; font-weight: 850; box-shadow: 0 10px 24px rgba(15, 95, 79, 0.2); cursor: pointer; transition: transform var(--transition), background var(--transition); }
.button:hover { transform: translateY(-2px); background: var(--green-700); }
.button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.button-light { background: var(--lime); color: var(--green-950); box-shadow: none; }
.button-light:hover { background: var(--white); color: var(--green-950); }
.button-ghost { background: var(--white); color: var(--green-800); border: 1px solid var(--line); box-shadow: none; }
.button-ghost:hover { background: var(--green-100); }
.button-small { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.button-danger { background: var(--white); color: var(--danger); border: 1px solid #efc9c9; box-shadow: none; }
.button-danger:hover { background: var(--danger-soft); }
/* Compact buttons for actions in a table row (admin) */
.button-table { min-height: 34px; padding: 0 14px; font-size: 0.85rem; font-weight: 800; white-space: nowrap; }
.button-table:hover { transform: none; }
.history td.cell-actions { text-align: right; white-space: nowrap; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button-row-split { justify-content: space-between; }
.button-row-split p { margin: 0; }
.text-button { border: 0; background: none; font-weight: 800; color: var(--green-800); cursor: pointer; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }

/* Type */
h1, h2, h3, h4 { font-family: var(--serif); letter-spacing: -0.03em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3, h4 { font-size: 1.25rem; letter-spacing: -0.015em; }
h1:focus { outline: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem; font-weight: 900; color: var(--green-700); }
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 99px; background: var(--gold); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 680px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* Page layout */
.page-hero { background: linear-gradient(145deg, var(--cream), #fbfaf5 58%, #ebf7ef); padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin: 14px 0 16px; }
.page-hero .lead { margin: 0; }
.page-hero .button-row { margin-top: 26px; }
.breadcrumb { font-size: 0.88rem; font-weight: 700; margin-bottom: 8px; }
.breadcrumb a { text-decoration: none; }
.section { padding: 48px 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }

/* Steps on the home page */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.step { background: rgba(255,255,255,0.7); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; }
.step strong { display: block; margin-bottom: 4px; }
.step span { color: var(--muted); font-size: 0.92rem; }
.step .step-number { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-800); color: var(--lime); font-weight: 900; font-size: 0.85rem; margin-bottom: 10px; }

/* Cards */
.card { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-soft); }
.level-group { border: 2px solid var(--green-600); border-radius: var(--radius-xl); padding: 28px; background: var(--cream); }
.level-group-title { margin-bottom: 20px; }
h3.level-group-title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.level-group > .section-head .level-group-title { margin-bottom: 0; }
.unit-section + .unit-section { margin-top: 28px; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.unit-card { display: flex; flex-direction: column; gap: 14px; }
.unit-card h4 a { color: inherit; text-decoration: none; }
.unit-card h4 a:hover { color: var(--green-700); }
.unit-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.unit-card .button-row { margin-top: auto; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 850; background: var(--green-100); color: var(--green-800); }
.badge-gold { background: var(--gold-soft); color: #7a5a0c; }
.badge-ready { background: var(--green-800); color: var(--lime); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Progress bars */
.meter { display: grid; gap: 6px; }
.meter-label { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 750; }
.meter-track { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green-700), var(--green-600)); transition: width 400ms ease; }
.meter-fill.is-ready { background: linear-gradient(90deg, var(--green-800), var(--lime)); }

/* Unit dashboard */
.dashboard { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.topic-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.topic-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.topic-row.is-current { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft) inset; }
.topic-row h3, .topic-row h4 { font-family: inherit; font-size: 1rem; letter-spacing: 0; }
.topic-row .meter { grid-column: 1 / -1; }
.topic-stats { font-size: 0.85rem; color: var(--muted); }
.mock-panel { background: var(--green-900); color: var(--white); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.mock-panel h2 { color: var(--white); }
.mock-panel p { color: #d6ece2; }
.mock-panel .meter-label { color: var(--white); }
.mock-panel .meter-track { background: rgba(255,255,255,0.18); }
.mock-panel .meter-fill { background: linear-gradient(90deg, var(--lime), var(--gold)); }
.checklist { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 6px; font-size: 0.92rem; }
.checklist li { display: flex; gap: 8px; align-items: baseline; color: #d6ece2; }
.checklist li.done { color: var(--white); }
.checklist li::before { content: "○"; color: rgba(255,255,255,0.5); }
.checklist li.done::before { content: "✓"; color: var(--lime); font-weight: 900; }
.history { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.history th, .history td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.history th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.history .table-group th { background: var(--green-100); color: var(--green-900); text-transform: none; letter-spacing: 0; font-size: 0.9rem; }

/* Questions */
.practice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.question-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow-soft); min-width: 0; }
.question-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.question-prompt p { margin: 0 0 12px; font-size: 1.04rem; }
.data-table-wrap { position: relative; overflow-x: auto; margin: 6px 0 18px; } /* relative, so a hidden .sr-only heading cannot widen the page */
.data-table { border-collapse: collapse; min-width: 320px; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.data-table caption { text-align: left; font-weight: 850; padding-bottom: 6px; }
.data-table th, .data-table td { padding: 8px 14px; border: 1px solid var(--line); text-align: left; }
.data-table th { background: var(--green-100); font-size: 0.85rem; }
.data-table td.num { text-align: right; }

/* Source documents with a question: an invoice, remittance advice, payslip and so on, laid out like the real thing. */
.docs { display: grid; gap: 16px; margin: 6px 0 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); } /* side by side only with room for real columns */
.doc { margin: 0; min-width: 0; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--green-800); border-radius: 4px; padding: 16px 18px; font-size: 0.9rem; line-height: 1.4; box-shadow: var(--shadow-soft); }
.doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.doc-party { display: flex; flex-direction: column; }
.doc-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.doc-title { margin: 0; font-weight: 850; font-size: 1.02rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-900); }
.doc-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-bottom: 12px; }
.doc-details, .doc-totals { margin: 0; display: grid; gap: 2px; }
.doc-details div, .doc-totals div { display: flex; justify-content: space-between; gap: 16px; }
.doc-details dt, .doc-totals dt { color: var(--muted); }
.doc-details dd, .doc-totals dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.doc-lines-wrap { overflow-x: auto; }
.doc-lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.doc-lines th { padding: 6px 8px; border-bottom: 2px solid var(--ink); text-align: left; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.doc-lines td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-lines .num { text-align: right; }
.doc-totals { width: min(100%, 280px); margin: 10px 0 0 auto; }
.doc-totals div:last-child { border-top: 2px solid var(--ink); padding-top: 4px; }
.doc-totals div:last-child dt, .doc-totals div:last-child dd { color: var(--ink); font-weight: 850; }
.doc-notes { margin-top: 12px; font-size: 0.8rem; color: var(--muted); }
.doc-notes p { margin: 0 0 2px; }
.doc-credit-note, .doc-goods-returned-note { border-top-color: var(--danger); }
.doc-credit-note .doc-title { color: var(--danger); }
.doc-bank-statement, .doc-statement { border-top-color: var(--green-950); }
.doc-receipt, .doc-petty-cash-voucher { max-width: 340px; }
.doc-receipt { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border-top-style: dashed; }
.doc-memo { border-top-color: var(--gold); background: var(--cream); }

/* Charts with a question, drawn as SVG on the server. */
.qchart { margin: 6px 0 18px; padding: 14px 16px; max-width: 760px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qchart-title { font-weight: 850; margin-bottom: 6px; }
.qchart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 8px; padding: 0; font-size: 0.88rem; }
.qchart-legend li { display: flex; align-items: center; gap: 6px; }
.qchart-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.qchart-plot { overflow-x: auto; }
.qchart-plot:focus-visible, .doc-lines-wrap:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.qchart-svg { display: block; width: 100%; min-width: 480px; height: auto; }
.qchart-grid { stroke: var(--line); stroke-width: 1; }
.qchart-axis { stroke: #9fb1aa; stroke-width: 1.5; }
.qchart-tick { font-size: 14px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.qchart-axis-title { font-size: 14px; font-weight: 700; fill: var(--ink); }
.qchart-slice { font-size: 15px; font-weight: 800; }
.qchart-value { font-size: 12px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.qchart-data { margin-top: 8px; }
.qchart-data summary { cursor: pointer; font-weight: 700; color: var(--green-800); width: fit-content; }
.qchart-data summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.write-email summary { cursor: pointer; font-weight: 700; color: var(--green-800); width: fit-content; }
.write-email summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.write-email ul { margin: 6px 0 0; padding-left: 18px; font-weight: 400; }
.tax-rates { width: 100%; }
.tax-rates th { background: none; font-weight: 500; font-size: 0.92rem; }
@media (min-width: 560px) { .tax-rates td { white-space: nowrap; } }
.tax-rates-link { margin: -6px 0 14px; }
.parts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 20px 0 22px; }
.part { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--line); background: #fcfdfb; }
.part > label, .part legend { font-weight: 800; font-size: 0.95rem; padding: 0; }
fieldset.part { margin: 0; min-width: 0; }
.options { display: grid; gap: 8px; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; }
.option:hover { border-color: var(--green-600); }
.option input { margin-top: 5px; accent-color: var(--green-800); }
.option:has(input:checked) { border-color: var(--green-800); background: var(--green-100); }
.input-wrap { display: flex; align-items: center; max-width: 280px; border: 1px solid #c9d6cf; border-radius: var(--radius-sm); background: var(--white); overflow: hidden; }
.input-wrap:focus-within { border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(20, 154, 114, 0.2); }
.input-wrap span { padding: 0 10px; color: var(--muted); font-weight: 750; }
.input-wrap input { border: 0; padding: 10px 12px; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.input-wrap input:focus { outline: none; }
select.select { max-width: 100%; padding: 10px 12px; border: 1px solid #c9d6cf; border-radius: var(--radius-sm); background: var(--white); }
/* Boxes inside a sentence, as on the AAT exam screens */
.sentence { margin: 0; line-height: 2.6; }
.sentence-box { display: inline-flex; vertical-align: middle; max-width: 100%; margin: 2px 2px; line-height: normal; }
select.select-inline { padding: 6px 10px; }
.input-wrap-inline { display: inline-flex; width: 10em; max-width: 100%; }
.input-wrap-inline input { padding: 6px 10px; }
.sentence-box.is-right .select, .sentence-box.is-right .input-wrap { border-color: var(--green-600); box-shadow: inset 0 0 0 1px var(--green-600); }
.sentence-box.is-off .select, .sentence-box.is-off .input-wrap { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.part.is-correct { border-color: var(--green-600); background: #f1faf5; }
.part.is-wrong { border-color: #e2a9a9; background: #fdf5f5; }
.part.is-partial { border-color: var(--gold); background: var(--gold-soft); }
.part .field-hint { color: var(--green-800); font-weight: 700; }
.part-title { margin: 0; font-weight: 800; font-size: 0.95rem; }
.workbook-link { margin: 0 0 16px; }
.js-only { display: none; }
.has-js .js-only { display: inline; }
.has-js .no-js-only:not(:only-child) { display: none; }

/* Grids and proformas: answer boxes inside a table */
.answer-grid td { padding: 6px 8px; vertical-align: middle; }
.answer-grid .input-wrap { max-width: none; min-width: 110px; }
.answer-grid .input-wrap input { padding: 8px 10px; text-align: right; }
.answer-grid .select { min-width: 150px; }
.answer-cell.is-right .input-wrap, .answer-cell.is-right .select { border-color: var(--green-600); background: #f1faf5; }
.answer-cell.is-off .input-wrap, .answer-cell.is-off .select { border-color: var(--danger); background: #fdf5f5; }
.ft-badge { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 999px; background: var(--green-100); color: var(--green-800); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; }
.answer-grid-key { margin-top: 10px; }
.input-file { padding: 10px; background: var(--white); }
.workbook-uploaded { margin: 4px 0 8px; }
.workbook-marking th[scope="row"] { font-weight: 700; }
.workbook-marking tr.is-right td:last-child { color: var(--green-800); font-weight: 750; }
.workbook-marking tr.is-off td:last-child { color: var(--danger); }
.workbook-feedback { margin: 0; padding-left: 18px; }
.workbook-feedback li + li { margin-top: 4px; }
/* On a phone each marked line stacks: what was marked, then its cells, marks and feedback. */
@media (max-width: 640px) {
  .workbook-marking { min-width: 0; width: 100%; }
  .workbook-marking thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .workbook-marking tr, .workbook-marking th, .workbook-marking td { display: block; }
  .workbook-marking tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px 0; background: var(--white); }
  .workbook-marking th, .workbook-marking td { border: 0; padding: 3px 12px; text-align: left; }
  .workbook-marking td:nth-child(2), .workbook-marking td.num { display: inline-block; color: var(--muted); font-size: 0.85rem; }
  .workbook-marking td.num::before { content: "· "; }
}
.answer-grid-key caption { color: var(--green-800); }
select.select-small { padding: 8px 10px; }

/* Ordering and matching. Without JavaScript each item has a dropdown; with it, items can also be dragged. */
.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.order-item, .match-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.order-item label, .match-item label { font-weight: 600; flex: 1 1 14rem; }
/* On a phone the label takes the full width and the dropdown drops below it, instead of pushing off the screen. */
.match-item { flex-wrap: wrap; }
.match-item select { max-width: 100%; }
.match-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.match-item[hidden], .order-item select[hidden] { display: none; }
.match-item.is-right { border-color: var(--green-600); background: #f1faf5; }
.match-item.is-off { border-color: var(--danger); background: #fdf5f5; }
.drag-handle { cursor: grab; padding: 4px 8px; color: var(--muted); font-weight: 800; border: 0; background: none; touch-action: none; }
.is-dragging { opacity: 0.55; }
.match-board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 6px; }
.match-bin { border: 2px dashed var(--line); border-radius: var(--radius-md); padding: 10px; min-height: 90px; background: #fcfdfb; }
.match-bin.is-over { border-color: var(--green-600); background: var(--green-100); }
.match-bin h4 { margin: 0 0 8px; font-size: 0.9rem; }
.match-chip { display: block; width: 100%; text-align: left; margin: 0 0 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); cursor: grab; font: inherit; }
.match-chip[aria-pressed="true"] { border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(20, 154, 114, 0.2); }
.part-feedback { font-size: 0.9rem; font-weight: 750; }
.part.is-correct .part-feedback { color: var(--green-800); }
.part.is-wrong .part-feedback { color: var(--danger); }
.part.is-partial .part-feedback { color: #7a5a0c; }
.feedback { scroll-margin-top: 104px; margin-top: 18px; padding: 18px 20px; border-radius: var(--radius-md); background: var(--cream); border-left: 5px solid var(--gold); }
.feedback h3 { font-family: inherit; font-size: 1.05rem; letter-spacing: 0; margin-bottom: 8px; }
.feedback.is-correct { border-left-color: var(--green-600); }
.feedback.is-wrong { border-left-color: var(--danger); }
.feedback p { margin: 0 0 4px; }
.feedback .working { font-variant-numeric: tabular-nums; }
.feedback .reference { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.side-panel { display: grid; gap: 16px; position: sticky; top: 92px; }
/* The panel is narrow: buttons fill it, with less side padding, so labels such as "Create a free account" stay on one line. */
.side-panel .button { width: 100%; padding: 0 14px; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.tally { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; text-align: center; }
.tally div { background: var(--cream); border-radius: var(--radius-sm); padding: 10px; }
.tally strong { display: block; font-size: 1.5rem; font-family: var(--serif); }
.tally span { font-size: 0.78rem; color: var(--muted); font-weight: 700; }

/* Mock exam */
.exam-bar { position: sticky; top: 72px; z-index: 40; background: var(--green-900); color: var(--white); }
.exam-bar .container { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; min-height: 60px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 1.2rem; padding: 4px 14px; border-radius: 999px; background: rgba(255,255,255,0.12); }
.timer.is-low { background: var(--gold); color: var(--green-950); }
.navigator { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-dot { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); font-weight: 800; font-size: 0.85rem; cursor: pointer; position: relative; }
.nav-dot.is-answered { background: var(--green-100); border-color: var(--green-600); }
.nav-dot.is-current { background: var(--green-800); color: var(--white); border-color: var(--green-800); }
.nav-dot.is-flagged::after { content: ""; position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid var(--white); }
.nav-dot.is-correct { background: #e6f6ee; border-color: var(--green-600); }
.nav-dot.is-wrong { background: var(--danger-soft); border-color: #e2a9a9; }
.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.score-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring-colour, var(--green-700)) calc(var(--score) * 1%), var(--line) 0); }
.score-ring div { width: 118px; height: 118px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; text-align: center; }
.score-ring strong { font-family: var(--serif); font-size: 2.1rem; line-height: 1; display: block; }
.score-ring span { font-size: 0.78rem; color: var(--muted); font-weight: 750; }
.review-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.notice { padding: 14px 18px; border-radius: var(--radius-md); background: var(--gold-soft); border: 1px solid #f1dca4; font-size: 0.95rem; }
#finish-confirm:not(:empty) { margin-bottom: 16px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-lg); }

/* Review my mistakes */
.button-row-centre { justify-content: center; }
.mistake { padding: 0; }
.mistake summary { display: grid; gap: 6px; padding: clamp(18px, 3vw, 26px); padding-right: 56px; cursor: pointer; list-style: none; position: relative; border-radius: var(--radius-lg); }
.mistake summary::-webkit-details-marker { display: none; }
.mistake summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; border-right: 3px solid var(--green-800); border-bottom: 3px solid var(--green-800); transform: translateY(-70%) rotate(45deg); transition: transform var(--transition); }
.mistake[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.mistake summary:hover .mistake-title { color: var(--green-800); }
.mistake summary .question-meta { margin-bottom: 4px; }
.mistake-title { font-weight: 850; font-size: 1.05rem; }
.mistake-teaser { color: var(--muted); font-size: 0.95rem; }
.mistake-body { padding: 0 clamp(18px, 3vw, 26px) clamp(18px, 3vw, 26px); border-top: 1px solid var(--line); padding-top: 18px; }

/* Footer */
.site-footer { background: var(--green-950); color: #d9e9e3; padding: 72px 0 30px; margin-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 60px; }
.footer-brand { width: min(100%, 332px); max-width: 332px; padding: 10px 14px; border-radius: 18px; background: var(--paper); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16); }
.footer-brand img.brand-logo { width: 100%; max-width: none; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-grid > div:first-child p { color: #9fbab0; max-width: 320px; margin: 0; }
.footer-grid > div > strong { color: var(--lime); margin-bottom: 6px; }
.footer-grid a:not(.brand) { text-decoration: none; color: #b9d0c7; font-size: 0.9rem; overflow-wrap: anywhere; }
.footer-grid a:hover { color: var(--white); }

@media (max-width: 900px) {
  .dashboard, .practice-layout, .report-layout { grid-template-columns: minmax(0, 1fr); }
  .side-panel { position: static; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 640px) {
  .nav-wrap { flex-wrap: wrap; padding: 10px 0; gap: 8px 16px; }
  .site-nav { margin-left: 0; gap: 14px 16px; width: 100%; flex-wrap: wrap; }
  .brand { max-width: min(64vw, 225px); }
  .brand img.brand-logo { width: 100%; }
  .exam-bar { top: 0; position: relative; }
  .feedback { scroll-margin-top: 150px; }
  .result-hero { grid-template-columns: 1fr; justify-items: start; }
  .page-hero { padding: 36px 0 32px; }
  .topic-row { grid-template-columns: 1fr; }
  .level-group { padding: 18px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid > div:first-child { grid-column: auto; }
  .footer-brand { max-width: 100%; width: min(100%, 320px); padding: 9px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---- PHP version additions ---- */
.inline-form { display: inline; margin: 0; }
.nav-button { border: 0; background: none; padding: 0; font-weight: 750; font-size: 0.92rem; color: #29433b; cursor: pointer; white-space: nowrap; }
.nav-button:hover { color: var(--green-700); }
.site-nav .button { color: var(--white); text-decoration: none; }
.flash { margin: 20px 0 0; }
.notice-spaced { margin: 0 0 20px; }
.notice-error { background: var(--danger-soft); border-color: #efc9c9; color: var(--danger); }
.badge-flag { background: var(--gold); color: var(--green-950); }
.eyebrow-light { color: #dff5ea; }
.page-hero-compact { padding: 40px 0 34px; }
.narrow { max-width: 640px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.spaced-top { margin-top: 18px; }
.card-title { margin-bottom: 12px; }
.section-title { margin-bottom: 18px; }
.unit-subtitle { font-size: 1rem; letter-spacing: 0; }
.h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.card > p:last-child { margin-bottom: 0; }
.question-ref { margin: 16px 0 0; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 0.92rem; }
.plain-list a { text-decoration: none; font-weight: 650; }
.plain-list a:hover, .plain-list a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.plain-list a[aria-current="page"] { font-weight: 850; }
.mock-panel h2 { margin: 10px 0 0; }
.mock-panel .button-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.mock-panel .button-ghost:hover { background: rgba(255,255,255,0.12); }

/* Unlock call to action */
.unlock-panel { background: var(--green-900); color: var(--white); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 32px); box-shadow: var(--shadow); }
.unlock-panel h2, .unlock-panel h3 { color: var(--white); margin: 10px 0 8px; }
.unlock-panel p { color: #d6ece2; margin: 0 0 14px; }
.unlock-benefits { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); color: #eaf6f0; font-size: 0.95rem; }
.unlock-benefits li { position: relative; padding-left: 26px; }
.unlock-benefits li::before { content: "✓"; position: absolute; left: 0; color: var(--lime); font-weight: 900; }
.unlock-panel .button-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.unlock-panel .button-ghost:hover { background: rgba(255,255,255,0.12); }
.unlock-saving { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: var(--green-950); font-size: 0.78rem; font-weight: 850; }
.unlock-panel .unlock-more-link { color: var(--white); }
.unlock-panel form { margin: 0; }
.button-danger-solid { background: var(--danger); }
.button-danger-solid:hover { background: #962d2d; }
.navigator + p { margin: 12px 0 0; }
.score-ring.is-pass { --ring-colour: var(--green-700); }
.score-ring.is-fail { --ring-colour: var(--danger); }

/* Forms */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 18px 0; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field label { font-weight: 800; }
.input { padding: 11px 12px; border: 1px solid #c9d6cf; border-radius: var(--radius-sm); background: var(--white); width: 100%; }
.input:focus { outline: none; border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(20, 154, 114, 0.2); }
.field.has-error .input { border-color: var(--danger); }
.field-error { margin: 0; color: var(--danger); font-weight: 750; font-size: 0.9rem; }
.field-hint { margin: 0; color: var(--muted); font-size: 0.88rem; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { font-weight: 800; padding: 0; margin-bottom: 6px; }
fieldset.field.has-error .options { border-left: 3px solid var(--danger); padding-left: 10px; }

/* Report a problem */
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px; align-items: start; }
.plain-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.report-link { margin: 6px 0 0; }
.report-comment { margin: 0 0 12px; padding: 12px 16px; border-left: 4px solid var(--gold); background: var(--cream); border-radius: var(--radius-sm); }
.report-comment p { margin: 0 0 6px; }

/* Admin question stats */
.stats-table th.num, .stats-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.filter-form { display: grid; gap: 16px; }
.filter-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: start; }
.filter-grid .field { align-content: start; }
.filter-grid .select { width: 100%; }
.stats-table th.period { text-align: center; border-left: 1px solid rgba(15, 95, 79, 0.12); }
.stats-table td.period-start, .stats-table th.period-start { border-left: 1px solid rgba(15, 95, 79, 0.12); }
.stats-table tr.is-total td, .stats-table tr.is-total th { font-weight: 800; }
.system-health .stats-table tbody th { white-space: normal; }
.system-detail { font-weight: 400; overflow-wrap: anywhere; }
.stats-table tbody th, .stats-table tfoot th { font-size: inherit; text-transform: none; letter-spacing: 0; color: inherit; white-space: nowrap; }
.stats-table tr.is-unit th { padding-left: 24px; font-weight: 600; white-space: normal; min-width: 220px; }
.stats-table tbody + tbody tr:first-child > * { border-top: 2px solid rgba(15, 95, 79, 0.18); }
.stats-table tfoot tr > * { border-top: 2px solid rgba(15, 95, 79, 0.18); }
.stats-table tr.is-thin td { color: var(--muted); }
.stats-table .plain-list { margin: 0; padding: 0; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 18px 0 0; }
.details dt { font-weight: 800; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.footer-bottom { margin-top: 54px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: space-between; gap: 30px; color: #87a89c; font-size: 0.75rem; }
.footer-bottom p { margin: 0; }
.part-feedback { margin: 0; }

/* ExamReady product name beside the tuition logo */
.brand-product { gap: 10px; max-width: none; }
.brand-name { display: block; height: 30px; width: auto; flex: 0 0 auto; }
.brand-by { font-size: 0.8rem; font-weight: 750; color: var(--muted); }
.brand-product img.brand-logo { width: clamp(170px, 14vw, 210px); }
.footer-product { color: var(--white); }
@media (max-width: 640px) {
  .brand-product { max-width: 100%; gap: 7px; }
  .brand-name { height: 24px; }
  .brand-product img.brand-logo { width: min(38vw, 150px); }
}
@media (max-width: 360px) {
  .brand-name { height: 21px; }
}

/* Admin dashboard: stat tiles and column charts (App\Http\ColumnChart) */
.attention { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 20px; padding: 12px 18px; border-radius: var(--radius-md); background: var(--gold-soft); border: 1px solid #f1dca4; font-size: 0.95rem; }
.attention a { font-weight: 800; }
.stat-grid { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .stat-grid { gap: 10px; }
  .stat-tile { padding: 12px 12px 10px; }
  .stat-value { font-size: 1.45rem; }
  .stat-sub { font-size: 0.75rem; }
  .chart-x span:not(:first-child):not(:last-child):not(.is-mid) { display: none; }
}
@media (max-width: 379px) { .stat-grid { grid-template-columns: minmax(0, 1fr); } }
.stat-tile { min-width: 0; display: flex; flex-direction: column; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px 12px; box-shadow: var(--shadow-soft); }
.stat-label { font-size: 0.85rem; font-weight: 750; color: var(--muted); }
.stat-value { font-size: 2.1rem; font-weight: 850; line-height: 1.15; color: var(--green-950); white-space: nowrap; }
.stat-sub { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sparkline { width: 100%; height: 28px; margin-top: 8px; overflow: visible; }
.sparkline polyline { fill: none; stroke: #9fb3ab; stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dash-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.dash-head .h2 { margin: 0; }
.dash-hint { order: 3; flex-basis: 100%; margin: 0; }
/* A whole tile leads to its detail: the label is the link, stretched over the tile. */
.stat-tile.is-link { position: relative; transition: border-color var(--transition), box-shadow var(--transition); }
.stat-tile.is-link:hover { border-color: var(--green-600); box-shadow: var(--shadow); }
.stat-link { color: var(--green-800); text-decoration: none; }
.stat-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-md); }
.stat-tile.is-link:hover .stat-link { text-decoration: underline; }
.stat-link:focus-visible { outline: none; }
.stat-link:focus-visible::after { outline: 3px solid var(--gold); outline-offset: 3px; }
.stat-change { font-size: 0.78rem; font-weight: 750; color: var(--muted); }
.stat-change.is-up { color: var(--green-700); }
.stat-change.is-down { color: var(--danger); }
.stat-change.is-up::before { content: "▲ "; }
.stat-change.is-down::before { content: "▼ "; }
.stat-grid-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1000px) { .stat-grid-five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .stat-grid-five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-grid-five .stat-value { font-size: 1.7rem; }
.card-title-split { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.card-title-split .h2 { margin: 0; }
/* Sign-up to paying: each step's bar is its share of the sign-ups. */
.funnel { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.funnel li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.funnel a { font-weight: 750; }
.funnel-figure { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.9rem; }
.funnel-figure strong { color: var(--ink); font-size: 1.05rem; }
.funnel-bar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: linear-gradient(to right, var(--green-600) var(--w), var(--green-100) var(--w)); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.chip-row a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 750; font-size: 0.88rem; color: var(--green-800); background: var(--white); }
.chip-row a:hover { background: var(--green-100); }
.chip-row a[aria-current] { background: var(--green-800); border-color: var(--green-800); color: var(--white); }
.chip-count { font-weight: 600; opacity: 0.8; }
.inline-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.inline-filter label { font-weight: 750; }
.inline-filter .select { width: auto; max-width: 100%; }
.chart-link { position: absolute; inset: 0; z-index: 1; }
.range-switch { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.range-switch a { padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 750; font-size: 0.9rem; color: var(--green-800); }
.range-switch a:hover { background: var(--green-100); }
.range-switch a[aria-current] { background: var(--green-800); color: var(--white); }
.chart-grid, .dash-two { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; }
.chart-wide, .dash-full { grid-column: 1 / -1; }
@media (max-width: 860px) { .chart-grid, .dash-two { grid-template-columns: minmax(0, 1fr); } }
.chart { margin: 0; min-width: 0; }
.chart-title { font-weight: 800; font-size: 1.05rem; }
.chart-note { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }
.chart-plot { position: relative; height: 180px; margin: 28px 0 0 44px; border-bottom: 1px solid #c9d5cf; }
.chart-tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.chart-tick span { position: absolute; right: calc(100% + 8px); top: -0.6em; font-size: 0.75rem; line-height: 1.2; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-bars { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 2px; }
.chart-bars li { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bars.is-dense { gap: 1px; }
.chart-bar { display: block; width: 100%; max-width: 24px; height: var(--h); background: #169a72; border-radius: 4px 4px 0 0; }
.chart-bars.is-dense .chart-bar { border-radius: 2px 2px 0 0; }
.chart-bars li:hover .chart-bar { background: var(--green-800); }
.chart-peak { position: absolute; bottom: calc(var(--h) + 4px); left: 50%; transform: translateX(-50%); font-size: 0.75rem; font-weight: 800; color: var(--ink); white-space: nowrap; pointer-events: none; }
.chart-bars li:first-child .chart-peak, .chart-bars li:nth-child(2) .chart-peak { left: 0; transform: none; }
.chart-bars li:last-child .chart-peak, .chart-bars li:nth-last-child(2) .chart-peak { left: auto; right: 0; transform: none; }
.chart-tip { display: none; position: absolute; z-index: 5; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: 8px; background: var(--green-950); color: var(--white); font-size: 0.8rem; line-height: 1.3; white-space: nowrap; box-shadow: var(--shadow-soft); pointer-events: none; }
.chart-tip strong { font-weight: 850; }
.chart-bars li:nth-child(-n+3) .chart-tip { left: 0; transform: none; }
.chart-bars li:nth-last-child(-n+3) .chart-tip { left: auto; right: 0; transform: none; }
.chart-bars li:hover .chart-tip { display: block; }
.chart-bars li:hover .chart-peak { visibility: hidden; }
.chart-x { position: relative; height: 1.6em; margin-left: 44px; font-size: 0.75rem; color: var(--muted); }
.chart-x span { position: absolute; top: 4px; transform: translateX(-50%); white-space: nowrap; }
.chart-x span:first-child { transform: none; left: 0 !important; }
.chart-x span:last-child { transform: none; left: auto !important; right: 0; }
.chart-table { margin-top: 12px; font-size: 0.88rem; }
.chart-table summary { cursor: pointer; font-weight: 750; color: var(--green-800); }
.chart-table .data-table-wrap { max-height: 260px; overflow-y: auto; margin-top: 8px; }

/* Admin nav, with a count of what is waiting in a section */
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.nav-count { display: inline-block; min-width: 1.5em; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--green-950); font-size: 0.75rem; font-weight: 850; line-height: 1.5; text-align: center; vertical-align: 1px; }

/* Page links under long admin lists (App\Http\Pager) */
.pager ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pager li[aria-hidden] { padding: 0 4px; color: var(--muted); }
.pager a { display: inline-block; min-width: 2.4em; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); text-align: center; text-decoration: none; font-weight: 750; color: var(--green-800); }
.pager a:hover { background: var(--green-100); }
.pager a[aria-current] { background: var(--green-800); border-color: var(--green-800); color: var(--white); }

/* Retention: each cell is shaded by the share of the week's sign-ups who came back. */
.retention td[style] { background: linear-gradient(rgba(22, 154, 114, calc(var(--p) * 0.45)), rgba(22, 154, 114, calc(var(--p) * 0.45))); }
.retention td.is-partial { font-style: italic; color: var(--muted); }
.retention-partial-key { font-style: italic; }

/* A question report's email conversation */
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.thread-message { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--white); }
.thread-message.is-out { background: var(--green-100); border-color: transparent; margin-left: 24px; }
.thread-message.is-in { margin-right: 24px; }
.thread-message.is-new { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.thread-meta { margin: 0 0 6px; font-size: 0.82rem; color: var(--muted); }
.thread-meta strong { color: var(--ink); }
.thread-body p { margin: 0 0 8px; overflow-wrap: anywhere; }
.thread-body p:last-child { margin-bottom: 0; }

/* Pricing on the home page (partials/pricing-cta.php) */
.hero-actions { align-items: center; }
.hero-price-note { flex-basis: 100%; font-size: 0.92rem; color: var(--muted); }
.pricing-section { background: var(--paper); border-bottom: 1px solid var(--line); padding: 56px 0; scroll-margin-top: 16px; }
.pricing-section + .section { padding-top: 48px; }
.pricing-head { max-width: 720px; margin: 0 auto 32px; text-align: center; }
.pricing-head h2 { margin: 12px 0 12px; }
.pricing-head .lead { margin: 0 auto; }
.pricing-left { margin: 14px 0 0; font-weight: 750; color: var(--green-800); }
.pricing-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: minmax(0, 1fr); } }
.price-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 26px 22px 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.price-card h3 { font-size: 1.3rem; }
.price { margin: 14px 0 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-amount { font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.03em; color: var(--green-950); }
.price-per { font-weight: 750; color: var(--muted); }
.price-for { margin: 6px 0 18px; font-size: 0.9rem; color: var(--muted); }
.price-points { list-style: none; margin: 0 0 22px; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 0.95rem; flex: 1; align-content: start; }
.price-points li { position: relative; padding-left: 26px; }
.price-points li::before { content: "✓"; position: absolute; left: 0; color: var(--green-600); font-weight: 900; }
.price-card .button, .price-card form, .price-card form .button { width: 100%; }
.price-done { margin: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--green-100); color: var(--green-800); font-weight: 800; font-size: 0.95rem; text-align: center; padding: 0 16px; }
/* Everything: the one to choose, so it stands out in the brand's dark green. */
.price-card-featured { background: var(--green-900); border-color: var(--green-900); color: #eaf6f0; box-shadow: var(--shadow); }
@media (min-width: 981px) { .price-card-featured { transform: translateY(-10px); } }
.price-card-featured h3, .price-card-featured .price-amount { color: var(--white); }
.price-card-featured .price-per, .price-card-featured .price-for { color: #cfe7dc; }
.price-card-featured .price-points { border-top-color: rgba(255, 255, 255, 0.18); }
.price-card-featured .price-points li::before { color: var(--lime); }
.price-flag { position: absolute; top: -13px; left: 22px; padding: 4px 12px; border-radius: 999px; background: var(--lime); color: var(--green-950); font-size: 0.74rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.pricing-assurances { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; font-size: 0.92rem; font-weight: 700; color: var(--green-800); }
.pricing-assurances li { position: relative; padding-left: 22px; }
.pricing-assurances li::before { content: "✓"; position: absolute; left: 0; color: var(--green-600); font-weight: 900; }

/* The launch offer banner (partials/launch-offer.php) */
.launch-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin: 0 0 34px; padding: 22px 26px; border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--green-950), var(--green-800)); color: #eaf6f0; box-shadow: var(--shadow); }
.launch-offer-text { flex: 1 1 420px; min-width: 0; }
.launch-offer-flag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: var(--green-950); font-size: 0.74rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.launch-offer h2, .launch-offer h3 { margin: 12px 0 8px; color: var(--white); font-size: clamp(1.5rem, 3vw, 2rem); }
.launch-offer p { margin: 0; color: #d6ece2; }
.launch-offer strong { color: var(--white); }
.promo-code { display: inline-block; padding: 1px 9px; border: 1px dashed var(--lime); border-radius: 6px; background: rgba(200, 241, 107, 0.12); color: var(--lime); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: 0.06em; }
.launch-offer-action { flex: 0 0 auto; }
@media (max-width: 560px) { .launch-offer { padding: 20px; } .launch-offer-action, .launch-offer-action .button, .launch-offer-action form { width: 100%; } }
.price-offer { margin: -10px 0 18px; padding: 6px 10px; border-radius: var(--radius-sm); background: rgba(200, 241, 107, 0.14); color: var(--lime); font-size: 0.88rem; font-weight: 800; }
/* The sale (partials/sale-offer.php) on light cards and notices, where lime text would not show */
.price-card:not(.price-card-featured) .price-offer { background: var(--green-100); color: var(--green-900); }
.notice .promo-code { border-color: var(--green-700); background: var(--white); color: var(--green-900); }
.unlock-sale { padding: 10px 14px; border-radius: var(--radius-md); background: rgba(200, 241, 107, 0.12); border: 1px solid rgba(200, 241, 107, 0.35); }
.hero-price-note strong { color: var(--green-800); }

/* Exam dates and study plans */
.exam-plan-title { margin-bottom: 2px; }
.exam-plan-steps { margin: 14px 0; padding-left: 1.4em; display: grid; gap: 8px; }
.exam-plan-steps a { font-weight: 750; white-space: nowrap; }
.exam-plan-focus-title { margin: 18px 0 8px; }
.exam-plan-topic { margin: 0; font-weight: 800; }
#exam-plan details summary { cursor: pointer; font-weight: 700; color: var(--green-800); width: fit-content; }
#exam-plan details summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.exam-date-form { display: grid; gap: 12px; max-width: 520px; margin-top: 12px; }
.exam-date-form .input, .exam-date-row .input { max-width: 220px; }
.exam-date-group { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.exam-date-group .level-group-title { margin-bottom: 4px; padding: 0; font-weight: 800; }
.exam-date-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 6px 16px; align-items: center; }
.exam-date-row .field-error { grid-column: 1 / -1; }
.exam-countdown { margin: 0 0 12px; }
@media (max-width: 560px) { .exam-date-row { grid-template-columns: 1fr; } }
