:root {
  --ink: #18242a;
  --muted: #687477;
  --paper: #f2eee4;
  --paper-light: #fffdf7;
  --night: #14232b;
  --night-soft: #1c323c;
  --line: rgba(24, 36, 42, 0.16);
  --light-line: rgba(255, 253, 247, 0.15);
  --red: #cf4d3c;
  --red-dark: #a8392d;
  --gold: #e7bb58;
  --green: #b8d5c0;
  --serif: "Iowan Old Style", "Baskerville", "Songti SC", STSong, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --wrap: min(1200px, calc(100% - 48px));
  --side: clamp(24px, 5vw, 76px);
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
::selection { color: var(--paper-light); background: var(--red); }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 10px 15px; color: white; background: var(--red); transform: translateY(-150%); transition: transform 180ms ease; }
.skip-link:focus { transform: translateY(0); }

.topbar { position: fixed; z-index: 100; top: 0; left: 0; display: flex; justify-content: space-between; align-items: center; width: 100%; height: 72px; padding: 0 clamp(20px, 4vw, 58px); color: var(--paper-light); border-bottom: 1px solid transparent; transition: color 220ms ease, background 220ms ease, border 220ms ease; }
.topbar.scrolled { color: var(--ink); background: rgba(242, 238, 228, 0.94); border-bottom-color: var(--line); backdrop-filter: blur(14px); }
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; }
.brand-mark { display: grid; width: 28px; height: 28px; place-items: center; color: var(--paper-light); background: var(--red); font-family: var(--serif); font-size: 17px; border-radius: 50%; }
.topnav { display: flex; gap: clamp(18px, 3vw, 40px); align-items: center; font-size: 12px; }
.topnav > a:not(.back-link) { padding: 7px 0; opacity: 0.76; border-bottom: 1px solid transparent; }
.topnav > a:not(.back-link):hover { opacity: 1; border-bottom-color: currentColor; }
.back-link { padding: 8px 12px; border: 1px solid rgba(255, 253, 247, 0.28); }
.topbar.scrolled .back-link { border-color: var(--line); }
.back-link:hover { color: var(--night); background: var(--gold); border-color: var(--gold); }
.menu-toggle { display: none; color: inherit; background: transparent; border: 0; cursor: pointer; }
.mobile-nav { position: fixed; z-index: 90; top: 72px; right: 0; left: 0; padding: 20px 24px 26px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 14px 30px rgba(20, 35, 43, 0.12); }
.mobile-nav a { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); }

.exam-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.65fr); gap: clamp(50px, 9vw, 150px); align-items: center; min-height: min(820px, 100svh); overflow: hidden; padding: 126px var(--side) 82px; color: var(--paper-light); background: var(--night); }
.exam-hero > * { min-width: 0; }
.hero-grid { position: absolute; inset: 0; opacity: 0.44; background-image: linear-gradient(var(--light-line) 1px, transparent 1px), linear-gradient(90deg, var(--light-line) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.76) 53%, transparent 100%); }
.hero-grid::after { position: absolute; right: -8vw; bottom: -25vw; width: 58vw; height: 58vw; content: ""; border: 1px solid rgba(231, 187, 88, 0.18); border-radius: 50%; box-shadow: inset 0 0 0 9vw rgba(184, 213, 192, 0.025), inset 0 0 0 18vw rgba(207, 77, 60, 0.025); animation: breathe 10s ease-in-out infinite; }
.hero-copy, .exam-sheet { position: relative; z-index: 1; }
.hero-copy { max-width: 760px; }
.eyebrow, .section-kicker { margin: 0; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.exam-hero h1 { margin: 24px 0 25px; font-family: var(--serif); font-size: clamp(62px, 9vw, 132px); font-weight: 400; letter-spacing: -0.06em; line-height: 0.92; }
.exam-hero h1 em { color: var(--gold); font-style: normal; }
.hero-intro { max-width: 570px; margin: 0; color: rgba(255, 253, 247, 0.7); font-size: 16px; }
.hero-actions { display: flex; gap: 23px; align-items: center; margin-top: 36px; color: rgba(255, 253, 247, 0.5); font-size: 11px; }
.primary-button { display: inline-flex; gap: 18px; align-items: center; padding: 13px 19px; color: var(--night); background: var(--gold); font-size: 13px; font-weight: 800; transition: gap 180ms ease, background 180ms ease; }
.primary-button:hover { gap: 27px; background: #f2cb72; }
.exam-sheet { justify-self: end; width: min(100%, 390px); min-height: 470px; padding: 29px 31px 31px; color: var(--ink); background: var(--paper-light); box-shadow: 16px 18px 0 var(--red); transform: rotate(1.8deg); transition: transform 300ms var(--ease); }
.exam-sheet:hover { transform: rotate(0deg) translateY(-5px); }
.sheet-head { display: flex; justify-content: space-between; align-items: start; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; }
.sheet-head strong { color: var(--red); font-family: var(--serif); font-size: 48px; font-weight: 400; line-height: 0.8; }
.sheet-label { margin: 52px 0 12px; font-family: var(--serif); font-size: 23px; }
.paper-switch { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); }
.paper-button { padding: 12px; background: transparent; border: 0; cursor: pointer; }
.paper-button + .paper-button { border-left: 1px solid var(--line); }
.paper-button[aria-pressed="true"] { color: white; background: var(--red); }
.sheet-rule { height: 1px; margin: 29px 0 22px; background: var(--line); }
.sheet-facts { margin: 0; }
.sheet-facts div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sheet-facts dt { color: var(--muted); font-size: 11px; }
.sheet-facts dd { margin: 0; font-size: 12px; font-weight: 800; }
.sheet-note { max-width: 240px; margin: 23px 0 0; color: var(--muted); font-size: 11px; }
.score-stamp { position: absolute; right: 27px; bottom: 29px; display: grid; width: 70px; height: 70px; place-items: center; color: var(--red); border: 2px solid var(--red); border-radius: 50%; font-size: 10px; font-weight: 900; letter-spacing: 0.1em; line-height: 1.1; text-align: center; transform: rotate(-12deg); opacity: 0.82; }
.reveal { animation: rise 700ms var(--ease) both; }
.reveal:nth-child(2) { animation-delay: 70ms; }
.reveal:nth-child(3) { animation-delay: 140ms; }
.reveal:nth-child(4) { animation-delay: 210ms; }

.section-wrap { width: var(--wrap); margin: 0 auto; }
.exam-map, .plan-section { padding-top: clamp(85px, 10vw, 145px); padding-bottom: clamp(90px, 11vw, 150px); }
.section-heading { display: flex; justify-content: space-between; gap: 50px; align-items: end; margin-bottom: 55px; }
.section-heading h2 { max-width: 720px; margin: 16px 0 0; font-family: var(--serif); font-size: clamp(42px, 5.8vw, 76px); font-weight: 400; letter-spacing: -0.05em; line-height: 1; }
.section-heading > p { max-width: 300px; margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.score-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr); gap: clamp(45px, 8vw, 110px); align-items: start; }
.score-map { border-top: 2px solid var(--ink); }
.score-row { display: grid; grid-template-columns: minmax(120px, 0.8fr) 2fr 58px; gap: 24px; align-items: center; padding: 21px 0; border-bottom: 1px solid var(--line); }
.score-name span { display: block; color: var(--muted); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.score-name strong { font-family: var(--serif); font-size: 23px; font-weight: 400; }
.score-bar { height: 8px; overflow: hidden; background: rgba(24,36,42,.08); }
.score-bar i { display: block; width: var(--score-width); height: 100%; background: var(--red); animation: grow 700ms var(--ease) both; transform-origin: left; }
.score-value { color: var(--red-dark); font-family: var(--serif); font-size: 31px; text-align: right; }
.strategy-note { padding: 28px 0 0; border-top: 2px solid var(--red); }
.strategy-note > span { color: var(--red-dark); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.strategy-note ol { padding: 0; margin: 22px 0 0; list-style: none; }
.strategy-note li { display: grid; grid-template-columns: 35px 1fr; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.strategy-note li strong { color: var(--red); font-size: 10px; }

.training-section { padding: clamp(85px, 10vw, 140px) 0; color: var(--paper-light); background: var(--night); }
.light-heading .section-kicker { color: var(--gold); }
.light-heading > p { color: rgba(255,253,247,.58); }
.module-nav { display: flex; overflow-x: auto; border-top: 1px solid var(--light-line); border-bottom: 1px solid var(--light-line); scrollbar-width: none; }
.module-nav::-webkit-scrollbar { display: none; }
.module-button { min-width: max-content; padding: 16px 21px; color: rgba(255,253,247,.56); background: transparent; border: 0; border-right: 1px solid var(--light-line); cursor: pointer; }
.module-button:hover { color: white; }
.module-button[aria-selected="true"] { color: var(--night); background: var(--gold); }
.module-button.is-done::after { margin-left: 8px; color: var(--green); content: "✓"; }
.module-button[aria-selected="true"].is-done::after { color: var(--red-dark); }
.training-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(245px, 0.55fr); gap: clamp(38px, 7vw, 95px); align-items: start; padding-top: 46px; }
.workspace-main { min-width: 0; padding: clamp(25px, 4vw, 49px); color: var(--ink); background: var(--paper-light); border-top: 4px solid var(--red); }
.workspace-kicker { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 26px; color: var(--red-dark); font-size: 10px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.workspace-main h3 { margin: 0 0 13px; font-family: var(--serif); font-size: clamp(34px, 4.5vw, 58px); font-weight: 400; letter-spacing: -0.04em; line-height: 1; }
.workspace-deck { max-width: 680px; margin: 0 0 31px; color: var(--muted); font-size: 13px; }
.question-text { margin: 25px 0 18px; font-family: var(--serif); font-size: clamp(21px, 2.5vw, 29px); line-height: 1.35; }
.context-passage, .reading-passage, .sentence-paper { padding: 24px 26px; background: var(--paper); border-left: 3px solid var(--gold); font-family: Georgia, "Times New Roman", serif; font-size: 17px; line-height: 1.78; }
.context-passage mark { padding: 0 3px; color: inherit; background: rgba(231,187,88,.48); }
.choice-list { display: grid; gap: 9px; margin-top: 20px; }
.choice-button { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; padding: 12px 14px; text-align: left; background: transparent; border: 1px solid var(--line); cursor: pointer; transition: transform 160ms ease, border 160ms ease, background 160ms ease; }
.choice-button:hover { border-color: var(--red); transform: translateX(4px); }
.choice-button:disabled { cursor: default; transform: none; }
.choice-button.is-correct { background: #e0eee3; border-color: #80a98b; }
.choice-button.is-wrong { background: #f5dfd9; border-color: var(--red); }
.choice-letter { display: grid; width: 25px; height: 25px; place-items: center; color: var(--red-dark); border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 800; }
.feedback { min-height: 48px; margin-top: 15px; color: var(--muted); font-size: 13px; }
.feedback strong { display: block; margin-bottom: 3px; color: var(--ink); }
.workspace-action, .reveal-button { display: inline-flex; gap: 14px; align-items: center; padding: 11px 15px; color: white; background: var(--red); border: 1px solid var(--red); cursor: pointer; }
.workspace-action:hover, .reveal-button:hover { background: var(--red-dark); }
.workspace-action[hidden] { display: none; }
.sentence-paper { position: relative; }
.sentence-paper .sentence-index { display: block; margin-bottom: 12px; color: var(--red-dark); font-family: var(--sans); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.sentence-chunks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.chunk-button { padding: 7px 9px; background: transparent; border: 1px solid var(--line); cursor: pointer; }
.chunk-button:hover, .chunk-button[aria-pressed="true"] { color: white; background: var(--red); border-color: var(--red); }
.analysis-panel { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.analysis-panel[hidden] { display: none; }
.analysis-panel dl { margin: 0; }
.analysis-panel div { display: grid; grid-template-columns: 90px 1fr; gap: 17px; padding: 8px 0; }
.analysis-panel dt { color: var(--red-dark); font-size: 11px; font-weight: 800; }
.analysis-panel dd { margin: 0; font-size: 13px; }
.reading-passage { max-height: 380px; overflow-y: auto; }
.reading-passage p { margin: 0 0 1em; }
.reading-passage p:last-child { margin-bottom: 0; }
.question-meta { margin-top: 24px; color: var(--red-dark); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.order-pool, .order-answer { display: flex; flex-wrap: wrap; gap: 9px; min-height: 54px; padding: 12px; border: 1px dashed var(--line); }
.order-answer { margin-top: 13px; border-style: solid; }
.order-button { padding: 8px 12px; background: var(--paper); border: 1px solid var(--line); cursor: pointer; }
.order-button:hover { border-color: var(--red); }
.order-answer .order-button { color: white; background: var(--red); }
.order-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.secondary-button { padding: 10px 13px; background: transparent; border: 1px solid var(--line); cursor: pointer; }
.secondary-button:hover { border-color: var(--red); }
.writing-area { width: 100%; min-height: 180px; padding: 17px; resize: vertical; color: var(--ink); background: var(--paper); border: 1px solid var(--line); line-height: 1.7; }
.writing-tools { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 11px; color: var(--muted); font-size: 11px; }
.reference-answer { margin-top: 20px; padding: 21px; background: var(--paper); border-left: 3px solid var(--red); }
.reference-answer[hidden] { display: none; }
.reference-answer h4 { margin: 0 0 9px; color: var(--red-dark); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.reference-answer p { margin: 0; font-size: 13px; }
.workspace-aside { position: sticky; top: 98px; }
.today-progress { padding-bottom: 28px; border-bottom: 1px solid var(--light-line); }
.today-progress span, .method-note > span { display: block; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.today-progress strong { display: block; margin: 9px 0 13px; font-family: var(--serif); font-size: 43px; font-weight: 400; }
.progress-track { height: 6px; overflow: hidden; background: rgba(255,255,255,.1); }
.progress-track i { display: block; width: 0; height: 100%; background: var(--red); transition: width 300ms var(--ease); }
.method-note { padding: 27px 0; border-bottom: 1px solid var(--light-line); }
.method-note h4 { margin: 12px 0 8px; font-family: var(--serif); font-size: 25px; font-weight: 400; }
.method-note p { margin: 0; color: rgba(255,253,247,.58); font-size: 12px; }
.reset-button { margin-top: 24px; padding: 9px 0; color: rgba(255,253,247,.5); background: transparent; border: 0; border-bottom: 1px solid currentColor; cursor: pointer; }
.reset-button:hover { color: var(--paper-light); }

.plan-line { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.plan-line article { min-width: 0; padding: 28px 25px 30px 0; border-bottom: 1px solid var(--line); }
.plan-line article + article { padding-left: 25px; border-left: 1px solid var(--line); }
.plan-line span { color: var(--red-dark); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.plan-line h3 { margin: 35px 0 11px; font-family: var(--serif); font-size: 32px; font-weight: 400; }
.plan-line p { min-height: 70px; margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.plan-line strong { font-size: 11px; }
.final-section { padding: 75px 0; color: var(--paper-light); background: var(--red); }
.final-inner { display: flex; justify-content: space-between; gap: 40px; align-items: end; }
.final-inner span { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.final-inner h2 { margin: 12px 0 0; font-family: var(--serif); font-size: clamp(41px, 6vw, 78px); font-weight: 400; letter-spacing: -.05em; line-height: 1; }
.final-inner a { display: inline-flex; gap: 30px; align-items: center; padding: 13px 0; border-bottom: 1px solid currentColor; font-size: 13px; }
footer { display: flex; justify-content: space-between; gap: 30px; padding: 28px var(--side); color: rgba(255,253,247,.55); background: var(--night); font-size: 11px; }
footer a:hover { color: white; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 50% { transform: scale(1.04); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 980px) {
  .topnav { display: none; }
  .menu-toggle { display: block; }
  .exam-hero { grid-template-columns: minmax(0, 1fr) minmax(300px, .62fr); gap: 45px; }
  .exam-hero h1 { font-size: clamp(58px, 9vw, 92px); }
  .score-layout, .training-workspace { grid-template-columns: 1fr; }
  .workspace-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 35px; }
  .reset-button { grid-column: 1 / -1; justify-self: start; }
  .plan-line { grid-template-columns: repeat(2, 1fr); }
  .plan-line article:nth-child(3) { border-left: 0; }
}

@media (max-width: 720px) {
  :root { --wrap: min(100% - 32px, 1200px); }
  .exam-hero { display: block; min-height: auto; padding: 120px 24px 80px; }
  .hero-grid { mask-image: linear-gradient(#000, rgba(0,0,0,.7) 60%, transparent); }
  .exam-hero h1 { white-space: normal; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .exam-sheet { justify-self: auto; width: 100%; max-width: 420px; min-height: 445px; margin: 68px auto 0; transform: rotate(1deg); }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .section-heading > p { max-width: 100%; }
  .score-row { grid-template-columns: minmax(105px, .9fr) 1.5fr 44px; gap: 12px; }
  .score-name strong { font-size: 19px; }
  .workspace-main { padding: 25px 19px 30px; }
  .context-passage, .reading-passage, .sentence-paper { padding: 20px 17px; font-size: 16px; }
  .workspace-aside { display: block; }
  .method-note { margin-bottom: 0; }
  .plan-line { grid-template-columns: 1fr; }
  .plan-line article, .plan-line article + article { padding: 24px 0; border-left: 0; }
  .plan-line p { min-height: auto; }
  .final-inner { align-items: flex-start; flex-direction: column; }
  footer { flex-direction: column; }
}

@media (max-width: 390px) {
  .exam-hero { padding-right: 18px; padding-left: 18px; }
  .exam-hero h1 { font-size: 55px; }
  .exam-sheet { padding-right: 21px; padding-left: 21px; }
  .score-row { grid-template-columns: 1fr 42px; }
  .score-bar { grid-column: 1 / -1; grid-row: 2; }
  .score-value { grid-column: 2; grid-row: 1; }
  .writing-tools { align-items: flex-start; flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
