/* lawmint.net app-only styles (test player, review, results, checkout, dashboard, exam hub, admin). Loaded after core.css. */
.tests { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }.test { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.test > div { display: flex; flex-direction: column; min-width: 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.choice input, .opt input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--brand); }
/* player */
.pbar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--bg); padding: 8px 0; border-bottom: 1px solid var(--line); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; padding: 4px 10px; border-radius: 8px; background: var(--card); }
.timer.low { background: var(--red-bg); color: var(--red); }
.player { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 12px; }@media (min-width: 900px) { .player { grid-template-columns: 1fr 300px; } }
.opts { display: grid; gap: 8px; margin-top: 12px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--card); box-shadow: inset 0 0 0 1px var(--brand); }
.mark { flex: none; width: 1.2em; font-weight: 800; text-align: center; } .is-correct .mark { color: var(--green); } .is-wrong .mark { color: var(--red); }
.otext { min-width: 0; overflow-x: auto; position: relative; } .otext p { margin: 0; } .otext p + p { margin-top: .5em; }
.status { min-height: 1.5em; margin: 4px 0; font-size: .9rem; color: var(--muted); }
.side h3 { font-size: .85rem; margin: 12px 0 6px; color: var(--muted); }
.qnav ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.qnav a { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 6px; border: 1px solid var(--line); text-decoration: none; color: var(--fg); font-size: .9rem; font-variant-numeric: tabular-nums; }
.qnav a.answered, .qnav a.correct { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.qnav a.wrong { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.qnav a.revised { background: var(--amber-bg); color: var(--amber); }
.qnav a.unanswered { background: var(--bg); }
.qnav a.current { outline: 3px solid var(--fg); outline-offset: 1px; font-weight: 700; }
.side form { margin-top: 16px; }
.legend span { font-size: 1rem; } .legend .correct { color: var(--green); } .legend .wrong { color: var(--red); } .legend .unanswered { color: var(--muted); } .legend .revised { color: var(--amber); }
.dialog { max-width: 480px; margin: 10vh auto; border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: var(--card); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; } .facts dt { color: var(--muted); } .facts dd { margin: 0; }
.ropts { list-style: none; padding: 0; display: grid; gap: 8px; }
.ropt { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.ropt.is-correct { border-color: var(--green); background: var(--green-bg); }
.ropt.is-wrong { border-color: var(--red); background: var(--red-bg); }
.ropt .tag { font-size: .8rem; font-weight: 700; margin-top: 4px; }
.state { font-size: .8rem; padding: 2px 8px; border-radius: 99px; vertical-align: middle; margin-left: 6px; }
.state.correct { background: var(--green-bg); color: var(--green); } .state.wrong { background: var(--red-bg); color: var(--red); }
.state.unanswered { background: var(--grey-bg); color: var(--fg); } .state.revised { background: var(--amber-bg); color: var(--amber); }
.explanation { border-top: 1px solid var(--line); margin-top: 16px; }
.chart svg { width: 100%; background: var(--card); border-radius: 8px; }
.chart text { fill: var(--muted); font-size: 12px; }
.chart .grid { stroke: var(--line); } .chart .series { fill: none; stroke: var(--brand); stroke-width: 2.5; }
.chart circle { fill: var(--brand); } .chart .trend { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 5; }
.chart figcaption { font-size: .85rem; color: var(--muted); }
/* section table: fits a 360 px phone */
.keys { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; color: var(--muted); }
.keys b { color: var(--fg); margin-right: 3px; } .keys b.ok { color: var(--green); } .keys b.no { color: var(--red); } .keys b.skip-mark { color: var(--muted); } .skip-mark { color: var(--muted); }
.sw { display: inline-block; width: .8em; height: .8em; border-radius: 2px; margin: 0 3px 0 6px; vertical-align: -1px; }
.sw:first-child { margin-left: 0; } .sw.red { background: var(--red-bg); outline: 1px solid var(--red); } .sw.amber { background: var(--amber-bg); outline: 1px solid var(--amber); } .sw.green { background: var(--green-bg); outline: 1px solid var(--green); }
table.sections { table-layout: auto; }
table.sections th, table.sections td { padding: 8px 6px; }
table.sections .n, table.sections td { text-align: center; white-space: nowrap; }
table.sections thead .n { font-size: 1.05rem; }
table.sections tbody th, table.sections tfoot th { font-weight: 600; font-size: .9rem; line-height: 1.3; }@media (max-width: 480px) { table.sections { font-size: .85rem; } table.sections th, table.sections td { padding: 7px 3px; } table.sections tbody th, table.sections tfoot th { font-size: .82rem; hyphens: auto; } }
.qcol { min-width: 0; }
.endbar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--line); text-align: center; }
.endbar form { margin: 0; }
.endbar p { flex-basis: 100%; margin: 8px 0 0; }
.card.course p { margin: .3em 0 0; }
.tabs.course { overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.facts-list { padding-left: 1.2em; } .facts-list li { margin: .25em 0; }
.accessbox { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.accessbox.ok { border-color: var(--green); }
.accessbox p { margin-top: 0; }
.syllabus li { margin: .2em 0; }
.test.locked strong { color: var(--muted); }
/* flags */
.qhead { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.flagform { margin: 0; }
.btn.flag { min-height: 40px; padding: 6px 14px; font-size: .9rem; gap: 8px; }
.btn.flag.on { border-color: #d92d20; color: #d92d20; }
.qnav a { position: relative; }
/* Flagged: a red corner, top right of the number box (as in Moodle) */
.qnav a { overflow: hidden; }
.qnav a.flagged { border-color: #d92d20; }
.qnav a.flagged::after, .flagcorner::after { content: ""; position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 14px 14px 0; border-color: transparent #d92d20 transparent transparent; }
.flagcorner { position: relative; display: inline-block; width: 18px; height: 14px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; vertical-align: -2px; }
.flaglist { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.flaglist .btn { min-width: 44px; }
table.sections thead .n .ico { width: 1.15em; height: 1.15em; }
.keys li { display: inline-flex; align-items: center; gap: 4px; }
.keys .ico { color: var(--fg); } .keys .ico.ok { color: var(--green); } .keys .ico.no { color: var(--red); } .keys .ico.skip-mark { color: var(--muted); } .ico.skip-mark { color: var(--muted); }
.mark .ico { width: 1.1em; height: 1.1em; vertical-align: -0.2em; }
/* prices and checkout */
.prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0 0 4px; }
.prices s { color: var(--muted); font-size: 1.05rem; }
.prices .pay { font-size: 1.8rem; font-weight: 800; color: var(--fg); }
.checkout { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }@media (min-width: 760px) { .checkout { grid-template-columns: 300px 1fr; } }
.billing fieldset { display: grid; gap: 12px; }
.billing label { display: grid; gap: 4px; font-weight: 600; }
.billing input, .billing select { font: inherit; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.billing .small { font-weight: 400; }
.upgrades .card { flex-direction: row; align-items: center; }
table.orders td form { display: inline-block; margin: 2px; }
.facts-t { width: 100%; border-collapse: collapse; }
.facts-t th { width: 9.5em; text-align: left; font-weight: 700; background: var(--card); padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.facts-t td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.facts-t tr:last-child th, .facts-t tr:last-child td { border-bottom: 0; }
.legend-sq { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .95rem; }
.legend-sq li { display: inline-flex; align-items: center; gap: 6px; }
.sq { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.b-ok { background: var(--bar-ok); } .b-no { background: var(--bar-no); } .b-skip { background: var(--bar-skip); } .b-rev { background: var(--bar-rev); }
.sp { list-style: none; padding: 0; margin: 0; }
.sp-head, .sp-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) 76px 86px; gap: 6px 16px; align-items: center; }
.sp-head { width: 100%; font-size: .9rem; color: var(--muted); padding: 6px 0; border-bottom: 1px solid var(--line); }
.sp-head span:nth-child(n+3) { text-align: right; }
.sp-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sp-row.total { border-bottom: 0; } .sp-row.total .sp-title { font-weight: 700; }
.sp-name, .sp-out, .sp-ans, .sp-acc { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-ans, .sp-acc { align-items: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.sp-ans strong, .sp-acc strong { font-size: 1.05rem; }@media (max-width: 720px) { .sp-head { display: none; } .sp-row { grid-template-columns: 1fr 1fr; } .sp-name, .sp-out { grid-column: 1 / -1; } .sp-ans { align-items: flex-start; text-align: left; } .sp-ans::before { content: "Answered"; font-size: .8rem; color: var(--muted); } .sp-acc::before { content: "Accuracy"; font-size: .8rem; color: var(--muted); } .facts-t th { width: 7em; } }

/* Checkout: warning box (Bootstrap-like), invalid fields, GSTIN toggle, payment methods. */
.alert-warn { background: #fff3cd; border: 1px solid #ffe69c; color: #664d03; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.alert-warn p { margin: 0 0 4px; } .alert-warn ul { margin: 0; padding-left: 20px; }
:root[data-theme="dark"] .alert-warn { background: #332701; border-color: #997404; color: #ffda6a; }
.billing .field.invalid input, .billing .field.invalid select { border: 2px solid var(--red); background: var(--red-bg); }
.billing .field-error { color: var(--red); font-weight: 600; font-size: .9rem; }
.billing label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; }
.billing label.check input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--brand); }
.billing .gstin-field { display: none; }
.billing:has(#has-gstin:checked) .gstin-field, .billing .gstin-field.invalid { display: grid; }
.methods { margin: 18px 0 0; } .methods img { display: block; max-width: 100%; height: auto; }

/* Long test lists: collapsible sets of 10; "+" turns into "×" when open. */
.testset { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; background: var(--card); }
.testset > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; min-height: 48px; }
.testset > summary::-webkit-details-marker { display: none; }
.testset > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.testset .ts-title { font-weight: 700; }
.testset .ts-icon { margin-left: auto; width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--brand); font-size: 1.3rem; line-height: 1; font-weight: 700; }
.testset .ts-icon::before { content: "+"; }
.testset[open] .ts-icon::before { content: "×"; }
.testset > ul.tests { margin: 0; padding: 0 12px 12px; }
.contact-form { max-width: 40rem; }
.billing textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); resize: vertical; }

/* Report an error (under each question). */
.report { margin: 14px 0 4px; }
.report > summary { cursor: pointer; color: var(--muted); font-size: .92rem; width: max-content; }
.report > summary:hover { color: var(--red); }
.report[open] > summary { color: var(--fg); font-weight: 600; margin-bottom: 8px; }
.report form { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--card); display: grid; gap: 10px; max-width: 40rem; }

/* My courses. */
.mycourses { list-style: none; padding: 0; display: grid; gap: 10px; max-width: 46rem; }
.mycourses li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: var(--card); }
.mycourses li > span { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Admin inbox. */
.admin-nav { margin-bottom: 8px; }
.inbox { list-style: none; padding: 0; display: grid; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: var(--card); }
.msg.new { border-left: 4px solid var(--brand); }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.msg-body { white-space: normal; }
.snap { white-space: pre-wrap; font-size: .85rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.orders-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; } .orders-filter label { display: grid; gap: 2px; font-size: .9rem; } .health p { margin: 6px 0; }

/* Renewal reminder pop-up (no JavaScript: buttons are links and forms). */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 20, 30, .55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; max-width: 34rem; width: 100%; max-height: 90vh; overflow: auto; padding: 20px 22px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.modal h2 { margin-top: 0; }
.modal .reminders { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 14px; }
.modal .reminders li { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.modal .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.modal .actions form, .modal form.later { margin: 0; }

/* Student dashboard (chart, calendar and bar pieces). */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis, .chart .label { fill: var(--muted); font-size: 11px; }
.chart .label { fill: var(--fg); font-weight: 700; font-size: 12px; }
.chart .line { stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.chart .area { fill: var(--brand); opacity: .10; }
.chart .qline { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .dot { fill: var(--brand); stroke: var(--bg); stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart .pt:hover .dot { r: 6.5; }
.sb-track { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.sb-fill { display: block; height: 100%; background: var(--brand); border-radius: 5px; }
.cal { max-width: 100%; height: auto; }
.cal .lv0, .sq.lv0 { fill: var(--line); background: var(--line); }
.cal .lv1, .sq.lv1 { fill: color-mix(in srgb, var(--brand) 30%, var(--card)); background: color-mix(in srgb, var(--brand) 30%, var(--card)); }
.cal .lv2, .sq.lv2 { fill: color-mix(in srgb, var(--brand) 55%, var(--card)); background: color-mix(in srgb, var(--brand) 55%, var(--card)); }
.cal .lv3, .sq.lv3 { fill: color-mix(in srgb, var(--brand) 78%, var(--card)); background: color-mix(in srgb, var(--brand) 78%, var(--card)); }
.cal .lv4, .sq.lv4 { fill: var(--brand); background: var(--brand); }
.cal-legend .sq { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin: 0 1px; }

/* Figure zoom (player.js). */
img.zoomable { cursor: zoom-in; }
.zoom { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 18, .88); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.zoom[hidden] { display: none; }
.zoom img { max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; border-radius: 6px; object-fit: contain; }
.zoom-close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.zoom-close:focus-visible { outline: 3px solid var(--focus); }
.refund summary { cursor: pointer; color: var(--muted); }@media (max-width: 560px) { .chart .axis { font-size: 19px; } }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.dash-head h1 { margin: 0; }
.dash-period { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.dash-period a { padding: 6px 10px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 600; }
.dash-period a[aria-current="page"] { background: var(--bg); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 16px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 14px 16px; display: grid; gap: 6px; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.kpi-ico { color: var(--brand); font-size: 1.15rem; display: inline-flex; }
.kpi-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kpi-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .8rem; color: var(--muted); }
.dash-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.dash-main, .dash-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.dash-grid .panel { margin: 0; border-radius: 14px; }
.dash-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dash-ph h2 { margin: 0 0 10px; font-size: 1.05rem; }
.dash-trend-wrap { display: grid; gap: 8px; }@media (min-width: 700px) { .dash-trend-wrap { grid-template-columns: 11rem minmax(0, 1fr); align-items: end; } }
.dash-big { display: grid; gap: 4px; align-content: end; }
.dash-big-value { font-size: 2.3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.dash-big .chg { justify-self: start; }
.dash-trend { position: relative; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.dash-tip { position: absolute; pointer-events: none; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: .8rem; box-shadow: 0 6px 18px rgba(0,0,0,.12); white-space: nowrap; transform: translate(-50%, -115%); display: grid; gap: 1px; }
.dash-tip[hidden] { display: none; }
.dash-tip strong { font-size: .95rem; }
.dash-inset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 14px; background: var(--bg); }
.dash-inset h3 { margin: 0 0 10px; font-size: .9rem; color: var(--muted); }
.cprog { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.cprog li { display: grid; gap: 4px; }
.cprog a { text-decoration: none; color: var(--fg); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.cp-name { font-size: .85rem; color: var(--muted); }
.cp-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.cp-bar span { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.dtable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dtable th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.dtable td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable .n { text-align: right; font-variant-numeric: tabular-nums; }
.dtable .sb-track { display: block; min-width: 80px; }
.dtable .pill-pct { white-space: nowrap; }
.dtable .pill-pct .ico { vertical-align: -2px; }
.wdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 170px; }
.wd { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; gap: 4px; }
.wd-n { font-size: .8rem; font-weight: 700; min-height: 1.1em; }
.wd-bar { display: flex; align-items: flex-end; justify-content: center; background: var(--line); border-radius: 8px; overflow: hidden; }
.wd-bar span { display: block; width: 100%; background: color-mix(in srgb, var(--brand) 35%, var(--card)); border-radius: 8px; }
.wd.busiest .wd-bar span { background: var(--brand); }
.wd-name { font-size: .78rem; color: var(--muted); }
.wd.busiest .wd-name { color: var(--brand); font-weight: 700; }
.gauge { width: 100%; max-width: 260px; display: block; margin: 0 auto; }
.gauge line { stroke-width: 5; stroke-linecap: round; }
/* Gauge zones: brighter mark colours than the text tokens (status colours, with a label beside them). */
.gauge { --z-red: #d23f5b; --z-amber: #e3a008; --z-green: #138a6c; } /* validated: dataviz validate_palette, light and dark */
:root[data-theme="dark"] .gauge { --z-red: #e45b75; --z-amber: #bd8b00; --z-green: #16a07e; }
.gauge .on-r { stroke: var(--z-red); }
.gauge .on-a { stroke: var(--z-amber); }
.gauge .on-g { stroke: var(--z-green); }
.gauge .off { stroke: var(--line); }
.gauge .tg { stroke: var(--fg); stroke-width: 6; }
.gauge .g-val { font-size: 34px; font-weight: 800; fill: var(--fg); }
.g-note { text-align: center; color: var(--muted); font-size: .85rem; margin: 2px 0 0; }.otext, .explanation { overflow-wrap: anywhere; }.otext .katex { white-space: nowrap; }
.exam-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.exam-cards a { display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--fg); text-decoration: none; box-shadow: var(--shadow); }
.exam-cards a:hover { border-color: var(--action); }
.ec-name { font-weight: 600; font-size: 1.1rem; } .ec-meta { color: var(--muted); font-size: .9rem; }
.exam-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.exam-head h1 { margin: .2em 0; }
.exam-tabs { position: sticky; top: 61px; z-index: 10; background: var(--bg); overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.exam-tabs a { white-space: nowrap; }
.exam-intro .lead { font-size: 1.1rem; max-width: 48rem; }
.fact-chips { list-style: none; padding: 0; margin: 12px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.fact-chips li { background: var(--sand); border-radius: 999px; padding: 6px 14px; font-size: .92rem; }
.what-cards { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.what-cards li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.wc-n { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--brand); font-variant-numeric: tabular-nums; }
.btn.lock { color: var(--muted); }
.unlock-note { background: var(--action-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0; }
.test-block h2 { margin-top: 1.2em; }
.plans { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: stretch; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.plan.best { border: 2px solid var(--action); }
.plan h2 { margin: 0; font-size: 1.15rem; }
.ribbon { position: absolute; top: -12px; left: 18px; background: var(--highlight); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
:root[data-theme="dark"] .ribbon { color: #160b04; }
.plan-price { margin: 6px 0 0; font-size: 1rem; } .plan-price strong { font-size: 2rem; font-weight: 700; } .plan-price s { color: var(--muted); }
/* Phones: the exam's main action stays reachable at the bottom. */
.sticky-cta { display: none; }@media (max-width: 720px) { .exam-head > .btn, .exam-head > form { display: none; } .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.06); } .sticky-cta .btn, .sticky-cta form, .sticky-cta button { width: 100%; } body:has(.sticky-cta) .site-foot { padding-bottom: 90px; } }.accessbox, .testset, .msg, .mycourses li, .kpi { border-radius: var(--radius); }.accessbox { background: var(--card); box-shadow: var(--shadow); }
.test .badge-free, .exam-cards .badge-free { width: max-content; justify-self: start; }.msg-body, .explanation { line-height: 1.75; }.explanation p { margin: 0 0 1em; }

/* Player bar: title, answered progress, timer pill. */
.pbar { top: 61px; padding: 10px 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.pb-title { display: grid; gap: 6px; min-width: 0; flex: 1; }
.pb-title strong { font-weight: 600; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; max-width: 28rem; }
.pb-progress span { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.timer { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--ink-fg); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.timer.practice { background: var(--sand); color: var(--muted); font-size: .9rem; }
.timer:has(.low) { background: var(--red); color: #fff; }
:root[data-theme="dark"] .timer:has(.low) { color: #1a0505; }

/* Question card. */
.player { gap: 20px; margin-top: 16px; }@media (min-width: 900px) { .player { grid-template-columns: minmax(0, 1fr) 300px; } }
.qcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px clamp(16px, 3vw, 26px) 16px; box-shadow: var(--shadow); }
.qcard .qhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 6px; }
.qnum { font-weight: 600; font-size: .95rem; }
.qsec { margin: 0 0 4px; }
.qcard fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.qcard .stem { font-size: 1.08rem; margin: 4px 0 16px; }
.btn.flag { min-height: 36px; padding: 5px 12px; font-size: .88rem; border-radius: 999px; }
.opts { gap: 10px; }
.opt { position: relative; align-items: center; gap: 12px; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--muted); background: var(--bg); }
.opt input[type=radio] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 2px solid var(--muted); border-radius: 50%; display: grid; place-items: center; }
.opt input[type=radio]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .12s; }
.opt input[type=radio]:checked { border-color: var(--ink); }
.opt input[type=radio]:checked::before { transform: scale(1); }
.opt input[type=radio]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt:has(input:checked) { border-color: var(--ink); background: var(--sand); box-shadow: none; }
.otext p { margin: 0; }
.qactions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.qactions .btn.ink, .qactions > .btn:last-child { margin-left: auto; }
.status { min-height: 1.3em; margin: 6px 0; }@media (max-width: 720px) { .qactions { position: sticky; bottom: 0; z-index: 5; background: var(--card); margin: 0 -16px -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); } .pbar { top: 0; } }

/* Navigator side card. */
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }@media (min-width: 900px) { .side-card { position: sticky; top: 130px; } }
.side-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.side .qnav h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 6px; }
.qnav ol { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.qnav a { min-height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; }
.qnav a:hover { border-color: var(--muted); }
.qnav a.answered { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.qnav a.correct { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.qnav a.current { outline: 3px solid var(--action); outline-offset: 1px; }
.qlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; color: var(--muted); }
.qlegend span { display: inline-flex; align-items: center; gap: 6px; }
.qlegend .sw { position: relative; display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
.qlegend .sw.answered { background: var(--ink); border-color: var(--ink); }
.qlegend .sw.correct { background: var(--green-bg); border-color: var(--green); }
.qlegend .sw.wrong { background: var(--red-bg); border-color: var(--red); }
.qlegend .sw.revised { background: var(--amber-bg); border-color: var(--amber); }

/* End bar. */
.endbar { margin-top: 20px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); background: transparent; }

/* Review. */
.review .stem { margin-bottom: 14px; }
.ropts { gap: 10px; margin: 0 0 14px; }
.ropt { align-items: flex-start; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.ropt .mark { margin-top: 2px; }
.ropt.is-correct { border-color: var(--green); background: var(--green-bg); }
.ropt.is-wrong { border-color: var(--red); background: var(--red-bg); }
.ropt .tag { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.explanation { border-top: 0; margin-top: 4px; background: var(--sand); border-radius: 12px; padding: 4px 18px 6px; }
.explanation h3 { margin: 12px 0 6px; font-size: .95rem; }
.state { font-weight: 600; }

/* Results summary. */
.res-hero { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin: 4px 0 16px; }@media (min-width: 760px) { .res-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); } }
.res-score, .res-tiles > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: grid; gap: 4px; align-content: start; }
.res-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin: 0; }
.res-big { font-size: 3rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.res-big small { font-size: 1.4rem; color: var(--muted); font-weight: 600; }
.res-pct { font-size: 1.1rem; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.res-pct .pill-pct .ico { vertical-align: -2px; }
.res-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.res-tiles strong { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.res-tiles strong small { font-size: 1rem; color: var(--muted); }
.res-tiles .res-time { font-size: 1.25rem; }
.res-details > summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
.res-details[open] > summary { margin-bottom: 10px; }
.facts-t th { background: var(--sand); }@media (min-width: 760px) { .checkout { grid-template-columns: 320px minmax(0, 1fr); gap: 22px; } .co-summary { position: sticky; top: 80px; } }
.co-summary { background: var(--sand); box-shadow: none; border-color: transparent; padding: 18px 20px; }
.co-summary .co-title { margin: 2px 0 10px; font-size: 1.15rem; }
.billing { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px clamp(16px, 3vw, 24px); box-shadow: var(--shadow); }
.billing fieldset { border: 0; padding: 0; margin: 0 0 6px; }
/* Clear space above a form's button (owner, 22 Nov 2026): after a fieldset or a field, on every form. */
.billing :is(fieldset, .field) + .btn { margin-top: 18px; }
.billing legend { font-weight: 600; font-size: 1.1rem; padding: 0; margin-bottom: 10px; }
.billing input, .billing select, .billing textarea { border-radius: 10px; border-width: 1.5px; background: var(--bg); }
.billing input:focus, .billing select:focus, .billing textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.billing label { font-weight: 500; font-size: .95rem; }
.co-pay { width: 100%; min-height: 50px; font-size: 1.05rem; }
.co-secure { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 10px 0 0; }
.methods { display: flex; justify-content: center; }
/* Pay page, payment result, confirm and paused dialogs. */
.dialog { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 24px clamp(18px, 4vw, 30px); }
#pay { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); max-width: 30rem; }
/* Phones: the three answering buttons stay on one row; result tiles three across. */
.res-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }@media (max-width: 720px) { .qactions { flex-wrap: nowrap; gap: 6px; } .qactions .btn { padding-inline: 12px; white-space: nowrap; } .res-tiles { gap: 8px; } .res-tiles > div { padding: 12px; } .res-tiles strong { font-size: 1.35rem; } .res-tiles .res-time { font-size: 1.05rem; } }
/* Small pills sit on the text line and wrap with it. */
.t-title { display: block; }.test .badge-free { display: inline-block; width: auto; vertical-align: 2px; white-space: nowrap; margin-left: 4px; }
/* Signed-out sample dashboard and My courses. */
.dash-sample { background: var(--sand); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 16px; }
.dash-sample p { margin: 0 0 10px; }
.dash-sample-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
/* Weekday bars: every count label has the same height, so full bars line up. */
.wd-n { height: 1.3rem; line-height: 1.3rem; min-height: 0; }
/* Phones: dashboard cards never wider than the screen (the inner grids' auto column took the chart's width). */
.dash-main, .dash-side { grid-template-columns: minmax(0, 1fr); }
.dash-grid .panel { min-width: 0; }
.dash-trend svg.chart { max-width: 100%; }
/* Phones: dashboard tables drop secondary columns instead of scrolling sideways. */
.dt-recent td:nth-child(2) { white-space: nowrap; }@media (max-width: 560px) { .dt-subj th:nth-child(3), .dt-subj td:nth-child(3), .dt-subj th:nth-child(2), .dt-subj td:nth-child(2) { display: none; } .dt-subj .sb-track { min-width: 48px; } .dt-recent th:nth-child(3), .dt-recent td:nth-child(3), .dt-recent th:nth-child(5), .dt-recent td:nth-child(5) { display: none; } .dtable td, .dtable th { padding-inline: 6px; } }

/* Player and review in the logo colour (owner, 21 Nov 2026): answered squares, the chosen option and Next. */
.btn.logo { background: var(--logo); color: var(--logo-fg); border-color: var(--logo); }
.btn.logo:hover { background: var(--logo-hover); border-color: var(--logo-hover); }
.qnav a.answered, .qlegend .sw.answered { background: var(--logo); color: var(--logo-fg); border-color: var(--logo); }
.opt:has(input:checked) { border-color: var(--logo); background: color-mix(in srgb, var(--logo) 9%, var(--card)); }
.opt input[type=radio]:checked { border-color: var(--logo); }
.opt input[type=radio]::before { background: var(--logo); }
/* Report an error sits well below the answer buttons, so a thumb aiming at Previous doesn't open it. */
.qcard .report { margin-top: 28px; }
@media (max-width: 720px) { .qcard .report { margin-top: 36px; } }
/* Review: breathing room between the explanation and the buttons. */
.review .qactions { margin-top: 24px; }
/* Owner, 22 Nov 2026: renewal and upgrade offers stand out; the payment box is centred and hides Pay while confirming. */
.renewbox { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.renewbox .prices s, .plan-renew s { color: var(--muted); }
.plan-renew { margin: 8px 0 4px; } .plan-renew strong { font-size: 1.25rem; }
.upgrades .card.upgrade-card { border: 2px solid var(--action); }
.plan.upgrade { border: 2px solid var(--action); }
.pay-dialog { text-align: center; }
.pay-dialog [hidden] { display: none !important; }
.contact-page { max-width: 40rem; margin-inline: auto; }
.contact-page .prose { max-width: none; }
.contact-page .contact-form { margin-inline: auto; }
/* Dashboard order (owner, 22 Nov 2026): accuracy target, most active day and practice calendar first, then the
   score trend, the summary tiles, subjects and recent tests, each full width. */
.dash-grid > .kpis { margin: 0; }
.dash-top { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: stretch; }
.dash-top .panel { margin: 0; border-radius: 14px; }
.dash-top .wdays { height: 150px; }
@media (min-width: 700px) { .dash-trend-wrap { grid-template-columns: 10rem minmax(0, 1fr); } }
/* Score trend in the fin.ai style. */
.trend-chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 6 6; }
.trend-chart .axis { font-size: 13px; letter-spacing: .02em; }
.trend-chart .xl { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .12em; }
.trend-chart .line { stroke: var(--action); stroke-width: 2.5; }
.trend-chart .area { opacity: 1; fill: url(#trend-fill); }
.trend-chart .tf0 { stop-color: var(--action); stop-opacity: .95; }
.trend-chart .tf1 { stop-color: var(--action); stop-opacity: .55; }
.trend-chart .tf2 { stop-color: var(--action); stop-opacity: 0; }
.trend-chart .dot { fill: var(--card); stroke: var(--action); stroke-width: 2; }
.trend-chart .qline { stroke: var(--fg); opacity: .55; }
@media (max-width: 560px) { .dash-trend { overflow-x: auto; -webkit-overflow-scrolling: touch; } .trend-chart { min-width: 620px; } .trend-chart .axis { font-size: 18px; } .trend-chart .xl { font-size: 16px; } }
.dash-top .dash-ph { flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 10px; }
.dash-top .dash-ph h2 { margin: 0; }
/* Qualifying mark: a centred pill on the dashed line, readable over the orange area (owner, 22 Nov 2026). */
.trend-chart .qpill rect { fill: var(--card); stroke: var(--line); }
.trend-chart .qpill text { fill: var(--fg); font-size: 14px; font-weight: 700; }
@media (max-width: 560px) { .trend-chart .qpill text { font-size: 17px; } }
/* Exam tabs on the dashboard (owner, 22 Nov 2026). */

/* Practice calendar key on its own line, never split (owner, 22 Nov 2026). */
.cal-legend { margin: 6px 0 0; }
.cal-key { white-space: nowrap; margin-top: 2px; }
/* Course tabs with a "More courses" drop-down (owner, 22 Nov 2026). */
.dash-exams-wrap { display: flex; align-items: stretch; gap: 8px; border-bottom: 1px solid var(--line); margin: 0 0 16px; }
.dash-exams-wrap .dash-exams { flex: 1 1 auto; min-width: 0; margin: 0; border-bottom: 0; flex-wrap: wrap; }
.dash-exams.js-fit { flex-wrap: nowrap; overflow: hidden; }
.dash-exams a { white-space: nowrap; }
.dash-more { position: relative; flex: none; align-self: center; }
.dash-more[hidden] { display: none; }
.dash-more summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .9rem; white-space: nowrap; background: var(--card); }
.dash-more summary::-webkit-details-marker { display: none; }
.dash-more summary::after { content: " ▾"; font-size: .8em; color: var(--muted); }
.dash-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 200px; display: grid; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.dash-more-menu a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--fg); font-weight: 600; white-space: nowrap; }
.dash-more-menu a:hover { background: var(--sand); }
/* Course pages (owner, 22 Nov 2026): every tab's text spans the full content width, in line with the tabs and the price box; the price box is only as wide as its content. */
.course-body .prose { max-width: none; }


/* Icons before level-2 headings (owner, 22 Nov 2026): smaller in panel and card headings; centred in the checkout box. */
.dash-ph h2.with-ico, .plan h2.with-ico { gap: 8px; }
.dash-ph h2 .h-ico svg, .plan h2 .h-ico svg, h2.small-head .h-ico svg { width: 22px; height: 22px; }
h2.co-title.with-ico { justify-content: center; }

/* Sign-in page (owner, 22 Nov 2026): one narrow centred column. */
.login-page { max-width: 420px; margin: 0 auto; }
.login-form { margin-top: 28px; }
