/* The homepage (index.html, home.js), on top of styles.css. Tokens only, no serif, nothing under 14px, targets of 44px,
   one accent. The product is drawn in HTML ("stages"), not shown as dark screenshots: crisp at any size, live, and
   operable from the keyboard. Every number in a stage is sample data. */

main#content { padding-top: var(--nav-h); }
.hm-in { max-width: 1180px; margin: 0 auto; }
.hm-in.narrow { max-width: 780px; }
.hm-in.center { text-align: center; display: grid; justify-items: center; }
.hm h2 { margin: 0 0 20px; max-width: 22ch; }
.hm-in.center h2 { max-width: 24ch; }
.hm.band { background: var(--band); }
.hm-sub { margin: -6px 0 40px; max-width: 58ch; color: var(--muted); font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); }
.kicker { margin: 0 0 10px; font: 600 var(--fs-fine)/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--brass); }
.center-k { text-align: center; }
.more { display: inline-flex; align-items: center; min-height: 44px; color: var(--brass); font-weight: 600; font-size: var(--fs-small); text-underline-offset: 3px; }
.more:hover { text-decoration: underline; }
.fine a, .hm a:not(.button):not(.more) { color: var(--brass); text-underline-offset: 3px; }
main .fine a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- 0. Announcement ---------- */
.announce { background: var(--brass-fill); color: var(--on-brass); text-align: center; }
.announce a { display: block; min-height: 44px; padding: 10px var(--gutter); line-height: 24px; color: inherit; text-decoration: none; font-size: var(--fs-small); font-weight: 500; }
.announce a:hover { text-decoration: underline; }
.announce a:focus-visible { outline-color: var(--on-brass); outline-offset: -4px; }

/* ---------- 1. Hero ---------- */
.hero { position: relative; padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(48px, 6vw, 96px); overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 90%; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 20% 40%, rgb(110 150 255 / .18), transparent 70%), radial-gradient(35% 45% at 80% 30%, rgb(255 170 120 / .18), transparent 70%),
    radial-gradient(40% 50% at 50% 80%, rgb(180 150 255 / .16), transparent 70%); }
.hero-copy { text-align: center; display: grid; justify-items: center; }
.hero-copy h1 { max-width: 20ch; margin: 0 0 20px; font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.25rem); line-height: 1.04; letter-spacing: -0.035em; }
.hero-sub { max-width: 46ch; margin: 0 0 28px; font-size: clamp(1.0625rem, 1rem + .5vw, 1.3125rem); line-height: 1.5; color: var(--muted); }
.hero-copy .ctas { justify-content: center; }
.hero-micro { margin-top: 16px; max-width: 64ch; }
.hero-micro s { color: var(--muted); }

.pill { margin: 0 0 22px; }
.pill a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 16px 6px 6px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); text-decoration: none; font-size: var(--fs-small); box-shadow: var(--shadow-soft); }
.pill a:hover { border-color: var(--brass); }
.pill-tag { padding: 5px 11px; border-radius: var(--r-pill); background: var(--brass-fill); color: var(--on-brass); font-weight: 600; font-size: var(--fs-fine); white-space: nowrap; }
.pill b { color: var(--brass); }

.hero-stage-wrap { margin-top: clamp(36px, 5vw, 64px); }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px; margin-top: 20px; }
.stage-bar .fine { margin: 0; }
.stage-bar kbd { font-size: var(--fs-fine); }

/* Segmented buttons and plain demo buttons. */
.seg { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
.stage-bar .seg { margin: 0; }
.seg button, .seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 var(--fs-small)/1 var(--sans); cursor: pointer; transition: background-color .15s, border-color .15s; }
.seg button:hover, .seg-btn:hover { border-color: var(--brass); }
.seg button[aria-pressed="true"] { background: rgb(var(--accent-rgb) / .16); border-color: var(--brass); color: var(--brass); font-weight: 600; }
.seg kbd { min-height: 0; padding: 3px 6px; font-size: var(--fs-fine); }
.sw-type input { min-height: 44px; width: 13em; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 var(--fs-small) var(--sans); }
.sw-type input::placeholder { color: var(--muted); opacity: 1; }
.demo-status { min-height: 1.5em; margin: 10px 0 0; text-align: center; }

/* ---------- Stages: the product, drawn ---------- */
/* .stage keeps the shape; .stage-in is laid out at a design width (--W, never narrower than the stage's minimum) and
   scaled down to fit (--k) on small screens, the way a screenshot would be. Without JavaScript it is simply 100%. */
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; isolation: isolate; user-select: none; -webkit-user-select: none;
  border: 1px solid rgb(var(--fg-rgb) / .12); box-shadow: var(--shadow-window); background: #b9c6f5; color: #fff; --sprite: url(/img/home/icons-hd.png); }
.stage.hero-stage { aspect-ratio: 1360 / 760; border-radius: 26px; box-shadow: 0 2px 6px rgb(20 20 40 / .1), 0 50px 100px -40px rgb(40 40 90 / .5); }
.stage.mini { aspect-ratio: 760 / 470; }
.stage.mini.short { aspect-ratio: 760 / 300; }
.stage-in { position: absolute; left: 0; top: 0; width: var(--W, 100%); height: var(--H, 100%); transform: scale(var(--k, 1)); transform-origin: 0 0; container-type: size; container-name: stage;
  font-family: var(--sans); --size: clamp(40px, 4.6cqw, 64px); --gap: calc(var(--size) * .14); }
.stage.mini .stage-in { --size: clamp(44px, 7.4cqw, 60px); }
.stage-fallback { position: absolute; left: 4%; bottom: 4%; width: 92%; height: auto; }

/* A bright Tahoe-style wallpaper. Each profile tints it. */
.wall { position: absolute; inset: 0; z-index: -1; transition: filter .6s var(--ease);
  background: radial-gradient(70% 90% at 0% 0%, #7ea2ff 0%, transparent 60%), radial-gradient(60% 80% at 100% 10%, #ffb48f 0%, transparent 60%),
    radial-gradient(80% 70% at 30% 110%, #9a7dff 0%, transparent 65%), radial-gradient(60% 60% at 90% 100%, #ff8fb1 0%, transparent 60%), linear-gradient(160deg, #a8bfff, #cbb8ff 55%, #ffc9b0); }
.wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 120%, rgb(40 30 90 / .28), transparent 60%); }
[data-profile="studio"] > .stage-in > .wall, .stage[data-profile="studio"] .wall { filter: hue-rotate(-50deg) saturate(1.15); }
[data-profile="ship"] > .stage-in > .wall, .stage[data-profile="ship"] .wall { filter: hue-rotate(95deg) saturate(.95) brightness(.92); }

.topbar { position: absolute; left: 0; right: 0; top: 0; height: 32px; display: flex; align-items: center; gap: 22px; padding: 0 18px;
  background: rgb(255 255 255 / .22); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: #1d1d29; font: 500 14px/1 var(--sans); }
.topbar b { font-weight: 700; }
.topbar .tb-right { margin-left: auto; font-variant-numeric: tabular-nums; }
.pf-now { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pf-now img { border-radius: 5px; }

/* Windows (terminal) */
.win { position: absolute; border-radius: 14px; overflow: hidden; background: rgb(24 24 32 / .9); box-shadow: 0 1px 0 rgb(255 255 255 / .12) inset, 0 30px 60px -20px rgb(20 10 60 / .55), 0 0 0 1px rgb(0 0 0 / .25); }
.win-bar { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; background: rgb(255 255 255 / .06); color: rgb(255 255 255 / .7); font: 600 14px/1 var(--sans); }
.win-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; flex: none; }
.win-bar i:nth-child(2) { background: #febc2e; } .win-bar i:nth-child(3) { background: #28c840; }
.win-bar span { margin-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-body { margin: 0; padding: 16px 20px; color: #e8e8f0; font: 500 15px/1.75 var(--mono); white-space: pre-wrap; }
.term-body b { color: #fff; }
.t-dim { color: #9a9ab0; } .t-ok { color: #6ee7a8; } .t-acc { color: #ff9a6b; } .t-you { color: #9ec1ff; }
.caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -.2em; background: #e8e8f0; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-stage .term { left: 6%; top: 13%; width: 46%; min-width: 440px; z-index: 2; }
.win.browser { right: 6%; top: 19%; width: 40%; height: 46%; background: #fbfbfd; z-index: 1; }
.win.browser .win-bar { background: #ececf2; color: #3a3a48; }
.browser-body { display: grid; gap: 12px; padding: 22px 26px; }
.browser-body .bb-h { height: 22px; width: 55%; border-radius: 6px; background: #2b2b38; }
.browser-body .bb-hero { height: 90px; border-radius: 12px; background: linear-gradient(120deg, #7ea2ff, #c39bff 60%, #ffb48f); }
.browser-body span { height: 10px; border-radius: 5px; background: #dedee8; } .browser-body span.short { width: 62%; }
@container stage (width < 1000px) { .win.browser { display: none; } }
@container stage (width < 900px) { .hero-stage .term { left: 4%; width: 70%; } .hero-stage .term-body { font-size: 14px; } }

/* Notification and profile HUD */
.toast { position: absolute; top: 48px; right: 18px; width: 340px; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; z-index: 6;
  background: rgb(30 30 44 / .72); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); border: 1px solid rgb(255 255 255 / .2);
  box-shadow: 0 20px 40px -16px rgb(10 0 40 / .5); opacity: 0; transform: translateX(30px); pointer-events: none; }
.toast.on { animation: toast 5s var(--ease) forwards; }
@keyframes toast { 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(30px); } }
.toast img { border-radius: 9px; flex: none; }
.toast span { font: 600 14px/1.2 var(--sans); color: rgb(255 255 255 / .75); }
.toast b { display: block; font: 600 16px/1.3 var(--sans); }
.toast p { margin: 1px 0 0; font: 14px/1.35 var(--sans); color: rgb(255 255 255 / .9); }
.hud { position: absolute; left: 50%; top: 40%; display: grid; justify-items: center; gap: 6px; padding: 20px 34px; border-radius: 22px; z-index: 7; opacity: 0; translate: -50% -50%;
  background: rgb(26 26 40 / .7); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgb(255 255 255 / .22); pointer-events: none; }
.hud.on { animation: hud 1.3s var(--ease) forwards; }
@keyframes hud { 0% { opacity: 0; scale: .9; } 15%, 70% { opacity: 1; scale: 1; } 100% { opacity: 0; } }
.hud b { font: 700 30px/1 var(--sans); }
.hud span { font: 600 15px var(--mono); color: #f6d9a3; letter-spacing: .08em; }

/* ---------- The dock ---------- */
.dock-at { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; z-index: 4; max-width: calc(100% - 24px); transition: opacity .3s, translate .3s var(--ease); }
.dock { display: flex; align-items: flex-end; gap: var(--gap); padding: calc(var(--size) * .16) calc(var(--size) * .2); border-radius: calc(var(--size) * .42);
  background: rgb(26 28 44 / .42); backdrop-filter: blur(28px) saturate(1.7); -webkit-backdrop-filter: blur(28px) saturate(1.7);
  border: 1px solid rgb(255 255 255 / .38); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 20px 50px -20px rgb(20 10 60 / .55); }
.dock.vertical { flex-direction: column; align-items: flex-start; }
[data-theme="islands"] .dock { background: none; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; gap: calc(var(--size) * .28); }
[data-theme="islands"] .pod { display: flex; align-items: flex-end; gap: var(--gap); padding: calc(var(--size) * .16) calc(var(--size) * .2); border-radius: calc(var(--size) * .42);
  background: rgb(26 28 44 / .42); backdrop-filter: blur(28px) saturate(1.7); -webkit-backdrop-filter: blur(28px) saturate(1.7); border: 1px solid rgb(255 255 255 / .38); }
[data-theme="neon"] .dock { background: rgb(60 20 120 / .45); border-color: rgb(210 180 255 / .5); box-shadow: 0 0 46px -6px rgb(150 90 255 / .7), inset 0 1px 0 rgb(255 255 255 / .25); }

.t { position: relative; flex: none; width: var(--size); height: var(--size); --s: 1; transform: scale(var(--s)); transform-origin: 50% 100%;
  transition: transform .18s var(--ease), margin .18s var(--ease); }
.dock.tracking .t { transition: none; }
.dock.vertical .t { transform-origin: 0 50%; }
.t.app { background-image: var(--sprite); background-repeat: no-repeat; background-size: calc(var(--size) * 18) var(--size); background-position: calc(var(--size) * var(--n) * -1) 0;
  filter: drop-shadow(0 4px 6px rgb(10 0 40 / .3)); }
.t.app.dim { opacity: .45; }
.badge { position: absolute; top: -6%; right: -6%; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: #ff453a; color: #fff; font: 700 14px/24px var(--sans); text-align: center; box-shadow: 0 2px 6px rgb(0 0 0 / .35); }
.run { position: absolute; bottom: calc(var(--size) * -.15); left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: rgb(255 255 255 / .92); }
.dock.vertical .run { left: calc(var(--size) * -.14); bottom: 50%; margin: 0 0 -2.5px; }
.d-div { flex: none; width: 1px; align-self: stretch; margin: 6px 2px; background: rgb(255 255 255 / .4); }
.dock.vertical .d-div { width: auto; height: 1px; margin: 2px 6px; align-self: stretch; }
.t.bounce { animation: bounce 1s cubic-bezier(.3, .6, .4, 1); }
@keyframes bounce { 0%, 100% { translate: 0 0; } 25% { translate: 0 -40%; } 50% { translate: 0 0; } 70% { translate: 0 -16%; } }
.t.ping::after { content: attr(data-plus); position: absolute; right: 8px; top: -6px; font: 700 14px var(--sans); color: #b7ffd6; animation: ping 1.4s ease-out forwards; text-shadow: 0 1px 4px rgb(0 0 0 / .5); }
@keyframes ping { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -22px; } }

/* Widgets in a dock (white text on dark glass: at least 4.5:1 over any part of the wallpaper) */
.t.w { width: calc(var(--size) * 2.3); border-radius: calc(var(--size) * .26); background: rgb(14 14 30 / .38); border: 1px solid rgb(255 255 255 / .2); color: #fff;
  display: grid; align-content: center; justify-items: center; gap: 2px; padding: 0 10px; transform-origin: 50% 100%; overflow: hidden; text-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.t.w.wide { width: calc(var(--size) * 4.3); justify-items: start; }
.t.w.mid { width: calc(var(--size) * 3); justify-items: start; }
.t.w b { font: 600 calc(var(--size) * .32)/1.1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.t.w .sub { font: 500 14px/1.15 var(--sans); color: rgb(255 255 255 / .86); white-space: nowrap; }
.t.w .sub.up { color: #8ff0bd; }
.t.w .lab { font: 700 14px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: rgb(255 255 255 / .78); }
.row { display: flex; align-items: center; gap: 8px; max-width: 100%; font: 14px/1.25 var(--sans); white-space: nowrap; overflow: hidden; }
.row b { font-size: 15px; } .row span { color: rgb(255 255 255 / .8); overflow: hidden; text-overflow: ellipsis; }
.row.waiting span { color: #ffd479; font-weight: 600; }
.spin { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px solid #ff9a6b; border-right-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.dia { width: 10px; height: 10px; flex: none; background: #8fb4ff; rotate: 45deg; border-radius: 2px; }
.waiting .dia { background: #ffd479; }
.t.w.music { grid-template-columns: auto minmax(0, 1fr); justify-items: start; column-gap: 10px; }
.art { width: calc(var(--size) * .66); height: calc(var(--size) * .66); border-radius: 8px; background: linear-gradient(135deg, #ff7aa8, #ffb36b 60%, #7a6bff); grid-row: span 2; }
.prog { display: block; width: 100%; height: 4px; border-radius: 2px; background: rgb(255 255 255 / .25); overflow: hidden; }
.prog i { display: block; height: 100%; width: var(--p, 30%); background: #fff; border-radius: 2px; }
.t.w.ok b { color: #9ff3c4; }

/* Hover label */
.tip { position: absolute; z-index: 9; padding: 5px 11px; border-radius: 8px; background: rgb(20 22 36 / .9); color: #fff; font: 500 14px var(--sans); white-space: nowrap;
  translate: -50% -100%; opacity: 0; transition: opacity .12s; pointer-events: none; border: 1px solid rgb(255 255 255 / .14); }
.tip.on { opacity: 1; }
.preview.on ~ .tip, .stage:has(.preview.on) .tip { opacity: 0; }
.tip[data-side="right"] { translate: 0 -50%; }

/* Window previews */
.preview { position: absolute; z-index: 8; display: flex; gap: 12px; padding: 12px; border-radius: 20px; translate: -50% 0;
  background: rgb(28 28 44 / .66); backdrop-filter: blur(28px) saturate(1.6); -webkit-backdrop-filter: blur(28px) saturate(1.6); border: 1px solid rgb(255 255 255 / .25);
  box-shadow: 0 26px 50px -18px rgb(10 0 40 / .6); opacity: 0; scale: .96; transform-origin: 50% 100%; transition: opacity .18s, scale .18s var(--ease); pointer-events: none; }
.preview.on { opacity: 1; scale: 1; pointer-events: auto; }
.pv-card { display: grid; gap: 8px; width: 200px; padding: 6px; border-radius: 12px; border: 2px solid transparent; background: none; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.pv-card.is-front { border-color: rgb(255 255 255 / .75); background: rgb(255 255 255 / .1); }
.pv-card b { font: 600 14px/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-win { height: 124px; border-radius: 8px; overflow: hidden; background: #fbfbfd; box-shadow: 0 6px 14px -6px rgb(0 0 0 / .4); }
.pv-bar { display: flex; gap: 5px; height: 18px; align-items: center; padding: 0 8px; background: #ececf2; }
.pv-bar i { width: 7px; height: 7px; border-radius: 50%; background: #ff5f57; } .pv-bar i:nth-child(2) { background: #febc2e; } .pv-bar i:nth-child(3) { background: #28c840; }
.pv-page { display: grid; gap: 6px; padding: 10px; }
.pv-page span { height: 7px; border-radius: 4px; background: #dcdce6; } .pv-page span.short { width: 60%; }
.pv-page .pv-hero { height: 34px; background: linear-gradient(120deg, #7ea2ff, #c39bff); }
.pv-page .pv-grid { height: 40px; background: repeating-linear-gradient(90deg, #ffd8c2 0 30%, transparent 30% 35%); }
.pv-page.dark { background: #1d1d28; height: 100%; } .pv-page.dark span { background: #3a3a50; }
.pv-page.term span { background: #3a3a50; } .pv-page.term { background: #15151c; height: 100%; }
.pv-page.note { background: #fff8d6; height: 100%; } .pv-page.note span { background: #e8dca0; }
.pv-actions { display: flex; gap: 6px; }
.pv-actions span { padding: 3px 8px; border-radius: 6px; background: rgb(255 255 255 / .14); font: 500 14px var(--sans); }

/* ---------- Feature demos ---------- */
#features h2 { margin-bottom: 14px; }
.feature { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(24px, 5vw, 72px); align-items: center; padding: clamp(36px, 5vw, 64px) 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
.feature.flip .feature-copy { order: 2; }
.feature-copy { min-width: 0; }
.feature-copy h3 { margin: 12px 0 10px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; }
.feature-copy p { margin: 0 0 14px; color: var(--muted); max-width: 44ch; }
.feature-copy p.chip { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border-radius: var(--r-pill); font: 600 var(--fs-fine)/1.2 var(--sans); letter-spacing: .01em; }
.feature-copy p.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.feature-copy .fine { margin: -4px 0 8px; }
.feature-copy kbd, .egrid kbd, .ticks kbd { white-space: nowrap; }
.feature-demo { min-width: 0; }
.ticks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 6px; height: 11px; border: solid var(--brass); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cmd-chip { display: flex; align-items: center; gap: 4px; max-width: 100%; margin: 4px 0 8px; padding: 4px 4px 4px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); }
.cmd-chip code { font: 500 var(--fs-fine)/1.4 var(--mono); min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.cmd-copy { flex: none; min-height: 44px; min-width: 64px; padding: 0 14px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--brass); font: 600 var(--fs-small) var(--sans); cursor: pointer; }
.cmd-copy:hover { background: rgb(var(--fg-rgb) / .08); }

/* Docks on any edge: two displays */
.screens { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4%; padding: 6% 5%; }
.screen-a, .screen-b { position: relative; border-radius: 12px; overflow: hidden; border: 8px solid #17171f; background: rgb(255 255 255 / .1); box-shadow: 0 30px 50px -24px rgb(20 10 60 / .6); }
.screen-a { width: 64%; aspect-ratio: 16 / 10; --size: 34px; }
.screen-b { width: 30%; aspect-ratio: 16 / 10; --size: 22px; align-self: flex-end; margin-bottom: 4%; }
.screen-a::before, .screen-b::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(70% 90% at 0% 0%, #7ea2ff, transparent 60%), radial-gradient(60% 80% at 100% 10%, #ffb48f, transparent 60%), linear-gradient(160deg, #a8bfff, #cbb8ff 55%, #ffc9b0); }
.screen-name { position: absolute; right: 10px; top: 8px; font: 600 14px var(--sans); color: #1d1d29; }
.screens .dock-at { bottom: 8px; transition: left .45s var(--ease), top .45s var(--ease), bottom .45s var(--ease), right .45s var(--ease), translate .45s var(--ease); }
.screens .dock { padding: 5px 6px; border-radius: 12px; }
.screens .t.w { width: calc(var(--size) * 2.4); }
.screens .t.w b { font-size: 15px; } .screens .t.w .sub { display: none; }
.screens [data-edge="left"] .dock-at { left: 8px; bottom: 50%; translate: 0 50%; }
.screens [data-edge="right"] .dock-at { left: calc(100% - 8px); bottom: 50%; translate: -100% 50%; }
.screens [data-edge="top"] .dock-at { bottom: calc(100% - 8px); translate: -50% 100%; }
.screens [data-edge="left"] .t.w, .screens [data-edge="right"] .t.w { width: var(--size); height: calc(var(--size) * 1.4); padding: 0; }
.screens [data-edge="left"] .t.w b, .screens [data-edge="right"] .t.w b { font-size: 14px; }

/* Widget gallery */
.wgrid { position: absolute; inset: 5%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 14px; }
@container stage (width < 640px) { .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: 10px; } .wcard b.big { font-size: 28px; } .wcard { padding: 10px 12px; } }
.wcard { display: grid; align-content: center; gap: 4px; padding: 12px 16px; border-radius: 18px; background: rgb(20 18 40 / .6); border: 1px solid rgb(255 255 255 / .28);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); box-shadow: 0 16px 30px -18px rgb(10 0 40 / .55); min-width: 0; overflow: hidden; }
.wcard.span2 { grid-column: span 2; }
.wk { font: 700 14px/1 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: rgb(255 255 255 / .9); }
.wcard b { font: 600 18px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard b.big { font: 650 clamp(26px, 4.6cqw, 34px)/1.05 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ws { font: 500 14px/1.3 var(--sans); color: rgb(255 255 255 / .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard.music { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 14px; }
.wcard.music .art { width: 52px; height: 52px; border-radius: 10px; grid-row: auto; }
.wcard.music b { font-size: 16px; }
.mm { display: grid; gap: 4px; min-width: 0; }
.ctl { font: 16px/1 var(--sans); letter-spacing: 2px; white-space: nowrap; }
.meter { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); align-items: center; gap: 8px; font: 600 14px var(--sans); }
.meter i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #fff var(--v), rgb(255 255 255 / .22) var(--v)); }
.arow { display: flex; align-items: center; gap: 8px; font: 14px/1.4 var(--sans); white-space: nowrap; overflow: hidden; }
.arow b { font-size: 15px; } .arow span { color: rgb(255 255 255 / .85); overflow: hidden; text-overflow: ellipsis; }
.arow.wait span { color: #ffd479; font-weight: 600; }
.spark { width: 100%; height: 22px; } .spark polyline { fill: none; stroke: #8ff0bd; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.wcard.ci b { color: #9ff3c4; }

/* Full dock: pinned apps, then a strip of open apps that scrolls */
.strip-dock { align-items: center; max-width: calc(100cqw - 24px); }
.pinned { display: flex; gap: var(--gap); flex: none; }
.strip { display: flex; gap: var(--gap); overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; min-width: 0; padding: 14px 2px 10px; margin: -14px 0 -10px;
  mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.strip::-webkit-scrollbar { display: none; }
.strip > [role="listitem"] { flex: none; }
.strip button.t { border: 0; padding: 0; cursor: pointer; background-color: transparent; border-radius: 22%; }
.strip button.t:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.chev { flex: none; width: 30px; min-height: 44px; align-self: stretch; border: 0; border-radius: 10px; background: rgb(255 255 255 / .16); color: #fff; font: 600 26px/1 var(--sans); cursor: pointer; }
.chev:hover { background: rgb(255 255 255 / .3); }
.chev:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.chev[disabled] { opacity: .35; cursor: default; }
.t.gone { animation: gone .35s var(--ease) forwards; }
@keyframes gone { to { opacity: 0; scale: .2; } }
.menu { position: absolute; z-index: 9; display: grid; min-width: 220px; padding: 6px; border-radius: 12px; translate: -50% -100%;
  background: rgb(36 36 52 / .86); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgb(255 255 255 / .22); box-shadow: 0 20px 40px -14px rgb(0 0 0 / .6); }
.menu[hidden] { display: none; }
.menu-h { padding: 8px 12px 6px; font: 700 14px var(--sans); color: rgb(255 255 255 / .75); }
.menu button { min-height: 44px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: #fff; font: 500 16px var(--sans); text-align: left; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: #2f6fec; }
/* Inset, so the ring of one row never covers its neighbours. */
.menu button:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

/* Hover previews demo: the app tiles are buttons */
#demo-hover .dock button.t, #demo-hover .dock .t { border: 0; padding: 0; background-color: transparent; cursor: pointer; }
#demo-hover .dock button.t:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 22%; }
#demo-hover .preview { bottom: calc(var(--size) * 1.7 + 28px); }

/* Window switcher */
.switcher { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 92%; display: grid; gap: 14px; padding: 18px; border-radius: 26px;
  background: rgb(28 28 44 / .74); backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6); border: 1px solid rgb(255 255 255 / .28); box-shadow: 0 30px 60px -20px rgb(10 0 40 / .6); }
.sw-filter { display: flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 10px; background: rgb(255 255 255 / .12); font: 500 16px var(--sans); color: #fff; }
.sw-filter .sw-q:empty::before { content: "Type to filter"; color: rgb(255 255 255 / .7); }
.sw-filter .caret { height: 1em; background: #fff; }
.sw-row { display: flex; gap: 12px; min-height: 188px; }
.sw-card { flex: 1 1 0; min-width: 0; max-width: 180px; display: grid; gap: 8px; padding: 8px; border-radius: 14px; border: 2px solid transparent; transition: background-color .15s, border-color .15s; }
.sw-card.on { border-color: rgb(255 255 255 / .9); background: rgb(255 255 255 / .08); }
.sw-card .pv-win { height: 108px; }
.sw-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sw-meta .ico { flex: none; width: 28px; height: 28px; background-image: var(--sprite); background-size: calc(28px * 18) 28px; background-position: calc(28px * var(--n) * -1) 0; }
.sw-meta b { font: 600 14px/1.25 var(--sans); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sw-meta { align-items: flex-start; }
.sw-none { margin: auto; font: 500 16px var(--sans); color: rgb(255 255 255 / .85); }

/* Agent demo */
.agent-term { right: 4%; top: 7%; width: 66%; bottom: 7%; }
.agent-term { display: flex; flex-direction: column; }
.agent-term .term-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 14px; line-height: 1.7; }
@container stage (width < 760px) { .pv-card { width: 172px; } }
@container stage (width < 640px) { .agent-term { width: 70%; right: 3%; } .pv-card { width: 136px; } .preview .pv-win { height: 84px; } .preview { gap: 8px; padding: 8px; } }
.dock-at.side { left: 12px; bottom: 50%; translate: 0 50%; }
.dock.vertical .t.w { width: calc(var(--size) * 2.9); height: calc(var(--size) * 1.1); justify-items: start; }
.dock .t.enter { animation: enter .5s cubic-bezier(.2, .9, .3, 1.25) backwards; }
@keyframes enter { from { opacity: 0; scale: .3; } }

/* Profiles: the dock leaves and comes back */
.dock.out { animation: out .22s ease-in forwards; }
.dock.in > * { animation: enter .5s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.dock.in > :nth-child(2) { animation-delay: .03s; } .dock.in > :nth-child(3) { animation-delay: .06s; } .dock.in > :nth-child(4) { animation-delay: .09s; }
.dock.in > :nth-child(n+5) { animation-delay: .13s; }
@keyframes out { to { opacity: 0; translate: 0 14px; scale: .96; } }

/* Hidden at narrow design widths, so a dock always fits its screen */
@container stage (width < 1280px) { .hero-stage .t[data-opt="1"] { display: none; } }
@container stage (width < 1000px) { .hero-stage .t[data-opt="2"] { display: none; } .hero-stage .toast { width: 300px; } }
@container stage (width < 600px) { .stage .t[data-opt="3"] { display: none; } }

/* Paused: nothing moves on its own; pointer and keys still work */
html[data-demos-paused] .spin, html[data-demos-paused] .caret { animation: none; }
html[data-demos-paused] .toast { display: none; }

/* ---------- 2. Trust ---------- */
.trust { padding: 0 var(--gutter); border-block: 1px solid var(--line); background: var(--bg); }
.trust ul { list-style: none; margin: 0 auto; padding: 14px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; }
.trust li { display: inline-flex; align-items: center; min-height: 32px; font-size: var(--fs-small); font-weight: 500; color: var(--muted); }
.trust li::before { content: ""; width: 6px; height: 6px; margin-right: 10px; border-radius: 50%; background: var(--brass-fill); flex: none; }

/* ---------- 4. Comparison ---------- */
.cmp-scroll { overflow-x: auto; border-radius: var(--r-md); }
.cmp-scroll:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.cmp, .specs { width: 100%; border-collapse: collapse; font-size: var(--fs-small); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.specs { table-layout: fixed; }
.home-cmp { min-width: 720px; }
.cmp th, .cmp td, .specs th, .specs td { text-align: left; vertical-align: middle; padding: 14px 16px; border-bottom: 1px solid var(--line); overflow-wrap: break-word; }
.cmp thead th, .specs thead th { font: 600 var(--fs-fine)/1.2 var(--sans); color: var(--muted); background: var(--surface-2); }
.specs thead th { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.cmp tbody th, .specs tbody th { font-weight: 600; color: var(--text); }
.home-cmp tbody th { width: 30%; }
.home-cmp td { text-align: center; color: var(--muted); white-space: nowrap; }
.home-cmp thead th:not(:first-child) { text-align: center; }
.home-cmp .is-moor { background: rgb(var(--accent-rgb) / .09); color: var(--text); font-weight: 600; }
.home-cmp thead .is-moor { color: var(--brass); font-size: var(--fs-small); }
.home-cmp td::before { display: inline-block; width: 1.4em; font-weight: 700; }
.home-cmp td[data-v="yes"]::before { content: "✓"; color: var(--signal); }
.home-cmp td[data-v="partial"]::before { content: "◐"; color: var(--warn); }
.home-cmp td[data-v="no"]::before { content: "✕"; color: var(--err); }
.home-cmp td[data-v="unknown"]::before { content: "?"; color: var(--muted); }
.home-cmp td[data-v="yes"]::after { content: "Yes"; } .home-cmp td[data-v="partial"]::after { content: "Partly"; }
.home-cmp td[data-v="no"]::after { content: "No"; } .home-cmp td[data-v="unknown"]::after { content: "Not stated"; }
.cmp tbody tr:last-child > *, .specs tbody tr:last-child > * { border-bottom: 0; }
.specs tbody th { width: 34%; }
.specs td { color: var(--muted); }
.cmp-legend { margin-top: 16px; max-width: 80ch; }
.hm table + .fine { margin-top: 16px; }

/* ---------- 5. Everything else ---------- */
.egrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.egrid li { padding: 22px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.egrid h3 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: var(--fs-h4); }
.egrid p { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.egrid code { font-size: var(--fs-fine); }

/* ---------- 6. Shortcuts ---------- */
.kgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.keys-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); font-size: var(--fs-small); }
.keys-table caption { background: var(--band); }
.keys-table caption { text-align: left; padding: 0 0 10px; font: 600 var(--fs-fine)/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.keys-table th, .keys-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.keys-table td { text-align: right; white-space: nowrap; }
.keys-table tr:last-child > * { border-bottom: 0; }

/* ---------- 7. Builders ---------- */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.split h2 { max-width: 14ch; }
.list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.list li { padding-left: 24px; position: relative; color: var(--muted); }
.list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 9px; border-radius: 3px; background: var(--brass-fill); transform: rotate(45deg); }
.list b { color: var(--text); }

/* ---------- 8. Safety ---------- */
.steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); counter-reset: step; }
.steps li { position: relative; padding: 56px 0 0; display: grid; gap: 4px; align-content: start; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--brass); color: var(--brass); font: 600 var(--fs-body)/1 var(--mono); }
.steps b { font: 600 var(--fs-h4)/1.35 var(--sans); }
.steps span { color: var(--muted); }

/* ---------- 10. Maker ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); margin: 0 0 8px; }
.stats > div { padding: 24px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.stats dt { font: 600 var(--fs-fine)/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 0; }
.stats dd b { font: 700 clamp(1.75rem, 1.2rem + 2vw, 2.5rem)/1.1 var(--sans); letter-spacing: -0.02em; }

/* ---------- 11. Pricing ---------- */
#pricing .hm-in { display: grid; justify-items: center; text-align: center; }
#pricing h2 { max-width: none; margin-bottom: 32px; }
.plan { width: 100%; max-width: 500px; text-align: left; padding: clamp(24px, 4vw, 40px); border-radius: 28px; background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-window); display: grid; gap: 14px; justify-items: start; position: relative; }
.plan::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: linear-gradient(135deg, rgb(110 150 255 / .5), rgb(255 170 120 / .5), rgb(180 150 255 / .5)); filter: blur(24px); opacity: .45; }
.plan-top { display: flex; align-items: center; gap: 14px; }
.plan-top img { border-radius: 14px; }
.plan-top .fine { margin: 2px 0 0; }
.plan h3 { margin: 0; font-size: var(--fs-h3); }
.plan > div { display: grid; gap: 10px; width: 100%; }
.offer-tag { justify-self: start; margin: 0; padding: 5px 12px; border-radius: var(--r-pill); background: var(--brass-fill); color: var(--on-brass); font-weight: 600; font-size: var(--fs-fine); }
.price { margin: 0; font: 700 clamp(3rem, 2.4rem + 3vw, 4.25rem)/1 var(--sans); letter-spacing: -0.03em; }
.price-once { font: 500 var(--fs-body)/1 var(--sans); letter-spacing: 0; color: var(--muted); }
.was { font: 500 var(--fs-h4)/1 var(--sans); letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.offer-line { margin: 0; color: var(--muted); }
.offer-line b { color: var(--brass); }
.plan-list { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 8px; }
.plan-list li { position: relative; padding-left: 26px; }
.plan-list li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 6px; height: 11px; border: solid var(--brass); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.plan .button { width: 100%; justify-content: center; }
.plan .fine { margin-top: 2px; }

/* ---------- 12. FAQ, 13. Closing ---------- */
#faq details:first-of-type { border-top: 1px solid var(--line); }
#faq .fine { margin-top: 20px; }
.cta { background: radial-gradient(50% 80% at 50% 100%, rgb(var(--accent-rgb) / .12), transparent 70%); }
.cta-icon { border-radius: 22px; margin-bottom: 18px; box-shadow: var(--shadow-soft); }
.cta .ctas { justify-content: center; margin-bottom: 16px; }

/* ---------- Watch demo (dialog) ---------- */
dialog.demo { width: min(960px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 16px; overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow-window); }
dialog.demo::backdrop { background: rgb(0 0 0 / .65); }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.demo-head h2 { margin: 0; font-size: var(--fs-h4); }
.demo-close { min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 600 var(--fs-small) var(--sans); cursor: pointer; }
.demo-close:hover { border-color: var(--brass); }
.reel-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.reel-tabs [role="tab"] { min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 500 var(--fs-small) var(--sans); cursor: pointer; }
.reel-tabs [role="tab"][aria-selected="true"] { background: rgb(var(--accent-rgb) / .16); border-color: var(--brass); color: var(--brass); font-weight: 600; }
#reel-panel video { display: block; width: 100%; height: auto; max-height: calc(100dvh - 190px); border-radius: var(--r-md); background: #0b0c0f; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .feature, .feature.flip, .split { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .feature-copy { order: 0; }
  .feature-copy p { max-width: none; }
  .split h2 { max-width: none; }
}
@media (max-width: 720px) {
  .stage.hero-stage { aspect-ratio: 4 / 3.4; border-radius: 18px; }
  .stage.mini { aspect-ratio: 4 / 3; }
  .stage.mini.short { aspect-ratio: 16 / 8; }
  #demo-widgets { aspect-ratio: 3 / 4.2; }
  .steps, .stats { grid-template-columns: minmax(0, 1fr); }
  .steps li { padding: 0 0 0 56px; min-height: 44px; }
  .specs th, .specs td { padding: 12px 10px; }
  .specs tbody th { width: 38%; }
  .pill a { flex-wrap: wrap; justify-content: center; gap: 6px 10px; border-radius: 18px; padding: 8px 14px; text-align: center; }
  .pill a > [aria-hidden] { display: none; }
  .announce a { font-size: var(--fs-fine); }
}
@media (prefers-reduced-motion: reduce) {
  .toast.on, .hud.on { animation: none; }
  .hud.on { opacity: 1; }
  .toast.on { opacity: 1; transform: none; }
  .spin, .caret, .t.bounce, .t.ping::after, .dock.in > *, .dock.out, .t.enter, .t.gone { animation: none; }
  .wall, .t, .dock-at, .preview, .screens .dock-at { transition: none; }
  .strip { scroll-behavior: auto; }
}
