/* lemo-animi gallery. The studio bench: warm paper, masking-tape labels, film strips with sprocket holes, sticker
   buttons with a hard shadow. Everything moves the way the films do: in steps, never eased. Rules: docs/DESIGN.md. */

/* ---------- tokens:start (kept in sync with scripts/review.py) ---------- */
:root {
  --surface-0: #f4ede1; --surface-1: #ebe2d2; --surface-2: #fdf8ef;
  --ink: #1e1915; --ink-2: #645a4e; --ink-3: #6b6053; --line: #d9cdb8; --line-2: #c9bca4;
  --accent: #d2402f; --accent-ink: #b4321f; --accent-soft: #f7ddd6; --on-accent: #fff;
  --ok: #237057; --ok-soft: #d9ede3; --info: #3c5fa6; --info-soft: #dde6f6;
  --warn: #8f5b00; --warn-soft: #f8e9c4; --danger: #b02a1d; --danger-soft: #f6d9d4;
  --deck: #27211b; --deck-2: #352d25; --deck-ink: #f1e8d8; --deck-mute: #a89a86; --hole: rgba(244, 237, 225, .78);
  --tape: rgba(236, 221, 182, .85); --tape-ink: #5b4d35;
  --sh-1: 0 1px 0 rgba(60, 40, 20, .06), 0 10px 28px -14px rgba(60, 40, 20, .35);
  --sh-2: 0 2px 0 rgba(60, 40, 20, .06), 0 22px 44px -18px rgba(60, 40, 20, .45);
  --sh-hard: 2px 2px 0 var(--ink); --sh-hard-up: 3px 3px 0 var(--ink);
  --f-display: "Fraunces", "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --f-sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 22px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --t-xs: 12px; --t-sm: 13px; --t-md: 15px; --t-lg: 17px; --t-xl: 20px;
  --btn-sm: 32px; --btn-md: 40px; --btn-lg: 48px; --focus: 0 0 0 2px var(--surface-0), 0 0 0 4.5px var(--accent);
  --step: .12s steps(2, end);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-0: #15120f; --surface-1: #1d1814; --surface-2: #26201a;
    --ink: #f1e8da; --ink-2: #b3a694; --ink-3: #9a8d7e; --line: #38302a; --line-2: #4a4038;
    --accent: #ef6a56; --accent-ink: #ff8a76; --accent-soft: #3f231e; --on-accent: #15120f;
    --ok: #5fc49b; --ok-soft: #173327; --info: #8fb3ea; --info-soft: #1c2a42;
    --warn: #e9b949; --warn-soft: #3a2f12; --danger: #ff7f6c; --danger-soft: #45201b;
    --deck: #0f0d0b; --deck-2: #1c1813; --deck-ink: #efe6d6; --deck-mute: #9a8d7d; --hole: #3a332a;
    --tape: rgba(120, 100, 60, .45); --tape-ink: #e8d9b5;
    --sh-1: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .75);
    --sh-2: 0 2px 0 rgba(0, 0, 0, .3), 0 24px 48px -18px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --surface-0: #15120f; --surface-1: #1d1814; --surface-2: #26201a;
  --ink: #f1e8da; --ink-2: #b3a694; --ink-3: #9a8d7e; --line: #38302a; --line-2: #4a4038;
  --accent: #ef6a56; --accent-ink: #ff8a76; --accent-soft: #3f231e; --on-accent: #15120f;
  --ok: #5fc49b; --ok-soft: #173327; --info: #8fb3ea; --info-soft: #1c2a42;
  --warn: #e9b949; --warn-soft: #3a2f12; --danger: #ff7f6c; --danger-soft: #45201b;
  --deck: #0f0d0b; --deck-2: #1c1813; --deck-ink: #efe6d6; --deck-mute: #9a8d7d; --hole: #3a332a;
  --tape: rgba(120, 100, 60, .45); --tape-ink: #e8d9b5;
  --sh-1: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .75);
  --sh-2: 0 2px 0 rgba(0, 0, 0, .3), 0 24px 48px -18px rgba(0, 0, 0, .85);
  color-scheme: dark;
}
/* ---------- tokens:end ---------- */

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface-0); color: var(--ink); font: var(--t-lg)/1.65 var(--f-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code { font: .86em/1.4 var(--f-mono); background: var(--surface-1); padding: .1em .4em; border-radius: var(--r-sm); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.num { font-variant-numeric: tabular-nums; }
.nb { white-space: nowrap; }
/* Chinese breaks at punctuation and spaces first, so words like 提示词 or 审片台 stay whole; a run too long for the
   line still breaks anywhere rather than overflow */
:lang(zh-CN) body { word-break: keep-all; overflow-wrap: anywhere; }                    /* a hyphenated word in a heading or label: build.py wraps it, it never breaks at the hyphen */
p, li, figcaption { text-wrap: pretty; }        /* no one-word last lines */
h1, h2, h3 { text-wrap: balance; font-family: var(--f-display); font-weight: 600; letter-spacing: -.015em; line-height: 1.08; margin: 0; font-optical-sizing: auto; font-variation-settings: "SOFT" 100, "WONK" 0; }
h2 { font-size: clamp(32px, 4.4vw, 52px); }
h2.sm { font-size: clamp(26px, 3.2vw, 38px); }
h2.xs { font-size: clamp(22px, 2.4vw, 28px); }
:lang(zh-CN) h1, :lang(zh-CN) h2, :lang(zh-CN) h3 { letter-spacing: 0; line-height: 1.2; }
.lede { color: var(--ink-2); max-width: 62ch; margin: var(--s-3) 0 0; text-wrap: pretty; }
section { padding: clamp(40px, 5vw, 68px) 0 0; scroll-margin-top: 64px; }

/* a strip of masking tape: the section kicker. Slightly askew, torn ends. */
.tape { display: inline-flex; align-items: center; gap: 8px; position: relative; font: 600 var(--t-xs)/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tape-ink); background: var(--tape); padding: 8px 14px; margin-bottom: var(--s-3); transform: rotate(-1.2deg); transform-origin: left center; backdrop-filter: blur(1px); }
.tape::before, .tape::after { content: ""; position: absolute; top: 0; bottom: 0; width: 6px; background: inherit; }
.tape::before { left: -4px; clip-path: polygon(100% 0, 100% 100%, 0 85%, 45% 65%, 10% 45%, 55% 25%, 20% 5%); }
.tape::after { right: -4px; clip-path: polygon(0 0, 0 100%, 100% 90%, 50% 70%, 85% 50%, 40% 30%, 80% 10%); }
:lang(zh-CN) .tape { letter-spacing: .08em; font-family: var(--f-sans); }
.tape.flat { transform: none; }

/* ---------- buttons: one system, DESIGN.md ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--btn-md); padding: 0 16px; border-radius: var(--r-md); border: 1.5px solid var(--ink); background: var(--surface-2); color: var(--ink); font: 600 14px/1 var(--f-sans); text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent; box-shadow: var(--sh-hard); transition: transform var(--step), box-shadow var(--step), background-color var(--step); }
.btn:hover { transform: translate(-1px, -1px); box-shadow: var(--sh-hard-up); text-decoration: none; }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--ink); }
.btn:focus-visible { box-shadow: var(--sh-hard), var(--focus); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; box-shadow: none; transform: none; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--ink); color: var(--surface-0); --sh-hard: 2px 2px 0 var(--accent); --sh-hard-up: 3px 3px 0 var(--accent); }
.btn.primary:active { box-shadow: 0 0 0 var(--accent); }
.btn.ok { border-color: var(--ok); color: var(--ok); --sh-hard: 2px 2px 0 var(--ok); --sh-hard-up: 3px 3px 0 var(--ok); }
.btn.ok:active { box-shadow: 0 0 0 var(--ok); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.quiet:hover { background: var(--surface-1); color: var(--ink); transform: none; box-shadow: none; }
.btn.quiet:active { transform: translateY(1px); }
.btn.quiet:focus-visible { box-shadow: var(--focus); }
.btn.icon { padding: 0; width: var(--btn-md); }
.btn.sm { height: var(--btn-sm); padding: 0 12px; font-size: var(--t-sm); border-radius: 8px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.sm.icon { width: var(--btn-sm); }
.btn.lg { height: var(--btn-lg); padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.lg svg { width: 20px; height: 20px; }
.btn.lg.icon { width: var(--btn-lg); }
.btn.pill { border-radius: 999px; }

/* pills: status, never actions */
.pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; font: 600 var(--t-sm)/1 var(--f-sans); white-space: nowrap; background: var(--surface-1); color: var(--ink-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.ok.live::before { animation: breathe 2.4s steps(6, end) infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface-0) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s steps(2); }
.top.stuck { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
.mark { font: 600 21px/1 var(--f-display); text-decoration: none; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.mark i { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); display: inline-block; box-shadow: inset -4px -5px 0 rgba(0, 0, 0, .18); transition: transform var(--step); }
.mark:hover i { transform: translateY(-3px) scaleY(1.06); }
.top nav { display: flex; gap: 20px; margin-left: auto; font-size: var(--t-md); }
.top nav a { text-decoration: none; color: var(--ink-2); white-space: nowrap; padding: 6px 0; }
.top nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.tools { display: flex; gap: 8px; align-items: center; }
@media (max-width: 860px) { .top nav { display: none; } .tools { margin-left: auto; } }
@media (max-width: 520px) { .tools .gh span { display: none; } .tools .gh { width: var(--btn-sm); padding: 0; } .top .wrap { gap: 10px; } .mark { font-size: 19px; } }

/* ---------- hero ---------- */
/* The hero is the same height in English and Chinese: the h1, the lede and the "you say" line each sit in a box
   as tall as the longer language needs (min-height in lines, per breakpoint), the shorter one centred in it. */
.hero { padding: clamp(32px, 5vw, 64px) 0 0; text-align: center; }
.hero .tape { margin-bottom: var(--s-4); max-width: 100%; text-align: center; justify-content: center; text-wrap: balance; line-height: 1.4; }
@media (max-width: 520px) { .hero .tape { letter-spacing: .06em; font-size: 11px; } }
.hero h1 { font-size: clamp(36px, 7.4vw, 100px); line-height: 1.04; max-width: 9.6em; margin: 0 auto; font-variation-settings: "SOFT" 100, "WONK" 1; }
:lang(zh-CN) .hero h1 { max-width: 9em; font-size: clamp(36px, 6.4vw, 86px); line-height: 1.2; }
.hero .lede { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; max-width: 60ch; margin: var(--s-4) auto 0; text-wrap: balance; }
:lang(zh-CN) .hero .lede { max-width: 34em; }
/* phones: both h1s two lines at the same size; the Chinese lede and "you say" boxes as tall as the English ones */
@media (max-width: 600px) {
  .hero h1, :lang(zh-CN) .hero h1 { font-size: min(10vw, 44px); }
  :lang(zh-CN) .hero h1 { line-height: 1.1; }
  :lang(zh-CN) .hero .lede { min-height: 8em; }
  .say .say-l { min-height: 4.5em; }
}
@media (max-width: 374px) { :lang(zh-CN) .hero .lede { min-height: 9.6em; } }
/* "you say": an index card, taped to the page */
.say { position: relative; margin: var(--s-5) auto 0; max-width: 820px; text-align: left; background: var(--surface-2); border-radius: var(--r-sm); box-shadow: var(--sh-1), 0 0 0 1px var(--line); padding: 20px 24px 22px; transform: rotate(-.5deg); }
.say::before { content: ""; position: absolute; left: 50%; top: -11px; width: 92px; height: 24px; margin-left: -46px; background: var(--tape); transform: rotate(1.5deg); box-shadow: 0 1px 2px rgba(60, 40, 20, .12); }
.say b { display: block; font: 600 var(--t-xs)/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.say .say-l { display: grid; align-content: center; font: 500 clamp(17px, 1.9vw, 21px)/1.5 var(--f-sans); }
.say q { quotes: none; text-wrap: balance; }
.say q::after { content: ""; display: inline-block; width: .55em; height: 1.05em; margin-left: 3px; vertical-align: -.16em; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: var(--s-5); }

/* ---------- the cast on its shelf ---------- */
.shelf { position: relative; margin-top: clamp(32px, 4.5vw, 56px); }
.shelf::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: var(--surface-1); border-top: 2px solid var(--line-2); box-shadow: inset 0 10px 14px -12px rgba(60, 40, 20, .35); }
.cast { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; align-items: end; max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.actor { position: relative; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: var(--r-md); }
.actor .pup { position: relative; width: 100%; display: flex; justify-content: center; align-items: flex-end; height: clamp(96px, 15vw, 190px); }
.actor .pup::after { content: ""; position: absolute; bottom: -6px; left: 18%; right: 18%; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(70, 45, 20, .4), transparent); z-index: 0; }
.actor .label { position: relative; height: 70px; padding-top: 16px; text-align: center; line-height: 1.25; }
.actor .label b { display: block; font: 600 15px/1.25 var(--f-display); text-wrap: balance; }
.actor .label > span { font: var(--t-xs)/1.3 var(--f-mono); color: var(--ink-2); }
.actor:hover .label b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); }
.cast-p { text-align: center; color: var(--ink-2); font-size: var(--t-md); max-width: 56ch; margin: var(--s-3) auto 0; text-wrap: balance; }
:lang(zh-CN) .cast-p { max-width: 32em; }
@media (max-width: 760px) {
  .cast { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 0; }
  .shelf::before { display: none; }
  .actor .label { align-self: stretch; background: var(--surface-1); border-top: 2px solid var(--line-2); height: 58px; padding-top: 10px; margin-bottom: 14px; }
}
/* narrow phones: two-word names take two lines inside the same box, and the longest one-word name still fits a cell */
@media (max-width: 480px) {
  .actor .label { height: 66px; padding-top: 8px; }
  .actor .label b { font-size: 14px; }
}

/* a puppet: a strip of four drawings (front, 3/4, side, back); JS steps through them, mirrored on the way back */
.sprite { display: block; position: relative; z-index: 1; height: 100%; max-width: 100%; background-repeat: no-repeat; background-size: 400% 100%; background-position: 0 0; }
.sprite.f1 { background-position: 33.333% 0; } .sprite.f2 { background-position: 66.667% 0; } .sprite.f3 { background-position: 100% 0; }
.sprite.flip { transform: scaleX(-1); }

/* ---------- a frame of film: dark surround, sprocket holes top and bottom (the review page's reel) ---------- */
.frame { position: relative; background: var(--deck); border-radius: var(--r-lg); padding: 14px 10px; box-shadow: var(--sh-2), 0 0 0 1px rgba(255, 255, 255, .06);
  background-image: radial-gradient(circle at 50% 50%, var(--hole) 0 2.6px, transparent 3.1px), radial-gradient(circle at 50% 50%, var(--hole) 0 2.6px, transparent 3.1px);
  background-size: 16px 14px, 16px 14px; background-repeat: repeat-x; background-position: 0 0, 0 100%; }
.frame.sm { padding: 10px 7px; border-radius: 12px; background-size: 12px 10px, 12px 10px; box-shadow: var(--sh-1); }
.screen { position: relative; border-radius: var(--r-sm); overflow: hidden; background: #111; aspect-ratio: 16 / 9; }
.screen video, .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen .tag { position: absolute; left: 12px; bottom: 10px; font: 600 11px/1 var(--f-mono); letter-spacing: .06em; color: #fff; background: rgba(20, 16, 12, .6); padding: 6px 9px; border-radius: 999px; backdrop-filter: blur(6px); }

/* ---------- films ---------- */
.sec-head .note { color: var(--ink-3); font-size: 14px; margin: 10px 0 0; }
.sec-head .note::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; border: 1.5px solid currentColor; vertical-align: .05em; }
.film { --accent: #d2402f; --accent-ink: color-mix(in srgb, var(--accent) 62%, var(--ink)); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: clamp(40px, 5vw, 64px); scroll-margin-top: 80px; }
.film:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.film:nth-of-type(even) .frame { order: 2; }
.film .meta { display: flex; align-items: center; gap: 14px; }
.film .meta .no { font: 600 var(--t-md)/1 var(--f-mono); color: var(--accent-ink); }
.film .meta .kind { flex: none; font: 600 var(--t-xs)/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
:lang(zh-CN) .film .meta .kind { letter-spacing: .06em; font-family: var(--f-sans); font-size: var(--t-sm); }
.film .meta .rule { flex: 1; min-width: 24px; height: 2px; background: var(--accent); opacity: .6; border-radius: 2px; }
.film .who { display: flex; align-items: flex-end; gap: 16px; margin-top: 14px; }
.film .who .mini { width: 88px; height: 96px; flex: none; position: relative; cursor: pointer; }
.film .who .mini::after { content: ""; position: absolute; bottom: -4px; left: 14%; right: 14%; height: 10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(70, 45, 20, .35), transparent); }
.film h3 { font-size: clamp(28px, 3.3vw, 42px); }
.film .len { font: 500 var(--t-md)/1 var(--f-mono); color: var(--ink-2); margin-top: 8px; }
.film p.story { margin: 14px 0 0; }
.film .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.film .row .btn.primary { --sh-hard: 2px 2px 0 var(--accent); --sh-hard-up: 3px 3px 0 var(--accent); }
.film .row .say-id { font-size: 14px; color: var(--ink-2); }
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line-2); font-size: 14px; color: var(--ink-2); }
.fit b { display: block; font: 600 var(--t-xs)/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
:lang(zh-CN) .fit b { font-family: var(--f-sans); font-size: var(--t-sm); letter-spacing: .06em; }
.fit ul { margin: 0; padding: 0; list-style: none; }
.fit li { padding-left: 16px; position: relative; line-height: 1.45; margin-bottom: 4px; }
.fit li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.fit .no li::before { background: transparent; border: 1.5px solid var(--ink-3); }
@media (max-width: 860px) {
  .film, .film:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); }
  .film:nth-of-type(even) .frame { order: 0; }
}
@media (max-width: 480px) { .fit { grid-template-columns: 1fr; } }

/* ---------- how it's made ---------- */
/* the same four panes as the README's process picture, in a row with a chevron between them, each centred */
.proc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 28px; counter-reset: p; }
.proc figure { margin: 0; counter-increment: p; }
.proc .pane { position: relative; }
.proc .pane img { width: 100%; height: auto; aspect-ratio: 372 / 280; border-radius: var(--r-md); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.proc figure + figure .pane::before { content: ""; position: absolute; left: -20px; top: calc(50% - 6px); width: 10px; height: 10px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-45deg); }
.proc figcaption { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.proc figcaption b { display: block; color: var(--ink); font: 600 var(--t-lg)/1.3 var(--f-display); margin-bottom: 2px; }
.proc figcaption b::before { content: counter(p, decimal-leading-zero); font: 600 var(--t-xs)/1 var(--f-mono); color: var(--accent-ink); margin-right: 8px; }
@media (max-width: 960px) { .proc { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; } .proc figure:nth-child(3) .pane::before { display: none; } }
@media (max-width: 480px) { .proc { gap: 14px; row-gap: 18px; } .proc figure + figure .pane::before { left: -12px; width: 8px; height: 8px; border-width: 2px; } .proc figcaption { font-size: 13.5px; } .proc figcaption b { font-size: 15.5px; } }

/* the exposure sheet: six steps, ruled like an X-sheet */
.steps-h { margin-top: clamp(40px, 5vw, 64px); }
.xsheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: clamp(20px, 2.5vw, 28px) 0 0; padding: 0; border-top: 2px solid var(--ink); counter-reset: s; }
.xsheet li { list-style: none; counter-increment: s; padding: 18px 24px 20px 0; border-bottom: 1px solid var(--line); position: relative; }
.xsheet li:nth-child(3n+2), .xsheet li:nth-child(3n+3) { padding-left: 24px; border-left: 1px solid var(--line); }
.xsheet b { display: block; font: 600 21px/1.25 var(--f-display); }
.xsheet b::before { content: counter(s, decimal-leading-zero); display: block; font: 600 var(--t-sm)/1 var(--f-mono); color: var(--accent-ink); margin-bottom: 10px; }
.xsheet li > span { display: block; color: var(--ink-2); font-size: var(--t-md); margin-top: 6px; }
@media (max-width: 860px) {
  .xsheet { grid-template-columns: minmax(0, 1fr); }
  .xsheet li:nth-child(n) { padding: 14px 0 15px; border-left: 0; }
  .xsheet b { font-size: 19px; }
  .xsheet b::before { display: inline; margin: 0 10px 0 0; }
}
.tablewrap { overflow-x: auto; margin-top: 28px; }
.lens { width: 100%; border-collapse: collapse; font-size: var(--t-md); }
.lens th { text-align: left; vertical-align: bottom; font: 600 var(--t-xs)/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding: 0 12px 10px 10px; }
:lang(zh-CN) .lens th { font-family: var(--f-sans); font-size: var(--t-sm); letter-spacing: .06em; }
.lens td { padding: 12px 12px 12px 10px; border-top: 1px solid var(--line); font-family: var(--f-mono); white-space: nowrap; }
.lens td:first-child { font-weight: 600; font-family: var(--f-sans); }
.lens tr.def td { background: var(--accent-soft); }
.lens tr.def td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.lens tr.def td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ---------- review ---------- */
.rv { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; margin-top: 28px; }
.desk { margin: 0; position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); box-shadow: var(--sh-2), 0 0 0 1px var(--line); }
.desk img { width: 100%; height: auto; }
.rv-pts { margin: 0; padding: 0; display: grid; gap: 18px; }
.rv-pts li { list-style: none; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: start; }
.rv-pts b { display: block; font: 600 19px/1.3 var(--f-display); }
.rv-pts div > span { display: block; color: var(--ink-2); font-size: var(--t-md); margin-top: 4px; line-height: 1.55; }
/* the same map pin the review page puts on the film strip */
.pin { width: 26px; height: 26px; margin: 2px 0 0 3px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); display: grid; place-items: center; box-shadow: 0 2px 4px rgba(60, 30, 10, .25); }
.pin i { transform: rotate(45deg); font: 600 var(--t-xs)/1 var(--f-mono); font-style: normal; color: var(--on-accent); }
.rv-pts li:first-child .pin { background: var(--ok); }
.rv-wait { margin-top: 22px; padding: 18px 20px 20px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.rv-wait b { display: block; font: 600 var(--t-lg)/1.3 var(--f-display); margin-top: 14px; }
.rv-wait p { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
@media (max-width: 960px) { .rv { grid-template-columns: minmax(0, 1fr); } }

/* ---------- install ---------- */
.inst { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.need { margin-top: 14px; font-size: 14.5px; color: var(--ink-2); }
.need.model { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--accent); }
.cmds { counter-reset: c; display: grid; gap: 20px; margin: 0; padding: 0; }
.cmds li { list-style: none; counter-increment: c; min-width: 0; }
.cmds .h { font: 600 16px/1.3 var(--f-display); margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.cmds .h::before { content: counter(c, decimal-leading-zero); font: 600 var(--t-sm)/1 var(--f-mono); color: var(--accent-ink); }
.cmds .p { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
/* a code block: a header row (who it is for, copy) above the command; the command scrolls, nothing overlaps it */
.code { background: var(--deck); color: var(--deck-ink); border-radius: var(--r-md); overflow: hidden; min-width: 0; box-shadow: var(--sh-1); }
.code + .code { margin-top: 10px; }
.code .code-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); min-height: 36px; }
.code .who { font: 600 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--deck-mute); }
.code .cmd { display: block; margin: 0; padding: 12px 14px 14px; font: 13.5px/1.6 var(--f-mono); overflow-x: auto; white-space: pre; scrollbar-width: thin; }
.code .copy { color: var(--deck-ink); border-color: transparent; }
.code .copy:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.code .copy:focus-visible { box-shadow: 0 0 0 2px var(--deck), 0 0 0 4.5px var(--accent); }
@media (max-width: 860px) { .inst { grid-template-columns: minmax(0, 1fr); } }

/* ---------- licence, footer ---------- */
.lic { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px 32px; align-items: start; background: var(--surface-2); border-radius: var(--r-lg); box-shadow: var(--sh-1), 0 0 0 1px var(--line); padding: clamp(20px, 3vw, 30px); }
.lic ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.lic li { position: relative; padding-left: 16px; color: var(--ink-2); font-size: var(--t-md); line-height: 1.55; }
.lic li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lic li b { color: var(--ink); }
.lic .lic-c { margin: 12px 0 0; font-size: var(--t-md); }
/* a rubber stamp */
.stamp { margin-top: 6px; text-decoration: none; font: 700 var(--t-md)/1 var(--f-mono); letter-spacing: .06em; color: var(--accent-ink); border: 2.5px solid currentColor; border-radius: var(--r-sm); padding: 12px 14px; white-space: nowrap; transform: rotate(-3deg); box-shadow: inset 0 0 0 2px var(--surface-2), inset 0 0 0 3px currentColor; mask-image: radial-gradient(circle at 30% 40%, #000 0 70%, rgba(0, 0, 0, .75) 100%); -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 0 70%, rgba(0, 0, 0, .75) 100%); }
@media (max-width: 600px) { .lic { grid-template-columns: minmax(0, 1fr); gap: 18px; } .stamp { justify-self: start; } }
footer { margin-top: clamp(48px, 6vw, 80px); background: var(--surface-1); border-top: 2px solid var(--line-2); padding: 36px 0 28px; }
.more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.more a { display: block; background: var(--surface-2); border-radius: var(--r-md); padding: 16px 20px; text-decoration: none; box-shadow: var(--sh-1), 0 0 0 1px var(--line); transition: transform var(--step), box-shadow var(--step); }
.more a:hover { transform: translate(-2px, -2px); box-shadow: var(--sh-hard), 0 0 0 1px var(--ink); }
.more b { font: 600 18px/1.3 var(--f-display); display: block; }
.more a > span { display: block; margin-top: 2px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
@media (max-width: 760px) { .more { grid-template-columns: minmax(0, 1fr); } }
.foot { display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; margin-top: 28px; font-size: 14px; color: var(--ink-2); }
.foot .sp { flex: 1; }
@media (max-width: 600px) { .foot { gap: 8px 18px; } .foot .sp { display: none; } }
.foot.made { display: block; color: var(--ink-3); margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .say q::after, .pill.ok.live::before { animation: none; }
  .btn, .more a, .mark i, .top { transition: none; }
  .btn:hover, .more a:hover { transform: none; }
}
