/* Hookcut self-serve pages: /preview/, /order/, /o/, /terms/, /pay/fake/. Built on ui.css (the shared system, loaded
   first). Behaviour lives in the JS: every id, name and data attribute it reads is kept, and [hidden] always wins. */

/* ---------------------------------------------------------------- frame widths: header, page and footer line up */
body:has(.page-narrow) { --frame: 760px; }
body:has(.page-order) { --frame: 900px; }
body:has(.page-preview) { --frame: 1180px; }

/* ---------------------------------------------------------------- /preview/: the hero form */
.page-preview > .dev { display: flex; width: max-content; max-width: 100%; margin-inline: auto; }
.hero-form #studio, .hero-form #creator, .seg-notes { display: flex; flex-direction: column; gap: 2px; }
.hero-form #creator { gap: 10px; } /* the game's name, then the upload note */
.seg-notes .small, .hero-form #email-note { padding-inline: 20px; }
.hero-form label.check { padding-inline: 6px; }
.upload-note {
  padding: 16px 22px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--panel) 70%, transparent); color: var(--muted); font-size: 15.5px; text-align: center;
}
.source-switch {
  align-self: center; display: inline-flex; gap: 4px; padding: 4px;
  border: 1px solid var(--line); border-radius: var(--pill); background: var(--panel);
}
.source-switch label { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: var(--pill); font-size: 14.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.source-switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; border: 0; }
.source-switch label:has(input:checked) { background: var(--panel-3); color: var(--text); }
.source-switch label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
/* the goal, picked at the start: radio chips (the brief's goal presets), one always picked */
.goal-pick { display: flex; flex-direction: column; gap: 10px; }
.goal-pick legend { margin-bottom: 10px; padding-inline: 6px; }
.goal-pick .chip { position: relative; display: inline-flex; align-items: center; padding: 9px 14px; border-radius: var(--pill); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.goal-pick .chip input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; border: 0; }
.goal-pick .chip:has(input:checked) { background: var(--cyan); color: var(--on-bright); border-color: var(--cyan); }
.goal-pick .chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.goal-pick .small { padding-inline: 6px; }
.email-row { margin-top: 8px; }
#ts:empty { display: none; }
/* Turnstile runs invisibly; its box takes room (and a form gap) only once Cloudflare asks for an interaction */
#ts.ts-quiet { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hero-for { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--text); margin-top: -6px; }
.hero-limits { text-align: center; font-size: 14.5px; font-weight: 600; color: var(--text); letter-spacing: .01em; }
.hero-form #email-note { text-align: center; }
.page-preview .hero { gap: 18px; }

/* /preview/ as one focused step: the intro and form, the demo phone beside them, a short "how it works" under them */
.topnav a.quiet-link { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.topnav a.quiet-link:hover { color: var(--text); }
.preview-main { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.preview-hero h1 { font-size: var(--fs-h1); max-width: 14ch; }
.preview-hero .lede { max-width: 34em; }
.price-line p { font-size: 16px; color: var(--muted); }
.price-line b { color: var(--text); font-weight: 700; }
.price-line a { color: var(--text); font-weight: 600; }
/* "See all prices" opens the price cards right here (no loop back to the home page); a chosen pack is named below */
.price-line .linkbtn { padding: 0 2px; background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.price-line .linkbtn:hover { background: none; }
.prices-open { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.prices-open .small { margin: 0; }
.picked { color: var(--text); font-weight: 500; }
.picked:empty { display: none; }
.fest-line { font-size: 15px; color: var(--muted); }
.fest-line b { color: var(--text); }
.email-row { display: flex; flex-direction: column; gap: 8px; }
.consents { display: flex; flex-direction: column; padding: 4px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.hero-form > button[type=submit] { width: 100%; }
.preview-visual { margin: var(--s5) 0 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.preview-visual .phone { width: min(60vw, 240px); }
.preview-visual figcaption { max-width: 320px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.pv-cap { font-size: 15px; color: var(--muted); }
.pv-credit { font-size: 14px; line-height: 1.5; color: var(--muted); }
.pv-credit a { color: var(--muted); }
.preview-how { margin-top: var(--s7); padding-top: var(--s6); border-top: 1px solid var(--line); }
.preview-how h2 { font-size: 22px; letter-spacing: -.015em; margin-bottom: var(--s4); }
.steps-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps-mini li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.steps-mini .step-n { margin: 0; width: 30px; height: 30px; font-size: 15px; }
.steps-mini li:nth-child(2) .step-n { background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--violet) 20%, transparent); }
.steps-mini p { color: var(--muted); font-size: 15.5px; }
.steps-mini b { color: var(--text); font-weight: 600; }
.faq-line { margin-top: var(--s5); }
.faq-line a { color: var(--text); font-weight: 600; }
/* phones: the submit button sooner (tighter intro) */
@media (max-width: 559px) {
  .page-preview { padding-top: var(--s4); }
  .page-preview > .dev { margin-bottom: var(--s3); }
  .preview-hero { padding-top: var(--s4); }
  .preview-main { gap: 12px; }
  .preview-hero h1 { font-size: 38px; }
  .preview-hero .lede { font-size: 16.5px; }
}
@media (min-width: 760px) { .steps-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); } }
@media (min-width: 960px) {
  .preview-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: var(--s8); align-items: start; text-align: left; }
  .preview-main { align-items: flex-start; }
  .preview-hero .hero-form { max-width: 600px; }
  .hero-form #email-note, .seg-notes .small { text-align: left; }
  .preview-hero .source-switch { align-self: flex-start; }
  .preview-hero .hero-limits { text-align: left; }
  .preview-visual { margin-top: var(--s5); position: sticky; top: 88px; }
  .preview-visual .phone { width: 300px; }
}

/* goal presets in the brief */
.goal-field { display: flex; flex-direction: column; gap: 10px; }
.goal-field > label { margin: 0; }
.goal-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 10px 16px; font-size: 15px; color: var(--text); background: transparent; border: 1px solid var(--line-strong); }
.chip:hover { background: var(--panel-2); border-color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--cyan); color: var(--on-bright); border-color: var(--cyan); }
#source-row[hidden] { display: none !important; }

/* the examples card (off until real, permitted clips exist: examples/README.md) */
.ex-list { display: grid; gap: 16px; }
.ex-card { padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); display: flex; flex-direction: column; gap: 14px; }
.ex-pair { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 760px) { .ex-pair { grid-template-columns: 1.6fr 1fr; } }
.ex-media { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ex-media video { width: 100%; border-radius: var(--r); background: var(--video-bg); display: block; }
.ex-label { font-family: var(--mono); font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- /order/ (buy) and the shared buying parts */
.intro { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin: var(--s5) 0 var(--s6); }
.intro .small a { color: var(--text); font-weight: 600; }
.page-narrow > .dev { display: flex; width: max-content; max-width: 100%; margin-inline: auto; }
.page-buy .after { margin-top: var(--s4); text-align: center; color: var(--faint); }

.choices { display: grid; gap: 10px; }
@media (min-width: 560px) { .choices { grid-template-columns: 1fr 1fr; } }
label.choice {
  min-height: 0; padding: 16px; align-items: flex-start;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--field); color: var(--muted); font-size: 14.5px;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease);
}
label.choice strong { display: block; font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -.01em; margin-bottom: 2px; }
label.choice:hover { border-color: var(--muted); }
label.choice:has(input:checked) { border-color: var(--accent); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }

.agree { display: flex; flex-direction: column; gap: 2px; padding: 8px 16px; border-radius: var(--r-lg); background: var(--panel-2); }
.agree label.check { font-size: 15px; }
.agree #waiver { color: var(--muted); }
.agree .waiver-sum { color: var(--text); }
/* the full refund wording, word for word, folded under its short summary */
.waiver-full { margin: -4px 0 6px 34px; }
.waiver-full > summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--text); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.waiver-full[open] > summary { margin-bottom: 4px; }
.waiver-full p { line-height: 1.5; }
/* optional permissions, apart from the required ticks */
.agree-optional { background: transparent; border: 1px dashed var(--line-strong); }
.opt-head { padding-top: 6px; font-family: var(--mono); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.refund-line { color: var(--text); }
.refund-line a, .provider-line a { color: var(--text); font-weight: 600; }
.provider-line { text-align: center; color: var(--muted); }

/* the packs as cards (buy.js renders them into #pkgs or #offers): compact rows on a phone, cards from 560 px */
#pkgs, #offers { display: grid; gap: 10px; grid-template-columns: 1fr; }
label.pack {
  position: relative; min-height: 0;
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  margin: 0; padding: 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--field); color: var(--muted);
  transition: border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease);
}
label.pack:hover { border-color: var(--muted); }
/* the five-pack's emphasis (as on the home page): a cyan edge until a pack is picked; the picked pack is violet */
label.pack:has(input[value="creator-5"]) { border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan); }
label.pack:has(input:checked) { border-color: var(--accent); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.pack-body { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 2px; align-items: baseline; min-width: 0; }
.pack-name { grid-column: 1; font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.25; letter-spacing: -.01em; }
.pack-price { grid-column: 2; grid-row: 1; font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pack-meta { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.pack-body .founding-tag { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
@media (min-width: 560px) {
  #pkgs, #offers { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
  .pack-body { display: flex; flex-direction: column; gap: 2px; }
  .pack-price { font-size: 30px; margin-top: 6px; }
}
#founding { padding: 12px 16px; border: 1px solid var(--line); border-inline-start: 3px solid var(--cyan); border-radius: var(--r); background: var(--panel); color: var(--muted); font-size: 14.5px; }
#founding:empty { display: none; }
.page-buy form > button[type=submit], #buy > button[type=submit] { width: 100%; }

/* ---------------------------------------------------------------- /o/: the order page */
.page-order > * + * { margin-top: var(--s4); }
.page-order > .dev { display: flex; width: max-content; max-width: 100%; }
.order-head { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s5); }
.order-head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
#ref { font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: .04em; color: var(--muted); padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: var(--pill); align-self: center; }
#ref:empty { display: none; }
#pkg { align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
#pkg::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); flex: none; }
#pkg:empty { display: none; }
#pay .button { min-width: 240px; }

#verify, #up, #files, #briefbox, #retention {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow);
  padding: var(--s5) var(--s4);
}
@media (min-width: 480px) { #verify, #up, #files, #briefbox, #retention { padding: var(--s5) var(--s6); } }
.page-order section h2 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: var(--s2); }
.page-order section h2 .small { font-family: var(--body); font-weight: 500; font-size: 14.5px; letter-spacing: 0; }

#verify, #up { display: flex; flex-direction: column; gap: 14px; }
#verify h2, #up h2 { margin: 0; }
#code { width: 100%; max-width: 15ch; margin-top: 8px; padding: 12px 16px; font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: .32em; font-variant-numeric: tabular-nums; }
input[type=file] {
  width: 100%; max-width: 100%; padding: 12px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--panel-2); color: var(--muted); font: inherit; font-size: 15px; cursor: pointer;
}
input[type=file]::file-selector-button { margin-right: 12px; padding: 9px 16px; font: 600 14.5px/1.2 var(--body); color: var(--on-primary); background: var(--primary); border: 0; border-radius: var(--pill); cursor: pointer; }
#up > button { align-self: flex-start; min-width: 160px; }

/* file administration: quieter than the editing */
#files, #retention { background: transparent; box-shadow: none; border-style: dashed; }
#files h2, #retention h2 { font-size: 18px; }
#list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
#list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; font-variant-numeric: tabular-nums; color: var(--muted); }
#list li:first-child { border-top: 0; padding-top: 4px; }
#list li::before { content: ""; flex: none; width: 10px; height: 16px; border-radius: 3px; border: 1.5px solid var(--cyan); }
#retention { display: flex; flex-direction: column; gap: 12px; }
#retention h2 { margin: 0; }
#retention #del { align-self: flex-start; }

/* "Make another clip": the new upload and brief, folded once a clip exists */
.newclip > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border: 1px solid var(--line-strong); border-radius: var(--pill);
  font-weight: 600; color: var(--text);
}
.newclip > summary::-webkit-details-marker { display: none; }
.newclip > summary::before { content: "+"; font-family: var(--mono); font-size: 18px; line-height: 1; transition: transform .2s var(--ease); }
.newclip[open] > summary::before { transform: rotate(45deg); }
.newclip > summary:hover { background: var(--panel-2); }
.newclip > summary:focus-visible { border-radius: var(--pill); }
.newclip[open] > summary { margin-bottom: var(--s4); }
.newclip > section + section { margin-top: var(--s4); }
.newclip.flat > summary { display: none; }

/* the brief */
#brief { margin-top: var(--s4); }
#brief .defaults { padding: 12px 16px; border-radius: var(--r); background: var(--panel-2); color: var(--muted); }
.more-opts > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; font-weight: 600; color: var(--text);
}
.more-opts > summary::-webkit-details-marker { display: none; }
.more-opts > summary::after {
  content: ""; width: 12px; height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2391919d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  transition: transform .2s var(--ease);
}
.more-opts[open] > summary::after { transform: rotate(180deg); }
.more-body { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.more-body fieldset input[name=headline_font] { margin-top: 6px; }
#brief > label.check { padding: 12px 16px; border-radius: var(--r); background: var(--panel-2); }
#brief button[type=submit] { width: 100%; }
#briefcredit:empty { display: none; }
@media (min-width: 760px) {
  .more-body { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .more-body > * { grid-column: 1 / -1; }
  .more-body > label:has(select) { grid-column: auto; }
  #brief button[type=submit] { width: auto; align-self: flex-start; min-width: 240px; }
}

/* a clip: the 9:16 player front and centre, editing beside it */
#clips { display: flex; flex-direction: column; gap: var(--s4); }
#clips:empty { display: none; }
.clip { padding: var(--s4); display: grid; gap: var(--s4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); }
@media (min-width: 480px) { .clip { padding: var(--s5); } }
.clip-head { display: flex; flex-direction: column; gap: var(--s3); }
.clip-head h2 { font-size: clamp(20px, 2.2vw, 24px); margin: 0; }
.clip .status { background: transparent; border: 0; padding: 0 0 0 20px; color: var(--muted); }
.clip .status::before { left: 2px; top: 9px; }
.clip-body { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.player { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.player video {
  display: block; width: 100%; max-width: 360px; aspect-ratio: 9 / 16; max-height: 78vh;
  background: var(--video-bg); border-radius: var(--r-lg); box-shadow: var(--shadow-lift);
  outline: 1px solid var(--line); object-fit: contain;
}
.player .vlabel { width: 100%; max-width: 360px; font-family: var(--mono); font-size: 14px; color: var(--muted); text-align: center; }
.lowres { width: 100%; max-width: 360px; padding: 10px 14px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); border-inline-start: 3px solid var(--violet); font-size: 14.5px; color: var(--muted); line-height: 1.45; }

.actions { display: flex; flex-direction: column; gap: var(--s3); }
.actions > button { width: 100%; }
.unlockbox { display: flex; flex-direction: column; gap: 10px; padding: var(--s4); border-radius: var(--r-lg); background: var(--panel-2); border: 1px solid var(--line-strong); }
.unlockbox .unlock { width: 100%; min-height: 56px; font-size: 17px; }
.unlockbox .remain { text-align: center; }

.chatbox { display: flex; flex-direction: column; gap: 10px; }
.chatbox label { font-weight: 600; font-size: 16px; }
.chatbox .send { align-self: flex-end; min-width: 120px; }
/* the one-tap ideas (chat-guide.js): a chip only fills the box. They wrap beside the player; on a phone they are one
   row that scrolls sideways inside itself (the page never does), padded so a focus ring isn't clipped */
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest .chip { min-height: 44px; padding: 9px 15px; font-size: 14.5px; font-weight: 500; }
@media (max-width: 559px) {
  .suggest { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding: 4px; margin: -4px; }
  .suggest::-webkit-scrollbar { display: none; }
  .suggest .chip { flex: none; scroll-snap-align: start; }
}
/* "Want it made for you? See done-for-you": quiet, under a reply about work the chat can't do */
.chat li .dfy { display: block; margin-top: 8px; font-size: 14.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.chat li .dfy:hover { color: var(--text); }
.chat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.chat:empty { display: none; }
.chat li { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 16px; line-height: 1.45; }
.chat li.customer { align-self: flex-end; background: var(--violet-soft); border: 1px solid color-mix(in srgb, var(--violet) 55%, transparent); color: var(--text); border-bottom-right-radius: 6px; }
.chat li.hookcut { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-bottom-left-radius: 6px; }

.final { display: flex; flex-direction: column; gap: 10px; padding: var(--s4); border-radius: var(--r-lg); background: var(--cyan-soft); border: 1px solid color-mix(in srgb, var(--cyan) 50%, transparent); }
.final .download { width: 100%; min-height: 56px; font-size: 17px; }

@media (min-width: 760px) {
  .clip { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "player head" "player body"; column-gap: var(--s6); row-gap: var(--s4); align-items: start; }
  .clip > .clip-head { grid-area: head; }
  .clip > .player { grid-area: player; position: sticky; top: 80px; }
  .clip > .clip-body { grid-area: body; }
  .clip:has(> .player[hidden]) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body"; }
}

/* the progress timeline (progress.js): done steps checked, the running one with its bar, the rest to come */
.timeline-box { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.clip .timeline-box { background: var(--panel-2); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-step { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; padding-bottom: 14px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 26px; bottom: 4px; width: 2px; border-radius: 1px; background: var(--line-strong); }
.tl-step.is-done:not(:last-child)::before { background: color-mix(in srgb, var(--cyan) 70%, transparent); }
.tl-mark { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg-2); }
.is-done .tl-mark {
  border-color: var(--cyan);
  background: var(--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.2l3 3 6-6.4' fill='none' stroke='%230f1226' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}
.is-active .tl-mark { border-color: var(--accent); }
.is-active .tl-mark::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }
.is-stopped .tl-mark { border-color: var(--faint); }
.is-stopped .tl-mark::after { content: ""; position: absolute; left: 4px; right: 4px; top: 8px; height: 2px; border-radius: 1px; background: var(--faint); }
.tl-body { min-width: 0; }
.tl-label { font-size: 15.5px; line-height: 22px; color: var(--muted); overflow-wrap: anywhere; }
.is-active .tl-label, .is-stopped .tl-label { color: var(--text); font-weight: 600; }
.is-todo .tl-label { color: var(--faint); }
.tl-bar { position: relative; max-width: 480px; margin-top: 10px; height: 6px; border-radius: var(--pill); background: var(--panel-3); overflow: hidden; }
.tl-fill { position: relative; display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad-brand); overflow: hidden; transition: width 1s linear; }
.tl-detail { margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-detail:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .is-active .tl-mark { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); animation: tl-pulse 2.4s var(--ease) infinite; }
  .tl-bar:not(.is-late) .tl-fill::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: translateX(-100%); animation: tl-shimmer 1.8s ease-in-out infinite;
  }
  .strip-box.loading { background: linear-gradient(90deg, var(--panel-2) 30%, var(--panel-3) 50%, var(--panel-2) 70%) 0 0 / 300% 100%; animation: tl-skeleton 1.6s linear infinite; }
}
@keyframes tl-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes tl-shimmer { to { transform: translateX(100%); } }
@keyframes tl-skeleton { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* the support line ("Something not working? Email …") under a late or failed status; a clip whose work ended reads calm (no cyan "working" dot) */
.stuck { color: var(--muted); }
.stuck a { color: var(--text); font-weight: 600; }
.clip-head .stuck { padding-left: 20px; }
.clip .status.is-ended::before { background: var(--faint); box-shadow: none; }

/* a clip that needs one answer (clips[].question) */
.question { display: flex; flex-direction: column; gap: 12px; padding: var(--s4); border-radius: var(--r-lg); background: var(--panel-2); border: 1px solid var(--line-strong); border-inline-start: 3px solid var(--accent); }
.question h3 { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.q-lead { color: var(--text); }
.q-items { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.q-items li::marker { color: var(--accent-text); }
.q-items[hidden] { display: none; }
.q-choices { display: grid; gap: 12px; grid-template-columns: 1fr; }
.q-choice { display: flex; flex-direction: column; gap: 6px; }
.q-choice[hidden] { display: none; }
.q-choice button { width: 100%; min-height: 48px; }
.q-choice .small { color: var(--muted); }
@media (min-width: 560px) { .q-choices:not(:has(.q-choice[hidden])) { grid-template-columns: 1fr 1fr; } }
.q-upload { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.q-upload .btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.q-upload progress { width: 100%; }
.q-note { color: var(--text); font-size: 15px; }
.q-checking { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 15px; }
.q-spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .q-spin { animation: q-spin 1s linear infinite; } }
@keyframes q-spin { to { transform: rotate(360deg); } }
.q-due { color: var(--muted); }
.q-due:empty, .q-err:empty, .q-msg:empty { display: none; }
.q-msg { color: var(--text); font-weight: 600; }
.question .q-title:focus { outline: none; }

/* "Frames from this draft": only a loaded image shows; a quiet placeholder while it loads */
.strip-box { width: 100%; max-width: 360px; border-radius: var(--r); }
.strip-box .strip { width: 100%; height: auto; display: block; border-radius: var(--r); border: 1px solid var(--line); }
.strip-box.loading { min-height: 64px; background: var(--panel-2); border: 1px solid var(--line); }
.strip-box.loading .strip { visibility: hidden; height: 0; border: 0; }

/* "Delete my files now": its progress line, and the dialog's destructive button */
#dstat:empty { display: none; }
#dstat { color: var(--text); }
button.danger { color: var(--on-bright); background: var(--coral); border-color: var(--coral); }
button.danger:hover { background: color-mix(in srgb, var(--coral) 85%, white); }

/* the paywall / buy more (a <details>) */
#buybox { padding: 0; background: transparent; border: 0; box-shadow: none; }
#buydetails { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); }
#buydetails > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: 20px var(--s5); font-family: var(--display); font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; letter-spacing: -.02em;
}
#buydetails > summary::-webkit-details-marker { display: none; }
#buydetails > summary::after {
  content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2391919d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  transition: transform .2s var(--ease);
}
#buydetails[open] > summary::after { transform: rotate(180deg); }
#buydetails > summary:focus-visible { outline-offset: -3px; border-radius: var(--r-xl); }
#buydetails[open] { border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
#buy { padding: 0 var(--s5) var(--s5); }
#buylead { color: var(--text); }
#buylead:empty { display: none; }
@media (max-width: 479px) { #buydetails > summary { padding: 16px var(--s4); } #buy { padding: 0 var(--s4) var(--s4); } }

/* ---------------------------------------------------------------- /terms/ (a draft) */
.draft-banner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  margin-bottom: var(--s5); padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); border-radius: var(--r);
  background: var(--accent-soft); color: var(--text); font-size: 15px;
}
.draft-banner strong { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: var(--pill); background: var(--accent); color: var(--on-accent); }
.page-terms .intro { align-items: flex-start; text-align: left; }
.prose { display: flex; flex-direction: column; gap: var(--s6); }
.prose section { display: flex; flex-direction: column; gap: 10px; }
.prose h2 { font-size: 20px; letter-spacing: -.015em; }
.prose p, .prose li { color: var(--muted); max-width: 62ch; }
.prose ul, .reviewer-note ul { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose li::marker { color: var(--faint); }
.prose a { color: var(--text); font-weight: 600; }
.reviewer-note { margin-top: var(--s5); padding: var(--s5); border: 1.5px dashed var(--violet); border-radius: var(--r-xl); display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 15px; }
.reviewer-note h2 { font-size: 17px; color: var(--violet-text); letter-spacing: -.01em; }

/* ---------------------------------------------------------------- forced colours */
@media (forced-colors: active) {
  .tl-fill { background: Highlight; }
  .is-done .tl-mark, .is-active .tl-mark::after { background-color: Highlight; }
  label.choice:has(input:checked), label.pack:has(input:checked), .source-switch label:has(input:checked), .goal-pick .chip:has(input:checked) { outline: 2px solid Highlight; }
}
