/* 禅意水墨: rice paper, ink, one vermilion seal. Dark mode is ink ground with gold.
   Series colours are mineral pigments (石绿 / 赭石 / 靛青), validated for CVD separation
   and contrast in both modes. Speaker colours stay neutral ink / 藕荷. */
/* Calligraphy, subset to the few characters used: 龙藏体 (行书) for the inscription, 马善政 for the seal. Both SIL OFL. */
@font-face { font-family: "LongCang Title"; src: url("fonts/longcang-title.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "MaShanZheng Seal"; src: url("fonts/mashanzheng-seal.woff2") format("woff2"); font-display: swap; }
:root {
  --bg: #f2ece0;
  --surface: #faf7f0;
  --sunk: #e9e2d3;
  --ink: #1e1b17;
  --muted: #645c51;
  --line: #d9cfbe;
  --accent: #a8352a;
  --seal: #b5372a;
  --enso: #1e1b17;
  --title: #1e1b17;
  --cc: #3d55b5;
  --cg: #c45a2a;
  --gg: #0c8569;
  --spk-a: #5b5349;
  --spk-b: #7b5a92;
  --spk-a-soft: #ebe5d9;
  --spk-b-soft: #ece4ee;
  --band: #e4ddcc;
  --mark: #f0d48a;
  --mark-ink: #3b2f00;
  --focus: #a8352a;
  --shadow: 0 1px 0 rgb(60 40 20 / 0.04), 0 10px 28px -18px rgb(60 40 20 / 0.35);
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .24 0 0 0 0 .15 0 0 0 .4 -.17'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-brush: "LongCang Title", "STXingkai", "STKaiti", "KaiTi", "Noto Serif SC", serif;
  --font-seal: "MaShanZheng Seal", "STKaiti", "KaiTi", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sticky-h: 0px;
  --tabs-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110; --surface: #1a1816; --sunk: #23201d; --ink: #ece4d4; --muted: #a59c8d; --line: #35302a;
    --accent: #d4aa62; --seal: #c0473a; --enso: #e6dccb; --title: #dcb873;
    --cc: #6f86e8; --cg: #d4703a; --gg: #1f9e7c; --spk-a: #b3a998; --spk-b: #b195d0;
    --spk-a-soft: #25221f; --spk-b-soft: #2a2330; --band: #262320; --mark: #6b5a12; --mark-ink: #fff6cc;
    --focus: #d4aa62; --shadow: 0 1px 0 rgb(0 0 0 / 0.2), 0 12px 30px -18px rgb(0 0 0 / 0.7);
    --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .85 0 0 0 0 .8 0 0 0 0 .7 0 0 0 .22 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121110; --surface: #1a1816; --sunk: #23201d; --ink: #ece4d4; --muted: #a59c8d; --line: #35302a;
  --accent: #d4aa62; --seal: #c0473a; --enso: #e6dccb; --title: #dcb873;
  --cc: #6f86e8; --cg: #d4703a; --gg: #1f9e7c; --spk-a: #b3a998; --spk-b: #b195d0;
  --spk-a-soft: #25221f; --spk-b-soft: #2a2330; --band: #262320; --mark: #6b5a12; --mark-ink: #fff6cc;
  --focus: #d4aa62; --shadow: 0 1px 0 rgb(0 0 0 / 0.2), 0 12px 30px -18px rgb(0 0 0 / 0.7);
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .85 0 0 0 0 .8 0 0 0 0 .7 0 0 0 .22 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background-color: var(--bg); background-image: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: color-mix(in oklab, var(--accent) 22%, transparent); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100svh, 960px); display: grid; align-items: center; padding-block: max(40px, env(safe-area-inset-top, 0px)) 88px; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 50%; top: 46%; width: min(1100px, 140vw); aspect-ratio: 1.6; transform: translate(-58%, -50%); background: radial-gradient(closest-side, color-mix(in oklab, var(--ink) 7%, transparent), transparent 72%); pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(20px, 3.4vw, 52px); width: 100%; }
.art { justify-self: end; width: min(40vw, 460px); aspect-ratio: 1; position: relative; color: var(--enso); }
.art svg, .art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.enso-ink { opacity: 0.94; }
.enso-mask { fill: none; stroke: #fff; stroke-width: 70; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.anim .enso-mask { animation: draw 2.5s cubic-bezier(0.6, 0.04, 0.3, 1) 0.25s both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.enso-dot { transform-box: fill-box; transform-origin: center; }
.anim .enso-dot { animation: dotin 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 3.7s both, breathe 7s ease-in-out 5.2s infinite; }
@keyframes dotin { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes breathe { 50% { transform: scale(1.12); } }
.inscr { display: flex; flex-direction: column; align-items: center; gap: 22px; align-self: center; padding-top: 6px; }
.title { writing-mode: vertical-rl; font-family: var(--font-brush); font-weight: 400; font-size: clamp(54px, 6.4vw, 92px); letter-spacing: 0.06em; line-height: 1; margin: 0; color: var(--title); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.seal { position: relative; display: grid; place-items: center; width: 60px; padding: 7px 0 6px; background: var(--seal); color: #fbf4ea; border-radius: 4px; font-family: var(--font-seal); font-size: 35px; line-height: 1.02; writing-mode: vertical-rl; filter: url(#seal-rough); box-shadow: inset 0 0 0 3px var(--seal), inset 0 0 0 5px #fbf4ea; }
.anim .seal { animation: stamp 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) 2.9s both; }
@keyframes stamp { from { transform: scale(1.5) rotate(-6deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.hero-text { max-width: 31em; }
.anim .hi { animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(0.5s + var(--k, 0) * 0.16s); }
.anim .title { animation: inkin 1.6s ease both 0.35s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes inkin { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }
.eyebrow { font-size: 12.5px; letter-spacing: 0.16em; color: var(--muted); }
.en { margin: 6px 0 18px; font-family: var(--font-serif); font-style: italic; font-size: 15px; letter-spacing: 0.04em; color: var(--muted); }
.lede { margin: 0; font-family: var(--font-serif); font-size: 17px; line-height: 1.95; }
.byline { margin: 14px 0 0; font-size: 14px; font-weight: 600; }
.byline span { font-weight: 400; color: var(--muted); }
.hq { display: block; margin: 26px 0 0; padding: 2px 0 2px 16px; border: 0; border-left: 2px solid var(--seal); background: none; text-align: left; cursor: pointer; }
.hq-t { display: block; font-family: var(--font-serif); font-size: 17px; letter-spacing: 0.06em; }
.hq-m { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.hq:hover .hq-t { text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--seal) 60%, transparent); text-underline-offset: 5px; }
.hstats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px 28px; margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.hstats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.hstats dt { font-size: 12.5px; color: var(--muted); line-height: 1.5; max-width: 9em; }
.hstats dd { margin: 0; font-family: var(--font-serif); font-size: 30px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums lining-nums; }
.hstats dd small { font-size: 15px; font-weight: 400; color: var(--muted); }
.cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; font-size: 12px; letter-spacing: 0.3em; color: var(--muted); text-decoration: none; padding: 4px 8px; }
.cue i { width: 1px; height: 34px; background: linear-gradient(var(--ink), transparent); transform-origin: top; }
.anim .cue i { animation: drip 2.6s ease-in-out 4s infinite both; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- tabs ---------- */
.tabs { position: sticky; top: 0; z-index: 40; background: color-mix(in oklab, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.tabs-in { display: flex; align-items: center; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 8px; max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; text-decoration: none; font-family: var(--font-serif); font-weight: 600; font-size: 15px; transition: max-width 0.5s ease, opacity 0.4s ease, margin 0.5s ease; }
.brand svg { flex: none; width: 22px; height: 22px; color: var(--enso); }
body.past-hero .brand { max-width: 200px; opacity: 1; margin-right: 10px; }
.tablist { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tab { position: relative; border: 0; background: none; padding: 14px 14px 13px; cursor: pointer; color: var(--muted); white-space: nowrap; font-family: var(--font-serif); font-size: 15.5px; font-weight: 600; letter-spacing: 0.04em; }
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 6px; background: var(--accent); -webkit-mask: var(--brush) no-repeat center / 100% 100%; mask: var(--brush) no-repeat center / 100% 100%; transform: scaleX(0); transform-origin: left; transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { transform: none; }
.tab:hover { color: var(--ink); }
.theme { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-family: var(--font-brush); font-size: 18px; line-height: 1; display: grid; place-items: center; padding: 0 0 2px; }
.theme:hover { border-color: var(--ink); }
:root { --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2.5 7.6C19 4.6 47 3.3 77 3.5c15 .1 29 .8 40.5 2-8.6 1.8-25.5 2.9-45 3.3-25 .5-47.6.6-68.6.2-2.3 0-2.9-1-1.4-1.4z'/%3E%3C/svg%3E"); }
main.pane { padding-block: 34px 72px; }

/* ---------- prose ---------- */
.prose { max-width: 40em; }
.prose, .lead { font-family: var(--font-serif); }
.prose { font-size: 16px; line-height: 1.95; }
h2 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(23px, 2.4vw, 28px); line-height: 1.35; letter-spacing: 0.03em; margin: 56px 0 14px; text-wrap: balance; }
h2::after { content: ""; display: block; width: 58px; height: 7px; margin-top: 10px; background: var(--ink); opacity: 0.7; -webkit-mask: var(--brush) no-repeat left center / 100% 100%; mask: var(--brush) no-repeat left center / 100% 100%; }
h3 { font-family: var(--font-serif); font-size: 18px; font-weight: 600; margin: 28px 0 8px; text-wrap: balance; }
p { margin: 0.6em 0; }
ul.list { margin: 0.5em 0; padding-left: 1.3em; }
ul.list li { margin: 0.45em 0; }
ul.list li::marker { color: var(--muted); }
.lead { font-size: 18px; line-height: 1.95; max-width: 38em; }
.note { font-size: 13px; color: var(--muted); font-family: var(--font-body); }
code { font-family: var(--font-mono); font-size: 0.88em; background: var(--sunk); padding: 1px 5px; border-radius: 3px; }
.key { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: baseline; margin-right: 6px; }
.k-cc { background: var(--cc); } .k-cg { background: var(--cg); } .k-gg { background: var(--gg); }

/* ---------- experiment cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 3px; padding: 18px 20px; display: grid; gap: 6px; align-content: start; min-width: 0; box-shadow: var(--shadow); }
.card.c-cc { border-top-color: var(--cc); } .card.c-cg { border-top-color: var(--cg); } .card.c-gg { border-top-color: var(--gg); }
.card .ct { font-family: var(--font-serif); font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.card .cl { font-size: 13px; color: var(--muted); }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 8px 0 0; font-size: 13px; }
.card dt { color: var(--muted); } .card dd { margin: 0; font-variant-numeric: tabular-nums; }
.card .go { justify-self: start; margin-top: 8px; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 5px 14px; cursor: pointer; font-size: 13px; transition: border-color 0.2s, background 0.2s; }
.card .go:hover { border-color: var(--ink); background: var(--bg); }

/* ---------- stance ---------- */
.stance { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--line); }
.stance .claim { position: relative; font-size: 19px; line-height: 1.9; margin: 16px 0 10px; padding: 22px 26px 22px 30px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--seal); border-radius: 3px; box-shadow: var(--shadow); }
.stance blockquote { margin: 14px 0; padding: 4px 16px; border-left: 2px solid var(--line); color: var(--muted); font-size: 14.5px; }
.stance blockquote span { display: block; color: var(--ink); font-size: 16px; font-style: italic; }
ol.list { margin: 0.5em 0; padding-left: 1.4em; }
ol.list li { margin: 0.45em 0; }
.stance a { text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--ink) 40%, transparent); text-underline-offset: 3px; }
.stance a:hover { text-decoration-color: var(--accent); }

.scope { max-width: 46em; margin: 18px 0 0; padding: 14px 18px; background: color-mix(in oklab, var(--sunk) 70%, transparent); border-radius: 3px; font-size: 14px; line-height: 1.85; }

/* ---------- tables: 三线表 ---------- */
.tablewrap { overflow-x: auto; margin-top: 14px; }
table.data { border-collapse: collapse; font-size: 13.5px; min-width: 560px; width: 100%; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
table.data th, table.data td { padding: 9px 12px; text-align: left; vertical-align: top; }
table.data td { border-top: 1px solid color-mix(in oklab, var(--line) 70%, transparent); }
table.data thead th { font-weight: 600; color: var(--ink); font-size: 12.5px; border-bottom: 1px solid var(--ink); white-space: nowrap; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 12.5px; }
table.data tr.linkrow { cursor: pointer; } table.data tr.linkrow:hover td { background: color-mix(in oklab, var(--sunk) 60%, transparent); }

/* ---------- charts ---------- */
.fig { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 20px 22px 14px; margin-top: 22px; position: relative; box-shadow: var(--shadow); }
.fig h3 { margin: 0 0 4px; font-size: 16.5px; }
.fig .sub { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.fig .legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.fig .legend span { display: inline-flex; align-items: center; gap: 6px; }
.fig.prose { font-size: 15px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
svg .grid { stroke: var(--line); stroke-width: 1; }
svg .axis { stroke: var(--muted); stroke-width: 1; }
svg .tick { fill: var(--muted); font-family: var(--font-mono); font-size: 10.5px; }
svg .lbl { fill: var(--ink); font-size: 12.5px; }
svg .lbl-muted { fill: var(--muted); font-size: 11.5px; }
svg .s-cc { fill: var(--cc); } svg .s-cg { fill: var(--cg); } svg .s-gg { fill: var(--gg); }
svg .l-cc { stroke: var(--cc); } svg .l-cg { stroke: var(--cg); } svg .l-gg { stroke: var(--gg); }
svg .ring { stroke: var(--surface); stroke-width: 2; }
svg .line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg .med { stroke: var(--ink); stroke-width: 2; }
svg .bar-muted { fill: var(--muted); opacity: 0.55; }
svg .band { fill: var(--band); }
svg .hitbox { fill: transparent; cursor: pointer; }
svg .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; z-index: 60; pointer-events: none; max-width: 300px; padding: 7px 10px; font-size: 12px; line-height: 1.55; background: var(--ink); color: var(--bg); border-radius: 3px; box-shadow: 0 8px 24px -10px rgb(0 0 0 / 0.4); }
.panel-row { cursor: pointer; }
/* chart entrances: marks bloom in, lines are drawn, panels are wiped on like ink */
.anim .fig .mk { transform-box: fill-box; transform-origin: center; transition: opacity 0.5s ease var(--d, 0s), transform 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.15) var(--d, 0s); }
.anim .fig:not(.seen) .mk { opacity: 0; transform: scale(0.2); }
.anim .fig .grow { transform-box: fill-box; transform-origin: left center; transition: transform 1s cubic-bezier(0.25, 0.8, 0.25, 1) var(--d, 0s); }
.anim .fig:not(.seen) .grow { transform: scaleX(0); }
.anim .fig .wipe { clip-path: inset(0 0 0 0); transition: clip-path 1.8s cubic-bezier(0.5, 0, 0.25, 1) var(--d, 0s); }
.anim .fig:not(.seen) .wipe { clip-path: inset(0 100% 0 0); }
.anim .fig .drawn { transition: stroke-dashoffset 1.8s cubic-bezier(0.5, 0, 0.25, 1) var(--d, 0s); }
.anim .fig .fadein { transition: opacity 0.8s ease var(--d, 0s); }
.anim .fig:not(.seen) .fadein { opacity: 0; }

/* ---------- quotes / stages ---------- */
.stages { display: grid; gap: 22px; margin-top: 16px; }
.stage { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; align-items: start; }
.stage .sname { font-family: var(--font-serif); font-weight: 600; font-size: 16px; padding-top: 4px; }
.stage .sname small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: 12.5px; line-height: 1.55; margin-top: 4px; }
.quotes { display: grid; gap: 10px; min-width: 0; }
.quote { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gg); border-radius: 2px 3px 3px 2px; padding: 11px 16px 10px; cursor: pointer; box-shadow: var(--shadow); transition: border-color 0.25s, transform 0.25s; }
.quote.q-cc { border-left-color: var(--cc); } .quote.q-cg { border-left-color: var(--cg); }
.quote:hover { border-color: var(--ink); transform: translateX(2px); }
.quote .qt { font-family: var(--font-serif); font-size: 15.5px; line-height: 1.85; overflow-wrap: anywhere; }
.quote .qm { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; font-family: var(--font-body); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* ---------- the descent: six stages, ink thinning as it goes ---------- */
.descent-list { position: relative; --p: 0; gap: 34px; margin-top: 26px; }
.descent-list::before, .descent-list .inkline { content: ""; position: absolute; left: 23px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.descent-list .inkline { width: 3px; left: 22px; border-radius: 3px; background: linear-gradient(var(--ink), color-mix(in oklab, var(--ink) 18%, transparent)); transform-origin: top; transform: scaleY(var(--p)); }
.descent-list .stage { grid-template-columns: 48px 150px minmax(0, 1fr); --tone: color-mix(in oklab, var(--ink) calc(100% - var(--i) * 13%), var(--bg)); }
.descent-list .num { position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bg); font-family: var(--font-brush); font-size: 30px; line-height: 1; color: var(--tone); }
.descent-list .quote { background: color-mix(in oklab, var(--surface) calc(100% - var(--i) * 20%), transparent); border-color: color-mix(in oklab, var(--line) calc(100% - var(--i) * 20%), transparent); border-left-color: color-mix(in oklab, var(--gg) calc(100% - var(--i) * 9%), transparent); box-shadow: none; }
.descent-list .d0 .quote, .descent-list .d1 .quote { box-shadow: var(--shadow); }
.descent-list .quote .qt { letter-spacing: calc(var(--i) * 0.018em); line-height: calc(1.85 + var(--i) * 0.05); }
.descent-list .d4 .quote, .descent-list .d5 .quote { padding-left: 18px; }
.descent-list .quote:hover { border-color: var(--ink); }
.descent-end { display: grid; justify-items: start; padding: 26px 0 8px 17px; }
.descent-end i { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); opacity: 0.85; filter: blur(0.4px); }
.anim .descent-end i { animation: breathe 6s ease-in-out infinite; }
.anim .rv { opacity: 0; transform: translateY(16px); transition: opacity calc(0.7s + var(--i, 0) * 0.16s) ease calc(var(--j, 0) * 0.09s), transform calc(0.9s + var(--i, 0) * 0.16s) cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--j, 0) * 0.09s); }
.anim .rv.in { opacity: 1; transform: none; }
.anim .num.rv { transform: scale(0.6); }
.anim .num.rv.in { transform: none; }

/* ---------- transcripts (reader) ---------- */
.expsw { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.expsw button { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 15px; cursor: pointer; font-family: var(--font-serif); }
.expsw button[aria-pressed="true"] { border-color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ink); }
.search { position: relative; max-width: 440px; margin-bottom: 18px; }
.search label { display: block; font-size: 12px; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 4px; }
.search input { width: 100%; padding: 9px 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); }
.search input:focus { border-color: var(--ink); outline: none; }
.results { position: absolute; z-index: 50; top: 100%; left: 0; right: 0; margin-top: 6px; max-height: min(60vh, 460px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 14px 34px -12px rgb(0 0 0 / 0.25); }
.results .count { padding: 8px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.results button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font-size: 13px; line-height: 1.6; }
.results button:hover, .results button:focus-visible { background: var(--sunk); }
.results .where { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-right: 6px; }
mark { background: var(--mark); color: var(--mark-ink); border-radius: 2px; padding: 0 1px; }
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
.rail { position: sticky; top: calc(var(--tabs-h) + 8px); max-height: calc(100vh - var(--tabs-h) - 8px); overflow: auto; padding-bottom: 16px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; }
.group-label { font-size: 12px; letter-spacing: 0.06em; color: var(--muted); margin: 4px 2px 6px; }
.group-label b { font-weight: 600; color: var(--ink); }
.group { display: flex; flex-direction: column; gap: 6px; }
.ccard { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; text-align: left; width: 100%; padding: 9px 11px; border: 1px solid transparent; border-radius: 3px; background: none; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.ccard:hover { background: var(--surface); border-color: var(--line); }
.ccard[aria-current="true"] { background: var(--surface); border-color: var(--ink); box-shadow: var(--shadow); }
.ccard .t { font-family: var(--font-serif); font-weight: 600; }
.ccard .meta { grid-column: 1 / -1; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.ccard svg { grid-row: 1; grid-column: 2; display: block; }
.sym { font-family: var(--font-mono); background: var(--sunk); border-radius: 3px; padding: 0 4px; color: var(--ink); }
.vmain { min-width: 0; }
.head { display: grid; gap: 10px; padding-bottom: 12px; }
.head-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.head h2 { margin: 0; font-size: 25px; }
.head h2::after { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 999px; background: var(--sunk); color: var(--ink); white-space: nowrap; font-family: var(--font-body); }
.stats { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; font-size: 13px; }
.stats div { display: flex; gap: 6px; align-items: baseline; }
.stats dt { color: var(--muted); } .stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.prompt { margin: 0; padding: 11px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; font-size: 14px; max-width: 78ch; }
.prompt .lbl { display: block; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
.trace { background: color-mix(in oklab, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding-block: 8px 10px; border-bottom: 1px solid var(--line); z-index: 10; }
@media (min-width: 900px) { .trace { position: sticky; top: var(--tabs-h); } }
.trace-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.tkey { display: inline-flex; align-items: center; gap: 5px; }
.tkey i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.tkey .ka { background: var(--spk-a); } .tkey .kb { background: var(--spk-b); } .tkey .kt { background: var(--sunk); border: 1px solid var(--line); }
.toggles label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--ink); }
.toggles input { accent-color: var(--accent); }
#vchart { position: relative; height: 128px; }
#vchart svg { display: block; width: 100%; height: 128px; cursor: pointer; }
#vchart .ba { fill: var(--spk-a); } #vchart .bb { fill: var(--spk-b); } #vchart .bz { fill: var(--muted); opacity: 0.5; }
#vchart .tailband { fill: var(--sunk); } #vchart .taillbl { fill: var(--muted); font-size: 11px; }
#vchart .cursor { fill: none; stroke: var(--ink); stroke-width: 1.5; }
#vchart .hot { fill: none; stroke: var(--cg); stroke-width: 1.5; }
.thread { display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
.msg { display: flex; gap: 10px; align-items: flex-start; scroll-margin-top: calc(var(--sticky-h) + var(--tabs-h) + 16px); }
.msg.b { flex-direction: row-reverse; }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-serif); font-weight: 600; font-size: 13px; color: var(--surface); }
.a .avatar { background: var(--spk-a); } .b .avatar { background: var(--spk-b); }
.bubble { min-width: 0; max-width: min(72ch, 86%); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 11px 15px 13px; box-shadow: var(--shadow); }
.a .bubble { border-top-left-radius: 0; border-left: 3px solid var(--spk-a); }
.b .bubble { border-top-right-radius: 0; border-right: 3px solid var(--spk-b); }
.bubble header { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.bubble header .seq { font-family: var(--font-mono); color: var(--ink); }
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0.5em 0; } .md ul, .md ol { margin: 0.5em 0; padding-left: 1.4em; } .md li { margin: 0.2em 0; }
.md blockquote { margin: 0.6em 0; padding: 2px 12px; border-left: 3px solid var(--line); color: var(--muted); }
.md code { font-family: var(--font-mono); font-size: 0.9em; background: var(--sunk); padding: 1px 4px; border-radius: 3px; }
.md pre { overflow-x: auto; background: var(--sunk); padding: 8px 10px; border-radius: 3px; }
.md pre code { background: none; padding: 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 0.8em 0; }
.md h1, .md h2, .md h3, .md h4 { font-size: 1em; margin: 0.8em 0 0.3em; font-family: var(--font-body); letter-spacing: 0; }
.md h1::after, .md h2::after { display: none; }
.md .tw { overflow-x: auto; } .md table { border-collapse: collapse; font-size: 0.92em; } .md th, .md td { border: 1px solid var(--line); padding: 3px 8px; }
.empty { color: var(--muted); font-style: italic; margin: 0; }
.tiny .md { font-family: var(--font-mono); font-size: 18px; line-height: 1.3; }
.msg.scripted .bubble { border-style: dashed; background: transparent; box-shadow: none; }
.vnote { align-self: center; max-width: 72ch; font-size: 12.5px; color: var(--muted); background: var(--sunk); border-radius: 3px; padding: 8px 12px; }
.vnote code { font-family: var(--font-body); color: var(--ink); }
.fold { align-self: center; border: 1px dashed var(--line); background: var(--surface); border-radius: 999px; padding: 6px 18px; font-size: 13px; color: var(--muted); cursor: pointer; }
.fold:hover { color: var(--ink); border-color: var(--muted); }
.flags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.flag { font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 3px; background: var(--sunk); color: var(--ink); }
body:not(.show-flags) .flags { display: none; }
body.show-flags .msg.hot3 .bubble { box-shadow: 0 0 0 2px var(--cg); }
.msg.flash .bubble { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px var(--focus); } to { box-shadow: 0 0 0 0 transparent; } }
.loading { display: flex; align-items: center; gap: 12px; padding: 40px 4px; color: var(--muted); font-family: var(--font-serif); }
.loading i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); animation: breathe 1.6s ease-in-out infinite; }
.loading button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.foot { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; max-width: 90ch; }
.foot kbd { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; background: var(--surface); }

/* ---------- colophon ---------- */
.colophon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-block: 28px 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.colophon svg { width: 26px; height: 26px; color: var(--enso); }
.colophon a { text-decoration: none; border-bottom: 1px solid var(--line); }
.colophon a:hover { border-color: var(--ink); color: var(--ink); }
.colophon .sp { flex: 1; }

@media (prefers-reduced-motion: reduce) { .msg.flash .bubble { animation: none; outline: 2px solid var(--focus); } html { scroll-behavior: auto !important; } .loading i { animation: none; } }

@media (max-width: 899px) {
  .hero { min-height: auto; padding-block: max(28px, env(safe-area-inset-top, 0px)) 76px; }
  .hero-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "art inscr" "text text"; row-gap: 26px; }
  .art { grid-area: art; justify-self: center; width: min(66vw, 360px); }
  .inscr { grid-area: inscr; gap: 16px; }
  .title { font-size: clamp(46px, 12vw, 66px); }
  .seal { width: 48px; font-size: 28px; }
  .hero-text { grid-area: text; max-width: none; }
  .hstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .descent-list .stage { grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; }
  .descent-list .num { width: 38px; height: 38px; font-size: 24px; grid-row: span 2; }
  .descent-list .sname, .descent-list .quotes { grid-column: 2; }
  .descent-list::before, .descent-list .inkline { left: 18px; }
  .descent-list .inkline { left: 17px; }
  .descent-end { padding-left: 12px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rail { position: static; max-height: none; flex-direction: row; overflow-x: auto; gap: 16px; padding-bottom: 6px; }
  .group { flex-direction: row; } .group-wrap { flex: none; }
  .ccard { width: 150px; border-color: var(--line); background: var(--surface); }
  .bubble { max-width: calc(100% - 40px); }
  .tab { padding-inline: 8px; font-size: 14px; letter-spacing: 0; }
  .tab::after { left: 6px; right: 6px; }
  .brand { display: none; }
}

/* ---------- language switch ---------- */
.lang-hero { position: absolute; z-index: 5; top: max(20px, env(safe-area-inset-top, 0px)); right: max(22px, env(safe-area-inset-right, 0px)); padding: 10px 22px; border: 1px solid color-mix(in oklab, var(--ink) 35%, transparent); border-radius: 999px; background: color-mix(in oklab, var(--surface) 80%, transparent); font-size: 16px; font-weight: 600; letter-spacing: 0.05em; text-decoration: none; transition: border-color 0.2s, background 0.2s; }
.lang-hero:hover { background: var(--surface); }
.lang-hero:hover, .lang-tab:hover { border-color: var(--ink); }
.lang-tab { flex: none; display: grid; place-items: center; height: 36px; padding: 0 16px; border: 1px solid color-mix(in oklab, var(--ink) 30%, transparent); border-radius: 999px; background: var(--surface); font-size: 15px; font-weight: 600; text-decoration: none; }
.theme svg { width: 17px; height: 17px; display: block; }

/* ---------- English page ---------- */
html[lang="en"] {
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Cormorant Garamond", "Newsreader", Georgia, serif;
}
html[lang="en"] body { font-size: 15px; line-height: 1.6; }
html[lang="en"] .hero-h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.01em; margin: 10px 0 20px; text-wrap: balance; }
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; }
html[lang="en"] .lede { font-size: 19px; line-height: 1.6; }
html[lang="en"] .hq-t { font-style: italic; font-size: 18px; letter-spacing: 0; line-height: 1.5; }
html[lang="en"] .hstats dt { max-width: 11em; }
html[lang="en"] .prose { max-width: 38em; font-size: 17.5px; line-height: 1.7; }
html[lang="en"] .lead { font-size: 20px; line-height: 1.6; max-width: 36em; }
html[lang="en"] h2 { font-size: clamp(25px, 2.6vw, 31px); letter-spacing: 0; font-weight: 600; }
html[lang="en"] h3 { font-size: 19px; }
html[lang="en"] .tab { font-size: 16px; letter-spacing: 0.01em; }
html[lang="en"] .quote .qt { font-size: 16.5px; line-height: 1.6; }
html[lang="en"] .descent-list .quote .qt { line-height: calc(1.6 + var(--i) * 0.05); letter-spacing: calc(var(--i) * 0.008em); }
html[lang="en"] .stance .claim { font-size: 21px; line-height: 1.6; }
html[lang="en"] .scope { font-size: 15px; line-height: 1.65; }
html[lang="en"] .md { font-size: 15.5px; line-height: 1.65; }
html[lang="en"] .card .ct, html[lang="en"] .expsw button, html[lang="en"] .ccard .t { font-size: 17px; }
@media (max-width: 899px) {
  html[lang="en"] .tab { font-size: 14.5px; }
  .lang-tab { padding: 0 10px; }
}
.trnote { margin: 0 0 16px; }
.trnote a, .prose a.langlink { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- video ---------- */
.watch { display: inline-flex; align-items: center; gap: 14px; margin: 24px 0 0; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.watch-ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--bg); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s; }
.watch-ic svg { width: 20px; height: 20px; fill: currentColor; margin-left: 2px; }
.watch:hover .watch-ic { transform: scale(1.06); box-shadow: 0 0 0 8px color-mix(in oklab, var(--ink) 10%, transparent); }
.watch-t { display: grid; font-family: var(--font-serif); font-size: 17px; font-weight: 600; line-height: 1.35; }
.watch-t small { font-family: var(--font-body); font-size: 12.5px; font-weight: 400; color: var(--muted); }
.anim .watch-ic { animation: ripple 2.6s ease-out 5.4s 2; }
@keyframes ripple { from { box-shadow: 0 0 0 0 color-mix(in oklab, var(--ink) 30%, transparent); } to { box-shadow: 0 0 0 18px transparent; } }
@media (max-width: 899px) { .hero { padding-top: 76px; } .lang-hero { top: max(16px, env(safe-area-inset-top, 0px)); } }
.byline .au { display: block; font-weight: 600; color: var(--ink); }
.byline .au + .au { margin-top: 2px; }
@media (max-width: 599px) {
  .tab-x { display: none; }
  .cue { display: none; }
  .tabs-in { gap: 6px; }
  .tab, html[lang="en"] .tab { padding-inline: 7px; font-size: 14px; }
  .theme, .lang-tab { width: 32px; height: 32px; padding: 0; font-size: 12px; }
}
@media (max-width: 599px) { html[lang="en"] .tab { padding-inline: 5px; font-size: 13.5px; } }

/* ---------- English inscription: Kaushan Script brush with a Cormorant seal ---------- */
@font-face { font-family: "Kaushan Inscription"; src: url("fonts/kaushan-inscription.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant Seal"; src: url("fonts/cormorant-seal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
html[lang="en"] { --font-brush: "Kaushan Inscription", "Brush Script MT", cursive; --font-seal: "Cormorant Seal", "Cormorant Garamond", Georgia, serif; }
html[lang="en"] .title { font-size: clamp(46px, 5.2vw, 76px); letter-spacing: 0.01em; }
html[lang="en"] .seal { width: auto; padding: 16px 11px 12px; font-size: 19px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; line-height: 1; }
html[lang="en"] .descent-list .num { font-size: 22px; }

/* ---------- the film, just below the hero ---------- */
.film { padding-block: 24px 96px; }
.film-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 76px); align-items: center; }
.film-text h2 { margin-top: 10px; }
.film-text p { margin: 0; font-family: var(--font-serif); font-size: 17px; line-height: 1.8; color: var(--muted); max-width: 26em; }
html[lang="en"] .film-text p { font-size: 18px; line-height: 1.6; }
.film-frame { position: relative; justify-self: center; width: 100%; max-width: 680px; aspect-ratio: 1; border-radius: 4px; overflow: hidden; background: #0b0b0c; box-shadow: 0 30px 70px -30px rgb(30 20 10 / 0.55); }
.film-frame video { display: block; width: 100%; height: 100%; }
.film-play { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; border: 0; background: rgb(242 236 224 / 0.94); color: #1e1b17; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 30px -8px rgb(0 0 0 / 0.5); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s; }
.film-play svg { width: 36px; height: 36px; fill: currentColor; margin-left: 5px; }
.film-play:hover { transform: scale(1.07); }
.film-frame.started .film-play { opacity: 0; pointer-events: none; }
@media (max-width: 899px) { .film-in { grid-template-columns: minmax(0, 1fr); gap: 20px; } .film { padding-block: 0 64px; } .film-play { width: 76px; height: 76px; margin: -38px 0 0 -38px; } }
@media (max-width: 599px) { .lang-hero { font-size: 15px; padding: 8px 18px; } .lang-tab { width: auto; padding: 0 11px; font-size: 13px; } }
html[lang="en"] .title { font-size: clamp(40px, 4.4vw, 64px); }
html[lang="en"] .seal { filter: none; padding: 14px 9px 10px; font-size: 19px; font-weight: 700; letter-spacing: 0.26em; }
html[lang="en"] .descent-list .num { font-family: var(--font-seal); font-weight: 600; font-size: 21px; letter-spacing: 0.02em; }
@media (max-width: 899px) {
  html[lang="en"] .title { font-size: clamp(30px, 8.2vw, 42px); }
  html[lang="en"] .seal { font-size: 14px; padding: 10px 7px 8px; letter-spacing: 0.22em; }
}
@media (max-width: 599px) {
  .lang-tab { height: 32px; padding: 0 8px; font-size: 12.5px; }
  html[lang="en"] .tab { padding-inline: 4px; font-size: 13px; }
}
