/* Adrias app, FINAL: components.
   Built only from tokens.css (no raw colours here). Under 900px is the phone layout. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: var(--fs-15);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-semi); }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.only-phone, .only-desk { }
@media (min-width: 900px) { .only-phone { display: none !important; } }
@media (max-width: 899px) { .only-desk { display: none !important; } }

/* ============================================================ type
   One family, Plus Jakarta Sans. Display sizes are ExtraBold with tracking that tightens as
   the size grows, titles are Bold, text is Regular and Medium. Numbers use its tabular figures. */
.t-hero, .t-display, .t-h1, .t-h2, .t-h3 { font-family: var(--font-display); font-variation-settings: var(--opsz-display); font-weight: var(--fw-heavy); color: var(--text-1); text-wrap: balance; }
.t-h2, .t-h3 { font-weight: var(--fw-bold); }
.t-hero { font-size: var(--fs-72); line-height: 0.98; letter-spacing: var(--track-72); }
.t-display { font-size: var(--fs-56); line-height: var(--lh-display); letter-spacing: var(--track-56); }
.t-h1 { font-size: var(--fs-40); line-height: 1.06; letter-spacing: var(--track-40); }
.t-h2 { font-size: var(--fs-32); line-height: 1.1; letter-spacing: var(--track-32); }
.t-h3 { font-size: var(--fs-24); line-height: var(--lh-head); letter-spacing: var(--track-24); font-variation-settings: var(--opsz-head); }
.t-h4 { font-size: var(--fs-20); line-height: 1.3; letter-spacing: var(--track-20); font-weight: var(--fw-semi); }
.t-title { font-size: var(--fs-17); line-height: 1.4; letter-spacing: var(--track-17); font-weight: var(--fw-semi); }
.t-lead { font-size: var(--fs-17); line-height: 1.55; color: var(--text-2); letter-spacing: var(--track-17); text-wrap: pretty; }
.t-body { font-size: var(--fs-15); line-height: var(--lh-body); color: var(--text-2); letter-spacing: var(--track-15); text-wrap: pretty; }
.t-label { font-size: var(--fs-13); line-height: 1.4; color: var(--text-3); font-weight: var(--fw-medium); letter-spacing: var(--track-label); }
.t-micro { font-size: var(--fs-12); line-height: 1.35; color: var(--text-3); font-weight: var(--fw-medium); letter-spacing: var(--track-label); }
.t-eyebrow { font-family: var(--font-sans); font-size: var(--fs-12); line-height: 1.35; color: var(--text-2); font-weight: var(--fw-medium); letter-spacing: var(--track-caps); text-transform: uppercase; }
/* Mono is only for credits, money, timers, codes and counts. Meta lines are sans. */
.mono, .price, .num, .money { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.spec { font-family: var(--font-sans); font-variant-numeric: tabular-nums; font-size: var(--fs-13); line-height: 1.4; color: var(--text-3); letter-spacing: 0; }
.c1 { color: var(--text-1); } .c2 { color: var(--text-2); } .c3 { color: var(--text-3); } .ca { color: var(--accent-text); }
@media (max-width: 899px) {
  .t-hero { font-size: var(--fs-56); line-height: 1; letter-spacing: var(--track-56); }
  .t-display { font-size: var(--fs-40); line-height: 1.04; letter-spacing: var(--track-40); }
  .t-h1 { font-size: var(--fs-32); line-height: 1.08; letter-spacing: var(--track-32); }
  .t-h2 { font-size: var(--fs-24); line-height: var(--lh-head); letter-spacing: var(--track-24); }
  .spec { font-size: var(--fs-15); }
}

/* ============================================================ credits
   A credit amount is always the glyph plus a tabular number: <span class="cr">● 16</span>.
   Screen readers get "16 credits" from aria-label. */
.cr { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; white-space: nowrap; }
.cr .g { width: 0.86em; height: 0.86em; flex: none; color: var(--credit-glyph); }
.btn .cr .g, .act .cr .g, .send .cr .g, .cr.cur .g { color: currentColor; }
.cr-free { font-family: var(--font-sans); color: var(--text-2); }

/* ============================================================ icons and brand */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.i-16 { width: 16px; height: 16px; }
.i-24 { width: 24px; height: 24px; }
.i-fill { fill: currentColor; stroke: none; }
.brand { display: inline-flex; align-items: center; gap: var(--s-8); font-family: var(--font-display); font-variation-settings: var(--opsz-head); font-weight: var(--fw-semi); font-size: var(--fs-20); letter-spacing: var(--track-24); color: var(--text-1); }
.brand-mark { width: 24px; height: 24px; flex: none; }
/* The lockup is the logo in the brand link: the symbol is the A of "Adrias". Where a brand link also holds the
   symbol and a name (the app's shell), only the lockup shows, so the name never stutters as "A adrias". */
.brand-lockup { display: none; height: 26px; width: auto; flex: none; color: var(--text-1); }
.brand > .brand-lockup { display: block; }
.brand > .brand-mark, .brand > .brand-lockup ~ span { display: none; }
.ava-ai { width: 32px; height: 32px; border-radius: var(--r-pill); background: var(--surface-2); display: grid; place-items: center; flex: none; outline: 1px solid var(--line); outline-offset: -1px; }
.ava-ai .brand-mark { width: 18px; height: 18px; }
.ava { width: 32px; height: 32px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-1); display: grid; place-items: center; font-size: var(--fs-13); font-weight: var(--fw-semi); flex: none; }

/* ============================================================ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8);
  height: 40px; padding: 0 var(--s-16); border-radius: var(--r-md);
  font-size: var(--fs-15); font-weight: var(--fw-medium); line-height: 1; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
  user-select: none;
}
.btn-sm { height: 32px; padding: 0 var(--s-12); font-size: var(--fs-13); border-radius: var(--r-sm); }
.btn-lg { height: 48px; padding: 0 var(--s-20); }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: var(--fw-semi); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-pressed); }
.btn-secondary { background: var(--surface-3); color: var(--text-1); }
.btn-secondary:hover { background: var(--surface-3-hover); }
.btn-secondary:active { background: var(--surface-2); }
.btn-quiet { background: transparent; color: var(--text-2); outline: 1px solid var(--line-strong); outline-offset: -1px; }
.btn-quiet:hover { background: var(--surface-2); color: var(--text-1); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text-1); }
.btn-ink { background: var(--ink-btn); color: var(--on-ink-btn); font-weight: var(--fw-semi); }
.btn-ink:hover { background: var(--text-on-media); }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.btn .price { font-weight: var(--fw-medium); }
.btn .sep { width: 4px; height: 4px; border-radius: var(--r-pill); background: currentColor; opacity: 0.55; flex: none; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--r-md); color: var(--text-2); display: inline-grid; place-items: center; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.btn-icon:hover { background: var(--surface-2); color: var(--text-1); }
.btn-icon.sm { width: 32px; height: 32px; border-radius: var(--r-sm); }
.link { color: var(--text-1); font-weight: var(--fw-medium); text-decoration: underline; text-decoration-color: var(--line-hover); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color var(--t-fast) var(--ease); }
.link:hover { text-decoration-color: var(--text-1); }
@media (max-width: 899px) {
  .btn { height: 44px; }
  .btn-sm { height: 44px; padding: 0 var(--s-16); font-size: var(--fs-15); border-radius: var(--r-md); }
  .btn-lg { height: 52px; }
  .btn-icon, .btn-icon.sm { width: 44px; height: 44px; border-radius: var(--r-md); }
}

/* hit target wrapper: a 44px button around a smaller visual (phone) */
.hit { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }

/* ============================================================ chips, segmented, switch */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-8);
  height: 32px; padding: 0 var(--s-12); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text-2);
  font-size: var(--fs-13); font-weight: var(--fw-medium); white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.chip:hover { background: var(--surface-3); color: var(--text-1); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--accent-wash); color: var(--accent-text); outline: 1px solid var(--accent-line); outline-offset: -1px; }
.chip .i { width: 16px; height: 16px; }
.chip.on-media { background: var(--glass-media); color: var(--text-on-media); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
@media (max-width: 899px) {
  .chip { height: 44px; padding: 0 var(--s-16); font-size: var(--fs-15); border-radius: var(--r-md); }
  .chip.sm-phone { height: 36px; font-size: var(--fs-13); border-radius: var(--r-sm); padding: 0 var(--s-12); }
}

.seg { display: inline-flex; padding: var(--s-4); gap: var(--s-4); background: var(--surface-2); border-radius: var(--r-md); }
.seg button { height: 32px; padding: 0 var(--s-12); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-13); font-weight: var(--fw-medium); display: inline-flex; align-items: center; gap: var(--s-8); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); white-space: nowrap; }
.seg button:hover { color: var(--text-1); }
.seg button[aria-selected="true"] { background: var(--surface-3); color: var(--text-1); }
.seg.block { display: flex; }
.seg.block button { flex: 1; justify-content: center; }
@media (max-width: 899px) {
  .seg button { height: 36px; font-size: var(--fs-15); }
  .seg.tall button { height: 44px; }
}

.switch { position: relative; width: 44px; height: 24px; border-radius: var(--r-pill); background: var(--surface-3); flex: none; transition: background-color var(--t-fast) var(--ease); outline: 1px solid var(--line-strong); outline-offset: -1px; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: var(--r-pill); background: var(--text-2); transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.switch[aria-checked="true"] { background: var(--text-1); outline-color: var(--text-1); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--canvas); }

/* ============================================================ status chips */
.status { display: inline-flex; align-items: center; gap: var(--s-4); height: 24px; padding: 0 var(--s-8); border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: var(--fw-medium); white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.status .i { width: 14px; height: 14px; }
.status.ok { background: var(--ok-wash); color: var(--ok); }
.status.warn { background: var(--warn-wash); color: var(--warn); }
.status.bad { background: var(--bad-wash); color: var(--bad); }
.status.live { background: var(--accent-wash); color: var(--accent-text); }

/* ============================================================ balance pill */
.pill-bal { display: inline-flex; align-items: center; gap: var(--s-8); height: 32px; padding: 0 var(--s-8) 0 var(--s-12); border-radius: var(--r-pill); background: var(--surface-2); outline: 1px solid var(--line); outline-offset: -1px; color: var(--text-1); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-13); font-weight: var(--fw-medium); transition: background-color var(--t-fast) var(--ease); white-space: nowrap; }
.pill-bal:hover { background: var(--surface-3); }
.pill-bal .plus { width: 20px; height: 20px; border-radius: var(--r-pill); background: var(--surface-3); display: grid; place-items: center; color: var(--text-1); }
.pill-bal .plus .i { width: 12px; height: 12px; stroke-width: 2; }
.pill-bal.is-held .held { color: var(--text-3); }
@media (max-width: 899px) { .pill-bal { height: 32px; font-size: var(--fs-13); padding: 0 var(--s-4) 0 var(--s-12); } .pill-bal .plus { width: 24px; height: 24px; } }

/* ============================================================ inputs */
.field { display: grid; gap: var(--s-8); }
.field > label, .field-label { font-size: var(--fs-13); font-weight: var(--fw-medium); color: var(--text-2); }
.input, .textarea { width: 100%; background: var(--surface-2); border: 0; outline: 1px solid var(--line-strong); outline-offset: -1px; border-radius: var(--r-md); color: var(--text-1); font-size: var(--fs-15); padding: 0 var(--s-16); height: 48px; transition: outline-color var(--t-fast) var(--ease); }
.textarea { height: auto; min-height: 96px; padding: var(--s-12) var(--s-16); line-height: 1.5; resize: none; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .textarea:hover { outline-color: var(--line-hover); }
.input:focus-visible, .textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; box-shadow: none; }
.hint { font-size: var(--fs-13); color: var(--text-3); }
.phone-in { display: flex; align-items: stretch; height: 56px; background: var(--surface-2); outline: 1px solid var(--line-strong); outline-offset: -1px; border-radius: var(--r-md); overflow: hidden; }
.phone-in .cc { display: flex; align-items: center; gap: var(--s-8); padding: 0 var(--s-16); border-right: 1px solid var(--line-strong); font-family: var(--font-mono); color: var(--text-1); font-size: var(--fs-17); }
.phone-in input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 0 var(--s-16); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-17); color: var(--text-1); letter-spacing: 0.02em; }
.phone-in.is-focus { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-8); }
.code-boxes span { height: 56px; border-radius: var(--r-md); background: var(--surface-2); outline: 1px solid var(--line-strong); outline-offset: -1px; display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--fs-24); color: var(--text-1); }
.code-boxes span.is-cur { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.check { display: flex; align-items: center; gap: var(--s-12); min-height: 44px; color: var(--text-1); }
.check .box { width: 24px; height: 24px; border-radius: var(--r-sm); background: var(--text-1); display: grid; place-items: center; color: var(--canvas); flex: none; }
.check .box .i { width: 14px; height: 14px; stroke-width: 2.2; }

/* ============================================================ cards and panels */
.card { background: var(--surface-1); border-radius: var(--r-lg); outline: 1px solid var(--line); outline-offset: -1px; padding: var(--s-8); }
.card-pad { padding: var(--s-8) var(--s-8) var(--s-12); }
.card-head { display: flex; align-items: center; gap: var(--s-12); padding: var(--s-8) var(--s-8) var(--s-12); min-height: 56px; }
.card-head .grow { flex: 1; min-width: 0; }
.card-title { font-size: var(--fs-15); font-weight: var(--fw-semi); color: var(--text-1); line-height: 1.35; }
.kind { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--text-1); display: grid; place-items: center; flex: none; }
.kind .i { width: 18px; height: 18px; }
.panel { background: var(--surface-1); border-radius: var(--r-lg); outline: 1px solid var(--line); outline-offset: -1px; }
.well { background: var(--surface-2); border-radius: var(--r-md); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.acts { display: flex; flex-wrap: wrap; gap: var(--s-8); padding: var(--s-12) var(--s-8) var(--s-8); }
.act { display: inline-flex; align-items: center; gap: var(--s-8); height: 32px; padding: 0 var(--s-12); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-13); font-weight: var(--fw-medium); white-space: nowrap; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.act:hover { background: var(--surface-3); color: var(--text-1); }
.act .i { width: 16px; height: 16px; }
.act .price { color: var(--text-3); }
.act.strong { background: var(--surface-3); color: var(--text-1); }
.act.strong .price { color: var(--text-2); }
@media (max-width: 899px) {
  .acts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--s-8)); padding: var(--s-12) var(--s-16) var(--s-8); scroll-padding: var(--s-16); }
  .acts::-webkit-scrollbar { display: none; }
  .act { height: 44px; padding: 0 var(--s-16); font-size: var(--fs-15); border-radius: var(--r-md); }
}

/* ============================================================ media tiles */
.tile { position: relative; display: block; overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); isolation: isolate; }
.tile > img, .tile > video, .tile > picture img { width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; outline: 1px solid transparent; outline-offset: -1px; transition: outline-color var(--t-fast) var(--ease); pointer-events: none; }
.tile:hover::after, .tile.is-hover::after { outline-color: var(--line-on-media); }
/* Rule 5 (video-first.md): the frame itself is never dimmed; every caption sits on a flat Ink plate instead */
.tile .scrim { position: absolute; inset: 0; background: transparent; opacity: 0; transition: opacity var(--t-fast) var(--ease); pointer-events: none; }
.tile:hover .scrim, .tile.is-hover .scrim, .tile .scrim.is-on { opacity: 1; }
.tile .meta { position: absolute; left: var(--s-8); right: var(--s-8); bottom: var(--s-8); padding: var(--s-8) var(--s-8) var(--s-8) var(--s-12); display: flex; align-items: center; gap: var(--s-8); border-radius: var(--r-sm); background: var(--glass-media); color: var(--text-on-media); opacity: 0; transform: translateY(4px); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.tile:hover .meta, .tile.is-hover .meta, .tile .meta.is-on { opacity: 1; transform: none; }
.tile .meta .grow { flex: 1; min-width: 0; }
.tile .meta .name, .tile .meta .spec { display: block; }
.tile .meta .name { font-size: var(--fs-13); font-weight: var(--fw-semi); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .meta .spec { color: var(--text-on-media-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* one line, like the name, so the plate stays a slim band */
.tile .tl { position: absolute; top: var(--s-8); left: var(--s-8); display: flex; gap: var(--s-4); }
.tile .tr { position: absolute; top: var(--s-8); right: var(--s-8); display: flex; gap: var(--s-4); }
.badge { display: inline-flex; align-items: center; gap: var(--s-4); height: 24px; padding: 0 var(--s-8); border-radius: var(--r-pill); background: var(--glass-media); color: var(--text-on-media); font-family: var(--font-sans); font-variant-numeric: tabular-nums; font-size: var(--fs-12); font-weight: var(--fw-medium); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); white-space: nowrap; }
.badge .i { width: 12px; height: 12px; }
.badge.num { font-family: var(--font-mono); width: 24px; padding: 0; justify-content: center; }
.media-btn { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--glass-media); color: var(--text-on-media); display: grid; place-items: center; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transition: background-color var(--t-fast) var(--ease); }
.media-btn:hover { background: var(--glass-media-hover); }
.media-btn .i { width: 16px; height: 16px; }
/* "Made with Adrias": starter-credit exports only, until the first purchase, never paid work (video-first.md 6.2).
   The symbol and the words in flat White at 85% on a flat Ink plate, bottom right, 8px in. */
.wm { position: absolute; right: var(--s-8); bottom: var(--s-8); display: inline-flex; align-items: center; gap: var(--s-4); height: 24px; padding: 0 var(--s-8); border-radius: var(--r-sm); background: var(--glass-media); color: rgba(255, 255, 255, 0.85); font-size: var(--fs-12); font-weight: var(--fw-medium); white-space: nowrap; pointer-events: none; }
.wm .brand-mark { width: 16px; height: 16px; flex: none; }
.wm .brand-mark path { fill: currentColor; }
.r-16x9 { aspect-ratio: 16 / 9; } .r-9x16 { aspect-ratio: 9 / 16; } .r-1x1 { aspect-ratio: 1; } .r-4x5 { aspect-ratio: 4 / 5; } .r-3x2 { aspect-ratio: 3 / 2; } .r-2x3 { aspect-ratio: 2 / 3; } .r-3x4 { aspect-ratio: 3 / 4; }

/* justified rows: every tile keeps its ratio and the row keeps one height */
.jrows { display: grid; gap: var(--gap-gallery); }
.jrow { display: flex; gap: var(--gap-gallery); }
.jrow > .tile { flex: var(--ar) 1 0%; aspect-ratio: var(--ar); min-width: 0; }

/* the video player inside cards */
.player { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); isolation: isolate; }
.player > video, .player > img { width: 100%; height: 100%; object-fit: cover; }
.player .ctrl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: var(--s-12); padding: var(--s-12); background: var(--glass-media); padding-top: var(--s-12); color: var(--text-on-media); }
.player .ctrl .grow { flex: 1; }
.player .bar-track { position: relative; height: 4px; border-radius: var(--r-pill); background: var(--track-on-media); flex: 1; }
.player .bar-track span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); background: var(--text-on-media); }
.play { width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--text-on-media); color: var(--canvas); display: grid; place-items: center; flex: none; }
.play .i { width: 16px; height: 16px; }
.tc { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-12); color: var(--text-on-media-2); white-space: nowrap; }

/* ============================================================ loaders */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-md); }
.skel::before { content: ""; position: absolute; inset: 0; background: var(--accent-sweep); transform: translateX(-100%); animation: sweep 1.8s var(--ease) infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.spin { width: 16px; height: 16px; border-radius: var(--r-pill); border: 2px solid var(--line-strong); border-top-color: var(--accent-text); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.dots { display: inline-flex; gap: var(--s-4); align-items: center; }
.dots i { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--text-3); animation: blink 1.2s var(--ease) infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; } .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
/* a making, queued or failed tile: its status words sit on one flat Ink plate, centred, over the faint poster */
.gen-cap { position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content; max-width: calc(100% - 2 * var(--s-8)); display: grid; justify-items: center; gap: var(--s-4); text-align: center; padding: var(--s-8) var(--s-12); border-radius: var(--r-sm); background: var(--glass-media); color: var(--text-on-media); }
.gen-cap .t { font-size: var(--fs-13); font-weight: var(--fw-medium); color: var(--text-on-media); }
.gen-cap .spec { color: var(--text-on-media-2); }
.gen-cap .spin { border-color: var(--track-on-media); border-top-color: var(--accent-text); }
.gen-cap > .i { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .skel::before, .spin, .dots i { animation: none; } }

/* ============================================================ app shell (desktop) */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.app.with-aside { grid-template-columns: var(--side-w) minmax(0, 1fr) 456px; }
.app.railed { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.main { position: relative; min-width: 0; display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }

/* sidebar */
.side { background: var(--surface-1); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 0 var(--s-12); }
.side-top { height: var(--bar-h); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--s-4) 0 var(--s-8); flex: none; }
.side-new { display: flex; align-items: center; gap: var(--s-12); height: 40px; padding: 0 var(--s-12); border-radius: var(--r-md); background: var(--surface-2); color: var(--text-1); font-size: var(--fs-15); font-weight: var(--fw-medium); outline: 1px solid var(--line); outline-offset: -1px; transition: background-color var(--t-fast) var(--ease); }
.side-new:hover { background: var(--surface-3); }
.side-new .kbd { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-12); color: var(--text-3); }
.side-nav { display: grid; gap: var(--s-4); padding: var(--s-12) 0; }
.nav-item { display: flex; align-items: center; gap: var(--s-12); height: 36px; padding: 0 var(--s-12); border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-15); font-weight: var(--fw-medium); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.nav-item .i { width: 18px; height: 18px; }
.nav-item:hover { background: var(--surface-2); color: var(--text-1); }
.nav-item[aria-current="page"] { background: var(--surface-3); color: var(--text-1); }
.nav-item .n { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-12); color: var(--text-3); }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 calc(-1 * var(--s-12)); padding: 0 var(--s-12); scrollbar-width: none; border-top: 1px solid var(--line); }
.side-label { display: flex; align-items: center; justify-content: space-between; padding: var(--s-16) var(--s-12) var(--s-8); font-size: var(--fs-12); font-weight: var(--fw-medium); color: var(--text-3); letter-spacing: var(--track-label); }
.proj { display: flex; align-items: center; gap: var(--s-12); height: 36px; padding: 0 var(--s-12) 0 var(--s-8); border-radius: var(--r-sm); color: var(--text-1); font-size: var(--fs-13); font-weight: var(--fw-medium); white-space: nowrap; transition: background-color var(--t-fast) var(--ease); }
.proj:hover { background: var(--surface-2); }
.proj span:not(.n) { overflow: hidden; text-overflow: ellipsis; }
.proj img { width: 20px; height: 20px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
.proj .n { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-12); color: var(--text-3); }
.conv { display: flex; align-items: center; height: 32px; padding: 0 var(--s-12) 0 40px; border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.conv span { overflow: hidden; text-overflow: ellipsis; }
.conv:hover { background: var(--surface-2); color: var(--text-1); }
.conv[aria-current="page"] { background: var(--surface-3); color: var(--text-1); }
.conv.flat { padding-left: var(--s-12); }
.side-foot { flex: none; display: flex; align-items: center; gap: var(--s-12); padding: var(--s-12) var(--s-4); border-top: 1px solid var(--line); }
.side-foot .who { flex: 1; min-width: 0; line-height: 1.3; }
.side-foot .who b { display: block; font-size: var(--fs-13); font-weight: var(--fw-semi); color: var(--text-1); }
.side-foot .who span { font-size: var(--fs-12); color: var(--text-3); }

/* rail (Studio, Compare) */
.rail { background: var(--surface-1); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 0 0 var(--s-12); gap: var(--s-4); }
.rail .rail-top { height: var(--bar-h); display: grid; place-items: center; }
.rail-item { width: 56px; padding: var(--s-8) 0; border-radius: var(--r-md); display: grid; justify-items: center; gap: var(--s-4); color: var(--text-2); font-size: var(--fs-12); font-weight: var(--fw-medium); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.rail-item:hover { background: var(--surface-2); color: var(--text-1); }
.rail-item[aria-current="page"] { background: var(--surface-3); color: var(--text-1); }
.rail .grow { flex: 1; }

/* top bar */
.bar { position: relative; z-index: 5; height: var(--bar-h); flex: none; display: flex; align-items: center; gap: var(--s-12); padding: 0 var(--gutter); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.bar.line { border-bottom: 1px solid var(--line); }
.bar .grow { flex: 1; min-width: 0; }
.bar-title { display: flex; align-items: center; gap: var(--s-8); font-size: var(--fs-15); font-weight: var(--fw-medium); color: var(--text-1); white-space: nowrap; overflow: hidden; }
.bar-title .crumb { color: var(--text-3); font-weight: var(--fw-regular); }
.bar-title .i { width: 16px; height: 16px; color: var(--text-3); }

/* ============================================================ the thread */
.thread { max-width: calc(var(--thread-w) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s-32) var(--gutter) var(--s-48); display: grid; gap: var(--s-32); }
.m-user { justify-self: end; max-width: 80%; display: grid; gap: var(--s-8); justify-items: end; }
.m-user .bubble { background: var(--surface-2); border-radius: var(--r-lg); padding: var(--s-12) var(--s-16); font-size: var(--fs-15); line-height: 1.5; color: var(--text-1); }
.m-user .att { display: flex; gap: var(--s-8); }
.m-user .att img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); outline: 1px solid var(--line); outline-offset: -1px; }
.m-user .att .more { width: 64px; height: 64px; border-radius: var(--r-sm); background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--fs-13); color: var(--text-2); }
.m-ai { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-16); }
.m-ai:has(> .ava-ai) { grid-template-columns: 32px minmax(0, 1fr); }
.m-ai .body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-16); min-width: 0; }
.m-ai .who { display: flex; align-items: center; gap: var(--s-8); height: 32px; font-size: var(--fs-13); font-weight: var(--fw-semi); color: var(--text-1); }
.m-ai .who .spec { font-weight: var(--fw-regular); }
.m-ai .txt { font-size: var(--fs-15); line-height: 1.55; color: var(--text-1); display: grid; gap: var(--s-12); max-width: 640px; }
.m-ai .txt .c2 { color: var(--text-2); }
.m-ai .defaults { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.thinking { display: inline-flex; align-items: center; gap: var(--s-12); height: 32px; color: var(--text-2); font-size: var(--fs-13); }
.day { display: flex; align-items: center; gap: var(--s-12); font-size: var(--fs-12); color: var(--text-3); font-weight: var(--fw-medium); }
.day::before, .day::after { content: ""; height: 1px; flex: 1; background: var(--line); }

/* plan card */
.plan .card-head { align-items: flex-start; }
.plan .eyebrow-row { display: flex; align-items: center; gap: var(--s-8); margin-bottom: var(--s-4); }
.steps { display: grid; }
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: var(--s-12); align-items: center; padding: var(--s-12) var(--s-8); border-top: 1px solid var(--line); }
.step .what { font-size: var(--fs-15); color: var(--text-1); line-height: 1.35; }
.step .spec { margin-top: var(--s-4); }
.step .amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-15); color: var(--text-1); text-align: right; }
.step .amt.free { color: var(--text-3); }
.step.later .what, .step.later .amt { color: var(--text-2); }
.stage-h { display: flex; align-items: center; gap: var(--s-8); padding: var(--s-16) var(--s-8) var(--s-8); border-top: 1px solid var(--line); font-size: var(--fs-13); font-weight: var(--fw-semi); color: var(--text-1); }
.stage-h .spec { margin-left: auto; }
.totals { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s-16); display: grid; gap: var(--s-8); margin-top: var(--s-8); }
.totals .row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-16); font-size: var(--fs-13); color: var(--text-2); }
.totals .row .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-1); font-size: var(--fs-13); }
.totals .row.big { font-size: var(--fs-15); color: var(--text-1); font-weight: var(--fw-medium); }
.totals .row.big .v { font-size: var(--fs-20); font-weight: var(--fw-medium); }
.note { display: flex; gap: var(--s-8); align-items: flex-start; padding: var(--s-12) var(--s-8) 0; font-size: var(--fs-13); color: var(--text-3); line-height: 1.45; }
.note .i { width: 16px; height: 16px; margin-top: 1px; }
.plan-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-8); padding: var(--s-16) var(--s-8) var(--s-8); }
.plan-acts .spacer { flex: 1; }
.plan.is-done { padding: 0; }
.plan.is-done .done-row { display: flex; align-items: center; gap: var(--s-12); padding: var(--s-12) var(--s-16); min-height: 56px; }
.plan.is-done .done-row .grow { flex: 1; min-width: 0; }
.plan.is-done .done-row .t { font-size: var(--fs-15); font-weight: var(--fw-medium); color: var(--text-1); }
@media (max-width: 899px) {
  .plan-acts .btn-primary { flex: 1 0 100%; }
  .plan-acts .btn:not(.btn-primary) { flex: 1; }
  .plan-acts .spacer { display: none; }
}

/* result cards */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-8); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-8); }
.shot { display: grid; gap: var(--s-8); align-content: start; }
.shot .tile { aspect-ratio: 16 / 9; }
.shot .line { padding: 0 var(--s-4); font-size: var(--fs-13); line-height: 1.4; color: var(--text-2); }
.shot .spec { padding: 0 var(--s-4); }
.shot.is-sel .tile::after { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.film-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-4); padding: var(--s-8) 0 0; }
.film-strip .seg-shot { height: 40px; border-radius: var(--r-sm); overflow: hidden; position: relative; background: var(--surface-2); }
.film-strip .seg-shot img { width: 100%; height: 100%; object-fit: cover; }
.film-strip .seg-shot.is-sel { outline: 2px solid var(--accent-text); outline-offset: -2px; }

/* voice and audio */
.wave { display: flex; align-items: center; gap: var(--s-12); padding: var(--s-12); background: var(--surface-2); border-radius: var(--r-md); }
.wave .play { background: var(--ink-btn); color: var(--on-ink-btn); }
.wave svg.wf { flex: 1; height: 40px; min-width: 0; }
svg.wf rect { fill: var(--wave-rest); }
svg.wf rect.p { fill: var(--accent-text); }
.wave .tc { color: var(--text-2); }
.script { padding: var(--s-12) var(--s-8) 0; font-size: var(--fs-15); line-height: 1.55; color: var(--text-2); }
.script mark { background: none; color: var(--text-1); }

/* ============================================================ composer */
.composer-dock { flex: none; padding: 0 var(--gutter) var(--s-16); }
.composer-dock .inner { max-width: var(--thread-w); margin: 0 auto; }
.composer { background: var(--surface-2); border-radius: var(--r-lg); outline: 1px solid var(--line-strong); outline-offset: -1px; padding: var(--s-8); display: grid; gap: var(--s-4); transition: outline-color var(--t-fast) var(--ease); }
.composer:focus-within, .composer.is-focus { outline-color: var(--accent-line); }
.composer textarea { width: 100%; resize: none; border: 0; background: transparent; padding: var(--s-8) var(--s-8) var(--s-4); min-height: 48px; font-size: var(--fs-15); line-height: 1.5; color: var(--text-1); }
.composer textarea::placeholder { color: var(--text-3); }
.composer textarea:focus-visible { box-shadow: none; }
.composer .typed { padding: var(--s-8) var(--s-8) var(--s-4); min-height: 48px; font-size: var(--fs-15); line-height: 1.5; color: var(--text-1); }
.composer .typed .caret { display: inline-block; width: 2px; height: 18px; background: var(--accent-text); vertical-align: -3px; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
.composer .tools { display: flex; align-items: center; gap: var(--s-8); }
.composer .tools .grow { flex: 1; }
.composer .tool { height: 36px; display: inline-flex; align-items: center; gap: var(--s-8); padding: 0 var(--s-12); border-radius: var(--r-md); color: var(--text-2); font-size: var(--fs-13); font-weight: var(--fw-medium); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); white-space: nowrap; }
.composer .tool:hover { background: var(--surface-3); color: var(--text-1); }
.composer .tool .i { width: 18px; height: 18px; }
.composer .tool.sq { width: 36px; padding: 0; justify-content: center; }
.composer .tool .spec { color: var(--text-3); }
.send { width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); flex: none; }
.send.is-ready { background: var(--ink-btn); color: var(--on-ink-btn); }
.send .i { width: 18px; height: 18px; stroke-width: 2; }
.composer .att-row { display: flex; gap: var(--s-8); padding: var(--s-4) var(--s-4) 0; }
.composer .att-row .a { position: relative; width: 56px; height: 56px; border-radius: var(--r-md); overflow: hidden; }
.composer .att-row .a img { width: 100%; height: 100%; object-fit: cover; }
.composer-foot { text-align: center; font-size: var(--fs-12); color: var(--text-3); padding-top: var(--s-8); }
@media (max-width: 899px) {
  .composer-dock { padding: var(--s-8) var(--s-8) calc(var(--s-8) + env(safe-area-inset-bottom)); background: var(--canvas); }
  .composer { padding: var(--s-8); border-radius: var(--r-lg); }
  .composer .typed, .composer textarea { padding: var(--s-4) var(--s-8) var(--s-4); font-size: var(--fs-17); min-height: 48px; }
  .composer .tool { height: 44px; font-size: var(--fs-15); padding: 0 var(--s-12); border-radius: var(--r-md); }
  .composer .tool.sq { width: 44px; }
  .send { width: 44px; height: 44px; border-radius: var(--r-md); }
  .composer-foot { display: none; }
}

/* ============================================================ field tiles (Studio) */
.ft { display: flex; align-items: center; gap: var(--s-12); min-height: 56px; padding: var(--s-8) var(--s-12); border-radius: var(--r-md); background: var(--surface-2); text-align: left; width: 100%; transition: background-color var(--t-fast) var(--ease); }
.ft:hover { background: var(--surface-3); }
.ft .grow { flex: 1; min-width: 0; }
.ft .lab { display: block; font-size: var(--fs-12); font-weight: var(--fw-medium); color: var(--text-3); line-height: 1.3; }
.ft .val { display: block; font-size: var(--fs-15); font-weight: var(--fw-medium); color: var(--text-1); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft .val .spec { font-size: var(--fs-12); }
.ft > .i { color: var(--text-3); width: 16px; height: 16px; }
.ft.is-open { background: var(--surface-3); outline: 1px solid var(--accent-line); outline-offset: -1px; }
.ft-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.choice { display: grid; gap: var(--s-4); padding: var(--s-12); border-radius: var(--r-md); background: var(--surface-2); text-align: left; transition: background-color var(--t-fast) var(--ease); }
.choice:hover { background: var(--surface-3); }
.choice[aria-selected="true"], .choice[aria-checked="true"] { background: var(--accent-wash); outline: 2px solid var(--accent-line); outline-offset: -2px; }
.choice .top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); }
.choice .nm { font-size: var(--fs-15); font-weight: var(--fw-semi); color: var(--text-1); }
.choice .pr { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-13); color: var(--text-1); }
.choice .ds { font-size: var(--fs-13); color: var(--text-2); line-height: 1.4; }
.choice .spec { font-size: var(--fs-12); }
.drop { display: grid; place-items: center; align-content: center; gap: var(--s-4); border-radius: var(--r-md); background: var(--surface-2); outline: 1px dashed var(--line-strong); outline-offset: -1px; color: var(--text-2); font-size: var(--fs-13); font-weight: var(--fw-medium); text-align: center; transition: background-color var(--t-fast) var(--ease); }
.drop:hover { background: var(--surface-3); }
.drop .i { color: var(--text-3); }
.prompt-well { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s-12); display: grid; gap: var(--s-12); }
.prompt-well .ptxt { font-size: var(--fs-15); line-height: 1.5; color: var(--text-1); min-height: 88px; }
.prompt-well .row { display: flex; align-items: center; gap: var(--s-8); }
.prompt-well .row .grow { flex: 1; }

/* receipt */
.receipt { display: grid; gap: var(--s-8); padding: var(--s-12) var(--s-4) 0; }
.receipt .row { display: flex; justify-content: space-between; gap: var(--s-12); font-size: var(--fs-13); color: var(--text-2); }
.receipt .row .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-1); }
.receipt .row.total { color: var(--text-1); font-weight: var(--fw-medium); padding-top: var(--s-8); border-top: 1px solid var(--line); }
.after { display: flex; justify-content: center; gap: var(--s-8); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-12); color: var(--text-3); padding-top: var(--s-8); }

/* ============================================================ model picker */
.menu { background: var(--surface-1); border-radius: var(--r-lg); box-shadow: var(--shadow-overlay); padding: var(--s-8); display: grid; gap: var(--s-4); }
.menu-h { display: flex; align-items: center; justify-content: space-between; padding: var(--s-8) var(--s-12) var(--s-8); }
.mp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4) var(--s-16); align-items: center; padding: var(--s-12); border-radius: var(--r-md); text-align: left; transition: background-color var(--t-fast) var(--ease); }
.mp-row:hover { background: var(--surface-2); }
.mp-row[aria-selected="true"] { background: var(--surface-3); }
.mp-row .nm { display: flex; align-items: center; gap: var(--s-8); font-size: var(--fs-15); font-weight: var(--fw-semi); color: var(--text-1); }
.mp-row .nm .i { width: 16px; height: 16px; color: var(--accent-text); }
.mp-row .ds { grid-column: 1; font-size: var(--fs-13); color: var(--text-2); line-height: 1.4; }
.mp-row .spec { grid-column: 1; }
.mp-row .pr { grid-column: 2; grid-row: 1 / span 3; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-15); color: var(--text-1); text-align: right; }
.mp-row .pr small { display: block; font-size: var(--fs-12); color: var(--text-3); }
.menu-sep { height: 1px; background: var(--line); margin: var(--s-4) var(--s-12); }

/* ============================================================ overlays */
.veil { position: fixed; inset: 0; background: var(--veil); z-index: 40; }
.sheet { position: fixed; z-index: 50; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 440px; max-height: calc(100vh - 64px); overflow: auto; background: var(--surface-1); border-radius: var(--r-lg); box-shadow: var(--shadow-overlay); padding: var(--s-24); display: grid; gap: var(--s-20); }
.sheet .grab { display: none; }
.sheet-head { display: flex; align-items: flex-start; gap: var(--s-12); }
.sheet-head .grow { flex: 1; }
@media (max-width: 899px) {
  .sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; max-height: calc(100dvh - 48px); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--s-8) var(--s-16) calc(var(--s-24) + env(safe-area-inset-bottom)); gap: var(--s-16); }
  .sheet .grab { display: block; width: 36px; height: 4px; border-radius: var(--r-pill); background: var(--line-strong); margin: 0 auto var(--s-8); }
}
.toast { display: inline-flex; align-items: center; gap: var(--s-12); min-height: 48px; padding: var(--s-8) var(--s-8) var(--s-8) var(--s-16); border-radius: var(--r-md); background: var(--surface-3); box-shadow: var(--shadow-overlay); color: var(--text-1); font-size: var(--fs-15); }
.toast .i { color: var(--ok); }

/* ============================================================ phone shell */
.pbar { position: relative; z-index: 5; height: var(--bar-h); flex: none; display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-4); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.pbar .ttl { flex: 1; min-width: 0; text-align: center; font-size: var(--fs-17); font-weight: var(--fw-semi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar .ttl small { display: block; font-size: var(--fs-12); font-weight: var(--fw-medium); color: var(--text-3); line-height: 1.2; }
.pbar .end { display: flex; align-items: center; padding-right: var(--s-4); }
.tabbar { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(56px + env(safe-area-inset-bottom)); padding: 0 var(--s-8) env(safe-area-inset-bottom); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-top: 1px solid var(--line); }
.tabbar a { display: grid; justify-items: center; align-content: center; gap: var(--s-4); min-height: 56px; color: var(--text-3); font-size: var(--fs-12); font-weight: var(--fw-medium); }
.tabbar a[aria-current="page"] { color: var(--text-1); }
.tabbar a .i { width: 22px; height: 22px; }

.drawer { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 320px; max-width: 86vw; background: var(--surface-1); display: flex; flex-direction: column; padding: 0 var(--s-12); transform: translateX(-100%); transition: transform var(--t-panel) var(--ease); box-shadow: var(--shadow-overlay); }
body.drawer-open .drawer { transform: none; }
.drawer-veil { display: none; }
body.drawer-open .drawer-veil { display: block; }
.drawer .side-new { height: 44px; }
.drawer .nav-item { height: 44px; font-size: var(--fs-17); }
.drawer .proj { height: 44px; font-size: var(--fs-17); }
.drawer .conv { height: 44px; font-size: var(--fs-15); }
.drawer .side-label { font-size: var(--fs-13); }
.drawer .side-label .btn-icon { width: 44px !important; height: 44px !important; margin: -12px -12px -12px 0; }
.drawer .brand { min-height: 44px; }
.drawer .side-foot .who { min-height: 44px; display: grid; align-content: center; }
.drawer .side-foot .who b { font-size: var(--fs-15); }
.drawer .side-foot .who span { font-size: var(--fs-13); }

@media (max-width: 899px) {
  .app, .app.with-aside, .app.railed { display: flex; flex-direction: column; height: 100dvh; }
  .app > .side, .app > .rail, .app > .aside { display: none; }
  .thread { padding: var(--s-16) var(--gutter) var(--s-24); gap: var(--s-24); }
  .m-user { max-width: 88%; }
  .m-ai { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); }
  .m-ai > .ava-ai { display: none; }
  .m-ai .who { height: 24px; }
  .m-ai .txt { font-size: var(--fs-17); line-height: 1.5; }
  .m-user .bubble { font-size: var(--fs-17); }
  .card-title { font-size: var(--fs-17); }
  .step .what { font-size: var(--fs-15); }
  .totals .row, .totals .row .v { font-size: var(--fs-15); }
  .note { font-size: var(--fs-15); }
  .shot .line { font-size: var(--fs-15); }
  .script { font-size: var(--fs-17); }
  .board { grid-template-columns: repeat(4, 64%); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--s-8)); padding: 0 var(--s-8); scroll-padding: var(--s-8); }
  .board::-webkit-scrollbar { display: none; }
  .board > * { scroll-snap-align: start; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================ list rows (account, history) */
.group { background: var(--surface-1); border-radius: var(--r-lg); outline: 1px solid var(--line); outline-offset: -1px; overflow: hidden; }
.row-i { display: flex; align-items: center; gap: var(--s-16); min-height: 56px; padding: var(--s-12) var(--s-16); border-top: 1px solid var(--line); }
.row-i:first-child { border-top: 0; }
.row-i .grow { flex: 1; min-width: 0; }
.row-i .t, .row-i .d { display: block; }
.row-i .t { font-size: var(--fs-15); color: var(--text-1); line-height: 1.35; }
.row-i .d { font-size: var(--fs-13); color: var(--text-3); line-height: 1.4; margin-top: 2px; }
.row-i .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-15); color: var(--text-1); white-space: nowrap; }
.row-i > .i { color: var(--text-3); }
.row-i .th { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
.row-i.danger .t { color: var(--bad); }
a.row-i, button.row-i { width: 100%; text-align: left; transition: background-color var(--t-fast) var(--ease); }
a.row-i:hover, button.row-i:hover { background: var(--surface-2); }
@media (max-width: 899px) { .row-i .d { font-size: var(--fs-15); } .row-i .t { font-size: var(--fs-17); } }

/* ============================================================ empty state */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--s-16); padding: var(--s-32); }
.empty .tile { width: 320px; aspect-ratio: 16 / 9; }

/* ============================================================ section heads */
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-16); margin-bottom: var(--s-16); }
.sec-h h2 { font-size: var(--fs-17); font-weight: var(--fw-semi); letter-spacing: var(--track-head); }
.sec-h .link { font-size: var(--fs-13); }

/* ============================================================ FINAL additions */

/* card head: title and meta on the left, price and icons on the right.
   On the phone the price moves to the charged line and only More stays. */
.card-head .ch-end { display: flex; align-items: center; gap: var(--s-4); flex: none; }
.card-head .ch-end > .cr { font-size: var(--fs-13); color: var(--text-2); margin: 0 var(--s-4); }
.card-head .card-title, .card-head .spec { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) {
  .card-head { padding: var(--s-4) var(--s-4) var(--s-12) var(--s-8); }
  .card-head .ch-end > .cr, .card-head .ch-end .desk-i { display: none; }
}

/* the charged line under a finished card: what it cost, and whether it ran inside the budget */
.charged { display: flex; align-items: center; gap: var(--s-8); padding: var(--s-8) var(--s-8) var(--s-4); font-size: var(--fs-13); color: var(--text-3); line-height: 1.4; }
.charged > .i { width: 16px; height: 16px; color: var(--ok); flex: none; }
.charged .cr { color: var(--text-2); }
.charged.held > .i { color: var(--accent-text); }
@media (max-width: 899px) { .charged { font-size: var(--fs-15); padding: var(--s-8) var(--s-4) 0; } }

/* keep check on a result tile: tap to keep, without opening the tile */
.keepbtn { position: absolute; top: var(--s-4); right: var(--s-4); width: 40px; height: 40px; display: grid; place-items: center; z-index: 2; }
.keepbtn span { width: 28px; height: 28px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--glass-media); outline: 2px solid var(--text-on-media); outline-offset: -2px; color: transparent; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.keepbtn .i { width: 16px; height: 16px; stroke-width: 2.4; }
.keepbtn:hover span { background: var(--glass-media-hover); color: var(--text-on-media-2); }
.keepbtn[aria-pressed="true"] span { background: var(--text-on-media); color: var(--canvas); }
.tile.is-kept::after { outline: 2px solid var(--text-on-media); outline-offset: -2px; }
@media (max-width: 899px) { .keepbtn { width: 44px; height: 44px; top: 0; right: 0; } }

/* tracks: the film, voice, music and captions lanes of a scene, with a timecode ruler */
.tracks { display: grid; gap: var(--s-4); padding: var(--s-12) var(--s-8) var(--s-4); }
.trk { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: var(--s-8); align-items: center; }
.trk .lab { display: flex; align-items: center; gap: var(--s-8); font-size: var(--fs-12); font-weight: var(--fw-medium); color: var(--text-3); white-space: nowrap; }
.trk .lab .i { width: 14px; height: 14px; }
.trk .lane { display: block; position: relative; height: 32px; border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
.trk.film .lane { display: flex; gap: 2px; background: var(--canvas); }
.trk.film .lane > * { flex: 1; min-width: 0; height: 100%; }
.trk.film .lane img { object-fit: cover; }
.trk.film .lane .pend { background: var(--surface-3); }
.trk.film .lane .now { outline: 2px solid var(--accent-text); outline-offset: -2px; position: relative; z-index: 1; }
.trk .lane svg.wf { position: absolute; top: 4px; bottom: 4px; height: 24px; }
.trk .lane .w { position: absolute; top: 4px; bottom: 4px; display: block; line-height: 24px; text-overflow: ellipsis; padding: 0 var(--s-8); border-radius: var(--r-sm); background: var(--surface-3); color: var(--text-2); font-size: var(--fs-12); white-space: nowrap; overflow: hidden; }
.trk .lane .soon { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 var(--s-8); font-size: var(--fs-12); color: var(--text-3); }
.trk .head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text-1); z-index: 2; }
.ruler { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: var(--s-8); }
.ruler .ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-12); color: var(--text-3); }
@media (max-width: 899px) {
  .trk { grid-template-columns: 72px minmax(0, 1fr); }
  .ruler { grid-template-columns: 72px minmax(0, 1fr); }
  .trk .lab { font-size: var(--fs-13); }
  .trk .lane .w { font-size: var(--fs-12); }
}

/* voice orbs: per-voice avatars */
.orb { width: 36px; height: 36px; border-radius: var(--r-pill); flex: none; background: var(--orb, var(--orb-harriet)); outline: 1px solid var(--line-on-media); outline-offset: -1px; }
.orb.lg { width: 48px; height: 48px; }
.orb.sm { width: 24px; height: 24px; }

/* the voiceover card: one big play button and a long waveform */
.wave.big { padding: var(--s-16); gap: var(--s-16); }
.wave.big .play { width: 56px; height: 56px; }
.wave.big .play .i { width: 20px; height: 20px; }
.wave.big svg.wf { height: 48px; }
.vo-meta { display: flex; align-items: center; gap: var(--s-12); padding: var(--s-12) var(--s-8) 0; }
.vo-meta .grow { flex: 1; min-width: 0; }
.vo-meta .nm { font-size: var(--fs-15); font-weight: var(--fw-semi); color: var(--text-1); }

/* banners: offline, paused, short balance; always an icon and words */
.banner { display: flex; align-items: center; gap: var(--s-12); padding: var(--s-12) var(--s-16); border-radius: var(--r-md); background: var(--surface-2); outline: 1px solid var(--line); outline-offset: -1px; font-size: var(--fs-15); color: var(--text-1); line-height: 1.45; }
.banner .grow { flex: 1; min-width: 0; }
.banner .grow small { display: block; font-size: var(--fs-13); color: var(--text-2); }
.banner > .i { color: var(--text-2); }
.banner.warn { background: var(--warn-wash); outline-color: transparent; }
.banner.warn > .i { color: var(--warn); }
.banner.bad { background: var(--bad-wash); outline-color: transparent; }
.banner.bad > .i { color: var(--bad); }
@media (max-width: 899px) { .banner .grow small { font-size: var(--fs-15); } }

/* problem cards inside the thread: failed, blocked, refused, short balance */
.card.problem { padding: var(--s-16); display: grid; gap: var(--s-12); }
.card.problem .ph { display: flex; align-items: flex-start; gap: var(--s-12); }
.card.problem .ph .grow { flex: 1; min-width: 0; display: grid; gap: var(--s-4); }
.card.problem .ph .t { font-size: var(--fs-15); font-weight: var(--fw-semi); color: var(--text-1); }
.card.problem .ph .d { font-size: var(--fs-15); color: var(--text-2); line-height: 1.5; }
.card.problem .pa { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.card.problem .totals { margin-top: 0; }
.card.problem .ways { display: grid; gap: var(--s-8); }
.card.problem .ways-list { display: grid; gap: var(--s-8); }
.card.problem .short-foot { color: var(--text-3); }
.card.problem .choice .pr { white-space: nowrap; }
.icon-dot { width: 32px; height: 32px; border-radius: var(--r-pill); display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.icon-dot .i { width: 18px; height: 18px; }
.icon-dot.warn { background: var(--warn-wash); color: var(--warn); }
.icon-dot.bad { background: var(--bad-wash); color: var(--bad); }
.icon-dot.ok { background: var(--ok-wash); color: var(--ok); }
@media (max-width: 899px) { .card.problem .pa .btn { flex: 1 1 auto; } .card.problem .ph .d { font-size: var(--fs-17); } }

/* the composer on the phone: one line until you type, never wraps its hint */
@media (max-width: 899px) {
  .composer textarea { height: 48px; min-height: 48px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .composer .tool .budget-l { display: none; }
}
.composer.is-off { opacity: 0.6; }
.composer .queued { display: flex; align-items: center; gap: var(--s-8); padding: var(--s-4) var(--s-8); font-size: var(--fs-13); color: var(--text-3); }

/* phone top bar: one line, a truncated title and a compact balance pill */
.pbar .ttl small { display: none; }

/* ============================================================ FINAL, credits round */

/* plan card: the title is a display face; done rows say what ran and why */
.plan-title { font-family: var(--font-display); font-variation-settings: var(--opsz-head); font-size: var(--fs-20); font-weight: var(--fw-semi); letter-spacing: var(--track-20); line-height: 1.25; color: var(--text-1); }
.step .sw { min-width: 0; }
.step .what { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-8); }
.step .amt .cr-free { color: var(--text-3); }
.totals .row .v .cr { font-size: inherit; }
.totals .row .v.vt { font-family: var(--font-sans); color: var(--text-2); }
.plan.is-done .done-row .dn { display: block; font-size: var(--fs-13); color: var(--text-3); line-height: 1.35; }
.plan.is-done .done-row .du { font-size: var(--fs-13); color: var(--text-2); white-space: nowrap; display: inline-flex; gap: var(--s-4); align-items: center; }
.btn .cr { font-weight: var(--fw-semi); }
.act .price .cr, .act .price { color: var(--text-3); }
.act.strong .price .cr { color: var(--text-2); }

/* generating tiles: the storyboard frame shows faintly under the sweep */
.skel img.ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.16; }
.skel .gen-cap { z-index: 1; }
.gen .tile .tl { z-index: 2; }

/* image grid in a card: big 4:5 tiles with keep checks */
.grid-2.imgs { gap: var(--s-8); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 899px) { .grid-2.imgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* attached photos above a request */
.m-user .att { flex-wrap: wrap; justify-content: flex-end; }

/* credits pill */
.pill-bal .cr { font-size: var(--fs-13); font-weight: var(--fw-medium); }
.pill-bal .cr .g { width: 14px; height: 14px; }

/* ============================================================ credits sheet */
.cr-sheet { width: 480px; gap: var(--s-20); }
.cr-hero { display: grid; gap: var(--s-16); padding: var(--s-20); border-radius: var(--r-md); background: var(--surface-2); }
.cr-big { display: flex; align-items: baseline; gap: var(--s-8); }
.cr-big .cr { font-size: var(--fs-40); font-weight: var(--fw-medium); letter-spacing: -0.02em; line-height: 1; gap: var(--s-8); }
.cr-big .cr .g { width: 28px; height: 28px; align-self: center; }
.cr-big .u { font-size: var(--fs-15); color: var(--text-2); }
.cr-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-16); }
.cs { display: grid; gap: var(--s-4); align-content: start; }
.cs .k { font-size: var(--fs-13); color: var(--text-3); }
.cs .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-15); color: var(--text-1); }
.meter { display: block; height: 4px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; margin: var(--s-4) 0; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent-text); }
.cr-sec { display: grid; gap: var(--s-12); }
.cr-sec .sec-h { margin-bottom: 0; }
/* the packs of the credits book (five): three a row in the sheet, the last one wider */
.packs-4 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8); }
.packs-4 > .pack:last-child:nth-child(3n + 2) { grid-column: span 2; }
.packs-4 .pack { min-height: 0; padding: var(--s-12); gap: var(--s-4); border-radius: var(--r-md); }
.pack .pc { font-size: var(--fs-17); color: var(--text-1); font-weight: var(--fw-medium); }
.pack .pp { font-size: var(--fs-13); color: var(--text-2); }
.cr-pay { text-align: center; }
.cr-plan { border-radius: var(--r-md); background: var(--surface-2); border-top: 0; }
.cr-plan > .i:first-child { color: var(--accent-text); }
.cr-honest { display: flex; gap: var(--s-8); align-items: flex-start; }
.cr-rows { display: grid; gap: var(--s-4); }
.cr-row { display: flex; align-items: baseline; gap: var(--s-8); font-size: var(--fs-13); color: var(--text-2); }
.cr-row .grow { flex: 1; min-width: 0; }
.cr-row .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-1); }
.cr-order { font-size: var(--fs-13); color: var(--text-3); }
.cr-makes { font-size: var(--fs-13); color: var(--text-3); text-align: center; }
.cr-links { display: flex; gap: var(--s-16); justify-content: center; font-size: var(--fs-13); }
.cr-honest .i { color: var(--text-3); flex: none; margin-top: 1px; }
@media (max-width: 899px) {
  .cr-sheet { width: auto; }
  .packs-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packs-4 > .pack:last-child:nth-child(3n + 2) { grid-column: auto; }
  .packs-4 > .pack:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .packs-4 .pack { padding: var(--s-12) var(--s-16); min-height: 64px; }
  .pack .pp { font-size: var(--fs-15); }
  .cs .k { font-size: var(--fs-13); }
  .cr-pay, .cr-honest { font-size: var(--fs-13); }
}

/* full-length screenshots (?flat=1): the app becomes one long page */
html.flat .app { height: auto; overflow: visible; }
html.flat .main { height: auto; overflow: visible; }
html.flat .scroll { overflow: visible; flex: none; }
html.flat .app > .side, html.flat .app > .aside, html.flat .app > .rail { position: sticky; top: 0; height: 100vh; align-self: start; }

@media (max-width: 899px) {
  .plan.is-done .done-row { padding: var(--s-12); gap: var(--s-8); }
  .plan.is-done .done-row > .status { display: none; }
  .plan.is-done .done-row .dn { font-size: var(--fs-15); }
}

/* card head on the phone: title and meta get the full width; the state chip sits under them */
.card-head .ch-sub { display: none; }
@media (max-width: 899px) {
  .card-head { align-items: flex-start; }
  .card-head .card-title, .card-head .spec { white-space: normal; }
  .card-head .ch-end > .status { display: none; }
  .card-head .ch-sub { display: flex; margin-top: var(--s-8); }
}

/* phone reading sizes: information people need is 15px; only labels stay at 12 to 13 */
@media (max-width: 899px) {
  .step .spec, .card-head .spec, .thinking, .cr-pay, .cr-honest, .tile .meta .name, .mp-row .spec, .choice .spec, .take .tk-i .spec { font-size: var(--fs-15); }
  .composer .tool.studio-t { width: 44px; padding: 0; justify-content: center; }
}

/* ============================================================ media: clips and placeholder stills
   (video-first.md sections 3 and 4). A .vm host holds a lazy poster <img> and a silent looping <video> that
   app.js plays only in view (at most six at once), or one of our stills with a slow, flat Ken Burns move until
   its clip is made. The video stays transparent until it has a frame, so the poster never flashes. */
.vm { position: relative; display: block; overflow: hidden; background: var(--surface-3); }
.vm > img, .vm > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vm > video { opacity: 0; }
.vm.is-on > video { opacity: 1; }
.tile > .vm, .player > .vm, .vt > .vm { position: absolute; inset: 0; }
.vm .kb { transform-origin: 50% 50%; animation: vm-kb 18s ease-in-out infinite alternate; animation-play-state: paused; }
.vm.is-playing .kb { animation-play-state: running; }
@keyframes vm-kb { from { transform: scale(1.04) translate3d(1.2%, 0.8%, 0); } to { transform: scale(1.16) translate3d(-1.6%, -1.2%, 0); } }
@media (prefers-reduced-motion: reduce) { .vm .kb { animation: none; } }
.motion-off .vm .kb { animation-play-state: paused; }
/* ?ph=1 marks every placeholder, for review */
.show-ph .vm[data-status="placeholder"]::after { content: "Placeholder"; position: absolute; right: 6px; bottom: 6px; z-index: 3; padding: 2px 6px; border-radius: 4px; background: #FA5E20; color: #0B0B0C; font-size: 11px; font-weight: 700; }

/* a video tile: label top left, title on a flat Ink plate, no zoom on hover (the work moves, the frame does not) */
.vt { position: relative; display: block; overflow: hidden; border-radius: var(--r-md); background: var(--surface-3); isolation: isolate; color: #FFFFFF; }
.vt-l { position: absolute; top: var(--s-8); left: var(--s-8); z-index: 2; display: flex; gap: var(--s-4); }
.vt-p { position: absolute; left: var(--s-8); bottom: var(--s-8); z-index: 2; max-width: calc(100% - 16px); display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-sm); background: #0B0B0C; color: #FFFFFF; }
.vt-t { font-size: var(--fs-13); font-weight: var(--fw-semi); line-height: 1.3; }
.vt-c { display: none; align-items: center; gap: var(--s-4); font-size: var(--fs-13); font-weight: var(--fw-semi); color: #FA5E20; }
.vt-c .i { width: 14px; height: 14px; }
.vt:hover .vt-c, .vt:focus-visible .vt-c { display: inline-flex; }
.vt::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; outline: 2px solid transparent; outline-offset: -2px; pointer-events: none; }
.vt:hover::after { outline-color: #FA5E20; }

/* Pause motion (hero plate, footer): one switch for every clip on the site */
.motion-btn { display: inline-flex; align-items: center; gap: var(--s-8); height: 36px; padding: 0 var(--s-12); border-radius: var(--r-pill); font: inherit; font-size: var(--fs-13); font-weight: var(--fw-semi); color: var(--text-1); background: transparent; outline: 1px solid var(--line-strong); outline-offset: -1px; cursor: pointer; }
.motion-btn .mb-i .i { width: 14px; height: 14px; }
.motion-btn[aria-pressed="true"] .mb-i { opacity: 0.6; }
.motion-btn.on-ink { color: #FFFFFF; outline-color: rgba(255, 255, 255, 0.4); }
.motion-btn.sm { height: 32px; }
@media (max-width: 899px) { .motion-btn { height: 44px; } }
/* the sign-in mark: the plain symbol, no avatar circle (video-first.md 6.2) */
.signin-mark { display: block; width: 32px; height: 32px; flex: none; }
.signin-mark .brand-mark { width: 32px; height: 32px; }
.ava-ai.signin-mark { background: none; outline: 0; border-radius: 0; }
/* the flip-book of stills (Images): a hard cut every 1.2 s while in view; the first frame when motion is off */
.vm.flip > img { opacity: 0; animation: vm-flip calc(var(--n) * 1.2s) steps(1, end) infinite; animation-delay: calc(var(--i) * 1.2s); animation-play-state: paused; }
.vm.flip > img:first-child { opacity: 1; }
.vm.flip.is-playing > img { animation-play-state: running; }
@keyframes vm-flip { 0% { opacity: 1; } 25% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vm.flip > img { animation: none; } }
.motion-off .vm.flip > img { animation: none; }

/* phone: a tile's caption plate stays one slim band (name and spec on one line each) */
@media (max-width: 899px) { .tile .meta { padding-left: var(--s-8); } .tile .meta .spec { font-size: var(--fs-13); } }

/* ==================================================================================================================
   V4: THE GENRE OF AI FILM STUDIOS IN THE ADRIAS BRAND (build-system role, 17 November 2026)
   Measured genre values: brand-work/hf-study/hf-system.md. Values only from tokens.css. Flat colour: no gradients,
   glows, blurs or shadows. Every class here belongs to a helper in src/lib.py (same names) and, where it moves,
   to a behaviour in app.js. Page builders do not edit this file: page rules go in home.css or app.css.
   ================================================================================================================== */

/* ---------------------------------------------------------------- base additions */
.i-12 { width: 12px; height: 12px; }
.i-14 { width: 14px; height: 14px; }
.i-20 { width: 20px; height: 20px; }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--text-2); font: var(--fw-semi) var(--fs-11)/1 var(--font-sans); letter-spacing: 0.02em; white-space: nowrap; }
.kbd + .kbd { margin-left: 4px; }
.wrap { width: 100%; max-width: calc(var(--site-max) + 2 * var(--site-gutter)); margin: 0 auto; padding: 0 var(--site-gutter); }
.sec { padding-top: var(--sec-gap); }
.brand-lockup { height: 24px; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes dlg-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(0.98); } }
@keyframes srch-in { from { opacity: 0; transform: translate(-50%, 8px) scale(0.985); } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------------------------------------------------------------- display titles: Archivo Condensed, UPPERCASE */
.d-hero, .d-xl, .d-l, .d-m, .d-s, .d-xs,
.t-hero, .t-display, .t-h1, .t-h2 {
  font-family: var(--font-title); font-weight: var(--fw-heavy); font-synthesis: none; font-variation-settings: normal;
  text-transform: uppercase; color: var(--text-1); letter-spacing: var(--d-track); text-wrap: balance; margin: 0;
}
.d-hero { font-size: var(--d-hero); line-height: var(--d-hero-lh); letter-spacing: var(--d-track-big); }
.d-xl, .t-hero { font-size: var(--d-xl); line-height: var(--d-xl-lh); letter-spacing: var(--d-track-big); }
.d-l, .t-display { font-size: var(--d-l); line-height: var(--d-l-lh); }
.t-h1 { font-size: var(--fs-40); line-height: 1; }
.d-m, .t-h2 { font-size: var(--d-m); line-height: var(--d-m-lh); }
.d-s { font-size: var(--d-s); line-height: var(--d-s-lh); letter-spacing: var(--d-track-small); }
.d-xs { font-size: var(--d-xs); line-height: var(--d-xs-lh); letter-spacing: var(--d-track-small); }
.d-hero.acc, .d-xl.acc, .d-l.acc, .d-m.acc, .d-s.acc, .d-xs.acc { color: var(--accent-text); }
@media (max-width: 899px) {
  .d-hero { font-size: var(--d-hero-ph); line-height: 0.92; }
  .d-xl, .t-hero { font-size: var(--d-xl-ph); line-height: 0.95; }
  .d-l, .t-display { font-size: var(--d-l-ph); line-height: 0.98; }
  .t-h1 { font-size: var(--fs-32); line-height: 1.02; }
  .d-m, .t-h2 { font-size: var(--d-m-ph); line-height: 1.04; }
  .d-s { font-size: var(--d-s-ph); }
}

/* ---------------------------------------------------------------- buttons (genre additions) */
.btn-inkfill { background: var(--ink); color: var(--white); font-weight: var(--fw-semi); }
.btn-inkfill:hover { background: var(--surface-1); }
.btn-quiet.btn-sm { outline-color: var(--line-strong); color: var(--text-1); }

/* ---------------------------------------------------------------- badges: TOP, 4K, FAST, PRO (never NEW) */
.bdg { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; margin-left: 6px; border-radius: var(--r-xs); background: var(--accent-wash); color: var(--accent-text); font: var(--fw-bold) 10px/1 var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; white-space: nowrap; flex: none; }
.bdg.sk { height: 17px; padding: 0 6px; background: var(--accent); color: var(--on-accent); font-family: var(--font-title); font-size: var(--fs-12); letter-spacing: 0.03em; transform: skewX(-12deg); }

/* ---------------------------------------------------------------- the announcement strip */
.ann { position: relative; display: flex; align-items: center; justify-content: center; min-height: var(--strip-h); padding: 0 48px; background: var(--stage); border-bottom: 1px solid var(--line); font-size: var(--fs-13); line-height: 1.35; color: var(--text-2); }
.ann-t { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 10px; font-weight: var(--fw-medium); text-align: center; }
.ann-short { display: none; }
.ann-a { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-text); font-weight: var(--fw-bold); }
.ann-a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ann-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--text-3); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.ann-x:hover { background: var(--surface-2); color: var(--text-1); }
@media (max-width: 899px) {
  .ann { padding: 0 44px 0 12px; justify-content: flex-start; }
  .ann-long { display: none; } .ann-short { display: inline; }
  .ann-x { right: 0; width: 44px; height: 44px; }
}

/* ---------------------------------------------------------------- the site nav */
.snav { position: sticky; top: 0; z-index: var(--z-nav); background: var(--canvas); }
.snav-in { position: relative; display: flex; align-items: center; gap: 20px; height: var(--nav-h); width: 100%; max-width: calc(var(--site-max) + 2 * var(--site-gutter)); margin: 0 auto; padding: 0 var(--site-gutter); }
.snav-brand { flex: none; min-height: 40px; }
.snav-brand .brand-lockup { height: 24px; }
.snav-nav { flex: 1; min-width: 0; }
.snav-ul { display: flex; align-items: center; gap: 2px; }
.snav-l { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border-radius: var(--r-sm); font-size: var(--fs-14); font-weight: var(--fw-medium); color: var(--text-2); white-space: nowrap; letter-spacing: 0.005em; transition: color var(--t-hover) var(--ease-std), background-color var(--t-hover) var(--ease-std); }
.snav-l:hover, .snav-l[aria-expanded="true"] { color: var(--text-1); background: var(--surface-2); }
.snav-l[aria-current="page"] { color: var(--accent-text); }
.snav-l .chev { opacity: 0.7; transition: transform var(--t-fast) var(--ease); }
.snav-l[aria-expanded="true"] .chev { transform: rotate(180deg); }
.snav-l .bdg { margin-left: 4px; }
.snav-end { display: flex; align-items: center; gap: 8px; flex: none; }
.snav-search { width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; transition: background-color var(--t-hover) var(--ease-std), color var(--t-hover) var(--ease-std); }
.snav-search:hover { background: var(--surface-3); color: var(--text-1); }
.snav-burger { display: none; }
@media (max-width: 1099px) and (min-width: 900px) { .snav-l { padding: 0 7px; } .snav-in { gap: 12px; } .snav-signin { display: none; } }
@media (max-width: 899px) {
  .snav-in { gap: 4px; padding: 0 8px 0 4px; }
  .snav-burger { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); color: var(--text-1); flex: none; }
  .snav-nav, .snav-signin { display: none; }
  .snav-brand { margin-right: auto; }
  .snav-brand .brand-lockup { height: 22px; }
  .snav-search { width: 44px; height: 44px; border-radius: var(--r-md); background: transparent; color: var(--text-1); }
  .snav-cta.btn-sm { height: 40px; padding: 0 14px; font-size: var(--fs-14); }
}

/* ---------------------------------------------------------------- mega menus */
.mega { position: absolute; left: var(--site-gutter); top: calc(100% - 2px); z-index: var(--z-menu); width: min(var(--mega-w), calc(100vw - 2 * var(--site-gutter))); max-height: calc(100vh - var(--nav-h) - 16px); overflow: auto; overscroll-behavior: contain; padding: 18px 16px 10px; border-radius: var(--r-lg); background: var(--surface-2); outline: 1px solid var(--line-strong); outline-offset: -1px; transform-origin: 24px 0; animation: mega-in var(--t-fast) var(--ease-out); scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
@keyframes mega-in { from { opacity: 0; transform: translateY(-6px) scale(0.985); } }
.mega-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 16px; }
.mega-in.has-pv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px; }
.mega-col { min-width: 0; }
.mega-h { padding: 0 8px 8px; font-size: var(--fs-13); font-weight: var(--fw-medium); color: var(--text-3); letter-spacing: var(--track-label); }
.mega-list { display: grid; }
.mg { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 64px; padding: 8px; border-radius: var(--r-md); transition: background-color var(--t-hover) var(--ease-std); }
.mg:hover, .mg.is-act, .mg:focus-visible { background: var(--surface-1); }
.mg-tile { position: relative; width: 48px; height: 48px; border-radius: var(--r-md); background: var(--surface-3); color: var(--text-1); display: grid; place-items: center; outline: 1px solid transparent; outline-offset: -1px; transition: outline-color var(--t-hover) var(--ease-std); }
.mg:hover .mg-tile, .mg.is-act .mg-tile { outline-color: var(--line-hover); }
.mg-tile .bdg { position: absolute; top: -8px; left: 50%; margin: 0; transform: translateX(-50%) skewX(-12deg); }
.mk { font-family: var(--font-title); font-weight: var(--fw-heavy); font-size: var(--fs-17); letter-spacing: 0.01em; color: var(--text-1); line-height: 1; }
.mk.sm { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--surface-3); font-size: var(--fs-12); }
.mg-tx { display: grid; gap: 1px; min-width: 0; }
.mg-t { display: flex; align-items: center; font-size: var(--fs-14); font-weight: var(--fw-semi); line-height: 20px; color: var(--text-1); }
.mg-d { font-size: var(--fs-13); line-height: 18px; color: var(--text-3); }
.mega-pv { grid-row: 1; grid-column: 3; padding-top: 28px; display: grid; align-content: start; gap: 10px; }
.pv-stack { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--stage); }
.pv-it { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity var(--t-fast) var(--ease-std); }
.pv-it.is-cur { opacity: 1; }
.pv-m, .pv-m > .vm, .pv-m > .st { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-chip { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: var(--stage); color: var(--text-1); font-size: var(--fs-12); font-weight: var(--fw-semi); }
.pv-note { font-size: var(--fs-13); line-height: 18px; color: var(--text-3); }
.mega-all { display: flex; align-items: center; gap: 6px; margin: 6px 8px 0; padding: 12px 0 4px; border-top: 1px solid var(--line); font-size: var(--fs-14); font-weight: var(--fw-semi); color: var(--accent-text); }
.mega-all:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1199px) { .mega-in.has-pv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .mega-pv { display: none; } }
@media (max-width: 899px) { .mega { display: none !important; } }

/* ---------------------------------------------------------------- the phone menu (drawer) */
.sdr-veil { position: fixed; inset: 0; z-index: var(--z-veil); background: var(--veil); opacity: 0; transition: opacity var(--t-panel) var(--ease-out); }
.sdr-veil.is-open { opacity: 1; }
.sdr { position: fixed; z-index: var(--z-sheet); left: 0; top: 0; bottom: 0; width: min(88vw, 380px); display: flex; flex-direction: column; background: var(--surface-1); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform var(--t-panel) var(--ease-out); }
.sdr.is-open { transform: none; }
.sdr-top { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); padding: 0 4px 0 16px; flex: none; }
.sdr-top .brand-lockup { height: 22px; }
.sdr-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 16px; display: grid; align-content: start; gap: 2px; }
.sdr-h { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 48px; padding: 0 12px; border-radius: var(--r-md); font-size: var(--fs-17); font-weight: var(--fw-semi); color: var(--text-1); text-align: left; }
.sdr-h:hover { background: var(--surface-2); }
.sdr-h .chev { margin-left: auto; color: var(--text-3); transition: transform var(--t-fast) var(--ease); }
.sdr-h[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sdr-p { display: grid; gap: 2px; padding: 0 0 8px 8px; }
.sdr-r { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--r-md); font-size: var(--fs-15); color: var(--text-2); }
.sdr-r:hover { background: var(--surface-2); color: var(--text-1); }
.sdr-r .i { color: var(--text-3); }
.sdr-r.all { color: var(--accent-text); font-weight: var(--fw-semi); }
.sdr-foot { flex: none; display: grid; gap: 8px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .sdr, .sdr-veil { display: none !important; } }

/* ---------------------------------------------------------------- dialogs: veil, search, the pop-up */
.dlg-veil { position: fixed; inset: 0; z-index: var(--z-dialog-veil); background: var(--veil); animation: fade-in var(--t-fast) var(--ease-std); }
.srch { position: fixed; z-index: var(--z-dialog); left: 50%; top: 10vh; transform: translateX(-50%); width: min(760px, calc(100vw - 32px)); max-height: min(680px, 82vh); display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface-1); outline: 1px solid var(--line-strong); outline-offset: -1px; overflow: hidden; animation: srch-in var(--t-fast) var(--ease-out); }
.srch-top { display: flex; align-items: center; gap: 8px; padding: 12px; flex: none; }
.srch-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 18px; border-radius: var(--r-pill); background: var(--surface-2); outline: 1px solid var(--line); outline-offset: -1px; color: var(--text-3); }
.srch-field:focus-within { outline: 2px solid var(--accent-line); outline-offset: -2px; }
.srch-field input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; font-size: var(--fs-17); color: var(--text-1); }
.srch-field input::placeholder { color: var(--text-3); }
.srch-field input:focus-visible { box-shadow: none; }
.srch-clear { width: 36px; height: 36px; border-radius: var(--r-pill); display: grid; place-items: center; color: var(--text-2); }
.srch-clear:hover { background: var(--surface-3); }
.srch-x { width: 52px; height: 52px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-1); display: grid; place-items: center; flex: none; }
.srch-x:hover { background: var(--surface-3); }
.srch-fs { display: flex; gap: 8px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
.srch-fs::-webkit-scrollbar { display: none; }
.sr-f { height: 32px; padding: 0 14px; border-radius: var(--r-pill); outline: 1px solid var(--line-strong); outline-offset: -1px; color: var(--text-2); font-size: var(--fs-13); font-weight: var(--fw-semi); white-space: nowrap; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.sr-f:hover { color: var(--text-1); background: var(--surface-2); }
.sr-f[aria-pressed="true"] { background: var(--text-1); color: var(--ink); outline-color: transparent; }
.srch-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 12px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.srch-body { display: grid; }
.sr-gh { padding: 14px 8px 6px; font-size: var(--fs-13); font-weight: var(--fw-medium); color: var(--text-3); }
.sr-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sr-card { position: relative; display: grid; align-content: start; gap: 2px; padding-bottom: 12px; border-radius: var(--r-md); background: var(--surface-2); outline: 1px solid var(--line); outline-offset: -1px; overflow: hidden; transition: background-color var(--t-fast) var(--ease); }
.sr-card:hover, .sr-card.is-act { background: var(--surface-3); outline-color: var(--line-hover); }
.sr-card-m { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--stage); margin-bottom: 8px; }
.sr-card-m img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sr-card-t { padding: 0 12px; font: var(--fw-heavy) var(--fs-17)/1.1 var(--font-title); text-transform: uppercase; letter-spacing: var(--d-track-small); color: var(--text-1); }
.sr-card-d { padding: 0 12px; font-size: var(--fs-12); line-height: 1.4; color: var(--text-3); }
.sr-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 60px; padding: 8px; border-radius: var(--r-md); transition: background-color var(--t-fast) var(--ease); }
.sr-row:hover, .sr-row.is-act { background: var(--surface-2); }
.sr-tile { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--surface-3); color: var(--text-1); display: grid; place-items: center; }
.sr-tile .i { width: 20px; height: 20px; }
.sr-tile .mk { font-size: var(--fs-15); }
.sr-tx { display: grid; min-width: 0; }
.sr-t { display: flex; align-items: center; font-size: var(--fs-15); font-weight: var(--fw-semi); line-height: 20px; color: var(--text-1); }
.sr-d { font-size: var(--fs-13); line-height: 18px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-tag { font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; }
.sr-none { padding: 24px 8px; font-size: var(--fs-15); color: var(--text-2); text-align: center; }
.srch-foot { display: flex; gap: 20px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: var(--fs-12); color: var(--text-3); flex: none; }
.srch-foot .kbd { margin-right: 6px; }
@media (max-width: 899px) {
  .srch { left: 0; right: 0; top: 24px; bottom: 0; transform: none; width: auto; max-height: none; border-radius: var(--r-lg) var(--r-lg) 0 0; animation: sheet-up var(--t-sheet) var(--ease-out); }
  .srch-top { padding: 8px 8px 8px 12px; }
  .srch-field { height: 48px; }
  .srch-x { width: 48px; height: 48px; }
  .sr-f { height: 40px; }
  .sr-cards { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .sr-cards > * { scroll-snap-align: start; }
  .sr-tag, .srch-foot { display: none; }
  .sr-row { grid-template-columns: 44px minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- toasts and tooltips */
.toasts { position: fixed; z-index: var(--z-toast); right: 24px; bottom: 24px; display: grid; justify-items: end; gap: 8px; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; max-width: var(--toast-w); padding: 8px 16px 8px 14px; border-radius: var(--r-md); background: var(--stage); outline: 1px solid var(--line-strong); outline-offset: -1px; box-shadow: none; color: var(--text-1); font-size: var(--fs-14); font-weight: var(--fw-medium); line-height: 1.4; }
.toasts .toast { pointer-events: auto; animation: rise-in var(--t-fast) var(--ease-out); }
.toasts .toast.is-out { opacity: 0; transform: translateY(6px); transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.toast .i { width: 18px; height: 18px; color: var(--ok); flex: none; }
.toast .i.ac { color: var(--accent-text); }
.toast .cr .g { color: var(--credit-glyph); }
.srch:focus-visible, .sdr:focus-visible { box-shadow: none; }
.toast .btn { margin-left: 4px; }
@media (max-width: 899px) {
  .toasts { left: 16px; right: 16px; justify-items: center; bottom: calc(24px + var(--fab-h) + env(safe-area-inset-bottom)); }
  .toast { font-size: var(--fs-15); }
}
.tip { position: fixed; z-index: var(--z-tip); left: 0; top: 0; max-width: 260px; padding: 5px 9px; border-radius: var(--r-sm); background: var(--stage); outline: 1px solid var(--line-strong); outline-offset: -1px; color: var(--text-1); font-size: var(--fs-12); font-weight: var(--fw-medium); line-height: 16px; white-space: nowrap; pointer-events: none; animation: fade-in 120ms var(--ease-std); }
.tip[hidden] { display: none; }

/* ---------------------------------------------------------------- section header and View all */
.shd { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: var(--sec-head); }
.shd-tx { min-width: 0; }
.shd-t { color: var(--accent-text); }
.shd-t a { color: inherit; text-decoration: none; }
.shd-t a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.shd.plain .shd-t { color: var(--text-1); }
.shd-s { margin-top: 4px; font-size: var(--fs-14); line-height: 20px; color: var(--text-3); text-wrap: pretty; }
.shd-end { flex: none; display: flex; align-items: center; gap: 8px; }
@media (max-width: 899px) { .shd { gap: 12px; } .shd-s { font-size: var(--fs-15); } }
.vall-w { display: flex; justify-content: center; margin-top: 24px; }
.vall { display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 16px 0 20px; border-radius: var(--r-md); background: var(--accent-wash); color: var(--accent-text); font-size: 16px; font-weight: var(--fw-semi); letter-spacing: -0.01em; white-space: nowrap; transition: background-color var(--t-hover) var(--ease-std); }
.vall:hover { background: rgba(250, 94, 32, 0.2); }
.vall-w.on-wall { position: relative; z-index: 4; margin-top: -24px; }

/* ---------------------------------------------------------------- live UI snippets */
.snp { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 8px 12px; border-radius: var(--r-md); background: var(--stage); outline: 1px solid var(--line-strong); outline-offset: -1px; color: var(--text-1); font-size: var(--fs-13); line-height: 18px; font-weight: var(--fw-medium); pointer-events: none; white-space: nowrap; }
.snp.tl { top: 12px; left: 12px; } .snp.tr { top: 12px; right: 12px; } .snp.bl { bottom: 12px; left: 12px; } .snp.br { bottom: 12px; right: 12px; }
.snp.ol { top: 20px; left: -28px; } .snp.or { bottom: 28px; right: -28px; }
.snp-chat { flex-direction: column; align-items: flex-start; gap: 3px; width: max-content; max-width: min(300px, calc(100% - 24px)); padding: 10px 14px 11px; white-space: normal; border-radius: var(--r-lg) var(--r-lg) var(--r-lg) var(--r-xs); }
.snp-chat.you { border-radius: var(--r-lg) var(--r-lg) var(--r-xs) var(--r-lg); background: var(--surface-2); }
.snp-who { font-size: var(--fs-11); font-weight: var(--fw-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.snp-chat.you .snp-who { color: var(--text-3); }
.snp-dots { display: none; gap: 4px; align-items: center; height: 18px; }
.snp-dots i { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--text-2); animation: blink 1.1s var(--ease) infinite; }
.snp-dots i:nth-child(2) { animation-delay: 0.15s; } .snp-dots i:nth-child(3) { animation-delay: 0.3s; }
.snp-chat.is-typing .snp-dots { display: inline-flex; }
.snp-chat.is-typing .snp-txt { display: none; }
.snp-txt { font-size: var(--fs-14); line-height: 19px; color: var(--text-1); }
.snp-plan { gap: 10px; padding: 6px 6px 6px 14px; border-radius: var(--r-pill); }
.snp-pt { font-weight: var(--fw-bold); }
.snp-ps { color: var(--text-3); }
.snp-go { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-weight: var(--fw-bold); }
.snp-go .cr .g { color: currentColor; }
.snp-go::after { content: ""; position: absolute; inset: 0; border-radius: inherit; outline: 2px solid var(--accent); outline-offset: 0; opacity: 0; }
.snp-plan.is-live .snp-go { animation: go-pulse 6s var(--ease) infinite; }
.snp-plan.is-live .snp-go::after { animation: go-ring 6s var(--ease) infinite; }
@keyframes go-pulse { 0%, 62%, 74%, 100% { transform: none; } 66% { transform: scale(1.08); } }
@keyframes go-ring { 0%, 63% { opacity: 0; outline-offset: 0; } 64% { opacity: 1; outline-offset: 0; } 78%, 100% { opacity: 0; outline-offset: 10px; } }
.snp-st { height: 34px; padding: 0 14px 0 10px; border-radius: var(--r-pill); }
.snp-st .spin { width: 14px; height: 14px; border-width: 2px; border-color: var(--line-strong); border-top-color: var(--accent-text); }
.snp-st.ok .i { color: var(--ok); }
.snp-st.fail .i { color: var(--accent-text); }
.snp-cr { height: 30px; padding: 0 12px; border-radius: var(--r-pill); font-variant-numeric: tabular-nums; }
.snp-cl { color: var(--text-3); }
.snp.is-step .snp-stt { animation: fade-in var(--t-fast) var(--ease-std); }
@media (max-width: 899px) { .snp { max-width: calc(100% - 16px); } .snp.tl, .snp.ol { top: 8px; left: 8px; } .snp.tr { top: 8px; right: 8px; } .snp.bl { bottom: 8px; left: 8px; } .snp.br, .snp.or { bottom: 8px; right: 8px; } .snp-chat { max-width: calc(100% - 16px); } .snp-plan .snp-ps { display: none; } .snp-st { white-space: normal; height: auto; min-height: 30px; padding-top: 5px; padding-bottom: 5px; } }

/* ---------------------------------------------------------------- media cards (the promo row) */
.mcd { position: relative; width: var(--mcd-w, 512px); }
.mcd-m { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); isolation: isolate; }
.mcd-m > .vm { position: absolute; inset: 0; }
.mcd-t { margin-top: 12px; font: var(--fw-heavy) 20px/1.1 var(--font-title); text-transform: uppercase; letter-spacing: var(--d-track-small); color: var(--text-1); transition: color var(--t-hover) var(--ease-std); }
.mcd-a { color: inherit; }
.mcd-a::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: var(--r-md); }
.mcd-a:focus-visible { box-shadow: none; }
.mcd-a:focus-visible::after { box-shadow: var(--focus); }
.mcd:hover .mcd-t { color: var(--accent-text); }
.mcd-s { margin-top: 4px; font-size: var(--fs-14); line-height: 20px; color: var(--text-3); }
@media (max-width: 899px) { .mcd { width: min(82vw, 340px); } .mcd-t { font-size: 19px; } .mcd-s { font-size: var(--fs-15); } }

/* ---------------------------------------------------------------- bare media tiles (compositions) */
.mtl { position: relative; width: min(100%, var(--mtl-w)); min-width: 0; isolation: isolate; }
.mtl-m { position: absolute; inset: 0; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); outline: 1px solid var(--line-on-media); outline-offset: -1px; }
.mtl-m > .vm, .mtl-m > .st { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mtl-chip { position: absolute; z-index: 2; left: 10px; bottom: 10px; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: var(--stage); color: var(--text-1); font-size: var(--fs-12); font-weight: var(--fw-semi); white-space: nowrap; }

/* ---------------------------------------------------------------- tool cards */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap-tools); }
.tcd { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; column-gap: 12px; min-height: 126px; padding: 16px; border-radius: var(--r-md); background: var(--surface-2); outline: 1px solid var(--line); outline-offset: -1px; transition: background-color var(--t-hover) var(--ease-std), outline-color var(--t-hover) var(--ease-std); }
.tcd:hover { background: var(--surface-3); outline-color: var(--line-hover); }
.tcd-i { grid-column: 1; grid-row: 1; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--text-1); display: grid; place-items: center; }
.tcd:hover .tcd-i { background: var(--surface-3-hover); }
.tcd-b { grid-column: 1; grid-row: 2; align-self: end; display: grid; gap: 3px; padding-top: 12px; min-width: 0; }
.tcd-t { display: flex; align-items: center; font-size: var(--fs-15); font-weight: var(--fw-semi); line-height: 20px; color: var(--text-1); }
.tcd-d { font-size: var(--fs-13); line-height: 18px; color: var(--text-3); }
.tcd-p { grid-column: 2; grid-row: 1 / span 2; align-self: center; position: relative; width: 88px; height: 88px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3); }
.tcd-p img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) { .tgrid { grid-template-columns: 1fr 1fr; gap: 8px; } .tcd { min-height: 112px; padding: 12px; grid-template-columns: minmax(0, 1fr); } .tcd-p { display: none; } .tcd-d { font-size: var(--fs-13); } }

/* ---------------------------------------------------------------- walls and the hover reveal */
.wl-w { position: relative; }
.wl-w.cap > .wl { max-height: var(--wall-cap); overflow: hidden; }
.wl-w.cap > .wl.reel5 { max-height: var(--wall-cap-reel); }
.wl.mas4, .wl.mas6 { columns: 4; column-gap: var(--gap-wall); }
.wl.mas6 { columns: 6; }
.wl.mas4 > *, .wl.mas6 > * { break-inside: avoid; margin-bottom: var(--gap-wall); }
.wl.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-wall); }
.wl.reel5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap-reel); }
.wl-t { position: relative; display: block; overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); isolation: isolate; }
.wl-t > .vm, .wl-t > .st { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wl-a { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.wl-a:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-text), inset 0 0 0 4px var(--canvas); }
.rv { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: 10px; background: var(--scrim-reveal); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--t-hover) var(--ease-std), visibility var(--t-hover); }
.wl-t:hover .rv, .wl-t:focus-within .rv, .wl-t.is-hover .rv, .wl-t.is-open .rv { opacity: 1; visibility: visible; }
.rv-chip { align-self: flex-start; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: var(--stage); color: var(--text-1); font-size: var(--fs-12); font-weight: var(--fw-semi); white-space: nowrap; }
.rv-b { display: grid; gap: 8px; transform: translateY(8px); transition: transform var(--t-panel) var(--ease-out); }
.wl-t:hover .rv-b, .wl-t:focus-within .rv-b, .wl-t.is-hover .rv-b, .wl-t.is-open .rv-b { transform: none; }
.rv-p { font-size: var(--fs-13); line-height: 18px; color: var(--text-on-media); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rv-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.rv-go { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 12px; border-radius: var(--r-md); background: var(--ink-btn); color: var(--on-ink-btn); font-size: var(--fs-14); font-weight: var(--fw-semi); white-space: nowrap; transition: background-color var(--t-fast) var(--ease); }
.rv-go:hover { background: var(--paper); }
.rv-in { width: 46px; height: 68px; flex: none; border-radius: var(--r-sm); object-fit: cover; outline: 1px solid var(--line-on-media-strong); outline-offset: -1px; background: var(--surface-3); margin-left: auto; color: transparent; font-size: 0; }
.rv-in[width="64"] { width: 64px; height: 36px; }
.wl.reel5 .rv-go { flex: 1; justify-content: center; }
@media (max-width: 1199px) and (min-width: 900px) { .wl.mas6 { columns: 4; } .wl.reel5 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .wl.mas4, .wl.mas6 { columns: 2; }
  .wl.grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wl.reel5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-wall); }
  .wl-w.cap > .wl, .wl-w.cap > .wl.reel5 { max-height: 1200px; }
  .rv-go { height: 44px; }
}

/* ---------------------------------------------------------------- carousels */
.car { position: relative; --car-gap: var(--gap-row); }
.car.g-reel { --car-gap: var(--gap-reel); } .car.g-wall { --car-gap: var(--gap-wall); } .car.g-tools { --car-gap: var(--gap-tools); }
.car-tr { display: flex; gap: var(--car-gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; scroll-padding: 0 var(--site-gutter); }
.car-tr::-webkit-scrollbar { display: none; }
.car-tr:focus-visible { box-shadow: none; outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: var(--r-md); }
.car-it { flex: none; scroll-snap-align: start; }
.car-b { position: absolute; z-index: 5; top: var(--car-mid, 50%); width: 40px; height: 40px; margin-top: -20px; border-radius: var(--r-pill); background: var(--surface-3); outline: 1px solid var(--line-strong); outline-offset: -1px; color: var(--text-1); display: grid; place-items: center; transition: opacity var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.car-b:hover { background: var(--surface-3-hover); }
.car-b.prev { left: 8px; } .car-b.next { right: 8px; }
.car-b[disabled] { opacity: 0; pointer-events: none; }
.car.no-scroll .car-b, .car.no-scroll .car-dots { display: none; }
.car-nav { display: flex; gap: 8px; }
.car-nav .car-b { position: static; margin: 0; }
.car-nav .car-b[disabled] { opacity: 0.35; pointer-events: none; }
.car-dots { display: none; justify-content: center; gap: 6px; margin-top: 14px; }
.car-dots i { display: block; width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--line-hover); transition: width var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.car-dots i.is-cur { width: 18px; background: var(--text-1); }
.car.show-dots .car-dots { display: flex; }
@media (max-width: 899px) {
  .car-b { display: none; }
  .car-dots { display: flex; }
  .car-tr { margin: 0 calc(-1 * var(--site-gutter)); padding: 0 var(--site-gutter); scroll-padding: 0 var(--site-gutter); }
}

/* ---------------------------------------------------------------- tag cloud */
.tags-sec { display: grid; justify-items: center; gap: 28px; padding: var(--sec-gap) 0 0; }
.tags-h { text-align: center; max-width: 960px; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 1120px; }
.tg { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-15); font-weight: var(--fw-medium); white-space: nowrap; transition: background-color var(--t-hover) var(--ease-std), color var(--t-hover) var(--ease-std); }
.tg:hover { background: var(--surface-3); color: var(--text-1); }
@media (max-width: 899px) { .tg { height: 44px; } }

/* ---------------------------------------------------------------- feature banners */
.bnr { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; min-height: 320px; padding: 32px; border-radius: var(--r-lg); background: var(--stage); outline: 1px solid var(--line); outline-offset: -1px; overflow: hidden; }
.bnr-night { background: var(--surface-1); }
.bnr-tangerine { background: var(--accent); outline: 0; --focus: 0 0 0 2px var(--accent), 0 0 0 4px var(--ink); }
.bnr-tx { position: relative; z-index: 1; }
.bnr-eb { margin-bottom: 12px; font-size: var(--fs-13); font-weight: var(--fw-bold); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); }
.bnr-t { margin-bottom: 14px; }
.bnr-s { max-width: 440px; margin-bottom: 24px; font-size: 16px; line-height: 1.5; color: var(--text-2); }
.bnr-tangerine .bnr-eb, .bnr-tangerine .bnr-t, .bnr-tangerine .bnr-s { color: var(--ink); }
.bnr-m { position: relative; min-height: 256px; }
@media (max-width: 899px) { .bnr { grid-template-columns: 1fr; gap: 20px; padding: 20px; min-height: 0; } .bnr-s { font-size: var(--fs-15); } }

/* ---------------------------------------------------------------- composers: the genre composer, chips, popovers, Go */
.gcp { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; width: 100%; min-width: 0; }
.gcp-f { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px; border-radius: var(--r-lg); background: var(--surface-2); outline: 1px solid var(--line-strong); outline-offset: -1px; transition: outline-color var(--t-fast) var(--ease); }
.gcp-f:focus-within { outline-color: var(--accent-line); }
.gcp textarea { width: 100%; min-height: 56px; resize: none; border: 0; background: transparent; padding: 6px 8px 2px; font-size: 16px; line-height: 24px; color: var(--text-1); }
.gcp textarea::placeholder { color: var(--text-3); }
.gcp textarea:focus-visible { box-shadow: none; }
.gcp-row { display: flex; align-items: flex-end; gap: 12px; }
.gcp-chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gcp-end { display: flex; align-items: center; gap: 6px; }
.gch-w { position: relative; display: inline-flex; }
.gch { display: inline-flex; align-items: center; gap: 6px; height: var(--chip-h); padding: 0 10px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--text-1); font-size: var(--fs-13); font-weight: var(--fw-medium); white-space: nowrap; transition: background-color var(--t-fast) var(--ease); }
.gch:hover, .gch[aria-expanded="true"] { background: var(--surface-3-hover); }
.gch .i { color: var(--text-2); }
.gch .chev { opacity: 0.7; transition: transform var(--t-fast) var(--ease); }
.gch[aria-expanded="true"] .chev { transform: rotate(180deg); }
.gch:not(:has(.gch-v)) { width: var(--chip-h); padding: 0; justify-content: center; }
.gch.ask { background: transparent; outline: 1px solid var(--line-strong); outline-offset: -1px; color: var(--text-2); }
.gch.ask:hover { background: var(--surface-3); color: var(--text-1); }
.pop { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: var(--z-menu); min-width: 300px; display: grid; gap: 2px; padding: 6px; border-radius: var(--r-md); background: var(--surface-1); outline: 1px solid var(--line-strong); outline-offset: -1px; animation: pop-in var(--t-fast) var(--ease-out); }
.pop-o { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; gap: 12px; align-items: center; min-height: 44px; padding: 6px 10px; border-radius: var(--r-sm); color: var(--text-1); font-size: var(--fs-14); font-weight: var(--fw-medium); text-align: left; }
.pop-o:hover, .pop-o.is-act, .pop-o:focus-visible { background: var(--surface-2); box-shadow: none; }
.pop-t { display: grid; }
.pop-m { font-size: var(--fs-12); font-weight: var(--fw-regular); color: var(--text-3); }
.pop-o .cr { font-size: var(--fs-13); color: var(--text-2); }
.pop-ck { opacity: 0; color: var(--accent-text); }
.pop-o[aria-selected="true"] .pop-ck { opacity: 1; }
.gobtn { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; min-width: 112px; height: 64px; padding: 0 22px; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); flex: none; transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.gobtn:hover { background: var(--accent-hover); }
.gobtn:active { background: var(--accent-pressed); transform: scale(0.98); }
.gobtn-l { font: var(--fw-heavy) 24px/0.95 var(--font-title); text-transform: uppercase; letter-spacing: 0.02em; }
.gobtn-c { font-size: var(--fs-13); font-weight: var(--fw-bold); }
.gobtn-c .cr .g, .gobtn .cr .g { color: currentColor; }
.gobtn.md { min-width: 112px; height: 64px; }
.gcp-studio .gobtn:not(.sm):not(.md) { width: var(--go-w); height: var(--go-h); }
.gobtn.sm { display: flex; align-items: center; min-width: 0; height: 44px; gap: 8px; padding: 0 16px; }
.gobtn.sm .gobtn-l { font-size: 20px; }
.gobtn.is-bump { animation: go-bump 320ms var(--ease-out); }
@keyframes go-bump { 40% { transform: scale(1.04); } }
.gcp-note { display: flex; align-items: center; gap: 8px; padding: 8px 6px 0; font-size: var(--fs-13); color: var(--text-3); }
.gcp-note .i { color: var(--ok); flex: none; }
.gcp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 2px; }
.gct { display: flex; align-items: center; gap: 10px; height: 52px; padding: 6px 12px 6px 6px; border-radius: var(--r-md); background: var(--surface-2); outline: 1px solid var(--line); outline-offset: -1px; text-align: left; transition: background-color var(--t-fast) var(--ease); }
.gct:hover { background: var(--surface-3); }
.gct-th { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; flex: none; }
.gct-tx { display: grid; min-width: 0; }
.gct-l { font-size: var(--fs-11); font-weight: var(--fw-semi); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.gct-v { font-size: var(--fs-14); font-weight: var(--fw-semi); color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcp-studio { max-width: var(--composer-w); }
.gcp-studio .gcp-f { padding: 8px; }
.gcp-studio .gcp-row { align-items: center; }
.gcp-chat .gcp-row { align-items: center; }
.send2 { width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--ink-btn); color: var(--on-ink-btn); display: grid; place-items: center; transition: background-color var(--t-fast) var(--ease); }
.send2:hover { background: var(--paper); }
.send2 .i { stroke-width: 2.2; }
@media (max-width: 899px) {
  .gcp-row { flex-wrap: wrap; }
  .gcp-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .gcp-chips::-webkit-scrollbar { display: none; }
  .gch { font-size: var(--fs-15); }
  .gcp-hero .gobtn, .gcp-studio .gobtn:not(.sm) { display: flex; justify-content: center; align-items: center; width: 100%; height: 56px; gap: 14px; }
  .gcp textarea { font-size: var(--fs-17); }
  .gcp-tiles { grid-template-columns: 1fr 1fr; }
  .gcp-note { font-size: var(--fs-13); }
  .pop { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); min-width: 0; z-index: var(--z-dialog); }
  .gcp-chat .gcp-row { flex-wrap: nowrap; }
  .send2 { width: 44px; height: 44px; }
}

/* ---------------------------------------------------------------- the sticky composer bar and the floating Create */
.stk { position: fixed; z-index: var(--z-sticky); left: 50%; bottom: 16px; width: min(var(--sticky-w), calc(100vw - 32px)); transform: translate(-50%, calc(100% + 24px)); visibility: hidden; transition: transform var(--t-panel) var(--ease-out), visibility 0s linear var(--t-panel); }
.stk.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform var(--t-panel) var(--ease-out), visibility 0s; }
.stk-in { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 10px 0 16px; border-radius: var(--r-lg); background: var(--surface-1); outline: 1px solid var(--line-strong); outline-offset: -1px; }
.stk-in:focus-within { outline-color: var(--accent-line); }
.stk-ic { color: var(--accent-text); display: grid; place-items: center; }
.stk-in input { flex: 1; min-width: 0; height: 40px; background: transparent; border: 0; font-size: var(--fs-15); color: var(--text-1); }
.stk-in input::placeholder { color: var(--text-3); }
.stk-in input:focus-visible { box-shadow: none; }
.fab { display: none; }
@media (max-width: 899px) {
  .stk { display: none; }
  .fab { position: fixed; z-index: var(--z-fab); left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; height: var(--fab-h); padding: 0 24px 0 18px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: var(--fs-17); font-weight: var(--fw-bold); transform: translateX(-50%); transition: transform var(--t-panel) var(--ease-out), opacity var(--t-panel) var(--ease-out); }
  .fab .i { stroke-width: 2.2; }
  .fab.is-off { transform: translate(-50%, calc(100% + 32px)); opacity: 0; pointer-events: none; }
}

/* ---------------------------------------------------------------- the fan of example films */
.fan { position: relative; width: 100%; height: calc(var(--fan-w) * 9 / 16 + 8px); }
.fan-it { position: absolute; left: 50%; top: 4px; width: var(--fan-w); aspect-ratio: 16 / 9; margin-left: calc(var(--fan-w) / -2); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); outline: 1px solid var(--line-on-media); outline-offset: -1px; transition: transform 700ms var(--ease-out), opacity 700ms var(--ease-out); }
.fan-it > .vm { position: absolute; inset: 0; }
.fan-it[data-p="0"] { z-index: 3; transform: none; }
.fan-it[data-p="-1"] { z-index: 2; transform: translateX(-64%) scale(0.72); }
.fan-it[data-p="1"] { z-index: 2; transform: translateX(64%) scale(0.72); }
.fan-it[data-p="-2"] { z-index: 1; transform: translateX(-112%) scale(0.54); }
.fan-it[data-p="2"] { z-index: 1; transform: translateX(112%) scale(0.54); }
.fan-it[data-p="x"] { z-index: 0; opacity: 0; transform: scale(0.4); }
@media (max-width: 899px) { .fan { --fan-w: 62vw !important; } .fan-it[data-p="-2"], .fan-it[data-p="2"] { opacity: 0; } }

/* ---------------------------------------------------------------- the giant tangerine footer */
.gft { margin-top: var(--sec-gap); background: var(--accent); color: var(--ink); --focus: 0 0 0 2px var(--accent), 0 0 0 4px var(--ink); }
.gft-in { width: 100%; max-width: calc(var(--site-max) + 2 * var(--site-gutter)); margin: 0 auto; padding: 40px var(--site-gutter) 24px; display: grid; gap: 40px; }
.gft-line { font: var(--fw-heavy) var(--d-foot)/0.86 var(--font-title); text-transform: uppercase; letter-spacing: -0.01em; color: var(--ink); max-width: 11ch; font-synthesis: none; }
.gft-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.gft-col h2 { margin-bottom: 10px; font-size: var(--fs-14); font-weight: var(--fw-bold); letter-spacing: 0.02em; color: var(--ink); }
.gft-col a { display: inline-block; padding: 5px 0; font-size: var(--fs-15); font-weight: var(--fw-medium); line-height: 1.4; color: var(--ink); }
.gft-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gft-bot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid rgba(11, 11, 12, 0.24); }
.gft-co { max-width: 760px; font-size: var(--fs-13); line-height: 1.5; color: var(--ink); }
.motion-btn.on-tangerine { color: var(--ink); outline-color: rgba(11, 11, 12, 0.5); }
@media (max-width: 899px) {
  .gft-in { padding: 32px 16px calc(96px + env(safe-area-inset-bottom)); gap: 28px; }
  .gft-line { font-size: var(--d-foot-ph); }
  .gft-cols { grid-template-columns: 1fr 1fr; gap: 20px 16px; }
  .gft-col a { padding: 11px 0; font-size: var(--fs-15); }
  .gft-bot { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------- the app sidebar (genre) */
.aps { display: flex; flex-direction: column; gap: 2px; min-height: 0; height: 100%; padding: 8px; background: var(--canvas); border-right: 1px solid var(--line); }
.aps-top { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 2px 0 8px; flex: none; }
.aps-top .brand-lockup { height: 22px; }
.aps-create { display: flex; align-items: center; gap: 10px; height: 40px; margin: 4px 0 8px; padding: 0 10px 0 12px; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); font-size: var(--fs-14); font-weight: var(--fw-bold); flex: none; transition: background-color var(--t-fast) var(--ease); }
.aps-create:hover { background: var(--accent-hover); }
.aps-create .i { stroke-width: 2.2; }
.aps-create .kbd { margin-left: auto; background: rgba(11, 11, 12, 0.16); color: var(--ink); }
.aps-nav { display: grid; gap: 2px; flex: none; }
.aps-i { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: var(--r-md); color: var(--text-2); font-size: var(--fs-14); font-weight: var(--fw-medium); text-align: left; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.aps-i .i { width: 18px; height: 18px; }
.aps-i:hover { background: var(--surface-2); color: var(--text-1); }
.aps-i[aria-current="page"] { background: var(--surface-2); color: var(--text-1); }
.aps-i[aria-current="page"] .i { color: var(--accent-text); }
.aps-i .n, .aps-i .kbd { margin-left: auto; }
.aps-i .n { font-size: var(--fs-12); color: var(--text-3); font-variant-numeric: tabular-nums; }
.aps-scroll { flex: 1; min-height: 0; overflow-y: auto; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); scrollbar-width: none; }
.aps-lab { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 4px 10px; font-size: var(--fs-12); font-weight: var(--fw-semi); color: var(--text-3); }
.aps-lab .btn-icon.sm { width: 28px; height: 28px; }
.aps-p { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px 0 6px; border-radius: var(--r-md); color: var(--text-1); font-size: var(--fs-13); font-weight: var(--fw-medium); white-space: nowrap; }
.aps-p:hover, .aps-p.is-cur { background: var(--surface-2); }
.aps-p img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex: none; }
.aps-p span:not(.n) { overflow: hidden; text-overflow: ellipsis; }
.aps-p .n { margin-left: auto; font-size: var(--fs-12); color: var(--text-3); }
.aps-promo { display: grid; gap: 6px; margin: 8px 0; padding: 8px 8px 10px; border-radius: var(--r-md); background: var(--surface-1); outline: 1px solid var(--line); outline-offset: -1px; flex: none; }
.aps-pm { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--stage); }
.aps-pm > .vm { position: absolute; inset: 0; }
.aps-pt { font-size: var(--fs-13); font-weight: var(--fw-bold); color: var(--text-1); }
.aps-pd { font-size: var(--fs-12); line-height: 1.4; color: var(--text-3); margin-bottom: 4px; }
.aps-foot { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); flex: none; }
.aps-foot .pill-bal { justify-self: start; }
.aps-me { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: var(--r-md); }
.aps-me:hover { background: var(--surface-2); }
.aps-who { display: grid; line-height: 1.3; }
.aps-who b { font-size: var(--fs-13); font-weight: var(--fw-semi); }
.aps-who span { font-size: var(--fs-12); color: var(--text-3); }

/* ---------------------------------------------------------------- the old app shell, restyled into the genre */
.side { background: var(--canvas); }
.side-new { background: var(--accent); color: var(--on-accent); font-weight: var(--fw-bold); outline: 0; }
.side-new:hover { background: var(--accent-hover); }
.side-new .kbd { background: rgba(11, 11, 12, 0.16); color: var(--ink); }
.nav-item { border-radius: var(--r-md); font-size: var(--fs-14); }
.nav-item[aria-current="page"] { background: var(--surface-2); }
.nav-item[aria-current="page"] .i { color: var(--accent-text); }

/* ---------------------------------------------------------------- reduced motion and Pause motion */
@media (prefers-reduced-motion: reduce) {
  .mega, .srch, .pop, .toasts .toast, .tip, .dlg-veil, .snp, .snp-stt { animation: none !important; }
  .snp *, .snp-go, .snp-go::after { animation: none !important; }
  .stk, .fab, .sdr, .sdr-veil, .fan-it, .rv, .rv-b { transition: none !important; }
}
.motion-off .snp *, .motion-off .snp-go, .motion-off .snp-go::after { animation: none !important; }
.motion-off .fan-it { transition: none; }

/* Recreate on a clip whose model is not on the shelf names the shelf model the plan uses (fix-1) */
.rv-go > span { display: grid; line-height: 1.15; }
.rv-go:has(.rv-gw) { height: auto; min-height: 36px; padding-top: 5px; padding-bottom: 5px; }
.rv-gw { font-size: var(--fs-11); font-weight: var(--fw-medium); opacity: 0.86; white-space: nowrap; }

/* Snippets in the flow (pos "in", the How banner) keep their final size from the first frame (fix-1): a hidden copy
   of the full sentence, or of the longest status, sits under the typed or stepped text in one grid cell, so typing
   and stepping never move anything. Snippets laid over media are absolute, move nothing, and grow as they type. */
.snp-tw { display: grid; min-width: 0; }
.snp-tw > * { grid-area: 1 / 1; }
.snp-g { visibility: hidden; }
.snp:not(.in) .snp-g { display: none; }
.snp-chat .snp-g { font-size: var(--fs-14); line-height: 19px; }
.snp-chat .snp-dots { align-self: start; }
.snp-chat.in.is-typing .snp-txt { display: block; visibility: hidden; }

/* fix-1: 16 px side gutters on phones everywhere (the nav, the strip): the last control sits 16 px from the edge, and
   the 44 px menu button's icon lines up with the 16 px gutter */
@media (max-width: 899px) {
  .snav-in { padding: 0 16px 0 6px; }
  .ann { padding: 0 44px 0 16px; }
}
/* a settings row that opens its setting in place is a button (fix-1): it looks exactly like a row link */
button.row-i { width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; cursor: pointer; }
button.row-i:hover { background: var(--surface-2); }
/* fix-1 (phones): every composer chip in view (they wrap instead of running under the field's edge), and text people
   read is at least 14 px */
@media (max-width: 899px) {
  .gcp-chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .tcd-d, .gcp-note, .hr-try-l, .pre-d, .rv-p, .ax-stc-d, .pr-mk-d, .ax-used figcaption { font-size: var(--fs-14); line-height: 20px; }
}

/* ==================================================================================================================
   THE SITE WALL, THE OFFER TOAST AND THE TOASTS (site-wall/spec.md, 18 November 2026; helpers in src/lib.py)
   ================================================================================================================== */

/* ---------------------------------------------------------------- a wall tile (lib.wall_tile2)
   A looping clip, never zoomed, tilted or moved, under one always-on chip (the model and the length, both from records).
   Hover or keyboard focus never dims the picture: the chip rises 52 px and a White Recreate fades in at the foot; a
   portrait tile also shows its prompt on its own Ink plate and the still it was made from. Touch: Recreate is always
   there, compact, bottom right; the first tap shows the prompt, the second opens it. The tile is a size container, so
   the chip says both facts from 260 px, the model only from 200 px and the length only below. */
.wt { position: relative; display: block; overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); isolation: isolate; container-type: inline-size; }
.wt > .vm { position: absolute; inset: 0; }
.wt:hover, .wt:focus-within, .wt.is-open, .wt.is-hover { z-index: 4; }          /* lifts out of the wall's band, whole */
.wt .wl-a { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.wt .wl-a:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-text), inset 0 0 0 4px var(--canvas); }
.wt-chip { position: absolute; z-index: 4; left: 12px; bottom: 12px; display: block; max-width: calc(100% - 24px); height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--glass-media); color: var(--text-on-media); font-size: var(--fs-13); line-height: 28px; font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition: transform var(--t-fast) var(--ease); }
@container (max-width: 259px) { .wt-d, .wt-l { display: none; } }
@container (max-width: 199px) { .wt-m { display: none; } .wt-l { display: inline; } }
.wt-go { position: absolute; z-index: 5; left: 12px; right: 12px; bottom: 12px; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-md); background: var(--ink-btn); color: var(--on-ink-btn); font-size: var(--fs-14); font-weight: var(--fw-semi); white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease-std), visibility 0s linear var(--t-fast), background-color var(--t-fast) var(--ease); }
.wt-go:hover { background: var(--paper); }
.wt-go:focus-visible { box-shadow: var(--focus); }
.wt-p, .wt-note { position: absolute; z-index: 4; left: 12px; right: 12px; margin: 0; padding: 6px 8px; border-radius: var(--r-sm); background: var(--glass-media); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease-std), visibility 0s linear var(--t-fast); }
.wt-p { bottom: 100px; color: var(--text-on-media); font-size: var(--fs-13); line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wt-note { bottom: 48px; color: var(--text-on-media-2); font-size: var(--fs-12); line-height: 16px; }
.wt-in { position: absolute; z-index: 4; top: 12px; right: 12px; width: 46px; height: 68px; border-radius: var(--r-sm); object-fit: cover; outline: 1px solid var(--line-on-media-strong); outline-offset: -1px; background: var(--surface-3); color: transparent; font-size: 0; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease-std), visibility 0s linear var(--t-fast); }
/* revealed: visible at once (so keyboard focus can land on Recreate at once), the opacity fades in over 180 ms */
.wt:focus-within .wt-go, .wt:focus-within .wt-p, .wt:focus-within .wt-in, .wt:focus-within .wt-note,
.wt.is-hover .wt-go, .wt.is-hover .wt-p, .wt.is-hover .wt-in, .wt.is-hover .wt-note { opacity: 1; visibility: visible; transition-delay: 0s; }
.wt:not(.no-prompt):focus-within .wt-chip, .wt:not(.no-prompt).is-hover .wt-chip { transform: translateY(-52px); }
@media (hover: hover) {
  .wt:hover .wt-go, .wt:hover .wt-p, .wt:hover .wt-in, .wt:hover .wt-note { opacity: 1; visibility: visible; transition-delay: 0s; }
  .wt:not(.no-prompt):hover .wt-chip { transform: translateY(-52px); }
}
@media (hover: none) {
  .wt-chip { left: 10px; bottom: 10px; max-width: calc(100% - 124px); }
  .wt.no-prompt .wt-chip { max-width: calc(100% - 20px); }
  .wt-go { left: auto; right: 10px; bottom: 10px; height: 32px; padding: 0 10px; gap: 6px; border-radius: var(--r-sm); font-size: var(--fs-13); opacity: 1; visibility: visible; }
  .wt-go .i { width: 14px; height: 14px; }
  .wt:not(.no-prompt):focus-within .wt-chip { transform: none; }
  .wt.is-open .wt-p, .wt.is-open .wt-in, .wt.is-open .wt-note { opacity: 1; visibility: visible; transition-delay: 0s; }
  .wt-p { left: 10px; right: 10px; bottom: 52px; }
  .wt-note { left: 10px; right: 10px; bottom: 46px; }
  .wt-in { top: 10px; right: 10px; }
}

/* ---------------------------------------------------------------- the first-video offer: a corner toast
   It never takes focus and never blocks anything: no veil, nothing paused. It sits under every veil, so it never covers
   a dialog, a menu or a sheet. Bottom right on desktop (above the sticky composer under 1,512 px while that bar shows),
   full width less 16 px gutters on phones. Action toasts sit above it. */
.offer { position: fixed; z-index: calc(var(--z-veil) - 1); right: 16px; bottom: 16px; width: min(360px, calc(100vw - 32px)); display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: start; gap: 10px 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-3); outline: 1px solid var(--line-strong); outline-offset: -1px; animation: rise-in var(--t-fast) var(--ease-out); }
.offer[hidden] { display: none; }
.offer-tx { display: grid; gap: 2px; min-width: 0; }
.offer-h { font-size: var(--fs-14); line-height: 20px; font-weight: var(--fw-semi); color: var(--text-1); }
.offer-s { font-size: var(--fs-13); line-height: 18px; color: var(--text-3); }
.offer-go { grid-column: 1; justify-self: start; }
.offer-x { grid-column: 2; grid-row: 1; width: 32px; height: 32px; margin: -4px -6px 0 0; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--text-2); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.offer-x:hover { background: var(--surface-3-hover); color: var(--text-1); }
.offer.is-static { position: relative; right: auto; bottom: auto; animation: none; }
@media (min-width: 900px) and (max-width: 1511px) { .stk-on .offer:not(.is-static) { bottom: 88px; } }
@media (max-width: 899px) {
  .offer { left: 16px; right: 16px; width: auto; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .offer-x { width: 44px; height: 44px; margin: -10px -10px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .offer { animation: none; } }

/* ---------------------------------------------------------------- action toasts: a raised grey plate, 16 px in */
.toasts { right: 16px; bottom: 16px; }
.toast { background: var(--surface-3); font-size: var(--fs-14); line-height: 20px; font-weight: var(--fw-semi); }
.offer-on .toasts { bottom: calc(16px + var(--offer-h, 102px) + 8px); }
@media (min-width: 900px) and (max-width: 1511px) { .offer-on.stk-on .toasts { bottom: calc(88px + var(--offer-h, 102px) + 8px); } }
@media (max-width: 899px) {
  .toasts { left: 16px; right: 16px; }
  .offer-on .toasts { bottom: calc(16px + var(--offer-h, 102px) + 8px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .wt-chip, .wt-go, .wt-p, .wt-in, .wt-note { transition: none !important; } }
