:root {
  color-scheme: light;
  --rail: #15162c;
  --page: #f5f5fa;
  --white: #fff;
  --ink: #1c1c34;
  --muted: #5c5e75;
  --line: #e4e4ef;
  --purple: #5338d4;
  --dark-purple: #3e29a9;
  --lavender: #eeebff;
  --mint: #17715c;
  --red: #a92d4c;
  --radius: 18px;
  font: 16px/1.5 "Inter", "Segoe UI", Arial, sans-serif;
}
*,*::before,*::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--purple); }
:focus-visible { outline: 3px solid #967eff; outline-offset: 4px; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { line-height: 1.17; letter-spacing: -.035em; }
h2 { font-size: 1.56rem; }
h3 { font-size: 1.17rem; }
svg.icon { width: 20px; height: 20px; display: inline-block; flex: 0 0 auto; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 100; background:white; padding: 12px; }
.skip:focus { top: 12px; }
.layout { display: grid; grid-template-columns: 248px minmax(0,1fr); min-height:100vh; }
.sidebar { background: var(--rail); color: white; padding: 30px 19px 23px; position: sticky; top: 0; align-self:start; height:100vh; height:100dvh; display:flex; flex-direction:column; overflow-y:auto; }
.brand { display:flex; align-items:center; gap: 11px; padding: 1px 6px 25px; }
.brand img { width: 39px; height: 39px; }
.brand strong { font-size: 1.02rem; line-height:1.2; display:block; letter-spacing:-.02em; }
.brand span { display:block; font-size:.79rem; color:#bdbed2; margin-top:3px; }
.side-label { text-transform: uppercase; letter-spacing: .09em; color: #b1b3cb; font-weight: 700; font-size:.72rem; padding: 25px 10px 8px; }
.nav-row { border: 0; color:#e1e1ee; background:transparent; text-align:left; width:100%; padding:11px 10px; border-radius:10px; display:flex; align-items:center; gap:11px; font-weight: 560; font-size:.91rem; margin: 2px 0; }
.nav-row:disabled { opacity: 1; color:#c2c3d6; }
.nav-row:disabled .nav-end { color:#9ea0bb; }
.nav-row:not(:disabled):hover { background:#252744; }
.nav-row.current { color:#fff; background:#353060; box-shadow:inset 3px 0 #a998ff; }
.nav-row .icon { width:18px; height:18px; }
.nav-end { margin-left:auto; font-size:.75rem; font-variant-numeric:tabular-nums; color:#d9d4f3; }
.sidebar-bottom { margin-top:auto; padding: 12px 8px 0; }
.sidebar-bottom p { color:#aeb0c9; font-size:.8rem; padding-top:14px; border-top:1px solid #393b53; display:flex; align-items:center; gap:8px; }
.sidebar-bottom .icon { width:15px; height:15px; }
.topbar { min-height:70px; border-bottom:1px solid var(--line); background:#fff; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px clamp(18px,4vw,58px); }
.crumb { display:flex; gap:9px; align-items:center; flex-wrap:wrap; font-size:.9rem; color: var(--muted); }
.crumb strong { color:var(--ink); }
.top-actions { display:flex; align-items:center; gap:11px; }
.top-actions .muted { font-size:.82rem; }
.site-main { width:min(100%,1260px); margin:auto; padding:33px clamp(18px,4vw,58px) 30px; }
.set-switch { display:flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:11px; background:#fff; width:fit-content; max-width:100%; margin-bottom:15px; }
.set-switch a { padding:7px 12px; border-radius:7px; text-decoration:none; font-size:.88rem; font-weight:700; color:var(--muted); }
.set-switch a[aria-current="page"], .set-switch a:hover { color:var(--dark-purple); background:var(--lavender); }
.hero { position:relative; overflow:hidden; min-height:285px; border-radius:24px; padding:36px 38px; background:linear-gradient(117deg,#24205b 0%,#312569 54%,#47318b 100%); color:#fff; display:flex; align-items:center; box-shadow: 0 12px 28px #2d20561a; isolation:isolate; }
.hero-copy { z-index:1; max-width:550px; }
.eyebrow { color:var(--purple); text-transform:uppercase; letter-spacing:.12em; font-size:.76rem; font-weight:750; margin-bottom:12px; }
.hero .eyebrow { color:#d1c6ff; }
.hero h1 { font-size:clamp(2.18rem,4vw,3.45rem); font-weight:750; line-height:1.04; letter-spacing:-.062em; }
.hero p:not(.eyebrow) { color:#e0daf3; margin:14px 0 23px; max-width:410px; }
.hero .button { background:#fff; color:#3a268c; border-color:#fff; }
.hero .button:hover { background:#eee8ff; }
.hero-art { position:absolute; inset:0 0 0 auto; width:44%; overflow:hidden; pointer-events:none; }
.orbit { position:absolute; width:350px; height:350px; border:1px solid #b8a5ff55; border-radius:50%; right:-23px; top:-32px; }
.orbit:nth-child(2) { transform:scale(.78); }
.orbit:nth-child(3) { transform:scale(.56); }
.orbit:nth-child(4) { transform:scale(1.23); }
.graphic { position:absolute; width:178px; height:178px; top:50%; right:66px; transform:translateY(-50%) rotate(-9deg); display:grid; grid-template-columns:repeat(2,1fr); gap:11px; }
.graphic span { display:grid; place-items:center; border:1px solid #d1c3ff70; border-radius:18px; background:#a28af43a; color:#fff; box-shadow:0 13px 25px #1f154855; }
.graphic span:nth-child(2) { background:#b4f0db; color:#234d58; border-color:#c9f8e7; transform:translateY(-6px); }
.graphic span:nth-child(3) { background:#d9cbff; color:#4b338c; border-color:#ecdfff; }
.graphic .icon { width:31px; height:31px; stroke-width:1.5; }
.section-head { display:flex; align-items:baseline; justify-content:space-between; gap:14px; margin:30px 0 14px; }
.section-head p { color:var(--muted); font-size:.88rem; }
.section-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }
.card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:22px; box-shadow:0 3px 6px #15162c05; min-width:0; }
.section-card { padding:17px 15px 15px; display:flex; flex-direction:column; gap:8px; }
.section-card p { font-size:.87rem; color:var(--muted); }
.section-card .card-meta { margin-top:auto; padding-top:6px; display:flex; gap:6px; align-items:center; flex-wrap:wrap; font-size:.79rem; font-weight:650; color:#45465e; }
.section-card .section-link { margin-top:5px; align-self:stretch; }
.card-meta .icon { width:14px; height:14px; }
.tile { height:38px; width:38px; display:grid; place-items:center; border-radius:11px; color:#5b3bd5; background:#eee9ff; }
.tile.listening { color:#17745e; background:#e0f5ed; }
.tile.writing { color:#9c4b28; background:#fff0e5; }
.tile.speaking { color:#3458ae; background:#e9eeff; }
.home-tools { display:grid; grid-template-columns:1.32fr 1fr; gap:13px; margin-top:16px; }
.home-tools .card { padding:18px; }
.home-tools p { font-size:.89rem; color:var(--muted); margin:7px 0 12px; }
.mode-options { display:flex; gap:7px; flex-wrap:wrap; }
.mode-options button { border-radius:8px; border:1px solid var(--line); color:var(--muted); background:white; padding:7px 11px; font-size:.88rem; font-weight:650; }
.mode-options button[aria-pressed="true"] { color:var(--dark-purple); border-color:#c8bdfe; background:var(--lavender); }
.footer { margin-top:20px; color:var(--muted); font-size:.79rem; display:flex; flex-wrap:wrap; gap:6px 12px; }
.button { background:var(--purple); color:#fff; border:1px solid var(--purple); padding:10px 16px; min-height:43px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; gap:8px; font-size:.9rem; line-height:1.25; font-weight:700; text-align:center; text-decoration:none; }
.button:hover { background:var(--dark-purple); border-color:var(--dark-purple); }
.button.secondary { color:var(--ink); background:#fff; border-color:#d9d9e9; }
.button.secondary:hover { background:#f4f1ff; border-color:#bab0ed; }
.button.quiet { padding:7px 11px; min-height:34px; color:var(--purple); background:transparent; border-color:transparent; }
.button.quiet:hover { background:var(--lavender); }
.button:disabled { opacity:.5; }
.button .icon { width:17px; height:17px; }
.muted, .small { color:var(--muted); }
.small { font-size:.87rem; }
.stack { display:grid; gap:15px; }
.flow > * + * { margin-top:12px; }
.actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.intro { max-width:760px; margin:42px auto; padding:32px; }
.intro h1, .result-head h1 { font-size:clamp(2rem,4vw,3.1rem); }
.intro ul { padding-left:21px; color:var(--muted); }
.intro li + li { margin-top:7px; }
.timer { border:1px solid #ded7ff; background:#f2efff; padding:7px 11px; border-radius:8px; display:flex; align-items:center; gap:7px; color:#3f2c9a; font-weight:750; font-variant-numeric:tabular-nums; white-space:nowrap; }
.timer .icon { width:16px; height:16px; }
.timer.urgent { color:#9e2042; border-color:#f3c0ce; background:#fff1f4; }
.test-heading { margin-bottom:14px; display:flex; justify-content:space-between; align-items:flex-end; gap:14px; }
.test-heading .eyebrow { margin-bottom:5px; }
.test-heading h1 { font-size:clamp(1.75rem,3.45vw,2.6rem); }
.progress { height:5px; border-radius:9px; width:100%; background:#e4e0f4; margin-bottom:17px; overflow:hidden; }
.progress span { display:block; height:100%; background:#7658e9; border-radius:9px; }
.work-area { display:grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); align-items:start; gap:15px; }
.work-area.single { grid-template-columns:minmax(0,1fr); max-width:810px; }
.work-area .card { padding:clamp(15px,2.3vw,26px); }
.passage { white-space:pre-line; font-size:1rem; line-height:1.69; color:#3e3e56; }
.blank { display:inline-block; width:calc(var(--letters)*.68em + 14px); min-width:2ch; max-width:100%; border:0; border-bottom:2px solid #a998f0; background:#f3efff; color:#3e2a9a; border-radius:4px 4px 0 0; padding:1px 3px; line-height:1.35; margin:0 1px; text-align:center; }
.blank:focus { outline-offset:1px; }
.blank-wrap { display:inline-block; white-space:nowrap; }
.choice-list { margin:15px 0 0; border:0; padding:0; display:grid; gap:8px; }
.choice { display:flex; align-items:flex-start; gap:10px; border:1px solid #dedeee; border-radius:10px; background:white; padding:11px; cursor:pointer; min-height:46px; }
.choice:hover { border-color:#a293e6; }
.choice:has(input:checked) { border-color:var(--purple); background:#f3efff; }
.choice input { margin:4px 1px 0 2px; accent-color:var(--purple); width:17px; height:17px; flex:0 0 auto; }
.choice span { color:#44348b; font-weight:700; }
.notice { border-radius:9px; background:#f0edff; color:#42308a; padding:10px 12px; font-size:.91rem; }
.notice:empty { display:none; }
.question-nav { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; }
.question-nav button { width:35px; height:34px; display:grid; place-items:center; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:white; font-size:.82rem; }
.question-nav button.done { background:#efedf8; border-color:#d6ccef; }
.question-nav button[aria-current="step"] { color:white; background:var(--purple); border-color:var(--purple); }
.question-nav button.flagged { box-shadow:inset 0 -3px #df973e; }
.question-nav button:disabled { opacity:.45; }
.item-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:15px; flex-wrap:wrap; }
.item-footer .actions { margin-left:auto; }
.flag-on { background:#ffeed8!important; }
.sound-panel { background:#f5f1ff; padding:17px; border:1px solid #e6defe; border-radius:13px; }
.scenario-figure { display:block; width:100%; max-width:560px; max-height:270px; object-fit:contain; object-position:left center; border-radius:11px; }
.sound-panel audio { display:block; width:100%; min-width:0; margin-top:11px; }
.sound-status { font-size:.85rem; color:#594642; }
.pills { display:flex; flex-wrap:wrap; gap:8px; }
.word-block { padding:7px 11px; border:1px solid #d9d2f4; border-radius:8px; background:#f3efff; color:#3f2e85; }
.word-block:hover { border-color:#7e66e8; }
.word-block:disabled { opacity:.55; }
.sentence-target { min-height:62px; border:1px dashed #bcb4d8; border-radius:10px; padding:10px; align-items:center; }
.slot { min-width:29px; height:24px; border-bottom:2px solid #c9c1df; }
textarea { width:100%; min-height:230px; resize:vertical; padding:12px; margin-top:6px; border:1px solid #c8c8dc; border-radius:10px; background:#fff; color:var(--ink); }
.study-post { padding:10px 13px; background:#f5f4f9; border-radius:8px; color:#45445b; }
.speak-time { font-size:2.3rem; font-weight:750; color:var(--purple); font-variant-numeric:tabular-nums; }
.result-head { display:flex; justify-content:space-between; align-items:flex-end; gap:15px; margin-bottom:20px; }
.result-head .muted { margin-top:8px; }
.score { font-size:1.95rem; font-weight:750; letter-spacing:-.04em; }
.score-cards .section-card { border-bottom:3px solid transparent; }
.score-cards .section-card[aria-current="true"] { border-color:#9f88f0; }
.score-cards.single-score { grid-template-columns:minmax(0,260px); }
.review { margin-top:17px; }
.review .notice { margin:0 0 9px; }
.review details { border-top:1px solid var(--line); padding:12px 0; }
.review summary { cursor:pointer; font-weight:650; }
.review details > div { margin:12px 0 3px 12px; display:grid; gap:7px; }
.review .passage { padding:9px 12px; background:#f7f6fb; border-radius:9px; }
.correct { color:var(--mint); }
.incorrect { color:var(--red); }
.review audio { width:min(100%,420px); }
dialog { width:min(92%,505px); border:1px solid var(--line); border-radius:16px; padding:24px; color:var(--ink); box-shadow:0 14px 50px #1615254d; }
dialog::backdrop { background:#12122586; }
dialog .actions { justify-content:flex-end; margin-top:20px; }
@media (max-width:1050px) {
  .layout { grid-template-columns:200px minmax(0,1fr); }
  .section-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sidebar { padding:22px 13px; }
}
@media (max-width:800px) {
  .layout { display:block; }
  .sidebar { height:auto; position:static; padding:10px 13px; overflow:visible; }
  .brand { padding:0 0 4px; }
  .brand img { width:31px; height:31px; }
  .brand span, .sidebar-bottom, .side-label, .nav-end, .crumb .mode { display:none; }
  .sidebar nav { display:flex; gap:4px; flex-wrap:wrap; }
  .nav-row { width:auto; padding:6px; font-size:.81rem; gap:4px; }
  .nav-row .icon { width:14px; height:14px; }
  .topbar { min-height:54px; }
  .site-main { padding-top:20px; }
  .hero { padding:24px; }
  .graphic { width:140px; height:140px; right:35px; }
  .orbit { right:-70px; }
}
@media (max-width:600px) {
  .work-area, .home-tools { grid-template-columns:1fr; }
  .test-heading, .result-head { align-items:flex-start; flex-direction:column; }
  .section-head { align-items:start; flex-direction:column; gap:4px; }
  .hero-art { opacity:.27; }
  .hero-copy { max-width:100%; }
  .intro { padding:19px; margin:10px auto; }
  .section-card { padding:12px; }
  .sidebar nav { gap:3px 6px; }
  .top-actions .saved { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto!important; }
}
