/* mona-sans-vietnamese-wdth-normal */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  src: url(/_astro/mona-sans-vietnamese-wdth-normal.Rd0aZl9c.woff2) format('woff2-variations');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* mona-sans-latin-ext-wdth-normal */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  src: url(/_astro/mona-sans-latin-ext-wdth-normal.CQ1tG6In.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* mona-sans-latin-wdth-normal */
@font-face {
  font-family: 'Mona Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  font-stretch: 75% 125%;
  src: url(/_astro/mona-sans-latin-wdth-normal.BMVx8nn_.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}/* 样式入口。下面的顺序就是层叠顺序：先变量和底子，再共用的部件，最后一段一个文件。
   新加一段：在 sections/ 里加一个文件，再在这里加一行。颜色、字号、影子都从 tokens.css 取，不在各段里写死。 *//* 变量：颜色、字、间距、圆角、影子、时长。全站的值都从这里取，别的文件里不写死颜色和字号。

   深浅色：每个颜色写成 light-dark(浅, 深)，跟着元素的 color-scheme 走。
   - 默认 color-scheme 是 light dark，跟随系统；<html data-theme="light|dark"> 是访客手动选的。
   - 想让一块区域用“纸的另一面”（浅色模式下是深的，深色模式下是浅的），给它加 class="flip"，里面所有变量自动反过来。
   - 需要随深浅色变的值，尽量写成颜色（比如影子的颜色），这样不用另写选择器。 */
:root {
  color-scheme: light dark;

  /* 纸和墨 */
  --paper: light-dark(#f2f2f0, #0d0d0e);
  --raised: light-dark(#fafaf8, #17171a);
  --ink: light-dark(#0c0c0d, #ededea);
  --ink-2: light-dark(#6b6b68, #9c9c97);
  --ink-3: light-dark(#8a8a86, #6e6e6a);
  --line: light-dark(rgba(12, 12, 13, 0.12), rgba(242, 242, 240, 0.14));
  --live: light-dark(#7fae2f, #b4dc5a);
  /* 墨底上的字和细线（按钮、小标签） */
  --on-ink: var(--paper);
  --on-ink-2: light-dark(rgba(242, 242, 240, 0.62), rgba(13, 13, 14, 0.6));

  /* 光从左上来：贴地的短硬影、远一点的软影、上沿的亮边。深色底上影子看不见，靠亮边 */
  --shade-near: light-dark(rgba(12, 12, 13, 0.16), rgba(0, 0, 0, 0.5));
  --shade-far: light-dark(rgba(12, 12, 13, 0.2), rgba(0, 0, 0, 0.55));
  --rim: light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.1));
  --shine: light-dark(rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.9));
  --shadow-float: 1px 1.5px 1px var(--shade-near), 7px 12px 26px -10px var(--shade-far), inset 0 1px 0 var(--rim);
  --shadow-lift: 1px 2px 2px var(--shade-near), 14px 24px 46px -14px var(--shade-far), inset 0 1px 0 var(--rim);
  --shadow-press: 0.5px 1px 1px var(--shade-near), 2px 4px 9px -4px var(--shade-far), inset 0 1px 0 var(--rim);
  --bot-shadow: light-dark(rgba(12, 12, 13, 0.24), rgba(0, 0, 0, 0.7));
  --scrim: light-dark(rgba(242, 242, 240, 0.72), rgba(13, 13, 14, 0.72));
  /* 压在预览画面上的大字用“差值”混合，颜色要反着给：纸上想显示成墨色就给这个，想显示成弱化的灰就给下面那个 */
  --diff-ink: light-dark(#f2f2f0, #fafaf8);
  --diff-dim: light-dark(#454546, #7b7b78);

  /* 字：两套字体、三种字重、五档字号。每档带自己的行高、字距、字宽 */
  --font-sans: 'Mona Sans Variable', 'Noto Sans SC Variable', system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, 'Noto Sans SC Variable', monospace;
  --fw-regular: 430; --fw-medium: 560; --fw-bold: 640;
  --fs-mega: clamp(40px, 6.6vw, 104px); --lh-mega: 1.04; --ls-mega: -0.045em; --wd-mega: 88%;
  --fs-large: clamp(28px, 4vw, 60px); --lh-large: 1.1; --ls-large: -0.036em; --wd-large: 90%;
  --fs-statement: clamp(20px, 6px + 1.25vw, 28px); --lh-statement: 1.24; --ls-statement: -0.02em; --wd-statement: 94%;
  --fs-body: clamp(15px, 14.6px + 0.1vw, 16px); --lh-body: 1.5;
  --fs-small: 13px; --lh-small: 1.4;

  /* 版面 */
  --pad: clamp(20px, 4.4vw, 72px);
  --g: clamp(16px, 1.7vw, 24px);
  --r-xs: 6px; --r-s: 10px; --r-m: 14px; --r-l: 22px;

  /* 用 CSS 过渡时的时长和缓动；要跟手、要能打断的动效用 src/scripts/physics.ts 的弹簧 */
  --t-fast: 180ms; --t-mid: 420ms; --t-slow: 900ms;
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --e-spring-soft: linear(0, 0.19 6%, 0.56 14%, 0.86 23%, 1.01 32%, 1.045 40%, 1.04 47%, 1.012 62%, 0.998 76%, 1);
}
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }

/* 纸的另一面 */
.flip { color-scheme: dark; }
:root[data-theme='dark'] .flip { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .flip { color-scheme: light; } }

/* 中文：不加负字距，不压字宽，行高放松，大字小一号（汉字比拉丁字母满） */
:lang(zh) {
  --ls-mega: 0em; --ls-large: 0em; --ls-statement: 0em; --wd-mega: 100%; --wd-large: 100%; --wd-statement: 100%;
  --lh-mega: 1.18; --lh-large: 1.22; --lh-statement: 1.4; --lh-body: 1.6;
  --fs-mega: clamp(34px, 5.4vw, 86px); --fs-large: clamp(26px, 3.4vw, 52px);
}

/* 不认识 light-dark() 的旧浏览器：只有浅色，结尾仍然是深的 */
@supports not (color: light-dark(#000, #fff)) {
  :root {
    --paper: #f2f2f0; --raised: #fafaf8; --ink: #0c0c0d; --ink-2: #6b6b68; --ink-3: #8a8a86; --line: rgba(12, 12, 13, 0.12); --live: #7fae2f;
    --on-ink-2: rgba(242, 242, 240, 0.62); --shade-near: rgba(12, 12, 13, 0.16); --shade-far: rgba(12, 12, 13, 0.2); --rim: rgba(255, 255, 255, 0.85); --shine: rgba(255, 255, 255, 0.26);
    --bot-shadow: rgba(12, 12, 13, 0.24); --scrim: rgba(242, 242, 240, 0.72); --diff-ink: #f2f2f0; --diff-dim: #454546;
  }
  .flip {
    --paper: #0d0d0e; --raised: #17171a; --ink: #ededea; --ink-2: #9c9c97; --ink-3: #6e6e6a; --line: rgba(242, 242, 240, 0.14); --live: #b4dc5a;
    --on-ink-2: rgba(13, 13, 14, 0.6); --shade-near: rgba(0, 0, 0, 0.5); --shade-far: rgba(0, 0, 0, 0.55); --rim: rgba(255, 255, 255, 0.1); --shine: rgba(255, 255, 255, 0.9);
  }
}
/* 底子：重置、五档字、页面结构（第一屏钉住、纸盖上来）、十二栏网格、行、进场显现。 */
* { box-sizing: border-box; }
:root {
  font-family: var(--font-sans); font-size: var(--fs-body); font-weight: var(--fw-regular); line-height: var(--lh-body);
  color: var(--ink); background-color: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
/* 焦点环：所有能点的东西同一种。墨色两像素，离开一点 */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
a:focus-visible, button:focus-visible { border-radius: var(--r-xs); }
::selection { background: var(--live); color: #0c0c0d; }
:lang(zh) { letter-spacing: 0; }

/* 五档字。写新东西时直接用这几个类，或者照着取变量 */
.t-mega { font-size: var(--fs-mega); line-height: var(--lh-mega); letter-spacing: var(--ls-mega); font-stretch: var(--wd-mega); font-weight: var(--fw-bold); }
.t-large { font-size: var(--fs-large); line-height: var(--lh-large); letter-spacing: var(--ls-large); font-stretch: var(--wd-large); font-weight: var(--fw-bold); }
.t-statement { font-size: var(--fs-statement); line-height: var(--lh-statement); letter-spacing: var(--ls-statement); font-stretch: var(--wd-statement); font-weight: var(--fw-medium); }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-small { font-size: var(--fs-small); line-height: var(--lh-small); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 第一屏钉在原地，下面的内容像一张纸盖上来：纸的上沿是一条带圆角的细线 */
.sheet { position: relative; z-index: 1; padding: 1px 0 clamp(96px, 17vh, 184px); background-color: var(--paper); border-top: 1px solid var(--line); border-radius: clamp(20px, 2.4vw, 34px); }

/* ===== 第一屏以下 =====
   十二栏网格，四条竖轴：第 1 栏（段名）、第 4、7、10 栏。内容都是“行”：上面一条细线，里面的东西对在竖轴上。 */
.sec { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); margin: clamp(96px, 17vh, 184px) var(--pad) 0; padding-top: 15px; scroll-margin-top: 84px; }
.sec::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--ink); transform-origin: 0 50%; }
.js .sec::before { transform: scaleX(0); transition: transform 1.1s var(--e-out); }
.js .sec.in::before { transform: none; }
.rail { grid-column: 1 / span 3; align-self: start; position: sticky; top: 84px; font-size: var(--fs-small); font-weight: var(--fw-medium); line-height: var(--lh-small); }
.rail h2 { margin: 0; font: inherit; }
.body { grid-column: 4 / -1; display: grid; grid-template-columns: subgrid; align-content: start; margin: 0; padding: 0; list-style: none; }
.row { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: subgrid; align-items: baseline; margin: 0; padding: 0; list-style: none; }
.row::before, .row::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; transform-origin: 0 50%; pointer-events: none; }
.row::before { background: var(--line); }
.row::after { background: var(--ink); transform: scaleX(0); transition: transform 0.7s var(--e-out); }
/* 第一行上面就是段首实线 */
.row:first-child::before, .row:first-child::after { display: none; }
/* 进场：细线从左画出来，行里的字依次出现 */
.js .row::before { scale: 0 1; transition: scale 1.2s var(--e-out) calc(var(--i, 0) * 60ms); }
.js .row.in::before { scale: 1 1; }
.js .row > * { opacity: 0; translate: 0 10px; transition: opacity 0.9s var(--e-out) calc(var(--i, 0) * 60ms + 80ms), translate 1.1s var(--e-out) calc(var(--i, 0) * 60ms + 80ms); }
.js .row.in > * { opacity: 1; translate: none; }
.mask { display: block; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.mask > span { display: block; }
.js .row .mask > span { transform: translateY(112%); transition: transform 1.15s var(--e-out) calc(var(--i, 0) * 60ms + 60ms); }
.js .row.in .mask > span { transform: none; }
/* 通用的进场：data-reveal 淡入上移，data-reveal="mask" 从上往下揭开。进入视野时脚本加 .in */
.js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 0.9s var(--e-out), transform 1.1s var(--e-out); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal='mask'] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0 round 10px); transition: clip-path 1.3s var(--e-out); }
.js [data-reveal='mask'].in { clip-path: inset(0 0 0 0 round 10px); }

/* 窄屏：收成一栏，段名在上，内容在下。段首实线到段名留 24px（和段名到内容一样），
   段首经过顶上那滴墨时，段名离墨滴远一点 */
@media (max-width: 860px) {
  .sec { display: block; margin-top: clamp(72px, 11vh, 120px); padding-top: 24px; }
  .rail { position: static; margin-bottom: 24px; }
  .body, .row { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mask > span { transition: none !important; } .js .row .mask > span { transform: none !important; }
  .sec::before, .row::before, .row > * { transform: none !important; scale: 1 1 !important; translate: 0 0 !important; opacity: 1 !important; transition: none !important; }
  .js [data-reveal='mask'] { clip-path: none !important; }
  [data-reveal] { animation: none !important; transition: none !important; transform: none !important; opacity: 1 !important; filter: none !important; }
}
/* 材质和光。光只从左上来：影子往右下落，亮边在上沿。

   1. 纸：一层极淡的静态噪点，铺在所有纸面上（一张图两种底色通用：偏暗的灰、透明度很低，浅色底上压暗一点，深色底上提亮一点点）。
   2. 浮起来的面：.raised（静止的）用两层影子的变量；会动的东西用 .cast，影子是单独一层，只做位移和缩放。
   3. 墨色按钮上跟着鼠标走的高光在 controls.css 的 .btn 里。 */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .27 0 0 0 0 .27 0 0 0 0 .27 .22 0 0 0 -.068'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body, .paper { background-image: var(--grain); background-size: 200px 200px; }

/* 浮起来的面：实底、细线、贴地的短硬影加远一点的软影；深色底上是上沿一条亮边 */
.raised { background-color: var(--raised); border: 1px solid var(--line); box-shadow: var(--shadow-float); }
.raised.is-lifted { box-shadow: var(--shadow-lift); }

/* 会动的浮面：影子画在 ::before 上，脚本用 physics.ts 的 cast(el, vx, vy) 按速度把它往运动的反方向拉长。
   只动 transform，不重画影子。用法：<div class="cast">…</div>，元素自己不要设 overflow: hidden（要裁内容就在里面再包一层）。 */
.cast { position: relative; }
.cast::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  box-shadow: 1px 1.5px 1px var(--shade-near), 7px 12px 26px -10px var(--shade-far);
  transform-origin: 0 0; transform: translate(var(--cast-x, 0px), var(--cast-y, 0px)) scale(var(--cast-sx, 1), var(--cast-sy, 1));
}
/* 此刻在线的小圆点：全站唯一的彩色 */
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--live); vertical-align: 0.12em; position: relative; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--live); opacity: 0; }
[data-live='on'] .live-dot::after { animation: livePulse 2.6s ease-out infinite; }
@keyframes livePulse { 0% { opacity: 0.55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(3.2); } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none !important; } }
/* 能点的东西：主按钮、文字链接、带箭头的外链、滑块式的小标签（seg）、图标按钮。
   组件在 src/components/（Button、Link、Seg…），手感在 src/scripts/controls.ts。 */

/* ---- 主按钮：墨底纸字。外层 <a>/<button> 是不动的点击区，.btn-body 被吸、被压扁，.btn-face 是那块墨 ---- */
.btn { position: relative; display: inline-flex; appearance: none; border: 0; margin: 0; padding: 0; background: none; cursor: pointer; border-radius: var(--r-s); font-size: var(--fs-body); font-weight: var(--fw-bold); line-height: 1.25; white-space: nowrap; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.btn-body { position: relative; display: block; border-radius: inherit; will-change: transform; }
/* 远一点的软影单独一层：按下时往回收 */
.btn-body::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 5px 8px 16px -6px var(--shade-far); transition: transform var(--t-fast) var(--e-out), opacity var(--t-fast); pointer-events: none; }
.btn-face { position: relative; display: block; overflow: hidden; border-radius: inherit; padding: 8px 15px 9px; background: var(--ink); color: var(--on-ink); box-shadow: 0.5px 1px 1px var(--shade-near), inset 0 1px 0 light-dark(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.95)); }
/* 跟着鼠标走的高光：一团固定大小的柔光，只做位移 */
.btn-shine { position: absolute; left: 0; top: 0; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%; background: radial-gradient(closest-side, var(--shine), transparent); opacity: 0; transition: opacity 0.35s; pointer-events: none; will-change: transform; }
.btn-label { position: relative; display: inline-flex; overflow: hidden; white-space: pre; vertical-align: top; }
/* 字母翻换：每个字母下面藏着一个一样的，悬停时一个接一个翻上去 */
.ch { position: relative; display: inline-block; transition: transform 0.55s var(--e-spring-soft); transition-delay: calc(var(--i, 0) * 16ms); }
.ch::after { content: attr(data-ch); position: absolute; left: 0; top: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover .ch { transform: translateY(-100%); }
  .btn:hover .btn-shine { opacity: 1; }
}
.btn:focus-visible { outline: none; }
.btn:focus-visible .btn-face { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn:focus-visible .ch { transform: translateY(-100%); }
/* 按下：高光变暗、影子收短。压扁由脚本的弹簧做；没有脚本时退回一个简单的缩放 */
.btn:active .btn-shine { opacity: 0.3; }
.btn:active .btn-body::before { transform: translate(-3px, -5px) scale(0.96); opacity: 0.6; }
html:not(.js) .btn:active .btn-body { scale: 1.02 0.95; }

/* ---- 文字链接：悬停时下划线从左画出。.is-under 是平时就有线的那种，悬停时收掉再重画一遍 ---- */
.link { padding-bottom: 2px; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0% 1px; transition: background-size var(--t-mid) var(--e-out), color var(--t-fast); }
.link.is-under { background-size: 100% 1px; }
@media (hover: hover) and (pointer: fine) {
  .link:hover { background-size: 100% 1px; }
  .link.is-under:hover { animation: relink 0.62s var(--e-out); }
}
.link:focus-visible { background-size: 100% 1px; }
@keyframes relink { 0% { background-size: 100% 1px; background-position: 100% 100%; } 42% { background-size: 0% 1px; background-position: 100% 100%; } 42.1% { background-size: 0% 1px; background-position: 0 100%; } 100% { background-size: 100% 1px; background-position: 0 100%; } }
/* 外链的 ↗：悬停时沿斜向弹一下 */
.arr { display: inline-block; width: 0.6em; height: 0.6em; margin-left: 0.3em; vertical-align: 0.04em; transition: translate 0.5s var(--e-spring); }
.arr svg { display: block; width: 100%; height: 100%; overflow: visible; }
@media (hover: hover) and (pointer: fine) { a:hover > .arr, a:hover .link > .arr { translate: 0.16em -0.16em; } }
a:focus-visible > .arr { translate: 0.16em -0.16em; }

/* ---- 滑块式的小标签：选中的底色块在标签之间滑动（脚本用两根弹簧分别带前缘和后缘，像一团有粘性的东西） ---- */
.seg { position: relative; display: inline-flex; padding: 2px; border-radius: 9px; background: var(--line); isolation: isolate; vertical-align: middle; }
.seg-item { position: relative; z-index: 1; appearance: none; border: 0; margin: 0; padding: 4px 10px 5px; border-radius: 7px; background: none; font-size: var(--fs-small); font-weight: var(--fw-medium); line-height: var(--lh-small); color: var(--ink-2); white-space: nowrap; cursor: pointer; transition: color var(--t-fast); -webkit-tap-highlight-color: transparent; }
.seg-item[aria-pressed='true'] { color: var(--ink); }
.seg-item:active { color: var(--ink); }
.seg-thumb { position: absolute; z-index: 0; left: 0; top: 2px; bottom: 2px; width: 0; border-radius: 7px; background: var(--raised); box-shadow: 0.5px 1px 1px var(--shade-near), inset 0 1px 0 var(--rim); transform-origin: 0 50%; will-change: transform; pointer-events: none; }
html:not(.js) .seg-item[aria-pressed='true'] { background: var(--raised); }
.seg-item.is-mono { font-family: var(--font-mono); letter-spacing: -0.03em; }

/* ---- 图标按钮：深浅色、声音、菜单 ---- */
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; appearance: none; border: 0; margin: 0; padding: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.icon-btn::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--line); opacity: 0; scale: 0.8; transition: opacity var(--t-fast), scale var(--t-mid) var(--e-out); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover::before { opacity: 1; scale: 1; } }
.icon-btn > * { position: relative; transition: scale var(--t-fast) var(--e-out); }
.icon-btn:active > * { scale: 0.86; }

/* 深浅色：一个圆。右半边实心是跟随系统，空心是浅色，实心是深色 */
.theme-ic { display: block; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; overflow: hidden; }
.theme-ic::before { content: ''; display: block; width: 100%; height: 100%; background: currentColor; transform: translateX(var(--theme-fill, 50%)); transition: transform 0.5s var(--e-spring-soft); }
:root[data-theme-pref='light'] .theme-ic { --theme-fill: 105%; }
:root[data-theme-pref='dark'] .theme-ic { --theme-fill: 0%; }

/* 声音：小喇叭。开着有两道声波，关着是一个叉 */
.sound-ic { display: block; width: 16px; height: 16px; overflow: visible; }
.sound-ic .wave, .sound-ic .mute { transition: opacity var(--t-fast), transform var(--t-mid) var(--e-out); transform-box: fill-box; transform-origin: 0 50%; }
.sound-ic .wave { opacity: 0; transform: translateX(-2px) scale(0.6); }
.sound-ic .w2 { transition-delay: 60ms; }
[aria-pressed='true'] > .sound-ic .wave { opacity: 1; transform: none; }
[aria-pressed='true'] > .sound-ic .mute { opacity: 0; transform: scale(0.4); }

@media (prefers-reduced-motion: reduce) {
  .ch, .arr, .btn-body::before, .theme-ic::before, .sound-ic .wave, .sound-ic .mute, .icon-btn::before, .icon-btn > * { transition: none !important; }
  .btn:hover .ch, .btn:focus-visible .ch { transform: none; }
  a:hover > .arr, a:hover .link > .arr, a:focus-visible > .arr { translate: none; }
  .link.is-under:hover { animation: none; }
  .btn:active .btn-body::before { transform: none; }
}

/* ---- 拨动开关（导航面板里的声音）：圆钮滑过去，按住时被压扁一点 ---- */
.seg-item[aria-current='true'] { color: var(--ink); }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; appearance: none; border: 0; margin: 0; padding: 0; border-radius: 13px; background: var(--line); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.switch-knob { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-2); transition: translate 0.5s var(--e-spring-soft), scale 0.3s var(--e-out), background-color var(--t-fast); }
.switch[aria-pressed='true'] .switch-knob { translate: 18px 0; background: var(--ink); }
.switch:active .switch-knob { scale: 1.2 0.86; }
@media (prefers-reduced-motion: reduce) { .switch-knob { transition: none !important; } }
/* 液态材质：和顶上那滴墨同一种东西。浅色是墨，深色是釉白；上沿一道亮边，左上一点高光，下沿一点暗。
   用在：筛选里选中项底下那团墨（.wf-pill，脚本在 scripts/plane.ts），和 .liq 小液滴按钮（脚本在 scripts/liquid.ts）。 */
.wf-pill,
.liq-body {
  background:
    radial-gradient(46% 52% at var(--hx, 26%) var(--hy, 22%), light-dark(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.95)) 0, transparent 100%),
    radial-gradient(90% 70% at 70% 112%, light-dark(rgba(255, 255, 255, 0.1), rgba(12, 12, 13, 0.18)) 0, transparent 100%),
    var(--ink);
  color: var(--on-ink);
  box-shadow:
    0 0.5px 0.5px var(--shade-near),
    4px 7px 14px -7px var(--shade-far),
    inset 0 1px 0 light-dark(rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.95)),
    inset 0 -2px 3px light-dark(rgba(0, 0, 0, 0.45), rgba(12, 12, 13, 0.14));
}

.liq { display: inline-block; vertical-align: top; border-radius: 999px; -webkit-tap-highlight-color: transparent; }
/* 主按钮（components/Button.astro）也是这一种；<button> 去掉浏览器自带的样子 */
button.liq { appearance: none; border: 0; margin: 0; padding: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.liq-body { display: inline-flex; align-items: center; padding: 11px 22px 12px; border-radius: 999px; will-change: transform; transform-origin: 50% 55%; }
.liq-t { display: inline-flex; align-items: baseline; gap: 0.38em; font-size: var(--fs-body); font-weight: var(--fw-medium); line-height: 1.2; white-space: nowrap; }
.liq-n { font-weight: var(--fw-regular); color: var(--on-ink-2); }
.liq-arrow { display: inline-block; margin-left: 0.18em; transition: translate 0.5s var(--e-spring); }
.liq-arrow.is-back { margin: 0 0.5em 0 0; }
@media (hover: hover) and (pointer: fine) {
  .liq:hover .liq-arrow { translate: 0.22em 0; }
  .liq:hover .liq-arrow.is-up { translate: 0.14em -0.14em; }
  .liq:hover .liq-arrow.is-back { translate: -0.22em 0; }
}
.liq:focus-visible { outline: 2px solid var(--live); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .liq-arrow { transition: none; }
}
/* 顶栏：一滴液体，装下所有功能（BUILD-SPEC 第 10、11、12 节）。
   液体本身是 .drop-cv 这个 WebGL 画布（scripts/drop.ts），下面所有按钮和文字都是画布上方的 DOM，永远清楚。
   位置由脚本用 transform 写在视口坐标里；这里只管外观。没有 WebGL 或减少动效时，按钮自己画底色（[data-gl='off']）。
   .drop-clear 是液体在页面上压出的清场：只在液体和它外沿约 16px 里模糊、淡化底下的字（遮罩由脚本按液体形状写），
   不是一整块磨砂板。经过深色区块时，脚本把液体和图标的颜色换成深色模式那一套（写在 .drop 的内联变量里）。 */

.bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  padding: 14px var(--pad);
  font-size: var(--fs-body);
  line-height: 1.25;
  pointer-events: none;
}

.js .bar {
  position: fixed;
}

.bar .name {
  position: relative;
  isolation: isolate;
  pointer-events: auto;
  height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: var(--fw-bold);
  white-space: nowrap;
  color: var(--ink);
  transition: color var(--t-mid) ease;
}

/* 名字的清场：和墨滴同一种做法（.drop-clear）。底下滚过的字在名字周围约 14px 里轻轻模糊、往纸色淡，
   遮罩是贴着字形的一圈（drop.ts 的 nameHalo 用名字自己的字描粗、羽化，画成 --halo），不是一块底板，看不出边。
   --clear-bg 是名字底下的颜色（drop.ts 的 sampleName 写进来，过暗房时是暗房的颜色）；带一层纸面噪点，平纸上看不出这一圈。 */
.js .bar .name::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--halo-pad, 16px));
  pointer-events: none;
  background-color: color-mix(in srgb, var(--clear-bg, var(--paper)) 46%, transparent);
  background-image: var(--grain);
  background-size: 200px 200px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image: var(--halo, linear-gradient(transparent, transparent));
  mask-image: var(--halo, linear-gradient(transparent, transparent));
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: opacity var(--t-fast);
}

/* 一段的边（比如暗房的上沿）正好停在名字上时，这一圈会把名字中间那边的颜色涂到另一边，像一块污渍。平的边上没有东西要模糊，就淡掉（drop.ts 的 sampleName 设 data-edge） */
.js .bar .name[data-edge]::before {
  opacity: 0;
}

/* 名字和墨滴读同一个“底下是深是浅”（drop.ts 的 sampleName）：底色和主题相反时，名字换成另一套的墨色 */
.bar .name[data-under='dark'] {
  color-scheme: dark;
}

.bar .name[data-under='light'] {
  color-scheme: light;
}

html[data-flood] .bar .name {
  transition: none;
}

@supports not (color: light-dark(#000, #fff)) {
  .bar .name[data-under='dark'] {
    color: #ededea;
  }
}

.bar .name span {
  font-weight: var(--fw-medium);
  margin-left: 0.3em;
}

.bar .name:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 4px;
  border-radius: 4px;
}

html:not(.js) .drop {
  display: none;
}

.drop {
  --drop-bg: var(--ink);
  --drop-fg: var(--paper);
  --drop-fg-2: color-mix(in srgb, var(--paper) 62%, transparent);
  --drop-line: color-mix(in srgb, var(--paper) 20%, transparent);
  --drop-bright: light-dark(#b7e35a, #3c6a0a);
  --drop-halo: var(--ink);
  position: fixed;
  inset: 0 0 auto 0;
  height: 0;
  z-index: 61;
  pointer-events: none;
}

.drop[data-mat='glass'] {
  --drop-bg: transparent;
  --drop-fg: var(--ink);
  --drop-fg-2: var(--ink-2);
  --drop-line: var(--line);
  --drop-bright: light-dark(#2f6a0a, #c8f27a);
  --drop-halo: var(--paper);
}

.drop[data-mat='amber'] {
  --drop-bg: #d68a24;
  --drop-fg: #2b1704;
  --drop-fg-2: rgba(43, 23, 4, 0.66);
  --drop-line: rgba(43, 23, 4, 0.22);
  --drop-bright: #fff3c2;
  --drop-halo: #d68a24;
}

.drop-clear {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  background: color-mix(in srgb, var(--clear-bg, var(--paper)) 46%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(transparent, transparent);
  mask-image: linear-gradient(transparent, transparent);
}

.drop[data-mat='glass'] .drop-clear {
  background: color-mix(in srgb, var(--clear-bg, var(--paper)) 58%, transparent);
}

.drop-cv {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.drop[data-gl='off'] .drop-cv {
  display: none;
}

.drop-ui {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
}

.drop-core,
.bead,
.drop-panel,
.drop-slab,
.drop-vol {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
}

.drop-core,
.bead {
  appearance: none;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--drop-fg);
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}

/* 图标和字带一圈自己液珠颜色的细光晕：液珠半透明（玻璃）或正在长出来时，底下的字也不会和图标混在一起 */
.bead svg,
.bead-txt,
.drop-core .core-dot,
.drop-core .pl-bars {
  filter: drop-shadow(0 0 0.8px var(--drop-halo)) drop-shadow(0 0 2.4px var(--drop-halo));
}

.drop[data-drag='bead'] .bead {
  cursor: grabbing;
}

.drop-core {
  width: 44px;
  height: 44px;
  touch-action: none;
  cursor: grab;
  transform: translate3d(calc(50vw - 22px), 14px, 0);
}

.drop[data-drag='on'] .drop-core {
  cursor: grabbing;
}

.drop[data-gl='off'] .drop-core,
.drop[data-gl='off'] .bead {
  background: var(--drop-bg);
  box-shadow: var(--shadow-float);
}

.drop[data-gl='off'][data-mat='glass'] .drop-core,
.drop[data-gl='off'][data-mat='glass'] .bead {
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float);
}

.drop-core:focus-visible,
.bead:focus-visible {
  outline: none;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--live);
}

.core-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--drop-fg);
  opacity: 0.85;
}

.drop[data-state='bloom'] .core-dot {
  opacity: 0.4;
}

.core-cover {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--drop-line);
}

.core-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.core-cover[data-on='true'] {
  display: block;
}

.core-cover[data-on='true'] ~ .core-dot {
  display: none;
}

.drop-core {
  grid-template-columns: auto auto;
  gap: 4px;
  justify-content: center;
}

.drop-core .core-bars {
  display: none;
}

.drop[data-playing='true'] .drop-core .core-bars,
.drop-core .core-cover[data-on='true'] ~ .core-bars {
  display: inline-flex;
}

.drop-core .pl-bars {
  height: 12px;
  width: 11px;
  gap: 2px;
}

.bead {
  width: 44px;
  height: 44px;
  opacity: 0;
  transform: translate3d(-99px, -99px, 0);
}

.bead[data-on='0'] {
  visibility: hidden;
  pointer-events: none;
}

.bead.is-kid {
  width: 38px;
  height: 38px;
}

.bead svg {
  display: block;
  width: 18px;
  height: 18px;
}

.bead-txt {
  font-size: 12px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  line-height: 1;
}

.bead.is-mat .bead-txt {
  font-size: 10.5px;
}

.bead.is-bright {
  color: var(--drop-bright);
}

.bead[aria-current='true'],
.bead[aria-pressed='true'].is-mat {
  box-shadow: inset 0 0 0 1.5px var(--drop-bright);
}

.bead-lab {
  position: absolute;
  left: 50%;
  top: calc(100% + 3px);
  translate: -50% 0;
  font-size: 11px;
  font-weight: var(--fw-medium);
  line-height: 1.2;
  white-space: nowrap;
  color: var(--lab-fg, var(--ink));
  text-shadow: 0 0 2px var(--lab-halo, var(--paper)), 0 0 5px var(--lab-halo, var(--paper)), 0 0 9px var(--lab-halo, var(--paper)), 0 0 14px var(--lab-halo, var(--paper));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s;
}

.bead:hover .bead-lab,
.bead:focus-visible .bead-lab {
  opacity: 1;
}

.bead[aria-expanded='true'] .bead-lab {
  opacity: 0;
}

.bead[data-bead='sound'] .wave {
  opacity: 0;
}

.bead[data-bead='sound'][aria-pressed='true'] .wave {
  opacity: 1;
}

.bead[data-bead='sound'][aria-pressed='true'] .mute {
  opacity: 0;
}

.bead[data-bead='machine'][aria-pressed='true'],
.bead[data-bead='theme'][aria-pressed='true'] svg {
  color: var(--drop-bright);
}

.bead.is-jig svg {
  animation: jig 0.55s var(--e-out);
}

@keyframes jig {
  0% { transform: scale(1); }
  20% { transform: scale(0.7) rotate(-14deg); }
  45% { transform: scale(1.22) rotate(10deg); }
  70% { transform: scale(0.94) rotate(-4deg); }
  100% { transform: scale(1); }
}

.drop-panel {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  color: var(--drop-fg);
  font-size: var(--fs-small);
  border-radius: 26px;
}

.drop[data-state='player'] .drop-panel {
  pointer-events: auto;
}

.drop[data-mat='glass'][data-state='player'] .drop-panel {
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.drop[data-gl='off'] .drop-panel {
  background: var(--drop-bg);
  box-shadow: var(--shadow-lift);
}

.drop[data-mat='glass'][data-gl='off'] .drop-panel,
.drop[data-mat='glass'][data-gl='off'] .drop-slab {
  background: var(--raised);
}

.drop-slab {
  width: 172px;
  padding: 14px 16px 14px;
  visibility: hidden;
  opacity: 0;
  pointer-events: auto;
  color: var(--drop-fg);
  font-size: var(--fs-small);
  border-radius: 18px;
}

.drop[data-gl='off'] .drop-slab {
  background: var(--drop-bg);
  box-shadow: var(--shadow-lift);
}

.slab-a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 2px;
  font-weight: var(--fw-medium);
  color: var(--drop-fg);
  text-decoration: none;
  border-top: 1px solid var(--drop-line);
}

.slab-a:first-child {
  border-top: 0;
}

.slab-a:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: -2px;
  border-radius: 8px;
}

@media (hover: hover) and (pointer: fine) {
  .slab-a:hover span {
    translate: 2px -2px;
  }
}

.slab-a span {
  transition: translate 0.2s var(--e-out);
  color: var(--drop-fg-2);
}

.drop-vol {
  font-size: 12.5px;
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  padding: 8px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: opacity 0.5s;
}

.drop-vol[data-on='true'] {
  opacity: 1;
  transition-duration: 0.18s;
}

.drop-vol {
  font-variant-numeric: tabular-nums;
}

/* Machine 透镜：一整页的纯文本，只在墨滴那块透镜里露出来（clip-path 由脚本跟着墨滴改）。
   底是不透明的纸色，中间是 AI 读到的字；往边缘用遮罩淡出，露出下面被 .lens-refract 折射弯曲的原页面。 */
.lens-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.lens-refract {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 59;
  visibility: hidden;
  pointer-events: none;
  -webkit-backdrop-filter: url(#lens-refract);
  backdrop-filter: url(#lens-refract);
  clip-path: ellipse(0px 0px at 50% 50%);
  will-change: transform;
}

.lens-refract[data-on='true'] {
  visibility: visible;
}

.lens {
  position: fixed;
  inset: 0;
  z-index: 59;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  background: color-mix(in srgb, var(--raised) 95%, var(--live) 5%);
  color: var(--ink);
  clip-path: ellipse(0px 0px at 0px 0px);
}

.lens[data-on='true'] {
  visibility: visible;
}

/* 透镜里的字分两层（lens.ts）：.lens-col 是跟着透镜走的一窄栏，按段对齐它压着的那段页面；
   .lens-text 是整份纯文本，分栏铺满，只在透镜漫满整页、变成 Machine view 的那一下淡进来 */
.lens-text {
  position: absolute;
  left: var(--pad);
  top: 80px;
  width: calc(100% - 2 * var(--pad));
  column-width: 340px;
  column-gap: 40px;
  opacity: 0;
}

.lens-col {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform, opacity;
}

.lens pre {
  margin: 0;
  font: 12.5px/1.6 var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

.lens-col pre {
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .lens-col pre {
    font-size: 10.5px;
  }
}

/* 从液珠打开 Machine：页面的字像被吸向那滴墨 */
html[data-suck='in'] main {
  transform-origin: 50% 0;
  animation: suck-in 0.62s cubic-bezier(0.5, 0, 0.9, 0.5) both;
}

html[data-suck='out'] main {
  transform-origin: 50% 0;
  animation: suck-out 0.52s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes suck-in {
  to {
    transform: translate3d(0, -14px, 0) scale(0.9);
    opacity: 0;
  }
}

@keyframes suck-out {
  from {
    transform: translate3d(0, -14px, 0) scale(0.9);
    opacity: 0;
  }
}

/* 深浅色的液面：只裁快照，不对整页做滤镜（flood.ts）。
   倒的这一秒里墨滴是自己的一层（view-transition-name），所以它一直是活的：被拉长、把墨倒出去、弹回来。 */
html[data-flood] .drop {
  height: 100vh;
  height: 100dvh;
  view-transition-name: drop;
}

html[data-flood] .drop-clear {
  display: none;
}

::view-transition-group(drop) {
  animation: none;
  z-index: 10;
}

::view-transition-old(drop) {
  display: none;
}

::view-transition-new(drop) {
  animation: none;
}

html[data-flood]::view-transition-old(root),
html[data-flood]::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

html[data-flood='down']::view-transition-old(root) {
  z-index: 1;
}

html[data-flood='down']::view-transition-new(root) {
  z-index: 2;
}

html[data-flood='up']::view-transition-new(root) {
  z-index: 1;
}

html[data-flood='up']::view-transition-old(root) {
  z-index: 2;
}

@media (max-width: 860px) {
  .bar {
    padding: 10px var(--pad);
  }

  .bar .name span {
    display: none;
  }

  .bead-lab {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bead,
  .drop-slab,
  .drop-panel {
    transition: opacity 0.18s !important;
  }

  .bead.is-jig svg {
    animation: none;
  }

  html[data-suck] main {
    animation: none !important;
  }
}

/* 墨滴里的音乐播放器：核心上的三根音柱和封面，以及流下来的面板内部。面板的位置和形状在 scripts/drop.ts，这里只管里面的排版。 */

/* 三根极简音柱：静止时低矮错落，播放时错峰律动（只动 transform: scaleY） */
.pl-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
  width: 12px;
}

.pl-bars i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
  transform-origin: 50% 100%;
}

.pl-bars i:nth-child(1) {
  transform: scaleY(0.38);
}

.pl-bars i:nth-child(2) {
  transform: scaleY(0.76);
}

.pl-bars i:nth-child(3) {
  transform: scaleY(0.48);
}

.drop[data-playing='true'] .pl-bars i {
  animation: pl-eq 0.9s ease-in-out infinite alternate;
}

.drop[data-playing='true'] .pl-bars i:nth-child(1) {
  animation-duration: 0.72s;
  animation-delay: -0.1s;
}

.drop[data-playing='true'] .pl-bars i:nth-child(2) {
  animation-duration: 0.58s;
  animation-delay: -0.35s;
}

.drop[data-playing='true'] .pl-bars i:nth-child(3) {
  animation-duration: 0.84s;
  animation-delay: -0.22s;
}

/* 在放的时候（默认开以后访客常常没按过播放），墨滴上要一眼看得出在放、怎么停：
   核心里是封面加跳动的音柱；鼠标移上去，音柱收成暂停符号（点核心就是暂停）；液珠里的播放珠换成同样的音柱，手机上点开墨滴就认得出 */
.bead-bars {
  display: none;
  height: 14px;
  width: 13px;
}

.drop[data-playing='true'] .bead[data-bead='play'] svg {
  display: none;
}

.drop[data-playing='true'] .bead[data-bead='play'] .bead-bars {
  display: inline-flex;
}

@media (hover: hover) and (pointer: fine) {
  .drop[data-playing='true'] .drop-core:hover .core-bars i {
    width: 3px;
    animation: none;
    transform: none;
    transition: transform 0.14s var(--e-out);
  }

  .drop[data-playing='true'] .drop-core:hover .core-bars i:nth-child(2) {
    width: 0;
    opacity: 0;
  }
}

@keyframes pl-eq {
  0% {
    transform: scaleY(0.24);
  }
  100% {
    transform: scaleY(1);
  }
}

/* ---- 展开后的播放器面板 ---- */
.pl-panel {
  padding: 14px 18px 16px;
  font-size: var(--fs-small);
  color: var(--drop-fg);
}

/* 头一行：封面、歌名、歌手。收起的 × 贴在右上角，只占歌名那一行的右端，歌手那一行可以用满整个宽度 */
.pl-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pl-cover {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--drop-line);
}

.pl-meta {
  flex: 1;
  min-width: 0;
}

/* 最下面一行：“30 秒试听 · 在 Apple Music 听完整版 ↗”，右边是第几首。试听这件事放在这里，和完整版那条链接挨着说 */
.pl-foot {
  display: flex;
  align-items: baseline;
  gap: 0 6px;
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--drop-fg-2);
  white-space: nowrap;
}

.pl-tag {
  flex: none;
}

.pl-sep {
  flex: none;
}

.pl-panel.is-bad .pl-title,
.pl-panel.is-bad .pl-note,
.pl-panel.is-bad .pl-tag {
  opacity: 0.55;
}

.pl-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--drop-fg-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--drop-line);
}

@media (hover: hover) {
  .pl-link:hover {
    color: var(--drop-fg);
  }
}

.pl-title {
  margin: 0;
  padding-right: 24px;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  color: var(--drop-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-note {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--drop-fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-time {
  flex: none;
  font-size: 12px;
  line-height: 1.2;
  color: var(--drop-fg-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 进度条：点哪跳哪，可拖动 */
.pl-scrub {
  position: relative;
  display: flex;
  align-items: center;
  height: 24px;
  margin-top: 10px;
  cursor: pointer;
  touch-action: none;
}

.pl-rail {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--drop-fg) 18%, transparent);
  overflow: hidden;
}

.pl-fill {
  position: absolute;
  inset: 0;
  background: var(--drop-fg);
  transform-origin: 0 50%;
  transform: scaleX(0);
  will-change: transform;
}

/* 播放控制行 */
.pl-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.pl-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pl-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  appearance: none;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--drop-fg);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fast), transform var(--t-fast) var(--e-out);
}

@media (hover: hover) and (pointer: fine) {
  .pl-btn:hover {
    background: color-mix(in srgb, var(--drop-fg) 14%, transparent);
  }
}

.pl-btn:active {
  transform: scale(0.92);
}

.pl-btn.is-main {
  width: 36px;
  height: 36px;
  background: var(--drop-fg);
  color: var(--drop-halo);
}

@media (hover: hover) and (pointer: fine) {
  .pl-btn.is-main:hover {
    background: color-mix(in srgb, var(--drop-fg) 88%, var(--paper));
  }
}

.pl-btn svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.pl-btn.is-main svg {
  width: 16px;
  height: 16px;
}

.pl-btn.is-main[data-state='play'] svg {
  translate: 1px 0;
}

.pl-idx {
  flex: none;
  margin-left: auto;
  padding-left: 10px;
  font-variant-numeric: tabular-nums;
}


.pl-x {
  position: absolute;
  top: -4px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--drop-fg-2);
  cursor: pointer;
}

.pl-x svg {
  width: 14px;
  height: 14px;
}

.pl-panel:focus {
  outline: none;
}

.pl-x:focus:not(:focus-visible),
.pl-btn:focus:not(:focus-visible),
.pl-scrub:focus:not(:focus-visible),
.pl-link:focus:not(:focus-visible) {
  outline: none;
}

.pl-x:focus-visible,
.pl-btn:focus-visible,
.pl-scrub:focus-visible,
.pl-link:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .pl-x:hover {
    color: var(--drop-fg);
  }
}

.drop .core-cover.is-in img {
  animation: cover-in 0.5s var(--e-spring-soft) both;
}

@keyframes cover-in {
  from {
    transform: scale(0.2);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* 面板里的内容等液体流到位再淡入 */
.drop-panel .pl-head,
.drop-panel .pl-scrub,
.drop-panel .pl-foot,
.drop-panel .pl-ctrl {
  opacity: 0;
  transform: translate3d(0, -6px, 0);
  transition: opacity 0.14s, transform 0s 0.14s;
}

.drop-panel[data-active='true'] .pl-head,
.drop-panel[data-active='true'] .pl-scrub,
.drop-panel[data-active='true'] .pl-foot,
.drop-panel[data-active='true'] .pl-ctrl {
  opacity: 1;
  transform: none;
  transition: opacity 0.3s 160ms, transform 0.5s var(--e-out) 160ms;
}

@media (prefers-reduced-motion: reduce) {
  .drop[data-playing='true'] .pl-bars i {
    animation: none !important;
  }

  .drop-panel .pl-head,
  .drop-panel .pl-scrub,
  .drop-panel .pl-foot,
  .drop-panel .pl-ctrl {
    transition: none !important;
    transform: none !important;
  }
}

/* 第一屏：那句话、站在行尾的三个同事、睡在地上的他、一颗蛋。构图是他认可的，只修不改。 */
.hero { --fs-hero: min(6.6vw, 11svh); position: sticky; top: 0; z-index: 0; background-color: var(--paper); height: 100svh; min-height: 560px; padding: clamp(84px, 11.5svh, 120px) var(--pad) 0; overflow: hidden; }
.hero:lang(zh) { --fs-hero: min(7.6vw, 12.6svh); }
/* 巨字档，字号按视口算（要给同事留出站的地方，行高也比别处的巨字松） */
.sentence { position: relative; z-index: 1; margin: 0; max-width: 17em; font-size: var(--fs-hero); font-stretch: var(--wd-mega); letter-spacing: var(--ls-mega); line-height: 1.3; font-weight: var(--fw-bold); }
.sentence:lang(zh) { letter-spacing: 0; line-height: 1.42; }
.perch { display: inline-block; width: 0; height: 0; }
.line { display: block; overflow: hidden; padding: 0.04em 0 0.12em; margin: -0.04em 0 -0.12em; }
.line .in { display: inline-block; }
.js .line .in { transform: translateY(112%); filter: blur(10px); animation: rise 1.1s var(--e-out) forwards; }
.line:nth-child(1) .in { animation-delay: 0.05s; } .line:nth-child(2) .in { animation-delay: 0.13s; } .line:nth-child(3) .in { animation-delay: 0.21s; } .line:nth-child(4) .in { animation-delay: 0.29s; }
@keyframes rise { to { transform: none; filter: none; } }
/* 强调的是那几个动词，其余的字退到后面 */
.dim, .w { color: var(--ink-3); font-weight: var(--fw-regular); }

.w { cursor: default; transition: color var(--t-fast); }
.w.strong { display: inline-block; color: var(--ink); font-weight: inherit; background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 97% / 0% 0.07em; transition: background-size var(--t-mid) var(--e-out); }
.w.strong.hl, .w.strong:hover { background-size: 100% 0.07em; }
.w:not(.strong).hl, .w:not(.strong):hover { color: var(--ink); }
/* 同事干活的时候，自己那个词也跟着动：铅笔把下划线重画一遍，扳手把字一圈一圈拧紧，喇叭一喊字往前倾 */
.w.act[data-role='design'] { animation: redraw 1.9s cubic-bezier(0.4, 0, 0.2, 1) both; }
@keyframes redraw { 0% { background-size: 0% 0.09em; background-position: 0 97%; } 52%, 80% { background-size: 100% 0.09em; background-position: 0 97%; } 80.01% { background-size: 100% 0.09em; background-position: 100% 97%; } 100% { background-size: 0% 0.09em; background-position: 100% 97%; } }
.w.act[data-role='build'] { animation: bolt 1.6s both; }
@keyframes bolt { 0% { font-stretch: 88%; } 7%, 19% { font-stretch: 85.5%; } 26%, 38% { font-stretch: 83%; } 45%, 62% { font-stretch: 80.5%; } 80% { font-stretch: 89.5%; } 90% { font-stretch: 87.6%; } 100% { font-stretch: 88%; } }
.sentence:lang(zh) .w.act[data-role='build'] { animation-name: boltzh; transform-origin: 0 50%; }
@keyframes boltzh { 0% { transform: none; } 7%, 19% { transform: scaleX(0.97); } 26%, 38% { transform: scaleX(0.94); } 45%, 62% { transform: scaleX(0.91); } 80% { transform: scaleX(1.02); } 90% { transform: scaleX(0.995); } 100% { transform: none; } }
.w.act[data-role='market'] { animation: shout 1.2s both; transform-origin: 0 100%; }
.line:last-child .w.act[data-role='market'] { animation-delay: 0.09s; }
@keyframes shout { 0% { transform: none; } 15% { transform: skewX(-12deg); } 38% { transform: skewX(3deg); } 58% { transform: skewX(-1.5deg); } 100% { transform: none; } }

.hero .stage { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bot { position: absolute; left: 0; top: 0; pointer-events: auto; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; will-change: transform; }
.js .bot { visibility: hidden; }
.js .bot.ready { visibility: visible; }
/* 没有脚本时：他们在右下角站成一排，不压到左边的字 */
html:not(.js) .hero .stage { display: flex; align-items: flex-end; justify-content: space-around; inset: auto var(--pad) 5% 46%; height: 34%; }
html:not(.js) .bot { position: relative; width: 20%; } html:not(.js) .bot.is-egg { width: 8%; }
.bot.grab { cursor: grabbing; }
/* 脚下的影子：CSS 画的，只有这一层。深色底上它几乎看不见，角色靠自己的颜色站住 */
.bot::before { content: ''; position: absolute; left: 10%; right: 10%; bottom: -3%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, var(--bot-shadow), transparent); transform: translateY(var(--shy, 0px)) scale(var(--sh, 1)); opacity: var(--sho, 1); pointer-events: none; }
.bot-in { position: relative; transform-origin: 50% 100%; will-change: transform; }
.bot-in > img { display: block; width: 100%; height: auto; pointer-events: none; }
.bot .alt { position: absolute; inset: 0; height: 100%; opacity: 0; transition: opacity 140ms; }
.bot[data-kind='me'] .bot-in > img:first-child { transition: opacity 140ms; }
.bot.typing .type, .bot.awake .wake { opacity: 1; }
.bot.typing .bot-in > img:first-child, .bot.awake .bot-in > img:first-child, .bot.awake .type { opacity: 0; }
.eye { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; overflow: hidden; }
.eye i { position: absolute; left: 50%; top: 50%; width: 56%; height: 56%; margin: -28% 0 0 -28%; border-radius: 50%; background: #17120f; transform: translate(var(--px, 0px), var(--py, 0px)); }
.eye i::after { content: ''; position: absolute; left: 58%; top: 16%; width: 26%; height: 26%; border-radius: 50%; background: #fff; }
.eye::after { content: ''; position: absolute; inset: -4%; background: var(--lid, #ddd); transform: translateY(-104%); transition: transform 110ms ease-out; }
.bot.blink .eye::after { transform: none; transition-duration: 70ms; }
.bot[data-bot='design'] { --lid: #ff8a7c; } .bot[data-bot='build'] { --lid: #74c0f2; } .bot[data-bot='market'] { --lid: #ffd257; } .bot.is-egg { --lid: #8fe0b8; }
.tag { position: absolute; left: 50%; bottom: calc(100% + 10px); display: flex; gap: 0.5em; align-items: baseline; padding: 6px 11px 7px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font-size: var(--fs-small); line-height: 1.25; white-space: nowrap; opacity: 0; transform: translate(-50%, 6px) scale(0.96); transition: opacity var(--t-fast), transform var(--t-mid) var(--e-spring); pointer-events: none; }
.tag b { font-weight: var(--fw-bold); } .tag em { font-style: normal; color: var(--on-ink-2); }
.bot.on .tag { opacity: 1; transform: translate(-50%, 0); }
/* 同事旁边常驻的小注：名字，是 AI，管什么。拎着走也跟着 */
.note { position: absolute; left: calc(100% + 7px); top: 52%; translate: 0 -50%; display: grid; gap: 1px; font-size: var(--fs-small); line-height: 1.22; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.6s 0.7s; }
.bot.ready .note { opacity: 1; }
.note b { font-weight: var(--fw-bold); } .note em { font-style: normal; color: var(--ink-2); }

/* 各自的活 */
.fx { position: absolute; pointer-events: none; }
.fx-zzz { left: 30%; top: -6%; font-weight: var(--fw-bold); font-size: var(--fs-statement); color: var(--ink); }
.fx-zzz i { position: absolute; font-style: normal; opacity: 0; animation: zzz 6s linear infinite; }
.fx-zzz i:nth-child(2) { animation-delay: 2s; } .fx-zzz i:nth-child(3) { animation-delay: 4s; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 15% { opacity: 0.9; } 100% { opacity: 0; transform: translate(var(--zx, 30px), var(--zy, -70px)) scale(1.6) rotate(14deg); } }
.bot.awake .fx-zzz, .bot.grab .fx-zzz, .bot.typing .fx-zzz { display: none; }
/* 第一屏被纸盖住以后，z 也停下 */
.past .fx-zzz i { animation-play-state: paused; }
.fx-design { left: 215%; top: 2%; width: 80%; overflow: visible; opacity: 0; }
.fx-design path { fill: none; stroke: var(--ink); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 460; stroke-dashoffset: 460; }
.bot.acting .fx-design { animation: fxfade 1.9s both; }
.bot.acting .fx-design path { animation: draw 1.15s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fxfade { 0%, 78% { opacity: 1; } 100% { opacity: 0; } }
.fx-market { left: 70%; top: -22%; width: 52%; aspect-ratio: 1; transform: rotate(-38deg); }
.fx-market i { position: absolute; inset: 0; border: 5px solid transparent; border-right-color: var(--ink); border-radius: 50%; opacity: 0; }
.bot.acting .fx-market i { animation: wave 1.25s ease-out both; }
.bot.acting .fx-market i:nth-child(2) { animation-delay: 0.22s; } .bot.acting .fx-market i:nth-child(3) { animation-delay: 0.44s; }
@keyframes wave { 0% { opacity: 0; transform: scale(0.2); } 18% { opacity: 0.85; } 100% { opacity: 0; transform: scale(1.3); } }
/* 还没露面的同事：一颗蛋，敲三下裂开 */
.egg3 { position: relative; aspect-ratio: 0.8; }
.egg3 .half { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; transition: transform 0.5s var(--e-spring); }
.egg3 .top { clip-path: polygon(0 0, 100% 0, 100% 44%, 86% 50%, 72% 42%, 58% 50%, 44% 42%, 30% 50%, 16% 42%, 0 48%); transform-origin: 20% 46%; }
.egg3 .bottom { clip-path: polygon(0 48%, 16% 42%, 30% 50%, 44% 42%, 58% 50%, 72% 42%, 86% 50%, 100% 44%, 100% 100%, 0 100%); }
.egg3 .crack { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.egg3 .crack path { fill: none; stroke: rgba(40, 30, 20, 0.7); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.25s ease-out; vector-effect: non-scaling-stroke; }
.bot[data-crack='1'] .crack path { stroke-dashoffset: 55; } .bot[data-crack='2'] .crack path { stroke-dashoffset: 0; } .bot[data-crack='3'] .crack path { opacity: 0; }
.egg3 .peep { position: absolute; left: 14%; right: 14%; top: 30%; height: 26%; border-radius: 40%; background: #2a211c; opacity: 0; transition: opacity 0.2s 0.1s; }
.egg3 .peep .eye { background: #fff; }
.bot[data-crack='3'] .peep { opacity: 1; }
.bot[data-crack='3'] .top { transform: translateY(-26%) rotate(-16deg); }

/* 第一屏被纸盖住以后收起来，纸掀起来时底下露出的才是结尾。同事自己设了可见（.bot.ready），要一起收 */
.past .hero, .js .past .hero .bot.ready { visibility: hidden; }

/* 往下滚：第一屏以左轴为原点往后退一点、暗下去，被盖上来的纸遮住（大字不离开左轴） */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero { animation: heroAway linear both; animation-timeline: scroll(root); animation-range: 0 100svh; transform-origin: var(--pad) 38%; }
    @keyframes heroAway { to { scale: 0.94; opacity: 0.28; } }
  }
}
@media (max-width: 760px) {
  /* 手机：第一屏只有内容那么高，那句话和他之间不留大片空白；纸的上沿在第一屏底部露出来 */
  .hero { --fs-hero: min(11.2vw, 9.2svh); height: auto; min-height: 0; max-height: 100svh; padding-top: 76px; padding-bottom: clamp(190px, 68vw, 35svh); }
  /* 中文第一行有八个字，后面还要站下铅笔和它的小注，字号按这个算 */
  .hero:lang(zh) { --fs-hero: min(8.4vw, 8.6svh); }
  .sentence { line-height: 1.4; }
  .sentence:lang(zh) { line-height: 1.56; }
  /* 小注在窄屏上保留岗位：名字后面跟一个 AI，岗位另起一行 */
  .note { left: calc(100% + 4px); grid-template-columns: auto auto; justify-content: start; column-gap: 0.3em; }
  .note em { display: contents; }
  .note .ai { grid-area: 1 / 2; color: var(--ink-2); }
  .note .sep { display: none; }
  .note .duty { grid-area: 2 / 1 / 3 / 3; color: var(--ink-2); }
  /* 英文最后一行 “in front of people.” 很长，喇叭的小注放在右边会出屏：改放到喇叭头顶，右对齐（上面一行 “and get them” 短，头顶是空的） */
  .hero:lang(en) .bot[data-bot='market'] .note { left: auto; right: 0; top: auto; bottom: calc(100% + 2px); translate: none; justify-content: end; justify-items: end; text-align: right; }
  .fx-design { display: none; }
  /* 他离上面那两行字近了：z 飘得矮一点，不压到字上 */
  .fx-zzz { --zx: 14px; --zy: -30px; top: 2%; font-size: var(--fs-body); }
}
@media (prefers-reduced-motion: reduce) {
  .note { opacity: 1 !important; animation: none !important; transition: none !important; }
  .line .in { animation: none !important; transition: none !important; transform: none !important; opacity: 1 !important; filter: none !important; }
  .fx-zzz i { animation: none !important; }
}

/* 同事都站定、光标也停了以后，脚本的循环睡下（scripts/crew.ts 给第一屏加 .crew-idle），呼吸和眨眼交给这里的 CSS：
   幅度和快慢照脚本里的（醒着的同事 ±1.2%、约 2.9 秒一次；睡着的他 ±2.2%、约 4.8 秒一次）。一动就换回脚本 */
@media (prefers-reduced-motion: no-preference) {
  .hero.crew-idle .bot .bot-in { animation: crewBreath 2.86s ease-in-out infinite; }
  .hero.crew-idle .bot:nth-child(2) .bot-in { animation-delay: -0.9s; }
  .hero.crew-idle .bot:nth-child(3) .bot-in { animation-delay: -1.7s; }
  .hero.crew-idle .bot:nth-child(4) .bot-in { animation-delay: -2.3s; }
  .hero.crew-idle .bot[data-kind='me'] .bot-in { animation: crewSleep 4.83s ease-in-out infinite; }
  .hero.crew-idle .bot .eye::after { animation: crewBlink 5.6s linear infinite; }
  .hero.crew-idle .bot:nth-child(2) .eye::after { animation-delay: -2.1s; }
  .hero.crew-idle .bot:nth-child(3) .eye::after { animation-delay: -3.9s; }
  .past .hero.crew-idle .bot-in, .past .hero.crew-idle .eye::after { animation-play-state: paused; }
}
@keyframes crewBreath { 0%, 100% { transform: scale(1, 0.988); } 50% { transform: scale(1, 1.012); } }
@keyframes crewSleep { 0%, 100% { transform: scale(1, 0.978); } 50% { transform: scale(1, 1.022); } }
@keyframes crewBlink { 0%, 96%, 100% { transform: translateY(-104%); } 97.6% { transform: none; } }
/* 我是谁：一句短话占八栏，里面嵌五处小画面（照片、三个小标、小窗、三个小头像、平台名）；关键词墨色、其余弱化；下面一行事实。 */
/* 句子里所有小画面（照片、小标、小窗、平台名）一样高：上沿对齐大写字母的顶，下沿压在基线下一点点 */
.about-text { --obj-h: 0.78em; --obj-v: -0.04em; grid-column: 1 / span 8; margin: -0.14em 0 0; font-size: var(--fs-large); font-weight: var(--fw-bold); font-stretch: var(--wd-large); letter-spacing: var(--ls-large); line-height: calc(var(--lh-large) + 0.04); text-wrap: pretty; }
/* 强调和弱化：关键词（.k）是墨色，随滚动逐词亮起；其余一直是弱化的灰 */
.aw { color: var(--ink-3); }
.aw.k { color: var(--ink); }
.js .aw.k { color: var(--ink-3); transition: color 0.4s linear; }
.js .aw.k.on { color: var(--ink); }
/* 一个词不从中间断开（中文是分好的词，标点跟着前一个词）；小画面和它前后的词绑在一起 */
.aw, .nb { white-space: nowrap; }

/* 句子里的小窗：和字一样高，循环放作品片段。进入视野时像被按进纸里再弹出来（脚本的弹簧写 --pop，0 是按进去，1 是弹出来） */
.win { --pop: 1; position: relative; display: inline-block; height: var(--obj-h); aspect-ratio: 16 / 10; margin: 0 0.03em 0 0.06em; vertical-align: var(--obj-v); border-radius: 0.13em; transform: scale(calc(0.82 + 0.18 * var(--pop))); will-change: transform; }
.js .win { --pop: 0; }
/* 弹出来以后的两层影子，和按进去时的内影，各自一层，只变透明度 */
.win::before, .win::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.win::before { box-shadow: 1px 1.5px 1px var(--shade-near), 6px 10px 22px -8px var(--shade-far); opacity: clamp(0, var(--pop), 1); }
.win::after { z-index: 1; box-shadow: inset 1px 2px 5px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.25); opacity: clamp(0, 1 - var(--pop), 1); }
.win-in { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: #0c0f0d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.win img, .win video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.win img { transition: opacity 0.3s; }
.win video { opacity: 0; transition: opacity 0.35s; }
.win video.on { opacity: 1; }
/* 一条 1px 的亮边压在画面上面 */
.win-in::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.1); pointer-events: none; }

/* 三个同事的小头像：站在这一行的基线上，一个挨一个 */
/* 三个头像后面：英文是逗号，中文是“一起干”的“一”。喇叭口画到了图的最右边，所以右边留一点，中文多留一些（以前是 -0.1em，喇叭口碰到了“一”） */
.mini-crew { display: inline-block; margin: 0 0.03em 0 0.04em; white-space: nowrap; }
:lang(zh) .mini-crew { margin-right: 0.14em; }
.mini-crew img { --pop: 1; display: inline-block; height: 0.94em; width: auto; margin-left: -0.1em; vertical-align: -0.13em; transform-origin: 50% 100%; transform: translateY(calc(var(--hop, 0) * 1px)) scale(var(--pop)); will-change: transform; }
.mini-crew img:first-child { margin-left: 0; }
.js .mini-crew img { --pop: 0; }

/* 事实行：四项，各占两栏。小字，等宽数字 */
.facts { grid-column: 1 / span 8; display: grid; grid-template-columns: subgrid; margin: clamp(40px, 8vh, 84px) 0 0; font-size: var(--fs-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums; }
.fact { grid-column: span 2; position: relative; padding-top: 11px; }
.fact::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform-origin: 0 50%; }
.js .fact::before { scale: 0 1; transition: scale 1.1s var(--e-out) calc(var(--i) * 70ms); }
.js .facts.in .fact::before { scale: 1 1; }
.js .fact > * { opacity: 0; transition: opacity 0.8s var(--e-out) calc(var(--i) * 70ms + 100ms); }
.js .facts.in .fact > * { opacity: 1; }
.fact dt { color: var(--ink-2); margin-bottom: 3px; }
.fact dd { margin: 0; font-weight: var(--fw-medium); text-wrap: pretty; }
.fact-clock { display: inline-flex; align-items: baseline; gap: 0.42em; margin-left: 0.7em; white-space: nowrap; }
/* 没有脚本就没有时间可写 */
html:not(.js) .fact-clock { display: none; }

/* 小画面的外壳：悬停时放大一点（v16 起不再出小注，名字只给读屏） */
.slot { position: relative; display: inline-block; transition: scale 0.5s var(--e-spring-soft); }
@media (hover: hover) and (pointer: fine) { .slot:hover { scale: 1.07; z-index: 2; } }
/* 他的照片：立在句首 “I / 我” 旁边的圆角小窗 */
.slot-me { margin-right: 0.14em; }
.pic { --pop: 1; display: inline-block; height: var(--obj-h); aspect-ratio: 1; vertical-align: var(--obj-v); border-radius: 0.16em; overflow: hidden; background: var(--line); box-shadow: 1px 1.5px 1px var(--shade-near), 5px 9px 18px -8px var(--shade-far), inset 0 0 0 1px var(--line); transform: scale(calc(0.72 + 0.28 * var(--pop))) rotate(calc((1 - var(--pop)) * -9deg)); will-change: transform; }
.pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 三个小标：一本书、一角夜里的地球、a16z 四个字；后面还有平台名的小标 */
.chips { margin: 0 0 0 0.06em; white-space: nowrap; }
/* 小标：inline-block（它的基线就是底边），和照片、小窗一样高，上沿对齐大写字母的顶；字一律同一号，压在里层 .chip-in 里排 */
.chip { --pop: 1; position: relative; display: inline-block; overflow: hidden; box-sizing: border-box; height: var(--obj-h); margin-right: 0.07em; vertical-align: var(--obj-v); border-radius: 0.13em; background: var(--raised); box-shadow: 0.5px 1px 1px var(--shade-near), 4px 7px 14px -7px var(--shade-far), inset 0 0 0 1px var(--line); transform: rotate(var(--tilt, 0deg)) scale(calc(0.7 + 0.3 * var(--pop))); will-change: transform; }
.chips .chip:last-child { margin-right: 0.03em; }
.chip-in { position: relative; display: flex; align-items: flex-end; height: 100%; padding: 0 0.14em 0.11em; }
.chip-in > span { font-size: max(0.2em, 9px); font-weight: var(--fw-bold); font-stretch: 100%; letter-spacing: 0; line-height: 1; color: var(--ink); }
.js .pic, .js .chip { --pop: 0; }
.chip-book { --tilt: -1deg; min-width: 0.6em; background: var(--ink); box-shadow: 0.5px 1px 1px var(--shade-near), 4px 7px 14px -7px var(--shade-far); }
.chip-book .chip-in > span { color: var(--paper); }
.chip-book::before { content: ''; position: absolute; left: 0.09em; top: 0; bottom: 0; width: 1px; background: var(--paper); opacity: 0.28; }
.chip-book::after { content: ''; position: absolute; left: 0.17em; right: 0.13em; top: 0.15em; height: 0.035em; background: var(--paper); opacity: 0.5; box-shadow: 0 0.075em 0 var(--paper); }
.chip-earth { --tilt: 0.8deg; aspect-ratio: 4 / 3; background: #05070c; box-shadow: 0.5px 1px 1px var(--shade-near), 4px 7px 14px -7px var(--shade-far); }
.chip-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chip-earth .chip-in > span { color: #f4efe6; }
.chip-a16z { --tilt: -0.6deg; }
.chip-a16z .chip-in { align-items: center; padding: 0 0.12em; }
.chip-a16z .chip-in > span { font-size: 0.34em; letter-spacing: -0.03em; }
.chip-out { --tilt: 0.6deg; margin: 0 0.03em 0 0.06em; border-radius: 999px; }
.chip-out .chip-in { align-items: center; gap: 0.16em; padding: 0 0.24em; }
.chip-out .chip-in > span + span { padding-left: 0.75em; border-left: 1px solid var(--line); }

@media (max-width: 860px) {
  .about-text { line-height: calc(var(--lh-large) + 0.08); }
  .facts { grid-template-columns: 1fr 1fr; column-gap: var(--g); row-gap: 18px; margin-top: 36px; }
  .fact { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .aw { transition: none !important; }
  .win { --pop: 1 !important; } .mini-crew img { --pop: 1 !important; --hop: 0 !important; }
  .pic, .chip { --pop: 1 !important; } .slot { transition: none !important; }
  .fact::before, .fact > * { scale: 1 1 !important; opacity: 1 !important; transition: none !important; }
}
/* 作品（BUILD-SPEC 9.3 的版式）。十二栏里：左两栏是段名和筛选，第 3 到 7 栏是大字目录，第 8 到 12 栏是粘住的舞台。
   字和画面各占一边，不互相遮挡。行与行之间没有细线，只靠留白和“其余行变淡”来分；整段只有段首那一条实线。
   这个文件的后半是 /work 和 /work/<id> 两种二级页面的样子。脚本在 src/scripts/plane.ts。 */

/* 目录大字：比“大字”档大一号（1440 宽时 72px）。五档里没有这一号，是这一段自己加的 */
:root { --fs-index: clamp(32px, 5vw, 76px); --lh-index: 1.03; --ls-index: -0.04em; --wd-index: 88%; }
:lang(zh) { --fs-index: clamp(30px, 4.4vw, 66px); --lh-index: 1.16; --ls-index: 0em; --wd-index: 100%; }

.feat { overflow-anchor: none; }
.feat .rail { grid-column: 1 / span 2; }
.feat .body { grid-column: 3 / -1; }

/* ---- 筛选：一列小标签，选中的那一项底下是一团墨（材质在 liquid.css），切换时流过去 ---- */
.wf { position: relative; display: grid; justify-items: start; gap: 3px; margin: 22px 0 0 -12px; isolation: isolate; }
html:not(.js) .wf { display: none; }
.wf-item { position: relative; z-index: 1; display: inline-flex; align-items: baseline; gap: 8px; appearance: none; border: 0; margin: 0; padding: 5px 13px 6px; border-radius: 999px; background: none; font-size: var(--fs-small); font-weight: var(--fw-medium); line-height: var(--lh-small); color: var(--ink-2); white-space: nowrap; cursor: pointer; transition: color 0.22s var(--e-out); -webkit-tap-highlight-color: transparent; }
.wf-item .num { font-size: 11px; font-weight: var(--fw-regular); }
.wf-item[aria-pressed='true'] { color: var(--on-ink); }
.wf-item[aria-pressed='true'] .num { color: var(--on-ink-2); }
.wf-item:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .wf-item[aria-pressed='false']:hover { color: var(--ink); } }
.wf-item:active > span:first-child { opacity: 0.7; }
.wf-pill { position: absolute; left: 0; top: 0; z-index: 0; width: 0; height: 0; opacity: 0; border-radius: 999px; will-change: transform; pointer-events: none; }

/* ---- 目录 ---- */
.feats { grid-column: 1 / span 5; grid-row: 1; display: grid; align-content: start; gap: clamp(30px, 5.6vh, 56px); margin: 0; padding: 0; list-style: none; }
.fr { min-width: 0; margin: 0; }
.fr[hidden], .fr-year[hidden] { display: none; }
.fr-a { display: block; }
.fr-t { display: block; font-size: var(--fs-index); font-weight: var(--fw-bold); font-stretch: var(--wd-index); letter-spacing: var(--ls-index); line-height: var(--lh-index); text-wrap: balance; transition: color 0.35s var(--e-out); }
/* 中文页里纯拉丁字母的标题（Animals in Motion）用拉丁字的字距和字宽，不被撑成两行 */
.fr-t:lang(en), .wd-next b:lang(en), .wd-title:lang(en) { --ls-index: -0.04em; --wd-index: 88%; --lh-index: 1.03; --ls-mega: -0.045em; --wd-mega: 88%; --lh-mega: 1.04; }
/* 当前那一件整行（标题连同下面的小字）往右让一点，弹簧带过去；只挪标题会和自己的小字对不齐 */
@media (hover: hover) and (pointer: fine) {
  .fr:not(.fr-all) > .fr-a { transition: transform 0.6s var(--e-spring-soft); }
  .feats.spy .fr.at:not(.fr-all) > .fr-a { transform: translateX(8px); }
}
.fr-m { display: flex; flex-wrap: wrap; gap: 2px 12px; max-width: 30em; margin-top: 12px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.fr-m b { font-weight: var(--fw-medium); color: var(--ink); }
.fr-l { flex-basis: 100%; text-wrap: pretty; }
/* 其余行变淡：换成实色的 --ink-3（纸上 3:1 以上），不压透明度。指着、键盘走到时回到原色 */
.fr-m, .fr-m b { transition: color 0.35s var(--e-out); }
.feats.spy .fr:not(.at):not(.fr-all) .fr-a :is(.fr-t, .fr-m, .fr-m b) { color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) {
  .feats.spy .fr .fr-a:hover :is(.fr-t, .fr-m b) { color: var(--ink); }
  .feats.spy .fr .fr-a:hover .fr-m { color: var(--ink-2); }
}
.feats.spy .fr .fr-a:focus-visible :is(.fr-t, .fr-m b) { color: var(--ink); }
.feats.spy .fr .fr-a:focus-visible .fr-m { color: var(--ink-2); }
/* 最后一行：去全部作品 */
/* 做成一个液滴按钮（材质和脚本见 liquid.css、scripts/liquid.ts）；占位的那一层不撑满整行 */
.fr-all .fr-a.liq { display: inline-block; }
/* /work 上的年份 */
.fr-year { margin: 0 0 calc(clamp(30px, 5.6vh, 56px) * -0.6); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); list-style: none; }
/* 进场：字从下面上来；筛选时新出现的行也是 */
.js .fr > .fr-a > * { opacity: 0; translate: 0 14px; transition: opacity 0.9s var(--e-out) calc(var(--i, 0) * 50ms), translate 1.1s var(--e-out) calc(var(--i, 0) * 50ms); }
.js .fr.in > .fr-a > * { opacity: 1; translate: none; }
.fr-enter > .fr-a { animation: frEnter 0.6s var(--e-out) both; }
@keyframes frEnter { from { opacity: 0; transform: translateY(18px); } }

/* ---- 舞台：粘在视口中部、靠右对齐十二栏右轴，画面可直点进详情页，下面是起因、做法、结果 ---- */
.feat .stage { grid-column: 6 / -1; grid-row: 1; align-self: start; position: sticky; top: clamp(88px, 15vh, 140px); min-width: 0; display: flex; flex-direction: column; align-items: flex-end; }
.stage-frame { position: relative; display: block; width: var(--fw, 100%); margin-left: auto; aspect-ratio: 16 / 9; border-radius: var(--r-m); background-color: var(--raised); transition: aspect-ratio 0.65s var(--e-spring-soft), width 0.65s var(--e-spring-soft); will-change: transform; cursor: pointer; }
.stage-frame.is-hatch { cursor: default; pointer-events: none; }
.stage-img, .stage-vid, .stage-gl, .stage-hatch { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.stage-vid { opacity: 0; transition: opacity 0.3s linear; }
.stage-vid.on { opacity: 1; }
.stage-gl { pointer-events: none; opacity: 0; transition: opacity 0.25s linear; }
.stage-frame.has-gl .stage-gl { opacity: 1; }
.stage-frame.has-gl.is-hatch .stage-gl { opacity: 0; }
.stage-frame.has-gl .stage-img, .stage-frame.has-gl .stage-vid { opacity: 0; }
/* 画面的厚度：一圈 1px 的边，上沿亮一点 */
.stage-frame::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 var(--rim); pointer-events: none; }
/* 文章占位：一块带斜线纹理的纸面 */
.stage-hatch { background: repeating-linear-gradient(135deg, transparent 0 9px, var(--line) 9px 10px) var(--raised); opacity: 0; transition: opacity 0.3s linear; }
.stage-frame.is-hatch .stage-hatch { opacity: 1; }
.stage-story { display: grid; width: var(--fw, 100%); max-width: 100%; margin-left: auto; margin-top: 34px; transition: width 0.65s var(--e-spring-soft); }
.feat .stage.is-empty .stage-story { visibility: hidden; }
/* 舞台下面的一段结果（v16：不带标签，只一段话） */
.pane { grid-area: 1 / 1; align-self: start; max-width: 34em; margin: 0; font-size: var(--fs-small); line-height: 1.46; color: var(--ink); text-wrap: pretty; opacity: 0; translate: 0 8px; transition: opacity 0.3s, translate 0.6s var(--e-out); pointer-events: none; }
.pane.on { opacity: 1; translate: 0 0; transition-delay: 0.12s; pointer-events: auto; }

@media (max-width: 860px) {
  .feat .body { display: flex; flex-direction: column; }
  .wf { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 14px; }
  /* 舞台粘在这一段顶上（16:9），目录从下面滚过；点一行，舞台换成它。
     要撑满宽（桌面那条 align-self: start 会让它在竖排里缩成 0 宽，之前手机上就是因此看不到画面）；
     粘在岛的下面，上面垫一条 52px 的纸色（正好盖住筛选下面那段空白），滚过去的字不会从岛和舞台之间露出来 */
  .feat .stage { order: -1; align-self: stretch; width: 100%; top: 52px; z-index: 2; margin: 28px 0 24px; padding: 0 0 14px; background-color: var(--paper); }
  .feat .stage::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 52px; background-color: var(--paper); pointer-events: none; }
  .feat .stage, .feat .stage::before { background-image: var(--grain); background-size: 200px 200px; }
  .feat .stage::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 18px; background: linear-gradient(var(--paper), transparent); pointer-events: none; }
  .stage-frame { width: 100%; aspect-ratio: 16 / 9 !important; transition: none; }
  .stage-img, .stage-vid { object-fit: contain; }
  .stage-story { display: none; }
  .feats { gap: 26px; padding-bottom: 8px; }
  .fr-year { margin-bottom: -14px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .fr > .fr-a > * { opacity: 1 !important; translate: none !important; transition: none !important; }
  .fr-enter > .fr-a { animation: none; }
  .stage-frame, .pane, .fr-a { transition: none !important; }
}

/* ===== /work：全部作品 ===== */
.wp, main.wd { padding-top: clamp(120px, 20vh, 190px); padding-bottom: clamp(56px, 9vh, 96px); }
.wp-head { margin: 0 var(--pad); }
.wp-head h1 { margin: 0; }
.wp .sec { margin-top: clamp(56px, 9vh, 96px); }
.wp-foot { margin: clamp(72px, 12vh, 130px) var(--pad) 0; padding-top: 22px; border-top: 1px solid var(--line); }

/* ===== /work/<id>：一件一页 ===== */
main.wd { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); padding-left: var(--pad); padding-right: var(--pad); }
main.wd > * { grid-column: 1 / -1; min-width: 0; }
.wd-back { justify-self: start; font-size: var(--fs-small); color: var(--ink-2); }
.wd-title { grid-column: 1 / span 10; margin: 20px 0 0; text-wrap: balance; }
.wd-line { grid-column: 1 / span 7; margin: 18px 0 0; color: var(--ink-2); text-wrap: pretty; }
.wd-meta { display: flex; flex-wrap: wrap; gap: 14px clamp(28px, 5vw, 72px); margin: clamp(30px, 5vh, 48px) 0 0; padding-top: 14px; border-top: 1px solid var(--ink); font-size: var(--fs-small); line-height: var(--lh-small); }
.wd-meta dt { color: var(--ink-2); }
.wd-meta dd { margin: 3px 0 0; font-weight: var(--fw-medium); }
.wd-clip { position: relative; justify-self: start; width: min(100%, calc(76vh * var(--ar, 1.7778))); margin: clamp(28px, 5vh, 44px) 0 0; border-radius: var(--r-l); overflow: hidden; }
.wd-clip img, .wd-clip video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.wd-clip video { opacity: 0; transition: opacity 0.4s linear; }
.wd-clip video.on { opacity: 1; }
.wd-story { grid-column: 1 / span 7; max-width: 24em; margin: clamp(40px, 7vh, 64px) 0 0; font-size: var(--fs-statement); font-weight: var(--fw-medium); font-stretch: var(--wd-statement); letter-spacing: var(--ls-statement); line-height: var(--lh-statement); text-wrap: pretty; }
.wd-cta { margin: clamp(36px, 6vh, 56px) 0 0; }
.wd-soon { display: inline-block; padding-top: 9px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-2); }
.wd-next { display: grid; gap: 8px; margin-top: clamp(72px, 12vh, 130px); padding-top: 15px; border-top: 1px solid var(--ink); }
.wd-next span { font-size: var(--fs-small); color: var(--ink-2); }
.wd-next b { font-size: var(--fs-index); font-weight: var(--fw-bold); font-stretch: var(--wd-index); letter-spacing: var(--ls-index); line-height: var(--lh-index); }
.wd-next i { display: inline-block; font-style: normal; transition: translate 0.5s var(--e-spring); }
@media (hover: hover) and (pointer: fine) { .wd-next:hover i { translate: 0.18em 0; } }
@media (max-width: 860px) {
  .wd-title, .wd-line, .wd-story { grid-column: 1 / -1; }
}
/* 经历：竖版时间线。
   主体学 21st.dev scroll-timeline（一条竖线随滚动往下画，经过的站从灰变墨，无卡片）；
   左栏学 linear.app/changelog（年份和亮着的小点）并取 Framer Scroll Timeline Pro 的大号滚动年份。
   动效由 src/scripts/history.ts 用 physics.ts 驱动，只改 transform 和 opacity。 */

.history {
  align-items: start;
}

/* 左栏：段名下面只停着大号年份数字（2026-12-03 按评审删掉了和右栏重复的时期和地点） */
.hist-sticky-meta {
  margin-top: clamp(28px, 4.4vh, 52px);
}

/* 大号年份：拉丁数字，中英文页都用窄体、负字距、等宽数字 */
.hist-year {
  display: inline-flex;
  margin: 0 0 0 -0.04em;
  font-size: clamp(54px, 6vw, 92px);
  font-weight: var(--fw-bold);
  font-stretch: 88%;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hist-digit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
  vertical-align: top;
}

.hist-strip {
  display: block;
  transform: translate3d(0, calc(var(--d, 0) * -1em), 0);
  will-change: transform;
}

.hist-strip i {
  display: block;
  height: 1em;
  font-style: normal;
}

/* 右栏时间线容器 */
.hist-wrap {
  grid-column: 1 / -1;
  position: relative;
  padding-top: 4px;
}

/* 竖线轨道（层级 1，在空心圆环后面）：脚本初始化时会精确量取首尾圆点的中心；未运行脚本时也有准确的 CSS 回退位置 */
.hist-track {
  position: absolute;
  left: calc(clamp(92px, 8.6vw, 126px) + clamp(16px, 1.8vw, 26px) + 14px);
  top: 15px;
  bottom: 92px;
  width: 0;
  pointer-events: none;
  z-index: 1;
}

.hist-line {
  position: absolute;
  left: -0.5px;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--line);
}

.hist-fill {
  position: absolute;
  left: -1px;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--ink);
  transform-origin: 50% 0;
  transform: scaleY(1);
  will-change: transform;
}

.js .hist-fill {
  transform: scaleY(0);
}

/* 液滴独立层（层级 3，位于竖线与圆环之上，落到任一站时完整可见） */
.hist-drop-layer {
  position: absolute;
  left: calc(clamp(92px, 8.6vw, 126px) + clamp(16px, 1.8vw, 26px) + 14px);
  top: 15px;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 3;
}

/* 沿竖线落下的有重量液滴：位置和压扁/拉伸完全由脚本写 transform */
.hist-drop {
  position: absolute;
  left: -5.5px;
  top: -5.5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  transform-origin: 50% 50%;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s var(--e-out);
}

.js .hist-drop {
  opacity: 1;
}

/* 五站列表 */
.hist-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hist-item {
  position: relative;
  display: grid;
  grid-template-columns: clamp(92px, 8.6vw, 126px) 28px minmax(0, 1fr);
  column-gap: clamp(16px, 1.8vw, 26px);
  align-items: start;
  padding: 0 0 clamp(56px, 8.2vh, 84px);
}

.hist-item:last-child {
  padding-bottom: 0;
}

/* 三种状态只换实色，不压透明度（没到的站也要在纸上有 3:1 以上的对比）：
   当前站：地点、大白话是墨色；经过的站：大白话 --ink-2；还没到的站：整行 --ink-3 */
.hist-when,
.hist-what,
.hist-badge,
.hist-co {
  transition: color 0.35s var(--e-out);
}

.js .hist-item.is-reached:not(.is-active) .hist-plain {
  color: var(--ink-2);
}

.js .hist-item:not(.is-reached):not(.is-active) :is(.hist-when, .hist-where, .hist-what, .hist-plain, .hist-badge, .hist-co) {
  color: var(--ink-3);
}

@media (hover: hover) and (pointer: fine) {
  .js .hist-item:not(.is-active):hover :is(.hist-where, .hist-plain) {
    color: var(--ink);
  }

  .js .hist-item:not(.is-active):hover :is(.hist-when, .hist-what) {
    color: var(--ink-2);
  }
}

/* 每一行左边的年份与亮着的小点 */
.hist-when {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: var(--fw-regular);
  color: var(--ink-2);
  white-space: nowrap;
  font-variant-numeric: proportional-nums;
}

.hist-when-dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
  transform: scale(0.35);
  transition: opacity 0.32s var(--e-out), transform 0.42s var(--e-spring-soft);
}

.hist-item.is-active .hist-when {
  color: var(--ink);
  font-weight: var(--fw-medium);
}

.hist-item.is-active .hist-when-dot {
  opacity: 1;
  transform: scale(1);
}

/* 竖线上的节点圆环（层级 2：实底纸色圆环压住竖线，经过后边框变墨色） */
.hist-node-col {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.hist-node {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--paper);
  border: 1.5px solid var(--line);
  transition: border-color 0.35s var(--e-out), background-color 0.35s var(--e-out);
}

.hist-item.is-reached .hist-node,
.hist-item.is-active .hist-node {
  border-color: var(--ink);
}

/* 每一站右侧的正文内容：无卡片、无阴影，全靠字阶和留白 */
.hist-content {
  min-width: 0;
  cursor: pointer;
}

.hist-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.4;
}

.hist-where {
  font-weight: var(--fw-medium);
  color: var(--ink);
  transition: color 0.35s var(--e-out);
}

.js .hist-item:not(.is-reached):not(.is-active) .hist-where {
  color: var(--ink-2);
}

.hist-what {
  flex-basis: 100%;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--ink-2);
}

/* 岗位：跟在地点后面，一条细竖线隔开的一行字（不再是描边的胶囊小标） */
.hist-role {
  position: relative;
  padding-left: 13px;
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.4;
  color: var(--ink-2);
  transition: color 0.35s var(--e-out);
}

.hist-role::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.18em;
  width: 1px;
  background: var(--ink-3);
}

.js .hist-item:not(.is-reached):not(.is-active) .hist-role {
  color: var(--ink-3);
}

/* 他自己的数字：没有框。每个数字上面一条细线（和“我是谁”的事实行、Token 图的统计同一种写法），
   大号数字加一行小字；走到这一站时细线从左画出、变成墨色，数字滚到位 */
.hist-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(112px, 9.6vw, 150px), 1fr));
  gap: 18px clamp(18px, 2vw, 30px);
  max-width: 46em;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.hist-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding-top: 13px;
}

.hist-kpi::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
  transform-origin: 0 50%;
  transition: background-color 0.5s var(--e-out);
}

.hist-item.is-active .hist-kpi::before {
  background: var(--ink);
}

.js .hist-kpi::before {
  scale: 0 1;
  transition: scale 1s var(--e-out) calc(var(--k, 0) * 80ms), background-color 0.5s var(--e-out);
}

.js .hist-item:is(.is-reached, .is-active) .hist-kpi::before {
  scale: 1 1;
}

/* 数字前面的“约”：小一号，压在数字的基线上 */
.hist-kpi-top {
  display: flex;
  align-items: baseline;
  gap: 0.28em;
}

.hist-kpi-pre {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  line-height: 1;
  color: var(--ink-2);
}

.hist-kpi-n {
  display: inline-grid;
  justify-items: start;
  font-size: clamp(30px, 2.2vw + 12px, 44px);
  font-weight: var(--fw-bold);
  font-stretch: 88%;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: color 0.35s var(--e-out);
}

.hist-kpi-n b {
  grid-area: 1 / 1;
  font-weight: inherit;
  white-space: nowrap;
}

.hist-kpi-ghost {
  visibility: hidden;
}

.hist-kpi-l {
  max-width: 13em;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--ink-2);
  text-wrap: pretty;
  transition: color 0.35s var(--e-out);
}

.js .hist-item:not(.is-reached):not(.is-active) :is(.hist-kpi-pre, .hist-kpi-n, .hist-kpi-l) {
  color: var(--ink-3);
}

/* 公司的公开数字：一行小字，标签写明是公司的，后面跟出处链接（v16：不做成数字卡） */
.hist-co {
  margin: 16px 0 0;
  max-width: 38em;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--ink-2);
  text-wrap: pretty;
}

.hist-co-k {
  font-weight: var(--fw-medium);
}

.hist-co .hist-src {
  color: var(--ink);
}

.hist-plain {
  margin: 8px 0 0;
  font-size: var(--fs-statement);
  font-weight: var(--fw-bold);
  font-stretch: var(--wd-statement);
  letter-spacing: var(--ls-statement);
  line-height: var(--lh-statement);
  color: var(--ink);
  text-wrap: pretty;
  transition: color 0.38s var(--e-out);
}

.js .hist-item:not(.is-reached):not(.is-active) .hist-plain {
  color: var(--ink-3);
}

/* 产品拿到的奖：单独一行，徽章本身就是指向官网的链接 */
.hist-award {
  margin: 16px 0 0;
  max-width: 38em;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.hist-badge {
  font-weight: var(--fw-medium);
  color: var(--ink);
}

.hist-src {
  color: var(--ink);
  white-space: nowrap;
}

/* 手机端：同样是竖线，左栏年份收到每一行上方 */
@media (max-width: 860px) {
  .hist-sticky-meta {
    display: none;
  }

  .hist-track,
  .hist-drop-layer {
    left: 10px;
  }

  .hist-item {
    grid-template-columns: 20px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 4px;
    padding-bottom: 40px;
  }

  .hist-node-col {
    grid-column: 1;
    grid-row: 1 / span 2;
    padding-top: 5px;
  }

  .hist-when {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-start;
    padding-top: 0;
  }

  /* 手机上液滴和竖线已经在年份正左侧，不重复放第二个点，保证每行左沿对齐 */
  .hist-when-dot {
    display: none;
  }

  .hist-content {
    grid-column: 2;
    grid-row: 2;
  }

  .hist-plain {
    margin-top: 6px;
  }

  /* 三个数字一行；四个的那一站排成两行两个，不留单独一个 */
  .hist-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 16px;
  }

  .hist-kpis:has(> :nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hist-role {
    flex-basis: 100%;
    padding-left: 0;
  }

  .hist-role::before {
    display: none;
  }
}

/* 减少动效：线直接画好，不做位移和拉伸，只保留清晰的状态区分 */
@media (prefers-reduced-motion: reduce) {
  .hist-fill {
    transform: scaleY(1) !important;
  }

  .hist-drop-layer {
    display: none !important;
  }

  .hist-strip,
  .hist-when,
  .hist-content,
  .hist-when-dot,
  .hist-node,
  .hist-where,
  .hist-plain,
  .hist-what,
  .hist-badge,
  .hist-role,
  .hist-kpi-n,
  .hist-kpi-l,
  .hist-kpi::before {
    transition: none !important;
  }

  .js .hist-kpi::before {
    scale: 1 1;
  }

  .hist-node {
    border-color: var(--ink);
  }

  .hist-item.is-active .hist-node {
    background-color: var(--ink);
  }
}
/* 结尾（规格 3.8）：纸掀起来，露出纸的另一面（.flip：浅色模式下是深的，深色模式下是浅的）。
   一句大字，两组大字平台链接（X 是主行；悬停整行右移让出 ↗，其余变淡），底部“一箱梨”巨字与同事，桌面滚到底可橡皮筋拉长。 */

.end {
  position: sticky;
  bottom: 0;
  z-index: 0;
  min-height: 100svh;
  background-color: var(--paper);
  color: var(--ink);
  overflow: clip;
}

.end-inner {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: clamp(96px, 12.5vh, 132px) var(--pad) 0;
  transform-origin: 50% 0%;
  will-change: transform;
}

html:not(.js) .end {
  position: static;
}

/* 结尾一直垫在最底下，第一屏被盖住之前不让它露出来 */
.js .end {
  visibility: hidden;
}

.js .past .end {
  visibility: visible;
}

.end-top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--g);
  align-items: start;
}

.end-lead {
  grid-column: 1 / span 5;
}

.big {
  margin: -0.1em 0 0;
  font-size: var(--fs-mega);
  font-weight: var(--fw-bold);
  font-stretch: var(--wd-mega);
  letter-spacing: var(--ls-mega);
  line-height: var(--lh-mega);
  text-wrap: balance;
}

:lang(zh) .end .big {
  font-size: clamp(30px, 3.6vw, 54px);
  text-wrap: balance;
}

/* 平台链接：一列，从第七栏起（X 主行在最上面）；中文页下面再一行国内平台的小字 */
.end-groups {
  grid-column: 7 / -1;
  display: grid;
  row-gap: 14px;
  align-items: start;
}

.end-cn {
  margin: 0;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--ink-2);
}

.end-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.end-li {
  border-bottom: 1px solid var(--line);
}

.end-row {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0 11px;
  color: var(--ink);
  transition: opacity 0.28s var(--e-out);
}

/* 悬停某一行时，其余行变淡 */
@media (hover: hover) and (pointer: fine) {
  .end-groups.is-hover .end-row {
    opacity: 0.34;
  }

  .end-groups.is-hover .end-row.is-hot {
    opacity: 1;
  }
}

.end-row-arrow {
  position: absolute;
  left: 0;
  top: 50%;
  display: inline-flex;
  align-items: center;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1;
  color: var(--ink);
  opacity: 0;
  transform: translate3d(-0.35em, -50%, 0);
  pointer-events: none;
  will-change: transform, opacity;
}

.end-row-arrow .arr {
  margin-left: 0;
  vertical-align: 0;
  transition: none;
}

.end-row-name {
  display: inline-block;
  font-size: clamp(22px, 2.35vw, 36px);
  font-weight: var(--fw-bold);
  font-stretch: var(--wd-large);
  letter-spacing: var(--ls-large);
  line-height: 1.12;
  will-change: transform;
}

/* X 是主行：名字大一号，后面跟着账号名 */
.end-row.is-main .end-row-name {
  font-size: clamp(30px, 3.5vw, 54px);
}

.end-row-handle {
  margin-left: 0.32em;
  font-size: 0.5em;
  font-weight: var(--fw-medium);
  font-stretch: var(--wd-statement);
  letter-spacing: var(--ls-statement);
  color: var(--ink-2);
}

/* 底部“一箱梨”巨字与同事 */
/* 上面的留白用透明的上边框，不用内边距：同事的位置按百分比算，百分比要只量大字本身的盒子，
   用内边距的话留白也算进去，同事会浮在“一”上方三十来像素（站在他头上的人也会顶到上面那行字） */
.mark {
  position: relative;
  margin-top: auto;
  border-top: clamp(28px, 6vh, 72px) solid transparent;
}

.wm {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  fill: var(--ink);
}

.js .wm path {
  translate: 0 26%;
  opacity: 0;
  transition: translate 1.4s var(--e-out) calc(var(--i) * 120ms), opacity 0.5s calc(var(--i) * 120ms);
}

.js .end.in .wm path {
  translate: none;
  opacity: 1;
}

/* “一”那一横的上沿，在大字高度的 42.4% 处、左边 1.2% 到 32.2%：同事之间重叠不超过一成 */
.onone {
  position: absolute;
  left: 1.2%;
  width: 31%;
  bottom: 57.4%;
  height: 48%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.js .onone {
  opacity: 0;
  translate: 0 -30%;
  transition: opacity 0.4s 0.5s, translate 0.9s var(--e-spring) 0.5s;
}

.js .end.in .onone {
  opacity: 1;
  translate: none;
}

.up {
  height: 100%;
  width: auto;
  margin-left: 2%;
  order: 2;
}

.nap {
  position: relative;
  display: block;
  height: 46%;
  margin-left: -2%;
  translate: 0 -2px;
  transform-origin: 50% 100%;
  animation: nap 4.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -1.4s);
}

.nap img {
  display: block;
  height: 100%;
  width: auto;
}

.nap[data-bot='design'] {
  --lid: #ff8a7c;
  height: 52%;
  rotate: 10deg;
  margin-right: -1.5%;
}

.nap[data-bot='build'] {
  --lid: #74c0f2;
  height: 44%;
  rotate: -3deg;
}

.nap[data-bot='market'] {
  --lid: #ffd257;
  height: 43%;
  rotate: -8deg;
}

.nap .eye::after {
  transform: none;
}

.nap .eye i {
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 62%;
  height: 30%;
  margin: -4% 0 0 -31%;
  background: none;
  border-bottom: 2px solid rgba(46, 30, 24, 0.72);
  border-radius: 0 0 60% 60% / 0 0 100% 100%;
  transform: none;
}

.nap .eye i::after {
  display: none;
}

@keyframes nap {
  50% {
    scale: 1.018 0.972;
  }
}

/* 这一屏不在视野里时，睡觉的呼吸和 z 都停下 */
.end:not(.in) .nap,
.end:not(.in) .zz i,
body:not(.past) .end .nap,
body:not(.past) .end .zz i {
  animation-play-state: paused;
}

.zz {
  position: absolute;
  left: 34%;
  bottom: 62%;
  font-size: var(--fs-statement);
  font-weight: var(--fw-bold);
  color: var(--ink);
}

.zz i {
  position: absolute;
  font-style: normal;
  opacity: 0;
  animation: zzz 6s linear infinite;
}

.zz i:nth-child(2) {
  animation-delay: 3s;
}

/* 页脚一行：把这一页交给你的 AI、Colophon、List、更新日期（深浅色只在顶栏面板里切） */
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  margin-top: clamp(14px, 3vh, 26px);
  padding: 13px 0 22px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--ink-2);
}

@media (hover: hover) and (pointer: fine) {
  .foot-links a:hover,
  .copy:hover {
    color: var(--ink);
  }
}

.foot-date {
  white-space: nowrap;
}

.copy {
  appearance: none;
  border: 0;
  padding: 0 0 2px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background-color: transparent;
  text-align: left;
}

@media (max-width: 860px) {
  /* 手机上内容超过一屏，改成正常文档流以便从头到尾完整滚读 */
  .end {
    position: relative;
    z-index: 1;
    min-height: 0;
  }

  .end-inner {
    min-height: 0;
    padding-top: 72px;
  }

  .end-top {
    display: block;
  }

  .end-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .end-row.is-main .end-row-name {
    font-size: clamp(30px, 9vw, 40px);
  }

  .end-lead {
    margin-bottom: 28px;
  }

  .mark {
    border-top-width: 64px;
  }

  .end-row {
    padding: 10px 0 12px;
  }

  .end-row-name {
    font-size: clamp(22px, 6.2vw, 30px);
  }

  .onone {
    left: 0;
    width: max-content;
    height: 74%;
    justify-content: flex-start;
  }

  .nap {
    margin-left: -4%;
  }

  .nap:first-child {
    margin-left: 0;
  }

  /* 页脚在手机上：链接一行排下，日期单独一行 */
  .foot-links {
    gap: 10px 18px;
  }

  .foot-links .foot-date {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nap,
  .zz i {
    animation: none !important;
  }

  .end-row,
  .end-row-name,
  .end-row-arrow {
    transition: none !important;
  }
}

/* 清单视图（/list）：同一份内容，等宽字，排成一张表 */
.listview { max-width: 980px; padding: 120px var(--pad) 60px; font-family: var(--font-mono); font-size: var(--fs-small); line-height: 1.6; font-variant-numeric: tabular-nums; }
.list-intro { margin: 0 0 40px; color: var(--ink-2); }
.list-name { margin: 0; font-size: inherit; font-weight: var(--fw-bold); } .list-name span { font-weight: var(--fw-regular); }
.list-para { margin: 6px 0 0; max-width: 64ch; }
.listview table { width: 100%; margin: 36px 0 28px; border-collapse: collapse; }
.listview th { text-align: left; font-weight: var(--fw-bold); padding: 30px 0 8px; border-bottom: 1.5px solid var(--ink); }
.listview td { vertical-align: top; padding: 9px 0 10px; border-bottom: 1px solid var(--line); }
.listview td.n { width: 3.2em; color: var(--ink-2); }
.listview td.r { text-align: right; white-space: nowrap; color: var(--ink-2); padding-left: 1em; }
.listview td span { color: var(--ink-2); }
.listview table a { text-decoration: underline; text-underline-offset: 0.2em; }
.listview .foot-links { margin-top: 0; border-top: 0; }
/* 我怎么工作：左边一张能上手的图，右边五条规矩，下面是 token 用量的贡献图（usage.css）。
   图：.hw-stage 是舞台（宽高比固定，里面的尺寸都按舞台宽度算，用 cqw），.hw-node 是一个点，脚本只给它写位移；
   .hw-obj 是那件东西（放大、倾斜），.hw-sh 是它的影子（一层，按光从左上来的方向落在右下，拎起来时走远一点、变淡一点）。 */
/* 段名 + 图 + 规矩包在 .how-top 里：左栏的 sticky 只在这一块里有效，到规矩结束就停，不会压到下面的 “Tokens, every day” 上 */
.how-top { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: start; }
.how-lead { margin: 14px 0 0; max-width: 24em; font-weight: var(--fw-regular); color: var(--ink-2); text-wrap: pretty; }
.how-body { align-items: start; }
.hw { grid-column: 1 / span 5; position: relative; }
.how-rules { grid-column: 6 / -1; }

.hw-stage { position: relative; container-type: inline-size; aspect-ratio: 540 / 610; margin-top: 10px; }
.hw-world { position: absolute; inset: 0; }
.hw-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hw-link { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-opacity: calc(var(--o, 0.26) + var(--t, 0)); transition: stroke-opacity 0.25s; }
.hw-link.is-pass { stroke-dasharray: 2 5; --o: 0.3; }
.hw-link.is-read { stroke-dasharray: 1 6; --o: 0; }
.hw-link.on { --o: 0.95; }
.hw-link.is-read.on { --o: 0.55; }

.hw-node { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 0; height: 0; z-index: 1; --w: max(40px, 14cqw); transition: opacity 0.25s; will-change: transform; }
.hw-node[data-node='me'] { --w: max(56px, 15.6cqw); z-index: 2; }
.hw-node[data-node='design'] { --w: max(46px, 14.1cqw); --lid: #ff8a7c; }
.hw-node[data-node='build'] { --w: max(54px, 17cqw); --lid: #74c0f2; }
.hw-node[data-node='market'] { --w: max(60px, 19cqw); --lid: #ffd257; }
/* 调研、挑错两个 AI 和两份文件一样，是一小张纸（没有角色图） */
.hw-node[data-kind='file'], .hw-node[data-node='research'], .hw-node[data-node='review'] { --w: max(26px, 6.6cqw); }
.hw-node[data-on='true'] { z-index: 5; }
.hw[data-active]:not([data-active='']) .hw-node:not([data-on='true']) { opacity: 0.5; }

.hw-hit { position: absolute; left: 0; top: 0; translate: -50% -50%; display: block; width: var(--w); aspect-ratio: var(--ar); appearance: none; border: 0; margin: 0; padding: 0; background: none; border-radius: 12px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.hw.is-dragging .hw-hit { cursor: grabbing; }
html:not(.js) .hw-hit { cursor: default; }
.hw-obj { display: block; width: 100%; height: 100%; transform-origin: 50% 62%; will-change: transform; }
.hw-fig, .hw-breath { position: relative; display: block; width: 100%; height: 100%; }
.hw-img { display: block; width: 100%; height: 100%; pointer-events: none; }
/* 影子：同一张图压成黑的、糊一点，落在右下。只有这一层；深色底上它自然看不见，不会有灰白的光晕 */
.hw-sh { position: absolute; inset: 0; width: 100%; height: 100%; filter: brightness(0) blur(3px); opacity: 0.22; transform: translate3d(3px, 5px, 0); pointer-events: none; will-change: transform; }
/* 极慢的呼吸：每个角色自己起伏一点，整张图一起涨落一点。只在这一段在视野里、没人碰它的时候动 */
.hw-breath { transform-origin: 50% 100%; }
.how[data-live='on'] .hw-breath { animation: hwBreath 6.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.9s); }
.how[data-live='on'] .hw-world { animation: hwWorld 11s ease-in-out infinite; }
@keyframes hwBreath { 50% { transform: scale(1.014, 0.984); } }
@keyframes hwWorld { 50% { transform: scale(1.008); } }
.hw.is-busy .hw-world, .hw.is-busy .hw-breath { animation-play-state: paused; }
/* 眨眼（眼睛的画法在 hero.css 的 .eye） */
.how[data-live='on'] .hw-node .eye::after { animation: hwBlink 5.4s linear infinite; animation-delay: calc(var(--i) * -1.7s); }
@keyframes hwBlink { 0%, 95%, 100% { transform: translateY(-104%); } 97.5% { transform: none; } }

/* 小纸片节点（两份文件、调研、挑错）：一小张浮起来的纸 */
.hw-file { display: block; width: 100%; height: 100%; border-radius: 20% / 16%; }
.hw-file-in { position: absolute; inset: 0; display: grid; align-content: center; gap: 11%; padding: 0 20%; border-radius: inherit; background: light-dark(var(--raised), #222225); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); }
.hw-file-in i { display: block; height: 1.5px; border-radius: 1px; background: var(--ink); opacity: 0.34; }
.hw-file-in i:nth-child(2) { width: 72%; } .hw-file-in i:nth-child(4) { width: 46%; }
.hw-node[data-node='log'] .hw-file-in i:nth-child(odd) { width: 84%; } .hw-node[data-node='log'] .hw-file-in i:nth-child(3) { width: 58%; }
.hw-node[data-node='research'] .hw-file-in i:nth-child(1) { width: 62%; } .hw-node[data-node='review'] .hw-file-in i:nth-child(3) { width: 38%; }

/* 小注：一直看得见。垫一块纸色，线从它后面过 */
/* 垫的纸带同一层噪点，和底下的纸一个颜色，看不出一块块长方形；只把穿过字的线遮住 */
.hw-label { position: absolute; left: 0; translate: -50% 0; display: grid; justify-items: center; gap: 1px; padding: 2px 6px 3px; border-radius: 7px; background-color: var(--paper); background-image: var(--grain); background-size: 200px 200px; font-size: var(--fs-small); line-height: 1.25; white-space: nowrap; text-align: center; pointer-events: none; }
.hw-node[data-label='bottom'] .hw-label { top: calc(var(--w) / var(--ar) / 2 + 5px); }
.hw-node[data-label='top'] .hw-label { bottom: calc(var(--w) / var(--ar) / 2 + 5px); }
.hw-label b { font-weight: var(--fw-bold); }
.hw-label span { color: var(--ink-2); }
.hw-label em, .hw-detail-k em { font-style: normal; }
/* 正中那个是拍板的人：名字是全图唯一一块墨底 */
.hw-node[data-kind='me'] .hw-label { gap: 4px; }
.hw-node[data-kind='me'] .hw-label b { padding: 2px 10px 3px; border-radius: 7px; background: var(--ink); color: var(--on-ink); }
.hw-node[data-kind='me'] .hw-label span { color: var(--ink); font-weight: var(--fw-medium); }

/* 说明：从小注外侧长出来的一小块，左右不出舞台 */
.hw-card { position: absolute; left: 0; width: 214px; translate: calc(clamp(0px, var(--x) * 1cqw - 107px, 100cqw - 214px) - var(--x) * 1cqw) 0; padding: 11px 13px 12px; border-radius: var(--r-m); background: var(--raised); border: 1px solid var(--line); box-shadow: var(--shadow-lift); font-size: var(--fs-small); line-height: 1.38; text-align: left; opacity: 0; visibility: hidden; transform: translateY(6px) scale(0.96); transition: opacity 0.14s, transform 0.4s var(--e-spring-soft), visibility 0s 0.14s; pointer-events: none; }
.hw-node[data-label='bottom'] .hw-card { top: calc(var(--w) / var(--ar) / 2 + 50px); transform-origin: 50% 0; }
.hw-node[data-label='top'] .hw-card { bottom: calc(var(--w) / var(--ar) / 2 + 50px); transform-origin: 50% 100%; }
.hw-node[data-kind='me'] .hw-card { top: calc(var(--w) / var(--ar) / 2 + 58px); }
.hw-node[data-on='true'] .hw-card { opacity: 1; visibility: visible; transform: none; transition: opacity 0.14s, transform 0.45s var(--e-spring-soft); }
.hw.is-dragging .hw-card { opacity: 0; }
.hw-fact { margin: 0; color: var(--ink); text-wrap: pretty; }
.hw-detail { display: none; }

/* 规矩：五行，行间细线，一行一行从行底升出来（用 base.css 的 .row 和 .mask） */
.how-rules-title { margin: 0 0 13px; font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-regular); color: var(--ink-2); }
.how-rules-list { margin: 0; padding: 0; list-style: none; }
.how-rule { display: block; padding: 15px 0 18px; }
.how-rule:first-child::before, .how-rule:first-child::after { display: block; }
.how-rule-t { font-size: max(var(--fs-statement), calc(var(--fs-large) * 0.5)); font-weight: var(--fw-bold); font-stretch: var(--wd-large); letter-spacing: var(--ls-statement); line-height: 1.16; text-wrap: balance; }
:lang(zh) .how-rule-t { line-height: 1.32; }
.how-colophon { margin: 20px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.how-colophon a { color: var(--ink); white-space: nowrap; }
.how-arrow { display: inline-block; margin-left: 0.35em; transition: translate 0.45s var(--e-spring); }
@media (hover: hover) and (pointer: fine) { .how-colophon a:hover .how-arrow { translate: 4px 0; } }

/* 不够宽：图和规矩上下排 */
@media (max-width: 1120px) {
  .hw { grid-column: 1 / -1; max-width: 560px; }
  .how-rules { grid-column: 1 / -1; margin-top: 44px; }
}
@media (max-width: 860px) {
  .how-top { display: block; }
  .hw { max-width: none; }
  .hw-stage { aspect-ratio: 350 / 452; margin-top: 4px; }
  .hw-label { font-size: 12px; padding: 1px 5px 2px; }
  /* 手机上图里只写名字，职责在点开后图下面的说明里 */
  .hw-node:not([data-kind='me']) .hw-label span { display: none; }
  .hw-card { display: none; }
  .hw-detail { display: block; min-height: 118px; margin-top: 10px; padding-top: 13px; border-top: 1px solid var(--line); font-size: var(--fs-body); line-height: 1.42; }
  html:not(.js) .hw-detail { display: none; }
  .hw-detail-k { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 6px; }
  .hw-detail-k span { color: var(--ink-2); font-size: var(--fs-small); }
  .how-rules { margin-top: 40px; }
  .how-rule { padding: 13px 0 15px; }
  .how-colophon { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-breath, .hw-world, .hw-node .eye::after { animation: none !important; }
  .hw-hit { cursor: pointer; touch-action: auto; }
  .hw-card, .how-arrow, .hw-node, .hw-link { transition: none !important; }
}
/* 输入（进）：滚动融合的沉浸式满屏暗房画廊。
   桌面端：外层 .inp-runway 提供约 2.25 屏的轻柔滚动行程，内部 .inp-sticky 吸顶铺满 100svh。
   进入与离开时，脚本通过 --merge (0..1) 只改 transform(scale) 和 clip-path/border-radius？
   为了严格只动 transform / opacity 且零重排：.inp-shell 始终是 100vw × 100svh，
   进入/离开时用 scale + 圆角裁切（clip-path: inset(...) round ...）从与页面内容对齐的圆角门户
   丝滑展开（merge）成 100% 满屏暗房，隔绝周围一切干扰；离开时平滑收拢，自然衔接下方 History。 */

.inp {
  display: block;
  margin: clamp(88px, 14vh, 160px) 0 0;
  padding: 0;
  scroll-margin-top: 0;
}

.inp::before {
  display: none;
}

/* 桌面端轻柔滚动跑道：仅多出 ~1.25 屏行程，滑进满屏 → 自然横向滑过 ~3 张画 → 收拢离开 */
.inp-runway {
  position: relative;
  height: 225svh;
}

.inp-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 640px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

/* 暗房主体：默认全满屏（无 JS / 沉浸中），进入和退出时脚本写 --inset-x / --inset-y / --radius 实现丝滑 merge 展开与收拢 */
.inp-shell {
  --inset-x: 0px;
  --inset-y: 0px;
  --radius: 0px;
  --inner-s: 1;
  --inner-o: 1;
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding: clamp(68px, 8.5vh, 92px) 0 clamp(24px, 3.2vh, 38px);
  /* 暗房的底色：深色模式下页面本身就是深的，暗房再暗一档，展开和收拢时看得出边 */
  --room: light-dark(#10100f, #060607);
  background-color: var(--room);
  background-image: var(--grain);
  background-size: 200px 200px;
  color: #ededea;
  clip-path: inset(var(--inset-y) var(--inset-x) var(--inset-y) var(--inset-x) round var(--radius));
  will-change: clip-path;
  --ink: #ededea;
  --ink-2: #b4b3ac;
  --ink-3: #898882;
  --line: rgba(242, 242, 240, 0.15);
  --raised: #181817;
  --paper: var(--room);
  --rim: rgba(255, 255, 255, 0.12);
}

/* 顶部极简展厅铭牌：单行紧凑，把视觉重心 100% 让给中间的复古胶片画廊 */
.inp-bar {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 0 var(--pad);
  opacity: var(--chrome-o, 1);
  transform: translate3d(0, var(--chrome-y, 0px), 0);
  will-change: transform, opacity;
}

/* 段名：和其他段左栏的段名同一档（v16 删了后面那句 statement） */
.inp-title {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  line-height: var(--lh-small);
  color: #f3f2ee;
}

/* 中间画廊舞台：垂直居中占据主体空间，进出暗房时带极克制的景深推拉与明暗呼应 */
.inp-stage {
  position: relative;
  width: 100%;
  padding: clamp(18px, 2.8vh, 32px) 0 clamp(46px, 6.5vh, 80px);
  overflow: hidden;
  outline: none;
  opacity: var(--inner-o, 1);
  transform: scale(var(--inner-s, 1));
  transform-origin: 50% 48%;
  will-change: transform, opacity;
}

.inp-stage:focus-visible::before {
  box-shadow: inset 3px 0 0 #ededea;
}

/* 左右极柔和暗房渐隐：一块和暗房一模一样的底（同色、同一层噪点），用遮罩从不透明淡到透明。
   以前是一条没有噪点的平色渐变，在有噪点的暗房里成了两条更暗的竖条，到带子底下就断，暗房里像套着一个长方形 */
.inp-stage::before,
.inp-stage::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(18px, 3vw, 56px);
  z-index: 5;
  pointer-events: none;
  background-color: var(--room);
  background-image: var(--grain);
  background-size: 200px 200px;
}

.inp-stage::before {
  left: 0;
  -webkit-mask-image: linear-gradient(to right, #000, transparent);
  mask-image: linear-gradient(to right, #000, transparent);
}

.inp-stage::after {
  right: 0;
  -webkit-mask-image: linear-gradient(to left, #000, transparent);
  mask-image: linear-gradient(to left, #000, transparent);
}

/* 原生 WebGL 曲面弯曲画布 */
.inp-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  display: none;
}

.inp-stage[data-gl='on'] .inp-gl {
  display: block;
}

/* 轨道：无 JS 或减少动效时是原生横向画廊 */
.inp-track {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: clamp(28px, 3.2vw, 48px);
  margin: 0;
  padding: 4px var(--pad) 16px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.inp-track::-webkit-scrollbar {
  display: none;
}

.inp-stage[data-belt='live'] {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.inp-stage[data-belt='live'].is-dragging {
  cursor: grabbing;
}

.inp-stage[data-belt='live'] .inp-track {
  display: block;
  overflow: visible;
  padding: 0;
  height: var(--belt-h, 460px);
  scroll-snap-type: none;
}

/* 大画幅卡片：桌面宽约 520px，视觉张力与 arc-gallery 看齐 */
.inp-card {
  flex: 0 0 auto;
  width: clamp(340px, 37vw, 536px);
  scroll-snap-align: start;
  transform-origin: 50% 48%;
}

.inp-stage[data-belt='live'] .inp-card {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.inp-btn {
  display: grid;
  gap: 14px;
  width: 100%;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: none;
  text-align: left;
  cursor: inherit;
  color: inherit;
}

.inp-btn:focus-visible {
  outline: none;
}

.inp-btn:focus-visible .inp-frame {
  outline: 2px solid #f3f2ee;
  outline-offset: 4px;
}

.inp-short {
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.25;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: #f3f2ee;
}

:lang(zh) .inp-short {
  letter-spacing: 0;
}

.inp-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background-color: #181817;
  box-shadow: 0 24px 52px -22px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.inp-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.6s var(--e-out);
}

@media (hover: hover) and (pointer: fine) {
  .inp-stage:not([data-gl='on']) .inp-btn:hover .inp-img {
    transform: scale(1.035);
  }
}

.inp-stage[data-gl='on'] .inp-frame {
  background: transparent;
  box-shadow: none;
}

.inp-stage[data-gl='on'] .inp-img {
  opacity: 0;
}

.inp-sub {
  display: grid;
  gap: 6px;
}

.inp-cap {
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 46ch;
}

.inp-state {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #f3f2ee;
  font-weight: var(--fw-medium);
}

/* 底部极简展厅进度刻度栏 */
/* ================= 点击展开的暗房详情纸 ================= */
.inp-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
}

.inp-modal[hidden] {
  display: none;
}

.inp-scrim {
  position: absolute;
  inset: 0;
  background-color: rgba(8, 8, 9, 0.82);
  opacity: 0;
  will-change: opacity;
}

.inp-dialog {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: min(88vh, 680px);
  overflow-y: auto;
  border-radius: var(--r-l);
  padding: clamp(22px, 3vw, 32px);
  background-color: #161615;
  background-image: var(--grain);
  background-size: 200px 200px;
  color: #ededea;
  border: 1px solid rgba(242, 242, 240, 0.14);
  box-shadow: 0 36px 90px -20px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: translate3d(0, 48px, 0) scale(0.97);
  will-change: transform, opacity;
  --ink: #ededea;
  --ink-2: #a0a09a;
  --ink-3: #6f6f6a;
  --line: rgba(242, 242, 240, 0.14);
}

.inp-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.inp-dialog-nav {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.inp-d-btn {
  color: #ededea;
}

.inp-d-btn::before {
  background: rgba(242, 242, 240, 0.12);
}

.inp-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(22px, 3.2vw, 36px);
  align-items: start;
}

.inp-panel[hidden] {
  display: none;
}

.inp-panel-figure {
  margin: 0;
  display: grid;
  gap: 10px;
}

.inp-panel-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(242, 242, 240, 0.12);
  background-color: #0e0e0d;
}

.inp-panel-credit {
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--ink-3);
}

.inp-panel-copy {
  display: grid;
  gap: 14px;
}

.inp-panel-title {
  margin: 0;
  font-size: var(--fs-statement);
  line-height: var(--lh-statement);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-statement);
  color: #f3f2ee;
  text-wrap: pretty;
}

.inp-panel-detail {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: #b8b8b2;
  text-wrap: pretty;
}

.inp-panel-foot {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.inp-panel-out {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: var(--fs-body);
  color: var(--ink-2);
}

.inp-link {
  color: #f3f2ee;
  font-weight: var(--fw-medium);
}

/* ================= 手机 390 适配：满宽无左右白边，不劫持竖向滚动 ================= */
@media (max-width: 860px) {
  .inp {
    margin-top: clamp(72px, 11vh, 120px);
  }

  .inp-runway {
    height: auto;
  }

  .inp-sticky {
    position: static;
    height: auto;
    min-height: 0;
  }

  /* 手机上暗房是一块不满屏的深色：底下的内边距和上面差不多（以前 46 + 48，卡片下面空了一大截深色），
     后面“经历”的段前留白也收一些，深色块的边本身就是分隔，不用再空一整段浅色 */
  .inp-shell {
    clip-path: none !important;
    display: block;
    padding: 44px 0 28px;
  }

  .inp + .sec {
    margin-top: 56px;
  }

  .inp-bar {
    display: grid;
    gap: 8px;
    padding: 0 20px;
  }

  .inp-stage {
    margin-top: 22px;
    padding: 10px 0 16px;
  }

  .inp-stage::before,
  .inp-stage::after {
    width: 14px;
  }

  .inp-track {
    gap: 20px;
    padding-inline: 20px;
  }

  .inp-card {
    width: min(82vw, 326px);
  }

  .inp-stage[data-belt='live'] .inp-track {
    height: var(--belt-h, 344px);
  }

  .inp-modal {
    align-items: end;
    padding: 10px;
  }

  .inp-dialog {
    width: 100%;
    max-height: 88vh;
    border-radius: 18px;
    padding: 18px 18px 22px;
  }

  .inp-panel {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* 减少动效与无脚本：直接满宽暗房展示，不做滚动跑道和弯弧 */
html:not(.js) .inp-runway,
html:not(.js) .inp-sticky {
  height: auto;
  min-height: 0;
  position: static;
}

html:not(.js) .inp-shell {
  clip-path: none;
  display: block;
  padding: 56px 0 52px;
}

@media (prefers-reduced-motion: reduce) {
  .inp-runway,
  .inp-sticky {
    height: auto;
    min-height: 0;
    position: static;
  }

  .inp-shell {
    clip-path: none !important;
    display: block;
    padding: 56px 0 52px;
  }

  .inp-gl {
    display: none !important;
  }

  .inp-stage {
    cursor: default;
    margin-top: 24px;
    padding: 12px 0 18px;
  }

  .inp-img {
    opacity: 1 !important;
    transition: none !important;
    transform: none !important;
  }
}

/* Token 用量的贡献图（在“我怎么工作”那一段的第二行）：一年的格子，一列一周，五档从纸色到墨色（深色模式下自然反过来），不用绿色。
   格子的大小按这一块的宽度算（--cell，用 cqw）：桌面一整年正好铺满；手机上只铺最近半年，其余往右滑。 */
.usage-rail, .usage { grid-row: 2; margin-top: clamp(60px, 11vh, 120px); padding-top: 15px; }
.usage-rail { position: relative; top: auto; }
.usage-rail h3 { margin: 0; font: inherit; }
/* 这一块上面的细线，横贯整段 */
.usage-rail::before { content: ''; position: absolute; left: 0; top: 0; width: calc(100vw - 2 * var(--pad)); height: 1px; background: var(--line); }
.usage { position: relative; }
.usage-head { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: end; margin-bottom: clamp(20px, 3.4vh, 30px); }
.usage-total { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 16px; margin: 0; }
.usage-num { display: inline-flex; font-size: var(--fs-large); font-weight: var(--fw-bold); font-stretch: 88%; letter-spacing: -0.03em; line-height: 1; }
/* 大数字滚到位：每一位是一条 0 到 9 的竖带，只做位移 */
.od { display: inline-block; height: 1em; overflow: hidden; }
.od-strip { display: block; transform: translateY(calc(var(--d) * -10%)); transition: transform 1.3s var(--e-out) calc(var(--i) * 45ms + 120ms); }
.od-strip span { display: block; height: 1em; line-height: 1; }
.js .usage:not(.in) .od-strip { transform: none; }
.usage-unit { padding-bottom: 0.3em; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.usage-unit b { font-weight: var(--fw-medium); color: var(--ink); }
.usage-unit i { display: block; font-style: normal; }
.usage-sample { align-self: center; padding: 1px 6px 2px; border: 1px solid var(--ink); border-radius: 5px; font-family: var(--font-mono); font-size: var(--fs-small); }

/* 方案 1：左侧 13.5px 标准小方格（30 周真实记录，零前半年空白），右侧并排三项统计指标 */
.usage-main { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(220px, 1fr); column-gap: clamp(32px, 4vw, 56px); align-items: end; }
.usage-plot { position: relative; --cell: 13.5px; --gap: 3.5px; }
.usage-scroll, .usage-days { --cell: 13.5px; }
.usage-stats { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 0; padding-bottom: 2px; font-size: var(--fs-small); line-height: var(--lh-small); }
.usage-stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.usage-stats dt { color: var(--ink-2); white-space: nowrap; }
.usage-stats dd { margin: 0; font-weight: var(--fw-medium); text-align: right; }
.usage-stats dd span { display: inline; margin-left: 8px; font-weight: var(--fw-regular); color: var(--ink-2); }
.usage-days { position: absolute; right: calc(100% + 9px); top: 22px; margin: 0; padding: 0; list-style: none; font-size: 11px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.usage-days li { height: var(--cell); margin-bottom: var(--gap); line-height: var(--cell); }
.usage-months { position: relative; height: 22px; font-size: 11px; line-height: 16px; color: var(--ink-2); }
.usage-months span { position: absolute; top: 0; left: calc(var(--c) * (var(--cell) + var(--gap))); white-space: nowrap; }
.usage-weeks { display: flex; gap: var(--gap); }
.uw { flex: none; display: grid; gap: var(--gap); width: var(--cell); }
.uc { display: block; width: var(--cell, 11px); height: var(--cell, 11px); border-radius: 22%; background: color-mix(in srgb, var(--ink) var(--lv, 7%), transparent); transition: transform 0.4s var(--e-spring-soft); }
.uc[data-l='1'] { --lv: 24%; } .uc[data-l='2'] { --lv: 46%; } .uc[data-l='3'] { --lv: 72%; } .uc[data-l='4'] { --lv: 100%; }
.uc.is-none { visibility: hidden; }
/* 指到的格子被按下去一点 */
.uc.on { transform: scale(0.74); }
@media (hover: hover) and (pointer: fine) { .usage-weeks .uc:hover { transform: scale(0.74); } }
/* 进场：格子按列从左到右依次落进来 */
.js .usage .uw { opacity: 0; translate: 0 -10px; transition: opacity 0.2s linear calc(var(--c) * 11ms + 240ms), translate 0.5s var(--e-spring-soft) calc(var(--c) * 11ms + 240ms); }
.js .usage.in .uw { opacity: 1; translate: none; }
.usage-tip { position: absolute; left: 0; top: 0; z-index: 3; padding: 6px 10px 7px; border-radius: 9px; background: var(--ink); color: var(--on-ink); font-size: var(--fs-small); line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; opacity: 0; transition: opacity 0.12s; will-change: transform; }
.usage-tip[data-on='true'] { opacity: 1; }
.usage-tip b { display: block; font-weight: var(--fw-bold); }
.usage-tip span { color: var(--on-ink-2); }
.usage-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 13px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.usage-foot p { margin: 0; }
.usage-legend { display: flex; align-items: center; gap: 3px; }
.usage-legend .uc { width: 11px; height: 11px; }
.usage-legend .uc[data-l='0'] { box-shadow: inset 0 0 0 1px var(--line); }
.usage-legend .uc:first-of-type { margin-left: 5px; } .usage-legend .uc:last-of-type { margin-right: 5px; }

@media (max-width: 1120px) {
  .usage-main { grid-template-columns: 1fr; row-gap: 22px; }
  .usage-plot { container-type: inline-size; }
  .usage-scroll, .usage-days { --cell: min(13.5px, calc((100cqw - 29 * var(--gap)) / 30)); }
  .usage-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--g); }
  .usage-stats div { display: block; }
  .usage-stats dd { margin-top: 3px; text-align: left; }
  .usage-stats dd span { display: block; margin-left: 0; }
}
@media (max-width: 860px) {
  .usage-rail, .usage { margin-top: 56px; }
  .usage-rail { margin-bottom: 18px; }
  .usage-rail::before { width: 100%; }
  .usage { margin-top: 0; padding-top: 0; }
  .usage-head { display: block; }
  .usage-days { display: none; }
  .usage-plot { --gap: 2.5px; }
  /* 左边淡出：被切掉一半的月份名和格子不是硬边，也看得出往左还有 */
  .usage-scroll { --cell: calc((100cqw - 25 * var(--gap)) / 26); overflow-x: auto; direction: rtl; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px); mask-image: linear-gradient(90deg, transparent, #000 28px); }
  .usage-scroll::-webkit-scrollbar { display: none; }
  .usage-grid { direction: ltr; width: max-content; }
}
@media (prefers-reduced-motion: reduce) {
  .od-strip, .uc { transition: none !important; }
  .js .usage:not(.in) .od-strip { transform: translateY(calc(var(--d) * -10%)); }
  .js .usage .uw { opacity: 1 !important; translate: none !important; transition: none !important; }
}
/* Colophon（/colophon）：一页短文，和首页同一套网格和行。 */
.colo { min-height: 100svh; padding: clamp(110px, 17vh, 170px) 0 clamp(60px, 10vh, 110px); background-color: var(--paper); }
.colo-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); margin: 0 var(--pad); }
.colo-kicker { grid-column: 1 / span 3; margin: 0; padding-top: 0.5em; font-size: var(--fs-small); font-weight: var(--fw-medium); line-height: var(--lh-small); }
.colo-lead { grid-column: 4 / span 8; margin: 0; font-size: var(--fs-large); font-weight: var(--fw-bold); font-stretch: var(--wd-large); letter-spacing: var(--ls-large); line-height: var(--lh-large); text-wrap: balance; }
.colo .sec { margin-top: clamp(64px, 11vh, 120px); }
.colo-rows { grid-column: 4 / -1; }
.colo-row { display: grid; grid-template-columns: subgrid; padding: 20px 0 26px; }
.colo-row:first-child { padding-top: 0; }
.colo-k { grid-column: 1 / span 2; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); padding-top: 0.35em; }
.colo-v { grid-column: 3 / span 6; }
.colo-v p { margin: 0; max-width: 34em; font-size: var(--fs-statement); font-weight: var(--fw-medium); font-stretch: var(--wd-statement); letter-spacing: var(--ls-statement); line-height: var(--lh-statement); text-wrap: pretty; }
.colo-list { margin: 14px 0 0; padding: 0; list-style: none; max-width: 34em; }
.colo-list li { padding: 9px 0 10px; border-top: 1px solid var(--line); }
.colo-out { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 0; font-family: var(--font-mono); font-size: var(--fs-small); }
.colo-spec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 28px; margin: 16px 0 0; font-size: var(--fs-large); font-weight: var(--fw-bold); font-stretch: var(--wd-large); letter-spacing: var(--ls-large); line-height: 1.1; }
.colo-spec span:last-child { font-family: 'Noto Sans SC Variable', system-ui, sans-serif; font-stretch: 100%; letter-spacing: 0; }
.colo-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: clamp(56px, 10vh, 110px) var(--pad) 0; padding-top: 13px; border-top: 1px solid var(--line); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.colo-foot a, .colo-foot button { color: var(--ink); }
.colo-foot button { appearance: none; border: 0; margin: 0; padding: 0 0 2px; font: inherit; cursor: pointer; background-color: transparent; }
@media (max-width: 860px) {
  .colo-top { display: block; } .colo-kicker { margin-bottom: 18px; }
  .colo-row { display: block; } .colo-k { margin-bottom: 8px; }
  .colo-foot { display: grid; justify-items: start; }
}
/* 404：一张纸，一个大数字，一句话，两三个链接。网格和字号都用全站的变量。 */
.nf { min-height: 100svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-content: center; padding: clamp(110px, 17vh, 170px) var(--pad) clamp(60px, 10vh, 110px); background-color: var(--paper); }
.nf > * { grid-column: 4 / span 8; }
.nf-code { margin: 0 0 0.06em -0.04em; font-size: calc(var(--fs-mega) * 1.5); font-weight: var(--fw-bold); font-stretch: 88%; letter-spacing: -0.05em; line-height: 1; color: var(--ink-3); }
.nf-big { margin: 0; font-size: var(--fs-large); font-weight: var(--fw-bold); font-stretch: var(--wd-large); letter-spacing: var(--ls-large); line-height: var(--lh-large); text-wrap: balance; }
.nf-big span { display: block; margin-top: 0.3em; font-size: 0.62em; letter-spacing: 0; font-stretch: 100%; color: var(--ink-2); }
.nf-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: clamp(28px, 5vh, 48px) 0 0; padding-top: 13px; border-top: 1px solid var(--line); font-size: var(--fs-small); line-height: var(--lh-small); }
@media (max-width: 860px) { .nf { display: block; } }
/* 给机器看的一面：一张从下面盖上来的纸（components/Machine.astro，脚本在 scripts/machine.ts）。
   纸的位置由脚本的弹簧写 transform；这里管它开着和关着的样子。顶上留一条不盖，顶栏还在那儿，可以切回 Human。
   纸往下多出一截（bottom 是负的），弹簧到顶回弹时底下不会露出页面。 */
.mach { position: fixed; inset: 0; z-index: 40; visibility: hidden; pointer-events: none; --mach-top: clamp(58px, 8.5svh, 76px); }
html:not(.js) .mach { display: none; }
.mach[data-open='true'], .mach[data-busy='true'] { visibility: visible; }
.mach[data-open='true'] { pointer-events: auto; }
.mach-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 0.35s; }
.mach[data-open='true'] .mach-scrim { opacity: 1; }
.mach-sheet { position: absolute; left: 0; right: 0; top: var(--mach-top); bottom: -160px; display: flex; flex-direction: column; background-color: var(--raised); border-top: 1px solid var(--line); border-radius: clamp(20px, 2.4vw, 34px) clamp(20px, 2.4vw, 34px) 0 0; box-shadow: inset 0 1px 0 var(--rim); transform: translate3d(0, 110vh, 0); will-change: transform; outline: none; }

/* 顶上那一条：可以抓着往下拖；右边三个动作和关闭 */
.mach-bar { position: relative; flex: none; display: flex; align-items: center; justify-content: flex-end; padding: 17px var(--pad) 13px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.mach-grip { position: absolute; left: 50%; top: 7px; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: var(--line); }
.mach-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 20px; font-size: var(--fs-small); font-weight: var(--fw-medium); line-height: var(--lh-small); }
.mach-copy { position: relative; display: inline-flex; align-items: center; }
.mach-copied { position: absolute; right: calc(100% + 12px); white-space: nowrap; font-weight: var(--fw-regular); color: var(--ink-2); opacity: 0; transition: opacity 0.2s; }
.mach-copied[data-on='true'] { opacity: 1; }
.mach-open { padding: 6px 0; white-space: nowrap; }
.mach-close { appearance: none; margin: 0; padding: 3px 7px 4px; border: 1px solid var(--line); border-radius: 7px; background: none; color: var(--ink-2); cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast); }
.mach-close kbd { font-family: var(--font-mono); font-size: 12px; }
@media (hover: hover) and (pointer: fine) { .mach-close:hover { color: var(--ink); border-color: var(--ink); } }

.mach-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); padding-bottom: 200px; }
.mach-in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); padding: 28px var(--pad) 40px; }
.mach-rail { grid-column: 1 / span 3; align-self: start; position: sticky; top: 28px; }
.mach-intro { margin: 0; max-width: 15em; font-size: var(--fs-statement); font-weight: var(--fw-medium); font-stretch: var(--wd-statement); letter-spacing: var(--ls-statement); line-height: var(--lh-statement); text-wrap: balance; }
.mach-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 14px 0 0; font-family: var(--font-mono); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mach-meta a { color: var(--ink); }
/* 纯文本：等宽字，行号挂在左边（是伪元素，选不中也复制不走），标题行用墨色，其余用次色 */
.mach-text { grid-column: 4 / -1; max-width: 96ch; margin: 0; padding: 0; list-style: none; counter-reset: ln; font-family: var(--font-mono); font-size: var(--fs-small); line-height: 1.62; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mach-text li { position: relative; min-height: 1.62em; counter-increment: ln; white-space: pre-wrap; overflow-wrap: anywhere; }
.mach-text li::before { content: counter(ln); position: absolute; right: calc(100% + 18px); top: 0; color: var(--ink-3); white-space: nowrap; user-select: none; -webkit-user-select: none; }
.mach-text li.h { color: var(--ink); font-weight: var(--fw-medium); }
.js .mach-text li { opacity: 0; transition: opacity 0.3s linear; }
.mach[data-open='true'] .mach-text li { opacity: 1; transition-delay: calc(min(var(--n), 46) * 13ms + 300ms); }

@media (max-width: 860px) {
  .mach-bar { justify-content: flex-start; padding: 22px var(--pad) 12px; }
  .mach-actions { justify-content: flex-start; gap: 6px 16px; }
  .mach-copied { right: auto; left: 0; top: calc(100% + 2px); }
  .mach-close { margin-left: auto; }
  .mach-in { display: block; padding: 20px var(--pad) 40px; }
  .mach-rail { position: static; margin-bottom: 22px; }
  .mach-text { padding-left: 3.4ch; font-size: 12px; }
  .mach-text li::before { right: calc(100% + 1.2ch); }
}
@media (prefers-reduced-motion: reduce) {
  .mach-scrim, .mach-text li { transition: none !important; }
  .mach[data-open='true'] .mach-text li { transition-delay: 0s; }
}

/* 复制按钮是一颗小一号的液滴 */
.mach-copy .liq-body { padding: 7px 15px 8px; }
.mach-copy .liq-t { font-size: var(--fs-small); }
/* Route announcer */
	.astro-route-announcer {
		position: absolute;
		left: 0;
		top: 0;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		overflow: hidden;
		white-space: nowrap;
		width: 1px;
		height: 1px;
	}