/* =====================================================================
   App pages: login, checkout, student dashboard, exam, results, admin.
   Uses the colour variables from styles.css.
   ===================================================================== */
.draft-bar { background: var(--soon-bg); color: var(--soon-text); font-size: var(--fs-sm); text-align: center; padding: 6px 16px; }
.draft-bar a { color: inherit; font-weight: 700; }

.page { padding-top: clamp(28px, 5vw, 56px); padding-bottom: 72px; }
.page h1 { font-size: var(--fs-xl); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card h2 { font-size: var(--fs-md); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1.3fr 1fr; align-items: start; } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-weight: 700; font-size: .9375rem; }
.field .hint { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } .field-row.three { grid-template-columns: repeat(3, 1fr); } }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: 32px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.error-box { background: var(--bad-bg); color: var(--bad); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 14px; font-size: .9375rem; }
.error-box:empty { display: none; }
.ok-box { background: var(--ok-bg); color: var(--ok); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { min-height: 44px; padding: 0 16px; border: 0; background: none; font: 700 1rem var(--font-body); color: var(--text-muted); border-bottom: 3px solid transparent; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.demo-logins { font-size: var(--fs-sm); background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 18px; }
.demo-logins code { font-size: .85em; }

/* ---------- Checkout ---------- */
.pay-methods { display: grid; gap: 10px; }
.pay-method { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.pay-method:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.pay-method input { width: 20px; height: 20px; accent-color: var(--accent); }
.pay-method strong { display: block; }
.pay-method span { color: var(--text-muted); font-size: var(--fs-sm); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.summary-row:last-child { border-bottom: 0; }
.summary-total { font-weight: 700; font-size: var(--fs-md); }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 80; padding: 16px; }
.modal { background: var(--surface); color: var(--text); border-radius: var(--radius); max-width: 440px; width: 100%; padding: 24px; box-shadow: var(--shadow); }
.modal h2 { font-size: var(--fs-md); }
.steps-done { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.steps-done li { display: flex; gap: 10px; align-items: flex-start; }
.steps-done li::before { content: "\2713"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 13px; display: grid; place-items: center; margin-top: 2px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Student dashboard ---------- */
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.dash-head h1 { margin: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.status-pill.warn { background: var(--soon-bg); color: var(--soon-text); }
.test-group { margin-top: 28px; }
.test-group h2 { font-size: var(--fs-md); margin-bottom: 4px; }
.test-group > p { color: var(--text-muted); margin-bottom: 12px; }
.test-list { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .test-list { grid-template-columns: 1fr 1fr; } }
.test-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.test-card h3 { font-size: 1.125rem; margin: 0; }
.test-card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-sm); color: var(--text-muted); }
.test-card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.test-card.locked { background: var(--surface-2); }
.lock-note { font-size: var(--fs-sm); color: var(--text-muted); }
.history { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.history th, .history td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.history th { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 700; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Results ---------- */
.score-hero { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 760px) { .score-hero { grid-template-columns: auto 1fr; } }
.score-ring { width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.score-ring > div { width: 116px; height: 116px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.score-ring strong { font-family: var(--font-head); font-size: 2rem; line-height: 1; display: block; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: .9375rem; }
.bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.review-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: var(--surface); }
.review-item h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.review-opt { padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 6px; display: flex; gap: 10px; }
.review-opt.right { border-color: var(--ok); background: var(--ok-bg); }
.review-opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.review-opt .opt-why { display: block; margin-top: 4px; font-size: .9rem; line-height: 1.5; color: var(--text); }
.review-opt .opt-why b { color: var(--text-muted); font-weight: 700; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.warn { background: var(--soon-bg); color: var(--soon-text); }
.explain { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px; font-size: .9375rem; }

/* =====================================================================
   EXAM SCREEN — its own neutral, exam-centre look (light only, like
   testing-centre software). Change --ex-* to restyle.
   ===================================================================== */
.exam-body {
  --ex-bar: #2B4762; --ex-bar-ink: #F7F8FA; --ex-bg: #FAFAF7; --ex-panel: #F0F1ED; --ex-line: #CDD3D9;
  --ex-text: #1E2833; --ex-muted: #4F5966; --ex-accent: #2B4762; --ex-sel: #E1EAF3; --ex-flag: #A1530F; --ex-card: #FDFDFB;
  margin: 0; background: var(--ex-bg); color: var(--ex-text); font-family: Arial, Helvetica, sans-serif; font-size: 16px;
  height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; color-scheme: light;
}
:root[data-theme="warm"] .exam-body {
  --ex-bar: #3C4A5A; --ex-bg: #F4EEDF; --ex-panel: #EAE2CF; --ex-line: #D2C6AB; --ex-text: #2F2A22; --ex-muted: #5E5445;
  --ex-accent: #3C4A5A; --ex-sel: #E6DCC3; --ex-card: #F8F3E7; --ex-flag: #8F4A0C;
}
:root[data-theme="dark"] .exam-body {
  --ex-bar: #111719; --ex-bar-ink: #DADFDB; --ex-bg: #1B2023; --ex-panel: #22282B; --ex-line: #3A4347; --ex-text: #D9DEDA; --ex-muted: #A2ABA8;
  --ex-accent: #8DB4D9; --ex-sel: #24384A; --ex-card: #20262A; --ex-flag: #E0A162; color-scheme: dark;
}
:root[data-size="large"] .exam-body { font-size: 18px; }
:root[data-size="large"] .ex-opt { font-size: 18px; }
:root[data-size="xl"] .exam-body, :root[data-size="xl"] .ex-opt { font-size: 20px; }
.exam-top { background: var(--ex-bar); color: var(--ex-bar-ink); display: flex; align-items: center; gap: 16px; padding: 8px 16px; min-height: 52px; flex-wrap: wrap; }
.exam-title { font-weight: 700; font-size: 15px; margin-right: auto; }
.exam-top .ex-meta { font-size: 14px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ex-timer { font-variant-numeric: tabular-nums; font-weight: 700; background: rgba(255,255,255,.12); padding: 4px 10px; border-radius: 4px; }
.ex-timer.low { background: #B91C1C; }
.ex-mark { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; min-height: 36px; }
.ex-mark input { width: 18px; height: 18px; }
.exam-main { flex: 1; display: flex; min-height: 0; }
.ex-case { width: 42%; max-width: 560px; border-right: 2px solid var(--ex-line); background: var(--ex-panel); overflow: auto; padding: 16px 18px; }
.ex-case h2 { font-size: 16px; margin: 0 0 10px; font-family: inherit; }
.ex-case dl { margin: 0 0 12px; display: grid; grid-template-columns: 1fr; gap: 2px; }
.ex-case dt { font-weight: 700; font-size: 13px; color: var(--ex-muted); margin-top: 8px; }
.ex-case dd { margin: 0; font-size: 15px; }
.ex-case .pb-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ex-muted); margin: 14px 0 2px; padding-top: 10px; border-top: 1px solid var(--ex-line); font-family: inherit; }
.pb-fig { margin: 10px 0 0; }
.pb-fig figcaption { font-size: 13px; color: var(--ex-muted); margin-top: 4px; }
.ex-sections { margin: 0 0 20px; max-width: 820px; }
.ex-sections caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.ex-q { flex: 1; overflow: auto; padding: 24px clamp(16px, 4vw, 48px); }
.ex-q-inner { max-width: 820px; }
.ex-qnum { font-size: 13px; color: var(--ex-muted); margin-bottom: 8px; font-weight: 700; }
.ex-stem { font-size: 17px; line-height: 1.55; margin: 0 0 16px; }
.ex-hint { font-size: 13px; color: var(--ex-muted); margin: -8px 0 12px; }
.ex-img { max-width: 100%; max-height: 360px; border: 1px solid var(--ex-line); display: block; margin: 0 0 16px; cursor: zoom-in; }
.ex-table { border-collapse: collapse; margin: 0 0 16px; font-size: 15px; min-width: 280px; }
.ex-table caption { text-align: left; font-weight: 700; font-size: 13px; color: var(--ex-muted); padding-bottom: 4px; }
.ex-table th, .ex-table td { border: 1px solid var(--ex-line); padding: 6px 10px; text-align: left; }
.ex-table th { background: var(--ex-panel); }
.ex-opts { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.ex-opt { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--ex-line); border-radius: 4px; cursor: pointer; font-size: 16px; line-height: 1.5; background: var(--ex-card); }
.ex-opt:hover { background: #F8FAFC; }
.ex-opt:has(input:checked) { background: var(--ex-sel); border-color: var(--ex-accent); }
.ex-opt input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--ex-accent); }
.ex-opt .ltr { font-weight: 700; width: 18px; flex: none; }
.ex-opt.struck .txt { text-decoration: line-through; color: var(--ex-muted); }
.exam-bottom { background: var(--ex-bar); color: var(--ex-bar-ink); display: flex; align-items: center; gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
.ex-btn { min-height: 40px; padding: 0 16px; border: 1px solid rgba(255,255,255,.55); background: transparent; color: #fff; font: 700 14px Arial, sans-serif; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ex-btn:hover { background: rgba(255,255,255,.12); }
.ex-btn:disabled { opacity: .45; cursor: not-allowed; }
.ex-btn.solid { background: var(--ex-bar-ink); color: var(--ex-bar); border-color: var(--ex-bar-ink); }
.ex-spacer { flex: 1; }
.exam-body :focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }
.ex-screen { flex: 1; overflow: auto; padding: 32px clamp(16px, 5vw, 64px); }
.ex-screen h1 { font-family: inherit; font-size: 24px; margin: 0 0 16px; }
.ex-screen .prose p { margin: 0 0 12px; line-height: 1.6; max-width: 70ch; }
.ex-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 14px 16px; background: var(--ex-panel); border: 1px solid var(--ex-line); border-radius: 4px; margin: 16px 0 24px; max-width: 820px; font-size: 15px; }
.ex-primary { min-height: 44px; padding: 0 24px; background: var(--ex-bar); color: var(--ex-bar-ink); border: 0; border-radius: 4px; font: 700 15px Arial, sans-serif; cursor: pointer; }
.ex-secondary { min-height: 44px; padding: 0 20px; background: var(--ex-card); color: var(--ex-accent); border: 1px solid var(--ex-accent); border-radius: 4px; font: 700 15px Arial, sans-serif; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.rev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-width: 980px; margin: 12px 0 20px; }
.rev-cell { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--ex-line); border-radius: 4px; background: var(--ex-card); font: 14px Arial, sans-serif; cursor: pointer; text-align: left; color: var(--ex-text); }
.rev-cell:hover { background: var(--ex-sel); }
.rev-cell > span:first-child { white-space: nowrap; }
.rev-cell .st { font-size: 12px; color: var(--ex-muted); }
.rev-cell.unans .st { color: #B91C1C; font-weight: 700; }
.rev-cell.flag { border-color: var(--ex-flag); }
.rev-cell .fl { color: var(--ex-flag); font-weight: 700; }
.rev-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-dialog-back { position: fixed; inset: 0; background: rgba(17,24,39,.55); display: grid; place-items: center; padding: 16px; z-index: 90; }
.ex-dialog { background: var(--ex-card); color: var(--ex-text); max-width: 460px; width: 100%; border-radius: 6px; padding: 22px; font-family: Arial, sans-serif; }
.ex-dialog h2 { font-size: 18px; margin: 0 0 10px; font-family: inherit; }
.ex-dialog textarea { width: 100%; min-height: 90px; font: inherit; padding: 8px; border: 1px solid var(--ex-line); border-radius: 4px; }
.ex-dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.ex-zoom { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 95; padding: 16px; cursor: zoom-out; }
.ex-zoom img { max-width: 100%; max-height: 100%; }
@media (max-width: 760px) {
  .ex-btn { padding: 0 10px; font-size: 13px; }
  .exam-main { flex-direction: column; overflow: auto; }
  .ex-case { width: auto; max-width: none; border-right: 0; border-bottom: 2px solid var(--ex-line); max-height: 40vh; }
  .ex-q { overflow: visible; }
  .exam-top .ex-meta { gap: 10px; }
}

/* =====================================================================
   ADMIN
   ===================================================================== */
.admin-shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100vh - 68px); }
@media (min-width: 980px) { .admin-shell { grid-template-columns: 240px minmax(0, 1fr); } }
.admin-nav { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; }
.admin-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
@media (max-width: 979px) { .admin-nav { border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; } .admin-nav ul { display: flex; overflow-x: auto; gap: 4px; } .admin-nav .nav-section { display: none; } }
.admin-nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: .9375rem; white-space: nowrap; }
.admin-nav a:hover { background: var(--surface-2); }
.admin-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.admin-nav .count { margin-left: auto; font-size: .75rem; background: var(--bad); color: #fff; border-radius: 999px; padding: 1px 7px; }
.nav-section { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 14px 12px 4px; font-weight: 700; }
.admin-main:focus { outline: none; }
.admin-main { padding: clamp(16px, 3vw, 32px); min-width: 0; }
.admin-main h1 { font-size: var(--fs-lg); margin: 0 0 4px; }
.admin-main .sub { color: var(--text-muted); margin: 0 0 20px; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.admin-toolbar .input, .admin-toolbar .select { width: auto; min-width: 160px; flex: 1 1 180px; max-width: 320px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-family: var(--font-head); font-size: 1.8rem; line-height: 1.1; }
.stat span { color: var(--text-muted); font-size: var(--fs-sm); }
.dtable { width: 100%; border-collapse: collapse; font-size: .9375rem; background: var(--surface); }
.dtable th, .dtable td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dtable th { font-size: var(--fs-sm); color: var(--text-muted); background: var(--surface-2); position: sticky; top: 0; }
.dtable td.num, .dtable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dtable .clip { max-width: 420px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tbl-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: 70vh; }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 6px; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--bad); }
.opt-edit { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.opt-edit .ltr { font-weight: 700; width: 20px; }
.opt-edit label.check { font-size: var(--fs-sm); white-space: nowrap; }
.drawer-back { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70; display: flex; justify-content: flex-end; }
.drawer { background: var(--bg); width: min(760px, 100%); height: 100%; overflow: auto; padding: 24px clamp(16px, 3vw, 32px); box-shadow: var(--shadow); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.drawer-head h2 { margin: 0; font-size: var(--fs-lg); }
.drawer-foot { position: sticky; bottom: -24px; background: var(--bg); padding: 16px 0; border-top: 1px solid var(--border); display: flex; gap: 10px; flex-wrap: wrap; }
.help-note { background: var(--accent-soft); color: var(--text); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .9375rem; margin-bottom: 16px; }
.pre { white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8125rem; background: var(--surface-2); padding: 10px; border-radius: var(--radius-sm); max-height: 260px; overflow: auto; }
.preview-q { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 14px; background: var(--surface); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.split-cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .split-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- Invoice ---------- */
.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.inv-table { width: 100%; margin: 12px 0; }
@media print {
  .no-print, .draft-bar, .site-header, .chat { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 0; padding: 0; }
}

/* ---------- Exam: connection notice, watermark, copy protection ---------- */
.ex-net { background: #FEF3C7; color: #92400E; padding: 6px 16px; font-size: 14px; text-align: center; font-weight: 700; }
.ex-watermark { position: fixed; inset: -20%; pointer-events: none; overflow: hidden; opacity: .045; z-index: 5; transform: rotate(-24deg);
  display: flex; flex-direction: column; justify-content: space-around; font-size: 15px; white-space: nowrap; color: #000; user-select: none; }
:root[data-theme="dark"] .ex-watermark { color: #fff; }
.ex-q, .ex-case { -webkit-user-select: none; user-select: none; }
@media print { .exam-body .exam-main { display: none !important; } }
@media print { .admin-nav, .admin-toolbar, .btn-row, .dash-head .btn-row { display: none !important; } .admin-shell { display: block; } }
.ex-watermark span { display: block; width: 220%; }

/* Account buttons in the header: compact on phones */
[data-account] { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
@media (max-width: 520px) {
  [data-account] .btn-sm { min-height: 36px; padding: 0 12px; font-size: .875rem; }
  .site-header .header-inner { gap: 8px; }
}

/* Question editor: image drop area */
.img-drop { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 14px; border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.img-drop.over { border-color: var(--accent); background: var(--ok-bg); }
.img-thumb { width: 132px; height: 96px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; flex: none; }
.img-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- INBDE question and test builder ---------- */
.bulk-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 12px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius-sm); }
.bulk-bar .select, .bulk-bar .input { width: auto; min-width: 180px; max-width: 340px; }
.opt-edit5 { grid-template-columns: auto 1fr auto auto; }
.opt-edit5 .icon-btn[disabled] { opacity: .35; }
.lint { border: 1px solid var(--border-strong); border-left: 4px solid var(--soon-text); background: var(--soon-bg); color: var(--text); border-radius: var(--radius-sm); padding: 10px 14px; margin: 8px 0 14px; font-size: var(--fs-sm); }
.lint.bad { border-left-color: var(--bad); background: var(--bad-bg); }
.lint ul { margin: 6px 0 0; padding-left: 20px; }
.lint li { margin: 2px 0; }
.inbde-tags { box-shadow: none; margin: 8px 0 16px; }
.pb-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 18px 0 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.case-img { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.case-img img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); }
.case-qs, .qlist { margin: 0; padding: 0; list-style: none; }
.case-qs li, .qlist li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.case-qs .clip, .qlist .clip { flex: 1 1 260px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qlist .qn { font-weight: 700; min-width: 2.2em; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.qlist .qcase { font-weight: 700; font-size: var(--fs-sm); color: var(--accent); border-bottom: 0; padding-bottom: 0; }
.qlist .incase { padding-left: 14px; border-left: 3px solid var(--accent-soft); }
.qlist .btn-row { gap: 2px; margin: 0; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.preset { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.preset:hover, .preset:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.preset span { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.45; }
.sec-card { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; margin: 12px 0; background: var(--surface); }
.sec-head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 6px; }
.sec-head .s-title { flex: 1 1 220px; width: auto; }
.rule { border-top: 1px dashed var(--border); padding: 10px 0 6px; }
.rule-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.rule-row .select { width: auto; min-width: 200px; }
.rule-f { margin-top: 6px; }
.rule-f summary { cursor: pointer; color: var(--accent); }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 12px; margin: 8px 0; }
.chk-grid > b, .chk-grid > i { grid-column: 1 / -1; margin-top: 4px; }
.chk-grid .check { margin: 0; }
.bp-info { margin-top: 6px; line-height: 2; }
.warn-text { color: var(--soon-text); font-weight: 700; }
.danger-text { color: var(--bad); }
.cov-bar { display: inline-block; vertical-align: middle; position: relative; width: 160px; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.cov-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 99px; }
.cov-bar b { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--text); }
@media (max-width: 640px) {
  .case-img { grid-template-columns: 72px 1fr; }
  .case-img .btn-row { grid-column: 1 / -1; }
  .rule-row .select { min-width: 0; width: 100%; }
}
.case-review { margin: 0 0 10px; }
.case-review summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: var(--fs-sm); }
.rv-case { display: block; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.rv-case h2 { font-size: 1rem; margin: 0 0 6px; }
.rv-case dl { margin: 0 0 8px; }
.rv-case dt { font-weight: 700; font-size: .8rem; color: var(--text-muted); margin-top: 6px; }
.rv-case dd { margin: 0; }
.rv-case .pb-h { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 10px 0 0; }
.rv-case img { max-height: 200px; border-radius: 6px; }
.opt-edit5 .icon-btn, .rule-row .icon-btn, .case-img .icon-btn, .qlist .icon-btn, .case-qs .icon-btn { font-size: 22px; line-height: 1; width: 40px; height: 40px; }

/* ---------- Simpler admin ---------- */
.todo { border-left: 4px solid var(--accent); }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.todo-list li:last-child { border-bottom: 0; }
.todo-list li > span:nth-child(2) { flex: 1 1 320px; }
.todo-list .btn-row { margin: 0; gap: 6px; }
.status-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.stab { font: inherit; font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; min-height: 40px; }
.stab b { margin-left: 4px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.stab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stab.on b { color: var(--accent-ink); }
.more-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin: 8px 0 16px; background: var(--surface); }
.more-box > summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 4px 0; }
.more-box[open] > summary { margin-bottom: 10px; }
.todo-list li > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .todo-list li > span:nth-child(2) { flex-basis: calc(100% - 70px); }
  .status-tabs .small { flex-basis: 100%; }
}
.ex-resume { max-width: 820px; padding: 12px 16px; border-left: 4px solid #1C6B37; background: #DDF1E3; color: #10201F; border-radius: 4px; margin: 0 0 20px; }
.ex-watch-rule { max-width: 820px; padding: 12px 16px; border-left: 4px solid #9A5B00; background: #F8EBCF; color: #2A1A00; border-radius: 4px; margin: 0 0 20px; line-height: 1.5; }

/* ---------- Results: analysis and Ask AI ---------- */
.analysis h2 { margin-top: 0; }
.analysis h3 { font-size: 1rem; margin: 18px 0 8px; }
.analysis .lead-line { font-size: 1.0625rem; margin: 0 0 6px; }
.analysis .up { color: var(--ok); } .analysis .down { color: var(--bad); }
.an-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 24px; }
@media (min-width: 760px) { .an-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.an-chip { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-left-width: 5px; border-radius: var(--radius-sm); padding: 8px 12px; margin: 0 0 8px; cursor: pointer; }
.an-chip span { flex: 1; min-width: 0; }
.an-chip small { color: var(--text-muted); }
.an-chip.good { border-left-color: var(--ok); } .an-chip.good b { color: var(--ok); }
.an-chip.weak { border-left-color: var(--bad); } .an-chip.weak b { color: var(--bad); }
.an-chip:hover, .an-chip:focus-visible { background: var(--surface-2); }
.an-tips { margin: 0; padding-left: 20px; } .an-tips li { margin: 6px 0; line-height: 1.5; }
.details-h { margin: 28px 0 12px; font-size: 1.25rem; }
.rev-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.rev-filter .select { width: auto; min-width: 180px; }
.ask-ai { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.ask-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Results: downloadable report ---------- */
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: -8px 0 20px; }
.print-only { display: none; }
@media print {
  @page { margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #111 !important; font-size: 11pt; }
  .print-only { display: block; }
  .report-head { border-bottom: 2px solid #0F2747; margin-bottom: 12px; padding-bottom: 6px; }
  .report-head p { margin: 0 0 2px; }
  .rh-brand { font-weight: 700; font-size: 14pt; color: #0F2747; }
  .report-actions, .rev-filter, .ask-ai, .chat, .display-btn, #upsell, .analysis .btn-row, .skip-link, .site-header, #thanks .btn, .an-tip-note { display: none !important; }
  .card, .review-item, .explain, .review-opt { box-shadow: none !important; background: #fff !important; }
  .review-opt.right { background: #E8F5EC !important; } .review-opt.wrong { background: #FBEAEA !important; }
  #thanks { display: none !important; }
  .card { break-inside: auto; }
  .score-hero, .review-item, .review-opt, .explain, .an-chip { break-inside: avoid; page-break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Student report PDF = summary only; review text can't be selected/copied on screen. */
body.report-summary #review .review-item p, body.report-summary #review .review-opt, body.report-summary #review .explain { -webkit-user-select: none; user-select: none; }
.rs-watermark { opacity: .035; }
@media print {
  body.report-summary section[aria-labelledby="rev-title"] { display: none !important; }
  body:not(.report-summary) #print-qlist { display: none !important; }
  #print-qlist { margin-top: 16px; }
  #print-qlist table { width: 100%; font-size: 9.5pt; }
  #print-qlist tr { break-inside: avoid; }
  .rs-watermark { display: flex !important; position: fixed; opacity: .05; }
}

/* ---------- Study assistant ---------- */
.study-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin: 0 0 20px; border-radius: var(--radius); text-decoration: none; color: #F4F7F6;
  background: var(--navy); box-shadow: var(--shadow); }
.study-banner:hover { color: #fff; filter: brightness(1.05); }
.study-banner .sb-icon { font-size: 1.8rem; line-height: 1; }
.study-banner .sb-go { margin-left: auto; font-size: 1.4rem; }
.study-banner .small { color: rgba(244,247,246,.85); }
.sa-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 6px 0 12px; }
.sa-blocked { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--soon-bg); color: var(--soon-text); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
.sa-box { padding: 0; overflow: hidden; }
.sa-log { display: flex; flex-direction: column; gap: 12px; padding: 18px; min-height: 260px; max-height: 62vh; overflow-y: auto; background: var(--bg); }
.sa-msg { max-width: 92%; padding: 12px 16px; border-radius: 16px; line-height: 1.6; font-size: .975rem; }
.sa-msg p { margin: 0 0 .5em; } .sa-msg p:last-child { margin-bottom: 0; }
.sa-msg ul { margin: 0 0 .5em; padding-left: 1.2em; }
.sa-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.sa-user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.sa-cite { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35em; height: 1.35em; padding: 0 .3em; margin: 0 1px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: .75em; font-weight: 700; text-decoration: none; vertical-align: super; }
.sa-refs { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
.sa-refs-h { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 4px; }
.sa-refs ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sa-refs summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--text); }
.sa-num { display: inline-flex; min-width: 1.5em; justify-content: center; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: .8rem; margin-right: 4px; }
.sa-quote { margin: 6px 0 4px; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); font-size: .9rem; line-height: 1.55; border-radius: 0 8px 8px 0; -webkit-user-select: none; user-select: none; }
.sa-flash { outline: 2px solid var(--accent); border-radius: 8px; }
.sa-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; background: var(--bg); }
.sa-form { display: flex; gap: 10px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.sa-form textarea { flex: 1; min-width: 0; resize: vertical; min-height: 48px; max-height: 160px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--bg); color: var(--text); font: inherit; }
.sa-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.sa-answer .tag { margin-bottom: 4px; }
@media (max-width: 520px) { .sa-log { max-height: none; } .sa-msg { max-width: 100%; } }

/* ---------- My weak questions (My tests) ---------- */
.weak-card { margin: 0 0 24px; border-left: 4px solid var(--accent); }
.weak-card h2 { font-size: 1.25rem; margin: 0 0 4px; }
.weak-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.weak-nums { display: flex; gap: 16px; font-size: .95rem; }
.weak-nums b { font-size: 1.4rem; font-family: var(--font-head); margin-right: 4px; }
.weak-nums .ok b { color: var(--ok); }
.weak-bar { height: 8px; border-radius: 99px; background: var(--surface-2); margin: 12px 0 4px; overflow: hidden; }
.weak-bar span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.weak-subjects { border: 0; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.weak-subjects legend { margin-bottom: 6px; padding: 0; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; font-size: .9rem; background: var(--surface); }
.chip-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.chip-check input { accent-color: var(--accent); margin: 0; }

/* =====================================================================
   EdBoat v3 look for the app pages (design handoff, Nov 2026)
   ===================================================================== */
.page h1 { font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.25rem); }
.card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.card h2 { font-size: 1.5rem; }
.input, .select { border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--text) 16%, transparent); background: var(--surface); padding: 12px 20px; min-height: 48px; }
.textarea { border-radius: 20px; border: 1.5px solid color-mix(in srgb, var(--text) 16%, transparent); padding: 12px 18px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 0; border: 2px solid var(--accent); }
.field label, .field .label { font-weight: 600; font-size: .875rem; color: var(--text-muted); }
.error-box, .ok-box, .help-note, .demo-logins { border-radius: 20px; }
.tag { border-radius: 999px; padding: 4px 11px; font-size: .8125rem; }
.tag.info { background: var(--accent-soft); color: #183E80; }
:root[data-theme="dark"] .tag.info { color: var(--accent); }
.tag.warn { background: var(--gold-soft); color: var(--gold-ink); }
.status-pill { background: var(--accent-soft); color: #183E80; padding: 6px 14px; }
:root[data-theme="dark"] .status-pill { color: var(--accent); }
.status-pill.warn { background: var(--gold-soft); color: var(--gold-ink); }
.link-btn { color: var(--accent); }

/* Tabs as a segmented pill (log in / create account) */
.tabs { display: inline-flex; gap: 4px; border: 0; background: var(--surface-2); border-radius: 999px; padding: 5px; margin-bottom: 22px; }
.tab { border: 0; border-radius: 999px; min-height: 42px; padding: 0 20px; color: var(--text); font-weight: 600; font-size: .9375rem; }
.tab[aria-selected="true"] { background: var(--navy); color: #fff; border: 0; }

/* ---------- Log in: navy brand panel + form ---------- */
.auth-page { padding: 0; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100vh - 77px); }
@media (min-width: 980px) { .auth-split { grid-template-columns: 1fr 1fr; } }
.auth-brand { display: none; position: relative; overflow: hidden; background: var(--navy); color: #C9D4DD; padding: 56px clamp(32px, 5vw, 72px); flex-direction: column; justify-content: space-between; gap: 32px; }
@media (min-width: 980px) { .auth-brand { display: flex; } }
.auth-brand > * { position: relative; }
.auth-circle { position: absolute; right: -70px; bottom: -70px; width: 300px; height: 300px; border-radius: 50%; background: var(--navy-2); overflow: hidden; }
.auth-dot { position: absolute; right: 56px; top: 56px; width: 70px; height: 70px; border-radius: 50%; background: var(--gold); }
.auth-brand .footer-word { font-size: 2.25rem; margin: 0; }
.auth-pitch { display: flex; flex-direction: column; gap: 20px; max-width: 460px; }
.auth-pitch img { width: 120px; height: 120px; border-radius: 30px; }
.auth-pitch h2 { color: #fff; font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem); margin: 0; line-height: 1.08; }
.auth-pitch p { font-size: 1.125rem; margin: 0; }
.auth-foot { font-size: .875rem; color: #9FB0BF; margin: 0; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 56px) 16px; }
.auth-side .auth-wrap { width: 100%; max-width: 440px; }
.auth-side .card { background: transparent; box-shadow: none; padding: 0; }
.auth-side .btn-block { min-height: 54px; font-size: 1.0625rem; }

/* ---------- Student dashboard ---------- */
.dash-head h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); }
.weak-card { background: var(--navy); color: #C9D4DD; border: 0; border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 40px); position: relative; overflow: hidden; }
.weak-card h2 { color: #fff; font-size: 2rem; }
.weak-card .muted, .weak-card .small, .weak-card label, .weak-card legend { color: #C9D4DD; }
.weak-nums b { font-family: var(--font-head); font-weight: 400; font-size: 1.875rem; color: var(--gold); }
.weak-nums .ok b { color: #9DBDF5; }
.weak-bar { height: 12px; background: var(--navy-2); }
.weak-bar span { background: var(--sky); }
.weak-card .chip-check { background: transparent; border: 1.5px solid #3A5A78; color: #DCE6F5; }
.weak-card .chip-check:has(input:checked) { background: var(--sky); border-color: var(--sky); color: #0F2747; }
.weak-card .select { background: transparent; color: #fff; border-color: #3A5A78; }
.weak-card .select option { color: #201E1D; }
.weak-card .btn-primary { background: var(--gold); color: #3A2303; }
.weak-card .btn-primary:hover { background: #F5C063; color: #3A2303; }
.weak-card .btn-secondary { color: #fff; border-color: #3A5A78; }
.weak-card .btn-secondary:hover { border-color: var(--sky); color: var(--sky); }
.weak-card a:not(.btn) { color: var(--sky); }
.test-group h2 { font-size: 2rem; }
@media (min-width: 1000px) { .test-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.test-card { border: 0; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); gap: 12px; }
.test-card h3 { font-size: 1.4375rem; color: var(--heading); }
.test-card.is-open { box-shadow: inset 0 0 0 2px var(--gold), var(--shadow); }
.test-card.locked { background: var(--surface-2); box-shadow: none; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.history { font-size: 1rem; }
.history th { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; }
.history td { padding: 16px 8px; border-bottom-color: color-mix(in srgb, var(--text) 10%, transparent); }
.study-banner { background: var(--navy); border-radius: var(--radius); }

/* ---------- Results ---------- */
.score-ring { width: 220px; height: 220px; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.score-ring > div { width: 172px; height: 172px; background: var(--surface); }
.score-ring strong { font-family: var(--font-head); font-weight: 400; font-size: 3.5rem; color: var(--heading); }
.bar { height: 12px; border-radius: 999px; }
.bar > i { border-radius: 999px; background: var(--accent); }
.bar > i.low { background: var(--gold); }
.an-chip { border: 0; border-left-width: 0; border-radius: 999px; padding: 10px 16px; font-weight: 600; }
.an-chip.good { background: var(--accent-soft); }
.an-chip.good b { color: #183E80; }
.an-chip.weak { background: var(--gold-soft); color: #4A2C04; }
.an-chip.weak b { color: var(--gold-ink); }
:root[data-theme="dark"] .an-chip.good b { color: var(--accent); }
:root[data-theme="dark"] .an-chip.weak { color: var(--gold-ink); }
.an-chip:hover, .an-chip:focus-visible { filter: brightness(.97); background: inherit; }
.an-chip.good:hover { background: var(--accent-soft); } .an-chip.weak:hover { background: var(--gold-soft); }
.review-item { border: 0; border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--shadow); }
.review-opt { border-radius: 999px; padding: 11px 20px; border: 1.5px solid color-mix(in srgb, var(--text) 14%, transparent); }
.review-opt.right { border: 2px solid var(--accent); background: var(--accent-soft); }
.review-opt.wrong { border: 2px solid #C0574B; background: var(--bad-bg); }
.review-opt:has(.opt-why) { border-radius: 24px; }
.explain { background: var(--bg); border-radius: 20px; padding: 16px 20px; }
.analysis .tips-card, .an-tips { color: inherit; }

/* ---------- Checkout ---------- */
@media (min-width: 860px) { .checkout-page .grid-2 { grid-template-columns: 1.5fr 1fr; gap: 32px; } }
.checkout-page #pay-form { border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); }
.checkout-page #pay-form h2 { font-size: 1.5rem; }
.pay-method { border-radius: 24px; border: 1.5px solid color-mix(in srgb, var(--text) 16%, transparent); padding: 18px 20px; }
.pay-method:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); box-shadow: none; }
.pay-method .was, .summary-navy .was { text-decoration: line-through; color: var(--text-muted); font-weight: 600; font-size: .875rem; }
.pay-method .save-pill { font-size: .75rem; padding: 2px 9px; }
.summary-navy { background: var(--navy); color: #DBE3EA; border-radius: var(--radius-lg); padding: 32px; }
.summary-navy h2 { color: #fff; }
.summary-navy h3.sum-inc { font-family: var(--font-body); font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 18px 0 8px; }
.summary-navy .summary-row { border-bottom: 0; padding: 6px 0; }
.summary-navy .summary-total { color: #fff; font-size: 1.25rem; border-top: 1px solid #3A5A78; padding-top: 14px; margin-top: 6px; }
.summary-navy #sum-price.was { color: #9FB0BF; font-size: 1rem; }
.summary-navy .sum-offer { color: #F3CD86; font-weight: 700; }
.summary-navy .save-pill.big { margin: 8px 0 0; font-size: .875rem; padding: 6px 14px; }
.summary-navy .ck::after { border-color: #9DBDF5; }
.summary-navy .disclaimer, .summary-navy .small { color: #9FB0BF; }
.summary-navy a { color: var(--sky); }
.sum-photo { height: 190px; border-radius: 24px; margin: 0 0 18px; }

/* ---------- Study assistant ---------- */
.study-page { max-width: 880px; }
.sa-box { background: transparent; box-shadow: none; overflow: visible; }
.sa-log { background: transparent; padding: 8px 0 16px; max-height: none; min-height: 200px; gap: 16px; }
.sa-user { background: var(--navy); color: #fff; border-radius: 28px 28px 8px 28px; padding: 16px 22px; max-width: 70%; }
.sa-bot { background: var(--surface); border: 0; border-radius: 8px 28px 28px 28px; padding: 20px 24px; box-shadow: var(--shadow); }
.sa-cite { background: var(--gold-soft); color: var(--gold-ink); border-radius: 999px; }
.sa-num { background: var(--gold-soft); color: var(--gold-ink); border-radius: 999px; }
.sa-quote { border-left-color: var(--gold); }
.sa-chips { background: transparent; padding: 0 0 12px; }
.sa-chips .chip { border: 1.5px solid color-mix(in srgb, var(--text) 20%, transparent); background: transparent; font-weight: 600; font-size: .875rem; }
.sa-form { background: var(--surface); border: 0; border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: var(--shadow); align-items: center; }
.sa-form textarea { border: 0; background: transparent; border-radius: 0; padding: 10px 0; min-height: 44px; resize: none; }
.sa-form textarea:focus-visible { outline: 0; }
.sa-form:focus-within { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.sa-form .btn { min-height: 48px; padding: 0 26px; }

/* ---------- Admin: navy sidebar ---------- */
@media (min-width: 980px) { .admin-shell { grid-template-columns: 280px minmax(0, 1fr); } }
.admin-nav { background: var(--navy); color: #DBE3EA; border: 0; padding: 24px 16px; }
.admin-nav a { color: #DBE3EA; border-radius: 999px; padding: 0 14px; min-height: 38px; }
.admin-nav a:hover { background: var(--navy-2); color: #fff; }
.admin-nav a[aria-current="page"] { background: var(--sky); color: #0F2747; }
.admin-nav .count { background: var(--gold); color: #3A2303; font-weight: 700; }
.nav-section { color: #8FA3B5; font-size: 12px; letter-spacing: .08em; padding: 16px 14px 4px; }
@media (max-width: 979px) { .admin-nav { padding: 8px; } }
.admin-main h1 { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem); }
.stat { border: 0; border-radius: 24px; padding: 20px 22px; box-shadow: var(--shadow); }
.stat b { font-family: var(--font-head); font-weight: 400; font-size: 2.125rem; color: var(--heading); }
.card.todo { background: var(--navy); color: #DBE3EA; border-left: 0; border-radius: var(--radius); }
.card.todo h2 { color: #fff; }
.card.todo .todo-list li { border-bottom-color: #2A4566; }
.card.todo .muted, .card.todo .small { color: #C9D4DD; }
.card.todo a:not(.btn), .card.todo .link-btn { color: var(--sky); }
.card.todo .btn-secondary { color: #fff; border-color: #3A5A78; }
.card.todo .tag { background: var(--navy-2); color: #DCE6F5; }
.card.todo .tag.warn, .card.todo .tag.bad { background: var(--gold); color: #3A2303; }
.tbl-wrap { border: 0; border-radius: 24px; box-shadow: var(--shadow); background: var(--surface); }
.stab { border-width: 1.5px; }
.stab.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.bulk-bar { border-radius: 24px; }
.drawer { border-radius: 28px 0 0 28px; }
.offer-box { border: 1.5px dashed var(--border-strong); border-radius: 20px; padding: 14px 18px 4px; margin: 4px 0 16px; }
.offer-box legend { padding: 0 6px; }

/* ---------- Exam screen: kept plain, like the real exam ---------- */
.exam-body {
  --ex-bar: #0F2747; --ex-bar-ink: #FFFFFF; --ex-bg: #FFFFFF; --ex-panel: #F4F5F7; --ex-line: #D5DAE0;
  --ex-text: #201E1D; --ex-muted: #4D5560; --ex-accent: #0F2747; --ex-sel: #E6ECF3; --ex-card: #FFFFFF; --ex-flag: #8A5300;
  font-family: "Figtree", Arial, Helvetica, sans-serif;
}
.exam-top { min-height: 56px; gap: 24px; padding: 8px 20px; }
.ex-logo { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.exam-title { font-size: 16px; }
.exam-top .ex-meta { font-size: 15px; gap: 24px; }
.ex-timer { background: #1B3A63; border-radius: 6px; padding: 7px 12px; font-size: 16px; }
.ex-mark input { accent-color: var(--gold); }
.ex-opt { border-radius: 6px; border-color: #C8CFD7; padding: 13px 18px; gap: 14px; font-size: 17px; }
.ex-opt:has(input:checked) { border: 1.5px solid #0F2747; background: #E6ECF3; }
.ex-opt input { accent-color: #0F2747; }
.ex-stem { font-size: 18px; }
.ex-case .pb-h, .ex-case h2 { color: #0F2747; }
.exam-bottom { min-height: 56px; }
.ex-btn { border-color: #6D859C; color: #fff; border-radius: 4px; font-family: inherit; }
.ex-btn.solid { background: #fff; color: #0F2747; border-color: #fff; }
.ex-primary { font-family: inherit; }
.ex-secondary { font-family: inherit; }
.ex-copy { background: #0B1E38; color: #9FB0BF; font-size: 12px; line-height: 1.4; padding: 6px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 20px; flex: none; }
:root[data-theme="dark"] .exam-body { --ex-bar: #0B1C33; --ex-sel: #1E3152; --ex-accent: #8DB0F2; }
:root[data-theme="dark"] .ex-opt:has(input:checked) { border-color: #8DB0F2; background: #1E3152; }
:root[data-theme="dark"] .ex-opt { border-color: var(--ex-line); }
:root[data-theme="warm"] .exam-body { --ex-bar: #0F2747; }
@media (max-width: 760px) { .exam-top { gap: 12px; } .ex-copy { font-size: 11px; } }
