/* ==========================================================================
   UI Hall — site styles
   One file, layered: tokens → base → primitives → layout → views.
   ========================================================================== */

@layer tokens, base, primitives, views, utilities;

/* --------------------------------------------------------------- tokens -- */
@layer tokens {
  :root {
    --font-ui: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Noto Sans', sans-serif;
    --font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --accent: #FF5A1F;
    --accent-2: #FF8A5C;
    --accent-ink: #120A06;

    --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px; --r-pill: 999px;

    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
    --ease-back: cubic-bezier(.34, 1.56, .64, 1);
    --spring: linear(0, .006, .025 2.8%, .101 6.1%, .539 18.9%, .721 25.3%, .849 31.5%, .937 38.1%, .968 41.8%, .991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001);
    --t-fast: 160ms; --t-med: 320ms; --t-slow: 720ms;

    --gutter: clamp(16px, 2.6vw, 36px);
    --maxw: 1480px;
    --nav-h: 0px;
    --rail-w: 232px;
    --top-h: 62px;
  }

  [data-theme='dark'] {
    color-scheme: dark;
    --bg: #0A0A0B; --bg-2: #0F0F11; --surface: #141416; --surface-2: #1B1B1E; --surface-3: #242428;
    --line: rgba(255, 255, 255, .075); --line-2: rgba(255, 255, 255, .14); --line-3: rgba(255, 255, 255, .24);
    --text: #F2F1EE; --text-2: #ADABA5; --text-3: #8A8781; --accent-text: var(--accent);
    --glass: rgba(18, 18, 20, .66);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
    --img-bg: #17171A;
  }

  [data-theme='light'] {
    color-scheme: light;
    --bg: #F3F1EC; --bg-2: #ECE9E3; --surface: #FFFFFF; --surface-2: #F7F6F2; --surface-3: #EAE7E1;
    --line: rgba(20, 18, 14, .08); --line-2: rgba(20, 18, 14, .14); --line-3: rgba(20, 18, 14, .26);
    --text: #141311; --text-2: #57544E; --text-3: #67635C; --accent-text: #B53A0B;
    --accent: #F04A0E;
    --glass: rgba(250, 249, 246, .72);
    --shadow-lg: 0 30px 80px -24px rgba(40, 30, 10, .28), 0 0 0 1px var(--line);
    --img-bg: #E6E3DD;
  }
}

/* ----------------------------------------------------------------- base -- */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
  body {
    margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
    font: 400 15px/1.55 var(--font-ui); letter-spacing: -.005em;
    font-feature-settings: 'ss01', 'cv11'; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    overflow-x: clip;
  }
  img, video, svg { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  a { color: inherit; text-decoration: none; }
  ::selection { background: var(--accent); color: var(--accent-ink); }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
  h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.025em; line-height: 1.05; text-wrap: balance; }
  p { margin: 0; text-wrap: pretty; }
  kbd { font: 500 11px/1 var(--font-mono); padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--text-3); }
  code { font-family: var(--font-mono); font-size: .88em; }
  .skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; }
  .skip:focus { top: 12px; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid var(--bg); }
  ::-webkit-scrollbar-track { background: transparent; }
  .num { font-variant-numeric: tabular-nums; }

  .grain {
    position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
  [data-theme='light'] .grain { opacity: .05; }
}

/* ----------------------------------------------------------- primitives -- */
@layer primitives {
  .container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
  .lede { text-wrap: pretty; }
  h1, h2, h3, .display { overflow-wrap: break-word; }

  .eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font: 500 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2);
  }


  .display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; line-height: .95; }
  .display em { font-style: italic; color: var(--accent-text); }
  .h-xl { font-size: clamp(44px, 6.2vw, 96px); }
  .h-lg { font-size: clamp(34px, 4vw, 60px); }
  .h-md { font-size: clamp(26px, 2.6vw, 40px); }
  .lede { font-size: clamp(16px, 1.35vw, 19px); line-height: 1.55; color: var(--text-2); max-width: 58ch; }

  .btn {
    --b-bg: var(--surface-2); --b-fg: var(--text); --b-line: var(--line-2);
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 46px; padding: 0 20px; border-radius: var(--r-pill); background: var(--b-bg); color: var(--b-fg);
    box-shadow: inset 0 0 0 1px var(--b-line); font-weight: 500; font-size: 14.5px; white-space: nowrap;
    transition: transform var(--t-med) var(--spring), background var(--t-fast), box-shadow var(--t-fast);
    overflow: hidden; isolation: isolate;
  }
  .btn:hover { --b-line: var(--line-3); }
  .btn:active { transform: scale(.965); }
  .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t-med) var(--ease-out); }
  .btn:hover svg.arrow { transform: translateX(3px); }
  .btn--primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-line: transparent; }
  .btn--primary::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .45), transparent 70%);
    opacity: 0; transition: opacity var(--t-med);
  }
  .btn--primary:hover::after { opacity: 1; }
  .btn--ghost { --b-bg: transparent; }
  .btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; }

  .icon-btn {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-pill); color: var(--text-2);
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-med) var(--spring);
  }
  .icon-btn:hover { background: var(--surface-2); color: var(--text); }
  .icon-btn:active { transform: scale(.9); }
  .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

  .chip {
    display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: var(--r-pill);
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-size: 13px; white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-med) var(--spring);
  }
  .chip:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
  .chip:active { transform: scale(.95); }
  .chip[aria-pressed='true'] { background: var(--text); color: var(--bg); box-shadow: none; }
  .chip .n { font: 500 11px/1 var(--font-mono); opacity: .55; }
  .chip .dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }

  .tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--surface-2); color: var(--text-2); font: 500 11.5px/1 var(--font-mono); }
  .tag--accent { background: color-mix(in oklab, var(--accent) 16%, transparent); color: var(--accent-text); }

  .card {
    background: var(--surface); border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line);
  }

  .seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); position: relative; }
  .seg button { position: relative; z-index: 1; height: 30px; padding: 0 13px; border-radius: var(--r-pill); font-size: 13px; color: var(--text-2); transition: color var(--t-fast); }
  .seg button[aria-pressed='true'] { color: var(--bg); }
  .seg__thumb { position: absolute; z-index: 0; top: 3px; height: 30px; border-radius: var(--r-pill); background: var(--text); transition: left var(--t-med) var(--ease-out), width var(--t-med) var(--ease-out); }

  .input {
    height: 44px; width: 100%; padding: 0 14px; border-radius: var(--r-sm); border: 0; background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line-2); outline: none; transition: box-shadow var(--t-fast);
  }
  .input:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); }

  /* Reveal-on-scroll. JS adds .in when the element enters. */
  [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out); transition-delay: calc(var(--d, 0) * 70ms); }
  [data-reveal].in { opacity: 1; transform: none; }

  /* Split headline: each word rises out of its own mask. */
  .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
  .split .w > span { display: inline-block; transform: translateY(105%) rotate(4deg); transform-origin: 0 100%; transition: transform 1100ms var(--ease-out); transition-delay: calc(var(--i) * 55ms + 120ms); }
  .split.in .w > span { transform: none; }

  .toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 80; translate: -50% 20px; opacity: 0; pointer-events: none;
    display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 12px; border-radius: var(--r-pill);
    background: var(--text); color: var(--bg); font-size: 13.5px; font-weight: 500; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5);
    transition: opacity var(--t-med) var(--ease-out), translate var(--t-med) var(--spring);
  }
  .toast.show { opacity: 1; translate: -50% 0; }
  .toast i { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .4); }
}

/* --------------------------------------------------------------- layout -- */
@layer primitives {
  /* ------------------------------------------------------------ shell -- */
  .app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100dvh; }
  .rail {
    position: sticky; top: 0; height: 100dvh; z-index: 70; display: flex; flex-direction: column; gap: 6px;
    padding: 14px 12px 12px; background: var(--bg-2); border-right: 1px solid var(--line); overflow: hidden;
  }
  .rail__brand { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; margin-bottom: 10px; font-weight: 600; font-size: 15.5px; letter-spacing: -.02em; white-space: nowrap; }
  .rail__mark { width: 26px; height: 26px; flex: none; transition: transform var(--t-slow) var(--spring); }
  .rail__brand:hover .rail__mark { transform: rotate(-8deg) scale(1.08); }
  .rail__nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; scrollbar-width: none; }
  .rail__group { padding: 14px 10px 6px; font: 500 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
  .rail__link {
    position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: 10px;
    color: var(--text-2); font-size: 14px; white-space: nowrap; transition: background var(--t-fast), color var(--t-fast);
  }
  .rail__link svg, .tabbar svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .rail__link:hover { background: var(--surface); color: var(--text); }
  .rail__link[aria-current='page'] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
  .rail__link[aria-current='page'] svg { color: var(--accent-text); }
  .rail__badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 600 11px/1 var(--font-mono); font-style: normal; }
  .rail__badge:empty { display: none; }
  .rail__badge.bump { animation: bump 500ms var(--spring); }
  .rail__foot { margin-top: auto; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
  .rail__stat { padding: 0 10px; font: 500 11px/1.5 var(--font-mono); color: var(--text-3); white-space: nowrap; }
  .rail__stat b { color: var(--text-2); font-weight: 500; }
  .rail__tools { display: flex; gap: 2px; }
  #themeBtn .moon, [data-theme='light'] #themeBtn .sun { display: none; }
  [data-theme='light'] #themeBtn .moon { display: block; }

  .col { min-width: 0; display: flex; flex-direction: column; }
  .topbar {
    position: sticky; top: 0; z-index: 60; height: var(--top-h); display: flex; align-items: center; gap: 12px;
    padding: 0 var(--gutter); background: color-mix(in oklab, var(--bg) 84%, transparent);
    backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border-bottom: 1px solid var(--line);
  }
  .topbar__menu, .topbar__brand { display: none; }
  .topbar__brand svg { width: 28px; height: 28px; }
  .search {
    flex: 1; min-width: 0; max-width: 620px; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 14px;
    border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); font-size: 14px; text-align: left;
    transition: box-shadow var(--t-fast), background var(--t-fast);
  }
  .search:hover { box-shadow: inset 0 0 0 1px var(--line-2); background: var(--surface-2); }
  .search svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .search__ph { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

  .tabbar { display: none; }
  .scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity var(--t-med); }

  @media (max-width: 1180px) {
    :root { --rail-w: 68px; }
    .rail { padding: 14px 10px; align-items: stretch; }
    .rail__brand span, .rail__link span, .rail__group, .rail__stat { display: none; }
    .rail__brand { justify-content: center; padding: 0; }
    .rail__link { justify-content: center; padding: 0; }
    .rail__badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; }
    .rail__group + .rail__link { margin-top: 10px; }
    .rail__tools { flex-direction: column; align-items: center; }
  }
  @media (max-width: 760px) {
    :root { --rail-w: 0px; --top-h: 58px; }
    .app { grid-template-columns: minmax(0, 1fr); }
    .rail { position: fixed; left: 0; top: 0; width: 264px; transform: translateX(-102%); transition: transform var(--t-slow) var(--ease-out); padding: 14px 12px; }
    .rail.open { transform: none; box-shadow: var(--shadow-lg); }
    .rail.open ~ .scrim, .scrim.on { opacity: 1; pointer-events: auto; }
    .rail__brand span, .rail__link span, .rail__group, .rail__stat { display: initial; }
    .rail__brand, .rail__link { justify-content: flex-start; padding: 0 10px; }
    .rail__badge { position: static; }
    .rail__tools { flex-direction: row; }
    .topbar__menu, .topbar__brand { display: grid; place-items: center; }
    .topbar__cta { display: none; }
    .search kbd { display: none; }
    .tabbar {
      position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr);
      padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in oklab, var(--bg-2) 90%, transparent);
      backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    }
    .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 0; border-radius: 10px; color: var(--text-3); font-size: 10.5px; font-weight: 500; }
    .tabbar a[aria-current='page'] { color: var(--text); }
    .tabbar a[aria-current='page'] svg { color: var(--accent-text); }
    .view { padding-bottom: 72px; }
  }
  .view { outline: none; min-height: 100dvh; }
  .view-enter { animation: viewIn 700ms var(--ease-out) both; }
  @keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

  .page-head { padding-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
  .page-head .lede { margin-top: 4px; }

  .footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 56px 0 64px; color: var(--text-3); font-size: 13.5px; }
  .footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
  .footer h4 { font: 500 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; }
  .footer a { display: block; padding: 4px 0; color: var(--text-3); transition: color var(--t-fast); }
  .footer a:hover { color: var(--text); }
  .footer__big { font-family: var(--font-display); font-size: clamp(56px, 10vw, 160px); line-height: .8; letter-spacing: -.04em; color: var(--text); margin-top: 72px; opacity: .9; user-select: none; }
  .footer__big em { color: var(--accent-text); }
  @media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
}

/* ============================================================== VIEWS === */
@layer views {

  /* ---------------------------------------------------------- home: hero */
  .hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; padding-bottom: clamp(40px, 7vh, 88px); }
  .wall {
    position: absolute; inset: -10% -6% -10% -6%; z-index: -2; display: grid; grid-template-columns: repeat(var(--cols, 7), 1fr); gap: 14px;
    transform: perspective(1400px) rotateX(18deg) rotateZ(-6deg) scale(1.12) translate3d(var(--px, 0), var(--py, 0), 0);
    transform-origin: 50% 0; transition: transform 1.4s var(--ease-out);
    opacity: .78;
  }
  [data-theme='light'] .wall { opacity: .9; }
  .wall__col { display: flex; flex-direction: column; gap: 14px; animation: wallUp var(--dur, 90s) linear infinite; will-change: transform; }
  .wall__col:nth-child(even) { animation-name: wallDown; }
  .wall__col img, .wall__col video { width: 100%; border-radius: 14px; background: var(--img-bg); aspect-ratio: var(--ar); object-fit: cover; }
  @keyframes wallUp { to { transform: translateY(-50%); } }
  @keyframes wallDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
  .hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background:
      linear-gradient(100deg, var(--bg) 8%, color-mix(in oklab, var(--bg) 82%, transparent) 38%, color-mix(in oklab, var(--bg) 30%, transparent) 72%, transparent),
      radial-gradient(120% 70% at 30% 115%, var(--bg) 40%, transparent 78%),
      linear-gradient(to bottom, color-mix(in oklab, var(--bg) 75%, transparent), transparent 28%, transparent 40%, var(--bg) 94%);
  }
  .hero__inner { display: grid; gap: 28px; }
  .hero__title { max-width: 14ch; }
  .hero__row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; }
  .hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
  .hero__stats { display: flex; gap: clamp(20px, 4vw, 56px); padding-top: 26px; border-top: 1px solid var(--line); }
  .stat b { display: block; font: 400 clamp(32px, 3.4vw, 46px)/1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .stat span { display: block; margin-top: 8px; font: 500 11px/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
  .hero__install {
    display: inline-flex; align-items: center; gap: 12px; height: 46px; padding: 0 8px 0 16px; border-radius: var(--r-pill);
    background: var(--glass); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line-2); font: 13px/1 var(--font-mono); color: var(--text-2);
  }
  .hero__install b { color: var(--accent-text); font-weight: 500; }
  .scroll-cue { position: absolute; right: var(--gutter); bottom: 32px; display: flex; align-items: center; gap: 10px; font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .scroll-cue i { width: 1px; height: 40px; background: linear-gradient(var(--text-3), transparent); position: relative; overflow: hidden; }
  .scroll-cue i::after { content: ''; position: absolute; inset: 0; background: var(--accent); animation: cue 2.2s var(--ease-in-out) infinite; }
  @keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
  @media (max-width: 760px) { .scroll-cue { display: none; } .hero__stats { flex-wrap: wrap; } }

  /* ------------------------------------------------------ home: sections */
  .section { padding-top: clamp(56px, 7vw, 104px); }
  .section__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 28px; }
  .section__head .lede { justify-self: end; }
  @media (max-width: 900px) { .section__head { grid-template-columns: 1fr; } .section__head .lede { justify-self: start; } }

  /* the anatomy demo: one asset, measured live */
  .anatomy { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
  .anatomy__media { position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--img-bg); min-height: 520px; }
  .anatomy__media img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; transition: opacity 600ms var(--ease-out), transform 1.2s var(--ease-out); }
  .anatomy__media .scan { position: absolute; left: 0; right: 0; height: 120px; top: -120px; background: linear-gradient(to bottom, transparent, color-mix(in oklab, var(--accent) 22%, transparent) 85%, var(--accent)); mix-blend-mode: screen; pointer-events: none; }
  .anatomy.run .scan { animation: scan 1.6s var(--ease-in-out) 1 both; }
  @keyframes scan { to { top: 100%; } }
  .anatomy__panel { padding: 30px; display: flex; flex-direction: column; gap: 22px; }
  .anatomy__id { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .anatomy__title { font: 400 34px/1.05 var(--font-display); letter-spacing: -.015em; }
  .anatomy__desc { color: var(--text-2); font-size: 14.5px; }
  .anatomy__switch { display: flex; gap: 6px; flex-wrap: wrap; }
  .anatomy__switch button { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); opacity: .55; transition: opacity var(--t-fast), transform var(--t-med) var(--spring), box-shadow var(--t-fast); }
  .anatomy__switch button img { width: 100%; height: 100%; object-fit: cover; }
  .anatomy__switch button[aria-pressed='true'] { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
  .anatomy__switch button:hover { opacity: 1; transform: translateY(-2px); }
  @media (max-width: 900px) { .anatomy { grid-template-columns: 1fr; } .anatomy__media { min-height: 380px; } }

  .palette-bar { display: flex; height: 64px; border-radius: 14px; overflow: hidden; gap: 2px; }
  .palette-bar > div { position: relative; flex: var(--pct) 1 0; min-width: 6px; background: var(--c); transform-origin: left; transition: flex-grow 900ms var(--ease-out); cursor: copy; }
  .palette-bar > div::after { content: attr(data-hex); position: absolute; left: 8px; bottom: 7px; font: 500 10px/1 var(--font-mono); color: var(--ink); opacity: 0; transition: opacity var(--t-fast); }
  .palette-bar > div:hover::after { opacity: 1; }
  .palette-bar.collapsed > div { flex-grow: 0.0001; }
  .palette-rows { display: grid; gap: 6px; }
  .palette-row { display: grid; grid-template-columns: 18px 76px 1fr 46px; align-items: center; gap: 10px; font: 12px/1 var(--font-mono); color: var(--text-2); }
  .palette-row i { width: 18px; height: 18px; border-radius: 5px; background: var(--c); box-shadow: inset 0 0 0 1px var(--line-2); }
  .palette-row .bar { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
  .palette-row .bar span { display: block; height: 100%; width: calc(var(--pct) * 1%); background: var(--text-2); border-radius: inherit; transform-origin: left; animation: grow 1s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 200ms); }
  @keyframes grow { from { transform: scaleX(0); } }
  .palette-row em { font-style: normal; text-align: right; color: var(--text-3); }

  .roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .role { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; }
  .role i { width: 30px; height: 30px; border-radius: 9px; flex: none; background: var(--c); box-shadow: inset 0 0 0 1px var(--line-2); }
  .role b { display: block; font-weight: 500; font-size: 12px; color: var(--text-3); text-transform: capitalize; }
  .role code { font-size: 12px; }
  .contrast-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font: 500 11.5px/1 var(--font-mono); background: var(--surface-2); }
  .contrast-pill.pass::before, .contrast-pill.fail::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3DDC84; }
  .contrast-pill.fail::before { background: #FF5D5D; }

  /* agent terminal demo */
  .agent-demo { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: stretch; }
  @media (max-width: 1000px) { .agent-demo { grid-template-columns: 1fr; } }
  .term { border-radius: var(--r-xl); background: #0C0C0E; color: #E9E7E2; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; min-height: 560px; }
  [data-theme='light'] .term { background: #121214; }
  .term__bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); font: 12px/1 var(--font-mono); color: #8B8983; }
  .term__bar i { width: 11px; height: 11px; border-radius: 50%; background: #2C2C30; }
  .term__bar span { margin-left: 8px; }
  .term__body { padding: 20px 20px 24px; font: 13px/1.65 var(--font-mono); flex: 1; overflow: hidden; position: relative; }
  .term__line { white-space: pre-wrap; word-break: break-word; opacity: 0; transform: translateY(6px); animation: tline 420ms var(--ease-out) forwards; }
  @keyframes tline { to { opacity: 1; transform: none; } }
  .term .u { color: #fff; } .term .u::before { content: '› '; color: var(--accent-text); }
  .term .tool { color: #9FD8FF; } .term .dim { color: #77746E; } .term .ok { color: #8BE38B; } .term .acc { color: #FF8A5C; }
  .term .caret { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  .term .swatches { display: inline-flex; gap: 3px; vertical-align: -2px; }
  .term .swatches i { width: 14px; height: 14px; border-radius: 4px; background: var(--c); }

  .stage { position: relative; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 22px; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; overflow: hidden; min-height: 560px; }
  .stage__label { display: flex; justify-content: space-between; align-items: center; }
  .stage__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; }
  .stage__item { border-radius: 14px; overflow: hidden; background: var(--img-bg); aspect-ratio: 4 / 5; position: relative; opacity: 0; transform: translateY(16px) scale(.97); transition: opacity 600ms var(--ease-out), transform 800ms var(--spring); }
  .stage__item.in { opacity: 1; transform: none; }
  .stage__item img { width: 100%; height: 100%; object-fit: cover; }
  .stage__item span { position: absolute; left: 8px; bottom: 8px; padding: 4px 7px; border-radius: 6px; background: rgba(0, 0, 0, .66); color: #fff; font: 500 10.5px/1 var(--font-mono); backdrop-filter: blur(6px); }
  .stage__palette { display: flex; gap: 6px; }
  .stage__palette i { flex: 1; height: 40px; border-radius: 10px; background: var(--c); transform: scaleY(0); transform-origin: bottom; transition: transform 700ms var(--spring); transition-delay: calc(var(--i) * 60ms); }
  .stage__palette.in i { transform: none; }

  /* install */
  .install { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; }
  .install__panel, .install > * { min-width: 0; }
  @media (max-width: 900px) { .install { grid-template-columns: minmax(0, 1fr); } }
  .install__tabs { display: flex; flex-direction: column; gap: 4px; }
  @media (max-width: 900px) { .install__tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; } }
  .install__tab { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-align: left; color: var(--text-2); transition: background var(--t-fast), color var(--t-fast); white-space: nowrap; }
  .install__tab:hover { background: var(--surface); color: var(--text); }
  .install__tab[aria-selected='true'] { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
  .install__tab i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font: 600 12px/1 var(--font-mono); font-style: normal; color: var(--text); }
  .install__tab small { display: block; color: var(--text-3); font-size: 12px; }
  .install__panel { padding: 26px; display: flex; flex-direction: column; gap: 18px; }
  .install__panel > * { min-width: 0; }
  .install__try { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
  .install__try > span { font-size: 11.5px; margin-bottom: 2px; }
  .install__prompt { display: flex; align-items: center; gap: 12px; justify-content: space-between; text-align: left; padding: 11px 14px; border-radius: 12px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font: 14px/1.45 var(--font-ui); cursor: pointer; transition: color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
  .install__prompt svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .55; }
  .install__prompt:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2, var(--accent)); }
  .install__prompt:hover svg { opacity: 1; }
  .install__prompt:active { transform: scale(.99); }
  .install__panel p { color: var(--text-2); }
  .code {
    position: relative; margin: 0; border-radius: var(--r-md); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
    padding: 16px 52px 16px 18px; font: 12.5px/1.7 var(--font-mono); color: var(--text); overflow-x: auto; white-space: pre;
  }
  .code .c { color: var(--text-3); } .code .s { color: var(--accent-2); } .code .k { color: #8FB6FF; }
  [data-theme='light'] .code .k { color: #2F5BD3; } [data-theme='light'] .code .s { color: #C2410C; }
  .code__copy { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--t-med) var(--spring), color var(--t-fast); }
  .code__copy:hover { color: var(--text); }
  .code__copy:active { transform: scale(.88); }
  .code__copy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

  /* tools marquee */
  .tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
  .tool-card { padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 10px; align-content: start; transition: transform var(--t-med) var(--spring), box-shadow var(--t-fast); }
  .tool-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2); }
  .tool-card code { color: var(--accent-text); font-size: 13px; }
  .tool-card p { color: var(--text-2); font-size: 13.5px; }

  /* categories bento */
  .bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 12px; }
  .bento a { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; }
  .bento a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .bento a:nth-child(2) { grid-column: span 2; }
  .bento a img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.04); transition: transform 1.2s var(--ease-out), opacity var(--t-med); opacity: .9; }
  .bento a::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .1) 55%, transparent); }
  .bento a:hover img { transform: scale(1.1); }
  .bento b { color: #fff; font: 400 28px/1 var(--font-display); letter-spacing: -.01em; }
  .bento a:nth-child(1) b { font-size: 44px; }
  .bento span { color: rgba(255, 255, 255, .72); font: 500 11px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; margin-top: 8px; }
  @media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; } .bento a:nth-child(1) { grid-column: span 2; } }

  /* manifesto strip */
  .claims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
  .claims > div { background: var(--bg); padding: 30px 26px; display: grid; gap: 12px; align-content: start; }
  .claims b { font: 400 24px/1.1 var(--font-display); }
  .claims p { color: var(--text-2); font-size: 14px; }
  .claims .k { font: 500 11px/1 var(--font-mono); letter-spacing: .08em; color: var(--accent-text); text-transform: uppercase; }
  @media (max-width: 800px) { .claims { grid-template-columns: 1fr; } }

  .marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
  .marquee__track { display: flex; gap: 10px; width: max-content; animation: marquee 60s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
  @keyframes marquee { to { transform: translateX(-50%); } }

  /* ------------------------------------------------------------ library */
  .page-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
  .page-head--row .lede { max-width: 62ch; }
  .toolbar {
    position: sticky; top: var(--top-h); z-index: 30; display: grid; gap: 8px;
    padding: 12px 0 10px; background: var(--bg); box-shadow: 0 1px 0 var(--line);
  }
  .toolbar__row { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .toolbar__sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; flex: none; }
  .tsearch { position: relative; flex: 1 1 auto; min-width: 0; max-width: 560px; display: flex; align-items: center; }
  .tsearch svg { position: absolute; left: 12px; width: 16px; height: 16px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
  .tsearch input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); outline: none; font-size: 13.5px; transition: box-shadow var(--t-fast); }
  .tsearch input:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent); }
  .toolbar__filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .toolbar__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
  .fbtn {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 12px; border-radius: 10px; white-space: nowrap;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-size: 13.5px; transition: box-shadow var(--t-fast), color var(--t-fast), background var(--t-fast);
  }
  .fbtn:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
  .fbtn.on, .fbtn[aria-pressed='true'] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 55%, transparent); }
  .fbtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .fbtn[aria-pressed='true'] svg { fill: var(--accent); stroke: var(--accent); }
  .fbtn__n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 600 10.5px/1 var(--font-mono); font-style: normal; }
  .fbtn__n:empty { display: none; }
  .chev { transition: transform var(--t-med) var(--ease-out); }
  .pop.open .chev { transform: rotate(180deg); }
  .pop { position: relative; }
  .pop__panel {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: 290px; display: none; grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: min(440px, 70vh); padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg);
  }
  .pop.open .pop__panel { display: grid; animation: popIn 260ms var(--ease-out); }
  @keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
  .pop__find { height: 34px; margin: 2px 2px 6px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--bg-2); outline: none; font-size: 13px; }
  .pop__list { overflow-y: auto; min-height: 0; scrollbar-width: thin; display: grid; align-content: start; gap: 1px; }
  .pop__list .hues { padding: 8px; }
  .opt { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: 8px; text-align: left; font-size: 13.5px; color: var(--text-2); }
  .opt:hover { background: var(--surface-2); color: var(--text); }
  .opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .opt em { font: 500 11px var(--font-mono); font-style: normal; color: var(--text-3); }
  .opt__box { width: 16px; height: 16px; flex: none; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line-3); transition: background var(--t-fast), box-shadow var(--t-fast); }
  .opt[aria-checked='true'] { color: var(--text); }
  .opt[aria-checked='true'] .opt__box { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.3 2.4 2.4L12 5' fill='none' stroke='%23120A06' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain; box-shadow: none; }
  .opt[role='menuitemradio'] .opt__box { border-radius: 50%; }
  .pop__foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 2px; margin-top: 4px; border-top: 1px solid var(--line); }
  .pop__clear { font-size: 13px; color: var(--text-3); padding: 6px 8px; border-radius: 8px; }
  .pop__clear:hover { color: var(--text); }
  .select select {
    appearance: none; height: 36px; padding: 0 30px 0 12px; border: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; color: var(--text-2); cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat;
  }
  .seg--sm button { height: 28px; padding: 0 11px; font-size: 12.5px; }
  .seg--sm .seg__thumb { height: 28px; }
  .lib__status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 34px; margin: 10px 0 14px; }
  .lib__count { font: 500 12px/1 var(--font-mono); color: var(--text-3); white-space: nowrap; }
  .lib__count b { color: var(--text); font-weight: 500; }
  .lib__active { display: flex; flex-wrap: wrap; gap: 6px; }
  .lib__active .chip { height: 28px; font-size: 12px; background: var(--surface-2); }
  .chip--x::after { content: '×'; margin-left: 2px; opacity: .6; font-size: 14px; }
  .chip--ghost { background: none !important; box-shadow: none; }
  .lib__filters-btn { display: none; }
  .tile__badge--orig { background: var(--accent); color: var(--accent-ink); }
  .tile__badge--orig::before { display: none; }
  .toolbar__filters { flex-wrap: wrap; }
  @media (max-width: 860px) {
    .lib__filters-btn { display: inline-flex; }
    .toolbar__filters { display: none; }
    .toolbar.show-filters .toolbar__filters { display: flex; }
    .tsearch { max-width: none; }
  }
  @media (max-width: 560px) {
    #density { display: none; }
    .pop__panel { position: fixed; left: 12px !important; right: 12px !important; top: auto; bottom: 84px; width: auto; }
  }
  .masonry { position: relative; }
  .tile {
    position: absolute; border-radius: var(--r-md); overflow: hidden; background: var(--img-bg); cursor: zoom-in;
    box-shadow: inset 0 0 0 1px var(--line); contain: layout paint;
    opacity: 0; translate: 0 18px; transition: opacity 700ms var(--ease-out), translate 900ms var(--ease-out), box-shadow var(--t-fast);
  }
  .tile.in { opacity: 1; translate: 0 0; }
  .tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out), opacity 400ms; }
  .tile video { opacity: 0; }
  .tile.playing video { opacity: 1; }
  .tile:hover img { transform: scale(1.035); }
  .tile__meta {
    position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; display: flex; flex-direction: column; gap: 4px; color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent); opacity: 0; translate: 0 8px; transition: opacity var(--t-med) var(--ease-out), translate var(--t-med) var(--ease-out);
  }
  .tile:hover .tile__meta, .tile:focus-visible .tile__meta { opacity: 1; translate: 0 0; }
  .tile__meta b { font-weight: 500; font-size: 13.5px; line-height: 1.3; }
  .tile__meta span { font: 500 10.5px/1 var(--font-mono); opacity: .7; letter-spacing: .02em; }
  .tile__pal { display: flex; gap: 3px; margin-top: 4px; }
  .tile__pal i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
  .tile__badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 7px; background: rgba(0, 0, 0, .55); color: #fff; font: 500 10px/1 var(--font-mono); letter-spacing: .04em; backdrop-filter: blur(8px); }
  .tile__badge::before { content: ''; width: 0; height: 0; border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
  .tile__progress { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); width: 0; }
  .empty { padding: 120px 20px; text-align: center; color: var(--text-2); display: grid; gap: 14px; justify-items: center; }
  .empty b { font: 400 40px/1 var(--font-display); color: var(--text); }
  .sentinel { height: 1px; }

  /* ---------------------------------------------------------- detail */
  .modal { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 20px; }
  .modal__scrim { position: absolute; inset: 0; background: rgba(5, 5, 6, .72); backdrop-filter: blur(14px); animation: fade 400ms var(--ease-out) both; }
  [data-theme='light'] .modal__scrim { background: rgba(230, 226, 220, .7); }
  .modal.closing .modal__scrim { animation: fade 280ms var(--ease-in-out) reverse both; }
  @keyframes fade { from { opacity: 0; } }
  .sheet {
    position: relative; width: min(1320px, 100%); height: min(880px, calc(100dvh - 40px)); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
    border-radius: var(--r-xl); background: var(--bg-2); box-shadow: var(--shadow-lg); overflow: hidden;
    animation: sheetIn 620ms var(--ease-out) both;
  }
  .modal.closing .sheet { animation: sheetOut 280ms var(--ease-in-out) both; }
  @keyframes sheetIn { from { opacity: 0; transform: translateY(40px) scale(.97); } }
  @keyframes sheetOut { to { opacity: 0; transform: translateY(20px) scale(.98); } }
  .sheet__media { position: relative; background: var(--img-bg); display: grid; place-items: center; overflow: hidden; }
  .sheet__media img, .sheet__media video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
  .sheet__media .zoomable { cursor: zoom-in; transition: transform 500ms var(--ease-out); }
  .sheet__media.zoomed .zoomable { cursor: zoom-out; transform: scale(2); }
  .sheet__strip { position: absolute; left: 14px; right: 14px; bottom: 14px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(10px); }
  .sheet__strip i { cursor: pointer; transition: transform var(--t-med) var(--spring), opacity var(--t-fast); opacity: .8; aspect-ratio: 3 / 2; border-radius: 7px; background-image: var(--strip); background-size: 600% 100%; background-position: calc(var(--f) * 20%) 0; }
  .sheet__strip i:hover { opacity: 1; transform: translateY(-2px); }
  .sheet__info { min-width: 0; grid-template-columns: minmax(0, 1fr); overflow-y: auto; padding: 30px 30px 40px; display: grid; gap: 26px; align-content: start; scrollbar-width: thin; }
  .sheet__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; position: sticky; top: -30px; margin: -30px -30px 0; padding: 18px 22px 18px 30px; background: linear-gradient(var(--bg-2) 75%, transparent); z-index: 2; }
  .sheet__id { font: 500 12px/1.3 var(--font-mono); color: var(--text-3); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sheet__title { font: 400 clamp(30px, 3vw, 42px)/1.02 var(--font-display); letter-spacing: -.015em; }
  .sheet__desc { color: var(--text-2); font-size: 15px; line-height: 1.65; }
  .sheet h4 { font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; display: flex; justify-content: space-between; }
  .facets { display: flex; flex-wrap: wrap; gap: 6px; }
  .facets a { transition: background var(--t-fast), color var(--t-fast); }
  .facets a:hover { background: var(--surface-3); color: var(--text); }
  .related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .related a { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--img-bg); box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--t-med) var(--spring); }
  .related a:hover { transform: translateY(-3px); }
  .related img { width: 100%; height: 100%; object-fit: cover; }
  .agent-snippet { display: grid; gap: 10px; }
  .agent-snippet .seg { justify-self: start; }
  .agent-snippet .code { max-height: 260px; overflow: auto; white-space: pre; }
  .sheet__nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 3; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(10px); opacity: 0; transition: opacity var(--t-fast), transform var(--t-med) var(--spring); }
  .sheet__media:hover .sheet__nav { opacity: 1; }
  .sheet__nav:active { transform: scale(.9); }
  .sheet__nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .sheet__nav.prev { left: 14px; } .sheet__nav.next { right: 14px; }
  @media (max-width: 900px) {
    .modal { padding: 0; place-items: end stretch; }
    .sheet { grid-template-columns: minmax(0, 1fr); grid-template-rows: 46dvh minmax(0, 1fr); height: 94dvh; border-radius: 26px 26px 0 0; }
    .sheet:has(.live[data-vp='phone']) { grid-template-rows: 60dvh minmax(0, 1fr); }
    .sheet__nav { opacity: 1; }
  }

  /* ---------------------------------------------------------- patterns */
  .patterns { display: grid; gap: 14px; }
  .pattern { display: grid; grid-template-columns: 80px 1fr 1.1fr; gap: 28px; padding: 28px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); align-items: start; }
  .pattern__n { font: 400 54px/1 var(--font-display); color: var(--text-3); }
  .pattern h3 { font: 400 32px/1.05 var(--font-display); letter-spacing: -.01em; margin-bottom: 12px; }
  .pattern p { color: var(--text-2); }
  .pattern ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
  .pattern li { position: relative; padding-left: 22px; font-size: 14px; color: var(--text); }
  .pattern li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 10px; height: 2px; background: var(--accent); }
  .pattern__ev { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .pattern__ev a { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--img-bg); transition: transform var(--t-med) var(--spring); }
  .pattern__ev a:hover { transform: translateY(-4px) rotate(-1deg); }
  .pattern__ev img { width: 100%; height: 100%; object-fit: cover; }
  .pattern__ev a.wide img { object-position: 8% 12%; transform: scale(1.35); transform-origin: 8% 12%; }
  .pattern__ev a:not(.wide) img { object-position: 50% 20%; }
  .pattern__count { margin-top: 12px; font: 500 11.5px/1 var(--font-mono); color: var(--text-3); }
  @media (max-width: 1000px) { .pattern { grid-template-columns: 1fr; gap: 18px; } .pattern__n { font-size: 36px; } }

  /* ------------------------------------------------------------ colour */
  .colour-tool { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
  @media (max-width: 960px) { .colour-tool { grid-template-columns: 1fr; } }
  .picker { position: sticky; top: 92px; padding: 22px; display: grid; gap: 18px; }
  .picker__swatch { position: relative; height: 200px; border-radius: 18px; background: var(--c); box-shadow: inset 0 0 0 1px var(--line-2); display: flex; align-items: flex-end; padding: 16px; transition: background 400ms var(--ease-out); overflow: hidden; }
  .picker__swatch input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
  .picker__swatch b { font: 500 26px/1 var(--font-mono); color: var(--ink); letter-spacing: -.02em; }
  .picker__swatch span { margin-left: auto; font: 500 12px/1 var(--font-mono); color: var(--ink); }
  .picker__presets { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
  .picker__presets button { aspect-ratio: 1; border-radius: 9px; background: var(--c); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform var(--t-med) var(--spring); }
  .picker__presets button:hover { transform: scale(1.12); }
  .color-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
  .cres { border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); animation: pop 600ms var(--ease-out) both; animation-delay: calc(var(--i) * 30ms); }
  @keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
  .cres__img { aspect-ratio: 4 / 3; background: var(--img-bg); overflow: hidden; }
  .cres__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; transition: transform 900ms var(--ease-out); }
  .cres:hover .cres__img img { transform: scale(1.05); }
  .cres__meta { padding: 12px; display: grid; gap: 8px; }
  .cres__meta b { font-weight: 500; font-size: 13.5px; line-height: 1.3; }
  .cres__match { display: flex; align-items: center; gap: 8px; font: 11.5px/1 var(--font-mono); color: var(--text-3); }
  .cres__match i { width: 16px; height: 16px; border-radius: 5px; background: var(--c); }
  .pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .pair { border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); transition: transform var(--t-med) var(--spring); cursor: pointer; }
  .pair:hover { transform: translateY(-4px); }
  .pair__bands { display: grid; grid-template-rows: 1fr 1fr; height: 200px; }
  .pair__bands div { display: grid; place-items: center; font: 600 12px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; transition: flex 600ms var(--ease-out); }
  .pair__meta { padding: 14px 16px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
  .pair__meta b { font-weight: 500; font-size: 13.5px; }
  .pair__meta code { font-size: 11px; color: var(--text-3); }

  /* ------------------------------------------------------------ motion */
  .reel { columns: 4 280px; column-gap: 12px; }
  .reel__item { display: block; break-inside: avoid; margin-bottom: 12px; position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000; aspect-ratio: var(--ar, 16 / 10); box-shadow: inset 0 0 0 1px var(--line); cursor: zoom-in; }
  .reel__item video, .reel__item img { width: 100%; height: 100%; object-fit: cover; }
  .reel__item figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; color: #fff; font-size: 13px; font-weight: 500; background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent); }
  .reel__item figcaption span { display: block; font: 500 10.5px/1 var(--font-mono); opacity: .65; margin-top: 5px; }

  /* compare */
  .compare { position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--img-bg); }
  .compare img { width: 100%; display: block; }

  /* ------------------------------------------------------------ agents */
  .agents-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; }
  @media (max-width: 960px) { .agents-hero { grid-template-columns: 1fr; } }
  .flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; counter-reset: s; }
  .flow > div { padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; align-content: start; counter-increment: s; }
  .flow > div::before { content: '0' counter(s); font: 500 11px/1 var(--font-mono); color: var(--accent-text); }
  .flow b { font: 400 24px/1.1 var(--font-display); }
  .flow p { font-size: 13.5px; color: var(--text-2); }
  @media (max-width: 900px) { .flow { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .flow { grid-template-columns: 1fr; } .flow > div { padding: 18px 20px; grid-template-columns: auto 1fr; column-gap: 14px; } .flow > div::before { grid-row: span 2; padding-top: 7px; } }

  .playground { display: grid; grid-template-columns: 340px 1fr; gap: 0; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-height: 680px; }
  @media (max-width: 960px) { .playground { grid-template-columns: 1fr; } }
  .pg__side { border-right: 1px solid var(--line); padding: 18px; display: grid; gap: 4px; align-content: start; background: var(--bg-2); }
  .pg__tool { display: grid; gap: 3px; padding: 11px 12px; border-radius: 12px; text-align: left; transition: background var(--t-fast); }
  .pg__tool:hover { background: var(--surface); }
  .pg__tool[aria-selected='true'] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
  .pg__tool code { font-size: 12.5px; color: var(--text); }
  .pg__tool[aria-selected='true'] code { color: var(--accent-text); }
  .pg__tool span { font-size: 12px; color: var(--text-3); line-height: 1.35; }
  .pg__main { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
  .pg__form { padding: 22px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: end; }
  .pg__form label { display: grid; gap: 6px; min-width: 0; font: 500 11px/1 var(--font-mono); color: var(--text-3); letter-spacing: .02em; }
  .pg__form label.wide { grid-column: 1 / -1; }
  .pg__form .input { height: 40px; font: 13px var(--font-ui); }
  .pg__form select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
  .pg__form .check { display: flex; align-items: center; gap: 8px; height: 40px; font: 13px var(--font-ui); color: var(--text-2); }
  .pg__form .check input { accent-color: var(--accent-text); width: 16px; height: 16px; }
  .pg__run { display: flex; gap: 10px; align-items: center; grid-column: 1 / -1; }
  .pg__call { font: 12px/1.5 var(--font-mono); color: var(--text-3); overflow-wrap: anywhere; }
  .pg__out { min-width: 0; padding: 22px; display: grid; gap: 16px; align-content: start; overflow: auto; max-height: 820px; }
  .pg__tabs { display: flex; gap: 6px; align-items: center; }
  .pg__tabs .meta { margin-left: auto; font: 11.5px/1 var(--font-mono); color: var(--text-3); }
  .md { font-size: 14px; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }
  .md h1, .md h2, .md h3 { color: var(--text); font-family: var(--font-display); font-weight: 400; margin: 18px 0 8px; }
  .md h1 { font-size: 30px; } .md h2 { font-size: 24px; } .md h3 { font-size: 20px; }
  .md strong { color: var(--text); font-weight: 600; }
  .md ul { padding-left: 18px; margin: 6px 0; } .md li { margin: 6px 0; }
  .md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; color: var(--text); }
  .md pre { background: var(--bg-2); padding: 14px; border-radius: 12px; overflow: auto; box-shadow: inset 0 0 0 1px var(--line); white-space: pre-wrap; word-break: break-word; }
  .md pre code { background: none; padding: 0; }
  .md a { color: var(--accent-text); }
  .md .sw { display: inline-block; width: .9em; height: .9em; border-radius: 3px; vertical-align: -.1em; margin-right: 3px; box-shadow: inset 0 0 0 1px var(--line-2); }
  .pg__imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .pg__imgs a { border-radius: 10px; overflow: hidden; background: var(--img-bg); aspect-ratio: 3 / 4; }
  .pg__imgs img { width: 100%; height: 100%; object-fit: cover; }
  .json { font: 12px/1.6 var(--font-mono); white-space: pre-wrap; color: var(--text-2); }
  .json .k { color: var(--text); } .json .s { color: var(--accent-2); } .json .n { color: #8FB6FF; }

  .skill-file { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .skill-file > * { min-width: 0; }
  @media (max-width: 960px) { .skill-file { grid-template-columns: 1fr; } }
  .doc { padding: 28px; max-height: 560px; overflow: auto; }
  .faq { display: grid; gap: 8px; }
  .faq details { border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 0 20px; }
  .faq summary { padding: 18px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; font-weight: 500; }
  .faq summary::after { content: '+'; color: var(--text-3); font-size: 20px; line-height: 1; transition: transform var(--t-med) var(--ease-out); }
  .faq details[open] summary::after { transform: rotate(45deg); }
  .faq details p { padding-bottom: 18px; color: var(--text-2); max-width: 75ch; }

  /* --------------------------------------------------------- command K */
  .cmd { position: fixed; inset: 0; z-index: 85; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
  .cmd__scrim { position: absolute; inset: 0; background: rgba(5, 5, 6, .55); backdrop-filter: blur(8px); animation: fade 240ms var(--ease-out) both; }
  .cmd__box { position: relative; width: min(680px, 100%); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; animation: cmdIn 380ms var(--spring) both; }
  @keyframes cmdIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
  .cmd__input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
  .cmd__input svg { width: 18px; height: 18px; fill: none; stroke: var(--text-3); stroke-width: 1.8; flex: none; }
  .cmd__input input { flex: 1; height: 60px; border: 0; background: none; outline: none; font-size: 17px; }
  .cmd__list { max-height: min(60vh, 520px); overflow-y: auto; padding: 8px; }
  .cmd__sec { padding: 10px 10px 6px; font: 500 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .cmd__item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
  .cmd__item[aria-selected='true'] { background: var(--surface-2); }
  .cmd__item .th { width: 44px; height: 44px; border-radius: 9px; overflow: hidden; background: var(--img-bg); display: grid; place-items: center; color: var(--text-3); }
  .cmd__item .th img { width: 100%; height: 100%; object-fit: cover; }
  .cmd__item .th svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .cmd__item b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cmd__item small { display: block; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cmd__item em { font: normal 500 11px/1 var(--font-mono); color: var(--text-3); }
  .cmd__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
  .cmd__foot span { display: inline-flex; gap: 6px; align-items: center; }
}

@layer utilities {
  .mt-s { margin-top: 12px; } .mt-m { margin-top: 24px; } .mt-l { margin-top: 48px; }
  .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .muted { color: var(--text-2); } .faint { color: var(--text-3); }
  .mono { font-family: var(--font-mono); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .wall__col { animation: none !important; }
  [data-reveal], .split .w > span { opacity: 1 !important; transform: none !important; }
}

/* ================================================================ board === */
@layer views {
  @keyframes bump { 40% { transform: scale(1.45); } }

  .tile__pin, .sheet__pin {
    position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
    background: rgba(0, 0, 0, .5); color: #fff; backdrop-filter: blur(8px); opacity: 0; transform: scale(.85);
    transition: opacity var(--t-fast), transform var(--t-med) var(--spring), background var(--t-fast);
  }
  .tile:hover .tile__pin, .tile:focus-within .tile__pin, .tile__pin[aria-pressed='true'] { opacity: 1; transform: none; }
  .tile__pin[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); }
  .tile__pin svg, .sheet__pin svg, .board-empty__art svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
  .tile__pin:active { transform: scale(.85); }
  @media (hover: none) { .tile__pin { opacity: .9; transform: none; } }
  .sheet__pin { position: static; opacity: 1; transform: none; width: 38px; height: 38px; border-radius: 50%; background: transparent; color: var(--text-2); backdrop-filter: none; }
  .sheet__pin:hover { background: var(--surface-2); color: var(--text); }
  .sheet__pin[aria-pressed='true'] { color: var(--accent-text); }

  .board-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
  .board-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 40%, transparent); }
  .board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
  .bcard { position: relative; margin: 0; border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); animation: pop 600ms var(--ease-out) both; animation-delay: calc(var(--i) * 40ms); }
  .bcard__img { display: block; aspect-ratio: 4 / 5; background: var(--img-bg); overflow: hidden; }
  .bcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
  .bcard:hover .bcard__img img { transform: scale(1.05); }
  .bcard figcaption { padding: 10px 12px 12px; display: grid; gap: 4px; font-size: 12px; }
  .bcard figcaption b { font-weight: 500; font-size: 13px; line-height: 1.3; }
  .bcard__rm { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; transition: opacity var(--t-fast), transform var(--t-med) var(--spring); }
  .bcard__rm svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .bcard:hover .bcard__rm { opacity: 1; }
  .bcard__rm:active { transform: scale(.85); }
  @media (hover: none) { .bcard__rm { opacity: 1; } }
  .board-syn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; margin-top: 18px; }
  @media (max-width: 960px) { .board-syn { grid-template-columns: minmax(0, 1fr); } }
  .syn-card { padding: 24px; min-width: 0; }
  .syn-h { display: flex; justify-content: space-between; gap: 10px; font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 12px; }
  .compare-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 12px; }
  @media (max-width: 900px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
  .cmp-col { display: grid; gap: 12px; align-content: start; }
  .cmp-img { display: block; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--img-bg); box-shadow: inset 0 0 0 1px var(--line); }
  .cmp-img img { width: 100%; height: 100%; object-fit: contain; }
  .cmp-title { font: 400 22px/1.1 var(--font-display); }
  .board-empty { padding: 64px 24px; text-align: center; }
  .board-empty__art { display: flex; justify-content: center; gap: 10px; margin-bottom: 22px; }
  .board-empty__art i { width: 64px; height: 80px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); transform: rotate(calc((var(--i) - 1) * 8deg)) translateY(calc(var(--i) * 0px)); animation: float 4s var(--ease-in-out) infinite alternate; animation-delay: calc(var(--i) * -1.3s); }
  .board-empty__art i:nth-child(2) { background: var(--accent); color: var(--accent-ink); transform: translateY(-8px); }
  .board-empty__art svg { width: 22px; height: 22px; }
  @keyframes float { to { translate: 0 -8px; } }

  /* fly-to-board: a thumbnail arcs from the pin to the nav */
  .flyer { position: fixed; z-index: 95; width: 54px; height: 66px; border-radius: 10px; background-size: cover; background-position: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); pointer-events: none; }

  /* shared-element morph: tile → sheet */
  ::view-transition-group(uh-media) { animation-duration: 560ms; animation-timing-function: cubic-bezier(.2, .9, .1, 1); }
  ::view-transition-old(uh-media), ::view-transition-new(uh-media) { height: 100%; object-fit: cover; }
  .modal.morph .sheet, .modal.morph .modal__scrim { animation-duration: 420ms; }

  /* keyboard help */
  .keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; align-items: center; font-size: 14px; color: var(--text-2); }
  .keys kbd { justify-self: start; font-size: 12px; padding: 4px 7px; color: var(--text); }
}

@layer views {
  .showcase { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
  .show:nth-child(4n + 1), .show:nth-child(4n) { grid-column: span 5; }
  .show:nth-child(4n + 2), .show:nth-child(4n + 3) { grid-column: span 8; }
  @media (max-width: 900px) { .showcase { grid-template-columns: 1fr; } .showcase .show { grid-column: auto !important; } }
  .show { position: relative; display: grid; grid-template-rows: 1fr auto; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .7s var(--spring), box-shadow .3s; }
  .show:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 80px -40px rgba(0, 0, 0, .6); }
  .show__img { height: 440px; min-height: 0; background: var(--img-bg); display: grid; place-items: center; overflow: hidden; padding: 22px; }
  .show__img img { height: 396px; width: auto; max-width: 100%; object-fit: contain; border-radius: 14px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7); transition: transform 1.2s var(--ease-out); }
  .show:hover .show__img img { transform: scale(1.04) translateY(-6px); }
  .show__meta { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 16px 20px 18px; align-items: baseline; }
  .show__meta b { font: 400 28px/1 var(--font-display); }
  .show__meta span { font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
  .show__meta small { grid-column: 1 / -1; color: var(--text-3); font: 11.5px var(--font-mono); margin-top: 6px; }
}

@layer views {
  .boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--text-3); font: 500 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
  .boot svg { width: 64px; height: 64px; color: var(--text); }
  .boot__arch { stroke-dasharray: 1; stroke-dashoffset: 1; animation: arch 1.4s var(--ease-in-out) infinite alternate; }
  @keyframes arch { to { stroke-dashoffset: 0; } }
}

@layer views {
  .demo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 16px; }
  .demo-card { display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .6s var(--spring), box-shadow var(--t-med); }
  .demo-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 80px -40px rgba(0, 0, 0, .6); }
  .demo-card__img { height: 360px; display: grid; place-items: center; background: var(--img-bg); padding: 22px; overflow: hidden; }
  .demo-card__img img { height: 316px; width: auto; max-width: 100%; object-fit: contain; border-radius: 14px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7); transition: transform 1.1s var(--ease-out); }
  .demo-card:hover .demo-card__img img { transform: translateY(-6px) scale(1.02); }
  .demo-card__body { padding: 22px 24px 24px; display: grid; gap: 10px; align-content: start; }
  .demo-card__body h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.05; }
  .demo-card__body p { color: var(--text-2); font-size: 14.5px; }
  .demo-card__refs { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-width: 0; }
  .demo-card__refs img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px var(--line-2); flex: none; }
  .demo-card__refs span { font: 500 11px var(--font-mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 4px; }
}

@layer views {
  .hero2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: clamp(28px, 4vw, 52px); }
  .hero2__text { display: grid; gap: 20px; align-content: center; }
  .hero2__text .hero__title { font-size: clamp(42px, 4.9vw, 78px); text-wrap: balance; }
  .hero2__text .hero__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 20px; }
  .hero2__text .stat b { font-size: clamp(28px, 2.6vw, 38px); }
  .hero2__text .stat span { white-space: nowrap; }
  .hero__install { justify-self: start; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: copy; }
  .hero2__wall { position: relative; height: min(720px, calc(100dvh - var(--top-h) - 60px)); min-height: 520px; border-radius: var(--r-xl); overflow: hidden; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); isolation: isolate; }
  .hero2__wall .wall { inset: -6% -8%; transform: perspective(1200px) rotateX(14deg) rotateZ(-5deg) scale(1.08); opacity: 1; gap: 12px; }
  .hero2__wall::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(var(--bg-2), transparent 18%, transparent 82%, var(--bg-2)); }
  @media (max-width: 980px) {
    .hero2 { grid-template-columns: minmax(0, 1fr); }
    .hero2__wall { height: 380px; min-height: 0; order: -1; }
    .hero2__text .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  .jump { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(28px, 4vw, 48px); }
  @media (max-width: 1100px) { .jump { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .jump__card { position: relative; display: grid; gap: 6px; align-content: start; padding: 18px 20px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--t-med) var(--spring), box-shadow var(--t-fast), background var(--t-fast); min-width: 0; }
  .jump__card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2); background: var(--surface-2); }
  .jump__ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent-text); margin-bottom: 8px; }
  .jump__ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .jump__card b { font-size: 16px; font-weight: 600; }
  .jump__card > span:not(.jump__ic) { color: var(--text-2); font-size: 13.5px; }
  .jump__go { position: absolute; top: 20px; right: 18px; color: var(--text-3); transition: transform var(--t-med) var(--ease-out), color var(--t-fast); }
  .jump__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .jump__card:hover .jump__go { transform: translateX(3px); color: var(--accent-text); }
  .orig-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  @media (max-width: 900px) { .orig-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .orig-card { display: grid; gap: 10px; min-width: 0; }
  .orig-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: var(--r-md); background: var(--img-bg); box-shadow: inset 0 0 0 1px var(--line); transition: transform .7s var(--ease-out); }
  .orig-card:hover img { transform: translateY(-4px); }
  .orig-card span { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ================================================================ landing === */
@layer views {
  body.landing .rail, body.landing .topbar, body.landing .tabbar { display: none; }
  body.landing .app { grid-template-columns: minmax(0, 1fr); }
  body.landing .view { padding-bottom: 0; }

  .lp-nav {
    position: fixed; top: 14px; left: 50%; translate: -50% 0; z-index: 60; width: min(calc(100% - 28px), 1240px); height: 60px;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 10px 0 20px; border-radius: 18px;
    transition: background var(--t-med), box-shadow var(--t-med), backdrop-filter var(--t-med);
  }
  .lp-nav.solid { background: var(--glass); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); box-shadow: inset 0 0 0 1px var(--line), 0 16px 40px -20px rgba(0, 0, 0, .6); }
  .lp-nav__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
  .lp-nav__brand svg { width: 28px; height: 28px; transition: transform var(--t-slow) var(--spring); }
  .lp-nav__brand:hover svg { transform: rotate(-10deg) scale(1.08); }
  .lp-nav__links { display: flex; gap: 2px; }
  .lp-nav__links a { padding: 8px 14px; border-radius: 10px; font-size: 14px; color: var(--text-2); white-space: nowrap; transition: color var(--t-fast), background var(--t-fast); }
  .lp-nav__links a:hover { color: var(--text); background: var(--surface); }
  .lp-nav__end { justify-self: end; display: flex; align-items: center; gap: 6px; }
  .lp-nav__end .btn svg, .lp-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  @media (max-width: 860px) { .lp-nav { grid-template-columns: 1fr auto; } .lp-nav__links { display: none; } }

  .lp-hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 3vw, 48px); padding: 110px max(var(--gutter), calc((100vw - 1320px) / 2)) 60px; overflow: hidden; isolation: isolate; }
  .lp-grid { position: absolute; inset: 0; z-index: -2; background-image: radial-gradient(color-mix(in oklab, var(--text) 14%, transparent) 1px, transparent 1.2px); background-size: 28px 28px; mask-image: radial-gradient(70% 60% at 65% 45%, #000 30%, transparent 75%); opacity: .55; }
  .lp-hero::before { content: ''; position: absolute; z-index: -1; right: -10%; top: 5%; width: 70vw; height: 70vw; max-width: 980px; max-height: 980px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%); filter: blur(10px); animation: breathe 9s var(--ease-in-out) infinite alternate; }
  @keyframes breathe { to { transform: scale(1.08) translate(-2%, 3%); } }
  .lp-hero__copy { display: grid; gap: 26px; max-width: 640px; }
  .lp-kicker { display: inline-flex; align-items: center; gap: 10px; justify-self: start; height: 32px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font: 500 12px/1 var(--font-mono); letter-spacing: .04em; color: var(--text-2); white-space: nowrap; }
  .lp-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent); animation: ping 2.4s var(--ease-out) infinite; }
  @keyframes ping { 50% { box-shadow: 0 0 0 7px transparent; } }
  .lp-title { font: 400 clamp(46px, 5.6vw, 92px)/.95 var(--font-display); letter-spacing: -.025em; text-wrap: balance; }
  .lp-scribble { position: relative; display: inline-block; font-style: italic; color: var(--accent-text); white-space: nowrap; }
  .lp-scribble svg { position: absolute; left: -4%; right: -4%; bottom: -.18em; width: 108%; height: .42em; overflow: visible; }
  .lp-scribble path { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease-out) 1s; }
  .lp-scribble path + path { stroke-width: 2.4; opacity: .55; transition-delay: 1.35s; }
  .lp-title.in .lp-scribble path { stroke-dashoffset: 0; }
  .lp-lede { font-size: clamp(16px, 1.25vw, 18.5px); line-height: 1.6; color: var(--text-2); max-width: 54ch; text-wrap: pretty; }
  .lp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
  .lp-btn { height: 50px; padding: 0 22px; font-size: 15px; }
  .lp-copy { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 8px 0 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font: 500 13.5px var(--font-mono); color: var(--text); cursor: copy; transition: box-shadow var(--t-fast); white-space: nowrap; }
  .lp-copy:hover { box-shadow: inset 0 0 0 1px var(--line-3); }
  .lp-copy > span { color: var(--accent-text); }
  .lp-copy em { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
  .lp-copy em svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

  .lp-stage { --mx: 0; --my: 0; position: relative; height: min(760px, 82svh); min-height: 560px; }
  .lp-blob { position: absolute; left: 50%; top: 50%; width: 78%; aspect-ratio: 1; translate: -50% -50%; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; background: conic-gradient(from 210deg, color-mix(in oklab, var(--accent) 40%, transparent), transparent 30%, color-mix(in oklab, var(--accent) 18%, transparent) 60%, transparent); filter: blur(40px); opacity: .7; animation: morph 14s var(--ease-in-out) infinite alternate; }
  @keyframes morph { to { border-radius: 58% 42% 45% 55% / 42% 58% 42% 58%; rotate: 40deg; } }
  .lp-phone { position: absolute; top: 50%; left: 50%; width: clamp(200px, 17vw, 290px); height: auto; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .55)); opacity: 0; transition: opacity 900ms var(--ease-out), transform 1400ms var(--ease-out); will-change: transform; }
  .lp-phone--c { z-index: 3; transform: translate(-50%, -40%) translate(calc(var(--mx) * -18px), calc(var(--my) * -14px)); }
  .lp-phone--l { z-index: 1; transform: translate(-112%, -38%) rotate(-12deg) scale(.86) translate(calc(var(--mx) * 26px), calc(var(--my) * 18px)); }
  .lp-phone--r { z-index: 2; transform: translate(14%, -42%) rotate(10deg) scale(.86) translate(calc(var(--mx) * 30px), calc(var(--my) * 20px)); }
  .lp-stage.in .lp-phone { opacity: 1; }
  .lp-stage.in .lp-phone--c { transform: translate(-50%, -50%) translate(calc(var(--mx) * -18px), calc(var(--my) * -14px)); transition-delay: .15s; }
  .lp-stage.in .lp-phone--l { transform: translate(-122%, -46%) rotate(-12deg) scale(.86) translate(calc(var(--mx) * 26px), calc(var(--my) * 18px)); transition-delay: .35s; }
  .lp-stage.in .lp-phone--r { transform: translate(22%, -54%) rotate(10deg) scale(.86) translate(calc(var(--mx) * 30px), calc(var(--my) * 20px)); transition-delay: .45s; }
  .lp-stage .lp-phone { transition: opacity 900ms var(--ease-out), transform 1400ms var(--ease-out); }
  .lp-stage.in .lp-phone { transition: opacity 900ms var(--ease-out), transform 160ms linear; }
  .lp-stage.in.settled .lp-phone { transition-delay: 0s !important; }
  .lp-note { position: absolute; z-index: 4; display: flex; align-items: flex-end; gap: 4px; font: italic 400 21px/1.05 var(--font-display); color: var(--text); opacity: 0; transform: translateY(8px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out); pointer-events: none; white-space: nowrap; }
  .lp-note svg { width: 92px; height: 46px; overflow: visible; flex: none; }
  .lp-note path { fill: none; stroke: var(--text-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease-out); }
  .lp-stage.in .lp-note { opacity: 1; transform: none; }
  .lp-stage.in .lp-note path { stroke-dashoffset: 0; }
  .lp-note--a { left: 2%; top: 9%; transition-delay: 1.3s; } .lp-note--a path { transition-delay: 1.5s; }
  .lp-note--a span { margin-bottom: 30px; }
  .lp-note--b { right: -1%; bottom: 13%; align-items: flex-start; transition-delay: 1.6s; } .lp-note--b path { transition-delay: 1.8s; } .lp-note--b span { margin-top: 30px; }
  .lp-note--c { right: 3%; top: 12%; transition-delay: 1.9s; } .lp-note--c path { transition-delay: 2.1s; } .lp-note--c span { margin-bottom: 26px; font-family: var(--font-mono); font-style: normal; font-size: 13px; color: var(--accent-text); }
  .lp-chip { position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 8px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px -16px rgba(0, 0, 0, .6); font: 500 12px var(--font-mono); white-space: nowrap; opacity: 0; transform: translateY(12px) scale(.96); transition: opacity 600ms var(--ease-out), transform 900ms var(--spring); animation: float 6s var(--ease-in-out) infinite alternate; }
  .lp-chip i { width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); }
  .lp-chip b { color: var(--text-3); font-weight: 500; }
  .lp-stage.in .lp-chip { opacity: 1; transform: none; }
  .lp-chip--1 { left: 8%; bottom: 20%; transition-delay: 2.2s; animation-delay: -1s; }
  .lp-chip--2 { left: 16%; bottom: 12%; transition-delay: 2.35s; animation-delay: -3s; }
  .lp-chip--3 { right: 8%; top: 42%; transition-delay: 2.5s; animation-delay: -2s; }
  .lp-scroll { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 26px; height: 42px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line-3); }
  .lp-scroll i { position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s var(--ease-in-out) infinite; }
  @keyframes wheel { 60% { transform: translateY(12px); opacity: 0; } }
  @media (max-width: 1060px) {
    .lp-hero { grid-template-columns: minmax(0, 1fr); padding-top: 100px; }
    .lp-stage { height: 560px; min-height: 0; }
    .lp-note { display: none; }
  }
  @media (max-width: 560px) { .lp-stage { height: 470px; } .lp-phone { width: 190px; } .lp-copy { display: none; } .lp-chip--3 { display: none; } }

  .lp-proof { border-block: 1px solid var(--line); background: var(--bg-2); }
  .lp-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; padding-block: 34px; }
  .lp-stats .stat b { font-size: clamp(30px, 3vw, 44px); }
  @media (max-width: 860px) { .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .lp-marquee { border-top: 1px solid var(--line); padding: 16px 0; }
  .lp-marquee .marquee__track { gap: 18px; align-items: center; animation-duration: 80s; }
  .lp-tag { font: italic 400 24px/1 var(--font-display); color: var(--text-2); white-space: nowrap; transition: color var(--t-fast); }
  .lp-tag:hover { color: var(--accent-text); }
  .lp-dot { color: var(--accent-text); font-size: 12px; }

  .lp-moves { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); padding-top: clamp(80px, 10vw, 140px); align-items: start; }
  .lp-moves__copy { display: grid; gap: 18px; }
  .lp-steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 0; counter-reset: s; }
  .lp-steps li { counter-increment: s; position: relative; padding: 28px 0 28px 64px; border-top: 1px solid var(--line); cursor: pointer; min-height: 24vh; display: grid; align-content: center; }
  .lp-steps li::before { content: '0' counter(s); position: absolute; left: 0; top: 30px; font: 500 12px var(--font-mono); color: var(--text-3); transition: color var(--t-med); }
  .lp-steps li::after { content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--accent); transition: width 900ms var(--ease-out); }
  .lp-steps li b { font: 400 clamp(30px, 3vw, 44px)/1 var(--font-display); color: var(--text-3); transition: color var(--t-med); }
  .lp-steps li p { color: var(--text-3); margin-top: 10px; max-width: 46ch; transition: color var(--t-med); }
  .lp-steps li.on b { color: var(--text); } .lp-steps li.on p { color: var(--text-2); } .lp-steps li.on::before { color: var(--accent-text); } .lp-steps li.on::after { width: 100%; }
  .lp-moves__stage { position: sticky; top: 110px; height: min(620px, 74vh); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .lp-panel { position: absolute; inset: 0; padding: 26px; display: grid; opacity: 0; transform: translateY(18px) scale(.985); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out); pointer-events: none; }
  .lp-panel.on { opacity: 1; transform: none; pointer-events: auto; }
  .lp-pcard { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; min-height: 0; }
  .lp-pcard__bar { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .lp-pcard__bar code { color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lp-refgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 10px; min-height: 0; }
  .lp-refgrid div { position: relative; border-radius: 14px; overflow: hidden; background: var(--img-bg); opacity: 0; transform: translateY(10px); transition: opacity 500ms var(--ease-out), transform 700ms var(--spring); transition-delay: calc(var(--i) * 70ms + 150ms); }
  .lp-panel.on .lp-refgrid div { opacity: 1; transform: none; }
  .lp-refgrid img { width: 100%; height: 100%; object-fit: cover; }
  .lp-refgrid span { position: absolute; left: 8px; bottom: 8px; padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; font: 500 10.5px var(--font-mono); }
  .lp-pcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
  .lp-pcard__foot > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .lp-look { position: relative; border-radius: 16px; overflow: hidden; background: var(--img-bg); }
  .lp-look img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 2.4s var(--ease-out); }
  .lp-panel.on .lp-look img { transform: none; }
  .lp-look__ann { position: absolute; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; color: var(--text-2); max-width: 220px; opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease-out), transform 700ms var(--spring); }
  .lp-look__ann b { font: italic 400 18px/1 var(--font-display); color: var(--accent-text); }
  .lp-panel.on .lp-look__ann { opacity: 1; transform: none; }
  .lp-look__ann--1 { left: 16px; top: 16px; transition-delay: .3s; } .lp-look__ann--2 { right: 16px; top: 42%; transition-delay: .5s; } .lp-look__ann--3 { left: 16px; bottom: 16px; transition-delay: .7s; }
  .lp-build { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; min-height: 0; }
  .lp-build__ui { display: grid; gap: 8px; justify-items: start; padding: 24px; border-radius: 20px; background: var(--b); color: var(--t); box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .18); }
  .lp-build__eyebrow { font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--m); }
  .lp-build__ui b { font: 400 34px/1 var(--font-display); }
  .lp-build__ui p { color: var(--m); font-size: 14.5px; }
  .lp-build__btn { margin-top: 6px; font-style: normal; display: inline-flex; align-items: center; height: 44px; padding: 0 22px; border-radius: 14px; background: var(--a); color: var(--o); font-weight: 600; font-size: 14.5px; }
  .lp-build .code { overflow: auto; min-height: 0; margin: 0; font-size: 11.5px; }
  @media (max-width: 980px) {
    .lp-moves { grid-template-columns: minmax(0, 1fr); }
    .lp-steps li { min-height: 0; padding: 18px 0 18px 54px; }
    .lp-moves__stage { position: relative; top: 0; height: 460px; order: 2; }
  }

  .lp-originals { padding-top: clamp(80px, 10vw, 140px); }
  .lp-originals .section__head { align-items: end; }
  .lp-originals__side { display: grid; gap: 16px; justify-items: start; }
  .lp-themes button { display: inline-flex; align-items: center; gap: 7px; }
  .lp-sw { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .4); }
  .lp-sw--ember { background: #FF6A2B; } .lp-sw--mint { background: #1F7A4D; } .lp-sw--ink { background: #2B4BF2; } .lp-sw--grape { background: #C6F432; }
  .lp-shelf { display: flex; gap: 16px; overflow-x: auto; padding: 8px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))) 20px; scroll-snap-type: x proximity; scrollbar-width: none; cursor: grab; user-select: none; }
  .lp-shelf::-webkit-scrollbar { display: none; }
  .lp-shelf.drag { cursor: grabbing; scroll-snap-type: none; }
  .lp-shelf__item { flex: none; width: clamp(240px, 22vw, 320px); display: grid; gap: 10px; scroll-snap-align: start; }
  .lp-shelf__item img { width: 100%; aspect-ratio: 600 / 1000; object-fit: cover; border-radius: var(--r-lg); background: var(--img-bg); box-shadow: inset 0 0 0 1px var(--line); transition: opacity 260ms var(--ease-out), transform 600ms var(--ease-out); pointer-events: none; }
  .lp-shelf__item:hover img { transform: translateY(-6px); }
  .lp-shelf__item span { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .lp-final { padding-top: clamp(80px, 10vw, 140px); }
  .lp-final__card { position: relative; overflow: hidden; display: grid; gap: 28px; justify-items: center; text-align: center; padding: clamp(48px, 7vw, 96px) 24px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); isolation: isolate; }
  .lp-final__card::before { content: ''; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -1; background: radial-gradient(50% 50% at 50% 50%, color-mix(in oklab, var(--accent) 24%, transparent), transparent 70%); }
  .lp-final__card h2 { font-size: clamp(40px, 5.4vw, 84px); line-height: .95; text-wrap: balance; }
}

/* ============================================================ top nav shell === */
@layer views {
  :root { --rail-w: 0px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; left: 0; top: 0; width: 272px; transform: translateX(-102%); transition: transform var(--t-slow) var(--ease-out); padding: 14px 12px; z-index: 80; }
  .rail.open { transform: none; box-shadow: var(--shadow-lg); }
  .rail .rail__brand span, .rail .rail__link span, .rail .rail__group, .rail .rail__stat { display: initial; }
  .rail .rail__brand, .rail .rail__link { justify-content: flex-start; padding: 0 10px; }
  .rail .rail__badge { position: static; }
  .rail .rail__tools { flex-direction: row; }
  .rail.open ~ .scrim, .scrim.on { opacity: 1; pointer-events: auto; }
  .scrim { z-index: 75; }
  .topbar { padding: 0; }
  .topbar__in { width: 100%; max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 var(--gutter); display: flex; align-items: center; gap: 14px; }
  .topbar__brand { display: inline-flex !important; align-items: center; gap: 9px; font-weight: 600; font-size: 15.5px; letter-spacing: -.02em; flex: none; }
  .topbar__brand svg { width: 26px; height: 26px; transition: transform var(--t-slow) var(--spring); }
  .topbar__brand:hover svg { transform: rotate(-10deg) scale(1.08); }
  .topbar__menu { display: none !important; }
  .topnav { display: flex; gap: 2px; margin-left: 10px; min-width: 0; }
  .topnav a { position: relative; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--text-2); white-space: nowrap; transition: color var(--t-fast), background var(--t-fast); }
  .topnav a:hover { color: var(--text); background: var(--surface); }
  .topnav a[aria-current='page'] { color: var(--text); }
  .topnav a[aria-current='page']::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 2px; border-radius: 2px; background: var(--accent); }
  .search { flex: 0 1 260px; max-width: 260px; margin-left: auto; height: 38px; }
  .topbar__actions { margin-left: 0; gap: 4px; }
  .topbar__board { position: relative; }
  .topbar__board .rail__badge { position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; }
  #themeBtn2 svg, .topbar__board svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  @media (max-width: 1180px) {
    .topnav { display: none; }
    .topbar__menu { display: grid !important; }
    .search { flex: 1 1 auto; max-width: 520px; }
  }
  @media (max-width: 760px) {
    .topbar__brand span, .topbar__cta { display: none; }
    .search kbd { display: none; }
  }
}

@layer views {
  .code__in { display: block; }
  .install__panel .code, .skill-file .code { white-space: pre; padding-right: 54px; }
  .install__panel .code__in, .skill-file .code__in { overflow-x: auto; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .install__panel .code__in::-webkit-scrollbar, .skill-file .code__in::-webkit-scrollbar { display: none; }
  .md table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; display: block; overflow-x: auto; }
  .md th, .md td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
  .md th { color: var(--text); font-weight: 600; white-space: nowrap; }
  .md td code { white-space: nowrap; }
  .skill-file .doc { max-height: 640px; }
}

@layer views {
  .live { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--img-bg); }
  .live__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; z-index: 2; }
  .live__themes { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--line-2); overflow-x: auto; scrollbar-width: none; }
  .live__themes button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 9px; font-size: 13px; color: var(--text-2); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
  .live__themes button i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .4); }
  .live__themes button[aria-pressed='true'] { background: var(--text); color: var(--bg); }
  .live__open { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--glass); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; color: var(--text-2); white-space: nowrap; }
  .live__open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .live iframe { width: 100%; height: 100%; border: 0; background: transparent; }
  .live__hint { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; padding: 6px 12px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); font: 500 11.5px var(--font-mono); color: var(--text-3); white-space: nowrap; pointer-events: none; animation: hintOut 1s ease 4s forwards; }
  @keyframes hintOut { to { opacity: 0; } }
  @media (max-width: 520px) { .live__bar { padding: 10px; gap: 8px; } .live__themes button { padding: 0 10px; gap: 6px; } .live__open { font-size: 0; gap: 0; width: 38px; padding: 0; justify-content: center; flex: none; } }
  .sheet__media:has(.live) .sheet__nav { top: auto; bottom: 14px; translate: 0 0; }
}

@layer views {
  .lp-stage { --sy: 0; }
  .lp-stage.in .lp-phone--c { translate: 0 calc(var(--sy) * -40px); }
  .lp-stage.in .lp-phone--l { translate: calc(var(--sy) * -60px) calc(var(--sy) * 30px); rotate: calc(var(--sy) * -6deg); }
  .lp-stage.in .lp-phone--r { translate: calc(var(--sy) * 60px) calc(var(--sy) * 10px); rotate: calc(var(--sy) * 6deg); }
  .lp-stage .lp-note, .lp-stage .lp-chip { translate: 0 calc(var(--sy) * -30px); }
  .lp-live { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-top: clamp(70px, 9vw, 120px); }
  .lp-live__frame { position: relative; aspect-ratio: 13 / 10; border-radius: var(--r-xl); overflow: hidden; background: radial-gradient(120% 90% at 20% 10%, var(--surface-2), var(--bg-2)); box-shadow: inset 0 0 0 1px var(--line); }
  .lp-live__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .lp-live__copy { display: grid; gap: 18px; align-content: center; }
  .lp-live__themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .lp-live__themes button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 12px 14px; border-radius: 14px; text-align: left; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t-fast), transform var(--t-med) var(--spring), background var(--t-fast); }
  .lp-live__themes button:hover { transform: translateY(-2px); }
  .lp-live__themes button[aria-pressed='true'] { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--accent); }
  .lp-live__themes .lp-sw { grid-row: span 2; width: 22px; height: 22px; }
  .lp-live__themes b { font-weight: 600; font-size: 14px; }
  .lp-live__themes span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  @media (max-width: 980px) { .lp-live { grid-template-columns: minmax(0, 1fr); } .lp-live__frame { aspect-ratio: 4 / 5; } }
}
@layer views { @media (max-width: 900px) { .live__hint { display: none; } } }

/* ================================================================ landing v3 === */
@layer views {
  body.landing .grain { display: none; }
  .lp-hero2 { position: relative; overflow: hidden; isolation: isolate; padding: clamp(104px, 13vh, 140px) var(--gutter) 40px; display: grid; justify-items: center; text-align: center; }
  .lp-hero2::before { content: ''; position: absolute; z-index: -1; left: 50%; top: 52%; width: min(1400px, 140vw); height: 900px; translate: -50% -50%; background: radial-gradient(50% 45% at 50% 55%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%); pointer-events: none; }
  .lp-hero2__copy { display: grid; justify-items: center; gap: 24px; max-width: 980px; }
  .lp-hero2 .lp-title { font-size: clamp(46px, 6.6vw, 104px); line-height: .92; letter-spacing: -.03em; }
  .lp-hero2 .lp-lede { max-width: 58ch; }
  .lp-hero2 .lp-cta { justify-content: center; }
  .lp-rise { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out), filter 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 110ms + 200ms); }
  .lp-hero2.in .lp-rise { opacity: 1; transform: none; filter: none; }
  .lp-ring { --cw: 220px; --R: 600px; position: relative; width: 100%; height: calc(var(--cw) * 2.75); margin-top: clamp(24px, 4vh, 48px); perspective: 1700px; perspective-origin: 50% 30%; cursor: grab; touch-action: pan-y; user-select: none; opacity: 0; transform: translateY(40px) scale(.96); transition: opacity 1200ms var(--ease-out) .5s, transform 1600ms var(--ease-out) .5s;
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
  .lp-hero2.in .lp-ring { opacity: 1; transform: none; }
  .lp-ring.grab { cursor: grabbing; }
  .lp-ring__track { position: absolute; left: 50%; top: 4%; width: var(--cw); height: calc(var(--cw) * 2.1); margin-left: calc(var(--cw) / -2); transform-style: preserve-3d; will-change: transform; }
  .lp-card { position: absolute; inset: 0; transform: rotateY(calc(var(--i) * (360deg / var(--n, 21)))) translateZ(var(--R)); backface-visibility: hidden; border-radius: calc(var(--cw) * .13); transition: filter .3s; }
  .lp-card img { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); pointer-events: none; }
  .lp-card:hover img { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)) drop-shadow(0 0 0 transparent); }
  .lp-ring__caption { margin-top: 8px; font-size: 13.5px; color: var(--text-3); }
  .lp-ring__caption a { color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
  .lp-ring__caption a:hover { color: var(--accent-text); }
  .lp-ring__caption svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

  .lp-manifesto { padding-top: clamp(90px, 14vw, 180px); padding-bottom: clamp(30px, 6vw, 60px); }
  .lp-manifesto__text { max-width: 24ch; margin: 0 auto; text-align: center; font: 400 clamp(34px, 4.8vw, 72px)/1.06 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
  .lp-manifesto__text span { color: color-mix(in oklab, var(--text) 18%, transparent); transition: color 400ms var(--ease-out); }
  .lp-manifesto__text span.on { color: var(--text); }

  .lp-proof { margin-top: clamp(60px, 9vw, 120px); }
  .lp-marquee .marquee__track { gap: 44px; }
  .lp-tag { color: var(--text-3); }
}
@layer views {
  body.landing [data-reveal] { filter: blur(8px); transition: opacity 1000ms var(--ease-out), transform 1200ms var(--ease-out), filter 1000ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
  body.landing [data-reveal].in { filter: none; }
}

/* ======================================================= landing sections v3 === */
@layer views {
  .lp-head { display: grid; gap: 14px; max-width: 760px; margin: 0 auto clamp(32px, 4vw, 52px); text-align: center; justify-items: center; }
  .lp-head .lede { margin: 0 auto; }
  .lp-link { color: var(--accent-text); }
  .lp-sec { padding-top: clamp(100px, 13vw, 170px); }

  .lp-numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(70px, 10vw, 130px); border-block: 1px solid var(--line); }
  .lp-num { padding: 34px 24px 30px; display: grid; gap: 6px; align-content: start; opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--d) * 120ms); }
  .lp-num + .lp-num { border-left: 1px solid var(--line); }
  .lp-numbers.in .lp-num { opacity: 1; transform: none; }
  .lp-num b { font: 400 clamp(48px, 5.6vw, 84px)/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .lp-num span { font: 500 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
  .lp-num p { color: var(--text-3); font-size: 13.5px; max-width: 24ch; margin-top: 6px; }
  @media (max-width: 860px) { .lp-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lp-num:nth-child(3) { border-left: 0; } .lp-num:nth-child(n+3) { border-top: 1px solid var(--line); } }
  .lp-marquee { border: 0; padding: 22px 0 0; mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
  .lp-marquee .marquee__track { gap: 56px; animation-duration: 110s; }
  .lp-tag { font: italic 400 22px/1 var(--font-display); color: var(--text-3); white-space: nowrap; }

  .lp-pin { position: relative; height: 330vh; margin-top: clamp(80px, 10vw, 140px); }
  .lp-pin__sticky { position: sticky; top: 0; height: 100vh; display: grid; align-items: center; overflow: hidden; }
  .lp-pin__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
  .lp-pin__copy { display: grid; gap: 16px; align-content: center; }
  .lp-pin__steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 4px; }
  .lp-pin__steps li { display: grid; grid-template-columns: 3px minmax(0, 1fr); gap: 18px; padding: 14px 0; cursor: pointer; }
  .lp-pin__steps li > i { position: relative; border-radius: 3px; background: var(--line-2); overflow: hidden; }
  .lp-pin__steps li > i b { position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(0); }
  .lp-pin__steps strong { display: block; font: 400 clamp(28px, 2.6vw, 38px)/1 var(--font-display); color: var(--text-3); transition: color .5s var(--ease-out); }
  .lp-pin__steps p { color: var(--text-3); margin-top: 8px; max-width: 46ch; font-size: 15px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .7s var(--ease-out), opacity .5s var(--ease-out), color .5s; }
  .lp-pin__steps li.on strong { color: var(--text); }
  .lp-pin__steps li.on p { max-height: 120px; opacity: 1; color: var(--text-2); }
  .lp-pin__stage { position: relative; height: min(600px, 72vh); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 60px 120px -60px rgba(0, 0, 0, .7); overflow: hidden; }
  .lp-pin__stage .lp-panel { transform: translateY(24px) scale(.97); filter: blur(8px); transition: opacity .7s var(--ease-out), transform .9s var(--ease-out), filter .7s var(--ease-out); }
  .lp-pin__stage .lp-panel.on { transform: none; filter: none; }
  @media (max-width: 980px) {
    .lp-pin { height: auto; }
    .lp-pin__sticky { position: relative; height: auto; overflow: visible; }
    .lp-pin__grid { grid-template-columns: minmax(0, 1fr); }
    .lp-pin__steps p { max-height: none; opacity: 1; }
    .lp-pin__stage { height: 480px; }
  }

  .lp-orig { padding-top: clamp(100px, 13vw, 170px); }
  .lp-orig__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-xl); overflow: hidden; background: radial-gradient(100% 90% at 50% 0%, var(--surface-2), var(--bg-2)); box-shadow: inset 0 0 0 1px var(--line), 0 60px 120px -60px rgba(0, 0, 0, .7); }
  .lp-orig__frame iframe { position: absolute; inset: 0 0 70px; width: 100%; height: calc(100% - 70px); border: 0; }
  .lp-orig__themes { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; display: flex; gap: 4px; padding: 5px; border-radius: 16px; background: var(--glass); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px -20px rgba(0, 0, 0, .6); }
  .lp-orig__themes button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 12px; font-size: 14px; color: var(--text-2); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
  .lp-orig__themes button[aria-pressed='true'] { background: var(--text); color: var(--bg); }
  .lp-orig__themes .lp-sw { width: 12px; height: 12px; }
  @media (max-width: 760px) { .lp-orig__frame { aspect-ratio: 3 / 4; } .lp-orig__themes button { padding: 0 10px; font-size: 13px; } }
  .lp-drift { display: grid; gap: 14px; margin-top: 28px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
  .lp-drift__row { overflow: hidden; }
  .lp-drift__track { display: flex; gap: 14px; width: max-content; animation: drift 90s linear infinite; }
  .lp-drift__row.rev .lp-drift__track { animation-direction: reverse; animation-duration: 110s; }
  .lp-drift:hover .lp-drift__track { animation-play-state: paused; }
  @keyframes drift { to { transform: translateX(-50%); } }
  .lp-drift__item { position: relative; flex: none; width: 260px; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--img-bg); box-shadow: inset 0 0 0 1px var(--line); }
  .lp-drift__item img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform .9s var(--ease-out); }
  .lp-drift__item span { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 6px 10px; border-radius: 9px; background: var(--glass); backdrop-filter: blur(10px); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease-out); }
  .lp-drift__item:hover img { transform: scale(1.06); }
  .lp-drift__item:hover span { opacity: 1; transform: none; }
  .lp-orig__more { justify-content: center; margin-top: 26px; }

  .lp-window { border-radius: var(--r-xl); overflow: hidden; background: #0C0C0E; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 70px 140px -60px rgba(0, 0, 0, .8); }
  [data-theme='light'] .lp-window { background: #111113; }
  .lp-window__bar { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); color: #8B8983; font: 12px var(--font-mono); }
  .lp-window__bar i { width: 11px; height: 11px; border-radius: 50%; background: #2C2C30; }
  .lp-window__bar span { margin-left: 10px; }
  .lp-window__bar em { margin-left: auto; font-style: normal; color: #7EE2A8; }
  .lp-window__split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 520px; }
  .lp-window .term__body { color: #E9E7E2; border-right: 1px solid rgba(255, 255, 255, .07); }
  .lp-window .stage { border-radius: 0; background: transparent; box-shadow: none; min-height: 0; color: #E9E7E2; }
  .lp-window .stage .eyebrow { color: #9B9893; }
  .lp-window .stage .tag { background: rgba(255, 255, 255, .08); color: #C9C6C0; }
  @media (max-width: 900px) { .lp-window__split { grid-template-columns: minmax(0, 1fr); } .lp-window .term__body { min-height: 300px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .07); } }

  .lp-demos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; perspective: 1400px; }
  @media (max-width: 860px) { .lp-demos { grid-template-columns: minmax(0, 1fr); } }
  .lp-demo { --rx: 0deg; --ry: 0deg; position: relative; display: grid; grid-template-rows: auto auto; border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .6s var(--ease-out), box-shadow var(--t-med); }
  .lp-demo:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 50px 90px -50px rgba(0, 0, 0, .7); }
  .lp-demo__img { height: 340px; display: grid; place-items: center; padding: 24px; background: radial-gradient(90% 80% at 50% 0%, var(--surface-2), var(--bg-2)); overflow: hidden; }
  .lp-demo__img img { height: 292px; width: auto; max-width: 100%; object-fit: contain; border-radius: 14px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7); transition: transform 1s var(--ease-out); }
  .lp-demo:hover .lp-demo__img img { transform: translateY(-8px) scale(1.02); }
  .lp-demo__meta { padding: 20px 24px 24px; display: grid; gap: 4px; }
  .lp-demo__meta span { font: 500 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
  .lp-demo__meta b { font: 400 34px/1 var(--font-display); margin-top: 4px; }
  .lp-demo__meta p { color: var(--text-2); font-size: 14px; }
  .lp-demo__go { position: absolute; right: 22px; bottom: 26px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); transition: background var(--t-fast), color var(--t-fast), transform var(--t-med) var(--spring); }
  .lp-demo__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .lp-demo:hover .lp-demo__go { background: var(--accent); color: var(--accent-ink); transform: translateX(3px); }

  .lp-get { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  @media (max-width: 1000px) { .lp-get { grid-template-columns: minmax(0, 1fr); } }
  .lp-get__card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 6px; padding: 24px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
  .lp-get__card:first-child { box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--accent) 60%, transparent); }
  .lp-get__badge { position: absolute; top: 20px; right: 20px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 11px var(--font-ui); }
  .lp-get__card > b { font: 400 28px/1.05 var(--font-display); }
  .lp-get__card > p { color: var(--text-2); font-size: 14px; }
  .lp-get__code { position: relative; margin-top: 14px; align-self: end; }
  .lp-get__code pre { margin: 0; padding: 14px 50px 14px 14px; border-radius: 14px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); font: 12px/1.7 var(--font-mono); white-space: pre; overflow-x: auto; scrollbar-width: none; color: var(--text); -webkit-mask: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 20px)); mask: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 20px)); }
  .lp-get__code pre::-webkit-scrollbar { display: none; }
  .lp-get__code .code__copy { top: 8px; right: 8px; }

  .lp-final2 { position: relative; overflow: hidden; isolation: isolate; margin-top: clamp(110px, 14vw, 180px); padding: clamp(100px, 14vw, 180px) 0; border-top: 1px solid var(--line); }
  .lp-final2__beam { position: absolute; left: 50%; top: 50%; width: 1200px; height: 1200px; translate: -50% -50%; z-index: -1; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 70%, color-mix(in oklab, var(--accent) 34%, transparent) 82%, transparent 94%); filter: blur(60px); opacity: .55; animation: beam 18s linear infinite; mask-image: radial-gradient(closest-side, #000 40%, transparent); }
  @keyframes beam { to { rotate: 360deg; } }
  .lp-final2__in { display: grid; gap: 22px; justify-items: center; text-align: center; }
  .lp-final2 h2 { font-size: clamp(46px, 7vw, 112px); line-height: .92; letter-spacing: -.03em; text-wrap: balance; }
  @media (prefers-reduced-motion: reduce) { .lp-drift__track, .lp-final2__beam { animation: none; } }
}

@layer views {
  .sheet__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
  .sheet__actions .btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .sheet__lic { margin-left: auto; font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
  .tile { transition: opacity 700ms var(--ease-out), translate 900ms var(--ease-out), box-shadow var(--t-fast), transform 500ms var(--ease-out); }
  .tile:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 48px -28px rgba(0, 0, 0, .7); }
}
@layer views {
  .topbar__brand { padding: 6px; margin: -6px; }
  .lp-ring__caption a, .pattern__count a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 4px; }
}

@layer views {
  .pg__run .btn { flex: none; }
  .pg__call { min-width: 0; }
  @media (max-width: 600px) { .tag { min-height: 28px; } .facets { gap: 8px; } }
}
@layer views {
  /* the drawer is off-screen until opened: keep it out of the tab order */
  .rail { visibility: hidden; transition: transform var(--t-slow) var(--ease-out), visibility 0s linear var(--t-slow); }
  .rail.open { visibility: visible; transition: transform var(--t-slow) var(--ease-out), visibility 0s; }
  body.landing .rail { display: none; }
}

@layer views {
  .bcard__img--wide { display: grid; place-items: center; padding: 10px; }
  .bcard__img--wide img { height: auto; object-fit: contain; border-radius: 8px; }
}
