/* SLI MUNIM — the working screens: SAT practice and Official Papers, diagnostic test, account, booking, admin,
 * videos and the guest window. Their component styles, wearing the site's colours and fonts (css/site.css):
 * the variable names below point at the site's tokens. Loaded after site.css on those pages. */
:root {
  --text: var(--ink);
  --muted: var(--ink-2);
  --border: var(--line);
  --primary: var(--ink);
  --primary-hover: var(--ink-2);
  --primary-soft: var(--hi-soft);
  --on-primary: var(--bg);
  --e-accent: #B7791F;
  --c-physics: var(--c-phys);
  --c-dual: var(--c-sat);
  --c-video: var(--red);
  --mid: #B45309;
  --shadow-sm: 0 1px 0 rgba(27, 30, 38, .05);
  --shadow-md: 0 14px 30px -14px rgba(20, 22, 30, .35);
  --shadow-lg: 8px 8px 0 var(--hi);
  --radius: var(--r-lg);
  --radius-sm: var(--r);
  --container: var(--wrap);
  --font: var(--sans);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="dark"] { --e-accent: #FFD54A; --mid: #FBBF24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --e-accent: #FFD54A; --mid: #FBBF24; } }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* ---------- Videos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.select {
  appearance: none; font: inherit; font-weight: 600; font-size: .95rem; color: var(--text);
  padding: 10px 40px 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; min-width: 180px; cursor: pointer;
}
.select:hover { border-color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  font: inherit; font-weight: 700; font-size: .9rem; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: all .2s;
}
.chip-btn:hover { color: var(--text); border-color: var(--primary); }
.chip-btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.video-card { padding: 0; overflow: hidden; }
.video-card .body { padding: 18px 20px 20px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe, .video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-play {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; background: transparent;
}
.video-play span {
  width: 68px; height: 48px; border-radius: 14px; background: rgba(220, 38, 38, .92); display: grid; place-items: center; color: #fff;
  transition: transform .25s var(--ease);
}
.video-play:hover span { transform: scale(1.1); }
.video-play svg { width: 26px; height: 26px; }


/* ---------- Diagnostic test (added with the placement engine) ---------- */
.muted { color: var(--muted); }
.dx-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow-sm); }
.dx-card h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.dx-card p { margin-bottom: .75em; }
.dx-kicker { color: var(--primary); font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.dx-center { text-align: center; padding: clamp(40px, 8vw, 72px) 24px; }
.dx-spinner { width: 44px; height: 44px; margin: 0 auto 20px; border-radius: 50%; border: 4px solid var(--primary-soft); border-top-color: var(--primary); animation: spin 1s linear infinite; }
.dx-choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin: 20px 0; }
.dx-choice { font: inherit; font-weight: 700; text-align: left; display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.dx-choice small { color: var(--muted); font-weight: 600; font-size: .82rem; line-height: 1.4; }
.dx-choice:hover { border-color: var(--primary); transform: translateY(-2px); }
.dx-choice[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.dx-check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-top: 8px; cursor: pointer; }
.dx-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.dx-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 24px; }
.dx-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.dx-timer { font-variant-numeric: tabular-nums; }
.dx-progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 22px; }
.dx-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--c-dual)); transition: width .4s var(--ease); }
.dx-topic { color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.dx-q { font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.5; margin-bottom: 20px; }
.dx-options { display: grid; gap: 10px; }
.dx-option { font: inherit; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s, transform .2s var(--ease), background-color .2s; }
.dx-option:hover { border-color: var(--primary); transform: translateX(4px); }
.dx-letter { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); font-weight: 800; }
.dx-warn { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--e-accent) 16%, transparent); font-size: .95rem; }
.dx-warn[hidden] { display: none; }
.dx-score { font-size: clamp(2.4rem, 7vw, 3.4rem); font-weight: 800; line-height: 1; margin: 8px 0; }
.dx-score span { font-size: 1.1rem; color: var(--muted); font-weight: 700; }
.dx-headline { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.dx-grid2 { display: grid; gap: 28px; }
@media (min-width: 760px) { .dx-grid2 { grid-template-columns: 1fr 1fr; } }
.dx-row { display: grid; grid-template-columns: minmax(96px, 150px) 1fr 52px; gap: 12px; align-items: center; margin-bottom: 12px; font-size: .92rem; }
.dx-row b { text-align: right; font-variant-numeric: tabular-nums; }
.dx-bar { position: relative; height: 14px; border-radius: 999px; background: var(--surface-2); }
.dx-bar > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--muted); opacity: .5; transition: width .8s var(--ease); }
.dx-bar > .is-rec { background: var(--primary); opacity: 1; }
.dx-bar > .dx-weak { background: var(--c-video); opacity: 1; }
.dx-bar > .dx-strong { background: #16a34a; opacity: 1; }
.dx-bar > .dx-ontrack { background: var(--c-physics); opacity: .85; }
.dx-bar > .dx-insufficient { background: var(--border); opacity: 1; }
.dx-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); opacity: .6; border-radius: 2px; }
.dx-note { color: var(--muted); font-size: .85rem; }
.dx-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dx-list li { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.dx-list a { font-weight: 700; }
.dx-rev { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.dx-rev summary { cursor: pointer; font-weight: 700; }
.dx-rev p { margin: 8px 0 0; }
.dx-svg { width: 100%; height: auto; max-height: 160px; }

/* placement result */
.dxr { --pad: clamp(20px, 4vw, 32px); padding: var(--pad); overflow: hidden; }
.dxr-hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px;
  margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 0; padding: var(--pad);
  background:
    radial-gradient(110% 150% at 0% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 62%),
    radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--e-accent) 10%, transparent), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.dxr-title { font-size: clamp(1.7rem, 4.4vw, 2.5rem); margin: 0 0 8px; }
.dxr-title span { background: linear-gradient(90deg, var(--primary), var(--c-dual)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dxr .dxr-lead { color: var(--muted); margin: 0; max-width: 52ch; }
.dxr-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 520px) { .dxr-hero__cta { width: 100%; } .dxr-hero__cta .btn { flex: 1 1 auto; justify-content: center; } }
.dxr .dxr-callout { margin: 16px 0 0; padding: 10px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--e-accent) 14%, transparent); border-left: 3px solid var(--e-accent); font-size: .9rem; }
.dxr-sec { margin-top: 28px; min-width: 0; }
.dxr-sec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-bottom: 12px; }
.dxr-sec__head h3 { margin: 0; font-size: 1.05rem; }
.dxr-sec__head .dx-note { font-size: .8rem; }
.dxr-cols { display: grid; gap: 0 36px; }
@media (min-width: 860px) { .dxr-cols { grid-template-columns: 1fr 1fr; } }

.dxr-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.dxr-step { --tone: var(--muted); position: relative; display: grid; gap: 4px; align-content: start; padding: 14px 16px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.dxr-step--done { --tone: var(--good); }
.dxr-step--current { --tone: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent); }
.dxr-step--later { background: transparent; border-style: dashed; }
.dxr-step__tag { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tone); }
.dxr-step__name { font-size: 1.05rem; line-height: 1.3; }
.dxr-step--later .dxr-step__name { color: var(--muted); }
.dxr-step__pct { font-size: .82rem; color: var(--muted); }
.dxr-step__pct b { font-size: 1.5rem; color: var(--text); font-variant-numeric: tabular-nums; margin-right: 3px; }
.dxr-gauge { position: relative; display: block; height: 8px; margin-top: 6px; border-radius: 999px; background: color-mix(in srgb, var(--border) 85%, transparent); }
.dxr-gauge > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--tone); transition: width .8s var(--ease); }
.dxr-step--later .dxr-gauge > span { opacity: .6; }
.dxr-gauge > i { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--text); opacity: .5; }
@media (min-width: 640px) {
  .dxr-step:not(:last-child)::after {
    content: ""; position: absolute; right: -11px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
    border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); opacity: .5;
  }
}

.dxr-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dxr-topic { --tone: var(--primary); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px 14px; padding: 10px 14px 11px; border-radius: 12px; background: var(--surface-2); }
.dxr-topic--weak { --tone: var(--bad); }
.dxr-topic--strong { --tone: var(--good); }
.dxr-topic__name { font-weight: 700; font-size: .92rem; line-height: 1.3; }
.dxr-pill { justify-self: end; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: var(--tone); background: color-mix(in srgb, var(--tone) 15%, transparent); white-space: nowrap; }
.dxr-topic__bar { height: 6px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--border) 85%, transparent); }
.dxr-topic__bar > span { display: block; height: 100%; border-radius: inherit; background: var(--tone); }
.dxr-topic__sub { justify-self: end; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dxr .dxr-thin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; font-size: .8rem; color: var(--muted); }
.dxr-thin > span:first-child { font-weight: 600; margin-right: 2px; }
.dxr-chip { padding: 2px 10px; border-radius: 999px; border: 1px dashed var(--border); font-weight: 600; }
.dxr-chip--strong { border-style: solid; border-color: color-mix(in srgb, var(--good) 45%, var(--border)); color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }

.dxr-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dxr-plan__item { display: flex; align-items: center; gap: 14px; padding: 9px 14px 9px 9px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.dxr-plan__item:hover, .dxr-plan__item:focus-visible { color: var(--text); border-color: var(--primary); transform: translateX(3px); box-shadow: var(--shadow-sm); }
.dxr-plan__wk { flex: none; width: 50px; height: 50px; border-radius: 10px; display: grid; place-content: center; text-align: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 1.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.dxr-plan__wk small { display: block; font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.dxr-plan__body { display: grid; flex: 1; min-width: 0; gap: 2px; line-height: 1.3; }
.dxr-plan__body strong { font-size: .95rem; }
.dxr-plan__body small { color: var(--muted); font-size: .8rem; }
.dxr-plan__go { flex: none; width: 18px; height: 18px; color: var(--muted); transition: color .2s, transform .2s var(--ease); }
.dxr-plan__item:hover .dxr-plan__go { color: var(--primary); transform: translateX(2px); }

.dxr-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); }
.dxr .dxr-foot .dx-note { margin: 0; }
.dx-rev summary { display: flex; align-items: flex-start; gap: 10px; list-style: none; }
.dx-rev summary::-webkit-details-marker { display: none; }
.dx-rev summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: 7px 4px 0 auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.dx-rev[open] summary::after { transform: rotate(-135deg); margin-top: 10px; }
.dxr-mark { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 800; }
.dxr-mark--right { color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); }
.dxr-mark--wrong { color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, transparent); }
.dxr-mark--skip { color: var(--muted); background: var(--surface-2); }


.dx-option:disabled { cursor: default; transform: none; }
.dx-option.is-correct { border-color: #16a34a; background: color-mix(in srgb, #16a34a 12%, var(--surface)); }
.dx-option.is-wrong { border-color: var(--c-video); background: color-mix(in srgb, var(--c-video) 10%, var(--surface)); }

/* ---------- Accounts (account.html, admin.html) ---------- */
[hidden] { display: none !important; }
.input {
  width: 100%; font: inherit; font-size: 1rem; font-weight: 500; color: var(--text);
  background: var(--surface); padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border);
}
.input:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.input:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.ac-wrap { max-width: 520px; }
.ac-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.ac-tabs button { font: inherit; font-weight: 700; border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; color: var(--muted); cursor: pointer; }
.ac-tabs button[aria-selected="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.ac-form { display: grid; gap: 14px; }
/* "Continue with Google" — Google's standard look: white (dark: near-black) with a grey outline and the coloured G. */
.ac-google {
  --g-bg: #ffffff; --g-line: #747775; --g-text: #1f1f1f; --g-hover: rgba(31, 31, 31, .06);
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--g-line);
  background: var(--g-bg); color: var(--g-text); font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: .1px;
  cursor: pointer; transition: background-color .2s, box-shadow .2s;
}
:root[data-theme="dark"] .ac-google { --g-bg: #131314; --g-line: #8e918f; --g-text: #e3e3e3; --g-hover: rgba(227, 227, 227, .08); }
.ac-google:hover { background-image: linear-gradient(var(--g-hover), var(--g-hover)); box-shadow: 0 1px 3px rgba(60, 64, 67, .25); }
.ac-google:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.ac-google:disabled { cursor: progress; opacity: .7; }
.ac-google__g { flex: none; width: 20px; height: 20px; }
.ac-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: .88rem; }
.ac-or::before, .ac-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.ac-form .field { color: var(--text); font-size: .92rem; }
.ac-form .field .dx-note { font-weight: 500; }
.ac-inline { grid-template-columns: 1fr auto; align-items: end; margin: 8px 0 4px; }
@media (max-width: 480px) { .ac-inline { grid-template-columns: 1fr; } }
.ac-msg { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .95rem; }
.ac-msg--error { background: color-mix(in srgb, var(--c-video) 12%, transparent); }
.ac-msg--ok { background: color-mix(in srgb, #16a34a 14%, transparent); }
.ac-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .92rem; }
.ac-link-btn { font: inherit; border: 0; background: none; padding: 0; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ac-table-wrap { overflow-x: auto; }
.ac-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ac-table th, .ac-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ac-table th { background: var(--surface-2); font-weight: 800; }
.ac-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); margin-bottom: 20px; }
.ac-stat { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.ac-stat strong { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.ac-stat span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.ac-stats--progress { margin: 8px 0 0; }
.ac-stats--progress .ac-stat { background: var(--surface-2); border-color: transparent; }
.ac-stat--text strong { font-size: 1.1rem; line-height: 1.3; margin-bottom: 4px; }
.ac-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.ac-search { flex: 1 1 260px; max-width: 420px; }
.icon-btn.is-signed-in { position: relative; }
.icon-btn.is-signed-in::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 2px var(--surface); }


/* ---------- Profile statistics, daily problem, lesson tests ---------- */
.pf-stats .ac-stat, .pb-streak .ac-stat { background: var(--surface-2); border-color: transparent; }
.pf-h { font-size: 1rem; margin: 22px 0 10px; }
.pf-cal { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; width: max-content; max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
.pf-cal__day { display: inline-block; width: 13px; height: 13px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.pf-cal__day[data-l="1"] { background: color-mix(in srgb, var(--primary) 30%, var(--surface)); border-color: transparent; }
.pf-cal__day[data-l="2"] { background: color-mix(in srgb, var(--primary) 55%, var(--surface)); border-color: transparent; }
.pf-cal__day[data-l="3"] { background: color-mix(in srgb, var(--primary) 78%, var(--surface)); border-color: transparent; }
.pf-cal__day[data-l="4"] { background: var(--primary); border-color: transparent; }
.pf-cal__legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.pf-daily { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.pf-daily__day { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--surface-2); border: 1px dashed var(--border); }
.pf-daily__day.is-right { background: color-mix(in srgb, #16a34a 20%, var(--surface)); border: 1px solid #16a34a; color: #15803d; }
.pf-daily__day.is-wrong { background: color-mix(in srgb, var(--c-video) 14%, var(--surface)); border: 1px solid var(--c-video); color: var(--c-video); }
.pf-lessons { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.pf-lessons li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.pf-lessons .dx-check { margin: 0; }
.pf-lessons input:checked + * , .pf-lessons label:has(input:checked) { color: #15803d; }
#lesson-test:not(:empty) { margin: 16px 0; padding: 18px; border: 1.5px solid var(--primary); border-radius: var(--radius); background: var(--surface); }
.pb-feedback { margin-top: 16px; }
.pb-feedback .btn { margin-top: 8px; }
.pb-verdict { font-weight: 800; font-size: 1.1rem; }
.pb-verdict.is-right { color: #16a34a; }
.pb-verdict.is-wrong { color: var(--c-video); }
.pb-daily__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.pb-report { margin-top: 18px; }
textarea.input { resize: vertical; min-height: 96px; font: inherit; }



/* ---------- SAT practice (sat.html: js/sat.js, js/sat-stats.js) ---------- */
.sat-wrap { max-width: 980px; margin: 0 auto; }
.sat-analytics { margin-top: 56px; }
.sat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.sat-head h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 0; }
.sat-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: .88rem; cursor: pointer; list-style: none; user-select: none; }
.sat-chip::-webkit-details-marker { display: none; }
.sat-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sat-chip:hover { border-color: var(--primary); }
.sat-dd { position: relative; }
.sat-dd[open] .sat-chip { border-color: var(--primary); color: var(--primary); }
.sat-dd__menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 210px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.sat-dd__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .92rem; cursor: pointer; }
.sat-dd__item:hover { background: var(--surface-2); }
.sat-dd__item input { width: 16px; height: 16px; accent-color: var(--primary); }
.sat-start { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px; margin-bottom: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.sat-start p { margin: 2px 0 0; }
.sat-start__btns { display: flex; gap: 10px; align-items: center; }
.sat-topics { width: 100%; border-collapse: collapse; }
.sat-topics thead th { text-align: left; font-size: .78rem; font-weight: 700; color: var(--muted); padding: 0 8px 10px; border-bottom: 1px solid var(--border); }
.sat-topics thead th:nth-child(2) { width: 38%; }
.sat-topics thead th:nth-child(3) { width: 90px; text-align: right; }
.sat-topics__domain { text-align: left; font-size: 1.12rem; font-weight: 800; padding: 26px 8px 8px; }
.sat-topics__group + .sat-topics__group .sat-topics__domain { border-top: 1px solid var(--border); }
.sat-topic td { padding: 9px 8px; vertical-align: middle; }
.sat-topic:hover td { background: var(--surface-2); }
.sat-topic td:first-child { border-radius: 10px 0 0 10px; }
.sat-topic td:last-child { border-radius: 0 10px 10px 0; text-align: right; }
.sat-topic__name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sat-topic__name a { color: var(--text); font-weight: 600; text-decoration: none; }
.sat-topic__name a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.sat-check { display: inline-grid; place-items: center; }
.sat-check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.sat-topic__prog { white-space: nowrap; }
.sat-prog { display: inline-block; vertical-align: middle; width: calc(100% - 74px); height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sat-topic:hover .sat-prog { background: var(--border); }
.sat-prog > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.sat-prog__n { display: inline-block; width: 66px; text-align: right; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sat-acc { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; }
.sat-acc i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sat-acc--good i { background: #16a34a; }
.sat-acc--mid i { background: #d97706; }
.sat-acc--low i { background: var(--c-video); }
.sat-acc--none { color: var(--muted); }
.sat-acc-legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
@media (max-width: 620px) {
  .sat-topics thead th:nth-child(2) { width: auto; }
  .sat-topic { display: grid; grid-template-columns: 1fr auto; }
  .sat-topic td { padding: 6px 8px; }
  .sat-topic__prog { grid-column: 1 / -1; grid-row: 2; padding-top: 0 !important; }
  .sat-topic td:first-child, .sat-topic td:last-child { border-radius: 10px; }
  .sat-topics thead { display: none; }
}

/* tags shown on every question: section, skill, difficulty */
.sat-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.sat-tag--skill { background: var(--surface-2); color: var(--text); }
.sat-diff { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 800; border: 1.5px solid currentColor; }
.sat-diff--easy { color: #15803d; }
.sat-diff--medium { color: #b45309; }
.sat-diff--hard { color: var(--c-video); }
:root[data-theme="dark"] .sat-diff--easy { color: #4ade80; }
:root[data-theme="dark"] .sat-diff--medium { color: #fbbf24; }

/* practice screen */
.sat-practice { padding-bottom: 90px; }
.sat-practice__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 18px; }
.sat-back { font-weight: 700; text-decoration: none; color: var(--muted); }
.sat-back:hover { color: var(--primary); }
.sat-practice__title { font-weight: 800; font-size: 1.15rem; }
.sat-split { display: grid; gap: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow-sm); }
@media (min-width: 900px) {
  .sat-split:not(.sat-split--single) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
  .sat-split:not(.sat-split--single) .sat-passage { padding-right: 32px; border-right: 1px solid var(--border); }
  .sat-split:not(.sat-split--single) .sat-qside { padding-left: 32px; }
}
.sat-split--single .sat-qside { max-width: 720px; }
.sat-passage { font-family: Georgia, "Times New Roman", serif; font-size: 1.06rem; line-height: 1.7; }
.sat-passage p { margin-bottom: .8em; }
.sat-passage ul { margin: 0 0 .8em; padding-left: 1.3em; }
.sat-passage li { margin-bottom: .35em; }
.sat-passage .sat-indent { padding-left: 1.4em; margin-bottom: .15em; }
.sat-passage .sat-indent + :not(.sat-indent) { margin-top: .8em; }
.sat-passage .sat-texthead { font-family: var(--font); font-weight: 800; margin: 1em 0 .3em; }
.sat-passage .sat-texthead:first-child { margin-top: 0; }
.sat-passage u, .sat-stem u, .dx-option u, .sat-rationale u { text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-skip-ink: none; }
/* SAT Math: formulas are inline SVGs that place glyphs from data/sat/math/glyphs.svg */
.mj { display: inline-block; fill: currentColor; overflow: visible; }
.mi { display: inline-block; max-width: none; }
:root[data-theme="dark"] .mi { filter: invert(.9) hue-rotate(180deg); }
.sat-mathline { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.sat-figure { margin: 0 0 16px; }
.sat-figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--border); padding: 6px; }
.sat-qbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 6px 8px 6px 6px; margin-bottom: 16px; border-radius: 10px; background: var(--surface-2); }
.sat-qnum { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; background: var(--text); color: var(--surface); font-weight: 800; }
.sat-review { font: inherit; font-size: .85rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.sat-review:hover { color: var(--text); }
.sat-review.is-on { color: #b45309; }
.sat-flag { display: inline-block; width: 9px; height: 12px; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.sat-qbar__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.sat-stem { font-weight: 700; font-size: 1.04rem; line-height: 1.55; margin-bottom: 16px; }
.sat-options { display: grid; gap: 10px; }
.sat-opt { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.sat-opt .dx-option { align-items: flex-start; line-height: 1.5; }
.sat-opt .dx-letter { margin-top: -3px; }
.sat-opt.is-struck .dx-option { opacity: .45; }
.sat-opt.is-struck .dx-option > span:last-child { text-decoration: line-through; }
.sat-strike { font: inherit; font-size: .75rem; font-weight: 800; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; position: relative; }
.sat-strike::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 1.5px; background: currentColor; }
.sat-strike:hover, .sat-strike[aria-pressed="true"] { color: var(--text); border-color: var(--text); }
.sat-strike:disabled { opacity: .3; cursor: default; }
.sat-feedback { margin-top: 14px; min-height: 1.6em; }
.sat-bottom { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border); }
.sat-bottom__in { max-width: var(--container); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sat-bottom__btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sat-nav-wrap { position: relative; }
.sat-counter { font: inherit; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 0; background: var(--text); color: var(--surface); cursor: pointer; }
.sat-counter svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.sat-counter[aria-expanded="true"] svg { transform: rotate(180deg); }
.sat-nav { position: absolute; bottom: calc(100% + 12px); left: 0; width: min(380px, calc(100vw - 32px)); padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.sat-nav__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sat-nav__x { width: 30px; height: 30px; }
.sat-nav__legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; }
.sat-nav__legend span { display: inline-flex; align-items: center; gap: 5px; }
.sat-nav__legend .sat-flag { color: #d97706; }
.sat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.sat-dot--correct { background: #16a34a; }
.sat-dot--wrong { background: var(--c-video); }
.sat-dot--fixed { background: #16a34a; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px #d97706; }
.sat-nav__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 4px; }
.sat-nav__q { position: relative; font: inherit; font-size: .82rem; font-weight: 700; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.sat-nav__q:hover { border-color: var(--primary); }
.sat-nav__q.is-correct { background: color-mix(in srgb, #16a34a 20%, var(--surface)); border-color: color-mix(in srgb, #16a34a 50%, transparent); }
.sat-nav__q.is-wrong { background: color-mix(in srgb, var(--c-video) 18%, var(--surface)); border-color: color-mix(in srgb, var(--c-video) 45%, transparent); }
.sat-nav__q.is-fixed { background: color-mix(in srgb, #16a34a 20%, var(--surface)); border-color: #d97706; border-width: 2px; }
.sat-nav__q.is-current { outline: 2.5px solid var(--text); outline-offset: 1px; }
.sat-nav__q.is-review::after { content: ""; position: absolute; top: -4px; right: -3px; width: 8px; height: 11px; background: #d97706; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
@media (max-width: 520px) {
  .sat-bottom__in { padding: 8px 10px; }
  .sat-bottom__btns .btn { padding: .5em .8em; }
  .sat-qbar__tags { margin-left: 0; }
}
.sat-finish { max-width: 620px; margin: 0 auto; }

/* section tabs: Reading & Writing / Math */
.sat-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.sat-tab { font: inherit; font-weight: 800; font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; transition: background-color .25s var(--ease), color .25s, box-shadow .25s; }
.sat-tab:hover { color: var(--text); }
.sat-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.sat-tab__n { font-size: .75rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

/* math questions */
.sat-glyphs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sat-stem--math { font-weight: 500; font-size: 1.06rem; line-height: 1.75; }
.sat-stem--math p { margin: 0 0 .7em; }
.sat-stem--math .sat-figure img, .sat-rationale .sat-figure img { max-width: 100%; }
.sat-stem p:last-child { margin-bottom: 0; }
.sat-opt__body { min-width: 0; overflow-x: auto; }
.sat-optfig { display: block; max-width: 100%; height: auto; margin-top: 4px; background: #fff; border-radius: 6px; }
.sat-practice--math .sat-opt .dx-option { align-items: center; }
.sat-practice--math .sat-opt .dx-letter { margin-top: 0; }
.sat-rationale .sat-mathline, .sat-stem .sat-mathline { line-height: 2; }

/* typed answers (student-produced response) */
.sat-spr { display: grid; gap: 6px; max-width: 420px; }
.sat-spr__label { font-weight: 800; font-size: .9rem; }
.sat-spr__row { display: flex; gap: 8px; align-items: center; }
.sat-spr__in { flex: 1; min-width: 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; transition: border-color .25s, background-color .25s; }
.sat-spr__in.is-wrong { border-color: var(--c-video); background: color-mix(in srgb, var(--c-video) 7%, var(--surface)); }
.sat-spr__in.is-correct { border-color: #16a34a; background: color-mix(in srgb, #16a34a 12%, var(--surface)); color: var(--text); opacity: 1; }
.sat-linkbtn { font: inherit; font-weight: 700; font-size: .9rem; color: var(--primary); background: none; border: 0; padding: 0 0 0 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* a wrong try: the choice turns red and gives a short shake, the others stay open */
.dx-option.is-wrong:disabled { opacity: .75; }
.dx-option.is-wrong:disabled .dx-letter { background: var(--c-video); color: #fff; }
.dx-option.is-correct .dx-letter { background: #16a34a; color: #fff; }
.is-shaking { animation: sat-shake .42s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes sat-shake {
  15% { transform: translateX(-6px); } 35% { transform: translateX(5px); }
  55% { transform: translateX(-3px); } 75% { transform: translateX(2px); } 100% { transform: none; }
}

/* explanation: a panel that slides in from the right once the right answer is found */
.sat-rationale p { margin-bottom: .7em; line-height: 1.65; }
.sat-rationale p:first-child { padding: 10px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, #16a34a 10%, transparent); }
.sat-rationale ul { padding-left: 1.3em; margin: 0 0 .7em; }
:root { --xp-w: min(470px, 100vw); --xp-ease: cubic-bezier(.22, 1, .36, 1); }
.sat-xp {
  position: fixed; z-index: 40; top: var(--xp-top, 0px); right: 0; bottom: 0; width: var(--xp-w);
  display: flex; flex-direction: column; background: var(--surface); color: var(--text);
  border-left: 1px solid var(--border); border-top-left-radius: 18px;
  box-shadow: -24px 0 60px -30px rgba(15, 23, 42, .45);
  transform: translate3d(102%, 0, 0); visibility: hidden;
  transition: transform .62s var(--xp-ease), visibility 0s linear .62s;
}
.sat-xp.is-open { transform: none; visibility: visible; transition: transform .62s var(--xp-ease), visibility 0s; }
.sat-xp__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.sat-xp__head h2 { font-size: 1.15rem; margin: 0; }
.sat-xp__x { width: 36px; height: 36px; border-radius: 10px; }
.sat-xp__x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.sat-xp__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 24px; outline: none; }
.sat-xp__body > * {
  opacity: 0; transform: translate3d(22px, 0, 0);
  transition: opacity .5s ease, transform .7s var(--xp-ease);
}
.sat-xp.is-open .sat-xp__body > * { opacity: 1; transform: none; transition-delay: calc(.16s + var(--i, 0) * .07s); }
.sat-xp__verdict { font-weight: 800; font-size: 1.05rem; margin: 0 0 12px; }
.sat-xp__verdict.is-right { color: #16a34a; }
.sat-xp__verdict.is-wrong { color: var(--c-video); }
.sat-xp__answer { display: grid; gap: 4px; margin-bottom: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); line-height: 1.6; }
.sat-xp__label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sat-xp__opt { overflow-x: auto; }
.sat-xp__body--math .sat-rationale { font-size: 1rem; }
.sat-xp__foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.sat-xp-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(11, 15, 29, .38); opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.sat-xp-scrim.is-on { opacity: 1; visibility: visible; transition: opacity .5s ease, visibility 0s; }
/* wide screens: no dimming; the question moves aside so nothing is covered */
@media (min-width: 1100px) {
  .sat-xp-scrim { display: none; }
  .sat-practice { transition: margin-right .62s var(--xp-ease); }
  body.sat-xp-open .sat-practice { margin-right: max(0px, calc(var(--xp-w) + 24px - (100vw - 100%) / 2)); }
  .sat-bottom__in { transition: padding-right .62s var(--xp-ease); }
  body.sat-xp-open .sat-bottom__in { padding-right: max(16px, calc(var(--xp-w) + 16px - (100vw - min(100vw, var(--container))) / 2)); }
}
@media (max-width: 560px) { .sat-xp { border-top-left-radius: 0; border-left: 0; } }
@media (prefers-reduced-motion: reduce) {
  .sat-xp, .sat-xp__body > * { transform: none !important; }
  .sat-xp { opacity: 0; transition: opacity .2s, visibility 0s linear .2s; }
  .sat-xp.is-open { opacity: 1; transition: opacity .2s; }
}

/* Desmos graphing calculator (math only): a window you can move and resize */
.sat-practice__top { align-items: center; }
.sat-calc-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 800; font-size: .9rem; padding: 7px 13px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color .2s, color .2s, background-color .2s; }
.sat-calc-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sat-calc-btn:hover, .sat-calc-btn[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.sat-calc {
  position: fixed; z-index: 42; left: var(--calc-x, 16px); top: var(--calc-y, 90px);
  width: var(--calc-w, 400px); height: var(--calc-h, 540px); min-width: 300px; min-height: 320px;
  max-width: calc(100vw - 16px); max-height: calc(100vh - 80px);
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translate3d(-18px, 0, 0) scale(.985); transform-origin: top left; visibility: hidden;
  transition: opacity .35s ease, transform .5s var(--xp-ease), visibility 0s linear .5s;
}
.sat-calc.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity .35s ease, transform .5s var(--xp-ease), visibility 0s; }
.sat-calc__head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; background: var(--text); color: var(--surface); cursor: grab; user-select: none; touch-action: none; }
.sat-calc__head:active { cursor: grabbing; }
.sat-calc__head strong { flex: 1; font-size: .92rem; }
.sat-calc__head button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.sat-calc__head button:hover { background: color-mix(in srgb, var(--surface) 18%, transparent); }
.sat-calc__head svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sat-calc iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.sat-calc.is-moving iframe { pointer-events: none; }
.sat-calc__grip { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, color-mix(in srgb, var(--muted) 55%, transparent) 50% 58%, transparent 58% 70%, color-mix(in srgb, var(--muted) 55%, transparent) 70% 78%, transparent 78%); }
.sat-calc__load { position: absolute; inset: 46px 0 0; display: grid; place-items: center; color: var(--muted); font-weight: 600; pointer-events: none; }
@media (max-width: 700px) {
  .sat-calc { left: 8px !important; right: 8px; top: var(--calc-top, 70px) !important; bottom: 72px; width: auto !important; height: auto !important; max-height: none; }
  .sat-calc__head { cursor: default; }
  .sat-calc__grip, .sat-calc [data-calc="size"] { display: none; }
}


/* ---------- SAT Official Papers (sat.html#papers: js/sat-papers.js) ---------- */
.sat-tabs { max-width: 100%; overflow-x: auto; }
.sat-tab { white-space: nowrap; }
@media (max-width: 560px) { .sat-tab { padding: 8px 11px; font-size: .9rem; } .sat-tab__n { display: none; } }
.pp-resume { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.pp-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.pp-card { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.pp-card.is-doing { border-color: var(--primary); }
.pp-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-card__head h3 { margin: 0; font-size: 1.15rem; }
.pp-card__total { font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--primary); font-variant-numeric: tabular-nums; }
.pp-tag { font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.pp-card__secs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pp-card__secs li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.pp-card__sec { flex: 1; display: grid; min-width: 0; }
.pp-card__sec b { font-size: .95rem; }
.pp-pill { font-weight: 800; font-size: .9rem; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.pp-pill:hover { color: var(--primary); }
.pp-card__full { margin-top: auto; justify-content: center; }
.pp-source { margin: 0 0 18px; max-width: 760px; font-size: .92rem; line-height: 1.6; color: var(--muted); }
.pp-source b { color: var(--text); }
.pp-results { margin-top: 28px; }
.pp-tablewrap { position: relative; overflow-x: auto; }   /* relative: keeps the visually-hidden header inside the scroll box */
.pp-table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.pp-table th { text-align: left; font-size: .78rem; color: var(--muted); font-weight: 700; padding: 0 8px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.pp-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.pp-table tr:last-child td { border-bottom: 0; }

/* before a module, the break, check your work */
.pp-intro { max-width: 680px; margin: 0 auto; }
.pp-intro h2 { margin-bottom: 12px; }
.pp-notice { margin-bottom: 14px; }
.pp-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.pp-facts span { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: .9rem; }
.pp-rules { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: .92rem; display: grid; gap: 4px; }
.pp-break { text-align: center; }
.pp-break .dx-actions { justify-content: center; }
.pp-break__t { font-size: clamp(3rem, 12vw, 4.6rem); font-weight: 800; line-height: 1; margin: 18px 0 4px; font-variant-numeric: tabular-nums; }
.pp-check { max-width: 760px; margin: 0 auto; }
.pp-check .sat-nav__legend { margin: 14px 0 10px; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 7px; margin-bottom: 14px; }

/* the test screen */
.pp-run { padding-bottom: 96px; }
.pp-top { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 16px; }
.pp-top__title { display: grid; gap: 1px; flex: 1; min-width: min(100%, 240px); }
.pp-top__title strong { font-size: 1.08rem; }
.pp-top__title .sat-back { font-size: .9rem; }
.pp-top__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pp-top__tools .sat-calc-btn { margin-left: 0; }
.pp-ref { position: absolute; z-index: 25; top: calc(100% + 6px); right: 0; width: min(420px, 100%); padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.pp-ref__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.pp-ref__list { margin: 0 0 8px; display: grid; gap: 2px; }
.pp-ref__list div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.pp-ref__list dt { color: var(--muted); font-weight: 600; }
.pp-ref__list dd { margin: 0; font-weight: 700; font-family: Georgia, "Times New Roman", serif; }
.pp-ref p:last-child { margin: 0; }
.dx-option.is-selected { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.dx-option.is-selected .dx-letter { background: var(--primary); color: var(--on-primary, #fff); }
.pp-run--math .sat-opt .dx-option { align-items: center; }
.pp-run--math .sat-opt .dx-letter { margin-top: 0; }
.pp-spr .dx-note b { color: var(--text); font-size: 1rem; }
.pp-bottom { display: grid; grid-template-columns: 1fr auto 1fr; }
.pp-bottom .sat-bottom__btns { justify-self: end; }
.pp-bar-title { font-weight: 800; }
.pp-clock { display: flex; align-items: center; gap: 8px; justify-self: center; }
.pp-clock__t { font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; min-width: 4ch; text-align: center; }
.pp-clock.is-low .pp-clock__t { color: var(--c-video); }
.pp-clock__hide { font: inherit; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.pp-clock__hide:hover { color: var(--text); border-color: var(--text); }
.pp-q { display: grid; place-items: center; text-decoration: none; }
.sat-nav__q.is-answered { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.sat-nav__q.is-open, .sat-nav__q.is-omitted { background: var(--surface); border-style: dashed; color: var(--muted); }
.pp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.pp-dot--done { background: color-mix(in srgb, var(--primary) 30%, var(--surface)); border: 1px solid var(--primary); }
.pp-dot--open { border: 1.5px dashed var(--muted); }
.pp-nav__check { width: 100%; margin-top: 10px; justify-content: center; }
.pp-navmods { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.pp-navmods .sat-nav__grid { max-height: none; overflow: visible; }
@media (max-width: 560px) {
  .pp-bottom { grid-template-columns: auto auto 1fr; gap: 6px; }
  .pp-bottom .sat-counter { padding: 8px 10px; font-size: .88rem; }
  .pp-clock__hide { display: none; }
  .pp-clock__t { font-size: 1.05rem; }
}

/* review after the paper */
.pp-revopt { cursor: default; }
.pp-revopt:hover { transform: none; border-color: var(--border); }
.pp-revopt.is-correct:hover { border-color: #16a34a; }
.pp-revopt.is-wrong:hover { border-color: var(--c-video); }
.pp-revopt.is-wrong .dx-letter { background: var(--c-video); color: #fff; }
.pp-mine { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-family: var(--font); font-size: .72rem; font-weight: 800; background: var(--surface-2); color: var(--muted); vertical-align: 1px; }
.pp-sprrev { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.pp-sprrev > span { display: grid; gap: 2px; }
.pp-sprrev b { font-size: 1.2rem; }
.pp-xpsrc { display: block; margin-bottom: 8px; }
.pp-ok { color: #16a34a; }
.pp-bad { color: var(--c-video); }

/* score report */
.pp-report > .sat-back { display: inline-block; margin-bottom: 12px; }
.pp-hero { margin-bottom: 16px; }
.pp-hero h2 { margin-bottom: 14px; }
.pp-hero .dx-actions { justify-content: flex-end; }
.pp-scores { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.pp-big { flex: 1 1 150px; display: grid; gap: 2px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface-2); }
.pp-big span { font-size: .82rem; font-weight: 700; color: var(--muted); }
.pp-big strong { font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pp-big small { font-size: .78rem; color: var(--muted); }
.pp-big--total { background: var(--primary); color: var(--on-primary, #fff); }
.pp-big--total span, .pp-big--total small { color: inherit; opacity: .85; }
.pp-secs { display: grid; gap: 16px; }
.pp-sec h4 { font-size: .95rem; margin: 18px 0 6px; }
.pp-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pp-sec__head h3 { margin: 0; }
.pp-sec__score { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pp-sec__score small { font-size: .9rem; color: var(--muted); font-weight: 700; }
.pp-calc { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; }
.pp-calc th { text-align: left; font-weight: 700; padding: 8px 10px 8px 0; white-space: nowrap; }
.pp-calc td { padding: 8px 10px; }
.pp-calc td:last-child { text-align: right; font-weight: 800; white-space: nowrap; padding-right: 0; }
.pp-calc tr + tr { border-top: 1px solid var(--border); }
.pp-calc__sub th, .pp-calc__sub td { background: var(--surface-2); }
.pp-calc__sub th { padding-left: 10px; border-radius: 8px 0 0 8px; }
.pp-calc__sub td:last-child { padding-right: 10px; border-radius: 0 8px 8px 0; }
.pp-calc__total th, .pp-calc__total td { font-size: 1.05rem; padding-top: 12px; }
.pp-calc__total td:last-child { color: var(--primary); }
@media (max-width: 560px) {
  .pp-calc, .pp-calc tbody, .pp-calc tr { display: block; }
  .pp-calc tr { display: grid; grid-template-columns: 1fr auto; padding: 6px 0; }
  .pp-calc th { grid-column: 1; padding: 0; }
  .pp-calc td { padding: 0; }
  .pp-calc td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: .85rem; color: var(--muted); }
  .pp-calc td:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .pp-calc__sub th, .pp-calc__sub td:last-child { padding-left: 0; padding-right: 0; }
  .pp-calc__sub { background: var(--surface-2); padding: 6px 10px !important; border-radius: 8px; }
  .pp-calc__sub th, .pp-calc__sub td { background: none; }
}
.pp-cols { display: grid; gap: 4px 28px; }
@media (min-width: 760px) { .pp-cols { grid-template-columns: 1fr 1fr; } }
.pp-cols .sat-meter { grid-template-columns: minmax(120px, 1.3fr) 1fr 52px; }
.pp-revmods { display: grid; gap: 10px; margin-top: 8px; }
.pp-revmod__t { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.pp-revmods .pp-grid { margin-bottom: 0; }
.pp-how { margin-top: 16px; }
.pp-how summary { cursor: pointer; }
.pp-how ol { margin: 12px 0 8px; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.6; font-size: .94rem; }

/* explanation panel next to a reviewed question on wide screens */
@media (min-width: 1100px) {
  .pp-run { transition: margin-right .62s var(--xp-ease); }
  body.sat-xp-open .pp-run { margin-right: max(0px, calc(var(--xp-w) + 24px - (100vw - 100%) / 2)); }
}

/* analytics (sat.html and the profile page) */
.sat-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin-bottom: 16px; }
.sat-tile { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); display: grid; gap: 2px; }
.dx-card .sat-tile { background: var(--surface-2); border-color: transparent; }
.sat-tile span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.sat-tile strong { font-size: 1.6rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sat-tile small { color: var(--muted); font-size: .8rem; }
.sat-panels { display: grid; gap: 16px; }
@media (min-width: 820px) { .sat-panels { grid-template-columns: 1fr 1fr; } .sat-panel--wide { grid-column: 1 / -1; } }
.sat-panel { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.dx-card .sat-panel { padding: 16px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.sat-panel h3 { font-size: 1.02rem; margin: 0 0 4px; }
.sat-panel > .dx-note { margin-bottom: 12px; }
.sat-lowest { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.sat-lowest li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; }
.sat-lowest li.is-weak { background: color-mix(in srgb, var(--c-video) 8%, transparent); }
.sat-lowest__n { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.sat-lowest__name { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.sat-weak-tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--c-video); border: 1.5px solid currentColor; border-radius: 999px; padding: 2px 8px; }
.sat-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 2px 0 8px; vertical-align: -1px; }
.sat-key--right { background: #16a34a; }
.sat-key--wrong { background: var(--c-video); }
.sat-wkchart { width: 100%; height: auto; display: block; overflow: visible; }
.sat-wk__grid { stroke: var(--border); stroke-width: 1; }
.sat-wk__y, .sat-wk__x { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.sat-wk__right { fill: #16a34a; }
.sat-wk__wrong { fill: var(--c-video); }
.sat-wk__hit { fill: transparent; }
.sat-wk:hover .sat-wk__hit, .sat-wk:focus .sat-wk__hit { fill: var(--surface-2); }
.sat-wk:focus { outline: none; }
.sat-table { margin-top: 8px; font-size: .85rem; }
.sat-table summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.sat-table .ac-table { margin-top: 6px; }
.sat-meter { display: grid; grid-template-columns: minmax(130px, 1.2fr) 1fr 58px; gap: 12px; align-items: center; padding: 6px 0; font-size: .9rem; }
.sat-meter .sat-acc { justify-content: flex-end; }
.sat-meter__track { height: 9px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.dx-card .sat-meter__track { background: var(--border); }
.sat-meter__fill { display: block; height: 100%; border-radius: inherit; }
.sat-meter__fill--good { background: #16a34a; }
.sat-meter__fill--mid { background: #d97706; }
.sat-meter__fill--low { background: var(--c-video); }
/* accuracy by skill: tiles grouped by domain */
.sat-panel__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.sk-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.sk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.sk-dot--good { background: var(--good); }
.sk-dot--mid { background: var(--mid); }
.sk-dot--low { background: var(--bad); }
.sk-txt--good { color: var(--good); }
.sk-txt--low { color: var(--bad); }
.sk-group + .sk-group { margin-top: 22px; }
.sk-group__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.sk-group__head h4 { margin: 0; font-size: .76rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.sk-group__head .dx-note { font-size: .8rem; font-variant-numeric: tabular-nums; }
.sk-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
.sk {
  --tone: var(--muted);
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 112px;
  padding: 12px 14px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.sk--good { --tone: var(--good); }
.sk--mid { --tone: var(--mid); }
.sk--low { --tone: var(--bad); }
.sk:not(.sk--none) { background: color-mix(in srgb, var(--tone) 8%, var(--surface)); border-color: color-mix(in srgb, var(--tone) 40%, var(--border)); }
.sk--none { background: transparent; border-style: dashed; }
.sk__name { font-weight: 700; font-size: .86rem; line-height: 1.3; padding-right: 20px; }
.sk--none .sk__name { color: var(--muted); font-weight: 600; }
.sk__row { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sk__acc { font-size: 1.45rem; font-weight: 800; line-height: 1; color: var(--tone); font-variant-numeric: tabular-nums; }
.sk--none .sk__acc { font-size: .8rem; font-weight: 600; }
.sk__done { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sk__bar { display: flex; gap: 2px; height: 6px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--border) 70%, transparent); }
.sk__bar i { display: block; min-width: 0; }
.sk__r { background: var(--good); }
.sk__w { background: var(--bad); }
.sk__go { position: absolute; top: 11px; right: 11px; width: 16px; height: 16px; color: var(--primary); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s var(--ease); }
a.sk:hover, a.sk:focus-visible { color: var(--text); border-color: var(--primary); border-style: solid; transform: translateY(-2px); box-shadow: var(--shadow-md); }
a.sk:hover .sk__go, a.sk:focus-visible .sk__go { opacity: 1; transform: none; }
@media (max-width: 520px) {
  .sk-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sk { min-height: 104px; padding: 10px 12px 12px; }
  .sk__name { font-size: .8rem; }
  .sk__acc { font-size: 1.2rem; }
  .sk__row { flex-wrap: wrap; }
}
.sat-rings { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 16px; padding-top: 8px; }
.sat-ring { position: relative; display: grid; justify-items: center; gap: 6px; }
.sat-ring svg { width: 92px; height: 92px; }
.sat-ring__track { fill: none; stroke: var(--surface-2); stroke-width: 9; }
.dx-card .sat-ring__track { stroke: var(--border); }
.sat-ring__fill { fill: none; stroke-width: 9; stroke-linecap: round; }
.sat-ring__fill--easy { stroke: #16a34a; }
.sat-ring__fill--medium { stroke: #d97706; }
.sat-ring__fill--hard { stroke: var(--c-video); }
.sat-ring__mid { position: absolute; top: 0; height: 92px; display: grid; place-items: center; font-size: 1.05rem; }
@media (max-width: 520px) { .sat-meter { grid-template-columns: 1fr 52px; } .sat-meter__track { grid-column: 1 / -1; grid-row: 2; } }


/* ---------- Lesson booking (book.html, account page, admin panel) ---------- */
.page-hero__actions { margin-top: 20px; }
.tabpanel__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.tabpanel__book { flex: none; }
.bk { display: grid; gap: 20px; max-width: 860px; }
.bk .dx-card { scroll-margin-top: 84px; }      /* clear the sticky header when a step scrolls into view */
.bk-part { display: contents; }                 /* book.js: the redrawn steps sit in the grid around the calendar */
.bk-cal .dx-note { margin: 0 0 12px; }
.bk-cal__frame { display: block; width: 100%; height: 620px; border: 0; border-radius: var(--radius-sm); background: #fff; }
.bk-cal__frame--agenda { height: 480px; }
.bk-step__title { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.bk-step__title:focus { outline: none; }
.bk-step__title:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 6px; }
.bk-step__n { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 1rem; font-weight: 800; }
.bk-step .dx-choices { margin: 16px 0 0; }
.bk-step > .dx-note { margin: 0 0 4px; }
.bk-week { margin-top: 18px; }
.bk-week + .bk-week { padding-top: 18px; border-top: 1px solid var(--border); }
.bk-week__title { font-size: 1rem; font-weight: 800; margin: 0 0 10px; }
.bk-week__title span { color: var(--muted); font-weight: 600; margin-left: 6px; }
.bk-day { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; align-items: start; padding: 8px 0; }
.bk-day__name { font-weight: 700; padding-top: 9px; }
.bk-times { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-time {
  font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; display: grid; justify-items: center; min-width: 118px;
  padding: 9px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s var(--ease);
}
.bk-time small { font-size: .72rem; font-weight: 700; color: var(--muted); }
.bk-time:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-2px); }
.bk-time[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.bk-time:disabled { cursor: not-allowed; color: var(--muted); background: var(--surface-2); border-style: dashed; text-decoration: line-through; }
.bk-time:disabled small { text-decoration: none; }
.bk-summary { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--primary-soft); }
.bk-summary .dx-kicker { margin: 0; }
.bk-summary strong { font-size: 1.15rem; }
.bk-summary span:last-child { color: var(--muted); font-size: .92rem; font-weight: 600; }
.bk-booked h2:focus { outline: none; }
.bk-lessons { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.bk-lesson { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); }
.bk-lesson__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.bk-lesson p { margin: 8px 0 0; font-size: .95rem; }
.bk-lesson .btn { margin-top: 10px; }
.bk-lesson > .bk-row { margin-top: 10px; }
.bk-lesson--cancelled { opacity: .7; }
.bk-lesson--cancelled .bk-lesson__top strong { text-decoration: line-through; }
.bk-plan { padding: 10px 12px; border-radius: 8px; background: var(--surface); border-left: 3px solid var(--primary); white-space: pre-line; }
.bk-status { font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--surface); }
.bk-status--booked { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); }
.bk-status--done { background: color-mix(in srgb, #16a34a 16%, transparent); color: var(--good); }
.bk-status--cancelled { color: var(--muted); }
.bk-confirm { border-color: var(--c-video); color: var(--c-video); }
.bk-past { margin-top: 14px; }
.bk-past .bk-lesson { background: var(--surface-2); }
@media (max-width: 520px) {
  .bk-day { grid-template-columns: 1fr; }
  .bk-day__name { padding-top: 0; }
  .bk-time { min-width: 0; flex: 1 1 120px; }
}
/* admin: lesson hours and plans */
.bk-hours { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.bk-hours li { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; align-items: center; }
.bk-hours__day { font-weight: 700; }
.bk-hours__day small { display: block; font-weight: 600; }
.bk-hour { display: inline-flex; align-items: center; gap: 8px; margin: 0 8px 8px 0; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.bk-hour small { color: var(--muted); font-weight: 600; }
.bk-hour button { font: inherit; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; line-height: 1; }
.bk-hour button:hover { color: var(--c-video); }
.bk-hour-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.bk-hour-form .input, .bk-hour-form .select { min-width: 120px; }
.bk-hour-form fieldset { border: 0; padding: 0; margin: 0; }
.bk-hour-form legend { padding: 0; margin-bottom: 6px; }
.bk-hour-form .dx-check { margin: 0 14px 0 0; display: inline-flex; color: var(--text); }
.bk-admin-day { margin: 18px 0 0; font-size: 1rem; font-weight: 800; }
.bk-admin-day span { color: var(--muted); font-weight: 600; }
.bk-lesson .ac-form { gap: 10px; margin-top: 10px; }
.bk-lesson textarea { width: 100%; }
.bk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bk-row .btn { margin-top: 0; }





/* ==========================================================================
   Paper & ink touches for those screens
   ========================================================================== */

/* links written inside sentences of the screens */
:is(#sat-root, #diagnostic-root, #account-root, #book-root, #admin-root, .sat-xp, .guest-gate) :is(p, li, .dx-note) > a:not([class]) {
  color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}

/* SAT topic list: the checkbox and the long skill names stay on one line */
.sat-topic__name { flex-wrap: nowrap; }
.sat-topic__name a { min-width: 0; }
.sat-topic__name a:hover { color: var(--ink); background: linear-gradient(var(--hi), var(--hi)) 0 90% / 100% .4em no-repeat; text-decoration: none; }
:root[data-theme="dark"] .sat-topic__name a:hover { background: none; color: var(--hi); }

/* while practising or sitting a paper the page title folds away */
.is-running .phead { display: none; }
.is-running #sat-root { padding-top: 8px; }

/* line the screens up with the page title instead of centring them */
.sat-wrap { margin: 0; }
/* the booking steps never get wider than the screen (the serif headings are wide) */
.bk { grid-template-columns: minmax(0, 1fr); }
.bk-step { min-width: 0; }
.bk-step__title { flex-wrap: wrap; }
.bk-step .field { min-width: 0; }
.bk-step .select, .bk-step .input { width: 100%; max-width: 100%; min-width: 0; }

/* cards: paper with a ruled edge */
.dx-card, .sat-start, .pp-card, .sat-panel, .sat-tile { box-shadow: none; }
.dx-card { border-color: var(--line); }

/* segmented tabs (SAT sections, log in / create account): the chosen one is inked in */
.sat-tabs, .ac-tabs { background: var(--surface); border-color: var(--line-2); border-radius: 10px; }
.sat-tab, .ac-tabs button { border-radius: 7px; font-weight: 600; }
.sat-tab[aria-selected="true"], .ac-tabs [aria-selected="true"], .ac-tabs .is-on { background: var(--ink); color: var(--bg); box-shadow: none; }
.sat-tab[aria-selected="true"] .sat-tab__n { color: inherit; opacity: .7; }

/* answer options: the same hover as everywhere else */
.dx-option { border-color: var(--line-2); }
.dx-option:hover:not(:disabled) { border-color: var(--ink); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--hi); }
.dx-letter { border-radius: 50%; font-family: var(--mono); font-weight: 600; }

/* Official Papers: a stack of exam papers */
.pp-card { position: relative; border-radius: 4px; border-color: var(--line-2); box-shadow: 3px 3px 0 var(--line), 6px 6px 0 var(--line-2); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.pp-card:hover { border-color: var(--ink); transform: translate(-2px, -3px); box-shadow: 6px 6px 0 var(--hi); }
.pp-card__head h3, .pp-card h3 { font-family: var(--serif); font-size: 1.35rem; }

/* the diagnostic result title: highlighter instead of a gradient */
.dxr-title span {
  background: linear-gradient(var(--hi), var(--hi)) 0 88% / 100% .4em no-repeat;
  -webkit-background-clip: border-box; background-clip: border-box; color: inherit; -webkit-text-fill-color: currentColor;
}
:root[data-theme="dark"] .dxr-title span { background: none; color: var(--hi); -webkit-text-fill-color: var(--hi); }

/* step numbers (booking) and week badges (diagnostic plan): highlighter squares */
.bk-step__n, .dxr-plan__wk { background: var(--hi); color: #1B1E26; border-radius: 6px; font-family: var(--mono); font-weight: 600; }
.bk-time { border-radius: var(--r); font-family: var(--mono); font-weight: 500; }
.bk-time[aria-pressed="true"] { box-shadow: 3px 3px 0 var(--hi); }

/* the practice bar at the bottom and the explanation panel */
.sat-bottom { border-top: 1.5px solid var(--ink); }
.sat-counter { white-space: nowrap; }
.sat-xp { border-left: 1.5px solid var(--ink); }
.sat-xp__head h2, .sat-xp h2 { font-family: var(--serif); }

/* tables */
.sat-topics thead th, .ac-table th { font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.sat-topics__domain { font-family: var(--serif); font-size: 1.05rem; }

/* ---------- Official Papers: full-screen lock (js/exam-lock.js) ---------- */
/* While the test runs in full screen: no header, footer or menu, nothing else to click. */
.exam-on .mast, .exam-on .sheet, .exam-on .foot, .exam-on .skip { display: none !important; }
.exam-on main { padding-top: 12px; }
.exam-on #sat-root { padding-top: 0; }
:fullscreen, ::backdrop { background: var(--bg); }

/* "You left the test": covers the question, the clock is stopped */
.exam-away {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
}
.exam-away[hidden] { display: none; }
.exam-away__card {
  width: min(520px, 100%); padding: 34px 32px 28px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--r-sm); box-shadow: 8px 8px 0 var(--hi);
}
.exam-away__card h2 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); margin: 0 0 12px; }
.exam-away__card p { color: var(--ink-2); }
.exam-away__count { font: 500 .8rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--red) !important; margin: 18px 0 22px; }
.exam-away__count b { font-size: 1rem; }
.exam-away__later { display: inline-block; margin-left: 16px; font-size: .9rem; color: var(--ink-3); }

/* the score report and the results table */
.pp-left { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .93rem; }
.pp-left--clean { border-left-color: var(--good); background: color-mix(in srgb, var(--good) 8%, transparent); }
.pp-left-n { font-family: var(--mono); font-weight: 600; color: var(--red); }

/* privacy page reuses .dx-card for its text */
.privacy h2 { margin-top: 1.4em; }
.privacy h2:first-child { margin-top: 0; }
.privacy ul { padding-left: 1.3em; }
.privacy li::marker { color: var(--red); }
