/* Duong Vu Labs — duongvu.org
   Plain CSS, no build step. Sections set their own theme (dark / light / paper). */

:root {
  --black: #000;
  --ink: #1d1d1f;
  --paper: #f5f5f7;
  --white: #fff;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --green: #33c787;
  --green-soft: rgba(51, 199, 135, .16);
  --radius: 28px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --nav-h: 48px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.011em;
  color: var(--ink);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); color: var(--ink); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

.wrap { width: min(1080px, 100% - 44px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 44px); }
.center { text-align: center; }

/* ── themes ── */
.dark { background: var(--black); color: #f5f5f7; --fg: #f5f5f7; --muted: #a1a1a6; --link: #2997ff; --card: #161617; --line: rgba(255,255,255,.1); }
.light { background: var(--white); color: var(--ink); --fg: #1d1d1f; --muted: #6e6e73; --link: #0066cc; --card: #f5f5f7; --line: rgba(0,0,0,.08); }
.paper { background: var(--paper); color: var(--ink); --fg: #1d1d1f; --muted: #6e6e73; --link: #0066cc; --card: #fff; --line: rgba(0,0,0,.08); }

section { position: relative; padding: clamp(84px, 11vw, 150px) 0; }

/* ── type ── */
.eyebrow { font-size: clamp(17px, 1.7vw, 21px); font-weight: 600; letter-spacing: -.01em; color: var(--muted); margin-bottom: 10px; }
.eyebrow.green { color: var(--green); }
.display { font-size: clamp(44px, 8.4vw, 96px); line-height: 1.1; font-weight: 700; letter-spacing: -.035em; }
.headline { font-size: clamp(34px, 5.4vw, 64px); line-height: 1.12; font-weight: 700; letter-spacing: -.03em; }
.headline-2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.16; font-weight: 700; letter-spacing: -.025em; }
.lede, .sub { font-size: clamp(18px, 2vw, 24px); line-height: 1.4; font-weight: 400; color: var(--muted); letter-spacing: -.012em; }
.lede { max-width: 720px; margin: 22px auto 0; }
.sub { max-width: 680px; margin: 18px auto 0; }
.body { font-size: 19px; line-height: 1.5; color: var(--muted); margin-top: 18px; }
.fineprint { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 22px; letter-spacing: 0; }
.fineprint a, .link { color: var(--link); text-decoration: none; }
.fineprint a:hover, .link:hover { text-decoration: underline; }
.link { font-size: 17px; white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; }
.grad { background: linear-gradient(92deg, #7df0b8 0%, #33c787 38%, #2ab4d9 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .12em; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border: 0; border-radius: 980px;
  background: var(--blue); color: #fff; font-size: 17px; font-weight: 400; text-decoration: none;
  transition: background .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--blue-hover); }
.btn:active { transform: scale(.97); }
.btn-small { min-height: 28px; padding: 0 13px; font-size: 12px; }
.btn-large { flex-direction: column; gap: 2px; min-height: 64px; padding: 10px 30px; font-weight: 500; }
.btn-large small { font-size: 12px; font-weight: 400; opacity: .82; }
.btn-ghost { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.btn-ghost:hover { background: rgba(255,255,255,.17); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: center; margin-top: 32px; }

/* ── nav ── */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); background: rgba(22,22,23,.78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); color: #f5f5f7; border-bottom: 1px solid rgba(255,255,255,.07); }
.nav-inner { width: min(1080px, 100% - 44px); margin-inline: auto; height: 100%; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -.015em; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.nav-links { display: flex; gap: clamp(14px, 2.2vw, 30px); margin-inline: auto; }
.nav-links a { font-size: 12px; letter-spacing: -.005em; text-decoration: none; color: rgba(245,245,247,.8); transition: color .2s; white-space: nowrap; }
.nav-links a:hover, .nav-links a.is-current { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; padding: 2px; border-radius: 980px; background: rgba(255,255,255,.1); }
.lang button { border: 0; background: none; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 3px 9px; border-radius: 980px; color: rgba(245,245,247,.7); }
.lang button[aria-pressed="true"] { background: rgba(255,255,255,.92); color: #1d1d1f; }
.nav-toggle { display: none; width: 32px; height: 32px; border: 0; background: none; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 8px; right: 8px; height: 1.5px; background: #f5f5f7; transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-toggle span:first-child { top: 12px; } .nav-toggle span:last-child { top: 19px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 15.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 15.5px; transform: rotate(-45deg); }

/* ── reveal ── */
/* Hidden only once scripting is known to run (boot.js sets .js), so the page reads fine without it. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.rise { opacity: 0; transform: translateY(22px); animation: rise 1s var(--ease) forwards; }
.rise:nth-child(2) { animation-delay: .08s; } .rise:nth-child(3) { animation-delay: .18s; } .rise:nth-child(4) { animation-delay: .28s; } .rise:nth-child(5) { animation-delay: .36s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── hero ── */
.hero { padding: calc(var(--nav-h) + clamp(70px, 11vw, 140px)) 0 clamp(40px, 6vw, 70px); text-align: center; overflow: hidden; }
.hero-glow { position: absolute; inset: -20% -10% auto -10%; height: 120%; pointer-events: none;
  background:
    radial-gradient(520px 380px at var(--gx, 50%) var(--gy, 34%), rgba(51,199,135,.2), transparent 70%),
    radial-gradient(700px 460px at 72% 8%, rgba(42,150,217,.13), transparent 70%),
    radial-gradient(600px 420px at 22% 4%, rgba(51,199,135,.1), transparent 70%);
  transition: background-position .3s; }
.hero-glow.low { inset: 0; height: auto; background:
    radial-gradient(46% 52% at 50% 46%, rgba(51,199,135,.2), transparent 70%),
    radial-gradient(34% 44% at 76% 54%, rgba(42,150,217,.12), transparent 70%); }
.hero-copy { position: relative; }

/* ── demo stage ── */
.demo { padding-top: clamp(40px, 6vw, 80px); }
.stage-wrap { width: min(1120px, 100% - 28px); margin: clamp(36px, 5vw, 60px) auto 0; }
.stage { position: relative; border-radius: 22px; overflow: hidden; background:
    radial-gradient(900px 500px at 15% 110%, rgba(51,199,135,.25), transparent 65%),
    radial-gradient(800px 520px at 95% 0%, rgba(56,118,255,.3), transparent 65%),
    linear-gradient(160deg, #101822, #0a0f16 60%, #0c1512);
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 40px 120px rgba(0,0,0,.6); }
.menubar { height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 13px; color: rgba(255,255,255,.92); background: rgba(20,22,28,.55); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.mb-left { display: flex; gap: 18px; white-space: nowrap; overflow: hidden; }
.mb-left .mb-app { font-weight: 700; }
.mb-right { display: flex; align-items: center; gap: 13px; }
.mb-ico { width: 16px; height: 16px; fill: currentColor; opacity: .9; }
.mb-ico.wide { width: 24px; }
.mb-clock { font-variant-numeric: tabular-nums; }
.mb-item { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border: 0; border-radius: 5px; background: rgba(255,255,255,.2); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mb-item[aria-expanded="false"] { background: transparent; }
.mb-item:hover { background: rgba(255,255,255,.26); }
.mb-bolt { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.mb-item.is-busy .mb-bolt { fill: currentColor; }

.desk { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 22px; padding: 26px 20px 30px 26px; align-items: start; min-height: 690px; }

.window { border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 26px 60px rgba(0,0,0,.5); }
.win-bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 12px; background: #2a2b2f; position: relative; }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.win-bar i:nth-child(2) { background: #febc2e; } .win-bar i:nth-child(3) { background: #28c840; }
.win-title { position: absolute; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.6); pointer-events: none; }
.term { margin-top: 34px; background: rgba(16,17,20,.94); }
.term-body { height: 500px; padding: 18px 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.62; color: #d7dae0; text-align: left; overflow: hidden; letter-spacing: 0; }
.t-prompt { color: #fff; min-height: 1.62em; }
.t-caret { color: var(--green); margin-right: 9px; }
.t-status { color: #8b93a1; min-height: 1.62em; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.t-status.is-live { color: #e2b25b; }
.t-status.is-done { color: var(--green); }
.t-reply { white-space: pre-wrap; }
.t-cursor { display: inline-block; width: 8px; height: 1.05em; margin-left: 1px; vertical-align: text-bottom; background: #d7dae0; opacity: 0; }
.t-cursor.is-on { opacity: 1; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* popover: follows the app's dark Live tab */
.popover { position: relative; border-radius: 16px; padding: 14px; background: rgba(46,47,50,.9); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%); box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 30px 70px rgba(0,0,0,.55); color: #f2f2f4; font-size: 13px; line-height: 1.3; letter-spacing: 0; text-align: left; transform-origin: 62% -10px; transition: opacity .25s, transform .35s var(--ease); }
.popover.is-closed { opacity: 0; transform: scale(.94) translateY(-8px); pointer-events: none; }
.pop-arrow { position: absolute; top: -7px; right: 108px; width: 16px; height: 16px; background: rgba(52,53,56,.96); transform: rotate(45deg); border-radius: 3px; box-shadow: -1px -1px 0 rgba(255,255,255,.14); }
.pop-head { display: flex; align-items: center; gap: 10px; }
.pop-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(51,199,135,.16); box-shadow: inset 0 0 0 1px rgba(51,199,135,.4); flex: none; }
.pop-mark svg { width: 15px; height: 15px; fill: var(--green); }
.pop-name { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.pop-name b { font-size: 14.5px; font-weight: 700; }
.pop-name small { font-size: 11px; color: rgba(255,255,255,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 980px; font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); white-space: nowrap; color: rgba(255,255,255,.7); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); }
.pill.is-on { background: var(--green-soft); box-shadow: inset 0 0 0 1px rgba(51,199,135,.45); color: #eafff5; }
.pill.is-on i { background: var(--green); }
.pill.is-on.pulse i { animation: pulse 1.2s ease-in-out infinite; }
.pill.phase.is-wait { background: rgba(226,178,91,.15); box-shadow: inset 0 0 0 1px rgba(226,178,91,.45); color: #f5d9a0; }
.pill.phase.is-wait i { background: #e2b25b; animation: pulse 1.2s ease-in-out infinite; }
.pill.phase.is-on { color: var(--green); }
.pill.badge { --c: #888; background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent); color: #fff; }
.pill.badge i { background: var(--c); }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

.seg { display: flex; padding: 2px; margin-top: 12px; border-radius: 8px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.seg button { flex: 1; border: 0; background: none; height: 24px; border-radius: 6px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap; transition: background .2s, color .2s; }
.seg button[aria-selected="true"] { background: rgba(255,255,255,.26); color: #fff; }

.pop-tab { position: relative; margin-top: 10px; min-height: 486px; }
.pop-tab[hidden] { display: none; }
.watch { width: 100%; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-radius: 11px; background: rgba(255,255,255,.055); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); text-align: left; }
.watch:hover { background: rgba(255,255,255,.09); }
.watch > svg { width: 15px; height: 15px; fill: var(--green); color: var(--green); flex: none; }
.watch-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; color: rgba(255,255,255,.55); margin-right: auto; }
.watch-value { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.watch-value i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.watch .chev { width: 13px; height: 13px; color: rgba(255,255,255,.6); fill: none; transition: transform .25s var(--ease); }
.watch[aria-expanded="true"] .chev { transform: rotate(180deg); }
.watch-list { position: absolute; z-index: 5; top: 41px; left: 0; right: 0; padding: 5px; border-radius: 12px; background: #3a3b3f; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 18px 40px rgba(0,0,0,.5); animation: pop .22s var(--ease); }
.watch-list[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.watch-list button { width: 100%; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 9px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13px; }
.watch-list button:hover, .watch-list button:focus-visible { background: rgba(255,255,255,.1); }
.watch-list button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--green)); flex: none; }
.watch-list button b { font-weight: 600; }
.watch-list button small { margin-left: auto; font-size: 11px; color: rgba(255,255,255,.5); }
.watch-list button[aria-selected="true"]::after { content: "✓"; color: var(--green); font-weight: 700; margin-left: 8px; }
.watch-list button[aria-selected="true"] small { margin-left: auto; }

.live-card { margin-top: 9px; padding: 12px 13px 11px; border-radius: 13px; background: rgba(255,255,255,.055); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); color: var(--hc, #e87a4f); }
.live-top { display: flex; justify-content: space-between; align-items: center; }
.cap { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; color: rgba(255,255,255,.5); }
.cap.pad { margin: 13px 2px 7px; }
.live-card > .cap { margin-top: 11px; }
.model { font-size: 16px; font-weight: 700; color: #fff; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 11px; }
.big { font-size: 33px; font-weight: 700; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.big small { font-size: 12px; font-weight: 600; letter-spacing: 0; color: rgba(255,255,255,.5); margin-left: 5px; }
.big .approx { font-size: 20px; color: rgba(255,255,255,.55); margin-right: 3px; font-weight: 600; }
.spark { display: block; width: 100%; height: 50px; margin-top: 8px; overflow: visible; }
.live-foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 9px; }
.tiles div { padding: 8px 9px; border-radius: 11px; background: rgba(255,255,255,.055); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); min-width: 0; }
.tiles span { display: block; font-size: 10.5px; color: rgba(255,255,255,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tiles b small { font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,.5); margin-left: 2px; }
.recent { border-radius: 13px; background: rgba(255,255,255,.055); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid rgba(255,255,255,.07); }
.row:first-child { border-top: 0; }
.row.is-new { animation: rowIn .5s var(--ease); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-10px); } }
.row > i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, #888); flex: none; }
.row > div { min-width: 0; flex: 1; }
.row b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row small { display: block; font-size: 11px; color: rgba(255,255,255,.5); white-space: nowrap; }
.row .r { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.row .r b small { display: inline; margin-left: 3px; font-weight: 500; }
.row .bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); margin-top: 6px; overflow: hidden; }
.row .bar span { display: block; height: 100%; width: var(--w, 0%); background: var(--c); border-radius: 3px; transition: width .6s var(--ease); }
.switch-row { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px; border-radius: 11px; background: rgba(255,255,255,.055); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); margin-bottom: 7px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row i { width: 34px; height: 20px; border-radius: 20px; background: rgba(255,255,255,.2); position: relative; transition: background .25s; }
.switch-row i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch-row input:checked + i { background: var(--green); }
.switch-row input:checked + i::after { transform: translateX(14px); }
.switch-row input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }

.controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; margin-top: 26px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 980px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); color: #f5f5f7; font-size: 15px; transition: background .2s, box-shadow .2s, transform .2s var(--ease); }
.chip:hover { background: rgba(255,255,255,.14); }
.chip:active { transform: scale(.96); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip small { font-size: 12px; color: rgba(255,255,255,.55); }
.chip[aria-pressed="true"] { background: #f5f5f7; color: #1d1d1f; box-shadow: none; }
.chip[aria-pressed="true"] small { color: #6e6e73; }
.btn-run svg { width: 14px; height: 14px; fill: currentColor; }

.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 40px; margin-top: clamp(56px, 8vw, 96px); }
.note h3 { font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.note p { margin-top: 8px; color: var(--muted); font-size: 16px; line-height: 1.45; }

/* ── statement ── */
.statement { padding: clamp(110px, 16vw, 220px) 0; }
.scrolltext { font-size: clamp(28px, 4.6vw, 56px); line-height: 1.22; font-weight: 700; letter-spacing: -.028em; }
.scrolltext .w { color: #d2d2d7; transition: color .35s; }
.scrolltext .w.is-lit { color: #1d1d1f; }

/* ── products ── */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(36px, 5vw, 60px); }
.card { position: relative; border-radius: var(--radius); background: var(--card); overflow: hidden; display: flex; flex-direction: column; min-height: 470px; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0,0,0,.1); }
.card-wide { grid-column: 1 / -1; flex-direction: row; min-height: 520px; background: #0d0d0f; color: #f5f5f7; --muted: #a1a1a6; --link: #2997ff; }
.card-copy { padding: clamp(26px, 3.4vw, 44px); position: relative; z-index: 1; }
.card-wide .card-copy { flex: 1; align-self: center; }
.card h3 { font-size: clamp(28px, 3.3vw, 40px); line-height: 1.12; font-weight: 700; letter-spacing: -.03em; margin-top: 14px; }
.card p { font-size: 18px; line-height: 1.42; color: var(--muted); margin-top: 12px; max-width: 460px; }
.card-links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 20px; }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .01em; padding: 5px 11px; border-radius: 980px; background: rgba(0,0,0,.06); color: var(--muted); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.live { background: rgba(51,199,135,.16); color: #4be0a0; }
.tag.soon { background: rgba(255,159,10,.14); color: #b25e00; }
.card-art { margin-top: auto; position: relative; }
.card-art.shot { flex: 0 0 44%; align-self: stretch; margin: 0; overflow: hidden; }
.card-art.shot img { position: absolute; top: 44px; left: 8%; width: 82%; max-width: none; border-radius: 18px; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 30px 80px rgba(0,0,0,.7); transition: transform .9s var(--ease); }
.card-wide:hover .card-art.shot img { transform: translateY(-22px); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 0 clamp(26px, 3.4vw, 44px) clamp(26px, 3.4vw, 44px); }
.bars span { flex: 1; height: var(--h); border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #2ab4d9, #33c787); opacity: .88; transition: height 1s var(--ease); }
.js .card:not(.is-in) .bars span { height: 12%; }
.bars span:nth-child(2) { transition-delay: .06s; } .bars span:nth-child(3) { transition-delay: .12s; } .bars span:nth-child(4) { transition-delay: .18s; } .bars span:nth-child(5) { transition-delay: .24s; } .bars span:nth-child(6) { transition-delay: .3s; } .bars span:nth-child(7) { transition-delay: .36s; }
.card:hover .bars span:nth-child(odd) { height: calc(var(--h) + 12%); }
.card:hover .bars span:nth-child(even) { height: calc(var(--h) - 14%); }
.checks { display: grid; gap: 10px; padding: 0 clamp(26px, 3.4vw, 44px) clamp(26px, 3.4vw, 44px); }
.checks div { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; border-radius: 10px; background: var(--paper); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .card:not(.is-in) .checks div { opacity: 0; transform: translateX(-14px); }
.checks div:nth-child(2) { transition-delay: .1s; } .checks div:nth-child(3) { transition-delay: .2s; } .checks div:nth-child(4) { transition-delay: .3s; }
.checks i { width: 18px; height: 18px; border-radius: 50%; flex: none; position: relative; background: #33c787; }
.checks i.no { background: #ff9f0a; }
.checks i::after { content: ""; position: absolute; left: 6px; top: 3.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.checks i.no::after { left: 5px; top: 8px; width: 8px; height: 0; border-width: 0 0 2px 0; transform: none; }
.checks span { height: 8px; border-radius: 8px; background: rgba(0,0,0,.12); flex: 1; }
.checks div:nth-child(2) span { flex: .6; } .checks div:nth-child(3) span { flex: .8; } .checks div:nth-child(4) span { flex: .45; }

/* pointer spotlight */
.spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .4s; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--spot, rgba(51,199,135,.14)), transparent 65%); }
.spot:hover::before { opacity: 1; }

/* ── deep dive ── */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: clamp(50px, 7vw, 90px); text-align: center; }
.figures b { display: block; font-size: clamp(48px, 7vw, 88px); line-height: 1.05; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #fff, #9fe9c6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.figures span { display: block; margin-top: 6px; color: var(--muted); font-size: 16px; line-height: 1.35; }

.calc { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(26px, 5vw, 70px); align-items: center; margin-top: clamp(70px, 9vw, 120px); padding: clamp(26px, 4.4vw, 56px); border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.calc h3 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.14; font-weight: 700; letter-spacing: -.028em; }
.calc dl { margin: 22px 0 0; }
.calc dt { font-weight: 600; font-size: 17px; margin-top: 16px; }
.calc dd { margin: 3px 0 0; color: var(--muted); font-size: 16px; line-height: 1.45; }
.calc-panel label { display: block; margin-bottom: 18px; }
.calc-panel label > span { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.calc-panel output { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--green) var(--p, 50%), rgba(255,255,255,.18) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--green); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.45); transition: transform .2s var(--ease); }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.14); }
.calc-bar { display: flex; height: 16px; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.08); margin-top: 8px; }
.calc-bar span { height: 100%; transition: width .45s var(--ease); }
.calc-bar .w, .calc-legend i.w { background: #e2b25b; }
.calc-bar .s, .calc-legend i.s { background: var(--green); }
.calc-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.calc-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.calc-legend b, .calc-total b { color: #fff; font-variant-numeric: tabular-nums; }
.calc-total { margin-top: 18px; font-size: 19px; color: var(--muted); }
.calc-total b { font-size: 34px; letter-spacing: -.03em; margin-left: 6px; }

.deep .headline-2 { margin-top: clamp(80px, 11vw, 140px); }
.seg.light-seg, .seg.ink-seg { display: inline-flex; margin-top: 26px; padding: 4px; border-radius: 980px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg.light-seg::-webkit-scrollbar, .seg.ink-seg::-webkit-scrollbar { display: none; }
.seg.light-seg button, .seg.ink-seg button { flex: none; height: 36px; padding: 0 18px; border-radius: 980px; font-size: 14px; font-weight: 500; }
.seg.light-seg button[aria-selected="true"] { background: #f5f5f7; color: #1d1d1f; }
.seg.ink-seg { background: rgba(0,0,0,.05); box-shadow: none; }
.seg.ink-seg button { color: #1d1d1f; }
.seg.ink-seg button[aria-selected="true"] { background: #1d1d1f; color: #fff; }

.gallery { position: relative; width: min(1120px, 100% - 28px); margin: 38px auto 0; display: grid; align-items: center; }
.shot-pane { grid-area: 1 / 1; margin: 0; display: flex; flex-direction: column; align-items: center; opacity: 0; transform: scale(.97) translateY(14px); pointer-events: none; transition: opacity .55s var(--ease), transform .7s var(--ease); }
.shot-pane.is-on { opacity: 1; transform: none; pointer-events: auto; }
.shot-pane.tall img { width: min(380px, 84vw); border-radius: 20px; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 40px 110px rgba(0,0,0,.7), 0 0 120px rgba(51,199,135,.12); }
.shot-pane .frame { width: min(980px, 100%); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 40px 110px rgba(0,0,0,.7), 0 0 140px rgba(56,118,255,.14); background: #ececec; }
.shot-pane .frame .win-bar { background: #e2e2e4; height: 30px; }
.shot-pane figcaption { margin-top: 22px; max-width: 560px; text-align: center; color: var(--muted); font-size: 16px; }

/* ── harness grid ── */
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: clamp(34px, 5vw, 54px); }
.hchip { position: relative; display: flex; align-items: center; gap: 11px; padding: 15px 16px; border: 0; border-radius: 18px; background: var(--paper); text-align: left; font-size: 17px; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; transition: transform .4s var(--ease), opacity .4s, background .3s, box-shadow .3s; }
.hchip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.hchip small { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: #6e6e73; }
.hchip:hover, .hchip.is-sel { transform: translateY(-3px); background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 14px 34px rgba(0,0,0,.1); }
.hchip.is-sel { box-shadow: 0 0 0 2px var(--c), 0 14px 34px rgba(0,0,0,.1); }
.hchip.is-dim { opacity: .28; transform: scale(.97); }
.hdetail { margin: 22px auto 0; max-width: 760px; padding: 20px 24px; border-radius: 20px; background: var(--paper); text-align: center; min-height: 104px; }
.hdetail b { font-size: 19px; letter-spacing: -.015em; }
.hdetail p { margin-top: 6px; color: var(--muted); font-size: 16px; }
.hdetail code { font-family: var(--mono); font-size: .88em; background: rgba(0,0,0,.06); padding: 2px 6px; border-radius: 6px; }

/* ── privacy ── */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: clamp(40px, 6vw, 70px); }
.pcard { position: relative; overflow: hidden; padding: clamp(24px, 3.2vw, 38px); border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.pcard > * { position: relative; z-index: 1; }
.pcard svg { width: 34px; height: 34px; color: var(--green); }
.pcard h3 { font-size: 23px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; margin-top: 18px; }
.pcard p { color: var(--muted); margin-top: 8px; font-size: 17px; line-height: 1.45; }

/* ── built with ── */
.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.split .headline { font-size: clamp(30px, 3.9vw, 46px); }
.ledger { list-style: none; margin: 0; padding: 8px 0; border-radius: var(--radius); background: #fff; }
.ledger li { display: flex; align-items: baseline; gap: 18px; padding: 18px clamp(20px, 3vw, 32px); border-top: 1px solid rgba(0,0,0,.07); }
.ledger li:first-child { border-top: 0; }
.ledger b { flex: 0 0 96px; font-size: 38px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.ledger span { color: var(--muted); font-size: 16px; line-height: 1.4; }

/* ── other work ── */
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(36px, 5vw, 60px); }
.lcard { position: relative; overflow: hidden; padding: clamp(26px, 3.4vw, 44px); border-radius: var(--radius); background: var(--card); display: flex; flex-direction: column; align-items: flex-start; }
.lcard > * { position: relative; z-index: 1; }
.lcard h3 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.16; font-weight: 700; letter-spacing: -.025em; margin-top: 16px; }
.lcard p { color: var(--muted); margin: 12px 0 20px; font-size: 17px; line-height: 1.47; }
.lcard .link, .lcard .muted { margin-top: auto; }

/* ── download ── */
.download { overflow: hidden; text-align: center; }
.download .wrap { position: relative; }
.app-icon { width: 112px; height: 112px; margin: 0 auto 26px; filter: drop-shadow(0 18px 44px rgba(255,200,60,.22)); }
.dl-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }
.dl-pick { margin-top: 30px; font-size: 15px; color: var(--muted); }
.dl-files { list-style: none; margin: 14px auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 860px; }
.dl-files li { display: flex; flex-direction: column; gap: 6px; padding: 16px 14px; border-radius: 18px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.dl-files code { font-family: var(--mono); font-size: 13.5px; color: #f5f5f7; letter-spacing: 0; overflow-wrap: anywhere; }
.dl-files span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.download .fineprint { max-width: 640px; margin-inline: auto; }
.download .fineprint b { color: #f5f5f7; }

/* ── footer ── */
.footer { background: var(--paper); color: #6e6e73; font-size: 12px; line-height: 1.5; padding: 26px 0 34px; letter-spacing: 0; }
.foot-note { padding-bottom: 16px; border-bottom: 1px solid rgba(0,0,0,.1); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 16px; color: #424245; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-row a { text-decoration: none; }
.foot-row a:hover { text-decoration: underline; }

/* ── responsive ── */
@media (max-width: 960px) {
  .desk { grid-template-columns: 1fr; padding: 22px 14px 22px; gap: 18px; min-height: 0; }
  .popover { order: -1; width: min(380px, 100%); margin-inline: auto; }
  .pop-arrow { right: 50%; margin-right: -8px; }
  .term { margin-top: 0; }
  .term-body { height: 300px; }
  .mb-left span:nth-child(n+4) { display: none; }
  .notes { grid-template-columns: 1fr; }
  .calc, .split { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
}
@media (max-width: 900px) {
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0; margin: 0; padding: 8px 22px 22px; background: rgba(22,22,23,.97); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
  .nav-links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 24px; font-weight: 600; letter-spacing: -.02em; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); color: #f5f5f7; }
  .nav-toggle { display: block; }
  .nav-actions { margin-left: auto; }
  .bento, .lab-grid, .pgrid, .dl-files { grid-template-columns: 1fr; }
  .gallery { align-items: start; }
  .card-wide { flex-direction: column; }
  .card-art.shot { flex: none; height: 380px; }
  .card-art.shot img { top: 0; left: 50%; width: min(340px, 82%); transform: translateX(-50%); }
  .card-wide:hover .card-art.shot img { transform: translateX(-50%) translateY(-14px); }
  .card { min-height: 0; }
}
@media (max-width: 480px) {
  .wrap, .wrap.narrow, .nav-inner { width: calc(100% - 36px); }
  .brand-name { font-size: 14px; }
  .nav .btn-small { display: none; }
  .mb-left span:nth-child(n+3) { display: none; }
  .popover { padding: 12px; }
  .big { font-size: 30px; }
  .term-body { font-size: 12.5px; padding: 14px; height: 280px; }
  .hgrid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .hchip { padding: 13px 12px; font-size: 15px; gap: 9px; }
  .hchip small { display: none; }
  .ledger b { flex-basis: 76px; font-size: 30px; }
  .btn-large { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .rise { opacity: 1; transform: none; animation: none; transition: none; }
  .bars span, .checks div { transition: none; }
  .pill i, .t-cursor.is-on { animation: none !important; }
  .scrolltext .w { color: #1d1d1f; }
}
