:root {
  color-scheme: light;
  --page: #f7f6fc;
  --ink: #302b48;
  --muted: #6d6880;
  --purple: #6250b8;
  --purple-dark: #4d3c98;
  --lavender: #eae5fa;
  --line: #e3dfed;
  --lime: #dfedb7;
  --green: #2a6c4d;
  --red: #a53847;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, a, input, summary { touch-action: manipulation; }
a { color: inherit; }
button svg, .text-button svg, .home-footnote svg, .flag-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button { color: inherit; }
button, input, a, summary, [tabindex] { outline-offset: 5px; }
:focus-visible { outline: 3px solid var(--purple); }
button:focus:not(:focus-visible), [tabindex="-1"]:focus { outline: none; }
input { accent-color: var(--purple); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
.site-shell { max-width: 1200px; padding: 0 40px; margin: 0 auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 700; line-height: 1.4; }
.brand-icon { width: 41px; height: 41px; color: var(--purple); flex-shrink: 0; }
.brand-subtitle { display: block; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .02em; }
.header-actions { display: flex; align-items: center; gap: 30px; }
.class-tag { font-size: 13px; color: var(--muted); white-space: nowrap; }
.class-tag span { padding: 0 7px; color: #c4bfd3; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; padding: 8px 0; background: none; font-size: 14px; color: var(--purple-dark); font-weight: 600; }
.text-button:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 35px; padding: 65px 0 62px; }
.scope-label { display: flex; align-items: center; gap: 8px; color: var(--purple-dark); font-size: 13px; font-weight: 600; }
.scope-dot { width: 7px; height: 7px; border-radius: 50%; background: #8a77c9; }
.hero h1 { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.14; letter-spacing: -.055em; margin: 19px 0; }
.hero-description { max-width: 420px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; margin-top: 27px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 9px; border: 1px solid transparent; padding: 12px 20px; font-size: 14px; font-weight: 700; line-height: 1.4; transition: background-color .15s, border-color .15s; }
.button-primary { color: white; background: var(--purple); border-color: var(--purple); }
.button-primary:hover:not(:disabled) { background: var(--purple-dark); border-color: var(--purple-dark); }
.button-secondary { background: white; border-color: var(--line); color: var(--purple-dark); }
.button-secondary:hover:not(:disabled) { border-color: var(--purple); background: #f3effd; }
.button-lime { color: var(--ink); background: var(--lime); }
.button-lime:hover { background: #cddd99; }
.button-small { min-height: 40px; padding: 9px 20px; }
.text-link { font-size: 14px; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.quiet-note { font-size: 12px; color: var(--muted); margin-top: 16px; }
.grammar-illustration { position: relative; display: flex; align-items: center; justify-content: center; padding: 15px 35px 30px; }
.illustration-orbit { position: absolute; inset: 22px 7px 10px 2px; background: #ede8fa; border-radius: 45% 55% 50% 50%; transform: rotate(-10deg); }
.example-sheet { position: relative; width: 302px; padding: 20px 29px 25px; border: 1px solid #e3def0; border-radius: 6px 6px 22px 6px; background: #fff; transform: rotate(-5deg); box-shadow: 7px 10px 0 #ded7ef; }
.sheet-top { display: flex; align-items: center; gap: 5px; border-bottom: 1px solid #ece8f4; padding-bottom: 12px; margin-bottom: 22px; }
.sheet-dot { width: 5px; height: 5px; background: #d7d0ea; border-radius: 50%; }
.sheet-label { margin-left: auto; font-size: 10px; color: var(--muted); }
.example-label { font-size: 11px; color: var(--muted); }
.example-line p { font-size: 23px; font-weight: 700; line-height: 1.5; letter-spacing: -.025em; margin-top: 3px; }
.ink-present { background: linear-gradient(transparent 65%, #e1ecd0 65%); }
.ink-continuous { background: linear-gradient(transparent 65%, #e2dcfa 65%); }
.example-connector { display: flex; align-items: center; gap: 13px; height: 50px; color: #a392cf; }
.example-connector span { height: 1px; background: #eeeaf6; flex: 1; }
.example-connector svg { width: 17px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.sheet-tick { position: absolute; right: -19px; bottom: 27px; display: grid; place-items: center; width: 47px; height: 47px; background: var(--lime); color: #48672c; border: 4px solid var(--page); border-radius: 50%; font-size: 24px; transform: rotate(5deg); }
.encouragement { position: absolute; right: -5px; top: 5px; font-size: 15px; font-style: italic; color: var(--purple-dark); transform: rotate(8deg); }
.encouragement svg { display: block; width: 42px; height: 25px; margin-left: 25px; fill: none; stroke: #9e8ccb; stroke-width: 1.4; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.section-heading h2 { font-size: 23px; letter-spacing: -.035em; }
.section-heading p { font-size: 13px; color: var(--muted); margin-top: 6px; }
.question-bank-label { color: var(--muted); font-size: 12px; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.topic-card { display: flex; flex-direction: column; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 24px 24px 0; overflow: hidden; }
.topic-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.unit-label { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 5px; background: #ece6fa; color: #674ba0; }
.topic-icon { width: 34px; height: 34px; stroke-width: 1.65; fill: none; stroke: #9783bf; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.topic-past .unit-label { background: #e5eef5; color: #406a85; }
.topic-past .topic-icon { stroke: #7b9cb3; }
.topic-perfect .unit-label { background: #e9efdc; color: #576d37; }
.topic-perfect .topic-icon { stroke: #91a567; }
.topic-card h3 { font-size: 19px; letter-spacing: -.04em; margin-bottom: 10px; }
.topic-card p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.topic-list { margin: 19px 0 25px; padding: 0; list-style: none; font-size: 12px; line-height: 2.1; }
.topic-list li::before { content: '✓'; font-weight: 700; color: #9b8abf; margin-right: 9px; }
.unit-start { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: transparent; font-size: 13px; font-weight: 700; border: 0; border-top: 1px solid var(--line); margin: auto -24px 0; padding: 15px 24px; color: var(--purple-dark); text-align: left; }
.unit-start:hover { background: #f3f0fb; }
.unit-start span { font-size: 20px; font-weight: 400; line-height: 1; }
.exam-banner { display: flex; align-items: center; gap: 25px; margin-top: 30px; background: #393052; border-radius: 13px; padding: 30px; color: white; }
.exam-banner-icon { flex: 0 0 57px; }
.exam-banner-icon svg { width: 57px; height: 70px; stroke: #e3ddef; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.exam-banner-icon rect:nth-child(2) { fill: #393052; }
.exam-banner-copy { flex: 1; }
.exam-label { font-size: 11px; color: #c6bdda; }
.exam-banner h2 { font-size: 22px; letter-spacing: -.035em; margin-top: 5px; }
.exam-banner p { font-size: 12px; color: #d0c8dd; margin-top: 7px; max-width: 470px; }
.timer-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: fit-content; margin-top: 14px; cursor: pointer; font-size: 12px; }
.timer-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--lime); }
.optional-label { color: #bdb3cd; font-size: 11px; }
.exam-banner .timer-note { font-size: 10px; margin-top: 3px; margin-left: 24px; }
.exam-banner .button { flex-shrink: 0; }
.home-footnote { display: flex; justify-content: center; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; margin: 28px 0 0; }
.home-footnote svg { width: 13px; height: 13px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 42px; padding: 21px 0; }
.site-footer span span { margin: 0 5px; color: #a59abf; }
.resume-banner { display: flex; align-items: center; gap: 17px; background: #eeebf8; border: 1px solid #d9d0ef; border-radius: 10px; padding: 18px 22px; margin: -10px 0 35px; }
.resume-symbol { color: var(--purple); font-size: 30px; }
.resume-banner h2 { font-size: 16px; }
.resume-banner p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.resume-banner .button { margin-left: auto; }
.history-section { margin-top: 35px; }
.history-section .section-heading { margin-bottom: 13px; }
.history-section h2 { font-size: 19px; }
.history-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: white; }
.history-list li { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 20px; font-size: 13px; }
.history-list li + li { border-top: 1px solid var(--line); }
.history-list small { display: block; font-size: 11px; color: var(--muted); }
.history-score { color: var(--purple-dark); font-weight: 700; white-space: nowrap; }
.notice, .storage-warning { background: #fff1d6; color: #735117; border: 1px solid #e8ce9c; padding: 12px 18px; font-size: 13px; border-radius: 8px; margin-top: 20px; }
.quiz-topline { display: flex; align-items: center; gap: 20px; margin: 27px 0; }
.mode-badge { color: var(--purple-dark); background: var(--lavender); padding: 3px 11px; font-size: 12px; border-radius: 5px; }
.quiz-timer { margin-left: auto; font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 700; padding: 5px 13px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.quiz-timer.timer-urgent { background: #fff0ef; color: var(--red); border-color: #deb5ba; }
.quiz-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 28px 0 26px; }
.quiz-heading h1 { font-size: 31px; letter-spacing: -.04em; margin-top: 7px; }
.quiz-heading > p { color: var(--muted); font-size: 12px; max-width: 230px; }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 25px; align-items: start; }
.question-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.question-meta > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.flag-button { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; font-size: 12px; padding: 5px; color: var(--muted); }
.flag-button svg { width: 16px; height: 16px; }
.flag-button[aria-pressed="true"] { color: #84600e; }
.flag-button[aria-pressed="true"] svg { fill: #fbe0a1; }
.question-type { color: var(--purple-dark); font-size: 12px; font-weight: 700; margin-bottom: 13px; }
.question-context { color: var(--muted); font-size: 14px; margin-bottom: 13px; max-width: 65ch; }
fieldset { padding: 0; border: 0; margin: 0; min-width: 0; }
.question-prompt { display: block; width: 100%; font-size: 23px; font-weight: 700; line-height: 1.6; padding: 0; letter-spacing: -.02em; margin-bottom: 25px; overflow-wrap: anywhere; }
.sentence-gap { display: inline; color: var(--purple); letter-spacing: .06em; white-space: nowrap; }
.answer-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.answer-option { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 13px 15px; font-size: 15px; cursor: pointer; line-height: 1.5; }
.answer-option:hover { background: #faf8ff; border-color: #baaed8; }
.answer-option:has(input:checked) { background: #f0ebfc; border-color: var(--purple); color: var(--purple-dark); }
.answer-option:has(input:focus-visible) { outline: 3px solid var(--purple); outline-offset: 3px; }
.answer-option input { width: 17px; height: 17px; margin: 0; flex-shrink: 0; }
.answer-option.is-correct { background: #edf6f0 !important; border-color: #6c9c80 !important; color: var(--green) !important; }
.answer-option.is-wrong { background: #fff1f1 !important; border-color: #ce929b !important; color: var(--red) !important; }
.answer-option:has(input:disabled) { cursor: default; }
.gap-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.gap-input { width: 100%; background: #fdfcff; border: 1px solid #bbb2ce; border-radius: 8px; padding: 13px 15px; color: var(--ink); font-size: 18px; }
.gap-input[readonly] { background: #f4f2f7; }
.gap-help { margin-top: 8px; color: var(--muted); font-size: 11px; }
.question-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 28px; }
.question-actions .text-button { font-size: 12px; margin-left: auto; }
.answer-feedback { margin-top: 22px; padding: 16px 18px; border-radius: 8px; background: #edf6f0; color: #285b41; border-left: 3px solid #6c9c80; }
.answer-feedback.is-wrong { background: #fff3ee; color: #803e35; border-color: #c0806e; }
.answer-feedback strong { display: block; font-size: 15px; margin-bottom: 5px; }
.answer-feedback p { font-size: 13px; }
.answer-feedback p + p { margin-top: 6px; }
.practice-hint { font-size: 12px; color: var(--muted); text-align: center; margin: 17px 10px 0; }
.question-sidebar { background: #efecf7; border: 1px solid #e4dff0; border-radius: 12px; padding: 21px; }
.progress-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.progress-heading h2 { font-size: 15px; }
.progress-heading span { font-size: 12px; color: var(--muted); white-space: nowrap; }
progress { display: block; width: 100%; height: 6px; border: none; border-radius: 3px; background: #dcd6eb; margin: 13px 0; overflow: hidden; }
progress::-webkit-progress-bar { background: #dcd6eb; border-radius: 3px; }
progress::-webkit-progress-value { background: var(--purple); border-radius: 3px; }
progress::-moz-progress-bar { background: var(--purple); border-radius: 3px; }
.navigator-hint { font-size: 11px; color: var(--muted); margin: 16px 0 12px; }
.question-navigator { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.nav-question { position: relative; min-height: 34px; font-size: 12px; font-weight: 700; border: 1px solid #d6cfe5; border-radius: 6px; background: white; padding: 6px 0; }
.nav-question.is-answered { background: #dcd4f2; border-color: #bcb0db; color: #4d3c88; }
.nav-question[aria-current="step"] { box-shadow: 0 0 0 2px var(--purple); border-color: transparent; }
.nav-question.is-flagged::after { content: ''; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; background: #e6b63c; border: 1px solid #a87713; border-radius: 2px; }
.navigator-key { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 23px; color: var(--muted); font-size: 10px; }
.navigator-key span { display: flex; align-items: center; gap: 5px; }
.navigator-key i { width: 9px; height: 9px; border-radius: 2px; }
.key-answered { background: #d1c5eb; border: 1px solid #b4a4d2; }
.key-flagged { background: #e6b63c; border: 1px solid #a87713; }
.finish-button { width: 100%; }
.save-note { font-size: 10px; color: var(--muted); text-align: center; margin-top: 12px; }
#results-view { padding-top: 27px; }
.results-overview { display: flex; align-items: center; gap: 43px; padding: 37px 0; }
.score-ring { --score: 0%; display: grid; place-items: center; width: 180px; height: 180px; flex-shrink: 0; border-radius: 50%; background: conic-gradient(var(--purple) var(--score), #e5dfef var(--score)); padding: 12px; }
.score-ring > div { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--page); border-radius: 50%; }
.score-ring strong { font-size: 42px; letter-spacing: -.05em; line-height: 1.3; }
.score-ring span { font-size: 12px; color: var(--muted); }
.results-copy h1 { margin: 10px 0; font-size: 34px; letter-spacing: -.04em; }
.results-copy > p:not(.scope-label) { color: var(--muted); font-size: 14px; max-width: 58ch; }
.results-copy .result-detail { font-size: 12px !important; margin-top: 8px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.results-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 5px 0 35px; }
.breakdown-card { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 20px; }
.breakdown-card h2 { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.breakdown-card h2 span { color: var(--purple-dark); white-space: nowrap; }
.breakdown-card p { font-size: 12px; color: var(--muted); margin-top: 7px; }
.breakdown-card progress { margin: 13px 0 0; }
.review-filter { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.review-filter input { width: 16px; height: 16px; }
.review-list { display: grid; gap: 13px; }
.review-card { background: white; border: 1px solid var(--line); border-left: 4px solid #6e9a80; border-radius: 8px; padding: 20px 24px; }
.review-card.is-wrong { border-left-color: #c0806e; }
.review-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.review-status { font-weight: 700; color: var(--green); }
.review-card.is-wrong .review-status { color: var(--red); }
.review-card h3 { font-size: 17px; line-height: 1.5; margin-bottom: 12px; }
.review-card .review-context { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.review-card .review-answer { font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.review-card .review-explanation { font-size: 13px; color: var(--muted); margin-top: 13px; border-top: 1px solid #eeebf3; padding-top: 12px; max-width: 78ch; }
.review-empty { color: var(--green); background: #eaf3ec; padding: 20px; border-radius: 8px; font-size: 14px; }
dialog { background: var(--page); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 30px; max-height: calc(100dvh - 48px); max-width: calc(100vw - 32px); box-shadow: 0 20px 80px #302b4833; }
dialog::backdrop { background: #28213b80; backdrop-filter: blur(3px); }
.rules-dialog { width: 760px; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; }
.dialog-header h2 { font-size: 27px; letter-spacing: -.035em; margin-top: 6px; }
.icon-button { display: grid; place-items: center; border: 1px solid var(--line); background: white; width: 36px; height: 36px; border-radius: 50%; font-size: 25px; flex-shrink: 0; line-height: 1; }
.notes-unit { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 0 20px; margin-top: 12px; }
.notes-unit > summary { cursor: pointer; font-size: 17px; font-weight: 700; padding: 17px 0; }
.notes-unit > summary span { font-size: 12px; color: var(--purple); margin-right: 9px; }
.note-rule { border-top: 1px solid var(--line); padding: 17px 0; }
.note-rule h3 { font-size: 15px; margin-bottom: 8px; }
.note-rule p { font-size: 13px; color: var(--muted); }
.note-rule p + p { margin-top: 7px; }
.note-rule .rule-example { color: var(--ink); background: #f3f0fa; border-radius: 5px; padding: 10px 13px; margin-top: 10px; }
.note-rule .rule-warning { font-size: 12px; color: #785719; }
.notes-footer { text-align: center; color: var(--muted); font-size: 12px; padding-top: 20px; }
.confirm-dialog { width: 470px; background: white; }
.confirm-dialog h2 { font-size: 23px; letter-spacing: -.03em; }
.confirm-dialog p { margin-top: 13px; font-size: 14px; color: var(--muted); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px; margin-top: 25px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; left: 12px; top: -80px; background: var(--purple); color: white; padding: 10px 20px; border-radius: 6px; }
.skip-link:focus { top: 12px; }
@media (min-width: 1000px) { .question-sidebar { position: sticky; top: 24px; } }
@media (max-width: 1000px) {
  .site-shell { padding: 0 28px; }
  .hero { gap: 10px; padding: 50px 0; }
  .hero h1 { font-size: 37px; }
  .grammar-illustration { padding-right: 23px; padding-left: 23px; }
  .example-sheet { width: 275px; padding: 18px 23px 22px; }
  .encouragement { top: -5px; right: 0; font-size: 13px; }
  .topic-grid { gap: 12px; }
  .topic-card { padding: 20px 18px 0; }
  .topic-card h3 { font-size: 17px; min-height: 41px; }
  .unit-start { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .wide-only { display: none; }
  .exam-banner { gap: 18px; padding: 25px; }
  .exam-banner-icon { display: none; }
  .quiz-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; }
  .question-card { padding: 24px; }
  .question-sidebar { padding: 17px; }
  .question-prompt { font-size: 21px; }
}
@media (max-width: 760px) {
  .header-actions { gap: 17px; }
  .brand { font-size: 17px; }
  .class-tag { font-size: 12px; }
  .hero { grid-template-columns: 1fr 1fr; gap: 12px; padding: 45px 0; }
  .hero h1 { font-size: 32px; }
  .hero-description { font-size: 14px; }
  .hero-actions { gap: 15px; margin-top: 22px; }
  .hero-actions .button { font-size: 13px; padding: 12px 14px; }
  .hero-actions .text-link { font-size: 12px; }
  .scope-label { font-size: 11px; }
  .grammar-illustration { padding: 20px 20px 25px; }
  .example-sheet { width: 240px; padding: 15px 18px 20px; }
  .example-line p { font-size: 20px; }
  .sheet-label { font-size: 9px; }
  .encouragement { right: -2px; top: -9px; font-size: 11px; }
  .sheet-tick { width: 40px; height: 40px; font-size: 20px; }
  .question-bank-label { display: none; }
  .topic-grid { grid-template-columns: 1fr; gap: 15px; }
  .topic-card { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; padding: 20px 23px 0; }
  .topic-card-top { grid-column: 1 / -1; margin-bottom: 8px; }
  .topic-card h3 { min-height: 0; grid-column: 1; font-size: 21px; }
  .topic-card > p { grid-column: 1; margin-bottom: 18px; }
  .topic-list { grid-column: 2; grid-row: 2 / 4; margin: 0; padding: 2px 0 18px; align-self: center; }
  .unit-start { grid-column: 1 / -1; margin: 0 -23px; padding: 14px 23px; }
  .topic-icon { width: 29px; height: 29px; }
  .exam-banner { align-items: flex-start; flex-wrap: wrap; }
  .exam-banner-copy { flex-basis: 100%; }
  .exam-banner h2 { font-size: 23px; }
  .exam-banner .button { width: 100%; }
  .quiz-layout { grid-template-columns: 1fr; }
  .question-sidebar { margin-top: 8px; }
  .question-navigator { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 9px; }
  .question-sidebar .finish-button { width: auto; }
  .question-sidebar .save-note { display: inline; text-align: left; margin-left: 13px; }
  .quiz-heading > p { max-width: 200px; }
  .results-overview { gap: 26px; }
  .score-ring { width: 150px; height: 150px; padding: 10px; }
  .score-ring strong { font-size: 35px; }
  .results-copy h1 { font-size: 28px; }
  .results-breakdown { grid-template-columns: 1fr; gap: 10px; }
  .breakdown-card { padding: 16px 20px; }
  .review-section .section-heading { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .site-shell { padding: 0 20px; }
  .site-header { padding: 20px 0; gap: 12px; }
  .brand { gap: 7px; font-size: 16px; }
  .brand-icon { width: 34px; height: 34px; }
  .brand-subtitle { font-size: 9px; }
  .class-tag { display: none; }
  .header-actions .text-button { font-size: 11px; gap: 5px; }
  .header-actions svg { width: 17px; height: 17px; }
  .hero { grid-template-columns: 1fr; padding: 35px 0; gap: 35px; }
  .hero h1 { font-size: clamp(29px, 8.5vw, 42px); margin: 16px 0; }
  .hero-description { max-width: 370px; font-size: 15px; }
  .hero-actions { gap: 23px; }
  .hero-actions .button { padding: 13px 17px; }
  .hero-actions .text-link { font-size: 13px; }
  .quiet-note { font-size: 11px; }
  .grammar-illustration { max-width: 340px; width: 100%; justify-self: center; padding: 12px 35px 25px; }
  .example-sheet { width: 252px; padding: 15px 23px 19px; }
  .example-line p { font-size: 21px; }
  .sheet-top { margin-bottom: 13px; padding-bottom: 9px; }
  .example-connector { height: 38px; }
  .encouragement { right: -1px; top: 0; font-size: 12px; }
  .section-heading h2 { font-size: 22px; }
  .section-heading p { font-size: 12px; }
  .topic-card { display: flex; padding: 22px 23px 0; }
  .topic-card h3 { font-size: 21px; }
  .topic-card > p { font-size: 13px; margin-bottom: 0; }
  .topic-card-top { margin-bottom: 15px; }
  .topic-list { align-self: stretch; font-size: 13px; margin: 16px 0 20px; padding: 0; }
  .unit-start { margin-top: auto; padding: 15px 23px; font-size: 13px; }
  .exam-banner { margin-top: 23px; padding: 23px; }
  .exam-banner h2 { font-size: 22px; line-height: 1.3; }
  .exam-banner p { font-size: 12px; }
  .resume-banner { padding: 16px; flex-wrap: wrap; gap: 10px; margin-top: 0; }
  .resume-symbol { display: none; }
  .resume-banner h2 { font-size: 14px; }
  .resume-banner .button { margin-left: 0; width: 100%; margin-top: 4px; }
  .site-footer { align-items: start; flex-direction: column; gap: 3px; font-size: 10px; margin-top: 30px; }
  .home-footnote { font-size: 10px; }
  .quiz-topline { gap: 12px; margin: 20px 0; }
  .quiz-topline .text-button { font-size: 12px; }
  .mode-badge { font-size: 10px; padding: 3px 7px; }
  .quiz-timer { font-size: 13px; padding: 4px 8px; }
  .quiz-heading { display: block; margin: 20px 0; }
  .quiz-heading h1 { font-size: 27px; }
  .quiz-heading > p { max-width: none; margin-top: 9px; font-size: 12px; }
  .question-card { padding: 20px 17px; border-radius: 10px; }
  .question-meta { margin-bottom: 19px; padding-bottom: 13px; }
  .question-meta > span { font-size: 11px; }
  .flag-button { font-size: 11px; gap: 4px; }
  .question-prompt { font-size: 20px; margin-bottom: 20px; }
  .answer-option { font-size: 14px; padding: 13px 12px; gap: 10px; }
  .question-actions { gap: 9px; }
  .question-actions .button { padding: 11px 13px; font-size: 12px; }
  .question-actions .text-button { width: 100%; margin-top: 2px; }
  .question-navigator { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav-question { min-height: 40px; }
  .question-sidebar .finish-button { width: 100%; }
  .question-sidebar .save-note { display: block; margin-left: 0; margin-top: 12px; text-align: center; }
  .practice-hint { font-size: 11px; }
  .results-overview { flex-direction: column; text-align: center; gap: 22px; padding: 28px 0; }
  .results-copy .scope-label { justify-content: center; }
  .results-copy h1 { font-size: 29px; }
  .result-actions { justify-content: center; }
  .result-actions .button { width: 100%; }
  .review-card { padding: 17px; }
  .review-card h3 { font-size: 16px; }
  dialog { padding: 22px 18px; border-radius: 12px; }
  .dialog-header h2 { font-size: 23px; }
  .notes-unit { padding: 0 15px; }
  .notes-unit > summary { font-size: 15px; }
  .notes-unit > summary span { margin-right: 5px; }
  .dialog-actions .button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .text-button, .result-actions, .review-filter, dialog, #home-view, #quiz-view { display: none !important; }
  body, .review-card, .score-ring > div { background: white; }
  .site-shell { padding: 0; }
  .review-card { break-inside: avoid; }
  .results-overview { padding-top: 0; }
}
