/* Uncensored Is Not Unbiased: project page. No web fonts, no framework. */

:root {
  color-scheme: light;
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #f0f0eb;
  --surface-3: #e7e7e0;
  --ink: #121417;
  --ink-2: #464b54;
  --muted: #6a6f78;
  --line: #e0e0d8;
  --line-2: #c9c9c0;
  --brand: #1d3766;
  --brand-ink: #ffffff;
  --link: #1f5fbf;
  --focus: #2a78d6;
  --neq: #e8962f;
  --accent: #1a9a8a;
  /* data series (validated with the dataviz palette checker against #ffffff) */
  --roc: #2a78d6;
  --prc: #eb6834;
  --dpp: #1baf7a;
  --neutral: #9a9a92;
  --roc-soft: rgba(42, 120, 214, 0.10);
  --prc-soft: rgba(235, 104, 52, 0.10);
  --warn-bg: #fff3df;
  --warn-ink: #7a4a00;
  --bad-bg: #fde8e6;
  --bad-ink: #8c1d14;
  --ok-bg: #e5f4e8;
  --ok-ink: #0f5a1f;
  --info-bg: #e9f0fb;
  --info-ink: #1d4580;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 12px;
  --radius-sm: 8px;
  --sans: system-ui, -apple-system, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "MingLiU", "Noto Serif CJK TC", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", "Noto Sans Mono CJK TC", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0b1220;
    --surface: #121a2b;
    --surface-2: #18223a;
    --surface-3: #212d48;
    --ink: #eef1f6;
    --ink-2: #c3c9d4;
    --muted: #919aab;
    --line: #26324a;
    --line-2: #34425f;
    --brand: #a9c3ff;
    --brand-ink: #0b1220;
    --link: #8fb4ff;
    --focus: #8fb4ff;
    --roc: #3987e5;
    --prc: #d95926;
    --dpp: #199e70;
    --neutral: #6f7890;
    --roc-soft: rgba(57, 135, 229, 0.16);
    --prc-soft: rgba(217, 89, 38, 0.16);
    --warn-bg: #3a2a0c;
    --warn-ink: #ffd18a;
    --bad-bg: #3d1712;
    --bad-ink: #ffb4aa;
    --ok-bg: #13301b;
    --ok-ink: #9be3ab;
    --info-bg: #15264a;
    --info-ink: #b9d0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #121a2b;
  --surface-2: #18223a;
  --surface-3: #212d48;
  --ink: #eef1f6;
  --ink-2: #c3c9d4;
  --muted: #919aab;
  --line: #26324a;
  --line-2: #34425f;
  --brand: #a9c3ff;
  --brand-ink: #0b1220;
  --link: #8fb4ff;
  --focus: #8fb4ff;
  --roc: #3987e5;
  --prc: #d95926;
  --dpp: #199e70;
  --neutral: #6f7890;
  --roc-soft: rgba(57, 135, 229, 0.16);
  --prc-soft: rgba(217, 89, 38, 0.16);
  --warn-bg: #3a2a0c;
  --warn-ink: #ffd18a;
  --bad-bg: #3d1712;
  --bad-ink: #ffb4aa;
  --ok-bg: #13301b;
  --ok-ink: #9be3ab;
  --info-bg: #15264a;
  --info-ink: #b9d0ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

/* language switching for static text */
:root[lang|="en"] [data-lang="zh"], :root[lang|="zh"] [data-lang="en"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); }
:root[lang|="zh"] body { line-height: 1.75; }
img, video { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.zh-s { font-family: var(--sans); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap; font-family: var(--serif); font-size: 1.05rem; }
.brand .neq { color: var(--neq); }
.topnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; margin-left: 8px; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { padding: 6px 10px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.tools { display: flex; gap: 6px; margin-left: auto; }
.iconbtn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; min-width: 40px; height: 36px; padding: 0 12px; cursor: pointer; font-size: .9rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.iconbtn:hover { background: var(--surface-2); }
.iconbtn svg { width: 18px; height: 18px; }
@media (max-width: 720px) { .topnav { display: none; } }

/* hero */
.hero { padding: 48px 0 24px; text-align: center; }
.hero h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(2.2rem, 1.2rem + 5vw, 4.2rem); letter-spacing: .02em; margin-bottom: .2em; }
:root[lang|="en"] .hero h1 { font-size: clamp(1.9rem, 1.1rem + 3.6vw, 3.3rem); letter-spacing: -.01em; }
.hero h1 .neq { color: var(--neq); font-weight: 400; padding: 0 .15em; }
.hero .subtitle { font-size: clamp(1.05rem, .95rem + .6vw, 1.35rem); color: var(--ink-2); max-width: 46em; margin: 0 auto 1.2em; }
.hero .alt-title { color: var(--muted); font-size: .98rem; margin: -.6em auto 1.2em; max-width: 50em; }
.authors { font-size: 1.15rem; font-weight: 600; margin-bottom: .2em; }
.affil { color: var(--ink-2); font-size: .95rem; max-width: 52em; margin: 0 auto 1.2em; }
.affil span { display: block; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 600; font-size: .95rem; border: 1px solid transparent; cursor: pointer; line-height: 1.3; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn[aria-disabled="true"] { opacity: .6; cursor: default; filter: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.video { max-width: 880px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(10, 20, 40, .18); background: #0b1220; aspect-ratio: 16 / 9; }
.video video { width: 100%; height: 100%; object-fit: contain; background: #0b1220; }
.video-cap { color: var(--muted); font-size: .85rem; margin-top: 8px; }

/* sections */
section.sec { padding: 56px 0; border-top: 1px solid var(--line); }
.sec-head { max-width: 50em; margin-bottom: 22px; }
.sec-head p { color: var(--ink-2); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--muted); font-weight: 700; margin-bottom: .4em; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.prose { max-width: 48em; }
.prose li { margin-bottom: .35em; }

.tldr { font-size: 1.12rem; line-height: 1.8; padding: 24px 26px; border-left: 4px solid var(--neq); }
.tldr p:last-child { margin: 0; }

/* highlights */
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hl { display: flex; flex-direction: column; padding: 18px 18px 14px; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.hl:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16, 24, 40, .12); }
.hl .num { font-size: 1.9rem; font-weight: 750; line-height: 1.15; letter-spacing: -.01em; margin-bottom: 6px; }
.hl .num small { font-size: .55em; font-weight: 600; color: var(--muted); }
.hl h3 { font-size: 1.02rem; margin-bottom: .35em; }
.hl p { color: var(--ink-2); font-size: .93rem; margin-bottom: .8em; }
.hl .go { margin-top: auto; font-size: .88rem; color: var(--link); font-weight: 600; }
.hl q { quotes: "「" "」"; }

/* method */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 > *, .grid3 > *, .hl-grid > * { min-width: 0; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
.pad { padding: 18px 20px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.tbl-scroll { overflow-x: auto; }
.formula { font-family: var(--mono); background: var(--surface-2); padding: 10px 12px; border-radius: var(--radius-sm); font-size: .9rem; overflow-x: auto; white-space: nowrap; }
.scriptchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }

/* Index S chart */
.ichart { padding: 16px 18px 12px; }
.ichart-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ichart-head h3 { margin: 0; font-size: 1rem; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; background: var(--surface-2); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-size: .86rem; color: var(--ink-2); min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.irows { position: relative; }
.irow { display: grid; grid-template-columns: minmax(150px, 240px) 56px 1fr 56px; align-items: center; gap: 8px; min-height: 28px; }
.irow .m { font-weight: 600; font-size: .9rem; }
.irow .s { color: var(--muted); font-size: .85rem; }
.irow .v { font-variant-numeric: tabular-nums; font-size: .88rem; text-align: right; }
.igroup { padding: 6px 0; border-bottom: 1px solid var(--line); }
.igroup:last-child { border-bottom: 0; }
.track { position: relative; height: 22px; }
.track .zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.track .ci { position: absolute; top: 10px; height: 2px; background: var(--ink-2); opacity: .55; border-radius: 2px; }
.track .dot { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--surface); }
.track .dot.pos { background: var(--roc); }
.track .dot.neg { background: var(--prc); }
.track .dot.nil { background: var(--neutral); }
.iaxis { display: grid; grid-template-columns: minmax(150px, 240px) 56px 1fr 56px; gap: 8px; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.iaxis .ticks { position: relative; height: 18px; }
.iaxis .ticks span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.iaxis .poles { display: flex; justify-content: space-between; }
.ichart .bgL, .ichart .bgR { position: absolute; top: 0; bottom: 0; }
.ig-name { display: none; }
@media (max-width: 560px) {
  .ig-name { display: block; font-weight: 600; font-size: .86rem; margin: 2px 0; }
  .irow, .iaxis { grid-template-columns: 52px minmax(0, 1fr) 46px; gap: 6px; }
  .irow .m, .iaxis > span:first-child { display: none; }
  .iaxis .poles { font-size: .72rem; }
}
details.tableview { margin-top: 10px; }
details.tableview summary { cursor: pointer; color: var(--link); font-size: .9rem; }

/* explorer */
.ex { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
@media (max-width: 960px) { .ex { grid-template-columns: 1fr; } }
.ex-side { position: sticky; top: 66px; max-height: calc(100vh - 80px); display: flex; flex-direction: column; overflow: hidden; }
@media (max-width: 960px) { .ex-side { position: static; max-height: none; } }
.ex-side .searchbox { padding: 12px; border-bottom: 1px solid var(--line); }
.ex-side label { font-size: .82rem; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.ex-side input[type="search"] { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem; }
.ex-list { overflow-y: auto; padding: 6px 6px 12px; overscroll-behavior: contain; }
@media (max-width: 960px) { .ex-list { max-height: 46vh; } }
.ex-list details { border-radius: 8px; }
.ex-list summary { cursor: pointer; padding: 8px 8px; font-weight: 650; font-size: .9rem; display: flex; gap: 8px; align-items: center; list-style: none; border-radius: 8px; }
.ex-list summary::-webkit-details-marker { display: none; }
.ex-list summary::before { content: "▸"; color: var(--muted); font-size: .8rem; transition: transform .15s; }
.ex-list details[open] > summary::before { transform: rotate(90deg); }
.ex-list summary:hover { background: var(--surface-2); }
.ex-list summary .n { margin-left: auto; color: var(--muted); font-weight: 500; font-size: .8rem; }
.ex-list ul { list-style: none; margin: 0 0 6px; padding: 0; }
.ex-list li button { width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 8px 6px 22px; border-radius: 8px; cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 8px; font-size: .86rem; line-height: 1.45; color: var(--ink-2); }
.ex-list li button:hover { background: var(--surface-2); color: var(--ink); }
.ex-list li button[aria-current="true"] { background: var(--info-bg); color: var(--info-ink); font-weight: 600; }
.ex-list .iid { font-family: var(--mono); font-size: .76rem; color: var(--muted); padding-top: 2px; white-space: nowrap; }
.ex-list li button[aria-current="true"] .iid { color: inherit; }
.ex-list .txt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ex-main { min-height: 420px; padding: 20px 22px; min-width: 0; }
@media (max-width: 560px) { .ex-main { padding: 16px 14px; } }
.ex-empty { color: var(--muted); padding: 40px 10px; text-align: center; }
.ex-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.id { font-family: var(--mono); background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info-ink); border-color: transparent; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.ex-top .spacer { flex: 1; }
.linkbtn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: .82rem; cursor: pointer; }
.linkbtn:hover { background: var(--surface-2); }
.ex-title { font-size: 1.2rem; margin: 4px 0 12px; }
.stmts { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .93rem; margin-bottom: 12px; }
.stmts th, .stmts td { padding: 8px 10px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); }
.stmts th { font-size: .78rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.stmts td.sidecell { white-space: nowrap; font-weight: 650; font-size: .85rem; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.sw.pro, .sw.roc { background: var(--roc); }
.sw.con, .sw.prc { background: var(--prc); }
.sw.dpp { background: var(--dpp); }
@media (max-width: 720px) {
  .stmts thead { display: none; }
  .stmts tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .stmts td { display: block; border: 0; padding: 3px 4px; }
  .stmts td[data-s]::before { content: attr(data-s); display: inline-block; min-width: 4.2em; color: var(--muted); font-size: .76rem; font-weight: 600; }
}
.related { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; margin-bottom: 12px; }
.note { font-size: .85rem; color: var(--muted); margin: 8px 0; }
.note.box { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--ink-2); }
.ctrls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 10px 0; }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--roc); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--ink-2); margin: 6px 0; }

.mx { width: 100%; border-collapse: separate; border-spacing: 0; }
.mx th { font-size: .8rem; color: var(--muted); font-weight: 600; text-align: left; padding: 6px 8px; }
.mx td { padding: 4px; vertical-align: top; }
.mx th.mname { font-size: .86rem; color: var(--ink); width: 21%; min-width: 120px; padding-top: 12px; }
.mx th.mname .mm { display: block; font-weight: 400; color: var(--muted); font-size: .76rem; }
.mx tr.sep td, .mx tr.sep th { border-top: 1px dashed var(--line-2); }
.mx tr.sep:first-child td, .mx tr.sep:first-child th { border-top: 0; }
.cell { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 9px; cursor: pointer; display: block; min-height: 64px; }
.cell:hover { border-color: var(--line-2); background: var(--surface-2); }
.cell[aria-pressed="true"] { border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 30%, transparent); }
.cell.empty { cursor: default; color: var(--muted); font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.br { display: grid; grid-template-columns: 1fr 38px; gap: 6px; align-items: center; height: 18px; }
.br + .br { margin-top: 4px; }
.bt { position: relative; height: 10px; background: var(--surface-3); border-radius: 5px; }
.bt .bf { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; min-width: 2px; }
.bt .ph { position: absolute; top: 1px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--ink); opacity: .55; border: 1px solid var(--surface); }
.bt .half { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-2); }
.bf.pro, .bf.roc { background: var(--roc); }
.bf.con, .bf.prc { background: var(--prc); }
.bf.dpp { background: var(--dpp); }
.bf.neutral { background: var(--neutral); }
.br .val { font-variant-numeric: tabular-nums; font-size: .8rem; text-align: right; color: var(--ink); }
.dline { display: grid; grid-template-columns: 1fr 38px; gap: 6px; align-items: center; margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line); }
.dt { position: relative; height: 8px; }
.dt::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-2); }
.dt .db { position: absolute; top: 1px; height: 6px; border-radius: 3px; }
.dt .db.pos { background: var(--roc); }
.dt .db.neg { background: var(--prc); }
.dline .val { font-variant-numeric: tabular-nums; font-size: .78rem; text-align: right; font-weight: 650; }
.dlabel { font-size: .7rem; color: var(--muted); }
@media (max-width: 720px) {
  .mx thead { display: none; }
  .mx, .mx tbody, .mx tr { display: block; width: 100%; }
  .mx tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 8px 0; }
  .mx tr.sep { border-top: 1px dashed var(--line-2); }
  .mx th.mname { grid-column: 1 / -1; width: auto; padding: 4px 2px 0; }
  .mx td { padding: 0; }
  .mx td::before { content: attr(data-s); display: block; font-size: .72rem; color: var(--muted); font-weight: 600; margin: 0 0 2px 2px; }
  .cell { padding: 6px; min-height: 58px; }
  .br, .dline { grid-template-columns: 1fr 30px; gap: 4px; }
  .br .val, .dline .val { font-size: .72rem; }
}

.drawer { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.drawer h4 { margin: 0 0 8px; font-size: .98rem; }
.ptable { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ptable th, .ptable td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.ptable th { font-size: .76rem; color: var(--muted); font-weight: 600; }
.ptable td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; }
.ptable .sub { display: block; font-weight: 400; color: var(--muted); font-size: .75rem; }
pre.prompt, .prompt { white-space: pre-wrap; word-break: break-word; font-family: var(--sans); font-size: .86rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; margin: 0; }
@media (max-width: 720px) {
  .ptable thead { display: none; }
  .ptable tr { display: grid; grid-template-columns: minmax(0, 1fr) 4.6em; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .ptable.ph3 tr { grid-template-columns: 1.4em minmax(0, 1fr) 4.6em; }
  .ptable td { display: block; border: 0; padding: 0; }
  .ptable .sub { font-size: .7rem; }
}

/* open answers */
.ocols { display: grid; gap: 14px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); margin-top: 12px; }
@media (max-width: 1100px) { .ocols { grid-template-columns: 1fr; } }
.ocol { min-width: 0; }
.ocol > h4 { font-size: .95rem; margin: 0 0 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ocol .prompt { margin-bottom: 8px; background: var(--surface-2); }
.ans { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 10px; }
.ans > header, .ans > summary { padding: 8px 10px 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .8rem; color: var(--muted); }
.ans > summary { cursor: pointer; list-style: none; }
.ans > summary::-webkit-details-marker { display: none; }
.ans > summary .run::before { content: "▸ "; }
.ans[open] > summary .run::before { content: "▾ "; }
.ans .run { font-weight: 650; color: var(--ink-2); margin-right: 4px; }
.ans .body { padding: 2px 12px 10px; font-size: .92rem; white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.ans .body.clamp { max-height: 15.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.ans .body .h { font-weight: 700; }
.ans .more { margin: 0 12px 10px; border: 0; background: none; color: var(--link); cursor: pointer; padding: 2px 0; font-size: .85rem; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.mpick { display: flex; flex-wrap: wrap; gap: 6px; }
.mpick button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: .86rem; cursor: pointer; min-height: 36px; }
.mpick button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: transparent; font-weight: 600; }
.dpanel { margin: 8px 0 14px; }
.exnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }

/* game */
.game { max-width: 820px; margin: 0 auto; padding: 20px 22px; }
@media (max-width: 560px) { .game { padding: 16px 14px; } }
.gtabs { display: flex; justify-content: center; margin-bottom: 16px; }
.gstatus { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.gprog { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.gprog span { display: block; height: 100%; background: var(--neq); transition: width .3s; }
.gq { font-size: 1.1rem; margin: 0 0 10px; }
.gbox { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 12px 14px; margin-bottom: 12px; }
.gbox .lbl { font-size: .76rem; color: var(--muted); font-weight: 650; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.gquote { white-space: pre-wrap; word-break: break-word; font-size: 1rem; line-height: 1.75; border-left: 3px solid var(--line-2); padding-left: 12px; margin: 0; }
.gchoices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.gchoices button { padding: 14px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 650; font-size: .98rem; min-height: 56px; line-height: 1.35; }
.gchoices button:hover:not([disabled]) { background: var(--surface-2); border-color: var(--focus); }
.gchoices button small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.gchoices button.correct { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.gchoices button.wrongpick { background: var(--bad-bg); color: var(--bad-ink); border-color: transparent; }
.gchoices button[disabled] { cursor: default; }
.greveal { border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; background: var(--surface); border: 1px solid var(--line); }
.greveal h4 { margin: 0 0 6px; font-size: 1.05rem; }
.greveal.ok h4 { color: var(--ok-ink); }
.greveal.half h4 { color: var(--warn-ink); }
.greveal.bad h4 { color: var(--bad-ink); }
.gbars { display: grid; gap: 6px; margin: 8px 0; }
.gbar { display: grid; grid-template-columns: 70px 1fr 44px; gap: 8px; align-items: center; font-size: .9rem; }
.gbar .bt { height: 14px; border-radius: 7px; }
.gbar .bt .bf { border-radius: 7px; }
.gbar .val { font-variant-numeric: tabular-nums; text-align: right; font-weight: 650; }
.gtable { width: 100%; border-collapse: collapse; font-size: .86rem; margin-top: 8px; }
.gtable th, .gtable td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.gtable td.num, .gtable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.gtable tr.hit td { font-weight: 700; background: var(--info-bg); }
.gactions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 10px; }
.gend { text-align: center; padding: 10px 0; }
.gend .big { font-size: 2.6rem; font-weight: 800; }
.gend .grid { font-size: 1.6rem; letter-spacing: .15em; margin: 6px 0 4px; }
.sharebox { white-space: pre-wrap; text-align: left; font-size: .9rem; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 12px auto; max-width: 560px; border: 1px solid var(--line); }
.gintro { text-align: center; color: var(--ink-2); max-width: 36em; margin: 0 auto 16px; }

/* more results */
.mr .num { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.mr .num small { font-size: .5em; color: var(--muted); font-weight: 600; }
.mr h3 { font-size: 1.02rem; }
.mr p, .mr li { color: var(--ink-2); font-size: .93rem; }
.mr ul { padding-left: 1.2em; margin: 0 0 .8em; }
.quote { border-left: 3px solid var(--line-2); padding: 4px 0 4px 12px; margin: 8px 0 12px; font-size: .9rem; color: var(--ink-2); }
.cmpbars { display: grid; gap: 6px; margin: 10px 0; }
.cmpbar { display: grid; grid-template-columns: 112px 1fr 50px; gap: 8px; align-items: center; font-size: .86rem; }
.cmpbar .bt { height: 12px; }
.cmpbar .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }

/* limitations, bibtex, footer */
.lim li { margin-bottom: .6em; }
.bib { position: relative; }
.bib pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: .84rem; line-height: 1.6; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--line); }
.bib .copy { position: absolute; top: 10px; right: 10px; }
footer.foot { padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
footer.foot p { max-width: 62em; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; font-size: .9rem; z-index: 200; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
@media print {
  .topbar, .video, #game, .tools { display: none !important; }
  body { background: #fff; color: #000; }
}
@media (forced-colors: active) {
  .bf, .dot, .db, .sw { forced-color-adjust: none; }
}
