/* Light studio (2026-11-20, chosen by Daniel over "yellow poster" and "cinematic dark").
   White ground, light-grey panels, crisp near-black type; the video sits on true black so its colours read as filmed.
   Near-black is the action colour (one filled primary per screen); subtitle yellow is the spoken word and nothing else
   (the timeline, the selected line, the stage's sample captions). Arial throughout (bold for headings);
   the browser falls back per glyph for the 18 scripts. One page: the editor is the first screen; before a video the
   stage is the drop target and plays real caption lines in the chosen style. */
:root {
  color-scheme: light;
  --ground: #fff; --surface: #f3f3f4; --raised: #e6e6e9; --control: #d4d4d9; --line: #c4c4ca; --stage: #000;
  --text: #141414; --muted: #5c5d62; --faint: #8b8c91;
  --accent: #ffd60a; /* the default word-highlight colour in draw.js: the product's own yellow */
  --accent-edge: #e5b800; /* the same yellow, one step deeper, for thin marks that sit on white */
  --negative: #c4281c;
  --display: Arial, Helvetica, sans-serif;
  --radius: 16px; --radius-sm: 10px; --gap: 16px; --pad: 24px; --h: 40px; /* spacing steps: 4 8 12 16 24 32 48 */
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 16px/1.5 Arial, Helvetica, sans-serif; color: var(--text); background: var(--ground); -webkit-font-smoothing: antialiased; }
.col { width: min(1240px, 100% - 48px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; } /* taste-skill-ignore: the hidden file input, not a rule */
h1, h2 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: clamp(28px, 3.3vw, 44px); letter-spacing: -0.025em; line-height: 1.08; }
h2 { font-size: 20px; }
a { color: inherit; }

/* top bar: wordmark on the column's left edge, plan on its right */
.bar { position: sticky; top: 0; z-index: 2; background: var(--ground); }
.bar-in { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-block: 12px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; white-space: nowrap; }
.mark::before { content: ''; flex: none; width: 28px; height: 28px; background: url(/favicon.svg) center / contain no-repeat; } /* the product's own mark: a caption with one word lit */
.plan { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.plan .pill { height: 36px; }
.plan p:first-child { display: block; }
.plan p { margin: 0; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.plan strong { color: var(--text); font-weight: 600; }
.plan .pill.quiet { padding-inline: 4px; margin-inline: -4px; } /* a text-weight choice, aligned to the column edge when it wraps */
.plan details { position: relative; }
.plan summary { cursor: pointer; color: var(--text); list-style: none; }
.plan summary::-webkit-details-marker { display: none; }
.plan details[open] > :not(summary) { margin-top: 8px; }
.plan details[open] { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan .key[open] { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--raised); color: var(--text); padding: 6px 10px; border-radius: var(--radius-sm); user-select: all; word-break: break-all; }
.plan input { font: inherit; height: var(--h); padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface); color: var(--text); width: 16em; }

/* title row */
.title-row { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; padding: 32px 0 28px; }
.note { margin: 12px 0 0; color: var(--muted); font-size: 17px; max-width: 90ch; }
.editing .note { display: none; } /* first-run reassurance; while editing the title row is the file name */
.editing .title-row > div { flex: 1 1 0; min-width: 0; }
.editing h1 { overflow-wrap: anywhere; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.015em; line-height: 1.2; } /* a file name, not a headline */
.field { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.field-note { font-weight: 400; }
select { appearance: none; font: inherit; font-size: 15px; height: var(--h); padding: 0 36px 0 14px; border: 0; border-radius: var(--radius-sm); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px; color: var(--text); cursor: pointer; }
/* status: one message at a time, as a banner so "ready" and errors are not missed */
#status { position: relative; margin: 0 0 24px; padding: 12px 16px 12px 42px; border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
#status::before { content: ''; position: absolute; left: 16px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
#status:empty { display: none; } /* no reserved gap when there is nothing to say */
#status.error { background: #fdecea; color: #8f1d14; }
#status.error::before { background: var(--negative); }

/* buttons: light grey by default, .primary is the near-black pill */
.pill, button { font: inherit; font-weight: 700; height: var(--h); padding: 0 16px; border: 0; border-radius: 999px; background: var(--raised); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; transition: background-color .12s, transform .08s; }
.pill:hover, button:hover { background: var(--control); }
.pill:active, button:not(:disabled):active { transform: scale(.97); }
.pill.primary { background: var(--text); color: var(--ground); }
.pill.primary:hover { background: #363636; }
.card .pill:not(.primary) { background: var(--ground); } /* one tone step off the panel */
.card .pill:not(.primary):hover { background: var(--control); }
.pill.quiet { background: transparent; color: var(--muted); font-weight: 400; }
.pill.quiet:hover { color: var(--text); background: var(--surface); }
.pill.small { height: 32px; padding: 0 12px; font-size: 13px; }
button:disabled, button:disabled:hover, .pill.primary:disabled { background: var(--surface); color: #6b6c72; cursor: default; } /* reads as "not yet", not as a faded black button */
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* before a video: the stage is the drop target and plays sample captions in the chosen style (one page, no empty screen) */
body:not(.editing) .when-video, .editing .when-empty { display: none !important; }
.drop { position: relative; display: block; width: clamp(240px, calc((100vh - 330px) * 9 / 16), 640px); max-width: 100%; aspect-ratio: 9 / 16; background: var(--stage); border-radius: var(--radius); cursor: pointer; outline: 2px dashed transparent; outline-offset: 4px; transition: outline-color .12s; }
.drop:hover, .drop.over, #file:focus-visible + .drop { outline-color: var(--text); }
.drop canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
.drop-lang { position: absolute; left: 14px; top: 12px; font-size: 12px; color: #b9b9b9; }
.drop-copy { position: absolute; inset: 16% 24px auto; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: #c9c9c9; text-wrap: balance; }
.drop-copy strong { color: #fff; font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
.drop-copy .pill.primary { margin-top: 16px; background: #fff; color: var(--text); }
.drop-copy .pill.primary:hover { background: #e9e9e9; }
.editing .drop { display: none; }

/* the real order of the job, numbered: add a video, choose a look, check the words */
.editor { counter-reset: step; }
.step { display: flex; align-items: center; gap: 12px; }
.left > .step { font-size: 22px; margin-bottom: 16px; }
.step::before { counter-increment: step; content: counter(step); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--text); font: 700 14px/1 Arial, Helvetica, sans-serif; }
.left .lang { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; font-size: 16px; font-weight: 400; color: var(--text); }

/* editor: the stage sizes its own column (CSS var --r = width/height, set in fitStage) */
.editor { display: grid; grid-template-columns: auto minmax(340px, 1fr); gap: 40px; align-items: start; padding-bottom: 64px; }
.left { min-width: 320px; }
.stage { position: relative; width: min(calc(70vh * var(--r, .5625)), 640px); max-width: 100%; aspect-ratio: var(--r, .5625); margin-inline: auto; background: var(--stage); border-radius: var(--radius); overflow: hidden; }
.stage video, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage canvas { cursor: grab; touch-action: none; }
.stage canvas:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.player { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.player input { flex: 1; accent-color: var(--text); }
#clock { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 4.5em; text-align: right; }

/* timeline: every caption line as a block across the clip; the playing line in the highlight yellow */
.timeline { position: relative; height: 28px; margin-top: 8px; border-radius: 8px; background: var(--surface); overflow: hidden; }
.timeline button { position: absolute; top: 6px; bottom: 6px; min-width: 2px; height: auto; padding: 0; border-radius: 3px; background: var(--line); clip-path: inset(0 1px 0 0 round 3px); } /* 1px seam between touching lines */
.timeline button:hover { background: var(--faint); }
.timeline button.sel { background: var(--muted); }
.timeline button.on { background: var(--accent); }
.timeline i { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); pointer-events: none; }

.right { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.unlock { padding: 16px var(--pad); box-shadow: inset 4px 0 0 var(--accent); } /* the free preview's one offer, marked in the product's yellow */
.unlock p { margin: 0 0 12px; }
.unlock p:last-child { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.card select { background-color: var(--ground); }
.card { margin: 0; border: 0; border-radius: var(--radius); background: var(--surface); padding: var(--pad); }
.card legend, .card-head h2 { float: left; width: 100%; font-family: var(--display); font-size: 22px; font-weight: 700; padding: 0; margin-bottom: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-head h2 { float: none; width: auto; margin: 0; }
.styles > div, .styles > .hint { clear: both; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.custom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.custom input[type=range] { width: 100%; height: var(--h); accent-color: var(--text); margin: 0; }
.swatches { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 24px; } /* a grid, so the options line up instead of wrapping ragged */
.swatch { display: inline-flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer; }
.swatch label { cursor: pointer; }
.swatch input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--text); }
.swatch input[type=range] { width: 72px; accent-color: var(--text); }
input[type=color] { width: 26px; height: 26px; padding: 0; border: 2px solid var(--line); border-radius: 50%; background: none; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }

.hint { color: var(--muted); margin: 0 0 16px; }
.lines-card .when-empty { margin: 0; } /* the last thing in the panel before any lines exist */
#lines { list-style: none; padding: 0; margin: 0 calc(-1 * var(--pad)); max-height: 52vh; overflow: auto; }
#lines li { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 12px var(--pad); }
#lines li.sel { background: var(--raised); box-shadow: inset 4px 0 var(--accent-edge); } /* taste-skill-ignore: a 4px selection marker, not a shadow */
#lines .times { display: flex; flex-direction: column; gap: 4px; }
#lines input, #lines textarea { font: inherit; width: 100%; border: 0; border-radius: 8px; background: var(--ground); color: inherit; }
#lines input { font-size: 13px; padding: 4px 8px; font-variant-numeric: tabular-nums; color: var(--muted); }
#lines textarea { resize: vertical; padding: 8px 12px; min-height: 60px; font-size: 17px; } /* a step up: Arabic, Thai and Hindi letters run small at 16px */

/* while a video is processed: a modal over the dimmed page, so nobody starts a second upload */
#busy { width: min(360px, 100% - 32px); padding: 32px 24px; border: 0; border-radius: var(--radius); background: var(--ground); color: var(--text); text-align: center; }
#busy::backdrop { background: rgb(0 0 0 / .6); }
#busy strong { display: block; text-wrap: balance; }
#busy p { margin: 8px 0 0; color: var(--muted); }
.spinner { width: 32px; height: 32px; margin: 0 auto 16px; border: 3px solid var(--raised); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .left { min-width: 0; }
  .stage { width: min(100%, calc(64vh * var(--r, .5625))); }
  .custom { grid-template-columns: 1fr; }
  .drop { width: min(100%, calc(64vh * 9 / 16)); margin-inline: auto; }
  .bar { position: static; }
}
@media (min-width: 901px) { .plan { margin-left: auto; justify-content: flex-end; } }
@media (max-width: 640px) {
  .col { width: calc(100% - 32px); }
  /* phone while editing: the plan folds to its name and the upgrade, so the video and Export sit on the first screen */
  .editing .plan .limits, .editing .plan .acct, .editing .plan .pill.quiet, .editing .plan details { display: none; }
  .editing .title-row { padding-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .spinner { animation-duration: 4s; } }

/* footer + legal pages */
.foot { display: flex; gap: 20px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); }
.doc main { max-width: 720px; padding: 24px 0 64px; }
.doc h1 { font-size: 32px; margin: 16px 0 4px; }
.doc h2 { font-size: 18px; margin: 28px 0 6px; }
.doc p { line-height: 1.6; margin: 0 0 10px; color: var(--text); }
.doc .note { color: var(--muted); font-size: 16px; }
.doc a { color: var(--text); }

/* crawlable copy: the section under the editor and the landing pages (bin/render-index.mjs).
   Same language as the editor: grey panels on white, one near-black panel for Pro, no rules. */
.prose { padding-bottom: 64px; }
.editor + .prose { padding-top: 32px; }
.prose h2 { font-size: 24px; letter-spacing: -0.02em; margin: 56px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose > p { max-width: 68ch; font-size: 17px; margin: 0; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; max-width: 76ch; }
/* how it works: three panels in reading order; the number is part of the sentence, not a badge */
.prose ol { counter-reset: how; list-style: none; padding: 0; max-width: none; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.prose ol li { counter-increment: how; background: var(--surface); border-radius: var(--radius); padding: 24px; }
.prose ol li::before { content: counter(how) '. '; color: var(--text); font-weight: 700; }
/* free and pro: two panels side by side, Pro in the action colour */
.prose ol + h2 + ul { list-style: none; padding: 0; max-width: none; grid-template-columns: 1fr 1fr; gap: 16px; }
.prose ol + h2 + ul li { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.prose ol + h2 + ul li:last-child { background: var(--text); color: #cfcfd4; }
.prose ol + h2 + ul li:last-child strong { color: #fff; }
.prose .links { list-style: none; padding: 0; max-width: none; display: flex; flex-wrap: wrap; gap: 8px; }
.prose .links li { background: var(--surface); border-radius: 999px; padding: 6px 14px; color: var(--text); }
.prose .links a { text-decoration: none; }
.prose .links a:hover { text-decoration: underline; }
.prose details { margin-bottom: 8px; border-radius: var(--radius-sm); background: var(--surface); }
.prose summary { position: relative; padding: 16px 52px 16px 20px; cursor: pointer; font-weight: 700; color: var(--text); list-style: none; border-radius: inherit; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: '+'; position: absolute; right: 20px; top: 50%; translate: 0 -50%; font-size: 22px; font-weight: 400; line-height: 1; color: var(--muted); }
.prose details[open] summary::after { content: '\2212'; }
.prose summary:hover { background: var(--raised); }
.prose details p { margin: 0; padding: 0 20px 18px; max-width: 68ch; }
a.mark { text-decoration: none; }
.page { max-width: 820px; }
.page h1 { margin: 8px 0 16px; }
.page .lead { font-size: 19px; color: var(--text); margin: 0 0 24px; max-width: 62ch; }
.page ol, .page ol + h2 + ul { grid-template-columns: 1fr; gap: 8px; }
.page ol li, .page ol + h2 + ul li { padding: 16px 20px; border-radius: var(--radius-sm); }
.crumbs { padding-top: 24px; font-size: 14px; color: var(--muted); }
.sample { margin: 32px 0 0; }
.sample p { margin: 0; background: var(--stage); color: #fff; border-radius: var(--radius); padding: 40px 24px; font: 700 24px/1.4 Arial, Helvetica, sans-serif; text-align: center; text-wrap: balance; }
.sample figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.cta { margin-top: 32px; }
@media (max-width: 900px) {
  .prose ol, .prose ol + h2 + ul { grid-template-columns: 1fr; gap: 8px; }
  .prose h2 { margin-top: 40px; }
}
