:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #162b47;
  background: #f5f8fc;
  font-synthesis: none;
  --blue: #17539f;
  --blue-dark: #103f7e;
  --blue-soft: #edf4fd;
  --ink-muted: #52657e;
  --line: #dbe4ef;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible + span { outline: 3px solid #3175d2; outline-offset: 3px; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner {
  max-width: 1160px;
  margin: auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; font-size: 20px; font-weight: 750; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: #174b8e; color: #fff; font-size: 20px; }
.brand-domain { color: #667c96; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.3vw, 30px); }
.site-nav a { color: #3d5674; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-tag { color: var(--blue-dark); font-size: 13px; font-weight: 700; }
.language-toggle { border: 1px solid #b9cee7; background: #fff; color: var(--blue-dark); border-radius: 8px; padding: 8px 16px; font-weight: 700; text-decoration: none; }
.language-toggle:hover { background: var(--blue-soft); }
.dashboard-header-link { color: var(--blue-dark); font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.dashboard-header-link:hover { text-decoration: underline; }
.dashboard-hero-link { display: inline-flex; margin: 24px 0 0 16px; color: var(--blue-dark); font-size: 14px; font-weight: 750; text-decoration: none; }
.dashboard-hero-link:hover { text-decoration: underline; }
.language-discovery { margin: 14px 0 0; font-size: 13px; }
.language-discovery a { color: var(--blue-dark); font-weight: 700; }
.set-leaderboard-button { align-self: flex-start; border: 0; background: transparent; color: var(--blue-dark); font-weight: 700; padding: 10px 0 0; text-decoration: underline; }
.leaderboard-dialog { width: min(480px, calc(100% - 32px)); border: 1px solid #bfd1e5; border-radius: 12px; padding: 24px; color: #162b47; box-shadow: 0 20px 60px #16355840; }
.leaderboard-dialog::backdrop { background: #10284e80; }
.leaderboard-dialog a { display: block; margin: 16px 0; color: var(--blue); }
.leaderboard-list { padding-left: 22px; line-height: 1.9; }

main { max-width: 1160px; margin: auto; padding: 0 28px 72px; }
.intro { min-height: 410px; padding: 58px 0 54px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); align-items: center; gap: 54px; }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 710px; margin-bottom: 20px; font-size: clamp(38px, 5vw, 62px); line-height: 1.13; letter-spacing: -.055em; }
h1 em { font-style: normal; color: var(--blue); }
.intro-description { max-width: 550px; margin-bottom: 24px; color: var(--ink-muted); font-size: 17px; line-height: 1.65; }
.intro-points { display: flex; flex-wrap: wrap; gap: 9px 20px; color: #344f70; font-size: 13px; font-weight: 650; }
.intro-points span { display: inline-flex; align-items: center; gap: 8px; }
.intro-points span::before { content: ''; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #2e70c0; }
.hero-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 24px; padding: 10px 17px; border-radius: 8px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 750; text-decoration: none; }
.hero-link:hover { background: var(--blue-dark); }
.independent-note { margin: 26px 0 0; color: #5b6d83; font-size: 12px; }

.intro-panel { overflow: hidden; width: 100%; border: 1px solid #cbd9e9; border-top: 4px solid var(--blue); border-radius: 12px; background: #fff; box-shadow: 0 18px 38px #1a386515; }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-kicker { color: #647892; font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.panel-code { padding: 5px 8px; border: 1px solid #c7d8ed; border-radius: 5px; color: var(--blue-dark); font-size: 10px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.panel-main { padding: 24px 22px 18px; }
.panel-overline { display: block; margin-bottom: 8px; color: var(--blue); font-size: 12px; font-weight: 750; }
.panel-main strong { display: block; font-size: 25px; letter-spacing: -.035em; line-height: 1.25; }
.panel-main p { margin: 10px 0 0; color: var(--ink-muted); font-size: 14px; line-height: 1.55; }
.panel-meta { display: grid; grid-template-columns: 1fr 1fr; margin: 0 22px 18px; border: 1px solid var(--line); border-radius: 8px; }
.panel-meta > div { display: grid; gap: 2px; padding: 11px 14px; }
.panel-meta > div + div { border-left: 1px solid var(--line); }
.panel-meta span { color: #5b6e86; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.panel-meta strong { color: var(--blue-dark); font-size: 20px; letter-spacing: -.035em; }
.panel-bottom { display: flex; align-items: center; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--line); background: #f8fbff; color: #365778; font-size: 12px; font-weight: 650; }
.panel-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.journey-list { list-style: none; margin: 0; padding: 6px 22px 12px; }
.journey-list li { display: flex; align-items: start; gap: 14px; padding: 17px 0; }
.journey-list li + li { border-top: 1px solid var(--line); }
.journey-number { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .06em; padding-top: 3px; }
.journey-list li div { display: grid; gap: 5px; }
.journey-list strong { font-size: 16px; }
.journey-list li div span { color: var(--ink-muted); font-size: 13px; line-height: 1.45; }

.exam-section { padding: 8px 0 34px; scroll-margin-top: 18px; }
.exam-section-note { max-width: 300px; margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.5; text-align: right; }
.exam-catalogue { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 21px; }
.exam-card { display: flex; flex-direction: column; min-height: 210px; padding: 20px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.exam-card-ready { border-color: #8ab5e4; box-shadow: 0 8px 22px #1a4f8512; }
.exam-card:nth-child(2) { border-top: 3px solid #a46a84; }
.exam-card:nth-child(3) { border-top: 3px solid #bb873c; }
.exam-card:nth-child(4) { border-top: 3px solid #317f80; }
.exam-card-top { display: grid; justify-items: start; align-content: start; gap: 7px; min-height: 48px; }
.exam-category { color: #5b6e86; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.exam-status { padding: 4px 7px; border-radius: 5px; background: #f2f5f9; color: #5e6e80; font-size: 11px; font-weight: 700; }
.exam-status-ready { background: #e8f2fe; color: var(--blue-dark); }
.exam-card h3 { margin: 22px 0 7px; font-size: 22px; letter-spacing: -.04em; }
.exam-summary { margin: 0 0 18px; color: var(--ink-muted); font-size: 13px; line-height: 1.55; }
.exam-set-count { margin-top: auto; color: #527396; font-size: 12px; font-weight: 700; }
.exam-card-link { display: inline-block; width: fit-content; margin-top: 6px; color: var(--blue-dark); font-size: 13px; font-weight: 800; text-decoration: none; }
.exam-card-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.landing-promise { margin: 0 0 35px; }
.practice-page-intro { padding: 42px 0 24px; }
.practice-page-intro h1 { margin-bottom: 10px; font-size: clamp(34px, 4vw, 48px); }
.practice-page-intro p:not(.eyebrow) { max-width: 700px; color: var(--ink-muted); line-height: 1.6; }
.practice-page-intro a { color: var(--blue-dark); font-weight: 750; }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.promise-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.promise-grid article:nth-child(1) { border-top: 3px solid #d49b47; }
.promise-grid article:nth-child(2) { border-top: 3px solid #4f8eaa; }
.promise-grid article:nth-child(3) { border-top: 3px solid #9c789e; }
.promise-grid strong { font-size: 16px; }
.promise-grid p { margin: 9px 0 0; color: var(--ink-muted); font-size: 13px; line-height: 1.55; }

.practice-shell { padding: 36px; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 14px; background: #fff; box-shadow: 0 12px 36px #1c385c0b; scroll-margin-top: 18px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading .eyebrow { margin-bottom: 7px; }
h2 { margin-bottom: 0; font-size: clamp(27px, 3vw, 36px); letter-spacing: -.04em; }
.demo-badge { padding: 8px 12px; border: 1px solid #ccdced; border-radius: 7px; background: #f0f6fd; color: #315c89; font-size: 12px; font-weight: 700; white-space: nowrap; }
.practice-note { margin: 12px 0 28px; color: #64758b; font-size: 14px; }
.set-chooser:not(:empty) { margin: 0 0 22px; }
.chooser-label { margin: 0 0 8px; color: #3d5774; font-size: 13px; font-weight: 700; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 15px; }
.set-card { display: grid; justify-items: start; align-content: start; gap: 16px; width: 100%; max-width: 430px; min-height: 230px; padding: 23px; border: 1px solid #c9d9ec; border-radius: 12px; background: linear-gradient(155deg, #f8fbff, #fff 55%); }
.set-card h3 { margin: 0; color: #142f51; font-size: 23px; letter-spacing: -.03em; }
.set-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.set-tag { padding: 5px 8px; border: 1px solid #d6e2ee; border-radius: 5px; background: #fff; color: #526980; font-size: 11px; font-weight: 700; }
.set-tag-free { background: #e8f2fe; border-color: #b8d4f4; color: #174b8e; }
.set-card-meta { margin: 0; color: #536b85; font-size: 13px; }
.set-card .primary-button { margin-top: auto; min-height: 42px; }
.status:empty { display: none; }
.status { margin-bottom: 18px; color: var(--blue-dark); }
.set-instructions { margin-bottom: 24px; padding: 14px 18px; border-left: 3px solid #73a1d8; border-radius: 6px; background: #f4f8fd; color: #415a75; font-size: 14px; line-height: 1.6; }
.practice-toolbar, .question-actions, .focus-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.practice-toolbar { margin: -7px 0 16px; }
.secondary-button { padding: 8px 13px; border: 1px solid #bfd2e8; border-radius: 7px; background: #fff; color: var(--blue-dark); font-size: 13px; font-weight: 650; }
.secondary-button:hover { background: var(--blue-soft); }
.secondary-button:disabled { opacity: .45; cursor: default; }
.practice-clock { margin-left: auto; color: #214f80; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 700; }
.clock-note, .palette-legend { color: #60748a; font-size: 12px; line-height: 1.5; }
.clock-note { margin: 0 0 14px; }
.question-palette { display: flex; flex-wrap: wrap; gap: 7px; }
.mock-subjects { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; }
.mock-subjects [aria-pressed="true"] { background: var(--blue-soft); border-color: #286bb5; }
.mock-dialog { width: min(540px, calc(100% - 28px)); padding: 24px; border: 1px solid #bfd1e5; border-radius: 12px; color: #162b47; }
.mock-dialog::backdrop { background: #10284e80; }
.mock-dialog p { margin-top: 12px; }
.palette-button { min-width: 38px; min-height: 38px; border: 1px solid #bfcfe1; border-radius: 7px; background: #fff; color: #375775; font-weight: 700; }
.palette-button.is-answered { border-color: #286bb5; background: #e9f3ff; color: #174b8e; }
.palette-button.is-review { border-color: #a47525; background: #fff4dd; color: #6f4b12; }
.palette-button[aria-current="step"] { outline: 2px solid #153e72; outline-offset: 2px; }
.palette-legend { margin: 9px 0 18px; }
.question-actions { margin-top: 20px; }
.focus-navigation { justify-content: space-between; margin: 5px 0 18px; }
#practice-app:fullscreen { overflow: auto; padding: clamp(20px, 4vw, 60px); background: #fff; }
#practice-app:fullscreen form { max-width: 920px; margin: auto; }
.question-card { padding: 24px 0; border-top: 1px solid #e5ebf2; }
.question-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.question-number { color: var(--blue); font-weight: 750; }
.subject { border: 1px solid #d4e2f0; border-radius: 6px; padding: 4px 9px; background: #f1f6fc; color: #355c85; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.topic { color: #5e7289; font-size: 12px; }
.question-title { margin-bottom: 16px; font-size: 18px; line-height: 1.5; font-weight: 700; }
.question-title, .result-question { white-space: pre-line; }
.question-figure { display: block; height: auto; max-width: min(100%, 720px); margin: 8px 0 16px; border: 1px solid #dce5ef; border-radius: 8px; background: white; }
.diagram-description { margin-bottom: 16px; color: #415a75; font-size: .9rem; }
.diagram-description summary { cursor: pointer; }
.diagram-description p { white-space: pre-line; }
.option-content { min-width: 0; }
.option .question-figure { margin: 8px 0 0; border: 0; border-radius: 0; }
.integer-answer { display: grid; gap: 7px; max-width: 240px; color: #365577; font-size: 13px; font-weight: 700; }
.integer-answer input { min-height: 44px; padding: 9px 12px; border: 1px solid #b7cbe1; border-radius: 7px; font-size: 18px; }
.integer-answer + small { display: block; margin-top: 7px; color: #65788d; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 11px 14px; border: 1px solid #dce5ef; border-radius: 8px; color: #3c536e; cursor: pointer; }
.option:has(input:checked) { border-color: #3879c7; background: #eef5fe; color: #174b8e; }
.option:hover { border-color: #8db2da; }
.option input { accent-color: var(--blue); width: 17px; height: 17px; margin: 0; }
.submit-row { display: flex; align-items: center; gap: 15px; padding-top: 22px; border-top: 1px solid #e5ebf2; }
.primary-button { border: 1px solid var(--blue); border-radius: 8px; padding: 12px 22px; background: var(--blue); color: white; font-weight: 700; }
.primary-button:hover { background: var(--blue-dark); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.submit-hint { color: #5d7189; font-size: 13px; }
.result-summary { margin: 26px 0 8px; padding: 24px; border: 1px solid #cddff1; border-radius: 9px; background: #edf5fe; }
.result-summary strong { display: block; font-size: 35px; color: var(--blue-dark); letter-spacing: -.05em; }
.result-summary p { margin: 5px 0 0; color: #3b5e84; }
.result-item { padding: 16px 0; border-bottom: 1px solid #e5ebf2; }
.result-item strong { display: block; margin-bottom: 6px; }
.result-item p { margin: 0; color: #4a5e75; line-height: 1.6; }
.result-item .correct { color: var(--blue-dark); }
.result-item .incorrect { color: #9b4538; }
.revision-panel { margin: 16px 0 25px; padding: 20px; border: 1px solid #c9d9ec; border-radius: 9px; background: #f7faff; }
.revision-panel h3 { margin: 0 0 10px; color: #183c67; font-size: 18px; }
.revision-panel p { margin: 0; color: #4a5e75; }
.revision-list { margin: 0; padding-left: 20px; color: #385778; line-height: 1.8; }
.ai-help-button { margin-top: 9px; padding: 4px 0; border: 0; background: transparent; color: var(--blue-dark); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ai-note { margin: 15px 0; color: #5e7187; font-size: 13px; line-height: 1.5; }
.ai-dialog { width: min(640px, calc(100% - 28px)); max-height: min(85vh, 760px); padding: clamp(20px, 4vw, 32px); border: 1px solid #c3d4e7; border-radius: 14px; box-shadow: 0 20px 70px #102c5540; color: #182f4e; }
.ai-dialog::backdrop { background: #10243d99; }
.ai-dialog h2 { font-size: clamp(22px, 3vw, 28px); }
.ai-dialog p { margin: 12px 0 20px; color: #4b6079; line-height: 1.55; }
.ai-prompt { width: 100%; height: min(240px, 32vh); padding: 12px; resize: vertical; border: 1px solid #bacde1; border-radius: 8px; background: #f8fbff; color: #263c57; font: inherit; font-size: 13px; line-height: 1.5; }
.ai-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.ai-actions a { display: inline-flex; align-items: center; min-height: 43px; text-decoration: none; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.info-card { padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
#progress { scroll-margin-top: 18px; }
.info-card h2 { font-size: clamp(23px, 2.6vw, 29px); }
.info-note, .empty-note { margin: 12px 0 0; color: #627389; font-size: 14px; line-height: 1.6; }
.report-main { margin: 20px 0 5px; color: var(--blue-dark); font-weight: 700; }
.report-best { margin: 0; color: #45617f; }
.subject-list { margin: 14px 0 0; padding-left: 18px; color: #4a5e75; line-height: 1.8; }
.clear-button { margin-top: 18px; padding: 7px 0; border: 0; background: transparent; color: var(--blue-dark); text-decoration: underline; font-size: 13px; }
.clear-button:disabled { opacity: .6; }
.account-app:not(:empty) { margin-top: 17px; }
.account-prompt, .account-status { margin: 0 0 10px; color: #355b83; font-size: 14px; line-height: 1.5; }
.account-status { font-weight: 700; }
.account-app .clear-button { display: block; margin-top: 8px; text-align: left; }
.account-export { display: block; width: fit-content; margin-top: 12px; color: var(--blue-dark); font-size: 13px; }
.google-button { min-height: 44px; max-width: 100%; }
.analytics-heading { margin: 22px 0 6px; font-size: 17px; }
.date-list { list-style: none; margin: 18px 0 0; padding: 0; }
.date-list li { padding: 14px 0; border-top: 1px solid #e5ebf2; }
.date-list time, .date-list strong { display: block; }
.date-list time { color: var(--blue-dark); font-size: 13px; font-weight: 700; }
.date-list strong { margin-top: 3px; }
.date-list p { margin: 5px 0; color: #4a5e75; line-height: 1.5; }
.date-list a { color: var(--blue-dark); font-weight: 700; }
.site-footer { color: #5d7189; border-top: 1px solid var(--line); background: #fff; font-size: 13px; }
.site-footer a { color: var(--blue-dark); }
.privacy-main { max-width: 880px; padding-top: 48px; line-height: 1.65; }
.privacy-main h1 { font-size: clamp(34px, 4vw, 48px); }
.privacy-main h2 { margin: 28px 0 8px; font-size: 23px; }
.privacy-main p, .privacy-main li { color: #3f5671; }
.privacy-language { margin-top: 50px; border-top: 1px solid var(--line); padding-top: 35px; }
.privacy-main a { color: var(--blue-dark); }

@media (max-width: 760px) {
  .header-inner, .footer-inner { padding: 16px 18px; }
  .footer-inner { flex-wrap: wrap; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 13px; }
  .header-tag { display: none; }
  main { padding: 0 18px 48px; }
  .intro { min-height: 0; grid-template-columns: 1fr; gap: 30px; padding: 46px 0 40px; }
  .intro-panel { max-width: 520px; }
  .exam-section-note { text-align: left; }
  .exam-catalogue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promise-grid { grid-template-columns: 1fr; }
  .practice-shell { padding: 23px 18px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .options { grid-template-columns: 1fr; }
  .submit-row { align-items: start; flex-direction: column; }
  .info-grid { grid-template-columns: 1fr; }
  .info-card { padding: 23px 18px; }
}

@media (max-width: 420px) {
  .brand { font-size: 17px; }
  .brand-mark { width: 30px; height: 30px; font-size: 18px; }
  .language-toggle { padding: 7px 10px; }
  h1 { font-size: 38px; }
  .panel-main strong { font-size: 23px; }
  .exam-catalogue { grid-template-columns: 1fr; }
  .exam-card { min-height: 0; }
}
