/* Crowdcut UI v2: design tokens and components (ui_v2.py; documented in CONTEXT.md "UI v2").

   Loaded only while the new look is on, on every v2 page: the public site, sign-up and the
   trial steps (data-surface="site") and the studio shell (data-surface="app"). This file is
   the contract the studio builds on. It holds no page layout: the public site's layout is
   static/ui_v2_site.css.

   The look: near-white or near-black surfaces, three greys, 1px hairlines, 8 to 12px corners,
   one family (Archivo, already self-hosted), one accent (the blue of the Crowdcut mark) kept
   for small marks: focus, links, what is selected, "today" on a timeline. Primary buttons are
   ink on paper, not accent. Video always sits on the stage (near-black in both themes).

   Theme. Light is the base. Dark applies when
     - <html data-theme="dark">                       the member chose dark
     - data-surface="app" with no data-theme          the studio's default
     - the device prefers dark and data-theme="system", or data-surface="site" with no data-theme
   The member's choice is localStorage cf_theme (light | dark | system), the key the studio's
   Appearance setting already uses; the page's head script turns it into data-theme before paint.

   The token names match the ones static/studio.css already uses (--bg, --surface, --line,
   --text, --accent, --go / --wait / --stop, --s1.., --t-xs.., --r-sm..), so the studio picks the
   palette up as it is. :root is in every selector on purpose: it outranks studio.css's own
   :root[data-theme] blocks. Keep every colour a literal hex or rgba: tests/test_ui_v2.py reads
   them to check contrast. */

/* ------------------------------------------------------------------ tokens: light (base) */
html[data-ui="v2"]:root{
  /* surfaces */
  /* eggshell (2026-11-14): a warm off-white instead of bright white, easier on the eyes */
  --bg:#F2EFE8;            /* the page */
  --surface:#F9F7F2;       /* cards, inputs, menus, the header */
  --surface-2:#EEEAE2;     /* wells: table heads, code, segmented controls, hover fills */
  --surface-3:#DFDAD1;     /* pressed fills, skeleton blocks */
  /* hairlines */
  --line:#DCD8CF;          /* the 1px border around and between things */
  --line-strong:#C2BEB5;   /* stronger dividers, the border of a secondary button */
  --line-control:#787F87;  /* the border of something you type or tick: 3:1 against the surfaces */
  /* text: all three read at 4.5:1 or better on --bg, --surface and --surface-2 */
  --text:#0F1215;          /* headings and body */
  --text-2:#434A52;        /* secondary copy */
  --text-3:#5A626B;        /* hints, captions, placeholders */
  /* ink on paper: primary buttons, the toast, selected chips */
  --inv:#0F1215; --inv-ink:#FFFFFF; --inv-hover:#2B3138;
  /* the one accent: the blue of the mark, darkened here so it reads as text on light */
  --accent:#066A60; --accent-hover:#055A51; --accent-ink:#FFFFFF;
  --accent-soft:rgba(7,111,101,.10); --accent-line:rgba(7,111,101,.40);
  --brand:#3BE8D0;         /* the mark's teal (NeuraCut), the same in both themes; never text on light */
  /* intent: success, warning, danger (each reads as text on the surfaces; -soft is its tint) */
  --go:#156C44; --go-hover:#115C39; --go-ink:#FFFFFF; --go-soft:rgba(21,108,68,.10);
  --wait:#7D5700; --wait-soft:rgba(125,87,0,.10);
  --stop:#AA3823; --stop-hover:#95301D; --stop-ink:#FFFFFF; --stop-soft:rgba(170,56,35,.10);
  --live:#BC2334;
  /* promo: the first-month offer's ribbon and tag, the mark's teal (_promobar.html, _plans.html), the same in both themes */
  --promo:#3BE8D0; --promo-ink:#03201C;
  /* the stage: where video and stills sit. Near-black in both themes. */
  --stage:#08090A; --stage-2:#131518; --stage-line:rgba(255,255,255,.12);
  --stage-text:#F1F3F5; --stage-text-2:#A8AEB5;
  /* overlays */
  --scrim:rgba(15,18,21,.45); --scrim-soft:rgba(15,18,21,.30); --glass:rgba(249,247,242,.96);
  /* focus */
  --focus:#076F65; --focus-width:2px; --focus-offset:2px;
  /* shadows: borders carry structure; only things that float get one */
  --shadow-float:0 1px 2px rgba(15,18,21,.06),0 16px 40px -16px rgba(15,18,21,.22);
  --shadow:0 1px 2px rgba(15,18,21,.05),0 8px 24px -12px rgba(15,18,21,.16);
  /* type */
  --font:Archivo,-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --t-xs:12px; --t-sm:13px; --t-md:14px; --t-lg:16px; --t-xl:20px; --t-2xl:26px; --t-3xl:34px;
  --t-4xl:44px; --t-5xl:56px; --t-6xl:68px;
  --lh-tight:1.08; --lh-snug:1.3; --lh-body:1.55;
  --w-regular:400; --w-medium:500; --w-semi:600; --w-bold:700;
  --track-tight:-.022em; --track-snug:-.012em;
  /* space: 4-based */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px; --s9:96px; --s10:128px;
  /* radii */
  --r-sm:8px; --r-md:10px; --r-lg:12px; --r-pill:999px;
  /* motion */
  --ease:cubic-bezier(.2,.7,.2,1); --dur-1:.12s; --dur-2:.2s; --dur-3:.32s;
  /* layout */
  --wrap:1120px; --wrap-narrow:720px; --gutter:clamp(16px,4vw,40px);
  --z-nav:20; --z-modal:50; --z-toast:60;
  /* the names older rules and inline styles still use */
  --dim:#5A626B; --dim-line:#C5CBD1;
  color-scheme:light;
}

/* ------------------------------------------------------------------ tokens: dark */
html[data-ui="v2"][data-theme="dark"]:root,
html[data-ui="v2"][data-surface="app"]:not([data-theme]):root{
  --bg:#0C0D0F; --surface:#141619; --surface-2:#1B1E22; --surface-3:#24282D;
  --line:#262A2F; --line-strong:#3A4047; --line-control:#6C737B;
  --text:#ECEEF0; --text-2:#A8AEB5; --text-3:#8D949C;
  --inv:#ECEEF0; --inv-ink:#0C0D0F; --inv-hover:#FFFFFF;
  --accent:#3BE8D0; --accent-hover:#6CF0DD; --accent-ink:#03201C;
  --accent-soft:rgba(59,232,208,.12); --accent-line:rgba(59,232,208,.42);
  --go:#3CC985; --go-hover:#5AD79A; --go-ink:#06180F; --go-soft:rgba(60,201,133,.13);
  --wait:#E3B341; --wait-soft:rgba(227,179,65,.14);
  --stop:#F1755A; --stop-hover:#F4866D; --stop-ink:#1D0A05; --stop-soft:rgba(240,105,76,.14);
  --live:#FF6675;
  --scrim:rgba(4,5,6,.72); --scrim-soft:rgba(4,5,6,.55); --glass:rgba(20,22,25,.96);
  --focus:#3BE8D0;
  --shadow-float:0 1px 2px rgba(0,0,0,.4),0 18px 40px -18px rgba(0,0,0,.8);
  --shadow:0 1px 2px rgba(0,0,0,.35),0 8px 24px -12px rgba(0,0,0,.6);
  --dim:#8D949C; --dim-line:#3A4047;
  color-scheme:dark;
}
@media (prefers-color-scheme:dark){
  html[data-ui="v2"][data-theme="system"]:root,
  html[data-ui="v2"][data-surface="site"]:not([data-theme]):root{
    --bg:#0C0D0F; --surface:#141619; --surface-2:#1B1E22; --surface-3:#24282D;
    --line:#262A2F; --line-strong:#3A4047; --line-control:#6C737B;
    --text:#ECEEF0; --text-2:#A8AEB5; --text-3:#8D949C;
    --inv:#ECEEF0; --inv-ink:#0C0D0F; --inv-hover:#FFFFFF;
    --accent:#3BE8D0; --accent-hover:#6CF0DD; --accent-ink:#03201C;
    --accent-soft:rgba(59,232,208,.12); --accent-line:rgba(59,232,208,.42);
    --go:#3CC985; --go-hover:#5AD79A; --go-ink:#06180F; --go-soft:rgba(60,201,133,.13);
    --wait:#E3B341; --wait-soft:rgba(227,179,65,.14);
    --stop:#F1755A; --stop-hover:#F4866D; --stop-ink:#1D0A05; --stop-soft:rgba(240,105,76,.14);
    --live:#FF6675;
    --scrim:rgba(4,5,6,.72); --scrim-soft:rgba(4,5,6,.55); --glass:rgba(20,22,25,.96);
    --focus:#3BE8D0;
    --shadow-float:0 1px 2px rgba(0,0,0,.4),0 18px 40px -18px rgba(0,0,0,.8);
    --shadow:0 1px 2px rgba(0,0,0,.35),0 8px 24px -12px rgba(0,0,0,.6);
    --dim:#8D949C; --dim-line:#3A4047;
    color-scheme:dark;
  }
}

/* ------------------------------------------------------------------ components
   Every class starts with cc- and has low specificity (one class), so a page or the studio can
   override one with a single selector. On the public site the older names (.btn, .btn-primary,
   .btn-ghost, .btn-sm) are the same buttons: the :where() keeps them out of the studio. */

/* visually hidden, still read out */
.cc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* focus: one ring everywhere */
[data-ui="v2"] :where(.cc-btn,.cc-input,.cc-check input,.cc-switch input,.cc-tabs a,.cc-tabs button,.cc-seg button,.cc-seg label,.cc-details>summary,.cc-link,.cc-tile button):focus-visible{
  outline:var(--focus-width) solid var(--focus);outline-offset:var(--focus-offset)}

/* --- buttons: .cc-btn is the secondary button; add --primary, --quiet or --danger; --sm / --lg; --block */
.cc-btn,:where([data-ui="v2"][data-surface="site"]) .btn{
  display:inline-flex;align-items:center;justify-content:center;gap:var(--s2);min-height:40px;padding:0 var(--s4);
  border:1px solid var(--line-strong);border-radius:var(--r-md);background:var(--surface);color:var(--text);
  font:var(--w-medium) var(--t-md)/1 var(--font);letter-spacing:0;text-decoration:none;white-space:nowrap;cursor:pointer;
  transition:background-color var(--dur-1) var(--ease),border-color var(--dur-1) var(--ease),color var(--dur-1) var(--ease)}
.cc-btn:hover,:where([data-ui="v2"][data-surface="site"]) .btn:hover{background:var(--surface-2)}
.cc-btn:active,:where([data-ui="v2"][data-surface="site"]) .btn:active{background:var(--surface-3)}
.cc-btn svg,:where([data-ui="v2"][data-surface="site"]) .btn svg{width:16px;height:16px;flex:none}
.cc-btn--primary,:where([data-ui="v2"][data-surface="site"]) .btn-primary{background:var(--inv);border-color:var(--inv);color:var(--inv-ink)}
.cc-btn--primary:hover,:where([data-ui="v2"][data-surface="site"]) .btn-primary:hover{background:var(--inv-hover);border-color:var(--inv-hover)}
.cc-btn--primary:active,:where([data-ui="v2"][data-surface="site"]) .btn-primary:active{background:var(--inv-hover)}
.cc-btn--quiet{border-color:transparent;background:transparent;color:var(--text-2)}
.cc-btn--quiet:hover{background:var(--surface-2);color:var(--text)}
.cc-btn--danger{border-color:var(--stop);background:transparent;color:var(--stop)}
.cc-btn--danger:hover{background:var(--stop-soft)}
.cc-btn--sm,:where([data-ui="v2"][data-surface="site"]) .btn-sm{min-height:32px;padding:0 var(--s3);font-size:var(--t-sm);border-radius:var(--r-sm)}
.cc-btn--lg{min-height:48px;padding:0 var(--s5);font-size:var(--t-lg);border-radius:var(--r-lg)}
.cc-btn--block{display:flex;width:100%}
.cc-btn:disabled,.cc-btn[aria-disabled="true"],:where([data-ui="v2"][data-surface="site"]) .btn:disabled{opacity:.5;cursor:not-allowed}
.cc-btn[aria-busy="true"]{cursor:progress}

/* --- inputs: <label class="cc-label"> + .cc-input (input, select, textarea) + .cc-hint / .cc-error; group them in .cc-field */
.cc-field{display:grid;gap:6px;min-width:0}
.cc-label{font:var(--w-medium) var(--t-md)/1.3 var(--font);color:var(--text)}
.cc-label small,.cc-label .cc-opt{font-weight:var(--w-regular);color:var(--text-3);font-size:var(--t-sm)}
.cc-input{display:block;width:100%;min-height:40px;padding:9px var(--s3);border:1px solid var(--line-control);border-radius:var(--r-md);
  background:var(--surface);color:var(--text);font:var(--w-regular) var(--t-lg)/1.3 var(--font);
  transition:border-color var(--dur-1) var(--ease)}
textarea.cc-input{min-height:96px;line-height:var(--lh-body);resize:vertical}
.cc-input::placeholder{color:var(--text-3);opacity:1}
.cc-input:hover{border-color:var(--text-2)}
.cc-input:focus{border-color:var(--focus)}
.cc-input[aria-invalid="true"]{border-color:var(--stop)}
.cc-input:disabled{background:var(--surface-2);color:var(--text-3);cursor:not-allowed}
.cc-hint{font-size:var(--t-sm);line-height:1.45;color:var(--text-3)}
.cc-error{font-size:var(--t-sm);line-height:1.45;color:var(--stop)}
.cc-check{display:flex;align-items:flex-start;gap:var(--s2);font-size:var(--t-md);line-height:1.45;color:var(--text)}
.cc-check input{width:16px;height:16px;margin:2px 0 0;flex:none;accent-color:var(--inv)}
/* a switch is a checkbox: <label class="cc-switch"><input type="checkbox"><span>Label</span></label> */
.cc-switch{display:inline-flex;align-items:center;gap:var(--s3);font-size:var(--t-md);color:var(--text);cursor:pointer}
.cc-switch input{appearance:none;-webkit-appearance:none;position:relative;flex:none;width:36px;height:20px;margin:0;border-radius:var(--r-pill);
  background:var(--line-control);cursor:pointer;transition:background-color var(--dur-1) var(--ease)}
.cc-switch input::after{content:"";position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:var(--surface);
  transition:transform var(--dur-1) var(--ease)}
.cc-switch input:checked{background:var(--inv)}
.cc-switch input:checked::after{transform:translateX(16px);background:var(--inv-ink)}
.cc-switch input:disabled{opacity:.5;cursor:not-allowed}

/* --- cards: a bordered surface. --sunk is a borderless well, --flush drops the padding */
.cc-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:var(--s5)}
.cc-card--sunk{background:var(--surface-2);border-color:transparent}
.cc-card--flush{padding:0;overflow:hidden}

/* --- pills: a small status label. data-tone = ok | warn | danger | accent (none = neutral) */
.cc-pill{display:inline-flex;align-items:center;gap:6px;min-height:22px;padding:0 var(--s2);border:1px solid var(--line);border-radius:var(--r-pill);
  background:var(--surface);color:var(--text-2);font:var(--w-medium) var(--t-xs)/1 var(--font);white-space:nowrap}
.cc-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--text-3);flex:none}
.cc-pill[data-tone="ok"]{color:var(--go);border-color:transparent;background:var(--go-soft)} .cc-pill[data-tone="ok"]::before{background:var(--go)}
.cc-pill[data-tone="warn"]{color:var(--wait);border-color:transparent;background:var(--wait-soft)} .cc-pill[data-tone="warn"]::before{background:var(--wait)}
.cc-pill[data-tone="danger"]{color:var(--stop);border-color:transparent;background:var(--stop-soft)} .cc-pill[data-tone="danger"]::before{background:var(--stop)}
.cc-pill[data-tone="accent"]{color:var(--accent);border-color:transparent;background:var(--accent-soft)} .cc-pill[data-tone="accent"]::before{background:var(--accent)}
.cc-pill--plain::before{display:none}

/* --- tabs: underline tabs. <nav class="cc-tabs"><a aria-current="page">…</a><a>…</a></nav>, or buttons with aria-selected */
.cc-tabs{display:flex;gap:var(--s5);border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.cc-tabs::-webkit-scrollbar{display:none}
.cc-tabs a,.cc-tabs button{flex:none;padding:var(--s3) 0;margin-bottom:-1px;border:0;border-bottom:2px solid transparent;background:none;
  color:var(--text-2);font:var(--w-medium) var(--t-md)/1.2 var(--font);text-decoration:none;cursor:pointer}
.cc-tabs a:hover,.cc-tabs button:hover{color:var(--text)}
.cc-tabs a[aria-current],.cc-tabs button[aria-selected="true"]{color:var(--text);border-bottom-color:var(--text)}

/* --- segmented control: two to four choices in a well. Buttons with aria-pressed / aria-checked, or radio labels */
.cc-seg{display:inline-flex;gap:2px;padding:3px;border-radius:var(--r-md);background:var(--surface-2);border:1px solid var(--line)}
.cc-seg button,.cc-seg label{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 var(--s3);border:1px solid transparent;border-radius:7px;background:none;
  color:var(--text-2);font:var(--w-medium) var(--t-sm)/1 var(--font);cursor:pointer;white-space:nowrap}
.cc-seg button:hover,.cc-seg label:hover{color:var(--text)}
.cc-seg button[aria-pressed="true"],.cc-seg button[aria-checked="true"],.cc-seg label:has(input:checked){background:var(--surface);border-color:var(--line);color:var(--text)}
.cc-seg input{position:absolute;opacity:0;pointer-events:none}
.cc-seg label:has(input:focus-visible){outline:var(--focus-width) solid var(--focus);outline-offset:1px}

/* --- modal: a <dialog class="cc-modal"> with __head, __body and __foot */
dialog.cc-modal{width:min(520px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:1px solid var(--line);border-radius:var(--r-lg);
  background:var(--surface);color:var(--text);box-shadow:var(--shadow-float);overflow:hidden}
dialog.cc-modal[open]{display:flex;flex-direction:column}
dialog.cc-modal::backdrop{background:var(--scrim)}
.cc-modal__head{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);padding:var(--s4) var(--s5);border-bottom:1px solid var(--line)}
.cc-modal__head h2{margin:0;font:var(--w-semi) var(--t-lg)/1.3 var(--font);letter-spacing:var(--track-snug)}
.cc-modal__body{padding:var(--s5);overflow:auto}
.cc-modal__foot{display:flex;justify-content:flex-end;gap:var(--s2);padding:var(--s3) var(--s5);border-top:1px solid var(--line)}

/* --- toast: ink on paper, bottom centre. Put each .cc-toast in a .cc-toasts region (role="status") */
.cc-toasts{position:fixed;left:50%;bottom:var(--s5);transform:translateX(-50%);z-index:var(--z-toast);display:grid;gap:var(--s2);width:min(440px,calc(100vw - 32px));pointer-events:none}
.cc-toast{display:flex;align-items:center;gap:var(--s3);padding:var(--s3) var(--s4);border-radius:var(--r-md);background:var(--inv);color:var(--inv-ink);
  font:var(--w-medium) var(--t-md)/1.4 var(--font);box-shadow:var(--shadow-float);pointer-events:auto}
.cc-toast a{color:inherit;text-underline-offset:3px}
.cc-toast[data-tone="danger"]{box-shadow:var(--shadow-float),inset 3px 0 0 var(--stop)}

/* --- table: hairline rows, a quiet head. Wrap in .cc-table-wrap so a wide one scrolls sideways */
.cc-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface)}
.cc-table{width:100%;border-collapse:collapse;font-size:var(--t-md);line-height:1.45;font-variant-numeric:tabular-nums}
.cc-table th,.cc-table td{padding:var(--s3) var(--s4);text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
.cc-table thead th{background:var(--surface-2);color:var(--text-2);font-weight:var(--w-medium);font-size:var(--t-sm);white-space:nowrap}
.cc-table tbody th{font-weight:var(--w-medium);color:var(--text)}
.cc-table td{color:var(--text-2)}
.cc-table tr:last-child>*{border-bottom:0}

/* --- timeline: dated steps on one line. <ol class="cc-timeline"><li data-state="now">…</li><li>…</li></ol>
   Each li: <time class="cc-timeline__when">, <b class="cc-timeline__title">, <span class="cc-timeline__text">.
   Side by side from 560px, stacked below it. The step in data-state="now" carries the accent dot. */
.cc-timeline{list-style:none;margin:0;padding:0;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:0}
.cc-timeline>li{position:relative;display:grid;gap:2px;align-content:start;padding:var(--s5) var(--s3) 0 0;min-width:0}
.cc-timeline>li::before{content:"";position:absolute;left:0;right:0;top:5px;height:1px;background:var(--line-strong)}
.cc-timeline>li::after{content:"";position:absolute;left:0;top:0;width:11px;height:11px;border-radius:50%;background:var(--surface);border:1px solid var(--text-3);box-sizing:border-box}
.cc-timeline>li:last-child::before{right:auto;width:0}
.cc-timeline>li[data-state="now"]::after{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.cc-timeline__when{font:var(--w-medium) var(--t-sm)/1.3 var(--font);color:var(--text-3)}
.cc-timeline__title{font:var(--w-semi) var(--t-md)/1.3 var(--font);color:var(--text)}
.cc-timeline__text{font-size:var(--t-sm);line-height:1.4;color:var(--text-2)}
@media (max-width:559px){
  .cc-timeline{grid-auto-flow:row;grid-auto-columns:auto}
  .cc-timeline>li{padding:0 0 var(--s4) var(--s5)}
  .cc-timeline>li::before{left:5px;right:auto;top:4px;bottom:-4px;width:1px;height:auto}
  .cc-timeline>li::after{top:4px}
  .cc-timeline>li:last-child{padding-bottom:0}
  .cc-timeline>li:last-child::before{display:none}
}

/* --- note: a short message in the flow. data-tone = ok | warn | danger (none = neutral) */
.cc-note{padding:var(--s3) var(--s4);border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface-2);color:var(--text);font-size:var(--t-md);line-height:1.5}
.cc-note[data-tone="ok"]{border-color:transparent;background:var(--go-soft)}
.cc-note[data-tone="warn"]{border-color:transparent;background:var(--wait-soft)}
.cc-note[data-tone="danger"]{border-color:transparent;background:var(--stop-soft)}
.cc-note b{font-weight:var(--w-semi)}

/* --- disclosure: <details class="cc-details"><summary>Question</summary><p>Answer</p></details> */
.cc-details{border-top:1px solid var(--line)}
.cc-details:last-child{border-bottom:1px solid var(--line)}
.cc-details>summary{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);padding:var(--s4) 0;list-style:none;cursor:pointer;
  font:var(--w-medium) var(--t-lg)/1.4 var(--font);color:var(--text)}
.cc-details>summary::-webkit-details-marker{display:none}
.cc-details>summary::after{content:"";flex:none;width:9px;height:9px;margin-right:4px;border-right:1.5px solid var(--text-3);border-bottom:1.5px solid var(--text-3);transform:rotate(45deg);transition:transform var(--dur-2) var(--ease)}
.cc-details[open]>summary::after{transform:rotate(-135deg)}
.cc-details>:not(summary){margin:0 0 var(--s4);color:var(--text-2);max-width:68ch}

/* --- the stage and its tiles: where video sits. A .cc-tile is one 9:16 frame (data-ratio="16:9" or "1:1" for others).
   .cc-tile--skel is the empty frame: it draws where the hook card and the captions go. */
.cc-stage{background:var(--stage);color:var(--stage-text);border-radius:var(--r-lg);border:1px solid var(--stage-line)}
.cc-tile{position:relative;display:block;aspect-ratio:9/16;border-radius:var(--r-md);overflow:hidden;background:var(--stage-2);border:1px solid var(--stage-line);color:var(--stage-text)}
.cc-tile[data-ratio="16:9"]{aspect-ratio:16/9} .cc-tile[data-ratio="1:1"]{aspect-ratio:1}
.cc-tile>img,.cc-tile>video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.cc-tile--skel::before{content:"";position:absolute;left:14%;right:14%;top:9%;height:9%;border-radius:6px;background:rgba(255,255,255,.10)}
.cc-tile--skel::after{content:"";position:absolute;left:22%;right:22%;top:64%;height:4%;min-height:8px;border-radius:4px;background:rgba(255,255,255,.14);
  box-shadow:0 18px 0 -1px rgba(255,255,255,.08)}
.cc-tile__badge{position:absolute;left:8px;top:8px;padding:3px 7px;border-radius:6px;background:rgba(8,9,10,.72);color:var(--stage-text);font:var(--w-medium) var(--t-xs)/1.2 var(--font)}
.cc-tile__time{position:absolute;right:8px;bottom:8px;padding:2px 6px;border-radius:5px;background:rgba(8,9,10,.72);color:var(--stage-text);font:var(--w-medium) var(--t-xs)/1.2 var(--font);font-variant-numeric:tabular-nums}

/* --- skeleton: a quiet block where content will be. No shimmer. */
.cc-skel{display:block;border-radius:var(--r-sm);background:var(--surface-3)}

/* --- small parts */
.cc-link{color:var(--text);text-decoration:underline;text-decoration-color:var(--line-strong);text-underline-offset:3px;text-decoration-thickness:1px}
.cc-link:hover{text-decoration-color:currentColor}
.cc-kbd{display:inline-block;min-width:20px;padding:1px 6px;border:1px solid var(--line-strong);border-bottom-width:2px;border-radius:6px;background:var(--surface);
  font:var(--w-medium) var(--t-xs)/1.5 var(--font);color:var(--text-2);text-align:center}
.cc-spinner{display:inline-block;width:18px;height:18px;border-radius:50%;border:2px solid var(--line-strong);border-top-color:var(--text);animation:cc-spin .8s linear infinite}
@keyframes cc-spin{to{transform:rotate(360deg)}}
.cc-progress{display:block;height:4px;border-radius:var(--r-pill);background:var(--surface-3);overflow:hidden}
.cc-progress>i{display:block;height:100%;width:0;border-radius:inherit;background:var(--text);transition:width var(--dur-3) var(--ease)}

@media (prefers-reduced-motion:reduce){
  [data-ui="v2"][data-surface="site"] *,[data-ui="v2"][data-surface="site"] *::before,[data-ui="v2"][data-surface="site"] *::after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}
  .cc-spinner{animation:none;border-top-color:var(--line-strong);border-right-color:var(--text)}
}

/* ------------------------------------------------------------------ the studio's palette (Nov 11 2026)
   data-surface="app" only; the public site keeps the tokens above. The studio is black and white with one teal,
   80 / 20 / 10: neutral surfaces with no blue in the greys, ink for text and ordinary controls, and the teal for
   three jobs and no others:
     1. the one action a screen is for (a primary button fills with --accent, and its ink is --accent-ink);
     2. where you are and what is picked (the menu, a tab, a chip, a tick, focus);
     3. what is new or live (--live, a "New" mark, today on a timeline).
   Success, warning and danger keep their own colours. The teal is #3BE8D0 on dark; on light it is darkened to
   #076F65 so it reads as text and as a tinted pill. These blocks come after the ones above and repeat every colour
   they change in both themes, because a light rule here would otherwise outrank the dark rule above. */
html[data-ui="v2"][data-surface="app"]:root{
  --bg:#F2EFE8; --surface:#F9F7F2; --surface-2:#EEEAE2; --surface-3:#DFDAD1;
  --line:#DCD8CF; --line-strong:#C2BEB5; --line-control:#787873;
  --text:#111111; --text-2:#454543; --text-3:#5C5C59;
  --inv:#111111; --inv-ink:#FFFFFF; --inv-hover:#2E2E2E;
  --accent:#066A60; --accent-hover:#055A51; --accent-ink:#FFFFFF;
  --accent-soft:rgba(7,111,101,.10); --accent-line:rgba(7,111,101,.40);
  --live:#076F65;
  --stage:#080808; --stage-2:#131313;
  --scrim:rgba(17,17,17,.45); --scrim-soft:rgba(17,17,17,.30); --glass:rgba(249,247,242,.96);
  --focus:#076F65;
  --dim:#5C5C59; --dim-line:#C7C7C2;
  color-scheme:light;
}
html[data-ui="v2"][data-surface="app"][data-theme="dark"]:root,
html[data-ui="v2"][data-surface="app"]:not([data-theme]):root{
  --bg:#0A0A0A; --surface:#141414; --surface-2:#1C1C1C; --surface-3:#262626;
  --line:#262626; --line-strong:#3A3A3A; --line-control:#757575;
  --text:#EDEDEB; --text-2:#A8A8A5; --text-3:#8F8F8C;
  --inv:#EDEDEB; --inv-ink:#0A0A0A; --inv-hover:#FFFFFF;
  --accent:#3BE8D0; --accent-hover:#6CF0DD; --accent-ink:#03201C;
  --accent-soft:rgba(59,232,208,.12); --accent-line:rgba(59,232,208,.42);
  --live:#3BE8D0;
  --scrim:rgba(0,0,0,.72); --scrim-soft:rgba(0,0,0,.55); --glass:rgba(20,20,20,.96);
  --focus:#3BE8D0;
  --dim:#8F8F8C; --dim-line:#3A3A3A;
  color-scheme:dark;
}
@media (prefers-color-scheme:dark){
  html[data-ui="v2"][data-surface="app"][data-theme="system"]:root{
    --bg:#0A0A0A; --surface:#141414; --surface-2:#1C1C1C; --surface-3:#262626;
    --line:#262626; --line-strong:#3A3A3A; --line-control:#757575;
    --text:#EDEDEB; --text-2:#A8A8A5; --text-3:#8F8F8C;
    --inv:#EDEDEB; --inv-ink:#0A0A0A; --inv-hover:#FFFFFF;
    --accent:#3BE8D0; --accent-hover:#6CF0DD; --accent-ink:#03201C;
    --accent-soft:rgba(59,232,208,.12); --accent-line:rgba(59,232,208,.42);
    --live:#3BE8D0;
    --scrim:rgba(0,0,0,.72); --scrim-soft:rgba(0,0,0,.55); --glass:rgba(20,20,20,.96);
    --focus:#3BE8D0;
    --dim:#8F8F8C; --dim-line:#3A3A3A;
    color-scheme:dark;
  }
}

/* The teal's amount. With only the tokens swapped, everything that used the accent would turn teal: the menu's
   New clips button on every screen, every text link, the whole Get set up card. These rules keep it to its three
   jobs, and re-tint the handful of places static/studio.css writes the old blue out by hand. */
[data-ui="v2"][data-surface="app"] .main a:not([class]){color:var(--text);text-decoration:underline;text-decoration-color:var(--line-control);text-underline-offset:3px}
[data-ui="v2"][data-surface="app"] .main a:not([class]):hover{text-decoration-color:currentColor}
[data-ui="v2"][data-surface="app"] .nav a.newclips{border-color:var(--line-strong);background:var(--surface-2);color:var(--text)}
[data-ui="v2"][data-surface="app"] .nav a.newclips:hover{background:var(--surface-3);color:var(--text)}
[data-ui="v2"][data-surface="app"] .nav a.newclips.on{background:var(--inv);border-color:var(--inv);color:var(--inv-ink)}
[data-ui="v2"][data-surface="app"] .onboard{border-color:var(--line);background:var(--surface)}
[data-ui="v2"][data-surface="app"] .onboard .btn-primary{background:var(--inv);border-color:var(--inv);color:var(--inv-ink)}
[data-ui="v2"][data-surface="app"] .onboard .btn-primary:hover{background:var(--inv-hover);border-color:var(--inv-hover)}
[data-ui="v2"][data-surface="app"] .tl-track .band.fast{background:color-mix(in srgb,var(--accent) 55%,transparent)}
[data-ui="v2"][data-surface="app"] .evchip.dragging{box-shadow:0 6px 18px -8px color-mix(in srgb,var(--accent) 70%,transparent)}
[data-ui="v2"][data-surface="app"] .ovl .pending{outline-color:color-mix(in srgb,var(--accent) 70%,transparent)}
[data-ui="v2"][data-surface="app"] .ovl .otag{background:color-mix(in srgb,var(--accent) 92%,transparent);color:var(--accent-ink)}
[data-ui="v2"][data-surface="app"] .ed-lane.video{background:color-mix(in srgb,var(--accent) 3%,transparent)}
[data-ui="v2"][data-surface="app"] .ed-seg:hover .ed-h,[data-ui="v2"][data-surface="app"] .ed-seg.on .ed-h{background:color-mix(in srgb,var(--accent) 55%,transparent)}
[data-ui="v2"][data-surface="app"] .ed-chip:hover .ed-h,[data-ui="v2"][data-surface="app"] .ed-chip.on .ed-h{background:color-mix(in srgb,var(--accent) 45%,transparent)}
[data-ui="v2"][data-surface="app"] .ed-box.pip{background:color-mix(in srgb,var(--accent) 18%,transparent);border-color:color-mix(in srgb,var(--accent) 70%,transparent)}
[data-ui="v2"][data-surface="app"] .barrow .track i{background:var(--accent)}
[data-ui="v2"][data-surface="app"] .clip.picked .thumb::before{background:color-mix(in srgb,var(--accent) 13%,transparent)}
