:root {
  color-scheme: light;
  --ink: #142449;
  --muted: #52627c;
  --line: #dce4f0;
  --paper: #fff;
  --surface: #f2f6fb;
  --blue: #2555b9;
  --blue-deep: #163f96;
  --navy: #172a59;
  --teal: #036c59;
  --mint: #dcf5e9;
  --amber: #792f00;
  --warm: #fff4df;
  --danger: #9b2531;
  --shadow: 0 12px 32px #15294d0d;
  --round: 19px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); line-height: 1.65; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, summary { touch-action: manipulation; }
a { color: var(--blue-deep); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid #7464d9; outline-offset: 4px; }
main:focus:not(:focus-visible) { outline: none; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
strong { font-weight: 730; }
p, ul, ol { margin-block: 0 .85rem; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.025em; }
h1 { font-size: clamp(1.85rem, 4.3vw, 3.35rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.65rem); }
h3 { font-size: 1.1rem; }
ul, ol { padding-inline-start: 1.4rem; }
li + li { margin-block-start: .38rem; }
progress { width: 100%; height: .55rem; display: block; accent-color: var(--blue); border: 0; background: #e5edf7; border-radius: 100vmax; overflow: hidden; }
progress::-webkit-progress-bar { background: #e5edf7; border-radius: 100vmax; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 100vmax; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 100vmax; }
.shell { width: min(1120px, calc(100% - 44px)); margin-inline: auto; }
.skip { position: absolute; inset: .5rem auto auto .5rem; z-index: 10; background: #fff; padding: .7rem; transform: translateY(-160%); }
.skip:focus { transform: none; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 76px; display: flex; gap: 1.35rem; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .76rem; text-decoration: none; color: var(--ink); font-weight: 760; line-height: 1.26; white-space: nowrap; }
.brand small { display: block; font-size: .83rem; color: var(--muted); margin-top: .17rem; font-weight: 500; }
.brand-icon { display: grid; place-items: center; inline-size: 2.65rem; block-size: 2.65rem; flex-shrink: 0; color: #fff; background: var(--navy); border-radius: 13px; font-size: 1.35rem; font-weight: 820; border-bottom: 4px solid #62dabd; }
.navigation { display: flex; align-items: center; gap: .25rem; }
.navigation a { display: block; padding: .52rem .82rem; text-decoration: none; color: var(--muted); border-radius: 10px; font-size: .93rem; white-space: nowrap; }
.navigation a[aria-current="page"] { color: #0d3d99; background: #eaf1ff; font-weight: 730; }
main { min-height: 59vh; padding-block: 2.2rem 3rem; }
.footer { display: flex; justify-content: space-between; gap: 1rem; padding-block: .8rem 1.8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.hero { position: relative; isolation: isolate; color: #fff; background: linear-gradient(115deg,#182a59 10%,#1a3673 66%,#244e8e); padding: clamp(1.25rem, 4.2vw, 3rem); border-radius: 26px; display: grid; grid-template-columns: 1fr minmax(180px, 240px); align-items: center; gap: 1.8rem; overflow: hidden; box-shadow: var(--shadow); }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; border: 1px solid #b4d8ff44; border-radius: 36px; transform: rotate(28deg); right: -105px; top: -122px; pointer-events: none; }
.hero::after { transform: rotate(28deg) translate(-28px, 36px); width: 290px; height: 290px; border-color: #91e7d744; }
.hero p { max-width: 44rem; color: #e0ebff; margin-block: .56rem 1.18rem; }
.hero .eyebrow { color: #a9f0dd; }
.hero .actions { margin-bottom: .1rem; }
.hero-stat { align-self: center; padding: 1.1rem 1.15rem; background: #ffffff12; border: 1px solid #ffffff49; border-radius: 16px; }
.hero-stat .big { display: inline-block; font-size: 2rem; font-weight: 780; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero-stat small { display: block; color: #dfeaff; font-size: .88rem; margin-bottom: .65rem; }
.hero-stat progress { background: #203d74; }
.hero-stat progress::-webkit-progress-bar { background: #203d74; }
.hero-stat progress::-webkit-progress-value { background: #78edc8; }
.hero-stat progress::-moz-progress-bar { background: #78edc8; }
.eyebrow { font-size: .86rem; font-weight: 750; color: var(--blue-deep); margin-bottom: .55rem; }
.page-head { margin-bottom: 1.35rem; }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.65rem); }
.page-head p:last-child, .card p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .89rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .62rem; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .55rem .94rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--blue-deep); text-decoration: none; font-weight: 720; text-align: center; line-height: 1.35; }
.button:hover { border-color: #a9bfee; background: #f0f5ff; color: var(--blue-deep); }
.button.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.button.primary:hover { background: var(--blue-deep); color: white; }
.button.mint { background: #86efc9; border-color: #86efc9; color: #112c35; }
.button.mint:hover { background: #b1ffe0; }
.button.ghost { background: #ffffff15; border-color: #ffffff81; color: #fff; }
.button.ghost:hover { background: #ffffff2d; }
.section { margin-top: 1.6rem; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; column-gap: 1.2rem; margin-bottom: .66rem; }
.section-title h2 { margin-bottom: 0; }
.grid { display: grid; gap: .9rem; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.card { background: var(--paper); border: 1px solid var(--line); padding: 1.15rem; border-radius: var(--round); box-shadow: var(--shadow); min-width: 0; overflow-wrap: anywhere; }
.card.highlight { background: #f0f9f6; border-color: #cce9df; }
.card .actions { margin-top: .85rem; }
.task-card { display: flex; flex-direction: column; align-items: flex-start; }
.task-card .actions { margin-top: auto; padding-top: .54rem; }
.task-card h3 { margin-top: .52rem; }
.task-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .18rem; }
.chip { border-radius: 100vmax; padding: .11rem .55rem; display: inline-block; color: #234c91; background: #eef4ff; font-size: .84rem; font-weight: 670; white-space: nowrap; }
.chip.math { background: #e5f5ff; color: #145984; }
.chip.english { background: #ecebff; color: #4d3496; }
.chip.science { background: #ddf6ed; color: #08624e; }
.chip.chinese { background: #fff0df; color: #823b0b; }
.chip.humanities { background: #fbeaf5; color: #77285e; }
.chip.ok { background: var(--mint); color: var(--teal); }
.chip.wait { background: var(--warm); color: var(--amber); }
.outline-title { margin-top: .15rem; }
.week-box { margin-bottom: .86rem; }
.week-box summary { cursor: pointer; padding: .1rem; font-weight: 750; }
.week-box summary .muted { font-weight: 520; margin-inline-start: .55rem; }
.days { list-style: none; padding: 0; margin: .73rem 0 .05rem; }
.days li { margin: 0; }
.day-row { display: grid; gap: .75rem; grid-template-columns: 4.25rem 1fr auto; width: 100%; align-items: center; min-height: 49px; border-top: 1px solid var(--line); padding: .5rem .2rem; text-decoration: none; color: var(--ink); }
.day-row:hover { background: #f6f9ff; }
.day-row.current { color: #173e85; font-weight: 720; }
.day-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.day-notes { color: var(--muted); font-weight: 500; font-size: .86rem; margin-top: .12rem; }
.reading { max-width: 812px; margin-inline: auto; }
.reading > .card, .reading > form, .reading > .notice { margin-bottom: 1rem; }
.reading .page-head { display: block; }
.back { display: inline-block; margin-bottom: .95rem; }
.notice { padding: .82rem 1rem; border: 1px solid #cadcf8; background: #eef5ff; border-radius: 12px; color: #214579; margin-bottom: 1rem; }
.notice.attention { background: var(--warm); border-color: #f2d59f; color: var(--amber); }
.notice.ok { background: var(--mint); border-color: #c3e9d9; color: var(--teal); }
.worked { border-inline-start: 4px solid #75d1b7; padding-inline-start: 1rem; margin-block: .8rem .42rem; }
.worked p { margin-bottom: .38rem; }
.paper-text, .passage { white-space: pre-wrap; overflow-wrap: anywhere; }
.passage { background: #f0f5fc; border: 1px solid #d6e4f6; padding: .8rem 1rem; border-radius: 11px; margin: .65rem 0; color: #1a3059; }
.question h3 { margin-bottom: .7rem; }
.question-grid { display: grid; gap: .8rem; margin-top: 1rem; }
.question-no { color: var(--muted); font-size: .84rem; font-weight: 740; margin-bottom: .27rem; }
fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
.options { display: grid; gap: .46rem; margin: .68rem 0; }
.option { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; padding: .55rem .75rem; border: 1px solid var(--line); background: #fff; border-radius: 10px; min-height: 43px; cursor: pointer; }
.option:hover { border-color: #92ace6; background: #f8faff; }
.option:has(input:checked) { border-color: #5784de; background: #edf3ff; }
.option.key { border-color: #79cbb1; background: #f1fcf7; }
.option.miss { border-color: #e3a5aa; background: #fff6f7; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--blue); inline-size: 1.09rem; block-size: 1.09rem; margin: .25rem 0 0; }
input[type="text"], input[type="number"], textarea { border: 1px solid #a9bbd5; padding: .58rem .72rem; border-radius: 9px; color: var(--ink); background: white; }
input[type="text"] { width: min(100%, 240px); display: block; margin-block: .45rem .75rem; }
textarea { width: 100%; min-height: 130px; resize: vertical; }
details.hint { margin-top: .55rem; }
details.hint summary { cursor: pointer; color: var(--blue-deep); }
details.hint[open] summary { margin-bottom: .38rem; }
.feedback { padding: .7rem .8rem; margin: .72rem 0 .2rem; border-radius: 11px; background: var(--warm); color: var(--amber); overflow-wrap: anywhere; }
.feedback.ok { background: var(--mint); color: var(--teal); }
.feedback p { margin-bottom: .32rem; }
.metric { font-size: 1.48rem; font-weight: 780; font-variant-numeric: tabular-nums; }
.rubric { margin-block: .7rem; }
.rubric label { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .59rem; padding-block: .25rem; }
.test-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .95rem; align-items: center; }
.speaker { margin: .45rem 0; }
.speaker p { margin-top: .42rem; }
.tabline { display: flex; flex-wrap: wrap; gap: .48rem; margin-block: .65rem 1rem; }
.tabline .button[aria-current="true"] { color: #fff; background: var(--blue); border-color: var(--blue); }
.stack { display: grid; gap: .8rem; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: start; padding: .59rem .64rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .88rem; }
tr:last-child td { border-bottom: 0; }
.status-toast { position: fixed; inset: auto 1rem 1rem auto; z-index: 9; max-width: min(32rem,calc(100% - 2rem)); }
.status-toast:not(:empty) { padding: .65rem 1rem; color: #fff; background: var(--navy); border-radius: 11px; box-shadow: var(--shadow); }
.sources li { margin-bottom: .45rem; }
.summary-line { margin-bottom: .65rem; }
.chart { display: block; width: 100%; max-width: 600px; height: 260px; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 850px) {
  .span-4 { grid-column: span 6; }
  .span-5, .span-7, .span-8 { grid-column: span 12; }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  .topbar-inner { flex-wrap: wrap; padding-block: .7rem .4rem; gap: .56rem; }
  .navigation { justify-content: space-between; width: 100%; }
  .navigation a { flex: 1; text-align: center; padding: .49rem .36rem; }
  main { padding-top: 1.2rem; }
  .hero { grid-template-columns: 1fr; gap: .95rem; border-radius: 19px; }
  .hero-stat { width: 100%; }
  .span-4, .span-6 { grid-column: span 12; }
  .card { padding: .98rem; }
  .section-title { align-items: flex-start; }
  .day-row { grid-template-columns: 3.3rem 1fr auto; font-size: .92rem; gap: .34rem; }
  .day-notes { display: none; }
  .footer { flex-direction: column; gap: .28rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  .topbar, .footer, .actions, .button, .status-toast { display: none !important; }
  body { background: white; }
  .shell { width: 100%; }
  .card { box-shadow: none; break-inside: avoid; }
}
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
audio { display: block; width: min(100%, 27rem); margin-block: .25rem .55rem; }
/* V2: avoid header overflow with six navigation destinations. */
@media (max-width: 760px) {
  .navigation { flex-wrap: wrap; justify-content: flex-start; gap: .15rem; }
  .navigation a { flex: 1 0 27%; }
}
