/* 🧰 CAPTEE KIT — R1 of PLAN-redesign-1014.md (Patrik 2026-10-14: "fully redesign our app in the direction that we
   chose today … make it the final product"; the Edit tab was "a mess of buttons … every text, background, graphic,
   zoom, transition, LUT, hook, cover … using a slightly different style").
   Loaded LAST. Part A retunes the shared palette so every panel that paints from it lands in today's language at
   once: every purple-tinted token becomes a warm neutral of the SAME lightness (surfaces, lavender text and purple
   "on" states alike — inside the editor an "on" is neutral, Patrik's 09-28 rule), and the lime that marked "on"
   follows the accent (the literals were rewritten in index.html/components.css). Saturated blues, cyans and
   magentas are content colours (swatches, presets) and are left alone. Part B defines the controls once. */

/* ---------- A. the palette ---------- */
:root{
  --p-b06: #1a1816; --p-b06-rgb: 26,24,22;   /* was #12111f */
  --p-b06a: #1c1916; --p-b06a-rgb: 28,25,22;   /* was #131220 */
  --p-b06b: #1c1a17; --p-b06b-rgb: 28,26,23;   /* was #141221 */
  --p-b06d: #1e1c19; --p-b06d-rgb: 30,28,25;   /* was #141225 */
  --p-b07b: #1d1a17; --p-b07b-rgb: 29,26,23;   /* was #17151f */
  --p-b08: #211e1b; --p-b08-rgb: 33,30,27;   /* was #191329 */
  --p-b08a: #201e1b; --p-b08a-rgb: 32,30,27;   /* was #171526 */
  --p-b08b: #1f1c19; --p-b08b-rgb: 31,28,25;   /* was #171622 */
  --p-b09: #1f1c19; --p-b09-rgb: 31,28,25;   /* was #181820 */
  --p-b10: #24201d; --p-b10-rgb: 36,32,29;   /* was #1b1a27 */
  --p-b10a: #26231f; --p-b10a-rgb: 38,35,31;   /* was #1b1a2b */
  --p-b11: #23201d; --p-b11-rgb: 35,32,29;   /* was #1e1b25 */
  --p-b12: #2b2824; --p-b12-rgb: 43,40,36;   /* was #1e1c33 */
  --p-b13a: #332e29; --p-b13a-rgb: 51,46,41;   /* was #241d3f */
  --p-b15: #2d2925; --p-b15-rgb: 45,41,37;   /* was #26232f */
  --p-b17: #39342e; --p-b17-rgb: 57,52,46;   /* was #2a2740 */
  --p-b25: #443f3a; --p-b25-rgb: 68,63,58;   /* was #3a3a44 */
  --p-b31b: #544e47; --p-b31b-rgb: 84,78,71;   /* was #4c4754 */
  --p-b39a: #68625c; --p-b39a-rgb: 104,98,92;   /* was #5c5c68 */
  --p-b49: #baada0; --p-b49-rgb: 186,173,160;   /* was #635bff */
  --p-b52: #88817a; --p-b52-rgb: 136,129,122;   /* was #7b7a88 */
  --p-b53: #8a837c; --p-b53-rgb: 138,131,124;   /* was #7e7c8a */
  --p-b58: #989089; --p-b58-rgb: 152,144,137;   /* was #8b8998 */
  --p-b74a: #c1bbb5; --p-b74a-rgb: 193,187,181;   /* was #b8b5c1 */
  --p-b74b: #cbc2b8; --p-b74b-rgb: 203,194,184;   /* was #b9b3d0 */
  --p-b76: #ddd6d0; --p-b76-rgb: 221,214,208;   /* was #c3aeff */
  --p-b80: #e3ded8; --p-b80-rgb: 227,222,216;   /* was #cbbcff */
  --p-b81: #d4cec7; --p-b81-rgb: 212,206,199;   /* was #c9c7d4 */
  --p-b82: #e1dbd5; --p-b82-rgb: 225,219,213;   /* was #cfc8ee */
  --p-b84: #eae6e1; --p-b84-rgb: 234,230,225;   /* was #d8ccff */
  --p-b86: #e3ded9; --p-b86-rgb: 227,222,217;   /* was #d8d4e8 */
  --p-b89a: #f0eeeb; --p-b89a-rgb: 240,238,235;   /* was #e4dcff */
  --p-b92a: #f0edea; --p-b92a-rgb: 240,237,234;   /* was #e9e7f3 */
  --p-b93: #f6f4f2; --p-b93-rgb: 246,244,242;   /* was #ede9ff */
  --p-b94d: #f5f3f1; --p-b94d-rgb: 245,243,241;   /* was #f1edf9 */
  /* the lime family that marked "on" before amber was the one accent */
  --p-g89: #e9e2d8; --p-g95a: #efe9df; --p-g97: #f4efe7; --p-g11: #1a1714;
  --kp-lime: var(--acc-l);
}

/* ---------- B. the controls, once (docs/PANEL-GRAMMAR.md; the 10-14 audit listed every variant) ----------
   Scoped to the editor workspace (#rzws). "On" is the neutral selection (--sel-*), never amber, never purple, never
   a white slab: amber in the editor is the playhead, the selected layer and Export only (09-28). */

/* section headings: one voice — 13px, sentence case, no uppercase eyebrow (grammar §1) */
#rzws .pboxh, #rzws .graderow label, #rzws .coversub{
  font:600 13px/1.3 var(--ui)!important;letter-spacing:0!important;text-transform:none!important;color:var(--tx)!important;}

/* preset tiles: one tile, whatever the panel (grammar §3/§5): .c-sw, the grade/transition/LUT tile, the library tile,
   the sound tile — same radius, hairline, ground, label and "on" */
#rzws .c-sw, #rzws .gradetile, #rzws .gfxtile, #rzws .sndtile{
  border-radius:12px!important;border:1px solid rgba(255,255,255,.07)!important;background:#0f0d0c!important;
  transition:border-color .15s ease,background .15s ease!important;}
#rzws .c-sw:hover, #rzws .gradetile:hover, #rzws .gfxtile:hover, #rzws .sndtile:hover{border-color:rgba(255,255,255,.2)!important;}
#rzws .c-sw.on, #rzws .gradetile.on, #rzws .sndtile.armed{
  border-color:var(--sel-l)!important;box-shadow:0 0 0 1px var(--sel-l) inset!important;background:#14110f!important;}
#rzws .gradetile .gtstage{border-color:transparent!important;border-radius:10px 10px 0 0!important;}
#rzws .gradetile.on .gtstage{border-color:transparent!important;box-shadow:none!important;}
#rzws .c-sw__lab, #rzws .gradetile .gtlabel, #rzws .gfxtile .gfxtl, #rzws .sndtile{font-size:11.5px!important;font-weight:600!important;color:var(--tx2)!important;}
#rzws .c-sw.on .c-sw__lab, #rzws .gradetile.on .gtlabel{color:var(--tx)!important;}
#rzws .sndtile.armed::after{color:var(--tx2)!important;}

/* segments: the scope switch reads as the shared .c-seg (grammar §3) */
#rzws .gscope{border-radius:11px!important;background:rgba(255,255,255,.04)!important;border:1px solid rgba(255,255,255,.07)!important;}
#rzws .gscope button.on, #rzws .c-seg button.on{color:var(--tx)!important;background:rgba(255,255,255,.10)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important;}

/* sliders that bypassed the shared row: same 4px track and 14px thumb as .txtp-rng (grammar §2) */
#rzws .graderow input[type=range], #rzws .sndvol input[type=range], #rzws .hkrng input[type=range], #rzws input[type=range].hkrng{
  -webkit-appearance:none;appearance:none;height:4px;border-radius:999px;background:rgba(255,255,255,.14);accent-color:var(--sel-l);}
#rzws .graderow input[type=range]::-webkit-slider-thumb, #rzws .sndvol input[type=range]::-webkit-slider-thumb,
#rzws .hkrng input[type=range]::-webkit-slider-thumb, #rzws input[type=range].hkrng::-webkit-slider-thumb{
  -webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--sel-l);border:0;box-shadow:0 1px 4px rgba(0,0,0,.6);}

/* the one filled action in a panel (grammar §4): light neutral pill, no glow — Create captions, Make cover, Generate hook */
#rzws .bgaddcaps, #rzws .coverprim, #rzws .hkgen{
  height:34px!important;padding:0 16px!important;border-radius:999px!important;border:0!important;
  background:var(--sel-l)!important;color:#141210!important;font:600 13px/1 var(--ui)!important;box-shadow:none!important;filter:none!important;}
#rzws .bgaddcaps:hover, #rzws .coverprim:hover, #rzws .hkgen:hover{background:#fff!important;}

/* secondary actions: one quiet glass pill — card header actions, Auto-place, hook links, sound actions */
#rzws .tsechacts button, #rzws .cardpill, #rzws .hklink, #rzws .sndgo{
  height:32px!important;padding:0 14px!important;border-radius:999px!important;
  background:rgba(255,255,255,.05)!important;border:1px solid rgba(255,255,255,.10)!important;color:var(--tx)!important;
  font:600 12.5px/1 var(--ui)!important;box-shadow:none!important;}
#rzws .tsechacts button:hover, #rzws .cardpill:hover, #rzws .hklink:hover, #rzws .sndgo:hover{background:rgba(255,255,255,.09)!important;border-color:rgba(255,255,255,.18)!important;}

/* chips: one "on" — a lifted neutral, not a white slab and not a tint (grammar §3) */
#rzws .gfxlibchip.on, #rzws .bgwchip.on{background:rgba(255,255,255,.12)!important;color:var(--tx)!important;border-color:var(--sel-l)!important;box-shadow:none!important;}
#rzws .bgwchip.on.set{box-shadow:inset 0 -2px 0 var(--sel-l)!important;}

/* colour swatches: one shape */
#rzws .txtp-ci, #rzws .bgsw{border-radius:8px!important;border:1px solid rgba(255,255,255,.16)!important;}

/* the bottom toolbar: quiet glass pills; Auto-cut no longer glows (it is a tool, not the page's primary action) */
body.editing #tlTools > button, body.editing #tlTools .ghost{height:32px!important;border-radius:999px!important;
  background:rgba(255,255,255,.04)!important;border:1px solid rgba(255,255,255,.09)!important;color:var(--tx)!important;
  font:600 12.5px/1 var(--ui)!important;box-shadow:none!important;}
body.editing #tlTools > button:hover, body.editing #tlTools .ghost:hover{background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.18)!important;}
body.editing #tlTools .prim{background:rgba(255,255,255,.10)!important;border-color:rgba(255,255,255,.18)!important;}

/* ---------- C. the editor shell (R2) ---------- */
/* the timeline's kinds keep their own colours (tokens.css --k-*: words, graphics, footage, sound, adjustments) but in
   one muted, warm family — no lime green, no violet next to the amber playhead */
:root{
  --k-txt: 214,194,158;   /* words: sand      (was lime-green 132,214,106) */
  --k-gfx: 206,148,128;   /* graphics: clay   (was violet 172,126,255)     */
  --k-vid: 138,186,166;   /* footage: sage    (was teal 82,196,180)        */
  --k-snd: 140,168,206;   /* sound: steel     (was blue 108,170,255)       */
}
/* the toolbar's groups read as groups: a visible hairline between them */
body.editing #tlTools .tsep{width:1px!important;height:20px!important;background:rgba(255,255,255,.12)!important;margin:0 6px!important;}
/* text fields inside panels: one field (the graphic's "Bar heights" rendered as a bare white browser input) */
#rzws .pbox input[type=text], #rzws .pbox input:not([type]), #rzws .pbox textarea{
  background:rgba(255,255,255,.04)!important;border:1px solid rgba(255,255,255,.10)!important;border-radius:8px!important;
  color:var(--tx)!important;font:500 12.5px/1.3 var(--ui)!important;padding:7px 10px!important;outline:none;}
#rzws .pbox input[type=text]:focus, #rzws .pbox input:not([type]):focus, #rzws .pbox textarea:focus{border-color:rgba(255,255,255,.28)!important;}
#rzws .pbox input::placeholder, #rzws .pbox textarea::placeholder{color:var(--tx3,#8f877d)!important;}

/* ---------- D. one structure per panel (R3) ---------- */
/* the sub-heading inside a card: a field label (grammar §1) — used by the hook's "Suggestions", the cover's sections */
#rzws .fld-head{font:600 12.5px/1.3 var(--ui)!important;color:var(--tx2)!important;letter-spacing:0!important;text-transform:none!important;margin:14px 0 8px!important;}
#rzws .hkbox .hkhint{color:var(--tx3,#8f877d)!important;font-size:12.5px!important;}
/* the cover's on/off is a switch, not a browser checkbox (grammar §3/§4c) */
#rzws #coverPanel input[type=checkbox]{-webkit-appearance:none;appearance:none;width:34px;height:20px;border-radius:999px;
  background:rgba(255,255,255,.14);position:relative;cursor:pointer;vertical-align:middle;transition:background .2s ease;flex:none;}
#rzws #coverPanel input[type=checkbox]::after{content:'';position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;
  background:#fff;transition:transform .2s var(--ease);}
#rzws #coverPanel input[type=checkbox]:checked{background:var(--sel-l);}
#rzws #coverPanel input[type=checkbox]:checked::after{transform:translateX(14px);background:#141210;}

/* ---------- E. Captions, Transcript, Script (R4) ---------- */
/* transcript rows: compact — one line of words should not cost 59px */
html body.editing #cards .cc{padding:8px 12px!important;}
html body.editing #cards .cc .tm{padding-top:4px!important;font-size:.64rem!important;}
/* the script's take chips: kit chips, sentence case; the kept take wears the editor's neutral "on" */
#rzws .sctake{text-transform:none!important;letter-spacing:0!important;font:600 11.5px/1 var(--ui)!important;height:24px!important;
  padding:0 10px!important;border-radius:999px!important;background:rgba(255,255,255,.04)!important;
  border:1px solid rgba(255,255,255,.12)!important;color:var(--tx2)!important;}
#rzws .sctake.on{background:rgba(255,255,255,.12)!important;border-color:var(--sel-l)!important;color:var(--tx)!important;}
/* the script reads at a comfortable measure */
#rzws #rzScript .scbody, #rzws #rzScript .sctext{max-width:72ch;}

/* the Captions tab: find a style without scrolling (R4) */
.sfbar{display:flex;flex-direction:column;gap:10px;margin:2px 0 14px;}
.sfq{width:100%;height:38px;padding:0 14px 0 36px;border-radius:12px;border:1px solid rgba(255,255,255,.09);
  background:rgba(255,255,255,.035) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a79f94' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E") 12px center/15px no-repeat;
  color:var(--tx);font:500 13.5px/1 var(--ui);outline:none;}
.sfq:focus{border-color:rgba(255,255,255,.26);}
.sfq::placeholder{color:var(--tx3,#8f877d);}
.sfchips{display:flex;flex-wrap:wrap;gap:6px;}
.sfchip{height:30px;padding:0 13px;border-radius:999px;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.03);
  color:var(--tx2);font:600 12.5px/1 var(--ui);cursor:pointer;transition:background .15s ease,border-color .15s ease,color .15s ease;}
.sfchip:hover{color:var(--tx);border-color:rgba(255,255,255,.2);}
.sfchip.on{background:rgba(255,255,255,.12);border-color:var(--sel-l,#ece8e2);color:var(--tx);}
.sfchip:focus-visible{outline:2px solid var(--sel-l,#ece8e2);outline-offset:2px;}
.sfnone{grid-column:1/-1;padding:28px 8px;text-align:center;color:var(--tx3,#8f877d);font-size:13px;}
/* hover plays the style: the still poster steps aside so the live card underneath can move */
#customGrid .sc:hover .scposter{opacity:0!important;}
/* the Applied bar: one quiet line, not a boxed panel */
html body.editing #appliedBar{background:transparent!important;border:0!important;border-bottom:1px solid rgba(255,255,255,.07)!important;
  border-radius:0!important;padding:4px 2px 14px!important;margin-bottom:14px!important;}

/* ---------- F. the Edit tab in our language (Patrik 2026-10-14: "I still feel like the edit tab is just not our style
   that we have built") — the home's materials: glass slabs lit along the top edge, warm icon tiles like the home's
   tool cards, Space Grotesk titles, a reading column for the script. Control "on" states stay neutral (09-28). ---------- */
/* the rail: each tool wears a warm icon tile, the way the home's tools do */
#rzws #rzSecNav{background:transparent!important;}
#rzws #rzSecNav .rzsechead{font:600 11.5px/1 var(--ui)!important;color:var(--tx3,#8f877d)!important;letter-spacing:.01em!important;text-transform:none!important;}
#rzws #rzSecNav button[data-railrow]{display:flex!important;align-items:center;gap:11px;height:42px!important;padding:0 10px!important;
  border-radius:12px!important;border:1px solid transparent!important;background:transparent!important;
  font:500 13.5px/1 var(--ui)!important;color:var(--tx2)!important;box-shadow:none!important;}
#rzws #rzSecNav button[data-railrow]:hover{background:rgba(255,255,255,.04)!important;color:var(--tx)!important;}
#rzws #rzSecNav button[data-railrow].on, #rzws #rzSecNav button[data-railrow][aria-pressed="true"]{
  background:linear-gradient(180deg,rgba(255,240,225,.07),rgba(255,255,255,.025))!important;border-color:rgba(255,255,255,.09)!important;
  color:var(--tx)!important;box-shadow:inset 0 1px 0 rgba(255,235,210,.08)!important;}
#rzws #rzSecNav button[data-railrow] .ic-wrap{flex:none;width:30px;height:30px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;
  background:rgba(255,138,61,.09);border:1px solid rgba(255,138,61,.2);color:var(--sig-l,#FEB122);}
#rzws #rzSecNav button[data-railrow] .ic-wrap svg{width:16px;height:16px;}
#rzws #rzSecNav button[data-railrow][disabled] .ic-wrap, #rzws #rzSecNav button[data-railrow].soon .ic-wrap{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.08);color:var(--tx3,#8f877d);}

/* every card in the Edit tab: the home's glass slab */
#rzws #rzTools .pbox, #rzws #rzTools .shelfcard{border-radius:18px!important;border:1px solid rgba(255,255,255,.07)!important;
  background:linear-gradient(180deg,rgba(255,240,225,.04),rgba(255,255,255,.012) 46%),#121010!important;
  box-shadow:inset 0 1px 0 rgba(255,235,210,.08),0 24px 50px -36px rgba(0,0,0,.9)!important;}
/* card titles and the Script title speak in the display face */
#rzws #rzTools .pbox > .tsech, #rzws #rzTools .shelfcard > .tsech, #rzws .scripthead > b{
  font-family:var(--disp)!important;font-weight:500!important;font-size:18px!important;letter-spacing:-.015em!important;color:var(--tx)!important;}
#rzws #rzTools .pbox > .tsech .ic-wrap, #rzws #rzTools .shelfcard > .tsech .ic-wrap{background:rgba(255,138,61,.09)!important;border:1px solid rgba(255,138,61,.2)!important;color:var(--sig-l,#FEB122)!important;}

/* the script is a page you read: a centred column, a calm size, room between paragraphs */
#rzws #scText.scripttext{max-width:760px;margin:0 auto!important;font-size:16.5px!important;line-height:1.8!important;color:var(--tx)!important;}
#rzws #scriptOv .scripthead, #rzws #scriptOv .scripthintrow{max-width:none;}

/* ---------- G. the Transcript header (Patrik 2026-10-14: "I would like to keep adjusting this section") ---------- */
html body.editing .txhead{display:flex!important;align-items:center;gap:10px;padding:6px 14px 10px!important;margin:0!important;}
html body.editing .txhead > b{font-size:0!important;letter-spacing:0!important;}
html body.editing .txhead > b::after{content:'Captions';font:500 17px/1 var(--disp);letter-spacing:-.015em;color:var(--tx);text-transform:none;}
html body.editing .txhead #ccount{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:999px;
  background:rgba(255,255,255,.06);color:var(--tx2);font:600 11.5px/1 var(--ui);font-variant-numeric:tabular-nums;}
html body.editing .txhead .hbtn{height:32px!important;min-width:32px;padding:0 10px!important;border-radius:10px!important;
  background:rgba(255,255,255,.04)!important;border:1px solid rgba(255,255,255,.09)!important;color:var(--tx2)!important;
  font:600 12.5px/1 var(--ui)!important;box-shadow:none!important;display:inline-flex!important;align-items:center;gap:7px;}
html body.editing .txhead .hbtn:hover{color:var(--tx)!important;background:rgba(255,255,255,.08)!important;}
html body.editing .txhead .txico{width:32px!important;padding:0!important;justify-content:center;}
html body.editing .txhead .txico svg, html body.editing .txhead .hbtn .cic{width:15px;height:15px;}
html body.editing .lnhint{margin:0 14px 10px!important;padding:10px 12px!important;border-radius:12px!important;
  background:rgba(255,255,255,.03)!important;border:1px solid rgba(255,255,255,.06)!important;font-size:12.5px!important;color:var(--tx3,#8f877d)!important;
  display:flex!important;align-items:center;gap:10px;}
html body.editing .lnhint button{height:26px!important;padding:0 10px!important;border-radius:8px!important;font:600 12px/1 var(--ui)!important;
  background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.1)!important;color:var(--tx)!important;margin-left:auto;}

/* 🎨 the caption library as a pack (Patrik 2026-10-14, the "40+ caption animations" reference): each tile sits on a ground
   that says what kind of style it is — read from the same category the filter chips use (data-cats). Deep, low-key
   grounds so white captions stay legible; the picked tile keeps the neutral ring. */
#customGrid .sc .prev{background:radial-gradient(120% 90% at 50% 0%,var(--scg,#1a1716),#0c0b0a 78%)!important}
#customGrid .sc[data-cats~="bold"]    {--scg:#5a2410}
#customGrid .sc[data-cats~="hand"]    {--scg:#3a1d4a}
#customGrid .sc[data-cats~="serif"]   {--scg:#4a1a1f}
#customGrid .sc[data-cats~="glow"]    {--scg:#0f3a3a}
#customGrid .sc[data-cats~="minimal"] {--scg:#2c2a28}
#customGrid .sc[data-cats~="mine"] .nm::after{content:'Yours';margin-left:8px;font:600 9.5px/1 var(--ui);padding:2px 6px;border-radius:5px;background:rgba(255,255,255,.08);color:#bdb4aa;vertical-align:1px}
/* the page is shown by mint.css now, the LAST sheet (Patrik 10-16: a hard refresh flashed the old orange design in the
   gap between this sheet revealing the page and mint.css arriving) — see the no-flash rule in index.html's head */
