/* wellmade site. One family (Funnel Sans, the same as the starter launch film), white base, one blue, sharp corners, thin borders.
   Tokens follow skills/design-systems/references/starter-tokens.css.
   Scroll moments follow skills/landing-pages: one moment per screen, three pinned sections at most,
   pins only on wide screens without reduced motion, transform and opacity only. */
:root {
  --font: "Funnel Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; /* free on Google Fonts; the starter launch film uses it */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; /* only for typed commands */

  --text-xs: 12px; --text-sm: 14px; --text-base: 16px; --text-lg: 20px;
  --text-xl: 26px; --text-2xl: 34px; --text-3xl: 48px; --text-4xl: 64px;

  --bg: #ffffff;
  --surface: #f7f7f5;
  --ink: #0b0b0a;
  --muted: #5c5b56;
  --faint: #8a8a85;
  --line: #e4e3dd;
  --ghost: #d4d3cd;
  --accent: #2a3fff;
  --accent-ink: #1f30d6;
  --accent-soft: #eef0ff;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px; --s24: 96px;
  --container: 1240px;
  --gutter: 24px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 56px;
  --nav-top: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--nav-top) + 24px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-size: var(--text-base); line-height: 1.55;
  color: var(--ink); background: var(--bg); overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { flex: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 520px) { :root { --gutter: 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  font-size: var(--text-sm); font-weight: 500; text-decoration: none; white-space: nowrap;
  height: 44px; padding: 0 var(--s4); transition: background 200ms var(--ease);
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-sm { height: 36px; padding: 0 14px; }
.btn-line { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-line:hover { background: var(--surface); border-color: var(--ink); }

.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; text-decoration: none; min-height: 44px; }
.arrow-link::after { content: "\2192"; transition: transform 240ms var(--ease); }
.arrow-link:hover::after { transform: translateX(4px); }
.arrow-link:hover { color: var(--accent); }

/* ---------- navbar: a floating bar, hides on the way down, back on the way up ---------- */
.nav { position: fixed; top: var(--nav-top); left: 0; right: 0; z-index: 50; pointer-events: none; transition: transform 420ms var(--ease-out); }
.nav.is-hidden { transform: translateY(calc(-100% - var(--nav-top) - 8px)); }
.nav-in {
  pointer-events: auto; position: relative; height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s6); padding: 0 8px 0 16px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid transparent; transition: border-color 240ms var(--ease), background 240ms var(--ease);
}
.nav.is-scrolled .nav-in { border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -0.02em; }
.mark { width: 22px; height: 22px; color: var(--accent); }
.links { display: flex; gap: 2px; margin: 0 auto; font-size: var(--text-sm); }
.links a { position: relative; text-decoration: none; color: var(--muted); padding: 8px 12px; transition: color 200ms; }
.links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 320ms var(--ease-out); }
.links a:hover, .links a.is-on { color: var(--ink); }
.links a.is-on::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.gh { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--muted); }
.gh:hover { color: var(--ink); }
.gh svg { width: 20px; height: 20px; }
.motion { border: 0; background: none; cursor: pointer; padding: 0; }
.motion[hidden] { display: none; }
.motion svg * { fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linejoin: round; }
.motion .i-play, .motion[aria-pressed="true"] .i-pause { display: none; }
.motion[aria-pressed="true"] .i-play { display: inline; }
.nav-progress { position: absolute; left: -1px; right: -1px; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(var(--sp, 0)); transform-origin: left; }
.menu { display: none; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; position: relative; }
.menu i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform 300ms var(--ease-out); }
.menu i:first-child { top: 16px; } .menu i:last-child { top: 23px; }
.menu[aria-expanded="true"] i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu[aria-expanded="true"] i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.sheet { pointer-events: auto; margin-top: 8px; background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px 0; }
.sheet[hidden] { display: none; }
.sheet a { text-decoration: none; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; padding: 12px 20px; }
.sheet a:hover { color: var(--accent); }
@media (max-width: 820px) {
  .links { display: none; }
  .nav-actions { margin-left: auto; }
  .menu { display: inline-block; }
}
@media (max-width: 380px) { a.gh { display: none; } }

/* ---------- type ---------- */
.h-hero {
  font-size: clamp(44px, 8.6vw, 112px); line-height: 0.98; letter-spacing: -0.04em; font-weight: 400;
  text-wrap: balance; max-width: 18ch;
}
.h-section { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 400; text-wrap: balance; }
.lede { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.5; color: var(--muted); max-width: 28em; }
.fine { font-size: var(--text-sm); color: var(--faint); }
.fine a { color: var(--muted); text-underline-offset: 3px; }
.fine a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: calc(var(--nav-h) + var(--nav-top) + clamp(48px, 8vh, 96px)) 0 clamp(24px, 4vh, 48px); }
.hero-row { margin-top: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: var(--s8) var(--s16); align-items: start; }
.hero-act { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
@media (max-width: 900px) { .hero-row { grid-template-columns: 1fr; } }

/* the selection box around "made": the design-file detail from the launch films */
.nowrap { white-space: nowrap; }
.sel-word { position: relative; display: inline-block; color: var(--accent); margin-right: 0.12em; }
.sel { position: absolute; inset: 0.04em -0.1em 0.02em -0.08em; border: 1.5px solid var(--accent); pointer-events: none; }
.sel i { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid var(--accent); }
.sel i:nth-child(1) { left: -5px; top: -5px; } .sel i:nth-child(2) { right: -5px; top: -5px; }
.sel i:nth-child(3) { left: -5px; bottom: -5px; } .sel i:nth-child(4) { right: -5px; bottom: -5px; }
.js .hero .sel { opacity: 0; transform: scale(1.18); }
.js .sel-word.is-on .sel { opacity: 1; transform: none; transition: opacity 500ms var(--ease), transform 800ms var(--ease-out); }

/* command box: commands wrap with a hanging indent, never a sideways scrollbar */
.cmd { display: flex; align-items: stretch; border: 1px solid var(--line); background: var(--bg); color: var(--ink); max-width: 100%; }
.cmd-lines { flex: 1; min-width: 0; padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: 4px; }
.cmd code { font-family: var(--mono); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 1.3em; text-indent: -1.3em; }
.cmd code::before { content: "> "; color: var(--faint); }
.copy {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-width: 88px; justify-content: center;
  background: var(--surface); border: 0; border-left: 1px solid var(--line); cursor: pointer;
  font-size: var(--text-sm); font-weight: 500; padding: 0 var(--s4); transition: background 200ms, color 200ms;
}
.copy:hover { background: var(--accent-soft); color: var(--accent); }
.copy.is-done { color: var(--accent); }
.copy svg { width: 16px; height: 16px; }
@media (max-width: 420px) { .copy { min-width: 64px; padding: 0 10px; } .copy span { display: none; } .copy.is-done span { display: inline; } }

/* ---------- stage: the film takes the screen as you scroll (pinned on wide screens) ---------- */
.stage { position: relative; --p: 0; }
.stage-sticky { padding: var(--s8) var(--gutter) var(--s16); }
.stage-set { position: relative; width: min(100%, 860px); margin: 0 auto; aspect-ratio: 16 / 9; }
.stage-film, .stage-reel { position: absolute; display: block; background: #000; overflow: hidden; outline-offset: 4px; }
.stage-film { inset: 0; z-index: 1; border: 1px solid var(--line); }
.stage-film video, .stage-reel video { width: 100%; height: 100%; object-fit: cover; }
.stage-reel { z-index: 2; height: 92%; aspect-ratio: 9 / 16; top: 18%; border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,0.04); }
.stage-reel.l { left: -15%; transform: rotate(-4deg); }
.stage-reel.r { right: -15%; top: -8%; transform: rotate(3.5deg); }
.tag {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 500; padding: 6px 10px 6px 8px;
  opacity: 0; transform: translateY(4px); transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.tag svg { width: 14px; height: 14px; color: var(--accent); }
.stage-film:hover .tag, .stage-film:focus-visible .tag { opacity: 1; transform: none; }
.stage-cap { text-align: center; margin: var(--s6) auto 0; color: var(--muted); font-size: 15px; max-width: 40em; padding: 0 var(--gutter); }
.stage-cap b { color: var(--ink); font-weight: 500; }
@media (max-width: 1023px) {
  .stage-set { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
  .stage-film { position: relative; grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .stage-reel { position: relative; inset: auto; height: auto; width: 100%; transform: none !important; }
  .stage-reel.l, .stage-reel.r { left: auto; right: auto; top: auto; transform: none; }
  .tag { opacity: 1; transform: none; }
}
/* pinned: set by the script on wide screens without reduced motion */
.pin .stage { height: 210svh; }
.pin .stage-sticky { position: sticky; top: 0; height: 100svh; padding: 0; display: grid; place-items: center; overflow: hidden; }
.pin .stage-set { width: var(--w0, 56vw); transform: translateY(calc((1 - var(--p)) * var(--lift, 0px))); }
.pin .stage-film { transform: scale(var(--s, 1)); transform-origin: 50% 50%; will-change: transform; }
.pin .stage-reel.l { transform: translateX(calc(var(--p) * -34vw)) rotate(calc(-4deg - var(--p) * 8deg)); opacity: calc(1 - var(--p) * 1.6); }
.pin .stage-reel.r { transform: translateX(calc(var(--p) * 34vw)) rotate(calc(3.5deg + var(--p) * 8deg)); opacity: calc(1 - var(--p) * 1.6); }
.pin .stage-cap { position: absolute; left: 0; right: 0; bottom: 28px; margin: 0 auto; opacity: calc((var(--p) - 0.7) * 4); transform: translateY(calc((1 - var(--p)) * 12px)); z-index: 3;
  background: var(--bg); width: max-content; max-width: calc(100% - 48px); padding: 8px 14px; border: 1px solid var(--line); }

/* ---------- statement: words fill as you read ---------- */
.statement { padding: clamp(80px, 16vh, 180px) 0; }
/* pinned: the page holds still while the scroll fills the words */
.pin .statement { height: 190svh; padding: 0; }
.pin .statement-sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; }
.say { font-size: clamp(28px, 4.4vw, 58px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 400; max-width: 22em; text-wrap: pretty; }
.say em { font-style: normal; color: var(--accent); }
.js .say .w { color: var(--ghost); transition: color 180ms var(--ease); }
.js .say .w.is-lit { color: var(--ink); }
.js .say em .w.is-lit { color: var(--accent); }

/* ---------- work: a sideways rail (pinned on wide screens, a swipe rail on phones) ---------- */
.work { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); --rh: min(46svh, 420px); }
.rail-sticky { padding: var(--s24) 0; }
.work-head { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: var(--s4) var(--s8); margin-bottom: var(--s8); }
.work-sub { color: var(--muted); font-size: 17px; padding-bottom: 6px; }
.count { font-size: 15px; color: var(--faint); font-variant-numeric: tabular-nums; padding-bottom: 6px; }
.count b { color: var(--ink); font-weight: 500; }
.rail-view { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail-view::-webkit-scrollbar { display: none; }
.rail {
  list-style: none; display: flex; align-items: flex-start; gap: var(--s6); width: max-content;
  padding: 0 max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
}
.rail li { scroll-snap-align: center; flex: none; }
.wi { display: flex; flex-direction: column; gap: var(--s3); text-decoration: none; outline-offset: 6px; }
.wi-frame { position: relative; display: block; height: var(--rh); background: #000; border: 1px solid var(--line); }
.wi.wide .wi-frame { aspect-ratio: 16 / 9; }
.wi.tall .wi-frame { aspect-ratio: 9 / 16; }
.wi-frame video { width: 100%; height: 100%; object-fit: cover; }
.wi-frame .sel { inset: -7px; opacity: 0; transform: scale(1.03); transition: opacity 260ms var(--ease), transform 420ms var(--ease-out); }
.wi:hover .wi-frame .sel, .wi:focus-visible .wi-frame .sel { opacity: 1; transform: none; }
.wi-meta { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; font-size: 15px; max-width: calc(var(--rh) * 16 / 9); }
.wi.tall .wi-meta { max-width: calc(var(--rh) * 9 / 16 + 80px); }
.wi-n { color: var(--accent); font-weight: 500; font-variant-numeric: tabular-nums; grid-row: span 2; }
.wi-meta b { font-weight: 500; letter-spacing: -0.01em; }
.wi-meta span:last-child { color: var(--muted); font-size: var(--text-sm); }
.wi:hover .wi-meta b { color: var(--accent); }
@media (max-width: 720px) {
  .work { --rh: 54vw; }
  .rail-sticky { padding: var(--s16) 0; }
  .work-head { grid-template-columns: 1fr auto; }
  .work-sub { grid-column: 1 / -1; grid-row: 2; padding: 0; }
  .wi.tall .wi-frame { height: calc(var(--rh) * 1.6); }
  .wi.wide .wi-frame { height: auto; width: 84vw; }
  .wi.tall .wi-meta { max-width: calc(var(--rh) * 0.9 + 40px); }
}
.pin .work { --rh: min(52svh, 520px); }
.pin .rail-view { overflow: visible; scroll-snap-type: none; }
.pin .rail-sticky { position: sticky; top: 0; height: 100svh; padding: calc(var(--nav-h) + var(--nav-top) + 32px) 0 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.pin .rail { transform: translate3d(calc(var(--rx, 0) * -1px), 0, 0); will-change: transform; }

/* ---------- bands ---------- */
.band { padding: var(--s24) 0; }
.band-surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-accent { background: var(--accent); color: #fff; }
@media (max-width: 720px) { .band { padding: var(--s16) 0; } }
.sec-head { display: flex; flex-direction: column; gap: var(--s3); max-width: 720px; margin-bottom: var(--s12); }
.sec-head p { color: var(--muted); font-size: 17px; max-width: 36em; }
.sec-foot { margin-top: var(--s6); }

/* ---------- proof: the same prompt, run twice ---------- */
.proof-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s8); align-items: end; margin-bottom: var(--s12); }
.proof-head .sec-head { margin-bottom: 0; }
.tally { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); }
.tally > div { padding: var(--s4) var(--s6); min-width: 0; }
@media (max-width: 360px) { .tally > div { padding: var(--s4); } }
.tally > div + div { border-left: 1px solid var(--line); }
.tally dt { font-size: 13px; color: var(--muted); }
.tally dd { font-size: 15px; color: var(--muted); }
.tally dd b { display: block; font-size: clamp(44px, 5vw, 64px); line-height: 1; font-weight: 500; letter-spacing: -0.04em; color: var(--ink); margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.tally dd span { display: block; font-size: 13px; color: var(--faint); }
.tally .is-with dd b { color: var(--accent); }
@media (max-width: 860px) { .proof-head { grid-template-columns: 1fr; } }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: var(--s6); }
.tabs button {
  background: var(--bg); border: 1px solid var(--line); cursor: pointer; height: 38px; padding: 0 13px;
  font-size: 14px; color: var(--muted); white-space: nowrap; transition: color 200ms, border-color 200ms, background 200ms;
}
.tabs button:hover { color: var(--ink); border-color: var(--ink); }
.tabs button[aria-selected="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.cmp-body { border-top: 1px solid var(--line); padding-top: var(--s6); }
.cmp-brief { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s4); margin-bottom: var(--s6); }
.cmp-brief span { font-size: 13px; font-weight: 500; color: var(--faint); padding-top: 3px; }
.cmp-brief q { quotes: "\201C" "\201D"; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: var(--ink); max-width: 56em; }
.cmp-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
.cmp-side { min-width: 0; display: flex; flex-direction: column; gap: var(--s3); }
.cmp-lbl { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.cmp-lbl b { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.cmp-lbl span { font-size: 13px; color: var(--faint); text-align: right; }
.is-with .cmp-lbl { border-color: var(--accent); }
.is-with .cmp-lbl b { color: var(--accent); }
.cmp-frame { display: block; max-height: clamp(300px, 46vw, 560px); overflow: auto; border: 1px solid var(--line); background: var(--surface); overscroll-behavior: contain; }
.cmp-frame img { width: 100%; transition: opacity 240ms var(--ease); }
.cmp-frame.is-phone img { width: min(100%, 320px); margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.cmp-frame img.is-loading { opacity: 0.3; }
.cmp-note { font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 34em; }
.cmp-note b { color: var(--ink); font-weight: 500; }
.is-with .cmp-note b { color: var(--accent); }
@media (max-width: 760px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) var(--s4); padding: 0 var(--gutter); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; }
  .cmp-brief { grid-template-columns: 1fr; gap: 4px; }
  .cmp-row { grid-template-columns: 1fr; gap: var(--s8); }
  .cmp-frame { max-height: min(110vw, 520px); }
}

/* ---------- skills: a folder listing, each row is the file ---------- */
.band-line { border-top: 1px solid var(--line); }
.tree { border: 1px solid var(--line); }
.tree-bar { display: flex; align-items: center; gap: 10px; padding: 12px var(--s4); background: var(--surface); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.tree-bar svg { width: 18px; height: 18px; color: var(--accent); }
.tree-bar a { margin-left: auto; color: var(--muted); font-weight: 400; text-underline-offset: 3px; }
.tree-bar a:hover { color: var(--accent); }
.tree-h { padding: var(--s6) var(--s4) var(--s2); font-size: 13px; font-weight: 500; color: var(--faint); }
.tree-list { list-style: none; padding: 0; }
.tree-list li + li .row { border-top: 1px solid var(--line); }
.tree-list:not(:last-child) { border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 24px minmax(220px, 0.9fr) minmax(0, 1.4fr) 72px 56px; gap: var(--s4); align-items: center;
  padding: 14px var(--s4); text-decoration: none; transition: background 200ms var(--ease);
}
.row .f-ico { width: 22px; height: 22px; color: var(--accent); }
.f-ico * { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }
.f-ico [fill="currentColor"] { fill: currentColor; }
.r-name { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.r-name span { color: var(--faint); font-weight: 400; }
.r-desc { color: var(--muted); font-size: 15px; }
.r-len { color: var(--faint); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-go { color: var(--accent); font-size: 14px; font-weight: 500; text-align: right; opacity: 0; transform: translateX(-4px); transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.r-go::after { content: " \2192"; }
.row:hover { background: var(--surface); }
.row:hover .r-name { color: var(--accent); }
.row:hover .r-go, .row:focus-visible .r-go { opacity: 1; transform: none; }
@media (hover: none) { .r-go { display: none; } }
@media (max-width: 860px) {
  .row { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: 2px; column-gap: var(--s3); }
  .row .f-ico { grid-row: span 2; align-self: start; margin-top: 2px; }
  .r-desc { grid-column: 2 / -1; grid-row: 2; }
  .r-go { display: none; }
}
@media (max-width: 420px) { .r-len { display: none; } .tree-bar a { display: none; } }

/* ---------- system: live tokens and live states ---------- */
.sys { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
@media (max-width: 960px) { .sys { grid-template-columns: 1fr; } }
.panel { background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.p-bar { display: flex; justify-content: space-between; gap: var(--s4); padding: 10px var(--s4); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.p-bar span:first-child { color: var(--ink); font-weight: 500; }
.tk-font { display: flex; align-items: center; gap: var(--s6); padding: var(--s6) var(--s4); border-bottom: 1px solid var(--line); }
.tk-aa { font-size: clamp(88px, 10vw, 136px); line-height: 0.8; letter-spacing: -0.05em; font-weight: 500; color: var(--accent); }
.tk-font-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tk-font-meta b { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.tk-font-meta > span { color: var(--muted); font-size: 15px; }
.tk-weights { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 17px; }
.tk-scale { list-style: none; padding: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px clamp(10px, 1.6vw, 18px); line-height: 1; letter-spacing: -0.02em; font-weight: 500; }
.tk-strip { list-style: none; padding: 0; display: flex; border: 1px solid var(--line); min-height: 96px; }
.tk-strip li { flex: 1; min-width: 0; background: var(--c); color: var(--t); padding: 10px 8px; display: flex; flex-direction: column; justify-content: flex-end; font-size: 13px; font-weight: 500; overflow: hidden; }
.tk-strip li + li { border-left: 1px solid var(--line); }
.tk-strip small { font-size: 11px; font-weight: 400; opacity: 0.75; }
@media (max-width: 520px) {
  .tk-font { gap: var(--s4); }
  .tk-strip { flex-wrap: wrap; }
  .tk-strip li { flex: 1 1 33% !important; min-height: 72px; }
  .tk-strip li + li { border-left: 0; }
  .tk-scale li:nth-child(n+8) { display: none; }
}
.tk-row { display: grid; grid-template-columns: 76px 1fr; gap: var(--s4); padding: var(--s6) var(--s4); border-bottom: 1px solid var(--line); align-items: center; }
.tk-row:last-child { border-bottom: 0; }
.tk-h { font-size: 13px; color: var(--muted); font-weight: 500; }
.tk-space { list-style: none; padding: 0; display: flex; align-items: flex-end; gap: clamp(8px, 1.6vw, 16px); font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.tk-space li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tk-space i { display: block; width: 12px; height: calc(var(--w) * 1px); background: var(--accent); transform-origin: bottom; }
.js .tk-space i { transform: scaleY(0); }
.js .tokens.is-in .tk-space i { transform: none; transition: transform 700ms var(--ease-out); }
.js .tokens.is-in .tk-space li:nth-child(n) i { transition-delay: calc(200ms + var(--w) * 6ms); }
.tk-shape { display: flex; gap: var(--s6); flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.tk-shape span { display: inline-flex; align-items: center; gap: 10px; }
.tk-shape i { display: block; width: 28px; height: 28px; }
.sh-a { background: var(--accent); }
.sh-b { border: 1px solid var(--ink); }
.sh-c { border: 1px solid var(--line); outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) {
  .tk-row { grid-template-columns: 1fr; gap: var(--s3); }
}

.st-tabs { position: relative; display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.st-tabs button { flex: 1; background: none; border: 0; border-right: 1px solid var(--line); padding: 12px 8px; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; min-height: 44px; }
.st-tabs button:last-of-type { border-right: 0; }
.st-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 500; background: var(--surface); }
.st-timer { position: absolute; left: 0; bottom: -1px; height: 2px; width: 25%; background: var(--accent); transform-origin: left; transform: translateX(calc(var(--si, 0) * 100%)) scaleX(var(--st, 0)); }
.st-body { position: relative; height: 312px; }
.st-pane { position: absolute; inset: 0; padding: var(--s6); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 320ms var(--ease), transform 320ms var(--ease), visibility 0s 320ms; }
[data-state-body="loading"] .st-loading, [data-state-body="empty"] .st-empty, [data-state-body="error"] .st-error, [data-state-body="done"] .st-done { opacity: 1; visibility: visible; transform: none; transition: opacity 320ms var(--ease), transform 320ms var(--ease); }
.st-loading { display: flex; flex-direction: column; gap: 14px; }
.sk { display: block; height: 52px; background: var(--surface); border: 1px solid var(--line); animation: pulse 1.4s var(--ease) infinite; }
.sk:nth-child(2) { animation-delay: 120ms; } .sk:nth-child(3) { animation-delay: 240ms; } .sk:nth-child(4) { animation-delay: 360ms; }
@keyframes pulse { 50% { opacity: 0.45; } }
.st-empty, .st-error { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.st-empty svg, .st-error svg { width: 44px; height: 44px; color: var(--accent); margin-bottom: 8px; }
.st-error svg { color: #c0392b; }
.st-empty b, .st-error b { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.st-empty > span:not(.btn), .st-error > span:not(.btn) { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.st-done { list-style: none; padding: var(--s3) var(--s6); }
.st-done li { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: var(--s4); align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.st-done li:last-child { border-bottom: 0; }
.st-done .st-who { color: var(--muted); }
.st-done b { font-weight: 500; font-variant-numeric: tabular-nums; }
.st-done em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--accent); border: 1px solid var(--accent); padding: 2px 8px; }
@media (max-width: 520px) { .st-done li { grid-template-columns: 1fr auto auto; } .st-done .st-who { display: none; } }

/* ---------- install: the one blue band, a numbered card ---------- */
.inst-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s12); align-items: start; }
.install-head { display: flex; flex-direction: column; gap: var(--s4); position: sticky; top: calc(var(--nav-h) + var(--nav-top) + 32px); }
.h-install { font-size: clamp(44px, 6.4vw, 92px); line-height: 0.95; letter-spacing: -0.045em; font-weight: 500; text-wrap: balance; }
.install-head p { color: rgba(255, 255, 255, 0.86); font-size: 19px; max-width: 24em; }
.inst { background: var(--bg); color: var(--ink); min-width: 0; }
.inst-tabs { display: none; border-bottom: 1px solid var(--line); }
.js .inst-tabs { display: flex; }
.inst-tabs button { flex: 1; height: 52px; background: var(--surface); border: 0; border-right: 1px solid var(--line); cursor: pointer; font-size: 15px; color: var(--muted); position: relative; }
.inst-tabs button:last-child { border-right: 0; }
.inst-tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); font-weight: 500; }
.inst-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); }
.inst-panel + .inst-panel { border-top: 1px solid var(--line); }
.js .inst-panel:not(.is-on) { display: none; }
.js .inst-panel + .inst-panel { border-top: 0; }
.inst-name { padding: var(--s4) var(--s6) 0; font-size: 13px; font-weight: 500; color: var(--faint); }
.js .inst-name { display: none; }
.steps { list-style: none; padding: 0 var(--s6); }
.steps > li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s4); padding: var(--s6) 0; border-bottom: 1px solid var(--line); }
.steps > li:last-child { border-bottom: 0; }
.st-n { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--accent); color: var(--accent); font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.st-c { min-width: 0; display: flex; flex-direction: column; gap: var(--s3); padding-top: 10px; }
.st-c > p { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.asks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.asks li { border: 1px solid var(--line); background: var(--surface); padding: 10px 14px; font-size: 15px; }
.asks li::before { content: "\201C"; color: var(--faint); }
.asks li::after { content: "\201D"; color: var(--faint); }
@media (max-width: 960px) {
  .inst-wrap { grid-template-columns: 1fr; gap: var(--s8); }
  .install-head { position: static; }
}
@media (max-width: 520px) {
  .steps { padding: 0 var(--s4); }
  .steps > li { grid-template-columns: 1fr; gap: var(--s3); padding: var(--s4) 0; }
  .st-n { width: 32px; height: 32px; font-size: 15px; }
  .st-c { padding-top: 0; }
}

/* ---------- footer: the wordmark across the whole width, then one short row ---------- */
.footer { --fp: 1; padding-top: var(--s16); overflow: hidden; border-top: 1px solid var(--line); }
.foot-mark { line-height: 0.86; white-space: nowrap; text-align: center; overflow: hidden; padding: 0.02em 0 0.04em; }
.fm {
  display: inline-block; font-weight: 500; letter-spacing: -0.06em; color: var(--ink);
  font-size: 21vw; transform: translateY(calc((1 - var(--fp)) * 55%)); will-change: transform;
}
.fm-made { position: relative; display: inline-block; color: var(--accent); }
.fm .sel { inset: 0.04em -0.03em 0.03em 0; border-width: max(1.5px, 0.008em); }
.fm .sel i { width: 0.06em; height: 0.06em; border-width: max(1.5px, 0.008em); }
.fm .sel i:nth-child(1) { left: -0.03em; top: -0.03em; } .fm .sel i:nth-child(2) { right: -0.03em; top: -0.03em; }
.fm .sel i:nth-child(3) { left: -0.03em; bottom: -0.03em; } .fm .sel i:nth-child(4) { right: -0.03em; bottom: -0.03em; }
.foot-base { display: flex; justify-content: space-between; align-items: center; gap: var(--s2) var(--s6); flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: var(--s3); padding-bottom: var(--s4); font-size: var(--text-sm); color: var(--muted); }
.foot-base p a { color: var(--ink); text-underline-offset: 3px; }
.foot-base p a:hover { color: var(--accent); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 var(--s6); }
.foot-links a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-links a:hover { color: var(--accent); }
.to-top::after { content: " \2191"; white-space: pre; }

/* ---------- player ---------- */
.player { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100svh; margin: 0; }
.player[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); }
.player::backdrop { background: rgba(11, 11, 10, 0.9); }
.pl-bar { width: min(92vw, 1280px); display: flex; align-items: center; gap: var(--s4); color: #fff; font-size: 15px; }
.pl-bar b { font-weight: 500; }
.pl-bar span { color: rgba(255, 255, 255, 0.6); font-size: var(--text-sm); }
.pl-bar button { margin-left: auto; background: #fff; color: var(--ink); border: 0; height: 36px; padding: 0 14px; font-size: 14px; font-weight: 500; cursor: pointer; }
.pl-frame { width: min(92vw, 1280px, calc((100svh - 120px) * 16 / 9)); }
.player.is-tall .pl-frame, .player.is-tall .pl-bar { width: min(92vw, calc((100svh - 120px) * 9 / 16)); }
.player.is-tall .pl-bar { flex-wrap: wrap; row-gap: 4px; }
.pl-frame video { width: 100%; background: #000; }

/* ---------- reveal: hidden state only exists when the script runs ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
.js [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 640ms var(--ease), transform 640ms var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal], .js .hero .sel, .js .tk-space i { opacity: 1; transform: none; transition: none; }
  .js .say .w { color: var(--ink); transition: none; }
  .js .say em .w { color: var(--accent); }
  .nav, .fm { transition: none; transform: none; }
  .sk { animation: none; }
}
