/* Shop This Moment — one grotesk, one serif, one accent. 8-pt spacing. */

:root {
  --bg-hero: #F5EEE2;
  --bg-examples: #E8EFE4;
  --bg-creators: #F9E7DB;
  --bg: var(--bg-hero);
  --surface: #FFFFFF;
  --surface-2: #EFEDE7;
  --text: #161513;
  --muted: #6B675F;
  --border: #E3E0D8;
  --border-strong: #C9C5BA;
  --accent: #E0461F;
  --accent-ink: #FFFFFF;
  --green: #2D4A3E;
  --amber: #D4882A;
  --sage: #7BA48C;
  --err: #B42318;
  --tile: #FFFFFF;
  --shadow: 0 1px 2px rgba(20, 18, 12, .06), 0 8px 24px -16px rgba(20, 18, 12, .18);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 10px;
  --r-sm: 6px;
  --dur: 160ms;
  --bar-h: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --green: #24392F;
    --amber: #E09A3E;
    --bg-hero: #151311;
    --bg-examples: #111713;
    --bg-creators: #1B1410;
    --bg: var(--bg-hero);
    --surface: #1C1B19;
    --surface-2: #242320;
    --text: #ECEAE3;
    --muted: #9D988E;
    --border: #2C2B28;
    --border-strong: #45433E;
    --accent: #F0552B;
    --accent-ink: #141311;
    --err: #F08A80;
    --tile: #F3F1EC;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  * { scroll-behavior: auto !important; }
}

/* The home page's background follows the section in view (app.js sets data-bg on <html>). */
:root[data-bg="examples"] { --bg: var(--bg-examples); }
:root[data-bg="creators"] { --bg: var(--bg-creators); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
  transition: background-color 500ms ease;
}
/* Two soft glows so the page is not one flat sheet. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 100% 0%, color-mix(in srgb, var(--amber) 16%, transparent), transparent 70%),
    radial-gradient(55vw 55vh at 0% 100%, color-mix(in srgb, var(--sage) 20%, transparent), transparent 70%);
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.muted { color: var(--muted); font-weight: 400; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.eyebrow .muted { margin-left: 8px; font-weight: 400; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.err { color: var(--err); font-size: 14px; }

/* ── Buttons ───────────────────────────────────────────────────────── */
button.primary, button.ghost, .seg-btn {
  border-radius: 8px; padding: 10px 16px; border: 1px solid var(--border-strong);
  background: var(--surface); line-height: 1.2; font-weight: 500; font-size: 14px;
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover { filter: brightness(.94); }
button.ghost:hover { border-color: var(--text); }
button.ghost.is-on { background: var(--text); border-color: var(--text); color: var(--bg); }
button.small { padding: 6px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* ── Header ─────────────────────────────────────────────────────────── */
.bar {
  height: var(--bar-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--bg); transition: background-color 500ms ease;
  position: sticky; top: 0; z-index: 20;
}
.bar-left { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.brand { font-weight: 600; letter-spacing: -.02em; text-decoration: none; font-size: 16px; white-space: nowrap; }
.built-by { font-size: 13px; color: var(--muted); white-space: nowrap; }
.built-by a { color: var(--text); font-weight: 500; text-underline-offset: 2px; }
.built-by a:not([href]) { text-decoration: none; }
.support-note { font-size: 13px; line-height: 1.35; color: var(--text); text-align: right; max-width: 320px; }
.topline { display: none; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.who button { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
#signin .short { display: none; }

/* ── Home ───────────────────────────────────────────────────────────── */
.screen { flex: 1; }
.hero {
  max-width: 1120px; margin: 0 auto; padding: 96px 24px 48px;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start;
}
.hero-main { min-width: 0; }
.hero-main > * { max-width: 720px; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1.02; }
.hero h1 em { font-style: italic; color: var(--accent); white-space: nowrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px !important; padding: 5px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font: 400 12px/1.5 var(--mono);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); flex: none; }
.mono-cap { margin-top: 12px; font: 400 12px/1.5 var(--mono); color: var(--muted); letter-spacing: .01em; }
.mono-label { font: 500 10.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lede { margin-top: 16px; font-size: 17px; color: var(--muted); max-width: 52ch; }
.url-form { display: flex; gap: 8px; margin-top: 32px; }
.url-form input {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--surface); font-size: 16px;
}
.url-form input::placeholder { color: var(--muted); }
.url-form button { padding-inline: 20px; white-space: nowrap; }
.hero .err { margin-top: 12px; }
.why { margin-top: 16px; font-size: 14px; color: var(--text); max-width: 60ch; }
.notice-line { margin-top: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); max-width: 72ch; }
.notice-line a { color: var(--muted); }

.examples { max-width: 1120px; margin: 0 auto; padding: 24px 24px 80px; }
.examples .eyebrow.more { margin-top: 40px; }
.creators { max-width: 1120px; margin: 0 auto; padding: 0 24px 80px; }
.creators p { margin-top: 12px; max-width: 64ch; color: var(--muted); font-size: 15px; }
.creators strong { color: var(--text); font-weight: 600; }
.example-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.example { text-decoration: none; color: inherit;
  display: block; text-align: left; padding: 0; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); overflow: hidden; box-shadow: var(--shadow);
}
.example:hover { border-color: var(--border-strong); }
.example img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.example .ex-body { padding: 12px 14px 14px; }
.example .ex-cat { font: 500 10.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.example .ex-title {
  margin-top: 2px; font-size: 14px; font-weight: 500; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Timeline ───────────────────────────────────────────────────────── */
.tl {
  display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 32px;
  max-width: 1280px; margin: 0 auto; padding: 24px;
  min-height: calc(100vh - var(--bar-h));
}
.tl-video { position: sticky; top: calc(var(--bar-h) + 24px); align-self: start; }
.player-wrap {
  aspect-ratio: 16 / 9; width: 100%; border-radius: var(--r); overflow: hidden;
  background: #000; box-shadow: var(--shadow); position: relative;
}
.player-wrap iframe, #player { width: 100%; height: 100%; display: block; }
.tl-meta { margin-top: 16px; }
.video-title { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; }
.status-line { margin-top: 8px; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.status-line a { color: inherit; }
.status-line.is-error { color: var(--err); }
.actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.tl-side { min-width: 0; }
.controls {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 0 0 16px; margin-bottom: 8px; border-bottom: 1px solid var(--border);
}
.price { flex: 1; min-width: 0; }
.price-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.price .label { font-weight: 600; }
.readout { color: var(--muted); font-variant-numeric: tabular-nums; }
.range { position: relative; height: 20px; }
.range input[type=range] {
  position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none;
  -webkit-appearance: none; appearance: none; height: 20px;
}
.range::before {
  content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--border-strong); border-radius: 1px;
}
.range input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 20px; }
.range input[type=range]::-moz-range-track { background: transparent; height: 20px; }
.range input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%;
  background: var(--text); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--border-strong);
}
.range input[type=range]::-moz-range-thumb {
  pointer-events: auto; width: 12px; height: 12px; border-radius: 50%;
  background: var(--text); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--border-strong);
}
.sort { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; margin: 0 auto 0 8px; border: 0; cursor: pointer;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 12px/1.4 var(--sans);
}
.chip .x { font-size: 14px; line-height: 1; opacity: .85; }
.chip:hover .x { opacity: 1; }
.seg-btn { border: 0; border-radius: 0; padding: 8px 12px; font-size: 13px; background: var(--surface); }
.seg-btn + .seg-btn { border-left: 1px solid var(--border-strong); }
.seg-btn.is-on { background: var(--text); color: var(--bg); }

.segments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.seg {
  display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface);
  border-left: 3px solid transparent;
  transition: border-color var(--dur) ease, background-color var(--dur) ease;
}
.seg.is-active { border-left-color: var(--accent); }
.seg-time {
  font: 500 13px/1 var(--sans); font-variant-numeric: tabular-nums; padding: 7px 0; text-align: center;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
}
.seg.is-active .seg-time { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg-time:hover { border-color: var(--text); }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-none { font-size: 13px; color: var(--muted); padding: 8px 0; }

.product { display: block; text-decoration: none; min-width: 0; }
.product .tile {
  aspect-ratio: 1 / 1; border-radius: var(--r-sm); background: var(--tile); border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden; padding: 8px;
}
.product img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.product:hover .tile { border-color: var(--border-strong); }
.product .name {
  margin-top: 8px; font-size: 13px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product .meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; font-weight: 600; }
.product .meta img { width: 14px; height: 14px; border-radius: 3px; }
.product .meta .na { color: var(--muted); font-weight: 400; }

.tl-empty { padding: 48px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.seg.is-placeholder { border-color: var(--border); opacity: .7; }
.seg.is-placeholder .seg-time { color: var(--muted); border-style: dashed; }
.seg.is-placeholder .tile { background: var(--surface-2); border-color: transparent; }
.tl-empty + .segments, .segments:has(.is-placeholder) ~ .tl-empty { padding-top: 16px; }

/* ── Chat drawer ────────────────────────────────────────────────────── */
.chat {
  position: fixed; top: var(--bar-h); right: 0; bottom: 0; width: min(440px, 100vw);
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; flex-direction: column; z-index: 30;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.chat-hint { font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { animation: arrive var(--dur) ease-out both; }
@keyframes arrive { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.msg.user { align-self: flex-end; max-width: 85%; background: var(--surface-2); padding: 8px 12px; border-radius: 12px 12px 4px 12px; font-size: 14px; white-space: pre-wrap; }
.msg.agent { font-size: 14px; line-height: 1.55; display: flex; flex-direction: column; gap: 12px; }
.msg.agent .text { white-space: pre-wrap; }
.msg.agent .text.is-error { color: var(--err); }
.msg.agent .thinking { color: var(--muted); font-size: 13px; }
.msg.agent .thinking code { font-family: var(--mono); font-size: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.cards .product .name { font-size: 12px; }
.cards .product .meta { font-size: 12px; }
.trace { font-size: 12px; color: var(--muted); }
.trace summary { cursor: pointer; }
.trace ol { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.trace code { font-family: var(--mono); font-size: 11.5px; word-break: break-word; }
.trace .tool-name { color: var(--text); font-weight: 500; }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.chat-form input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); }
.chat-form button { padding-inline: 14px; }

/* ── Card actions, cheaper panel, saved list ────────────────────────── */
.product-wrap { min-width: 0; }
.card-actions { display: flex; gap: 10px; margin-top: 4px; font-size: 12px; }
.card-actions button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; text-decoration: underline; }
.card-actions button:hover { color: var(--text); }
.card-actions button:disabled { text-decoration: none; cursor: default; }
.cheaper-panel { padding: 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.cheaper-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.cheaper-head .sub { color: var(--muted); font-size: 13px; font-weight: 400; }
.cheaper-panel .products { grid-template-columns: repeat(4, 1fr); }
.cheaper-panel .note { font-size: 13px; color: var(--muted); }
.cheaper-panel .note.is-error { color: var(--err); }
.list-tools { display: flex; align-items: center; gap: 8px; }
.list-tools .seg-btn { padding: 6px 10px; font-size: 12px; }
.list-total { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list-total .over { color: var(--err); }
.list-body { gap: 20px; }
.list-group h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.list-group h3 .muted { font-weight: 400; }
.list-group .products { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.list-item-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-top: 4px; }
.list-item-meta button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; text-decoration: underline; }
.list-item-meta button:hover { color: var(--text); }
.list-empty { color: var(--muted); font-size: 14px; }

/* ── Box demo beside the headline: a small window with scored rows ─── */
.box-demo { margin-top: 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 1px 2px rgba(20, 18, 12, .06), 0 24px 48px -24px rgba(20, 18, 12, .28); overflow: hidden; }
.demo-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--green); color: rgba(255, 255, 255, .86); }
.demo-bar i { width: 9px; height: 9px; border-radius: 50%; background: #FF6B6B; flex: none; }
.demo-bar i:nth-child(2) { background: #FFD93D; } .demo-bar i:nth-child(3) { background: #6BCB77; }
.demo-bar em { margin-left: 8px; font: italic 400 14px/1.2 var(--serif); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-body { padding: 14px; }
.demo-body .mono-label { margin: 14px 0 8px; }
.demo-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.demo-frame > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-box {
  position: absolute; left: var(--x1); top: var(--y1); width: calc(var(--x2) - var(--x1)); height: calc(var(--y2) - var(--y1));
  border: 2px solid var(--accent); border-radius: 3px; background: rgba(224, 70, 31, .14); box-shadow: 0 0 0 999px rgba(0, 0, 0, .32);
  transform-origin: 0 0; animation: demo-box 7s ease-in-out infinite;
}
.demo-cursor { position: absolute; left: var(--x2); top: var(--y2); animation: demo-cursor 7s ease-in-out infinite; }
.demo-cursor svg { display: block; }
.demo-cursor b {
  position: absolute; left: 14px; top: 16px; padding: 2px 7px; border-radius: 3px 8px 8px 8px;
  background: var(--c); color: #fff; font: 600 11px/1.4 var(--sans);
}
@keyframes demo-box {
  0%, 14% { transform: scale(0); opacity: 0; } 15% { transform: scale(0); opacity: 1; }
  34%, 90% { transform: scale(1); opacity: 1; } 96%, 100% { transform: scale(1); opacity: 0; }
}
@keyframes demo-cursor {
  0% { left: 86%; top: 80%; } 14%, 15% { left: var(--x1); top: var(--y1); }
  34%, 90% { left: var(--x2); top: var(--y2); } 100% { left: 86%; top: 80%; }
}
.demo-results { display: flex; flex-direction: column; gap: 8px; min-height: 212px; }
.demo-row {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 9px 10px 13px; border-radius: 10px; border: 1.5px solid transparent; background: var(--surface-2); text-decoration: none;
}
.demo-row.is-top { background: color-mix(in srgb, var(--amber) 9%, var(--surface)); border-color: var(--amber); animation: demo-top 7s ease-out infinite; }
@keyframes demo-top { 0%, 34% { border-color: transparent; } 40%, 90% { border-color: var(--amber); } 100% { border-color: transparent; } }
.demo-row:hover { border-color: var(--border-strong); }
.demo-row .tile { width: 44px; height: 44px; border-radius: 6px; background: var(--tile); border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; padding: 3px; }
.demo-row .tile img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.demo-row .name { font-size: 12.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-row .meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; font-weight: 600; }
.demo-row .meta img { border-radius: 3px; }
.demo-row .meta .at { font: 400 11px/1 var(--mono); color: var(--muted); }
.demo-row .score { padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); font: 500 11px/1.5 var(--mono); }
.demo-row .bar-track { position: absolute; left: 10px; right: 10px; bottom: 6px; height: 2px; border-radius: 1px; background: var(--border); overflow: hidden; }
.demo-row .bar-track span { display: block; height: 100%; width: var(--w); border-radius: 1px; background: linear-gradient(90deg, var(--sage), var(--amber)); transform-origin: 0 50%; animation: demo-bar 7s ease-out calc(var(--i) * .15s) infinite both; }
@keyframes demo-bar { 0%, 36% { transform: scaleX(0); } 50%, 100% { transform: scaleX(1); } }
.demo-cap { margin-top: 12px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.demo-cap strong { color: var(--text); font-weight: 600; }
.demo-cap a { color: var(--text); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .demo-box, .demo-cursor, .demo-row.is-top, .demo-row .bar-track span { animation: none; } }
@media (max-width: 1099px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .box-demo { max-width: 440px; margin-top: 0; }
}

/* ── Sign-up prompt ─────────────────────────────────────────────────── */
.signup { margin-top: 28px; }
.signup-cta { position: relative; display: inline-block; }
.signup-btn { min-width: 340px; padding: 14px 26px !important; font-size: 16px !important; font-weight: 600 !important; box-shadow: var(--shadow); }
.agents { position: absolute; left: 0; right: 0; top: 100%; height: 0; pointer-events: none; }
.agent {
  position: absolute; left: calc(4% + var(--i) * 22%); top: calc(-7px + var(--y));
  animation: agent-point 1.5s ease-in-out calc(var(--i) * -0.3s) infinite;
}
.agent svg { display: block; }
.agent b {
  position: absolute; left: 14px; top: 16px; padding: 2px 7px; border-radius: 3px 8px 8px 8px;
  background: var(--c); color: #fff; font: 600 11px/1.4 var(--sans); white-space: nowrap;
}
@keyframes agent-point { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(4px, 6px); } }
@media (prefers-reduced-motion: reduce) { .agent { animation: none; } }
.signup-why { margin-top: 52px; font-size: 15px; max-width: 56ch; }
.signup-why strong { font-weight: 600; }
.signup-notice { margin-top: 4px; font-size: 12px; color: var(--muted); max-width: 64ch; }
.signup-notice a { color: inherit; }
.signup.compact { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.signup.compact .signup-btn { padding: 11px 20px !important; font-size: 15px !important; }
.signup.compact .signup-why { font-size: 14px; }
.actions:has(#tl-signin:not([hidden])) ~ .signup { display: none; }

/* ── Box an item ────────────────────────────────────────────────────── */
.box-stage { position: absolute; inset: 0; background: #000; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
.box-still { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.box-drag, .box-det { position: absolute; border: 2px solid var(--accent); border-radius: 4px; pointer-events: none; }
.box-drag { background: rgba(224, 70, 31, .12); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); }
.box-det { border-color: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.box-det span {
  position: absolute; left: -2px; bottom: 100%; margin-bottom: 2px; max-width: 220px; padding: 2px 6px; border-radius: 4px;
  background: var(--accent); color: #fff; font: 600 11px/1.4 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.box-hint, .box-working {
  position: absolute; left: 50%; transform: translateX(-50%); padding: 5px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .72); color: #fff; font: 500 12px/1.4 var(--sans); pointer-events: none; white-space: nowrap;
}
.box-hint { top: 10px; }
.box-hint kbd { font: inherit; padding: 0 5px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 4px; }
.box-working { bottom: 12px; }
.box-done {
  position: absolute; top: 8px; right: 8px; padding: 5px 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: #161513; font: 600 12px/1.4 var(--sans);
}
.boxres .products { grid-template-columns: repeat(4, 1fr); }
.boxres .cheaper-head { flex-wrap: wrap; }
.boxres-row + .boxres-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.boxres-label { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.boxres-label:empty { display: none; }
.box-crop { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); flex: none; }
.detection { font-size: 13px; font-weight: 600; }
.box-ways { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.box-feedback { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.cheaper-panel .note + .note { margin-top: 6px; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* ── Build intro (static/build.js) ──────────────────────────────────── */
html.sb-blank body > * { visibility: hidden; }
.sb-hide { visibility: hidden !important; }
.sb-show { animation: sb-in 260ms ease-out both; }
@keyframes sb-in { from { opacity: 0; } to { opacity: 1; } }
.sb-layer { position: absolute; left: 0; top: 0; width: 100%; z-index: 100; pointer-events: none; overflow: hidden; }
.sb-cursor { position: absolute; left: 0; top: 0; will-change: transform; transition: opacity 300ms ease; }
.sb-cursor svg { display: block; overflow: visible; }
.sb-cursor .sb-tag {
  position: absolute; left: 14px; top: 16px; padding: 2px 7px; border-radius: 3px 8px 8px 8px;
  background: var(--c); color: #fff; font: 600 11px/1.4 var(--sans); white-space: nowrap;
}
.sb-cursor .sb-cross, .sb-cursor.is-cross .sb-arrow, .sb-cursor .sb-beam, .sb-cursor.is-beam .sb-arrow { display: none; }
.sb-cursor.is-cross .sb-cross, .sb-cursor.is-beam .sb-beam { display: block; }
.sb-rect { position: absolute; border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 7%, transparent); border-radius: 2px; transition: opacity 320ms ease; }
.sb-rect i {
  position: absolute; width: 7px; height: 7px; background: var(--bg); border: 1.5px solid var(--c); border-radius: 1px;
}
.sb-rect i:nth-child(1) { left: -4px; top: -4px; } .sb-rect i:nth-child(2) { right: -4px; top: -4px; }
.sb-rect i:nth-child(3) { left: -4px; bottom: -4px; } .sb-rect i:nth-child(4) { right: -4px; bottom: -4px; }
.sb-rect b {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 7px); padding: 1px 6px; border-radius: 4px;
  background: var(--c); color: #fff; font: 600 10.5px/1.5 var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums;
}
/* Color arrives last: a painted piece is grey until a cursor opens the picker on it. */
.sb-gray { filter: grayscale(1) contrast(.82) brightness(1.06); }
.sb-color { transition: filter 420ms ease, background-color 160ms ease, color 160ms ease; }
.sb-picker {
  position: absolute; display: flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 24px -8px rgba(20, 18, 12, .35); transition: opacity 240ms ease;
}
.sb-picker i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform 120ms ease, box-shadow 120ms ease; }
.sb-picker i.is-on { transform: scale(1.25); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--text); }
.sb-picker b { margin-left: 4px; min-width: 58px; font: 500 10.5px/1 var(--mono); color: var(--text); text-transform: uppercase; }
.sb-skip {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 101; pointer-events: none;
  padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font: 500 12px/1.4 var(--sans); box-shadow: var(--shadow); transition: opacity 300ms ease;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.notice { max-width: 1120px; margin: 0 auto; padding: 24px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.notice .credit { margin-bottom: 8px; font-size: 13px; color: var(--text); }
.notice a { color: inherit; }

/* ── Narrow ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .bar .built-by, .bar .support-note { display: none; }
  .topline { display: flex; flex-direction: column; gap: 4px; padding: 10px 24px; border-bottom: 1px solid var(--border); }
  .topline .support-note { text-align: left; max-width: none; }
}
@media (max-width: 960px) {
  .tl { grid-template-columns: 1fr; gap: 24px; padding: 16px; min-height: 0; }
  .tl-video { position: static; }
  .example-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .bar { padding: 0 16px; }
  .topline { padding: 10px 16px; }
  .who { gap: 8px; }
  #signin .long { display: none; }
  #signin .short { display: inline; }
  .signup-cta { display: block; }
  .signup-btn { width: 100%; min-width: 0; }
  .sort { align-self: flex-start; }
  .agent { left: calc(1% + var(--i) * 19.5%); }
  .agent b { font-size: 10px; padding: 1px 5px; }
  .actions button { flex: 1 1 auto; }
  .box-hint { font-size: 11px; }
  .cheaper-panel .products { grid-template-columns: repeat(2, 1fr); }
  .who #whoami { display: none; }
  .hero { padding: 48px 16px 32px; }
  .box-demo { max-width: none; }
  .url-form { flex-direction: column; }
  .url-form button { width: 100%; }
  .examples { padding: 16px 16px 48px; }
  .creators { padding: 0 16px 64px; }
  .example-grid { grid-template-columns: 1fr; }
  .controls { flex-direction: column; align-items: stretch; }
  .boxres .products { grid-template-columns: repeat(2, 1fr); }
  .seg { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .chat { top: auto; width: 100vw; height: 72vh; border-left: 0; border-top: 1px solid var(--border); border-radius: 14px 14px 0 0; }
}

/* ── Print (deck uses its own sheet; this keeps the page sane) ──────── */
@media print { .bar, .chat, .actions { display: none !important; } }

/* Sign-in from inside another app's browser: a sheet that sends the visitor to the real browser. */
.inapp {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 200;
  max-width: 520px; margin: 0 auto; padding: 18px; border-radius: 18px;
  background: var(--surface, #fff); color: var(--text); border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.inapp strong { display: block; font-size: 1.08rem; }
.inapp p { margin: 6px 0 14px; font-size: .92rem; line-height: 1.45; color: var(--muted, inherit); }
.inapp-row { display: flex; flex-wrap: wrap; gap: 8px; }
.inapp-open {
  flex: 1 1 100%; display: block; text-align: center; padding: 14px 16px; border-radius: 12px; font-weight: 650;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
}
.inapp-row button { flex: 1 1 0; min-height: 44px; }

/* Touch screens: fingers need bigger targets than a mouse pointer does. */
@media (pointer: coarse) {
  .bar button { min-height: 40px; }
  .card-actions { gap: 4px; margin-top: 0; }
  .card-actions button { padding: 10px 6px 10px 0; font-size: 13px; }
  .seg-time { min-height: 36px; }
  .built-by a, footer a, .topline a { padding: 6px 0; display: inline-block; }
}
