/* Examdata Web — editorial instrument theme */
:root {
  --bg: #fbfbfa;
  --bg-raise: #ffffff;
  --bg-side: #f5f5f3;
  --bg-hover: rgba(11, 11, 12, .045);
  --bg-active: rgba(11, 11, 12, .075);
  --ink: #0b0b0c;
  --text: #2b2b2e;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --line: rgba(11, 11, 12, .08);
  --line-strong: rgba(11, 11, 12, .15);
  --signal: #ff4d00;
  --signal-soft: rgba(255, 77, 0, .1);
  --dot: rgba(11, 11, 12, .22);
  --console-bg: #0d0d0f;
  --console-text: #d8d8dc;
  --qp: #3e63dd; --ms: #30a46c; --er: #8e4ec6; --gt: #f76b15;
  --tag-bg: rgba(11, 11, 12, .055);
  --blue: #2f55d4; --blue-bg: rgba(62, 99, 221, .09);
  --green: #218358; --green-bg: rgba(48, 164, 108, .1);
  --orange: #cc4e00; --orange-bg: rgba(247, 107, 21, .1);
  --purple: #7a3fb4; --purple-bg: rgba(142, 78, 198, .1);
  --shadow: 0 0 0 1px rgba(11, 11, 12, .06), 0 8px 24px -6px rgba(11, 11, 12, .12), 0 24px 64px -16px rgba(11, 11, 12, .14);
  --radius: 6px;
  --side-w: 244px;
  --serif: "Instrument Serif", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --sans: "Inter", ui-sans-serif, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(.2, .75, .15, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0d; --bg-raise: #131315; --bg-side: #101011; --bg-hover: rgba(255,255,255,.05); --bg-active: rgba(255,255,255,.085);
    --ink: #f4f4f5; --text: #d4d4d8; --muted: #8b8b92; --faint: #5c5c63;
    --line: rgba(255,255,255,.075); --line-strong: rgba(255,255,255,.14);
    --signal: #ff6a2b; --signal-soft: rgba(255,106,43,.14); --dot: rgba(255,255,255,.2);
    --console-bg: #050506; --tag-bg: rgba(255,255,255,.07);
    --blue: #8da4f5; --blue-bg: rgba(110,140,245,.14); --green: #5fd09a; --green-bg: rgba(60,180,120,.14);
    --orange: #ff9a5c; --orange-bg: rgba(255,130,60,.13); --purple: #c49af0; --purple-bg: rgba(170,120,230,.15);
    --shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px -6px rgba(0,0,0,.5), 0 24px 64px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c0d; --bg-raise: #131315; --bg-side: #101011; --bg-hover: rgba(255,255,255,.05); --bg-active: rgba(255,255,255,.085);
  --ink: #f4f4f5; --text: #d4d4d8; --muted: #8b8b92; --faint: #5c5c63;
  --line: rgba(255,255,255,.075); --line-strong: rgba(255,255,255,.14);
  --signal: #ff6a2b; --signal-soft: rgba(255,106,43,.14); --dot: rgba(255,255,255,.2);
  --console-bg: #050506; --tag-bg: rgba(255,255,255,.07);
  --blue: #8da4f5; --blue-bg: rgba(110,140,245,.14); --green: #5fd09a; --green-bg: rgba(60,180,120,.14);
  --orange: #ff9a5c; --orange-bg: rgba(255,130,60,.13); --purple: #c49af0; --purple-bg: rgba(170,120,230,.15);
  --shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px -6px rgba(0,0,0,.5), 0 24px 64px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
kbd { font: 10.5px/1 var(--mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--faint); background: var(--bg-raise); }
::selection { background: var(--signal); color: #fff; }
:focus-visible { outline: 1.5px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--mono); }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: calc(100vh / var(--zoom, 1)); }
.sidebar { position: sticky; top: 0; width: var(--side-w); height: calc(100vh / var(--zoom, 1)); flex: none; background: var(--bg-side); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 12px 10px; z-index: 30; }
.workspace { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; color: var(--ink); }
.logo { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: var(--bg); display: grid; place-items: center; position: relative; }
.logo svg { width: 15px; height: 15px; stroke-width: 2.4; }
.logo::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); border: 2px solid var(--bg-side); }
.workspace-name { font-family: var(--serif); font-size: 21px; letter-spacing: -.01em; line-height: 1; }
.workspace-ver { margin-left: auto; font: 10px/1 var(--mono); color: var(--faint); letter-spacing: .08em; }
.side-search { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-raise); color: var(--faint); font-size: 13px; margin-bottom: 18px; transition: border-color .2s; }
.side-search:hover { border-color: var(--line-strong); color: var(--muted); }
.side-search kbd { margin-left: auto; }
.side-search svg { width: 15px; height: 15px; }
.side-label { margin: 0 0 6px; padding: 0 10px; font: 500 10px/1 var(--mono); letter-spacing: .12em; color: var(--faint); text-transform: uppercase; }
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--radius); color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.side-nav a .idx { font: 10.5px var(--mono); color: var(--faint); width: 18px; }
.side-nav a:hover { background: var(--bg-hover); color: var(--ink); }
.side-nav a.active { background: var(--bg-raise); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.04); }
.side-nav a.active .idx { color: var(--signal); }
.side-nav a.active::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--signal); }
.side-group { margin-top: 26px; }
.side-source { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border-radius: var(--radius); color: var(--muted); font-size: 13px; }
.side-source:hover { background: var(--bg-hover); color: var(--ink); }
.side-source b { font: 500 10px var(--mono); padding: 2px 5px; border-radius: 3px; border: 1px solid var(--line-strong); color: var(--muted); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 4px 2px; border-top: 1px solid var(--line); }
.side-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 8px; font: 11px var(--mono); color: var(--muted); padding-left: 6px; letter-spacing: .02em; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status.ok i { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.16); animation: pulse 2.6s infinite; }
.status.down i { background: var(--signal); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); } }
.lang-switch { display: inline-flex; padding: 2px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg-raise); }
.lang-switch button { font: 500 11px/1 var(--mono); padding: 5px 9px; border-radius: 5px; color: var(--faint); letter-spacing: .04em; transition: all .2s; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.icon-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: var(--radius); color: var(--muted); }
.icon-btn:hover { background: var(--bg-hover); color: var(--ink); }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-btn .sun { display: none; } :root:not([data-theme="light"]) .icon-btn .moon { display: block; } }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 18px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs a { padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.crumbs a:hover { background: var(--bg-hover); color: var(--ink); }
.crumbs .sep { color: var(--faint); font-family: var(--mono); font-size: 11px; }
.crumbs .current { color: var(--ink); padding: 3px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-lang, .top-search, .menu-btn { display: none; }
.top-search { align-items: center; gap: 8px; color: var(--muted); padding: 5px 8px; border-radius: var(--radius); }

.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 44px 56px 140px; outline: none; overflow-x: clip; }
.page.wide { max-width: 1200px; }
.page.home { max-width: none; padding: 0 0 120px; }
.view-enter > * { animation: enter .7s var(--ease) both; }
.view-enter > *:nth-child(2) { animation-delay: .05s; } .view-enter > *:nth-child(3) { animation-delay: .1s; } .view-enter > *:nth-child(4) { animation-delay: .15s; } .view-enter > *:nth-child(n+5) { animation-delay: .2s; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Page header ---------- */
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kicker i { width: 6px; height: 6px; background: var(--signal); border-radius: 1px; }
.kicker .n { color: var(--ink); }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding-bottom: 26px; border-bottom: 1px solid var(--line); position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 1px; background: var(--ink); }
h1.title { margin: 18px 0 0; font: 400 clamp(44px, 6vw, 64px)/1 var(--serif); letter-spacing: -.02em; color: var(--ink); }
:root[data-lang="zh"] h1.title { font-weight: 700; letter-spacing: 0; font-size: clamp(38px, 5vw, 52px); }
h1.title em { font-style: italic; color: var(--muted); }
.lede { margin: 14px 0 0; color: var(--muted); font-size: 15px; max-width: 620px; }
.head-meta { text-align: right; font: 11px/1.8 var(--mono); color: var(--faint); letter-spacing: .04em; white-space: nowrap; }
.head-meta b { color: var(--ink); font-weight: 500; }

/* ---------- Properties ---------- */
.props { margin-top: 8px; display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.props > * { border-bottom: 1px solid var(--line); }
.prop-key { display: flex; align-items: center; gap: 9px; color: var(--faint); font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; min-height: 46px; }
.prop-key svg { width: 14px; height: 14px; }
.prop-val { min-height: 46px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 0; }
.props .bare { border-bottom: 0; }
.field { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.input, .select { height: 32px; border: 1px solid transparent; background: transparent; border-radius: var(--radius); padding: 0 10px; outline: none; transition: background .15s, border-color .15s, box-shadow .2s; min-width: 0; color: var(--ink); }
.input:hover, .select:hover { background: var(--bg-hover); }
.input:focus, .select:focus { background: var(--bg-raise); border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--signal-soft); }
.input::placeholder { color: var(--faint); }
.select { appearance: none; padding-right: 26px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 13px) 14px, calc(100% - 9px) 14px; background-size: 4px 4px; background-repeat: no-repeat; }
.select option { background: var(--bg-raise); color: var(--ink); }
.input.wide { width: 420px; max-width: calc(100vw - 48px); }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-raise); gap: 2px; }
.seg button { padding: 4px 12px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 500; transition: background .2s, color .2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.toggle { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12.5px; transition: all .2s; }
.toggle::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--faint); transition: all .2s; }
.toggle:hover { color: var(--ink); }
.toggle[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.toggle[aria-pressed="true"]::before { background: var(--signal); border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 15px; border-radius: var(--radius); font-weight: 500; border: 1px solid var(--line-strong); background: var(--bg-raise); color: var(--ink); transition: background .2s, border-color .2s, transform .15s; white-space: nowrap; position: relative; overflow: hidden; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn.primary:hover::after { transform: translateX(120%); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* combobox */
.combo-list { position: absolute; top: calc(100% + 6px); left: 0; width: min(500px, 86vw); max-height: 340px; overflow: auto; background: var(--bg-raise); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 40; }
.combo-list[hidden] { display: none; }
.combo-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 7px 9px; border-radius: 6px; }
.combo-item[aria-selected="true"], .combo-item:hover { background: var(--bg-hover); }
.combo-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.combo-item small { color: var(--faint); font-size: 12px; white-space: nowrap; }
.combo-item code, code.k { font: 11.5px var(--mono); color: var(--muted); }
.combo-empty { padding: 12px; color: var(--faint); font-size: 13px; }

/* ---------- Tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 500; background: var(--tag-bg); color: var(--muted); white-space: nowrap; }
.tag.blue { background: var(--blue-bg); color: var(--blue); } .tag.green { background: var(--green-bg); color: var(--green); }
.tag.orange { background: var(--orange-bg); color: var(--orange); } .tag.purple { background: var(--purple-bg); color: var(--purple); }
.tag.mono { font: 500 11px var(--mono); }
.tag.line { background: none; border: 1px solid var(--line-strong); }
.doc-pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px; border-radius: 5px; border: 1px solid var(--line-strong); font: 500 11px/1 var(--mono); color: var(--ink); background: var(--bg-raise); transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; max-width: 100%; white-space: nowrap; }
.doc-pill i { width: 7px; height: 7px; border-radius: 2px; background: var(--faint); }
.doc-pill.qp i { background: var(--qp); } .doc-pill.ms i { background: var(--ms); } .doc-pill.er i { background: var(--er); } .doc-pill.gt i { background: var(--gt); }
.doc-pill svg { width: 11px; height: 11px; color: var(--faint); transition: transform .2s var(--ease), color .2s; }
.doc-pill:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: 0 4px 12px -4px rgba(0,0,0,.15); }
.doc-pill:hover svg { transform: translate(1px, -1px); color: var(--ink); }

/* ---------- Callout ---------- */
.callout { display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-raise); margin: 22px 0; font-size: 13.5px; color: var(--muted); position: relative; }
.callout > div { min-width: 0; }
.callout svg { color: var(--ink); margin-top: 1px; }
.callout strong { color: var(--ink); font-weight: 600; }
.callout .links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.callout .doc-pill { overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 24px; }
.callout.mark::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 2px; background: var(--signal); border-radius: 2px; }

/* ---------- Database table ---------- */
.db-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 12px; flex-wrap: wrap; }
.db-title { display: flex; align-items: baseline; gap: 12px; font: 400 26px/1.1 var(--serif); color: var(--ink); letter-spacing: -.01em; }
:root[data-lang="zh"] .db-title { font-size: 22px; font-weight: 700; }
.db-title .mono { font: 11px var(--mono); color: var(--faint); letter-spacing: .08em; }
.db-meta { color: var(--faint); font: 11px var(--mono); letter-spacing: .04em; }
.db { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.db th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 10px 12px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); white-space: nowrap; }
.db td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.db tbody tr { transition: background .15s; animation: row-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
.db tbody tr:hover { background: var(--bg-hover); }
.db tbody tr td:first-child { transition: box-shadow .2s; }
.db tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--signal); }
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }
.cell-title { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--ink); }
.cell-title .code { font: 500 11px var(--mono); color: var(--muted); padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 4px; min-width: 46px; text-align: center; }
.cell-sub { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.table-wrap { overflow-x: auto; }
.more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; color: var(--muted); font: 12px var(--mono); letter-spacing: .04em; border-bottom: 1px solid var(--line); transition: background .15s, color .15s; }
.more:hover { background: var(--bg-hover); color: var(--ink); }
.coverage-row { display: flex; flex-wrap: wrap; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cov { flex: 1 1 160px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--bg-raise); }
.cov + .cov { border-left: 1px solid var(--line); }
.cov b { display: flex; align-items: center; gap: 8px; font: 500 12px var(--mono); color: var(--ink); }
.cov b i { width: 7px; height: 7px; border-radius: 2px; }
.cov span { font-size: 12px; color: var(--faint); }
.cov.ok span { color: var(--green); }

/* ---------- States ---------- */
.empty { padding: 72px 20px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line); }
.empty h3 { margin: 22px 0 6px; color: var(--ink); font: 400 26px/1.2 var(--serif); }
:root[data-lang="zh"] .empty h3 { font-size: 20px; font-weight: 700; }
.empty p { margin: 0 auto; max-width: 440px; font-size: 13.5px; }
.empty .glyph { width: 56px; height: 56px; margin: 0 auto; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); position: relative; }
.empty .glyph::before { content: ""; position: absolute; inset: -9px; border: 1px dashed var(--line-strong); border-radius: 50%; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.empty .choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.skeleton { display: grid; margin-top: 14px; border-top: 1px solid var(--line); }
.skeleton i { height: 46px; background: linear-gradient(90deg, transparent, var(--bg-hover), transparent); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-bottom: 1px solid var(--line); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.notice { font: 11.5px/1.7 var(--mono); color: var(--faint); margin-top: 14px; letter-spacing: .02em; }
.notice a { text-decoration: underline; text-underline-offset: 3px; }
.notice.warn { color: var(--orange); }

/* ---------- Home ---------- */
.hero { position: relative; min-height: min(760px, calc(calc(100vh / var(--zoom, 1)) - 48px)); display: flex; flex-direction: column; justify-content: center; padding: 48px 56px 40px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; mask-image: radial-gradient(ellipse 80% 75% at 70% 45%, #000 20%, transparent 80%); }
.hero-guides { position: absolute; inset: 0; pointer-events: none; }
.hero-guides i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.hero-guides i:nth-child(1) { left: 56px; } .hero-guides i:nth-child(2) { right: 56px; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; max-width: 1240px; width: 100%; margin: 0 auto; }
.display { margin: 28px 0 0; font: 400 clamp(52px, 7.4vw, 104px)/.95 var(--serif); letter-spacing: -.035em; color: var(--ink); }
:root[data-lang="zh"] .display { font-weight: 700; font-size: clamp(40px, 4.7vw, 70px); line-height: 1.16; letter-spacing: -.01em; }
.display .line { display: block; overflow: hidden; padding-bottom: .04em; }
.display .line > span { display: inline-block; animation: rise 1.1s var(--ease) both; }
.display .line:nth-child(2) > span { animation-delay: .08s; } .display .line:nth-child(3) > span { animation-delay: .16s; }
.display em { font-style: italic; color: var(--muted); }
:root[data-lang="zh"] .display em { font-style: normal; color: var(--faint); }
.display .dot { color: var(--signal); }
@keyframes rise { from { transform: translateY(105%); } }
.hero-sub { margin: 28px 0 0; max-width: 520px; color: var(--muted); font-size: 16px; line-height: 1.65; animation: enter .9s .3s var(--ease) both; }
.hero .actions { margin-top: 34px; animation: enter .9s .4s var(--ease) both; }
.hero .hint { color: var(--faint); font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }

.console { position: relative; background: var(--console-bg); color: var(--console-text); border-radius: 12px; font: 12px/1.75 var(--mono); box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 30px 80px -20px rgba(0,0,0,.45); overflow: hidden; animation: enter 1s .25s var(--ease) both; }
.console::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px circle at 100% 0%, rgba(255,77,0,.12), transparent 50%); pointer-events: none; }
.console-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); color: #77777f; font-size: 11px; }
.console-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a2a2e; }
.console-bar span { margin-left: 8px; letter-spacing: .06em; }
.console-bar b { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: #9a9aa2; }
.console-bar b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.console-bar b.off::before { background: #ff6a2b; box-shadow: 0 0 8px #ff6a2b; }
.console-body { padding: 16px 18px 18px; min-height: 290px; }
.c-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-prompt { color: #ff6a2b; }
.c-method { color: #fff; font-weight: 500; }
.c-path { color: #a7b4ff; }
.c-kw { color: #ffd2b8; }
.c-dim { color: #5f5f68; }
.c-ok { color: #4ade80; }
.c-err { color: #ff8a5c; }
.c-caret { display: inline-block; width: 7px; height: 14px; background: #ff6a2b; vertical-align: -2px; animation: caret 1s steps(1) infinite; margin-left: 1px; }
@keyframes caret { 50% { opacity: 0; } }
.c-result { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px dashed rgba(255,255,255,.08); opacity: 0; transform: translateY(4px); animation: c-in .5s var(--ease) forwards; cursor: pointer; white-space: normal; width: 100%; text-align: left; color: inherit; }
.c-result:first-of-type { margin-top: 10px; }
.c-result:hover .c-stem { color: #fff; }
.c-result .c-id { color: #77777f; font-size: 11px; line-height: 1.5; }
.c-result .c-id b { display: block; color: #e4e4e7; font-weight: 500; font-size: 12px; }
.c-stem { color: #b4b4bb; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--sans); font-size: 12.5px; line-height: 1.55; }
.c-stem mark { background: rgba(255,106,43,.2); color: #ffd2b8; border: 0; }
@keyframes c-in { to { opacity: 1; transform: none; } }

.marquee { border-bottom: 1px solid var(--line); overflow: hidden; padding: 14px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 40px; animation: marquee 110s linear infinite; font: 12px var(--mono); color: var(--muted); letter-spacing: .02em; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track a { display: inline-flex; gap: 10px; white-space: nowrap; transition: color .2s; }
.marquee-track a:hover { color: var(--ink); }
.marquee-track a b { color: var(--ink); font-weight: 500; }
.marquee-track a::before { content: "◆"; font-size: 7px; color: var(--signal); align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

.home-section { max-width: 1240px; margin: 0 auto; padding: 0 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 84px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.section-head h2 { margin: 0; font: 400 36px/1 var(--serif); color: var(--ink); letter-spacing: -.02em; }
:root[data-lang="zh"] .section-head h2 { font-size: 26px; font-weight: 700; }
.figures { display: grid; grid-template-columns: repeat(4, 1fr); }
.figure { padding: 28px 24px 26px 0; position: relative; }
.figure + .figure { padding-left: 24px; border-left: 1px solid var(--line); }
.figure .k { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); display: flex; justify-content: space-between; }
.figure .v { font: 400 clamp(44px, 5vw, 66px)/1 var(--serif); letter-spacing: -.03em; color: var(--ink); margin-top: 18px; font-variant-numeric: tabular-nums; }
.figure .s { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.bar { display: flex; height: 2px; margin-top: 16px; background: var(--line); }
.bar i { display: block; height: 100%; width: 0; transition: width 1.4s var(--ease); }
.bar i:nth-child(1) { background: var(--ink); } .bar i:nth-child(2) { background: var(--signal); }
.legend { display: flex; gap: 14px; margin-top: 8px; font: 10.5px var(--mono); color: var(--faint); }
.legend span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--ink); vertical-align: 1px; }
.legend span + span::before { background: var(--signal); }


.footnote { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 20px; margin-top: 48px; color: var(--muted); font-size: 13px; max-width: 820px; }
.footnote .mono { font-size: 11px; color: var(--faint); letter-spacing: .1em; padding-top: 2px; }
.colophon { display: flex; justify-content: space-between; gap: 20px; margin-top: 72px; padding-top: 18px; border-top: 1px solid var(--line); font: 11px var(--mono); color: var(--faint); letter-spacing: .04em; flex-wrap: wrap; }

/* ---------- Questions ---------- */
.searchbar { margin-top: 30px; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 4px; border-bottom: 1px solid var(--ink); }
.searchbar input { flex: 1; border: 0; outline: none; background: transparent; font: 400 28px/1 var(--serif); color: var(--ink); min-width: 0; letter-spacing: -.01em; }
.searchbar input::placeholder { color: var(--faint); }
.searchbar svg { color: var(--ink); width: 20px; height: 20px; }
.searchbar .spin { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); border-top-color: var(--signal); animation: spin .7s linear infinite; visibility: hidden; }
.searchbar.loading .spin { visibility: visible; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.filters .input, .filters .select { border-color: var(--line-strong); height: 28px; font-size: 13px; }
.filters .input { width: 130px; }
.result-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 36px 0 0; padding-bottom: 12px; flex-wrap: wrap; }
.result-count { font: 400 30px/1 var(--serif); color: var(--ink); letter-spacing: -.02em; }
.result-count span { font: 11px var(--mono); color: var(--faint); margin-left: 10px; letter-spacing: .04em; }
.board-split { display: flex; align-items: center; gap: 12px; font: 11px var(--mono); color: var(--faint); }
.board-split .bar { width: 140px; margin: 0; }
.qlist { border-top: 1px solid var(--ink); }
.qrow { position: relative; display: grid; grid-template-columns: 90px minmax(0, 1fr) 24px; gap: 18px; width: 100%; text-align: left; padding: 16px 8px; border-bottom: 1px solid var(--line); transition: background .15s; animation: row-in .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 16ms); }
.qrow:hover { background: var(--bg-hover); }
.qrow.active { background: var(--signal-soft); }
.qrow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--signal); transform: scaleY(0); transition: transform .25s var(--ease); }
.qrow:hover::before, .qrow.active::before { transform: scaleY(1); }
.qnum { font: 500 13px var(--mono); color: var(--ink); padding-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.qstem { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; font-size: 14px; }
.qstem.empty-stem { color: var(--faint); font-style: italic; }
.qmeta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; align-items: center; }
.qrow .chev { color: var(--faint); align-self: center; transition: transform .25s var(--ease), color .2s; }
.qrow:hover .chev { transform: translateX(3px); color: var(--ink); }
mark { background: var(--signal-soft); color: var(--ink); border-bottom: 1px solid var(--signal); padding: 0 1px; }

/* ---------- Peek ---------- */
.peek { position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 100vw); background: var(--bg-raise); box-shadow: var(--shadow); z-index: 60; transform: translateX(104%); transition: transform .45s var(--ease); display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.peek.open { transform: none; }
.peek-bar { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--line); flex: none; }
.peek-title { font: 11px var(--mono); color: var(--muted); letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peek-body { overflow: auto; padding: 36px 44px 90px; flex: 1; }
.peek-body h2 { margin: 16px 0 0; font: 400 46px/1.05 var(--serif); letter-spacing: -.02em; color: var(--ink); }
:root[data-lang="zh"] .peek-body h2 { font-size: 34px; font-weight: 700; }
.peek-body .props { margin-top: 24px; grid-template-columns: 150px minmax(0, 1fr); }
.peek-body .actions { margin-top: 22px; }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(8,8,9,.24); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.block-label { margin: 34px 0 12px; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); display: flex; gap: 10px; align-items: center; }
.block-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.stem-block { white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.75; color: var(--ink); }
.answer { white-space: pre-wrap; word-break: break-word; padding: 16px 18px; border: 1px solid var(--line); border-left: 2px solid var(--ms); background: var(--bg); border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.7; }
.answer + .answer { margin-top: 8px; }
.meter { display: inline-flex; align-items: center; gap: 10px; font: 11.5px var(--mono); color: var(--muted); }
.meter span { width: 90px; height: 2px; background: var(--line-strong); overflow: hidden; }
.meter span i { display: block; height: 100%; background: var(--ink); }
.child-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.child-list button { display: flex; justify-content: space-between; padding: 10px 6px; border-bottom: 1px solid var(--line); font: 13px var(--mono); text-align: left; color: var(--ink); }
.child-list button:hover { background: var(--bg-hover); }
.asset-img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-top: 10px; }

/* ---------- Timetable ---------- */
.heat-wrap { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raise); }
.heat { display: flex; gap: 3px; flex-wrap: wrap; }
.heat button { width: 18px; height: 18px; border-radius: 3px; background: var(--tag-bg); transition: transform .15s; }
.heat button:hover { transform: scale(1.3); }
.heat button[data-l="1"] { background: color-mix(in srgb, var(--ink) 18%, transparent); }
.heat button[data-l="2"] { background: color-mix(in srgb, var(--ink) 38%, transparent); }
.heat button[data-l="3"] { background: color-mix(in srgb, var(--ink) 62%, transparent); }
.heat button[data-l="4"] { background: var(--ink); }
.heat button.today { background: var(--signal) !important; box-shadow: 0 0 0 3px var(--signal-soft); }
.heat-legend { display: flex; align-items: center; gap: 4px; font: 10.5px var(--mono); color: var(--faint); margin-top: 14px; flex-wrap: wrap; }
.heat-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--tag-bg); }
.heat-legend i:nth-of-type(2) { background: color-mix(in srgb, var(--ink) 18%, transparent); }
.heat-legend i:nth-of-type(3) { background: color-mix(in srgb, var(--ink) 38%, transparent); }
.heat-legend i:nth-of-type(4) { background: color-mix(in srgb, var(--ink) 62%, transparent); }
.heat-legend i:nth-of-type(5) { background: var(--ink); }
.heat-legend .today-key { margin-left: 14px; display: inline-flex; align-items: center; gap: 6px; }
.heat-legend .today-key::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--signal); }
.heat-legend .btn { margin-left: auto; }
.days { margin-top: 28px; border-top: 1px solid var(--ink); }
.day { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.day-head { position: sticky; top: 60px; align-self: start; padding: 18px 0; }
.day-head strong { display: block; font: 400 42px/1 var(--serif); color: var(--ink); letter-spacing: -.02em; }
.day-head strong small { font-size: 17px; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.day-head span { display: block; margin-top: 8px; font: 11px var(--mono); color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.day-head .tag { margin-top: 10px; }
.day.past .day-head, .day.past .events { opacity: .4; }
.events { padding: 10px 0; }
.event { display: grid; grid-template-columns: 44px 108px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 6px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.event:last-child { border-bottom: 0; }
.event:hover { background: var(--bg-hover); }
.event code { font: 500 12.5px var(--mono); color: var(--ink); }
.event .ev-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.event .dur { display: flex; align-items: center; gap: 10px; font: 11px var(--mono); color: var(--faint); justify-content: flex-end; min-width: 130px; }
.event .dur span { height: 2px; background: var(--ink); opacity: .5; }
.sess { font: 500 10.5px var(--mono); letter-spacing: .06em; text-align: center; padding: 3px 0; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); }
.sess.AM { border-color: transparent; background: var(--ink); color: var(--bg); }
.sess.EV { border-color: var(--signal); color: var(--signal); }

/* ---------- Palette ---------- */
.palette { width: min(640px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 14px; background: var(--bg-raise); color: var(--text); box-shadow: var(--shadow); margin-top: calc(13vh / var(--zoom, 1)); overflow: hidden; }
.palette::backdrop { background: rgba(8,8,9,.32); backdrop-filter: blur(3px); }
.palette[open] { animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-8px); } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border-bottom: 1px solid var(--line); }
.palette-input svg { color: var(--ink); }
.palette-input input { flex: 1; border: 0; outline: none; background: transparent; font: 400 21px var(--serif); color: var(--ink); min-width: 0; }
.palette-input input::placeholder { color: var(--faint); }
.palette-list { max-height: 400px; overflow: auto; padding: 6px; }
.palette-group { padding: 10px 12px 5px; font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 7px; text-align: left; color: var(--text); }
.palette-item svg { width: 16px; height: 16px; color: var(--faint); }
.palette-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item small { color: var(--faint); font: 11px var(--mono); }
.palette-item[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.palette-item[aria-selected="true"] svg, .palette-item[aria-selected="true"] small { color: var(--bg); opacity: .75; }
.palette-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font: 11px var(--mono); color: var(--faint); }
.palette-foot span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .console { max-width: 620px; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .35s var(--ease); box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn, .top-search, .top-lang { display: inline-flex; }
  .page { padding: 24px 16px 100px; }
  .hero { padding: 36px 16px 32px; min-height: 0; }
  .hero-guides { display: none; }
  .home-section { padding: 0 16px; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure:nth-child(3) { padding-left: 0; border-left: 0; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--line); }
  .props, .peek-body .props { grid-template-columns: minmax(0, 1fr); }
  .prop-key { min-height: 0; padding-top: 14px; border-bottom: 0; }
  .page-head { grid-template-columns: 1fr; }
  .head-meta { text-align: left; }
  .day { grid-template-columns: 1fr; gap: 0; }
  .day-head { position: static; padding-bottom: 4px; }
  .event { grid-template-columns: 40px 1fr; row-gap: 2px; }
  .event .ev-title { grid-column: 2; white-space: normal; }
  .event .dur { grid-column: 2; justify-content: flex-start; }
  .peek-body { padding: 24px 18px 60px; }
  .qrow { grid-template-columns: 1fr; gap: 4px; }
  .qrow .chev { display: none; }
  .footnote { grid-template-columns: 1fr; gap: 6px; }
  .searchbar input { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .marquee-track { animation: none; }
}

/* ---------- Edexcel subject directory ---------- */
.dir { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--ink); }
.dir-h { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 18px 0 12px; font: 400 22px/1 var(--serif); color: var(--ink); border-bottom: 1px solid var(--line); }
:root[data-lang="zh"] .dir-h { font-size: 17px; font-weight: 700; }
.dir-h span { font: 11px var(--mono); color: var(--signal); }
.dir-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 22px; grid-template-areas: "name go" "meta go" "code go"; width: 100%; text-align: left; padding: 14px 4px 13px; border-bottom: 1px solid var(--line); isolation: isolate; }
.dir-item::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.dir-item:hover::before { transform: scaleX(1); }
.dir-name { grid-area: name; font-weight: 500; color: var(--ink); font-size: 14.5px; }
.dir-meta { grid-area: meta; font-size: 12px; color: var(--muted); margin-top: 2px; }
.dir-meta em { font-style: normal; color: var(--signal); }
.dir-code { grid-area: code; font: 11px var(--mono); color: var(--faint); margin-top: 6px; }
.dir-go { grid-area: go; align-self: center; color: var(--faint); transition: transform .3s var(--ease), color .2s; }
.dir-go svg { width: 16px; height: 16px; }
.dir-item:hover .dir-go { color: var(--signal); transform: translateX(4px); }
@media (max-width: 900px) { .dir { grid-template-columns: 1fr; } }

/* ---------- Cambridge directory ---------- */
.dir-filter { width: 200px; border-color: var(--line-strong) !important; height: 28px; font-size: 13px; }
.dir-level { border-top: 1px solid var(--ink); margin-top: 6px; }
.dir-level + .dir-level { margin-top: 30px; }
.dir-level .dir-h small { margin-left: auto; font: 11px var(--mono); color: var(--faint); }
.dir-compact { columns: 3 240px; column-gap: 32px; padding-top: 4px; }
.dir-row { position: relative; display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); break-inside: avoid; color: var(--text); transition: color .2s, padding .3s var(--ease); }
.dir-row code { font: 500 11.5px var(--mono); color: var(--faint); min-width: 36px; transition: color .2s; }
.dir-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-row::after { content: "→"; position: absolute; right: 4px; color: var(--signal); opacity: 0; transform: translateX(-4px); transition: all .25s var(--ease); }
.dir-row:hover { color: var(--ink); padding-left: 8px; }
.dir-row:hover code { color: var(--signal); }
.dir-row:hover::after { opacity: 1; transform: none; }
.dir-row[hidden], .dir-level[hidden] { display: none; }

/* ---------- Cross-links ---------- */
.callout.bank { align-items: center; }
.callout.bank > div { flex: 1; }
.callout.bank strong { font-variant-numeric: tabular-nums; }
.doc-pill.qb { border-style: dashed; color: var(--muted); }
.doc-pill.qb svg { width: 12px; height: 12px; color: var(--muted); }
.doc-pill.qb:hover { color: var(--ink); border-style: solid; }
a.event { color: inherit; position: relative; }
a.event::after { content: "→"; position: absolute; right: -14px; color: var(--signal); opacity: 0; transition: opacity .2s, right .25s var(--ease); }
a.event:hover::after { opacity: 1; right: -4px; }
a.event:hover code { color: var(--signal); }

@media (max-width: 820px) { .sidebar { z-index: 58; } .dir-filter { width: 100%; } }
.day-head .tag { display: inline-flex; }

/* ---------- Timetable: sticky session bar, list anchored at today ---------- */
.tt-bar { position: sticky; top: 48px; z-index: 12; display: flex; align-items: center; gap: 14px; height: 52px; margin-top: 26px; padding: 0 2px; background: var(--bg); border-bottom: 1px solid var(--ink); }
.tt-bar-title { font: 400 22px/1 var(--serif); color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
:root[data-lang="zh"] .tt-bar-title { font-size: 18px; font-weight: 700; }
.tt-bar .db-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-bar-actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
.days { border-top: 0 !important; margin-top: 0; }
.days .day-head { top: 108px; }
.day { scroll-margin-top: 108px; }
.now-line { display: flex; align-items: center; gap: 14px; padding: 16px 0 14px; position: relative; font: 11px var(--mono); letter-spacing: .06em; color: var(--muted); }
.now-line b { display: inline-flex; align-items: center; gap: 8px; color: var(--signal); font-weight: 500; text-transform: uppercase; white-space: nowrap; }
.now-line b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); animation: now-pulse 2.4s infinite; }
.now-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-line::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--signal), transparent); min-width: 24px; }
@keyframes now-pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
@media (max-width: 820px) { .now-line { flex-wrap: wrap; gap: 6px 12px; } .tt-bar { gap: 10px; } .tt-bar .db-meta { display: none; } }

/* Narrow top bar: current page only, no key hint */
@media (max-width: 820px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .crumbs a, .crumbs .sep { display: none; }
  .crumbs .current { padding-left: 2px; font-weight: 500; }
  .top-search kbd { display: none; }
  .top-search { padding: 6px; }
}

/* ---------- Intro ---------- */
.intro { position: fixed; inset: 0; z-index: 300; color: #f4f4f5; font-family: var(--mono); cursor: pointer; overflow: hidden; }
.intro-half { position: absolute; left: 0; right: 0; height: 50.5%; background: #0b0b0c; transition: transform .8s cubic-bezier(.77, 0, .18, 1); }
.intro-half.top { top: 0; }
.intro-half.bottom { bottom: 0; }
.intro.split .intro-half.top { transform: translateY(-101%); }
.intro.split .intro-half.bottom { transform: translateY(101%); }
.intro-grid { position: absolute; inset: 0; pointer-events: none; }
.intro-grid i { position: absolute; background: rgba(255, 255, 255, .07); }
.intro-grid .v { top: 0; bottom: 0; width: 1px; transform: scaleY(0); transform-origin: top; }
.intro-grid .h { left: 0; right: 0; height: 1px; transform: scaleX(0); transform-origin: left; }
.intro.go .intro-grid .v { animation: grid-y .9s var(--ease) forwards; animation-delay: calc(var(--d) * 70ms); }
.intro.go .intro-grid .h { animation: grid-x .9s var(--ease) forwards; animation-delay: calc(var(--d) * 70ms + 120ms); }
@keyframes grid-y { to { transform: scaleY(1); } }
@keyframes grid-x { to { transform: scaleX(1); } }
.intro-scan { position: absolute; top: 0; bottom: 0; left: -20%; width: 18%; background: linear-gradient(90deg, transparent, rgba(255, 77, 0, .16), transparent); opacity: 0; pointer-events: none; }
.intro.go .intro-scan { animation: intro-sweep 1.5s .35s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes intro-sweep { 0% { left: -20%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 105%; opacity: 0; } }
.intro-stage { position: absolute; inset: 0; transition: opacity .3s, transform .4s var(--ease); }
.intro.leaving .intro-stage { opacity: 0; transform: translateY(-14px); }
.intro-corner { position: absolute; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .5); opacity: 0; }
.intro.go .intro-corner { animation: intro-fade .6s .2s forwards; }
@keyframes intro-fade { to { opacity: 1; } }
.intro-corner.tl { top: 28px; left: 32px; display: flex; gap: 10px; align-items: center; }
.intro-corner.tl b { width: 7px; height: 7px; background: #ff4d00; border-radius: 1px; }
.intro-corner.tr { top: 22px; right: 26px; }
.intro-skip { font: 500 11px var(--mono); letter-spacing: .14em; color: rgba(255, 255, 255, .7); padding: 7px 11px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; transition: all .2s; }
.intro-skip:hover { color: #fff; border-color: #fff; }
.intro-skip kbd { background: transparent; border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .5); margin-left: 6px; }
.intro-center { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-58%); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 20px; }
.intro-word { display: flex; font: 400 clamp(76px, 15vw, 210px)/.92 var(--serif); letter-spacing: -.045em; color: #fff; }
.intro-word .ch { display: inline-block; overflow: hidden; padding: 0 .015em .06em; }
.intro-word .ch > i { display: inline-block; font-style: normal; transform: translateY(112%); }
.intro.word .intro-word .ch > i { animation: intro-rise 1s cubic-bezier(.2, .8, .1, 1) forwards; animation-delay: calc(var(--d) * 55ms); }
.intro-word .dot { color: #ff4d00; display: inline-block; transform: scale(0); }
.intro.word .intro-word .dot { animation: intro-pop .5s cubic-bezier(.3, 1.6, .5, 1) forwards; animation-delay: calc(var(--d) * 55ms + 120ms); }
@keyframes intro-rise { to { transform: none; } }
@keyframes intro-pop { to { transform: scale(1); } }
.intro-tag { margin-top: 26px; min-height: 1.4em; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.intro-tag .hot { color: #ff6a2b; }
.intro-stream { position: absolute; left: 32px; top: 22%; height: 46%; width: 300px; overflow: hidden; font-size: 10.5px; line-height: 1.85; color: rgba(255, 255, 255, .26); letter-spacing: .04em; mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 80%, transparent); display: flex; flex-direction: column; justify-content: flex-end; }
.intro-stream div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intro-stream div b { color: rgba(255, 255, 255, .55); font-weight: 500; margin-right: 10px; }
.intro-stream div i { font-style: normal; color: #ff6a2b; margin-left: 8px; }
.intro-counters { position: absolute; left: 32px; bottom: 30px; display: flex; gap: 38px; opacity: 0; }
.intro.go .intro-counters { animation: intro-fade .6s .3s forwards; }
.intro-counters div { display: flex; flex-direction: column; gap: 6px; }
.intro-counters span { font-size: 10px; letter-spacing: .16em; color: rgba(255, 255, 255, .42); text-transform: uppercase; }
.intro-counters b { font: 400 30px/1 var(--serif); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.01em; min-width: 3ch; }
.intro-progress { position: absolute; right: 32px; bottom: 32px; width: min(260px, 40vw); display: flex; flex-direction: column; gap: 10px; align-items: flex-end; opacity: 0; }
.intro.go .intro-progress { animation: intro-fade .6s .3s forwards; }
.intro-progress span { font-size: 10px; letter-spacing: .16em; color: rgba(255, 255, 255, .5); }
.intro-progress span b { color: #fff; font-weight: 500; }
.intro-progress div { width: 100%; height: 1px; background: rgba(255, 255, 255, .14); }
.intro-progress div i { display: block; height: 100%; width: 100%; background: #ff4d00; transform: scaleX(0); transform-origin: left; box-shadow: 0 0 10px #ff4d00; }
.intro-seam { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #ff4d00; box-shadow: 0 0 18px 1px rgba(255, 77, 0, .8); transform: scaleX(0); transition: transform .38s cubic-bezier(.7, 0, .2, 1), opacity .3s; z-index: 2; }
.intro.seam .intro-seam { transform: scaleX(1); }
.intro.split .intro-seam { opacity: 0; transition-delay: 0s, .15s; }
.shell.revealing { animation: shell-reveal 1s cubic-bezier(.2, .75, .15, 1); }
@keyframes shell-reveal { from { transform: scale(.975); opacity: .4; filter: blur(3px); } }
.colophon .replay { font: inherit; color: var(--faint); letter-spacing: inherit; text-transform: uppercase; }
.colophon .replay:hover { color: var(--signal); }
@media (max-width: 820px) {
  .intro-stream { display: none; }
  .intro-counters { left: 20px; bottom: 76px; gap: 22px; }
  .intro-counters b { font-size: 22px; }
  .intro-progress { left: 20px; right: 20px; width: auto; bottom: 28px; align-items: flex-start; }
  .intro-corner.tl { left: 20px; } .intro-corner.tr { right: 14px; }
  .intro-tag { letter-spacing: .2em; font-size: 10.5px; }
}

/* ---------- Timetable v4: board colours + month calendar ---------- */
/* Cobalt vs amber: opposite hues, colour-blind safe, distinct from the orange brand accent. */
:root { --cie: #1f4fe0; --cie-ink: #1739a8; --cie-soft: rgba(31, 79, 224, .1); --edx: #f0a500; --edx-ink: #8a5a00; --edx-soft: rgba(240, 165, 0, .16); }
:root[data-theme="dark"] { --cie: #5b84ff; --cie-ink: #a9bfff; --cie-soft: rgba(91, 132, 255, .17); --edx: #ffbe2e; --edx-ink: #ffd27a; --edx-soft: rgba(255, 190, 46, .16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cie: #5b84ff; --cie-ink: #a9bfff; --cie-soft: rgba(91, 132, 255, .17); --edx: #ffbe2e; --edx-ink: #ffd27a; --edx-soft: rgba(255, 190, 46, .16); } }

.bd { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--faint); margin-right: 6px; vertical-align: 0; }
.bd.cie { background: var(--cie); } .bd.edexcel { background: var(--edx); } .bd.now { background: var(--ink); border-radius: 50%; }

/* sticky bar */
.tt-bar { gap: 12px; height: 56px; }
.tt-nav { display: flex; align-items: center; gap: 2px; }
.tt-nav .tt-bar-title { min-width: 9.5em; text-align: center; }
:root[data-lang="en"] .tt-nav .tt-bar-title { min-width: 8.2em; }
.tt-sum { display: inline-flex; align-items: center; gap: 2px; }
.tt-sum .bd { margin: 0 4px 0 8px; }
.tt-bar .seg button { padding: 3px 11px; font-size: 12.5px; }

/* list view */
.days .day-head { top: 112px; }
.day { scroll-margin-top: 112px; }
.day-boards { display: flex !important; gap: 10px; align-items: center; margin-top: 8px !important; }
.ev-board { font: 700 10px var(--mono); letter-spacing: .06em; padding: 3px 0; text-align: center; border-radius: 4px; }
.ev-board.cie { background: var(--cie); color: #fff; }
.ev-board.edexcel { background: var(--edx); color: #1b1300; }
.event { grid-template-columns: 38px 44px 108px minmax(0, 1fr) auto; }
.list-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

/* month summary */
.cal-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px; border-top: 1px solid var(--line); }
.cal-stat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 16px 0; }
.cal-stat + .cal-stat { padding-left: 18px; border-left: 1px solid var(--line); }
.cal-stat .k { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 7px; }
.cal-stat.cie .k::before, .cal-stat.edexcel .k::before { content: ""; width: 8px; height: 8px; border-radius: 2px; }
.cal-stat.cie .k::before { background: var(--cie); } .cal-stat.edexcel .k::before { background: var(--edx); }
.cal-stat b { font: 400 40px/1 var(--serif); letter-spacing: -.02em; color: var(--ink); margin-top: 6px; font-variant-numeric: tabular-nums; }
.cal-stat .s { font: 11px var(--mono); color: var(--muted); }
.cal-stat .share { height: 3px; margin-top: 8px; background: var(--line); border-radius: 3px; overflow: hidden; }
.cal-stat .share i { display: block; height: 100%; border-radius: 3px; }
.cal-stat.cie .share i { background: var(--cie); } .cal-stat.edexcel .share i { background: var(--edx); }

/* calendar */
.cal { margin-top: 14px; border-top: 1px solid var(--ink); }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line-strong); }
.cal-head span { padding: 12px 10px 10px; font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cal-head span.we { color: var(--faint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); border-left: 1px solid var(--line); }
.cal-cell { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px 10px 12px; text-align: left; background: var(--bg-raise); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: default; transition: box-shadow .2s, background .2s; }
.cal-cell.we { background: color-mix(in srgb, var(--bg-raise) 70%, var(--bg-side)); }
.cal-cell.out { background: transparent; }
.cal-cell.out .cal-date { color: var(--faint); opacity: .55; }
.cal-cell.has { cursor: pointer; }
.cal-cell.has:hover { box-shadow: inset 0 0 0 1.5px var(--ink); z-index: 1; }
.cal-cell.past:not(.out) > :not(.cal-top) { opacity: .45; }
.cal-cell.past:not(.out) .cal-date { color: var(--muted); }
.cal-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.cal-date { font: 400 26px/1 var(--serif); letter-spacing: -.02em; color: var(--ink); min-width: 34px; height: 34px; display: inline-grid; place-items: center; margin: -4px 0 0 -6px; border-radius: 50%; }
.cal-cell.today .cal-date { background: var(--ink); color: var(--bg); }
.cal-cell.today::after { content: ""; position: absolute; top: 9px; left: 37px; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--bg-raise); }
.cal-count { font: 500 11px var(--mono); color: var(--ink); }
.cal-count small { font-size: 10px; color: var(--faint); margin-left: 2px; }
.cal-split { display: flex; gap: 2px; height: 4px; border-radius: 4px; overflow: hidden; }
.cal-split i { display: block; min-width: 4px; }
.cal-split .cie { background: var(--cie); } .cal-split .edexcel { background: var(--edx); }
.cal-chips { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.chip { display: flex; align-items: center; gap: 6px; min-width: 0; height: 22px; padding: 0 7px 0 0; border-radius: 5px; overflow: hidden; border: 0; }
.chip i { width: 3px; align-self: stretch; flex: none; }
.chip.cie { background: var(--cie-soft); } .chip.cie i { background: var(--cie); } .chip.cie code { color: var(--cie-ink); }
.chip.edexcel { background: var(--edx-soft); } .chip.edexcel i { background: var(--edx); } .chip.edexcel code { color: var(--edx-ink); }
.chip code { font: 600 11px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip em { margin-left: auto; font: 500 9.5px var(--mono); font-style: normal; color: var(--muted); flex: none; letter-spacing: .04em; }
.cal-more { font: 11px var(--mono); color: var(--muted); padding: 1px 0 0 2px; }
.cal-dots { display: none; gap: 3px; justify-content: center; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; }
.cal-dots i.cie { background: var(--cie); } .cal-dots i.edexcel { background: var(--edx); }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 14px; font: 11px var(--mono); color: var(--muted); }
.cal-legend .db-meta { margin-left: auto; }
.peek-body .events .event { grid-template-columns: 38px 40px 96px minmax(0, 1fr); }
.peek-body .events .event .dur { display: none; }

@media (max-width: 1100px) {
  .cal-grid { grid-auto-rows: minmax(120px, auto); }
  .chip em { display: none; }
  .cal-date { font-size: 22px; }
}
@media (max-width: 820px) {
  .tt-bar { flex-wrap: wrap; height: auto; padding: 8px 0; row-gap: 8px; }
  .tt-sum { display: none; }
  .tt-bar-actions { margin-left: auto; }
  .days .day-head { top: auto; }
  .cal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .cal-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cal-stat b { font-size: 30px; }
  .cal-grid { grid-auto-rows: 64px; }
  .cal-cell { padding: 6px 2px; gap: 5px; align-items: center; }
  .cal-top { flex-direction: column; align-items: center; gap: 0; }
  .cal-date { font-size: 18px; min-width: 28px; height: 28px; margin: 0; }
  .cal-cell.today::after { top: 4px; left: calc(50% + 10px); }
  .cal-count, .cal-chips, .cal-split { display: none; }
  .cal-dots { display: flex; }
  .cal-head span { padding: 8px 0; text-align: center; letter-spacing: .04em; }
  .event { grid-template-columns: 38px 40px 1fr; }
  .event code { grid-column: 3; }
  .event .ev-title, .event .dur { grid-column: 1 / -1; }
  .cal-legend .db-meta { margin-left: 0; }
}

/* Board colours everywhere boards are distinguished */
.tag.cie { background: var(--cie-soft); color: var(--cie-ink); }
.tag.edexcel { background: var(--edx-soft); color: var(--edx-ink); }
.bar i:nth-child(1) { background: var(--cie); }
.bar i:nth-child(2) { background: var(--edx); }
.legend span::before { background: var(--cie); }
.legend span + span::before { background: var(--edx); }

/* ---------- Language exams (IELTS / TOEFL): layered, raised surfaces ---------- */
.ex-ielts { --ex: #c8102e; --ex-2: #ff5a47; --ex-ink: #a20d25; --ex-soft: rgba(200, 16, 46, .09); }
.ex-toefl { --ex: #0a7f86; --ex-2: #2ec4b6; --ex-ink: #076269; --ex-soft: rgba(10, 127, 134, .1); }
:root {
  --lx-card: linear-gradient(180deg, #ffffff, #f8f8f6);
  --lx-hi: inset 0 1px 0 rgba(255, 255, 255, .9);
  --lx-e1: var(--lx-hi), 0 0 0 1px rgba(16, 16, 20, .06), 0 1px 2px rgba(16, 16, 20, .05), 0 6px 16px -8px rgba(16, 16, 20, .14);
  --lx-e2: var(--lx-hi), 0 0 0 1px rgba(16, 16, 20, .06), 0 2px 4px rgba(16, 16, 20, .04), 0 16px 36px -14px rgba(16, 16, 20, .24);
  --lx-paper: #fffdf8;
  --lx-well: inset 0 1px 2px rgba(16, 16, 20, .08), inset 0 0 0 1px rgba(16, 16, 20, .07);
  --lx-right: #1f9d55; --lx-wrong: #d93a3a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --lx-card: linear-gradient(180deg, #1a1a1d, #141416); --lx-hi: inset 0 1px 0 rgba(255, 255, 255, .06); --lx-e1: var(--lx-hi), 0 0 0 1px rgba(255, 255, 255, .07), 0 6px 16px -8px rgba(0, 0, 0, .7); --lx-e2: var(--lx-hi), 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 40px -14px rgba(0, 0, 0, .8); --lx-paper: #17171a; --lx-well: inset 0 1px 3px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .07); --lx-right: #4ade80; --lx-wrong: #ff6b6b; }
  :root:not([data-theme="light"]) .ex-ielts { --ex: #ff4d5e; --ex-2: #ff8a6b; --ex-ink: #ff9aa5; --ex-soft: rgba(255, 77, 94, .14); }
  :root:not([data-theme="light"]) .ex-toefl { --ex: #19b3a6; --ex-2: #5eead4; --ex-ink: #7ff0dc; --ex-soft: rgba(45, 212, 191, .13); }
}
:root[data-theme="dark"] { --lx-card: linear-gradient(180deg, #1a1a1d, #141416); --lx-hi: inset 0 1px 0 rgba(255, 255, 255, .06); --lx-e1: var(--lx-hi), 0 0 0 1px rgba(255, 255, 255, .07), 0 6px 16px -8px rgba(0, 0, 0, .7); --lx-e2: var(--lx-hi), 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 40px -14px rgba(0, 0, 0, .8); --lx-paper: #17171a; --lx-well: inset 0 1px 3px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .07); --lx-right: #4ade80; --lx-wrong: #ff6b6b; }
:root[data-theme="dark"] .ex-ielts { --ex: #ff4d5e; --ex-2: #ff8a6b; --ex-ink: #ff9aa5; --ex-soft: rgba(255, 77, 94, .14); }
:root[data-theme="dark"] .ex-toefl { --ex: #19b3a6; --ex-2: #5eead4; --ex-ink: #7ff0dc; --ex-soft: rgba(45, 212, 191, .13); }
.ex-ielts .page-head::after, .ex-toefl .page-head::after { background: var(--ex); }
.ex-ielts .kicker i, .ex-toefl .kicker i { background: var(--ex); }

/* stage: the dark, lit panel at the top of each exam page */
.lx-stage { position: relative; margin-top: 30px; padding: 28px 30px 0; border-radius: 20px; color: #ececf1; overflow: hidden; isolation: isolate;
  background: radial-gradient(900px 380px at 88% -20%, color-mix(in srgb, var(--ex) 52%, transparent), transparent 62%), radial-gradient(520px 260px at -5% 115%, color-mix(in srgb, var(--ex-2) 26%, transparent), transparent 70%), linear-gradient(180deg, #18181c, #0c0c0e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 40px 80px -36px rgba(0, 0, 0, .55), 0 14px 28px -18px rgba(0, 0, 0, .4); }
.lx-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(ellipse 70% 90% at 75% 0%, #000, transparent 75%); }
.lx-stage-glow { position: absolute; z-index: -1; width: 340px; height: 340px; right: -60px; top: -170px; border-radius: 50%; background: var(--ex); filter: blur(90px); opacity: .35; animation: lx-breathe 9s ease-in-out infinite; }
@keyframes lx-breathe { 50% { opacity: .2; transform: translateX(-40px) scale(1.15); } }
.lx-stage-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.lx-eyebrow { margin: 0; font: 500 10.5px/1 var(--mono); letter-spacing: .16em; color: rgba(255, 255, 255, .5); text-transform: uppercase; }
.lx-eyebrow.dark { color: var(--faint); }
.lx-stage-title { margin: 12px 0 0; font: 400 clamp(34px, 4.4vw, 50px)/1 var(--serif); letter-spacing: -.02em; color: #fff; }
:root[data-lang="zh"] .lx-stage-title { font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); }
.lx-stage-title em { font-style: italic; background: linear-gradient(180deg, #fff 10%, var(--ex-2)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.lx-tests { display: flex; gap: 8px; flex-wrap: wrap; }
.lx-tests button, .lx-eras button { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 14px; border-radius: 11px; color: #e4e4e8; font-weight: 500; background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 14px -8px rgba(0, 0, 0, .6); transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.lx-tests button small { font: 500 9px var(--mono); letter-spacing: .12em; color: rgba(255, 255, 255, .45); }
.lx-tests button:hover, .lx-eras button:hover { transform: translateY(-2px); background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05)); }
.lx-tests button[aria-pressed="true"], .lx-eras button[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, var(--ex-2), var(--ex)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 22px -8px var(--ex); }
.lx-tests button[aria-pressed="true"] small { color: rgba(255, 255, 255, .78); }

/* IELTS bookshelf */
.lx-shelf { display: flex; align-items: flex-end; gap: 5px; padding: 40px 4px 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .22) transparent; perspective: 1100px; }
.lx-shelf .skeleton { flex: 1; border: 0; }
.lx-spine { --c: #8e1b2c; --t: #f6e7d6; position: relative; flex: none; width: 46px; height: 164px; border-radius: 4px 4px 2px 2px; display: flex; flex-direction: column; align-items: center; padding: 10px 0 9px; color: var(--t); transform-origin: bottom center;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000) 0, var(--c) 16%, color-mix(in srgb, var(--c) 82%, #fff) 34%, var(--c) 58%, color-mix(in srgb, var(--c) 62%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset -3px 0 6px rgba(0, 0, 0, .3), 0 -2px 10px -4px rgba(0, 0, 0, .5); transition: transform .45s var(--ease), box-shadow .45s var(--ease), filter .3s; animation: lx-spine-in .7s var(--ease) both; animation-delay: calc(var(--d, 0) * 24ms); }
@keyframes lx-spine-in { from { transform: translateY(40px); opacity: 0; } }
.lx-spine:nth-child(6n+2) { --c: #1f2c4f; --t: #dfe6ff; } .lx-spine:nth-child(6n+3) { --c: #e5dccb; --t: #3a2d1e; } .lx-spine:nth-child(6n+4) { --c: #1f4a3c; --t: #dff3e8; }
.lx-spine:nth-child(6n+5) { --c: #2c2f38; --t: #e6e6ea; } .lx-spine:nth-child(6n) { --c: #9a6420; --t: #fff2df; }
.lx-spine:nth-child(4n+1) { height: 172px; } .lx-spine:nth-child(5n+3) { height: 156px; } .lx-spine:nth-child(7n+2) { height: 178px; }
.lx-spine::before, .lx-spine::after { content: ""; position: absolute; left: 6px; right: 6px; height: 2px; border-radius: 1px; background: currentColor; opacity: .45; }
.lx-spine::before { top: 30px; } .lx-spine::after { bottom: 44px; }
.lx-spine-top { font: 500 7px/1 var(--mono); letter-spacing: .14em; opacity: .7; writing-mode: vertical-rl; transform: rotate(180deg); margin-top: 26px; height: 58px; overflow: hidden; }
.lx-spine-name { font: italic 400 15px/1 var(--serif); writing-mode: vertical-rl; transform: rotate(180deg); margin-top: 6px; letter-spacing: .04em; }
.lx-spine b { margin-top: auto; font: 400 22px/1 var(--serif); }
.lx-spine-foot { font: 500 7px/1 var(--mono); letter-spacing: .08em; opacity: .55; margin-top: 4px; }
.lx-spine:hover { transform: translateY(-8px) rotateX(4deg); filter: brightness(1.08); }
.lx-spine[aria-pressed="true"] { transform: translateY(-22px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset -3px 0 6px rgba(0, 0, 0, .3), 0 22px 30px -12px rgba(0, 0, 0, .8), 0 0 0 2px var(--ex-2), 0 0 28px -2px var(--ex); }
.lx-plank { height: 16px; margin: 0 -30px; background: linear-gradient(180deg, #34343a, #1b1b1f 40%, #111113); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 -12px 24px -10px rgba(0, 0, 0, .7); position: relative; }

/* stats + tabs */
.lx-statrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 30px 0 26px; }
.lx-stat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; border-radius: 16px; background: var(--lx-card); box-shadow: var(--lx-e1); min-height: 116px; overflow: hidden; animation: enter .6s var(--ease) both; }
.lx-stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--ex-soft); filter: blur(4px); }
.lx-stat .k { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.lx-stat b { font: 400 40px/1 var(--serif); color: var(--ink); letter-spacing: -.02em; margin-top: 6px; }
.lx-stat b small { font-size: 20px; color: var(--faint); margin-left: 2px; }
.lx-stat .s { font-size: 12.5px; color: var(--muted); }
.lx-stat.muted b { color: var(--faint); }
.lx-stat.ghost { background: linear-gradient(90deg, transparent, var(--bg-hover), transparent); background-size: 200% 100%; box-shadow: var(--lx-e1); animation: shimmer 1.4s infinite linear; }
.lx-stat .lx-btn { align-self: flex-start; margin: 8px 0 4px; position: relative; z-index: 1; }
.lx-meter { margin-top: auto; height: 5px; border-radius: 99px; background: var(--bg-active); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .08); overflow: hidden; }
.lx-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ex-2), var(--ex)); box-shadow: 0 0 10px var(--ex-soft); transition: width 1.2s var(--ease); }
.lx-tabs { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 4px; border-radius: 13px; background: var(--bg-side); box-shadow: var(--lx-well); margin-bottom: 18px; max-width: 100%; }
.lx-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 13.5px; transition: color .2s, background .2s, box-shadow .25s, transform .2s; }
.lx-tabs button:hover { color: var(--ink); }
.lx-tabs button small { font: 500 10.5px var(--mono); padding: 2px 7px; border-radius: 99px; background: var(--bg-active); color: var(--muted); max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-tabs button[aria-selected="true"] { color: var(--ink); background: var(--lx-card); box-shadow: var(--lx-e1); }
.lx-tabs button[aria-selected="true"] small { background: var(--ex-soft); color: var(--ex-ink); }

/* reading split: passage on paper, questions beside it */
.lx-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.lx-paper { position: sticky; top: 62px; max-height: calc(calc(100vh / var(--zoom, 1)) - 82px); overflow: auto; border-radius: 16px; background: var(--lx-paper); box-shadow: var(--lx-e2); scrollbar-width: thin; }
.lx-paper::before { content: ""; position: sticky; top: 0; display: block; height: 4px; background: linear-gradient(90deg, var(--ex), var(--ex-2)); z-index: 1; }
.lx-paper-in { padding: 26px 32px 36px; }
.lx-paper h3 { margin: 10px 0 18px; font: 400 30px/1.15 var(--serif); color: var(--ink); letter-spacing: -.01em; }
.lx-paper p { margin: 0 0 14px; font: 15.5px/1.85 Georgia, "Noto Serif SC", "Songti SC", serif; color: var(--text); }
.lx-paper p.lx-eyebrow { font: 500 10.5px/1 var(--mono); }
.lx-para { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 9px; padding: 0 5px; border-radius: 6px; font: 600 11px/1 var(--mono); color: #fff; background: linear-gradient(180deg, var(--ex-2), var(--ex)); box-shadow: 0 3px 8px -3px var(--ex); vertical-align: 2px; }
.lx-qcol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lx-tools { position: sticky; top: 56px; z-index: 6; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px; border-radius: 15px; background: color-mix(in srgb, var(--bg-raise) 86%, transparent); backdrop-filter: blur(14px) saturate(1.4); box-shadow: var(--lx-e2); }
.lx-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px; font-weight: 500; font-size: 13px; color: var(--ink); background: var(--lx-card); box-shadow: var(--lx-e1); transition: transform .2s var(--ease), box-shadow .2s, background .2s; white-space: nowrap; }
.lx-btn svg { width: 15px; height: 15px; }
.lx-btn:hover { transform: translateY(-1px); box-shadow: var(--lx-e2); }
.lx-btn:active { transform: translateY(1px); }
.lx-btn.primary { color: #fff; background: linear-gradient(180deg, var(--ex-2), var(--ex)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px -8px var(--ex); }
.lx-btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.lx-btn.ghost:hover { color: var(--ink); background: var(--bg-hover); }
.lx-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.lx-score { margin-left: auto; display: inline-flex; align-items: baseline; gap: 6px; font: 400 26px/1 var(--serif); color: var(--muted); padding-right: 6px; animation: pop .3s var(--ease); }
.lx-score[hidden] { display: none; }
.lx-score b { font-weight: 400; color: var(--ex); font-size: 32px; }
.lx-score small { font: 11px var(--mono); color: var(--faint); letter-spacing: .02em; }

/* question groups */
.lx-group { position: relative; padding: 18px 20px 14px; border-radius: 16px; background: var(--lx-card); box-shadow: var(--lx-e1); animation: row-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.lx-ghead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lx-range { font: 600 12px var(--mono); padding: 4px 10px; border-radius: 8px; color: var(--ex-ink); background: var(--ex-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ex) 22%, transparent); }
.lx-type { font-size: 12px; color: var(--muted); font-weight: 500; }
.lx-instr { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; }
.lx-shared { margin-top: 12px; padding: 12px 14px; border-radius: 11px; background: var(--bg); box-shadow: var(--lx-well); white-space: pre-wrap; font-size: 13.5px; line-height: 1.75; color: var(--text); }
.lx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.lx-legend b { font: 600 11px var(--mono); color: var(--ink); margin-right: 6px; }
.lx-optbox { margin-top: 12px; display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--bg); box-shadow: var(--lx-well); }
.lx-optbox div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13.5px; }
.lx-optbox b { font: 600 11.5px var(--mono); text-align: center; padding: 2px 0; border-radius: 6px; background: var(--lx-card); box-shadow: var(--lx-e1); color: var(--ink); }
.lx-items { list-style: none; padding: 0; margin: 12px 0 0; }
.lx-items.compact .lx-item { display: inline-grid; grid-template-columns: 32px auto; margin-right: 14px; border-top: 0; padding: 6px 0; }
.lx-items.compact { border-top: 1px dashed var(--line-strong); padding-top: 8px; }
.lx-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-top: 1px dashed var(--line-strong); }
.lx-no { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font: 600 12px var(--mono); color: var(--ink); background: var(--lx-card); box-shadow: var(--lx-e1); transition: background .25s, color .25s; }
.lx-item.right .lx-no { background: var(--lx-right); color: #fff; box-shadow: 0 6px 14px -6px var(--lx-right); }
.lx-item.wrong .lx-no { background: var(--lx-wrong); color: #fff; box-shadow: 0 6px 14px -6px var(--lx-wrong); }
.lx-body { min-width: 0; }
.lx-stem { margin: 4px 0 0; color: var(--ink); font-size: 14px; line-height: 1.65; }
.lx-stem.big { font-size: 15px; font-weight: 500; margin-top: 12px; }
.lx-gap { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; margin: 0 2px; border-radius: 5px; font: 600 11px/1 var(--mono); color: var(--ex-ink); background: var(--ex-soft); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--ex) 40%, transparent); }
.lx-resp { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.lx-in { width: min(260px, 100%); height: 34px; padding: 0 12px; border: 0; border-radius: 10px; outline: none; background: var(--bg); box-shadow: var(--lx-well); color: var(--ink); transition: box-shadow .2s; }
.lx-in:focus { box-shadow: var(--lx-well), 0 0 0 3px var(--ex-soft), 0 0 0 1px var(--ex); }
.lx-item.right .lx-in { box-shadow: var(--lx-well), 0 0 0 1.5px var(--lx-right); }
.lx-item.wrong .lx-in { box-shadow: var(--lx-well), 0 0 0 1.5px var(--lx-wrong); }
.lx-peek { font: 500 11px var(--mono); letter-spacing: .06em; color: var(--faint); padding: 6px 8px; border-radius: 7px; }
.lx-peek:hover { color: var(--ink); background: var(--bg-hover); }
.lx-key { display: none; margin-top: 10px; padding: 10px 13px; border-radius: 11px; background: color-mix(in srgb, var(--lx-right) 8%, var(--bg-raise)); box-shadow: inset 3px 0 0 var(--lx-right), var(--lx-e1); font-size: 13.5px; animation: enter .35s var(--ease); }
.show > .lx-body > .lx-key, .lx-tq.show > .lx-key { display: block; }
.lx-key-v { font-weight: 600; color: var(--ink); margin-right: 8px; }
.lx-key em { color: var(--faint); font-weight: 400; }
.lx-key details { margin-top: 6px; }
.lx-key summary { cursor: pointer; font: 500 11px var(--mono); letter-spacing: .06em; color: var(--muted); }
.lx-key details p { margin: 8px 0 2px; color: var(--text); line-height: 1.75; white-space: pre-wrap; }
.lx-mc { display: grid; gap: 7px; margin-top: 12px; }
.lx-mc.row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lx-opt { display: flex; align-items: flex-start; gap: 11px; padding: 10px 12px; text-align: left; border-radius: 11px; background: var(--lx-card); box-shadow: var(--lx-e1); font-size: 13.5px; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.lx-opt b { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font: 600 11px var(--mono); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: all .2s; }
.lx-opt span { padding-top: 2px; }
.lx-opt:hover { transform: translateY(-1px); box-shadow: var(--lx-e2); }
.lx-opt.picked { background: var(--ex-soft); box-shadow: inset 0 0 0 1.5px var(--ex), 0 8px 18px -10px var(--ex); color: var(--ink); }
.lx-opt.picked b { color: #fff; background: linear-gradient(180deg, var(--ex-2), var(--ex)); box-shadow: 0 3px 8px -2px var(--ex); }
.lx-tq.graded .lx-opt { cursor: default; transform: none; }
.lx-tq.graded .lx-opt.is-key { box-shadow: inset 0 0 0 1.5px var(--lx-right); background: color-mix(in srgb, var(--lx-right) 9%, transparent); }
.lx-tq.graded .lx-opt.is-key b { background: var(--lx-right); color: #fff; box-shadow: none; }
.lx-tq.graded .lx-opt.picked:not(.is-key) { box-shadow: inset 0 0 0 1.5px var(--lx-wrong); background: color-mix(in srgb, var(--lx-wrong) 8%, transparent); }
.lx-tq.graded .lx-opt.picked:not(.is-key) b { background: var(--lx-wrong); }
.lx-mark { margin-left: auto; }
.lx-tq.right .lx-mark::after, .lx-tq.wrong .lx-mark::after { font: 600 11px var(--mono); padding: 3px 9px; border-radius: 99px; color: #fff; }
.lx-tq.right .lx-mark::after { content: "✓"; background: var(--lx-right); }
.lx-tq.wrong .lx-mark::after { content: "✗"; background: var(--lx-wrong); }
.lx-tq.right { box-shadow: inset 3px 0 0 var(--lx-right), var(--lx-e1); }
.lx-tq.wrong { box-shadow: inset 3px 0 0 var(--lx-wrong), var(--lx-e1); }
.lx-insert { margin: 12px 0 0; padding: 12px 16px; border-radius: 0 11px 11px 0; background: var(--ex-soft); box-shadow: inset 3px 0 0 var(--ex); font: italic 16px/1.6 Georgia, "Noto Serif SC", serif; color: var(--ink); }
.lx-table-wrap { overflow-x: auto; margin-top: 12px; border-radius: 12px; box-shadow: var(--lx-e1); background: var(--bg-raise); }
.lx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lx-table th, .lx-table td { padding: 9px 11px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.lx-table tr:first-child td, .lx-table th { background: var(--bg-side); font-weight: 600; color: var(--ink); }
.lx-tcell { text-align: center !important; vertical-align: middle !important; }
.lx-tcell i { display: inline-block; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.lx-tq.show .lx-tcell[data-ok="true"] i { background: var(--lx-right); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lx-right) 20%, transparent); }
.lx-fig { margin: 12px 0 0; }
.lx-fig img { max-width: 100%; border-radius: 12px; background: #fff; box-shadow: var(--lx-e1); }
.lx-fig figcaption { font: 10.5px var(--mono); color: var(--faint); margin-top: 6px; }
.lx-note { font-size: 12.5px; color: var(--faint); font-style: italic; margin: 10px 0 0; }

/* audio player */
.lx-listen { display: flex; flex-direction: column; gap: 18px; }
.lx-listen > .lx-player { position: sticky; top: 58px; z-index: 7; }
.lx-listen .lx-tools { position: static; }
.lx-player { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; border-radius: 18px; color: #f2f2f5;
  background: radial-gradient(400px 120px at 0% 0%, color-mix(in srgb, var(--ex) 38%, transparent), transparent 70%), linear-gradient(180deg, #1d1d22, #111114);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 22px 44px -22px rgba(0, 0, 0, .6); }
.lx-play { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, var(--ex-2), var(--ex)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 24px -8px var(--ex); transition: transform .2s var(--ease); }
.lx-play:hover { transform: scale(1.05); } .lx-play:active { transform: scale(.96); }
.lx-play svg { width: 22px; height: 22px; }
.lx-play .i-pause, .lx-player.playing .lx-play .i-play { display: none; }
.lx-player.playing .lx-play .i-pause { display: block; }
.lx-player.playing .lx-play { animation: lx-ring 2s infinite; }
@keyframes lx-ring { 0% { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 0 color-mix(in srgb, var(--ex) 55%, transparent); } 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 14px transparent; } }
.lx-pmain { min-width: 0; }
.lx-plabel { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.lx-plabel b { font-weight: 600; font-size: 14px; white-space: nowrap; }
.lx-plabel span { font: 11px var(--mono); color: rgba(255, 255, 255, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-plabel .lx-time { margin-left: auto; color: rgba(255, 255, 255, .75); flex: none; }
.lx-wave { display: flex; align-items: center; gap: 2px; height: 40px; margin-top: 8px; cursor: pointer; outline-offset: 4px; }
.lx-wave i { flex: 1; min-width: 1px; border-radius: 2px; background: rgba(255, 255, 255, .16); transition: background .25s; }
.lx-wave i.on { background: linear-gradient(180deg, var(--ex-2), var(--ex)); }
.lx-wave:hover i:not(.on) { background: rgba(255, 255, 255, .24); }
.lx-rate { font: 500 11px var(--mono); padding: 6px 10px; border-radius: 8px; color: #e4e4e8; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.lx-player.err { opacity: .6; }

/* TOEFL stage */
.lx-search { display: flex; align-items: center; gap: 12px; width: min(440px, 100%); height: 50px; padding: 0 16px; border-radius: 14px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 24px -14px rgba(0, 0, 0, .7); transition: box-shadow .2s; }
.lx-search:focus-within { box-shadow: inset 0 0 0 1px var(--ex-2), 0 0 0 4px color-mix(in srgb, var(--ex) 30%, transparent); }
.lx-search svg { color: rgba(255, 255, 255, .7); }
.lx-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: #fff; font: 400 19px var(--serif); }
.lx-search input::placeholder { color: rgba(255, 255, 255, .38); }
.lx-search .spin { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .2); border-top-color: var(--ex-2); animation: spin .7s linear infinite; visibility: hidden; }
.lx-search.loading .spin { visibility: visible; }
.lx-hits { margin-top: 18px; border-radius: 14px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); max-height: 360px; overflow: auto; animation: enter .35s var(--ease); }
.lx-hits[hidden] { display: none; }
.lx-hits-head { position: sticky; top: 0; display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; font: 11px var(--mono); color: rgba(255, 255, 255, .55); background: #141417; z-index: 1; }
.lx-hits-head b { color: #fff; font-weight: 500; }
.lx-hits-head .icon-btn { margin-left: auto; color: rgba(255, 255, 255, .6); }
.lx-hit { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; padding: 10px 16px; text-align: left; color: #dadade; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 13px; transition: background .15s; }
.lx-hit:hover { background: rgba(255, 255, 255, .06); }
.lx-hit.empty { display: block; color: rgba(255, 255, 255, .5); }
.lx-hit-id { font: 600 12px var(--mono); color: #fff; }
.lx-hit-id small { display: block; font-weight: 400; color: rgba(255, 255, 255, .45); margin-top: 2px; }
.lx-hit-snip { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lx-hit mark { background: color-mix(in srgb, var(--ex) 35%, transparent); color: #fff; border-bottom-color: var(--ex-2); }
.lx-hit .tag { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .6); }
.lx-eras { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 14px; }
.lx-eras button { flex-direction: row; padding: 6px 13px; font: 500 12px var(--mono); }
.lx-tpos { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 10px; padding-bottom: 30px; }
.lx-tpos .skeleton { grid-column: 1 / -1; border: 0; }
.lx-tpo { display: flex; flex-direction: column; align-items: flex-start; padding: 9px 10px 10px; min-height: 86px; border-radius: 13px; text-align: left; color: #fff; background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .025)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 20px -12px rgba(0, 0, 0, .7); transition: transform .3s var(--ease), box-shadow .3s, background .3s; animation: lx-spine-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms); }
.lx-tpo small { font: 500 9px var(--mono); letter-spacing: .14em; color: rgba(255, 255, 255, .45); }
.lx-tpo > b { font: 400 32px/1 var(--serif); letter-spacing: -.02em; margin-top: 2px; }
.lx-bars { display: flex; gap: 3px; width: 100%; margin-top: auto; }
.lx-bars i { flex: 1; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--ex-2) calc(var(--v, 0) * 100%), rgba(255, 255, 255, .13) 0); }
.lx-tpo:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px color-mix(in srgb, var(--ex-2) 60%, transparent), 0 16px 26px -12px rgba(0, 0, 0, .8); }
.lx-tpo[aria-pressed="true"] { background: linear-gradient(160deg, var(--ex-2), var(--ex)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 16px 30px -10px var(--ex); transform: translateY(-4px); }
.lx-tpo[aria-pressed="true"] small { color: rgba(255, 255, 255, .75); }
.lx-tpo[aria-pressed="true"] .lx-bars i { background: linear-gradient(90deg, #fff calc(var(--v, 0) * 100%), rgba(255, 255, 255, .3) 0); }

/* TOEFL set + items */
.lx-hint { display: flex; gap: 16px; align-items: center; margin-top: 30px; padding: 22px 24px; border-radius: 16px; background: var(--lx-card); box-shadow: var(--lx-e1); }
.lx-hint > svg { width: 42px; height: 42px; padding: 10px; border-radius: 12px; color: #fff; background: linear-gradient(180deg, var(--ex-2), var(--ex)); box-shadow: 0 8px 18px -8px var(--ex); }
.lx-hint b { display: block; color: var(--ink); font-size: 15px; }
.lx-hint span { color: var(--muted); font-size: 13px; }
.lx-sechead { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 36px 0 14px; }
.lx-sechead h2 { margin: 0; font: 400 44px/1 var(--serif); color: var(--ink); letter-spacing: -.02em; display: flex; align-items: baseline; gap: 12px; }
.lx-sechead h2 small { font: 11px var(--mono); color: var(--faint); letter-spacing: .08em; }
.lx-sechead .lx-tabs { margin: 0; }
#tx-body { scroll-margin-top: 60px; }
.lx-items-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }
.lx-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 120px; max-width: 280px; padding: 11px 16px; border-radius: 13px; text-align: left; background: var(--lx-card); box-shadow: var(--lx-e1); transition: transform .25s var(--ease), box-shadow .25s; }
.lx-chip small { font: 500 10px var(--mono); letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.lx-chip span { font-weight: 500; color: var(--ink); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lx-chip:hover { transform: translateY(-2px); box-shadow: var(--lx-e2); }
.lx-chip[aria-pressed="true"] { background: linear-gradient(180deg, color-mix(in srgb, var(--ex) 10%, var(--bg-raise)), var(--bg-raise)); box-shadow: inset 0 0 0 1.5px var(--ex), 0 12px 24px -12px var(--ex); }
.lx-chip[aria-pressed="true"] small { color: var(--ex-ink); }
.lx-task { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.lx-task .lx-paper { position: static; max-height: 420px; }
.lx-prompt { position: relative; padding: 22px 26px; border-radius: 18px; background: var(--lx-card); box-shadow: var(--lx-e2); overflow: hidden; }
.lx-prompt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--ex-2), var(--ex)); }
.lx-prompt p { margin: 10px 0 0; font: 400 24px/1.4 var(--serif); color: var(--ink); letter-spacing: -.005em; }
:root[data-lang="zh"] .lx-prompt p { font-size: 22px; }
.lx-timer { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.lx-tval { font: 12px var(--mono); color: var(--muted); }
.lx-tval b { font: 400 30px/1 var(--serif); color: var(--ex); margin-right: 6px; }
.lx-timer[data-phase="talk"] .lx-tval b { color: var(--lx-wrong); }
.lx-script { padding: 14px 20px; border-radius: 14px; background: var(--lx-card); box-shadow: var(--lx-e1); }
.lx-script summary { cursor: pointer; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lx-script p { margin: 10px 0 0; line-height: 1.8; color: var(--text); }
.lx-draft { position: relative; }
.lx-draft textarea { width: 100%; min-height: 280px; resize: vertical; padding: 18px 20px 34px; border: 0; border-radius: 16px; outline: none; background: var(--lx-paper); box-shadow: var(--lx-well); color: var(--ink); font: 15px/1.85 Georgia, "Noto Serif SC", serif; }
.lx-draft textarea:focus { box-shadow: var(--lx-well), 0 0 0 3px var(--ex-soft); }
.lx-wc { position: absolute; right: 16px; bottom: 12px; font: 11px var(--mono); color: var(--faint); }
.lx-open { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.lx-card { padding: 18px 20px; border-radius: 16px; background: var(--lx-card); box-shadow: var(--lx-e1); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.lx-card h3 { margin: 0; font: 400 28px/1 var(--serif); color: var(--ink); }
.lx-card p { margin: 0; color: var(--muted); font-size: 13px; }

@media (max-width: 1080px) {
  .lx-split { grid-template-columns: minmax(0, 1fr); }
  .lx-paper { position: static; max-height: calc(62vh / var(--zoom, 1)); }
}
@media (max-width: 820px) {
  .lx-stage { padding: 22px 16px 0; border-radius: 16px; margin-top: 22px; }
  .lx-plank { margin: 0 -16px; }
  .lx-stage-head { flex-direction: column; align-items: stretch; }
  .lx-spine { width: 38px; height: 140px !important; }
  .lx-statrow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lx-stat b { font-size: 32px; }
  .lx-paper-in { padding: 20px 18px 26px; }
  .lx-player { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
  .lx-play { width: 46px; height: 46px; }
  .lx-rate { display: none; }
  .lx-hit { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .lx-mc.row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-sechead h2 { font-size: 34px; }
  .lx-tools { top: 52px; }
  .lx-score { margin-left: 0; width: 100%; }
}

/* ---------- Language exams: download dock, book pages, recorder ---------- */
.lx-dl { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--lx-card); box-shadow: var(--lx-e1); }
.lx-dl-k { display: inline-flex; align-items: center; gap: 7px; flex: none; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.lx-dl-k svg { width: 15px; height: 15px; color: var(--ex); }
.lx-dl-row { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.lx-dlb { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 13px 7px 30px; border-radius: 11px; text-align: left; color: var(--ink); background: var(--bg); box-shadow: var(--lx-hi), 0 0 0 1px var(--line), 0 2px 6px -3px rgba(0, 0, 0, .12); transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.lx-dlb::before { content: ""; position: absolute; left: 11px; top: 50%; width: 11px; height: 11px; margin-top: -6px; background: var(--ex); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v13M6 10l6 6 6-6M4 21h16'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v13M6 10l6 6 6-6M4 21h16'/%3E%3C/svg%3E") center / contain no-repeat; }
.lx-dlb[target]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E"); }
.lx-dlb b { font-weight: 500; font-size: 13px; white-space: nowrap; }
.lx-dlb small { font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; }
.lx-dlb:hover { transform: translateY(-2px); background: var(--bg-raise); box-shadow: var(--lx-hi), 0 0 0 1px color-mix(in srgb, var(--ex) 45%, transparent), 0 10px 20px -10px var(--ex); }
.lx-dlb.small { padding: 5px 11px 5px 27px; }
.lx-dlb.busy { pointer-events: none; opacity: .8; }
.lx-dlb.busy::before { -webkit-mask: none; mask: none; border-radius: 50%; background: none; border: 1.5px solid var(--line-strong); border-top-color: var(--ex); animation: spin .7s linear infinite; box-sizing: border-box; }
.lx-dlb.done { box-shadow: var(--lx-hi), 0 0 0 1.5px var(--lx-right); }
.lx-dlb.done::before { background: var(--lx-right); }
.lx-dlb.fail { box-shadow: var(--lx-hi), 0 0 0 1.5px var(--lx-wrong); }
.lx-dlb.fail small::after { content: " · " attr(title); color: var(--lx-wrong); }
.lx-wside .lx-dl { flex-direction: column; align-items: stretch; gap: 10px; margin: 0; }
.lx-wside .lx-dl-row { flex-direction: column; }
.lx-wside .lx-dlb { width: 100%; }

.lx-wtask { margin-bottom: 22px; padding: 20px 22px 22px; border-radius: 18px; background: var(--lx-card); box-shadow: var(--lx-e2); position: relative; overflow: hidden; }
.lx-wtask::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--ex), var(--ex-2)); }
.lx-whead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.lx-whead h3 { margin: 8px 0 0; font: 400 30px/1 var(--serif); color: var(--ink); letter-spacing: -.01em; }
.lx-whead p { margin: 8px 0 0; color: var(--muted); font-size: 13px; max-width: 620px; }
.lx-wgrid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.lx-wgrid.solo { grid-template-columns: minmax(0, 1fr); }
.lx-wside { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: sticky; top: 64px; }
.lx-wside .lx-card { box-shadow: var(--lx-e1); }
.lx-page { border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .06), 0 22px 44px -22px rgba(0, 0, 0, .35); min-height: 200px; position: relative; }
.lx-page::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 40px rgba(0, 0, 0, .04); }
.lx-page canvas { display: block; width: 100%; height: auto; }
.lx-page .lx-note { padding: 20px; color: #6e6e73; }
.lx-page-load { padding: 14px; }
.lx-page-load .skeleton { margin: 0; border: 0; }
.lx-page-load span { display: block; margin-top: 8px; font: 11px var(--mono); color: #a1a1a6; }
.lx-pagetext { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg); box-shadow: var(--lx-well); }
.lx-pagetext summary { cursor: pointer; font: 500 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
.lx-pagetext pre { margin: 10px 0 2px; white-space: pre-wrap; word-break: break-word; font: 13px/1.7 var(--sans); color: var(--text); max-height: 320px; overflow: auto; }
.lx-pager { display: flex; align-items: center; gap: 8px; }
.lx-pager .lx-in { width: 64px; text-align: center; }
.lx-pager .lx-btn { width: 36px; justify-content: center; padding: 0; font-size: 18px; }
.lx-pgof { font: 12px var(--mono); color: var(--faint); }
.lx-draft textarea { min-height: 340px; }
.lx-wc.ok { color: var(--lx-right); }

.lx-rec { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: 14px; }
.lx-recbtn { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 16px 0 12px; border-radius: 99px; font-weight: 500; font-size: 13px; color: var(--ink); background: var(--lx-card); box-shadow: var(--lx-e1); transition: transform .2s var(--ease), box-shadow .2s; }
.lx-recbtn:hover { transform: translateY(-1px); box-shadow: var(--lx-e2); }
.lx-recbtn i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8a8a, #e11d48); box-shadow: 0 0 0 3px rgba(225, 29, 72, .15); }
.lx-rec.on .lx-recbtn { color: #fff; background: linear-gradient(180deg, #f43f5e, #be123c); box-shadow: 0 10px 22px -8px #e11d48; }
.lx-rec.on .lx-recbtn i { border-radius: 3px; background: #fff; box-shadow: none; animation: lx-blink 1s steps(1) infinite; }
@keyframes lx-blink { 50% { opacity: .35; } }
.lx-rectime { font: 12px var(--mono); color: var(--muted); }
.lx-rec.on .lx-rectime { color: #e11d48; }
.lx-rec audio { width: 100%; height: 36px; }
.lx-prompt .lx-rec { margin-top: 16px; }

@media (max-width: 960px) {
  .lx-wgrid { grid-template-columns: minmax(0, 1fr); }
  .lx-wside { position: static; }
}
@media (max-width: 820px) {
  .lx-dl { flex-direction: column; align-items: stretch; }
  .lx-whead h3 { font-size: 26px; }
  .lx-wtask { padding: 16px 14px; }
}

/* ---------- Grade thresholds ---------- */
/* Grade lines: one-hue ordinal ramp (g1 lowest grade → g5 top grade), categorical c1–c5 for paper comparison.
   Both validated with the dataviz palette checks, light on #fff and dark on #131315. */
.ex-gt { --ex: #2a78d6; --ex-2: #5598e7; --ex-ink: #1c5cab; --ex-soft: rgba(42, 120, 214, .1);
  --g1: #86b6ef; --g2: #5598e7; --g3: #2a78d6; --g4: #1c5cab; --g5: #0d366b;
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --gt-surface: #ffffff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ex-gt { --ex: #3987e5; --ex-2: #86b6ef; --ex-ink: #86b6ef; --ex-soft: rgba(57, 135, 229, .15);
    --g1: #1c5cab; --g2: #2a78d6; --g3: #5598e7; --g4: #86b6ef; --g5: #cde2fb;
    --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --gt-surface: #131315; }
}
:root[data-theme="dark"] .ex-gt { --ex: #3987e5; --ex-2: #86b6ef; --ex-ink: #86b6ef; --ex-soft: rgba(57, 135, 229, .15);
  --g1: #1c5cab; --g2: #2a78d6; --g3: #5598e7; --g4: #86b6ef; --g5: #cde2fb;
  --c1: #3987e5; --c2: #d95926; --c3: #199e70; --c4: #c98500; --c5: #d55181; --gt-surface: #131315; }

.gt-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 24px 0 28px; }
.gt-subj { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border-radius: 14px; text-align: left; color: #fff; background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .025)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 20px -12px rgba(0, 0, 0, .7); transition: transform .3s var(--ease), box-shadow .3s, background .3s; animation: lx-spine-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 20ms); }
.gt-subj small { font: 500 9.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.gt-subj b { font: 400 22px/1.1 var(--serif); }
:root[data-lang="zh"] .gt-subj b { font-size: 20px; }
.gt-subj span { font: 11px var(--mono); color: rgba(255, 255, 255, .55); display: flex; gap: 8px; align-items: center; }
.gt-subj code { padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, .1); color: #fff; }
.gt-subj:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px color-mix(in srgb, var(--ex-2) 60%, transparent), 0 16px 26px -12px rgba(0, 0, 0, .8); }
.gt-subj[aria-pressed="true"] { background: linear-gradient(160deg, var(--ex-2), var(--ex)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 16px 30px -10px var(--ex); }
.gt-subj[aria-pressed="true"] small, .gt-subj[aria-pressed="true"] span { color: rgba(255, 255, 255, .8); }

.gt-controls { margin: 28px 0 18px; padding: 16px 18px; border-radius: 18px; background: var(--lx-card); box-shadow: var(--lx-e1); display: flex; flex-direction: column; gap: 14px; }
.gt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gt-items { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong); max-height: 230px; overflow: auto; }
.gt-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gt-gname { min-width: 86px; font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.gt-item { min-width: 44px; height: 28px; padding: 0 10px; border-radius: 8px; font: 500 12px var(--mono); color: var(--muted); background: var(--bg); box-shadow: var(--lx-hi), 0 0 0 1px var(--line); transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s; }
.gt-item:hover { color: var(--ink); transform: translateY(-1px); }
.gt-item[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, var(--ex-2), var(--ex)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 14px -8px var(--ex); }
.gt-grade { min-width: 44px; justify-content: center; }

.gt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.gt-stats .lx-stat { min-height: 104px; }
.gt-stats .lx-stat b small { font-size: 18px; }
.gt-stats .lx-stat.up b { color: var(--lx-right); }
.gt-stats .lx-stat.down b { color: var(--lx-wrong); }

.gt-card { position: relative; margin: 0 0 18px; padding: 18px 20px 12px; border-radius: 18px; background: var(--gt-surface); box-shadow: var(--lx-e2); }
.gt-card figcaption { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.gt-card figcaption b { display: block; font: 400 24px/1.15 var(--serif); color: var(--ink); }
.gt-card figcaption span { font: 11.5px var(--mono); color: var(--muted); }
.gt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 12px var(--mono); color: var(--text); }
.gt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gt-legend i { width: 14px; height: 3px; border-radius: 2px; }
.gt-plot { width: 100%; }
.gt-plot svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; stroke: none; stroke-width: 0; }
.gt-plot svg text { stroke: none; }
.gt-hit { stroke: none; }
.gt-grid line { stroke: var(--line); stroke-width: 1; }
.gt-grid text, .gt-xaxis text { font: 11px var(--mono); fill: var(--faint); }
.gt-xaxis line { stroke: var(--line-strong); }
.gt-lines path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gt-ends circle, .gt-isolated circle, .gt-hover circle { stroke: var(--gt-surface); stroke-width: 2; }
.gt-ends text { font: 600 11.5px var(--mono); fill: var(--text); }
.gt-cross { stroke: var(--line-strong); stroke-width: 1; }
.gt-hit { cursor: crosshair; }
.gt-empty { padding: 60px 0; text-align: center; color: var(--faint); }
.gt-tip { position: absolute; z-index: 3; min-width: 190px; padding: 10px 12px; border-radius: 12px; background: var(--bg-raise); box-shadow: var(--shadow); font-size: 12.5px; pointer-events: none; }
.gt-tip b { display: block; margin-bottom: 6px; font-weight: 600; color: var(--ink); }
.gt-tip div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 2px 0; color: var(--text); }
.gt-tip i { width: 10px; height: 3px; border-radius: 2px; }
.gt-tip em { font: normal 500 12px var(--mono); color: var(--ink); }
.gt-tip small { color: var(--faint); margin-left: 4px; }
.gt-tablewrap { margin-bottom: 18px; padding: 12px 18px; border-radius: 14px; background: var(--lx-card); box-shadow: var(--lx-e1); }
.gt-tablewrap summary { cursor: pointer; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.gt-tablewrap .db { margin-top: 10px; }
@media (max-width: 820px) {
  .gt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gt-card { padding: 14px 10px 8px; }
  .gt-gname { min-width: 0; width: 100%; }
  .gt-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 18px 0 22px; }
  .gt-subj { padding: 10px 11px; }
  .gt-subj b { font-size: 17px !important; }
  .gt-subj span { flex-wrap: wrap; gap: 2px 6px; font-size: 10px; }
}

/* ---------- Tracks: sidebar accordion, topbar tabs, home path board ---------- */
.side-nav { margin-bottom: 18px; }
.tracks { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px 8px; scrollbar-width: none; }
.track { border-radius: 9px; transition: background .25s, box-shadow .25s; }
.track.open { background: var(--bg-raise); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.03); }
.track-head { display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 9px; text-align: left; }
.track:not(.open) .track-head:hover { background: var(--bg-hover); }
.track-code { height: 22px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; font: 500 10px/1 var(--mono); letter-spacing: .06em; color: var(--muted); transition: background .25s, color .25s, border-color .25s; }
.track.current .track-code { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.track-name { display: flex; flex-direction: column; min-width: 0; color: var(--ink); font-weight: 500; font-size: 13.5px; line-height: 1.25; }
.track-name small { margin-top: 3px; font: 10.5px/1.2 var(--mono); color: var(--faint); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-head .chev svg { width: 14px; height: 14px; color: var(--faint); transition: transform .35s var(--ease); }
.track.open .track-head .chev svg { transform: rotate(90deg); }
.track-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.track.open .track-body { grid-template-rows: 1fr; }
.track-body > div { overflow: hidden; min-height: 0; }
.track-mods { position: relative; display: flex; flex-direction: column; gap: 1px; margin: 0 8px 0 22px; padding: 2px 0 8px 12px; border-left: 1px solid var(--line-strong); }
.track-mods a, .track-mods .soon { position: relative; display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: var(--radius); color: var(--muted); font-size: 13px; font-weight: 500; transition: background .15s, color .15s; }
.track-mods .idx { font: 10px var(--mono); color: var(--faint); width: 16px; }
.track-mods a:hover { background: var(--bg-hover); color: var(--ink); }
.track-mods a.active { color: var(--ink); background: var(--bg-active); }
.track-mods a.active .idx { color: var(--signal); }
.track-mods a.active::before { content: ""; position: absolute; left: -13px; top: 8px; bottom: 8px; width: 1px; background: var(--signal); box-shadow: 0 0 0 .5px var(--signal); }
.track-mods .soon { color: var(--faint); cursor: default; font-weight: 400; }
.track-mods .soon em { margin-left: auto; font: normal 500 9px/1 var(--mono); letter-spacing: .1em; padding: 3px 5px; border: 1px dashed var(--line-strong); border-radius: 3px; }
.track-chips { display: flex; gap: 6px; margin: 0 8px 10px 34px; }
.track-chips a { font: 500 10px/1 var(--mono); letter-spacing: .06em; padding: 4px 6px; border-radius: 3px; border: 1px solid var(--line-strong); color: var(--muted); transition: border-color .2s, color .2s; }
.track-chips a:hover { border-color: var(--ink); color: var(--ink); }

.track-tabs { display: flex; align-items: center; gap: 2px; margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line); height: 22px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.track-tabs:empty { display: none; }
.track-tabs .tt-code { font: 500 9.5px/1 var(--mono); letter-spacing: .08em; color: var(--faint); margin-right: 6px; }
.track-tabs a { position: relative; flex: none; font-size: 12.5px; color: var(--muted); padding: 3px 9px; border-radius: 5px; transition: color .15s, background .15s; }
.track-tabs a:hover { color: var(--ink); background: var(--bg-hover); }
.track-tabs a.active { color: var(--ink); font-weight: 500; }
.track-tabs a.active::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: -13px; height: 2px; border-radius: 2px; background: var(--signal); }

.paths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.path { position: relative; display: flex; flex-direction: column; padding: 22px 22px 18px; border-right: 1px solid var(--line); min-height: 470px; isolation: isolate; }
.path:first-child { padding-left: 0; }
.path:last-child { border-right: 0; padding-right: 0; }
.path::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.path:hover::before { transform: scaleX(1); }
.path-top { display: flex; justify-content: space-between; gap: 10px; font: 500 10.5px/1 var(--mono); letter-spacing: .1em; color: var(--faint); }
.path-code { display: block; margin-top: 30px; font: 400 92px/.85 var(--serif); letter-spacing: -.04em; color: var(--ink); transition: transform .5s var(--ease); transform-origin: left bottom; }
.path-code i { font-style: normal; color: var(--signal); }
.path:hover .path-code { transform: translateX(4px); }
.path-name { margin: 18px 0 0; font: 600 17px/1.3 var(--sans); color: var(--ink); }
.path-text { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; min-height: 4.8em; }
.path-mods { margin-top: 18px; border-top: 1px solid var(--line); }
.path-mod { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: baseline; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 500; }
.path-mod .n { font: 10.5px var(--mono); color: var(--faint); transition: color .2s; }
.path-mod .t { transition: transform .35s var(--ease), color .2s; }
.path-mod .v { font: 10.5px var(--mono); color: var(--faint); letter-spacing: .04em; white-space: nowrap; }
a.path-mod:hover .t { transform: translateX(5px); color: var(--ink); }
a.path-mod:hover .n { color: var(--signal); }
.path-mod.soon { color: var(--faint); font-weight: 400; }
.path-mod.soon .v { border: 1px dashed var(--line-strong); padding: 2px 5px; border-radius: 3px; font-size: 9.5px; }
.path-foot { margin-top: auto; padding-top: 22px; font: 10.5px var(--mono); letter-spacing: .08em; color: var(--faint); }
.path.reserved .path-code { color: transparent; -webkit-text-stroke: 1px var(--faint); }
.path.reserved .path-code i { color: var(--faint); -webkit-text-stroke: 0; }
.path.reserved::after { content: ""; position: absolute; inset: 0 0 0 22px; z-index: -1; background: repeating-linear-gradient(135deg, transparent 0 10px, var(--bg-hover) 10px 11px); mask-image: linear-gradient(transparent, #000 60%); }

/* ---------- US & IB ---------- */
.exam-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 26px 0 8px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg-raise); }
.exam-switch a { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "n v" "code code" "name name"; gap: 2px 10px; padding: 14px 18px 16px; color: var(--muted); transition: background .2s, color .2s; }
.exam-switch a + a { border-left: 1px solid var(--line); }
.exam-switch a:hover { background: var(--bg-hover); color: var(--ink); }
.exam-switch a.on { color: var(--ink); background: var(--bg); }
.exam-switch a.on::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; background: var(--signal); }
.es-n { grid-area: n; font: 10.5px var(--mono); color: var(--faint); }
.es-v { grid-area: v; justify-self: end; font: 10.5px var(--mono); color: var(--faint); }
.es-code { grid-area: code; margin-top: 10px; font: 400 40px/1 var(--serif); letter-spacing: -.02em; color: inherit; }
.es-name { grid-area: name; font-size: 12.5px; color: var(--faint); }
.exam-switch a.on .es-n { color: var(--signal); }
.callout.warn::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 2px; background: var(--orange); border-radius: 2px; }
.callout.warn svg { color: var(--orange); }
.year-big { display: block; font: 400 22px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.doc-pill.arch { border-style: dashed; }
.us-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 26px; }
.us-popular .mono { font-size: 10.5px; letter-spacing: .12em; color: var(--faint); margin-right: 8px; }
.chip-btn { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12.5px; color: var(--text); transition: border-color .2s, color .2s, background .2s; }
.chip-btn:hover { border-color: var(--ink); color: var(--ink); background: var(--bg-raise); }
.dir.dir-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Study abroad ---------- */
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.slot { position: relative; padding: 18px 18px 46px; border: 1px dashed var(--line-strong); border-radius: 10px; background: repeating-linear-gradient(135deg, transparent 0 10px, var(--bg-hover) 10px 11px); }
.slot-n { font: 10.5px var(--mono); color: var(--faint); }
.slot h3 { margin: 26px 0 6px; font: 400 26px/1.1 var(--serif); color: var(--ink); }
:root[data-lang="zh"] .slot h3 { font-size: 19px; font-weight: 700; }
.slot p { margin: 0; font-size: 13px; color: var(--muted); }
.slot-tag { position: absolute; left: 18px; bottom: 16px; font: 500 9.5px/1 var(--mono); letter-spacing: .12em; color: var(--signal); }

@media (max-width: 1080px) {
  .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path { min-height: 0; padding: 22px; }
  .path:nth-child(2n) { border-right: 0; padding-right: 0; }
  .path:nth-child(2n+1) { padding-left: 0; }
  .path:nth-child(n+3) { border-top: 1px solid var(--line); }
  .slots, .dir.dir-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .topbar.has-tabs .crumbs { display: none; }
  .track-tabs { margin-left: 4px; padding-left: 8px; }
  .track-tabs .tt-code { display: none; }
  .track-tabs a.active::after { bottom: -12px; }
  .exam-switch a { padding: 12px 12px 14px; }
  .es-code { font-size: 30px; }
  .es-name, .es-v { display: none; }
}
@media (max-width: 620px) {
  .paths, .slots, .dir.dir-4 { grid-template-columns: 1fr; }
  .path, .path:nth-child(2n), .path:nth-child(2n+1) { padding: 22px 0; border-right: 0; }
  .path:nth-child(n+2) { border-top: 1px solid var(--line); }
  .path-code { font-size: 72px; }
  .path-text { min-height: 0; }
}
.dir-level:not(.unfolded) .dir-row.fold { display: none; }
.filtering .dir-level .dir-row.fold:not([hidden]) { display: flex; }
.filtering [data-unfold] { display: none; }

/* ---------- CIE topic bank inside Questions ---------- */
.topic-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 2px solid var(--green); border-radius: 0 8px 8px 0; background: var(--bg-raise); }
.topic-bar:empty { display: none; }
.topic-k { display: inline-flex; align-items: center; gap: 7px; margin-right: 6px; font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.topic-k svg { width: 14px; height: 14px; }
.topic-subjects { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; order: 3; }
.topic-subjects .chip-btn { display: inline-flex; align-items: center; gap: 7px; }
.topic-subjects code { font: 500 10.5px var(--mono); color: var(--muted); }
.topic-subjects small { font: 10px var(--mono); color: var(--faint); }
.topic-rest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.topic-bar .select { border: 1px solid var(--line-strong); height: 28px; font-size: 13px; }
.topic-select { max-width: min(520px, 100%); }
.qrow.bank .qnum { color: var(--ink); }
.tag.topic { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
a.tag.green:hover { box-shadow: inset 0 0 0 1px var(--green); }
.context-block { color: var(--muted); font-size: 14px; border-left: 2px solid var(--line-strong); padding-left: 14px; max-height: 18em; overflow: auto; }
.mcq-answer { display: flex; align-items: baseline; gap: 14px; }
.mcq-answer span { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.mcq-answer b { font: 400 40px/1 var(--serif); color: var(--ink); }
.sibling-list { max-height: 260px; overflow: auto; }
.sibling-list button[aria-current="true"] { background: var(--signal-soft); }
.doc-pill.qb.tagged { border-style: solid; border-color: var(--green); color: var(--green); }
.doc-pill.qb.tagged b { font-weight: 500; opacity: .75; }
@media (max-width: 820px) { .topic-select { width: 100%; } }

/* ---------- Course hierarchy: index -> subject -> paper / topic ---------- */
@keyframes enter-r { from { opacity: 0; transform: translateX(28px); } }
@keyframes enter-l { from { opacity: 0; transform: translateX(-28px); } }
.page.dir-in.view-enter > * { animation-name: enter-r; }
.page.dir-out.view-enter > * { animation-name: enter-l; }
a.link, .db-meta.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a.link:hover, .db-meta.link:hover { text-decoration-color: var(--signal); }
.link-tag:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.vtip { position: fixed; z-index: 120; transform: translate(-50%, -100%); padding: 5px 8px; border-radius: 5px; background: var(--ink); color: var(--bg); font: 11px/1.3 var(--mono); white-space: nowrap; pointer-events: none; box-shadow: var(--shadow); }

.course-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.course-card { position: relative; display: flex; flex-direction: column; padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raise); transition: border-color .25s, transform .35s var(--ease), box-shadow .35s; animation: row-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.course-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(0,0,0,.35); }
.cc-top { display: flex; justify-content: space-between; font: 10.5px var(--mono); letter-spacing: .06em; color: var(--faint); }
.cc-code { margin-top: 18px; font: 400 54px/.9 var(--serif); letter-spacing: -.03em; color: var(--ink); }
.cc-name { margin-top: 8px; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; }
.cc-name small { font-weight: 400; font-size: 12px; color: var(--muted); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 36px; margin: 16px 0 12px; border-bottom: 1px solid var(--line); }
.spark i { flex: 1; min-width: 2px; background: color-mix(in oklab, var(--blue) 70%, var(--bg-raise)); border-radius: 2px 2px 0 0; }
.spark i:hover { background: var(--blue); }
.cc-foot { display: flex; justify-content: space-between; font: 11px var(--mono); color: var(--faint); }
.cc-foot b { color: var(--ink); font-weight: 500; }
.parsed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-left: auto; align-self: center; flex: none; }
.edx-dir { border-top: 1px solid var(--ink); }

.subject-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 32px; align-items: end; padding-bottom: 26px; border-bottom: 1px solid var(--line); position: relative; }
.subject-hero::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 1px; background: var(--ink); }
.sh-code { margin: 18px 0 0; font: 400 clamp(84px, 12vw, 148px)/.82 var(--serif); letter-spacing: -.045em; color: var(--ink); }
.sh-code i { font-style: normal; color: var(--signal); }
.sh-name { margin: 16px 0 0; font: 600 22px/1.3 var(--sans); color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.sh-name small { font-weight: 400; font-size: 15px; color: var(--muted); }
.sh-name small.mono { font: 12px var(--mono); color: var(--faint); }
.sh-side { display: flex; flex-direction: column; gap: 14px; }
.sh-next { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 10px; background: var(--console-bg); color: var(--console-text); }
.sh-next .mono { font-size: 10px; letter-spacing: .12em; color: #ff6a2b; }
.sh-next b { font: 400 26px/1.1 var(--serif); color: #fff; }
.sh-next span:last-child { font: 11px var(--mono); color: #8a8a92; }
.sh-links { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-syl { display: flex; flex-direction: column; gap: 8px; }
.sh-syl .mono { font-size: 10px; letter-spacing: .12em; color: var(--faint); }
.sh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.sh-stats > div { padding: 18px 0 16px; display: flex; flex-direction: column; gap: 8px; }
.sh-stats > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.sh-stats span { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.sh-stats b { font: 400 34px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.subtabs { position: sticky; top: 48px; z-index: 15; display: flex; gap: 4px; margin: 0 -8px; padding: 10px 8px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.subtabs a { position: relative; padding: 8px 12px 12px; font-weight: 500; color: var(--muted); }
.subtabs a:hover { color: var(--ink); }
.subtabs a[aria-current] { color: var(--ink); }
.subtabs a[aria-current]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--signal); }

.sheat { display: grid; grid-template-columns: 52px repeat(var(--cols), minmax(0, 1fr)); gap: 2px; align-items: center; }
.heat-k { font: 11px var(--mono); color: var(--faint); }
.heat-c { height: 26px; border-radius: 3px; transition: transform .2s var(--ease), box-shadow .2s; }
a.heat-c:hover, a.heat-c:focus-visible { box-shadow: 0 0 0 1.5px var(--ink); transform: scale(1.08); position: relative; z-index: 1; }
.heat-c.nil { box-shadow: inset 0 0 0 1px var(--line); }
.heat-y { font: 10px var(--mono); color: var(--faint); text-align: center; padding-top: 6px; white-space: nowrap; }
.ov-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; }
.bars { display: flex; flex-direction: column; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 48px; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px; }
.bar-row:hover .bar-name { color: var(--ink); }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-name code { font: 11px var(--mono); color: var(--faint); }
.bar-track { height: 10px; }
.bar-track i { display: block; height: 100%; min-width: 2px; background: color-mix(in oklab, var(--blue) 72%, var(--bg-raise)); border-radius: 0 4px 4px 0; transition: background .2s; }
.bar-row:hover .bar-track i, .topic-row:hover .bar-track i { background: var(--blue); }
.bar-row b, .topic-row b { font: 500 12px var(--mono); color: var(--ink); text-align: right; }
.bars.compact .bar-row { grid-template-columns: minmax(0, 1fr) 70px 28px; font-size: 12.5px; }
.paper-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.paper-chip { display: inline-flex; align-items: baseline; gap: 7px; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg-raise); transition: border-color .2s, transform .2s var(--ease), background .2s; line-height: 28px; }
.paper-chip b { font: 500 12px var(--mono); color: var(--ink); }
.paper-chip span { font: 11px var(--mono); color: var(--faint); }
.paper-chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.paper-chip.on { background: var(--ink); border-color: var(--ink); }
.paper-chip.on b { color: var(--bg); }
.ov-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; border-top: 1px solid var(--line); }
.ov-facts > div { padding: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.ov-facts > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.ov-facts span { font: 10.5px var(--mono); color: var(--faint); letter-spacing: .06em; }
.ov-facts b { font: 400 26px/1 var(--serif); color: var(--ink); }

.year-list { margin-top: 18px; }
.year-block { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.year-block h3 { margin: 0; font: 400 40px/1 var(--serif); color: var(--ink); letter-spacing: -.02em; }
.series-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.series-col { display: flex; flex-direction: column; gap: 8px; }
.series-col.none { opacity: .5; }
.series-k { font: 500 10.5px var(--mono); letter-spacing: .08em; color: var(--faint); }
.year-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.year-cell { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-raise); transition: border-color .2s; }
.year-cell:hover { border-color: var(--ink); }
.year-cell b { font: 400 28px/1 var(--serif); color: var(--ink); }
.year-cell span { font: 10.5px var(--mono); color: var(--faint); }
.year-cell.has span { color: var(--blue); }
.chapter { margin-top: 26px; scroll-margin-top: 110px; border-top: 1px solid var(--ink); }
.topic-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(80px, 180px) 52px 22px; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--text); transition: background .15s; }
.topic-row:hover { background: var(--bg-hover); }
.topic-row code { font: 11.5px var(--mono); color: var(--muted); }
.tr-name { color: var(--ink); font-weight: 500; }
.tr-name em { font-style: normal; margin-left: 8px; font: 10.5px var(--mono); color: var(--faint); }

.level-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); position: relative; }
.level-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 1px; background: var(--ink); }
.level-head .up { display: flex; width: fit-content; align-items: center; gap: 6px; margin-bottom: 22px; font-size: 13px; color: var(--muted); }
.level-head .up svg { width: 14px; height: 14px; transform: rotate(180deg); transition: transform .25s var(--ease); }
.level-head .up:hover { color: var(--ink); }
.level-head .up:hover svg { transform: rotate(180deg) translateX(3px); }
.level-files { margin-top: 18px; align-items: center; }
.warn-text { color: var(--orange); }
.sib-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sib-nav > .mono { font-size: 10.5px; letter-spacing: .1em; color: var(--faint); margin-right: 4px; }
.sib-step { font: 12px var(--mono); color: var(--muted); padding: 5px 8px; border-radius: 5px; }
.sib-step:hover { color: var(--ink); background: var(--bg-hover); }
.level-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; margin-top: 24px; align-items: start; }
.level-side { position: sticky; top: 72px; max-height: calc(calc(100vh / var(--zoom, 1)) - 96px); overflow: auto; }
.side-h { display: flex; justify-content: space-between; margin: 0 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); font: 600 14px var(--sans); color: var(--ink); }
.side-h small { font: 11px var(--mono); color: var(--faint); font-weight: 400; }
.year-bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line-strong); padding-top: 18px; }
.yb { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; padding: 0; cursor: pointer; }
.yb:disabled { cursor: default; }
.yb i { display: block; width: 100%; background: color-mix(in oklab, var(--blue) 72%, var(--bg)); border-radius: 4px 4px 0 0; transition: background .2s; }
.yb:hover i { background: var(--blue); }
.yb.on i { background: var(--ink); }
.yb em { position: absolute; left: 50%; transform: translateX(-50%); top: 0; font: normal 11px var(--mono); color: var(--ink); }
.yb-axis { display: flex; justify-content: space-between; font: 10.5px var(--mono); color: var(--faint); padding-top: 6px; }

@media (max-width: 1080px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-cols, .level-layout { grid-template-columns: 1fr; }
  .level-side { position: static; max-height: none; }
  .year-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .subject-hero { grid-template-columns: 1fr; gap: 20px; }
  .sh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh-stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .year-block { grid-template-columns: 1fr; gap: 10px; }
  .series-cols { grid-template-columns: 1fr; }
  .topic-row { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .topic-row .bar-track, .topic-row .tr-go { display: none; }
  .sheat { grid-template-columns: 36px repeat(var(--cols), minmax(0, 1fr)); gap: 1px; }
  .heat-y { font-size: 8px; }
}
@media (max-width: 560px) {
  .course-grid { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sh-next[hidden], .btn[hidden] { display: none; }
.tr-go { color: var(--faint); display: grid; place-items: center; transition: transform .3s var(--ease), color .2s; }
.tr-go svg { width: 16px; height: 16px; }
.topic-row:hover .tr-go { color: var(--ink); transform: translateX(3px); }
.sh-syl .doc-pill { white-space: normal; height: auto; min-height: 26px; line-height: 1.4; padding: 4px 9px; }

/* ---------- Cambridge and Edexcel side by side ---------- */
.exam-switch.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
.exam-switch.two .es-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-band { display: flex; align-items: baseline; gap: 12px; margin: 44px 0 0; padding: 12px 0; font: 400 26px/1.15 var(--serif); color: var(--ink); border-bottom: 2px solid var(--ink); }
:root[data-lang="zh"] .unit-band { font-size: 21px; font-weight: 700; }
.unit-band code { font: 500 12px var(--mono); color: var(--signal); padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 4px; }
.ts-board { flex-basis: 100%; font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }
.ts-board:first-child { margin-top: 0; }

/* maths in question text */
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 .15em; line-height: 1.25; font-size: .94em; }
.frac > .num { border-bottom: 1px solid currentColor; padding: 0 .25em .05em; }
.frac > .den { padding: .05em .25em 0; }
.rad { white-space: nowrap; }
.rad > .rb { border-top: 1px solid currentColor; padding: 0 .1em; margin-left: 1px; }
.mat { display: inline-flex; flex-direction: column; vertical-align: middle; border-left: 1.5px solid currentColor; border-right: 1.5px solid currentColor; border-radius: 4px; padding: 0 .35em; margin: 0 .2em; line-height: 1.35; }
.mat > .mrow { display: flex; gap: .8em; justify-content: center; }
.fx-missing { display: inline-block; min-width: 1.4em; text-align: center; border: 1px dashed var(--faint, #999); border-radius: 3px; color: var(--faint, #999); font-size: .85em; cursor: help; }
.fx-img { display: block; max-width: min(100%, 420px); height: auto; margin: .35em 0; background: #fff; border: 1px solid var(--line, #ddd); border-radius: 4px; padding: 2px; }
.qstem .fx-img { display: none; }

/* The whole interface renders at 90% on desktop screens (phones keep 100% so text stays legible).
   Lengths in vh are divided by --zoom above, and scripts convert pointer coordinates with the same factor. */
@media (min-width: 900px) { html { zoom: .9; --zoom: .9; } }

/* ---------- parsed subjects ledger (#/uk) ---------- */
.lg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 14px; }
.lg-sum { font-size: 13px; color: var(--muted); margin-right: auto; }
.lg-sum b { font: 500 14px var(--mono); color: var(--ink); }
.lg-filter { width: 240px; }
.lg-lv button { flex-direction: row; padding: 6px 12px; font-size: 12px; }
.lg-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.lg-mine .mono { font-size: 10.5px; letter-spacing: .08em; color: var(--signal); margin-right: 4px; }
.lg-mine a { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--signal-soft); color: var(--ink); font-size: 12.5px; }
.lg-mine a code { font: 600 11px var(--mono); color: var(--signal); }
.lg-mine a:hover { background: var(--signal); color: #fff; }
.lg-mine a:hover code { color: #fff; }
.lg { --cols: 2; border-top: 1px solid var(--ink); }
.lg-head, .lg-row { display: grid; grid-template-columns: minmax(150px, 210px) repeat(var(--cols), minmax(0, 1fr)); column-gap: 24px; }
.lg-head { padding: 8px 4px; font: 10.5px var(--mono); letter-spacing: .08em; color: var(--faint); text-transform: uppercase; border-bottom: 1px solid var(--line); }
.lg-fam h3 { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 18px 4px 6px; font: 400 21px var(--serif); color: var(--ink); }
.lg-fam h3 small { font: 10.5px var(--mono); color: var(--faint); }
.lg-row { align-items: start; padding: 8px 4px; border-bottom: 1px solid var(--line); transition: background .15s; }
.lg-row:hover { background: var(--bg-hover); }
.lg-subj { display: flex; flex-direction: column; padding-top: 5px; min-width: 0; }
.lg-subj b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.lg-subj small { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: opacity .2s; }
.lg-cell.dim, .lg-head .dim { opacity: .25; }
.lg-none { padding: 8px 6px; color: var(--line-strong); font: 13px var(--mono); }
.lg-e { position: relative; display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; column-gap: 10px; padding: 7px 8px 9px; border-radius: 6px; color: var(--text); }
.lg-e:hover { background: var(--bg-raise); box-shadow: 0 0 0 1px var(--line-strong); }
.lg-e code { font: 600 15px var(--mono); color: var(--ink); letter-spacing: -.01em; }
.lg-e em { font-style: normal; font: 500 9.5px var(--mono); padding: 1px 5px; border-radius: 3px; background: var(--tag-bg); color: var(--muted); }
.lg-e:not(:has(em)) code { grid-column: span 2; }
.lg-star { position: absolute; left: -10px; top: 7px; font-size: 11px; color: var(--signal); }
.lg-n { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-n b { font: 500 13px var(--mono); color: var(--ink); }
.lg-y { font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; }
.lg-spark { width: 64px; height: 16px; stroke: none; }
.lg-spark polyline { fill: none; stroke: var(--blue); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.lg-bar { position: absolute; left: 8px; bottom: 3px; height: 2px; width: calc((100% - 16px) * var(--w) / 100); border-radius: 1px; background: var(--blue); opacity: .55; }
.lg-e.mine { background: var(--signal-soft); }
.lg-e.mine .lg-bar, .lg-e.mine .lg-spark polyline { background: var(--signal); stroke: var(--signal); }
.lg-note { margin: 10px 0 30px; }
@media (max-width: 900px) {
  .lg-head { display: none; }
  .lg-row { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .lg-cell:has(.lg-none) { display: none; }
  .lg-cell::before { content: attr(data-lvl); font: 9.5px var(--mono); letter-spacing: .08em; color: var(--faint); padding: 4px 8px 0; }
  .lg-filter { width: 100%; }
  .lg-spark { display: none; }
  .lg-e { grid-template-columns: auto auto 1fr auto; }
}

/* 试卷库 + layered picker */
.path-list { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font: 12.5px/1.7 var(--mono); color: var(--muted); letter-spacing: .02em; }
.lib-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg-raise); margin: 18px 0 8px; }
.lib-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lib-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px; min-height: 130px; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; transition: background .2s, color .2s; }
.lib-card:hover { background: var(--bg-hover); color: var(--ink); }
.lib-card .n { font: 11px var(--mono); color: var(--signal); }
.lib-card b { font: 400 24px/1.1 var(--serif); color: var(--ink); }
:root[data-lang="zh"] .lib-card b { font-weight: 700; font-size: 20px; }
.lib-card i { margin-top: auto; font: normal 11px var(--mono); color: var(--faint); letter-spacing: .04em; }
.lib-card::after { content: "→"; position: absolute; right: 18px; top: 20px; color: var(--signal); opacity: 0; transform: translateX(-4px); transition: all .25s var(--ease); }
.lib-card:hover::after { opacity: 1; transform: none; }
.lib-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.lib-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.up { display: inline-flex; gap: 8px; margin: 4px 0 -4px; font: 12px var(--mono); color: var(--muted); }
.up:hover { color: var(--signal); }
.dir-row small { margin-left: auto; font: 11px var(--mono); color: var(--faint); }
.lib-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 22px 0 14px; }
.lib-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lib-bar .input { min-width: 220px; }
.lib-folder { border-top: 1px solid var(--line); }
.lib-folder > summary { display: flex; align-items: baseline; gap: 12px; padding: 14px 4px; cursor: pointer; list-style: none; font: 400 18px/1.2 var(--serif); color: var(--ink); }
:root[data-lang="zh"] .lib-folder > summary { font-weight: 700; font-size: 16px; }
.lib-folder > summary::-webkit-details-marker { display: none; }
.lib-folder > summary::before { content: "+"; font: 13px var(--mono); color: var(--signal); width: 12px; }
.lib-folder[open] > summary::before { content: "−"; }
.lib-folder small { margin-left: auto; font: 11px var(--mono); color: var(--faint); }
.lib-files { padding: 0 0 14px 24px; columns: 2 380px; column-gap: 32px; }
.lib-file { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); break-inside: avoid; color: var(--text); font-size: 13.5px; }
.lib-file[hidden] { display: none; }
.lib-file:hover { color: var(--ink); }
.lib-file em { flex: none; min-width: 52px; font: normal 500 10.5px var(--mono); color: var(--faint); letter-spacing: .04em; }
.lib-file em.k-question-paper { color: var(--blue); } .lib-file em.k-mark-scheme { color: var(--signal); }
.lib-sub { margin: 28px 0 4px; font: 11px var(--mono); color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.lib-empty { padding: 28px 0; color: var(--muted); }
@media (max-width: 900px) { .lib-cards, .lib-cards.two { grid-template-columns: 1fr; } .lib-bar .input { min-width: 0; width: 100%; } }

/* Sub-interface sidebar: a board, a subject or study abroad replaces the global path list */
.sidebar.in-ctx .side-nav, .sidebar.in-ctx .side-label, .sidebar.in-ctx .tracks { display: none; }
.side-ctx { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.side-ctx[hidden] { display: none; }
.side-ctx.ctx-enter { animation: ctx-in .38s var(--ease) both; }
@keyframes ctx-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .side-ctx.ctx-enter { animation: none; } }
.ctx-back { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; height: 26px; padding: 0 10px; margin: 0 0 10px; border-radius: var(--radius); font: 12px var(--mono); color: var(--muted); transition: background .15s, color .15s; }
.ctx-back:hover { background: var(--bg-hover); color: var(--ink); }
.ctx-back span { color: var(--signal); }
.ctx-head { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-raise); }
.ctx-head .track-code { flex: none; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ctx-title { display: flex; flex-direction: column; min-width: 0; font-weight: 600; color: var(--ink); line-height: 1.25; }
.ctx-title small { font: 10px var(--mono); color: var(--faint); font-weight: 400; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-filter { height: 30px; margin: 0 0 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raise); color: var(--ink); font: inherit; font-size: 12.5px; }
.ctx-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px 10px; scrollbar-width: thin; }
.ctx-label { margin: 14px 0 6px; padding: 0 10px; font: 500 10px/1 var(--mono); letter-spacing: .12em; color: var(--faint); text-transform: uppercase; }
.ctx-label:first-child { margin-top: 4px; }
.ctx-list { display: flex; flex-direction: column; gap: 1px; }
.ctx-list a, .ctx-list button { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 5px 10px; border: 0; border-radius: var(--radius); background: none; text-align: left; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; }
.ctx-list a span, .ctx-list button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-list a em { margin-left: auto; flex: none; font: normal 10px var(--mono); color: var(--faint); }
.ctx-list a:hover, .ctx-list button:hover { background: var(--bg-hover); color: var(--ink); }
.ctx-list a.active { background: var(--bg-raise); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.ctx-list a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--signal); }
.ctx-list a[hidden] { display: none; }
.ctx-list button { font-weight: 400; font-size: 12.5px; }
.sidebar.in-ctx > :not(.side-ctx), .side-ctx > :not(.ctx-scroll) { flex-shrink: 0; }

/* A tool opened inside a board or subject: the board is fixed by the sub-interface, so its switch goes, and the head is compact. */
.page.in-scope .prop-key:has(+ .prop-val > #board-seg), .page.in-scope .prop-val:has(> #board-seg),
.page.in-scope .prop-key:has(+ .prop-val > #tboard), .page.in-scope .prop-val:has(> #tboard),
.page.in-scope #qboard, .page.in-scope #gt-board { display: none; }
.page.in-scope .page-head { padding-bottom: 14px; }
.page.in-scope .page-head .title { font-size: clamp(28px, 3.2vw, 40px); }
.page.in-scope .page-head .lede { display: none; }
/* Inside a subject the subject is fixed too: its pickers go, so a tool can't carry the user to another subject. */
.page.in-scope-s .prop-key:has(+ .prop-val #subject), .page.in-scope-s .prop-val:has(#subject),
.page.in-scope-s .field:has(> #qsubject),
.page.in-scope-s .prop-key:has(+ .prop-val > #tsubject), .page.in-scope-s .prop-val:has(> #tsubject),
.page.in-scope-s #gt-subjects { display: none; }
.ctx-top { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.ctx-top .ctx-back { margin: 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ctx-global { margin-left: auto; display: flex; gap: 2px; flex: none; }
.ctx-global a { height: 26px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: var(--radius); font-size: 12px; color: var(--faint); transition: background .15s, color .15s; }
.ctx-global a:hover { background: var(--bg-hover); color: var(--ink); }
