/* Content Hub v3: Speakeasy + DocketWorks.
   Direction (ui-ux-pro-max "Accessible & Ethical" + brand guidelines v5): flat editorial tool, hairline borders,
   no gradients/glows, one orange CTA per view, serif titles, sans UI, tabular numbers, stable layout, 150-220ms motion.
   Palette A: Navy #123F63 · Signal Orange #E97A18 (CTA/signals only) · Legal Paper #F5F1E8 · Ink #101318. */
:root {
  --navy: #123F63; --orange: #E97A18; --orange-hover: #CF6A12; --paper: #F5F1E8; --ink: #101318;
  --bg: #F7F4EE; --surface: #FFFFFF; --surface-2: #FAF8F4; --hover: #F4F0E8; --border: #E6E0D5; --border-strong: #D5CCBC;
  --text: #101318; --text-2: #3D3B37; --muted: #5A564F; --faint: #767168;
  --primary: var(--navy); --on-primary: #FFFFFF; --primary-soft: #E9EFF5; --primary-text: #123F63;
  --accent-soft: #FDF0E3; --accent-text: #9A4B08;
  --ok: #2E6A3E; --ok-soft: #E7F2EA; --warn: #7F5300; --warn-soft: #FBF2DE; --bad: #A1352D; --bad-soft: #FAE8E5;
  --ring: #123F63;
  --shadow: 0 1px 2px rgba(16,19,24,.05), 0 4px 16px -6px rgba(16,19,24,.08);
  --r-sm: 8px; --r: 10px; --r-md: 14px; --r-lg: 16px;
  --t-fast: 150ms; --t: 200ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); --ease-move: cubic-bezier(.2, 0, 0, 1);
  interpolate-size: allow-keywords;
  /* one type system for both brands (Speakeasy's): switching brand must not change fonts or sizes */
  --display: "Cormorant Garamond", Georgia, serif; --display-w: 700;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}

/* Dark theme. theme.js always sets data-theme (saved choice, else system preference); the media query is only a no-JS fallback. */
:root[data-theme="dark"] {
  --bg: #0F1216; --surface: #161A20; --surface-2: #1A1F26; --hover: #1E242C; --border: #272E37; --border-strong: #3A444F;
  --text: #EEEAE3; --text-2: #D2CDC4; --muted: #ABA59A; --faint: #8E897F;
  --primary: #5B93C4; --primary-soft: #182B3D; --primary-text: #A9CBE8; --accent-soft: #33230F; --accent-text: #F4B173;
  --ok: #8CCB9C; --ok-soft: #16281B; --warn: #EBC06A; --warn-soft: #2D2512; --bad: #F2A59D; --bad-soft: #321A18; --ring: #A9CBE8;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) {
  --bg: #0F1216; --surface: #161A20; --surface-2: #1A1F26; --hover: #1E242C; --border: #272E37; --border-strong: #3A444F;
  --text: #EEEAE3; --text-2: #D2CDC4; --muted: #ABA59A; --faint: #8E897F;
  --primary: #5B93C4; --primary-soft: #182B3D; --primary-text: #A9CBE8; --accent-soft: #33230F; --accent-text: #F4B173;
  --ok: #8CCB9C; --ok-soft: #16281B; --warn: #EBC06A; --warn-soft: #2D2512; --bad: #F2A59D; --bad-soft: #321A18; --ring: #A9CBE8;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; } }
:root[data-theme="dark"] .step.done .n { background: var(--primary); border-color: var(--primary); }
:root[data-theme="dark"] .picker button[aria-checked="true"] { background: var(--primary); border-color: var(--primary); color: #0F1216; }
:root[data-theme="dark"] .picker button[aria-checked="true"] .s { color: #0F1216; opacity: .75; }
:root[data-theme="dark"] .thumb .frame { background: #0E2A43; }


/* Brand context: DocketWorks = cool steel blue, Speakeasy = warm amber. The whole workspace takes a faint tint of the brand
   you're in (page background, a 3px bar, a soft corner wash, the active highlight), so you always know where you are.
   Registered properties let the tint crossfade instead of snapping when you switch. */
@property --brand-glow { syntax: "<color>"; inherits: true; initial-value: rgba(0, 0, 0, 0); }
@property --brand { syntax: "<color>"; inherits: true; initial-value: #2B6C8F; }
body[data-brand="docketworks"] { --brand: #2B6C8F; --brand-soft: #E3EDF3; --brand-text: #1F5572; --brand-glow: rgba(43, 108, 143, .12); --bg: #F1F4F6; }
body[data-brand="speakeasy"]   { --brand: #C9691A; --brand-soft: #F8EADB; --brand-text: #8F4A10; --brand-glow: rgba(201, 105, 26, .12); --bg: #F8F2EA; }
:root[data-theme="dark"] body[data-brand="docketworks"] { --brand: #6FB1D6; --brand-soft: #16252F; --brand-text: #A7D0E8; --brand-glow: rgba(111, 177, 214, .10); --bg: #0D1318; }
:root[data-theme="dark"] body[data-brand="speakeasy"]   { --brand: #F0A45E; --brand-soft: #2A1D12; --brand-text: #F6C595; --brand-glow: rgba(240, 164, 94, .09); --bg: #15110D; }
body { transition: background-color 520ms var(--ease-out), --brand-glow 520ms var(--ease-out), --brand 520ms var(--ease-out); }
.main { border-top: 3px solid var(--brand); transition: border-color 520ms var(--ease-out);
  background: radial-gradient(1100px 420px at 100% 0%, var(--brand-glow), transparent 72%) no-repeat; }
.brand-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text);
  font: 600 13px/1 var(--sans); letter-spacing: .01em; transition: background-color 520ms var(--ease-out), color 520ms var(--ease-out); }
.brand-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.brand-chip small { font-weight: 500; opacity: .75; font-size: 12px; }
.brand-chip small::before { content: "·"; margin: 0 6px 0 0; }

/* sidebar: one highlight that slides between the two brands */



/* content slides toward the brand you picked (continuity), then rises in */

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--primary-text); }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-w); margin: 0; line-height: 1.15; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 36px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0; }
.muted { color: var(--muted); }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.meta { font-size: 13px; color: var(--muted); }
.num { font-feature-settings: "tnum", "lnum"; font-variant-numeric: tabular-nums lining-nums; }
.mono { font-family: var(--mono); font-size: 13px; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- frame ---------- */
.app > * { min-width: 0; }
.main { padding: 28px clamp(20px, 3vw, 48px) 72px; width: 100%; }
#view { max-width: 1680px; margin-inline: auto; }

/* ---------- page header ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs a.back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 8px; margin-right: 4px; border: 1px solid var(--border-strong);
  border-radius: var(--r); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; }
.crumbs a.back:hover { background: var(--hover); text-decoration: none; }
.back-arrow svg.i { width: 16px; height: 16px; transform: rotate(180deg); }
#update-bar { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #F3EFE8; padding: 10px 12px 10px 18px; border-radius: var(--r); box-shadow: 0 12px 32px rgba(16,19,24,.25); font-size: 14px; font-weight: 600; }
.crumbs .cur { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap; margin-bottom: 26px; padding-top: 6px; }
.ph-text { min-width: 0; }
.page-head h1, .detail-head h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.02em; margin-top: 12px; color: var(--text); }
.detail-head h1 { font-size: 36px; }
.page-head p { margin-top: 8px; color: var(--muted); max-width: 64ch; font-size: 15px; line-height: 1.55; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- controls ---------- */
button { font: 600 14px/1 var(--sans); min-height: 42px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast), transform 120ms var(--ease-out); }
button:active:not(:disabled) { transform: scale(.97); transition-duration: 60ms; }
button.is-busy { opacity: .85; } button.is-busy .spinner { width: 14px; height: 14px; }
button.is-done { background: var(--ok); border-color: var(--ok); color: #fff; animation: pop 320ms var(--ease-spring); }
@keyframes pop { 0% { transform: scale(.94); } 100% { transform: none; } }
button:hover { background: var(--hover); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
button.primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
button.secondary { background: var(--surface); border-color: var(--primary); color: var(--primary-text); }
button.secondary:hover { background: var(--primary-soft); }
button.quiet { border-color: transparent; background: transparent; color: var(--text-2); padding: 0 10px; }
button.quiet:hover { background: var(--hover); }
button.sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
button.danger { color: var(--bad); }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); padding: 3px; background: var(--hover); border: 1px solid var(--border); border-radius: 11px; isolation: isolate; }
.seg .thumb { position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 3)); border-radius: 8px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(16,19,24,.08), 0 0 0 1px var(--border); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform var(--t) var(--ease); }
.seg button { border: 0; background: transparent; min-height: 36px; color: var(--muted); font-weight: 600; transition: color var(--t-fast); }
.seg button:hover { background: transparent; color: var(--text); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { color: var(--text); }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 var(--sans); padding: 5px 9px; border-radius: 6px; background: var(--hover); color: var(--text-2); white-space: nowrap; }
.tag .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.navy { background: var(--primary-soft); color: var(--primary-text); }
.tag.orange { background: var(--accent-soft); color: var(--accent-text); }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--warn-soft); color: var(--warn); } .tag.bad { background: var(--bad-soft); color: var(--bad); }
input, select, textarea { font: 15px/1.5 var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 9px 12px; min-height: 42px; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235E5B55' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
textarea { width: 100%; resize: vertical; min-height: 96px; field-sizing: content; max-height: 70vh; }
.segment textarea, #promise, #hook { min-height: 48px !important; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--ring); outline-offset: 0; }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 14px; }

/* ---------- stable content swap ---------- */
.view { transition: opacity var(--t) var(--ease); }
.view[aria-busy="true"] { opacity: .55; pointer-events: none; }
.view.leaving { opacity: 0; transform: translateY(-4px); transition: opacity 140ms var(--ease-in), transform 140ms var(--ease-in); }
.view.enter { animation: fade-in 220ms var(--ease-out); }
.rise { animation: rise 460ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- stats: one hairline strip, not four boxes ---------- */
/* Type scale (ui-ux-pro-max: modular scale + weight hierarchy): 11 kicker · 12.5 meta · 14 body-small · 16 item · 24 section · 36 page */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.stat { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat .label { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.stat .v { font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.015em; margin-top: 6px; color: var(--text); }
.stat .v small { font-size: 15px; font-weight: 500; color: var(--faint); margin-left: 3px; }
.stat .sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 4px; min-height: 22px; }
.bar { height: 4px; border-radius: 2px; background: var(--hover); overflow: hidden; flex: 1; } .bar span { display: block; height: 100%; background: var(--navy); border-radius: 2px; transition: width 800ms var(--ease-out); }
@starting-style { .bar span { width: 0 !important; } }
.bar.over span { background: var(--bad) !important; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.view-note { color: var(--muted); font-size: 14px; margin-bottom: 26px; min-height: 22px; max-width: 72ch; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }

/* ---------- idea lists ---------- */
.group { margin-bottom: 36px; }
.group-head { margin-bottom: 12px; }
.gh-title { display: flex; align-items: center; gap: 10px; }
.gh-title h2 { font-size: 26px; }
.gh-title .count { font: 600 12px/1 var(--sans); color: var(--muted); background: var(--hover); border-radius: 999px; padding: 4px 8px; }
.gh-meta { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.gh-meta span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gh-meta .kicker { flex: 0 0 auto; color: var(--primary-text); }
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 230px 64px 18px; align-items: start; gap: 28px; padding: 18px 20px; border-top: 1px solid var(--border);
  text-decoration: none; color: inherit; cursor: pointer; transition: background var(--t-fast); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row:hover .title h3 { color: var(--primary-text); }
/* item titles in the UI sans: the display serif is for page + section headings; at 16px a sans reads faster in a list */
.row .title h3 { font: 600 16px/1.35 var(--sans); letter-spacing: -.005em; color: var(--text); transition: color var(--t-fast); }
.row .title p { margin-top: 5px; color: var(--text-2); font-size: 14px; line-height: 1.5; max-width: 72ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .title .tags { display: flex; align-items: center; gap: 6px 12px; margin-top: 10px; flex-wrap: wrap; }
.row .title .tags .tag { font-size: 12px; padding: 4px 8px; }
.facets { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.facet { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 12px; }
.facet + .facet::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.kicker.sub { display: block; margin: 26px 0 10px; }
.kicker.sub.first { margin-top: 0; }
.subhead { display: flex; align-items: center; gap: 8px; margin: 26px 0 8px; }
.subhead > span:last-child:not(:first-child) { margin-left: auto; }
.disclose { margin-top: 16px; }
.disclose > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary-text); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; }
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: rotate(-45deg); transition: transform var(--t-fast) var(--ease); }
.disclose[open] > summary::before { transform: rotate(45deg); }
.disclose[open] > summary { margin-bottom: 10px; }
.nowrap { white-space: nowrap; }
.ver { color: var(--faint); font-size: 13px; }
.row .ev { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 2px; }
.row .ev .kicker { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary-text); }
.row .ev .what { font-size: 13px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .ev .more { font-size: 12px; color: var(--faint); }
.score { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 1px; }
.score b { font-size: 20px; font-weight: 600; line-height: 1; letter-spacing: -.01em; color: var(--text); }
.score .bar { width: 44px; flex: none; } .score .bar span { background: var(--orange); }
.row .chev { color: var(--faint); padding-top: 2px; transition: transform var(--t-fast), color var(--t-fast); }
.row:hover .chev { color: var(--text); transform: translateX(2px); }
.row.top { box-shadow: inset 3px 0 0 var(--orange); }
.row-head { display: none; }
.empty { border: 1px dashed var(--border-strong); border-radius: var(--r-md); padding: 44px 24px; text-align: center; background: var(--surface); }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--muted); }
.empty .actions { justify-content: center; margin-top: 18px; }
.skeleton { background: linear-gradient(90deg, var(--hover), var(--surface-2), var(--hover)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--r-md); height: 72px; margin-bottom: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- idea detail ---------- */
.detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-bottom: 20px; }
.detail-head h1 { margin-bottom: 10px; max-width: 900px; }
.detail-head p { color: var(--text-2); max-width: 70ch; font-size: 16px; line-height: 1.6; }
.detail-head .tags { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 16px; }
.detail-head .facet { font-size: 13px; }
.scorecard { min-width: 150px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: 14px 16px; }
.scorecard .v { font-size: 34px; font-weight: 600; line-height: 1; margin: 10px 0 10px; letter-spacing: -.015em; }
.scorecard .v small { font-size: 15px; color: var(--faint); font-weight: 500; }
.scorecard .bar span { background: var(--orange); }
.steps { list-style: none; padding: 0; display: flex; gap: 0; margin: 4px 0 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.step { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-weight: 600; font-size: 14px; color: var(--faint); border-left: 1px solid var(--border); }
.step:first-child { border-left: 0; }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-strong); font-size: 13px; flex: 0 0 auto; }
.step.done { color: var(--text-2); } .step.done .n { background: var(--navy); border-color: var(--navy); color: #fff; }
.step.now { color: var(--text); background: var(--accent-soft); } .step.now .n { border-color: var(--orange); color: var(--accent-text); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.detail > * { min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 24px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 26px; }
.panel-head .meta { font-size: 13px; }
.drive-link { display: inline-flex; align-items: center; gap: 7px; margin: -4px 0 16px; font-size: 14px; font-weight: 600; color: var(--primary-text); text-decoration: none; }
.drive-link:hover { text-decoration: underline; } .drive-link svg.i { width: 16px; height: 16px; }
.panel .lead { color: var(--text-2); margin-bottom: 18px; font-size: 15px; line-height: 1.6; max-width: 72ch; }
/* side panels are reference material: a quiet kicker title, not a second serif headline */
aside .panel { padding: 20px; }
aside .panel-head { margin-bottom: 12px; }
aside .panel-head h2 { font: 600 12px/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.picker button { min-height: 36px; font-size: 14px; font-weight: 500; border-color: var(--border-strong); }
.picker button[aria-checked="true"] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.picker .s { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.picker button[aria-checked="true"] .s { color: #F8C08D; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-text); margin-bottom: 16px; font-size: 15px; }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.segments { display: flex; flex-direction: column; gap: 10px; counter-reset: seg; }
.segment { display: grid; grid-template-columns: 28px 1fr; gap: 6px 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); counter-increment: seg; }
.segment::before { content: counter(seg); grid-row: span 4; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border-strong); font-weight: 600; font-size: 13px; color: var(--text-2); }
.segment textarea { min-height: 54px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; border-radius: 0; background: transparent; min-height: 40px; padding: 0 14px; color: var(--muted); box-shadow: inset 0 -2px 0 transparent; transition: color var(--t-fast), box-shadow var(--t-fast); }
.tabs button:hover { background: transparent; color: var(--text); }
.tabs { position: relative; }
.tabs button[aria-selected="true"] { color: var(--text); }
.tab-ink { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--orange); border-radius: 2px; transition: transform 280ms var(--ease-out), width 280ms var(--ease-out); pointer-events: none; }
.tab-body.enter { animation: rise 280ms var(--ease-out); }
.evlist { display: flex; flex-direction: column; }
.evlist > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid var(--border); }
.evlist > div:first-child { border-top: 0; padding-top: 0; }
.evlist .kicker { color: var(--primary-text); }
.evlist a, .evlist .what { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.evlist a { text-decoration: none; } .evlist a:hover { color: var(--primary-text); text-decoration: underline; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 11px 0; border-top: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; font-size: 14px; line-height: 1.45; }
.plain li > .kicker { flex: 0 0 auto; padding-top: 2px; }
.plain li b { font-weight: 600; }
.plain li:first-child { border-top: 0; padding-top: 0; }
.plain li.click { cursor: pointer; } .plain li.click:hover b { text-decoration: underline; }
.plain li[aria-current="true"] b { color: var(--accent-text); }
.note { background: var(--primary-soft); border-radius: var(--r); padding: 16px 18px; margin-top: 20px; font-size: 14px; }
.note > b { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--primary-text); }
.note p { margin-top: 4px; white-space: pre-wrap; color: var(--text-2); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-2); line-height: 1.45; }
td.t-main { color: var(--text); min-width: 260px; }
td.t-main b { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; margin-bottom: 4px; }
td.t-main a { color: var(--text); text-decoration: none; font-weight: 500; } td.t-main a:hover { color: var(--primary-text); text-decoration: underline; }
td .kicker { color: var(--primary-text); }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }
.vt { font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 5px; background: var(--hover); white-space: nowrap; }
.vt.avatar { background: var(--accent-soft); color: var(--accent-text); } .vt.illustration { background: var(--primary-soft); color: var(--primary-text); }
.vt.footage, .vt.screen { background: var(--ok-soft); color: var(--ok); }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.meter { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; }
.meter .v { font-size: 22px; font-weight: 600; margin-top: 6px; letter-spacing: -.01em; }
.mix { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; margin-top: 8px; } .mix span { display: block; }
.teleprompter { font-size: 17px; line-height: 1.75; min-height: 300px; padding: 16px 18px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.thumb { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.thumb .frame { aspect-ratio: 16/9; background: var(--navy); display: grid; place-items: center; padding: 14px; color: #fff; text-align: center; font: 800 20px/1.05 "Inter", sans-serif; letter-spacing: -.01em; text-transform: uppercase; }
.thumb .frame em { font-style: normal; color: #F6B77C; }
.thumb .cap { padding: 11px 13px; font-size: 14px; }
.thumb .cap span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }

/* ---------- idea page components ---------- */
.callout { border-left: 3px solid var(--orange); background: var(--surface-2); border-radius: 0 var(--r) var(--r) 0; padding: 12px 16px; margin: 0 0 18px; }
.callout p { margin-top: 4px; color: var(--text); font-size: 15px; line-height: 1.6; max-width: 72ch; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 6px; }
.field .kicker { color: var(--primary-text); }
textarea.soft { background: var(--surface-2); border-color: var(--border); min-height: 48px; line-height: 1.55; transition: border-color var(--t-fast), background var(--t-fast); }
textarea.soft:hover { border-color: var(--border-strong); }
textarea.soft:focus { background: var(--surface); border-color: var(--primary); }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 32px; bottom: 4px; width: 2px; background: var(--border); border-radius: 1px; }
.tl-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 600; font-size: 13px; }
:root[data-theme="dark"] .tl-n { background: var(--primary); color: #0F1216; }
.tl-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tl-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-label:not(:first-child) { margin-top: 4px; }
textarea.soft.payoff { border-left: 3px solid var(--orange); font-weight: 500; color: var(--text); }
.titles { list-style: none; padding: 0; margin: 0; }
.titles li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.titles li:first-child { border-top: 0; }
.titles .t { flex: 1; font-size: 15px; font-weight: 500; color: var(--text); min-width: 0; }
.titles .copy { opacity: .55; transition: opacity var(--t-fast); }
.titles li:hover .copy, .titles .copy:focus-visible, .titles .copy.copied { opacity: 1; }
@media (hover: none) { .titles .copy { opacity: 1; } }
button.copy.copied { color: var(--ok); }
button.copy.copied svg.i { animation: pop 320ms var(--ease-spring); }
.note-body { margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.note-body p { margin: 0; color: var(--text-2); white-space: normal; }
.notes-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.notes-list li::marker { color: var(--primary-text); font-weight: 600; }
.notes-list .kicker { color: var(--primary-text); }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.checklist li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.5; color: var(--text-2); }
.checklist li:first-child { border-top: 0; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 13px; height: 13px; border: 1.5px solid var(--border-strong); border-radius: 4px; }
.notes-field { margin-top: 22px; }
.actions .push { margin-left: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
blockquote.desc { margin: 0; padding: 12px 16px; background: var(--surface-2); border-radius: var(--r); white-space: pre-wrap; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 18px; }
.metric { padding: 12px 16px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.metric:first-child { border-left: 0; }
.metric.wide { grid-column: span 2; }
.metric .v { font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.metric .v small { font-size: 14px; color: var(--faint); font-weight: 500; }
.metric .meta { font-size: 12px; }
.mix { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; } .mix span { display: block; transition: width 800ms var(--ease-out); }
@starting-style { .mix span { width: 0 !important; } }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.beats { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.beats li { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 14px 16px; border-top: 1px solid var(--border); transition: background var(--t-fast); }
.beats li:first-child { border-top: 0; }
.beats li:hover { background: var(--surface-2); }
.beat-time { font-size: 13px; font-weight: 600; color: var(--primary-text); background: var(--primary-soft); border-radius: 6px; padding: 4px 8px; text-align: center; }
.beat-body .kicker { display: block; margin-bottom: 4px; }
.beat-vo { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.beat-screen { margin: 6px 0 0; font-size: 13px; color: var(--muted); } .beat-screen b { font-weight: 600; color: var(--text-2); }
.beats-wrap { margin: 0 0 20px; }
textarea.teleprompter { background: var(--paper); color: var(--ink); border-color: var(--border); font-size: 17px; line-height: 1.8; padding: 20px 22px; max-width: 100%; }
:root[data-theme="dark"] textarea.teleprompter { background: var(--surface-2); color: var(--text); }
.bucket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 4px 0 10px; }
.bucket-opt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); transition: border-color var(--t-fast), background var(--t-fast), transform 120ms var(--ease-out), box-shadow var(--t-fast); }
.bucket-opt:hover { border-color: var(--border-strong); background: var(--surface-2); }
.bucket-opt:active { transform: scale(.98); }
.bucket-opt:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.bucket-opt[aria-checked="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.bo-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.bo-top b { font-size: 14px; font-weight: 600; color: var(--text); }
.bo-top .s { font-size: 12px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); padding: 2px 6px; border-radius: 5px; }
.bo-desc { font-size: 13px; color: var(--muted); line-height: 1.4; }
.bo-funnel { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
details.bucket-compact { padding: 0; }
details.bucket-compact > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 16px 20px; flex-wrap: wrap; }
details.bucket-compact > summary::-webkit-details-marker { display: none; }
details.bucket-compact > summary b { font-size: 15px; }
details.bucket-compact > summary .meta { flex: 1; min-width: 0; font-size: 13px; }
details.bucket-compact .change { font-size: 13px; font-weight: 600; color: var(--primary-text); }
details.bucket-compact[open] .change { visibility: hidden; }
.bucket-more { padding: 0 20px 18px; }
details::details-content { block-size: 0; overflow: hidden; transition: block-size 280ms var(--ease-out), content-visibility 280ms allow-discrete; }
details[open]::details-content { block-size: auto; }
.tag.live .d { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.step.now .n { animation: ring 1.6s var(--ease-out) 2; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(233,122,24,.45); } 100% { box-shadow: 0 0 0 10px rgba(233,122,24,0); } }
#update-bar { animation: rise 360ms var(--ease-out); }
.banner { animation: fade-in 240ms var(--ease-out); }

/* ---------- channel dashboard ---------- */
/* funnel = sequential single hue (dataviz: magnitude -> one hue, light to dark); selected per theme, not flipped */
:root { --seq-1: #C7D5E3; --seq-2: #8AA6C1; --seq-3: #4A7196; --seq-4: #123F63; --chart-line: #123F63; --chart-area: rgba(18,63,99,.08); --chart-grid: #ECE6DB; }
:root[data-theme="dark"] { --seq-1: #2B4157; --seq-2: #3F6488; --seq-3: #5B93C4; --seq-4: #A9CBE8; --chart-line: #7FB2DD; --chart-area: rgba(127,178,221,.12); --chart-grid: #262D36; }
.stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat .spark-wrap { margin-top: 8px; color: var(--chart-line); height: 32px; }
.spark { width: 100%; height: 32px; display: block; }
.delta { font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 5px; background: var(--hover); color: var(--muted); white-space: nowrap; }
.delta.up { background: var(--ok-soft); color: var(--ok); } .delta.down { background: var(--bad-soft); color: var(--bad); }
.export-note { margin: -6px 0 18px; }
.snapshot-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--primary); border-radius: var(--r-md); background: var(--primary-soft);
  color: var(--primary-text); text-decoration: none; animation: rise 360ms var(--ease-out); transition: background var(--t-fast), transform 120ms var(--ease-out); }
a.snapshot-link:hover { background: var(--surface); } a.snapshot-link:active { transform: scale(.99); }
.snapshot-link b { display: block; font-size: 14px; color: var(--text); } .snapshot-link small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.snapshot-link .sl-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; flex: 0 0 auto; }
:root[data-theme="dark"] .snapshot-link .sl-icon { color: #0F1216; }
.snapshot-link.busy { border-color: var(--border); background: var(--surface); } .snapshot-link.bad { border-color: var(--bad); background: var(--bad-soft); }
.export-note .spinner { width: 12px; height: 12px; display: inline-block; vertical-align: -2px; }
.ch-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.ch-grid > .panel { margin-bottom: 16px; }
.funnel { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.f-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.f-name { font-weight: 600; font-size: 15px; }
.f-val { margin-left: auto; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.f-conv { width: 100%; text-align: right; font-size: 12px; color: var(--muted); margin-top: -4px; }
.f-track { height: 12px; background: var(--hover); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.f-bar { display: block; height: 100%; border-radius: 4px; transition: width 900ms var(--ease-out); }
@starting-style { .f-bar { width: 0 !important; } }
.s1 .f-bar { background: var(--seq-1); } .s2 .f-bar { background: var(--seq-2); } .s3 .f-bar { background: var(--seq-3); } .s4 .f-bar { background: var(--seq-4); }
.f-rule { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.f-how { margin-top: 6px; } .f-how > summary { font-size: 12px; }
.f-how p { font-size: 13px; color: var(--text-2); margin: 0 0 8px; }
.f-how .plain li { font-size: 13px; text-transform: capitalize; padding: 6px 0; }
.f-note { margin-top: 16px; font-size: 12px; }
.chart { position: relative; outline: none; border-radius: 8px; }
.chart:focus-visible { outline: 3px solid var(--ring); outline-offset: 4px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: pan-y; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .ax { font: 500 12px var(--sans); fill: var(--faint); }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .area { fill: var(--chart-area); }
.chart .bar { fill: var(--chart-line); } .chart .bar.neg { fill: var(--bad); }
.chart .xhair { stroke: var(--border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .dot { fill: var(--surface); stroke: var(--chart-line); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); background: var(--ink); color: #F3EFE8; border-radius: 8px; padding: 6px 10px; pointer-events: none;
  display: flex; flex-direction: column; gap: 1px; font-size: 12px; white-space: nowrap; box-shadow: 0 6px 18px rgba(16,19,24,.2); z-index: 2; }
.chart .tip b { font-size: 14px; } .chart .tip[hidden] { display: none; }
.chart-empty { padding: 24px 0; }
.chart-table { margin-top: 10px; } .chart-table table { margin-top: 8px; font-size: 13px; }
.lf-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.lf { display: flex; flex-direction: column; gap: 4px; padding: 4px 16px; border-left: 1px solid var(--border); }
.lf:first-child { border-left: 0; padding-left: 0; }
.lf b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.lf .meta { font-size: 12px; }
.toplist { list-style: none; padding: 0; margin: 0; }
.toplist li { display: grid; grid-template-columns: 28px 112px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.toplist li:first-child { border-top: 0; padding-top: 0; }
.rank { font-size: 15px; font-weight: 600; color: var(--faint); text-align: center; }
.thumbimg { display: block; width: 112px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--hover); }
.thumbimg img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 300ms var(--ease-out); }
.toplist li:hover .thumbimg img { transform: scale(1.04); }
.t-title { font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none; line-height: 1.35; display: block; margin-bottom: 4px; }
.t-title:hover { color: var(--primary-text); text-decoration: underline; }
.t-stats { display: flex; gap: 18px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.t-stats b { font-size: 15px; color: var(--text); font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.insights { list-style: none; padding: 0; margin: 0; }
.insights li { display: flex; flex-direction: column; gap: 3px; padding: 11px 0 11px 18px; border-top: 1px solid var(--border); position: relative; }
.insights li:first-child { border-top: 0; padding-top: 0; }
.insights li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; border-radius: 50%; }
.insights li:first-child::before { top: 6px; }
.insights.good li::before { background: var(--ok); } .insights.bad li::before { background: var(--bad); }
.insights b { font-weight: 600; font-size: 14px; }
.conf { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 5px; margin-left: 4px; white-space: nowrap; background: var(--hover); color: var(--muted); }
.conf.high { background: var(--ok-soft); color: var(--ok); } .conf.medium { background: var(--primary-soft); color: var(--primary-text); }
.read .panel-head { align-items: center; } .read-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.read-summary { font-size: 15px; line-height: 1.65; color: var(--text); max-width: 78ch; margin: 0 0 18px; }
.read-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.read-col { border-top: 3px solid var(--border); padding-top: 10px; } .read-col.good { border-color: var(--ok); } .read-col.bad { border-color: var(--bad); } .read-col.try { border-color: var(--orange); }
.read-col ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 12px; }
.read-col li b { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; } .read-col li .meta { display: block; font-size: 13px; margin: 3px 0 4px; }
.read-col li .conf { margin-left: 0; }
.disc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.traffic { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 9px; }
.traffic li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 14px; }
.t-bar { height: 8px; background: var(--hover); border-radius: 4px; overflow: hidden; } .t-bar i { display: block; height: 100%; background: var(--chart-line); border-radius: 4px; transition: width 800ms var(--ease-out); }
@starting-style { .t-bar i { width: 0 !important; } }
.traffic b { text-align: right; font-size: 13px; }
.terms { margin-top: 10px; } .terms small { color: var(--faint); font-weight: 500; }
.lessons li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; } .lessons .facet { margin-left: auto; }
.yt-linked { display: flex; flex-direction: column; gap: 10px; } .yt-linked .thumbimg { width: 100%; }
.weekly .panel-head { align-items: flex-start; } .weekly .panel-head .meta { display: block; margin-top: 4px; }
.tldr { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 20px; margin: 4px 0 20px; }
.tldr .kicker { color: var(--brand-text); }
.tldr-lead { font-size: 17px; font-weight: 600; line-height: 1.45; color: var(--text); margin: 8px 0 10px; max-width: 80ch; }
.tldr ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; max-width: 86ch; }
.tldr li { font-size: 14px; line-height: 1.55; color: var(--text-2); } .tldr li::marker { color: var(--brand); }
.w-tabs { margin-bottom: 14px; }
.w-tabs button { display: inline-flex; align-items: center; gap: 8px; }
.w-tabs .count { font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--hover); color: var(--muted); }
.w-tabs .wt-good[aria-selected="true"] .count { background: var(--ok-soft); color: var(--ok); }
.w-tabs .wt-bad[aria-selected="true"] .count { background: var(--bad-soft); color: var(--bad); }
.w-tabs .wt-try[aria-selected="true"] .count { background: var(--accent-soft); color: var(--accent-text); }
.ins-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ins-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 16px 12px 18px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color var(--t-fast), transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.ins-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--border-strong); }
.ins-card.tone-good::before { background: var(--ok); } .ins-card.tone-bad::before { background: var(--bad); } .ins-card.tone-try::before { background: var(--orange); }
.ins-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.ic-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.ic-top .ic-dot { display: none; }
.ic-top h3 { font: 600 15px/1.4 var(--sans); color: var(--text); }
.ic-ev { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.ic-ev.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ic-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.ic-foot .conf { margin-left: 0; }
.ic-more { all: unset; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary-text); }
.ic-more:hover { text-decoration: underline; } .ic-more:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
button.star { all: unset; box-sizing: border-box; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); flex: 0 0 auto;
  transition: color var(--t-fast), background var(--t-fast), transform 120ms var(--ease-out); }
button.star:hover { background: var(--hover); color: var(--text-2); } button.star:active { transform: scale(.9); }
button.star:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
button.star svg.i { width: 18px; height: 18px; }
button.star[aria-pressed="true"] { color: #D9A000; } button.star[aria-pressed="true"] svg.i { fill: currentColor; }
:root[data-theme="dark"] button.star[aria-pressed="true"] { color: #F2C14E; }
button.star.pop svg.i { animation: star-pop 420ms var(--ease-spring); }
@keyframes star-pop { 0% { transform: scale(.6) rotate(-20deg); } 60% { transform: scale(1.25) rotate(6deg); } 100% { transform: none; } }
.ins-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; } .ins-row b { flex: 1; }
.saved-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.saved-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0 11px 14px; border-top: 1px solid var(--border); position: relative; animation: rise 300ms var(--ease-out); }
.saved-list li:first-child { border-top: 0; }
.saved-list li::before { content: ""; position: absolute; left: 0; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.saved-list li.tone-good::before { background: var(--ok); } .saved-list li.tone-bad::before { background: var(--bad); } .saved-list li.tone-try::before { background: var(--orange); }
.saved-list b { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; } .saved-list .meta { font-size: 12px; }
.ch-settings > summary { font-size: 14px; }
.ch-settings .meta { margin: 4px 0 10px; }
.kw-row { display: flex; gap: 8px; } .kw-row input { flex: 1; }
.ch-foot { margin-top: 18px; font-size: 13px; }

/* ---------- dialogs / login / toast ---------- */
dialog { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 0; background: var(--surface); color: var(--text); width: min(620px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(16,19,24,.22); }
dialog { opacity: 0; transform: translateY(10px) scale(.98);
  transition: opacity 160ms var(--ease-in), transform 160ms var(--ease-in), overlay 160ms allow-discrete, display 160ms allow-discrete; }
dialog[open] { opacity: 1; transform: none; transition-duration: 260ms; transition-timing-function: var(--ease-out); }
@starting-style { dialog[open] { opacity: 0; transform: translateY(10px) scale(.98); } }
dialog::backdrop { background: rgba(16,19,24,0); transition: background 220ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete; }
dialog[open]::backdrop { background: rgba(16,19,24,.45); }
@starting-style { dialog[open]::backdrop { background: rgba(16,19,24,0); } }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.option input { min-height: auto; margin-top: 3px; accent-color: var(--navy); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login .brandside { background: var(--ink); color: #F3EFE8; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login .logos { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.login .logos img:first-child { height: 26px; } .login .logos img:last-child { height: 50px; }
.login .logos .div { width: 1px; height: 40px; background: rgba(255,255,255,.2); }
.login h1 { font-family: var(--display); color: #F3EFE8; font-size: clamp(38px, 4.4vw, 58px); font-weight: 700; max-width: 560px; }
.login .brandside p { color: #A6A9AE; max-width: 460px; margin-top: 16px; font-size: 17px; }
.login .rule { display: flex; height: 4px; width: 200px; border-radius: 2px; overflow: hidden; margin-top: 28px; }
.login .rule span:nth-child(1) { flex: 3; background: var(--navy); } .login .rule span:nth-child(2) { flex: 3; background: #1B5E8C; } .login .rule span:nth-child(3) { flex: 2; background: var(--orange); } .login .rule span:nth-child(4) { flex: 1; background: #F3EFE8; }
.login .formside { background: var(--paper); display: grid; place-items: center; padding: 24px; }
.login .brandside > * { animation: rise 600ms var(--ease-out) both; } .login .brandside > *:nth-child(2) { animation-delay: 90ms; } .login .brandside > *:nth-child(3) { animation-delay: 180ms; }
.login .rule span { transform-origin: left; animation: grow 700ms var(--ease-out) both; } .login .rule span:nth-child(2) { animation-delay: 80ms; } .login .rule span:nth-child(3) { animation-delay: 160ms; } .login .rule span:nth-child(4) { animation-delay: 240ms; }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
.login form { animation: rise 600ms var(--ease-out) 140ms both; }
.login form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; color: var(--ink); }
.login form h2 { color: var(--ink); font-family: var(--display); font-size: 32px; }
.login form p { color: #4B4944; }
.login form input { background: #fff; color: var(--ink); border-color: #CFC6B6; }
.login form button { min-height: 46px; }
.error { color: var(--bad); font-size: 14px; }
.login .error { color: #A1352D; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 16px) scale(.96); opacity: 0; background: var(--ink); color: #F3EFE8; padding: 12px 18px; border-radius: var(--r); font-weight: 600; font-size: 14px; transition: opacity 160ms var(--ease-in), transform 160ms var(--ease-in); z-index: 60; max-width: calc(100vw - 32px); pointer-events: none; }
#toast.show { transition: opacity 240ms var(--ease-out), transform 420ms var(--ease-spring); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) { .ch-grid { grid-template-columns: 1fr; } .stats.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stats.five .stat:nth-child(4) { border-left: 0; } .stats.five .stat:nth-child(n+4) { border-top: 1px solid var(--border); } .lf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lf:nth-child(4) { border-left: 0; padding-left: 0; } .lf:nth-child(n+4) { margin-top: 14px; }
  .detail { grid-template-columns: 1fr; } .detail > aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; } }
@media (max-width: 1100px) { .row { grid-template-columns: minmax(0, 1fr) 190px 56px 18px; gap: 20px; } }
@media (max-width: 820px) { .row { grid-template-columns: minmax(0, 1fr) 56px; } .row .ev, .row .chev { display: none; } }
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .login { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .main { padding: 20px 16px 56px; }
  .stat { padding: 14px 16px; } .stat .v { font-size: 22px; }
  .page-head .lockup { display: none; }
  h1 { font-size: 30px; } .page-head h1 { font-size: 34px; } .detail-head h1 { font-size: 30px; }
  .row { grid-template-columns: minmax(0, 1fr) 48px; gap: 12px; padding: 16px; } .gh-meta span:last-child { white-space: normal; }
  .detail-head { grid-template-columns: 1fr; } .scorecard { min-width: 0; }
  .steps { flex-wrap: wrap; } .step { flex: 1 1 50%; border-top: 1px solid var(--border); }
  .two { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .page-head .actions { width: 100%; } .page-head .actions .seg { width: 100%; grid-auto-columns: minmax(0, 1fr); } .page-head .actions .seg button { padding: 0 6px; }
  .two-col { grid-template-columns: 1fr; } .read-grid, .disc { grid-template-columns: 1fr; } .traffic li { grid-template-columns: 110px minmax(0, 1fr) 40px; } .stats.five { grid-template-columns: 1fr 1fr; } .stats.five .stat { border-left: 1px solid var(--border); } .stats.five .stat:nth-child(odd) { border-left: 0; } .stats.five .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .lf-grid { grid-template-columns: 1fr 1fr; } .lf { border-left: 0; padding-left: 0; }
  .toplist li { grid-template-columns: 24px 88px minmax(0, 1fr); } .thumbimg { width: 88px; } .t-stats { grid-column: 3; flex-wrap: wrap; gap: 10px; }
  .metrics { grid-template-columns: 1fr 1fr; } .metric.wide { grid-column: span 2; } .metric:nth-child(3) { border-left: 0; } .metric:nth-child(n+3) { border-top: 1px solid var(--border); }
  .beats li { grid-template-columns: 1fr; gap: 6px; } .beat-time { justify-self: start; }
  .kv { grid-template-columns: 1fr; }
  table.stack thead { display: none; } table.stack td { display: block; border: 0; padding: 3px 12px; } table.stack tr { display: block; border-bottom: 1px solid var(--border); padding: 9px 0; }
}
@media (prefers-reduced-motion: reduce) {
  /* tier 1: remove movement */
  .rise, .tab-body.enter, .login .brandside > *, .login form, #update-bar { animation-name: fade-in !important; animation-delay: 0ms !important; animation-duration: 180ms !important; }
  .login .rule span, button.is-done, button.copy.copied svg.i { animation: none !important; }
  .view.leaving { transform: none; }
  .brand-veil { display: none; }
  .ins-card:hover { transform: none; } button.star.pop svg.i { animation: none !important; }
  button:active:not(:disabled), .bucket-opt:active { transform: none; }
  dialog, dialog[open], #toast, #toast.show { transform: none !important; }
  @starting-style { dialog[open] { transform: none; } }
  .tab-ink, .seg .thumb { transition-duration: 1ms !important; }
  details::details-content { transition: none; }
  /* tier 2: no looping motion; the dot stays visible */
  .tag.live .d, .queue.busy .dot, .step.now .n { animation: none !important; }
  .bar span, .mix span { transition: none; }
  /* tier 3 (kept): opacity fades, colour transitions, focus rings, the loading spinner */
}

/* ---- Brand switch: frosted glass. Only opacity/transform animate; the blur is static and fades with the pane. ---- */
.brand-veil { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0;
  background: color-mix(in srgb, var(--bg) 42%, transparent); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  transition: opacity 240ms var(--ease-out); }
.brand-veil::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 45%, rgba(var(--vt), .16), rgba(var(--vt), .04) 70%); }
.brand-veil.to-docketworks { --vt: 43, 108, 143; } .brand-veil.to-speakeasy { --vt: 201, 105, 26; }
:root[data-theme="dark"] .brand-veil.to-docketworks { --vt: 111, 177, 214; } :root[data-theme="dark"] .brand-veil.to-speakeasy { --vt: 240, 164, 94; }
.brand-veil.in { opacity: 1; }
.brand-veil.out { opacity: 0; transition: opacity 420ms cubic-bezier(.4, 0, .2, 1); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .brand-veil { background: color-mix(in srgb, var(--bg) 88%, transparent); } }
/* the page comes into focus as the glass lifts */
.view.settle { animation: settle 520ms var(--ease-out); }
@keyframes settle { from { opacity: .55; transform: scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view.settle { animation: none; } }

/* ================= Sidebar =================
   Desktop: 256px, collapses to a 72px icon rail (column width is a registered length so it can transition).
   Every icon sits on the same x in both states (rail centre = 36px), so collapsing never makes things jump.
   <=960px: the sidebar becomes a drawer that slides over the page; a slim top bar carries menu, logo and brand switch. */
@property --side-w { syntax: "<length>"; inherits: true; initial-value: 256px; }
.app { --side-w: 256px; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: --side-w 320ms var(--ease-out); }
.app.collapsed { --side-w: 72px; }
.app > * { min-width: 0; }
.topbar, .side-scrim, .side-close { display: none; }
.side { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px 14px;
  display: flex; flex-direction: column; gap: 18px; overflow: hidden auto; overscroll-behavior: contain; }
.side .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; transition: opacity 180ms var(--ease-out) 90ms; }

/* head: logo (clips to the mic when collapsed) + collapse button */
.side-head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; position: relative; }
.side .brandmark { display: block; overflow: hidden; width: 190px; padding-left: 14px; transition: width 320ms var(--ease-out), padding 320ms var(--ease-out); }
.side .brandmark img { height: 22px; width: auto; max-width: none; display: block; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--faint); cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.icon-btn:hover { background: var(--hover); color: var(--text); border-color: var(--border); }
/* collapse control: a quiet panel icon at the right of the header; in the rail it takes the logo's place on hover */
.side-toggle { position: absolute; right: 0; top: 2px; color: var(--faint); transition: right 320ms var(--ease-out), opacity 160ms var(--ease-out), background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.side-toggle svg.i { width: 18px; height: 18px; }
.side .brandmark { transition: width 320ms var(--ease-out), opacity 160ms var(--ease-out); }

/* brand switch: two rows in a quiet track; a raised thumb slides between them */
.brand-switch { position: relative; display: grid; grid-auto-rows: 48px; gap: 2px; padding: 4px; border-radius: 12px; background: var(--hover); border: 1px solid var(--border); }
.brand-switch .bs-thumb { position: absolute; left: 4px; right: 4px; top: 4px; height: 48px; border-radius: 9px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(16,19,24,.08), 0 0 0 1px var(--border), inset 3px 0 0 var(--brand);
  transform: translateY(calc(var(--bi, 0) * 50px)); transition: transform 420ms var(--ease-spring), box-shadow 520ms var(--ease-out); }
.brand-switch [role=radio] { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 6px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.brand-switch [role=radio]:hover { color: var(--text); }
.brand-switch [role=radio][aria-checked="true"] { color: var(--text); }
.brand-switch .txt { display: grid; line-height: 1.2; }
.brand-switch .txt b { font: 600 14px var(--sans); }
.brand-switch [aria-checked="true"] .txt b { color: var(--brand-text); }
.brand-switch .txt small { font-size: 12px; color: var(--faint); }
.brand-switch .mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--navy); overflow: hidden; transition: box-shadow 300ms var(--ease-out); }
.brand-switch .mark img { width: 16px; height: 16px; }
.brand-switch .mark.dw { background: none; } .brand-switch .mark.dw img { width: 28px; height: 28px; }
.brand-switch [aria-checked="false"] .mark { filter: saturate(.6); opacity: .8; }

/* nav groups */
.side-nav { display: flex; flex-direction: column; gap: 16px; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-group > .label { position: relative; height: 28px; display: flex; align-items: center; padding: 0 14px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.side-group > .label::after { content: ""; position: absolute; left: 14px; right: 14px; top: 50%; height: 1px; background: var(--border); opacity: 0; transition: opacity 180ms var(--ease-out); }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 14px; border-radius: var(--r); border: 0;
  background: transparent; color: var(--text-2); font: 500 14px var(--sans); text-decoration: none; cursor: pointer; text-align: left; transition: background var(--t-fast), color var(--t-fast); }
.nav-item svg.i { width: 20px; height: 20px; flex: 0 0 20px; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }

/* footer */
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 10px; }
.queue { font-size: 14px; color: var(--muted); }
.queue .qdot { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; }
.queue .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.queue.busy .dot { background: var(--orange); }
.theme-slot { position: relative; height: 44px; margin: 4px 0; }
.theme-toggle { position: absolute; inset: 0; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--hover); transition: opacity 160ms var(--ease-out) 90ms; }
.theme-toggle button { flex: 1; min-height: 34px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; border-radius: 7px; gap: 6px; }
.theme-toggle button:hover { background: transparent; color: var(--text); }
.theme-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,19,24,.1), 0 0 0 1px var(--border); }
.theme-flip { position: absolute; inset: 1px 0; opacity: 0; pointer-events: none; transition: opacity 160ms var(--ease-out); }

/* ---- collapsed rail (desktop only) ---- */
@media (min-width: 961px) {
  .app.collapsed .side .txt { opacity: 0; transition-delay: 0ms; transition-duration: 110ms; }
  .app.collapsed .side .brandmark { width: 34px; padding-left: 14px; }
  .app.collapsed .side-toggle { right: 8px; }
  .app.collapsed .side .brandmark { opacity: 0; pointer-events: none; transition: width 320ms var(--ease-out), opacity 120ms var(--ease-in); }
  .app.collapsed .side-group > .label::after { opacity: 1; transition-delay: 120ms; }
  .app.collapsed .brand-switch [role=radio] .txt { visibility: hidden; }
  .app.collapsed .theme-toggle { opacity: 0; pointer-events: none; transition-delay: 0ms; transition-duration: 110ms; }
  .app.collapsed .theme-flip { opacity: 1; pointer-events: auto; transition-delay: 120ms; }
  .app.collapsed .side { overflow-y: auto; }
}
.side-tip { position: fixed; z-index: 120; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff; font: 500 13px var(--sans); white-space: nowrap;
  box-shadow: 0 6px 20px -6px rgba(16,19,24,.35); opacity: 0; transform: translate(-4px, -50%); transition: opacity 120ms var(--ease-out), transform 160ms var(--ease-out); }
.side-tip.show { opacity: 1; transform: translate(0, -50%); }
:root[data-theme="dark"] .side-tip { background: #EDEAE4; color: #101318; }

/* ---- drawer + top bar (<=960px) ---- */
@media (max-width: 960px) {
  .app, .app.collapsed { --side-w: 0px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 60; height: 58px; padding: 0 12px 0 6px;
    background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--border); }
  .topbar .icon-btn { width: 44px; height: 44px; color: var(--text-2); }
  .topbar .brandmark { display: block; } .topbar .brandmark img { height: 20px; width: auto; display: block; }
  .brand-switch.mini { margin-left: auto; grid-auto-flow: column; grid-auto-rows: 36px; grid-auto-columns: 40px; padding: 3px; border-radius: 11px; }
  .brand-switch.mini .bs-thumb { left: 3px; top: 3px; right: auto; width: 40px; height: 36px; border-radius: 8px; box-shadow: 0 1px 2px rgba(16,19,24,.08), 0 0 0 1px var(--border), inset 0 -2px 0 var(--brand);
    transform: translateX(calc(var(--bi, 0) * 42px)); }
  .brand-switch.mini [role=radio] { justify-content: center; padding: 0; }
  .brand-switch.mini .mark { width: 26px; height: 26px; } .brand-switch.mini .mark.dw img { width: 26px; height: 26px; }
  .side { position: fixed; z-index: 80; left: 0; top: 0; bottom: 0; height: auto; width: min(300px, 86vw); padding-top: 14px;
    transform: translateX(-104%); transition: transform 300ms var(--ease-in); box-shadow: none; visibility: hidden; }
  .app.drawer-open .side { transform: none; visibility: visible; transition: transform 380ms var(--ease-out), visibility 0s; box-shadow: 0 24px 60px -12px rgba(16,19,24,.35); }
  .app:not(.drawer-open) .side { transition: transform 280ms var(--ease-in), visibility 0s 280ms; }
  .side-toggle { display: none; } .side-close { display: grid; }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(16,19,24,.42); opacity: 0; pointer-events: none; transition: opacity 260ms var(--ease-out); }
  .app.drawer-open .side-scrim { opacity: 1; pointer-events: auto; }
  .side .brandmark { width: auto; }
  .nav-item { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .app { transition: none; } .side, .app.drawer-open .side, .app:not(.drawer-open) .side { transition: visibility 0s; }
  .brand-switch .bs-thumb, .side .brandmark, .side-toggle svg.i { transition-duration: 1ms !important; }
}
.queue.busy .dot { animation: pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .queue.busy .dot { animation: none; } }
.side-head .side-close { display: none; }
.nav-item, .brand-switch [role=radio] { justify-content: flex-start; }
@media (max-width: 960px) { .side-head .side-close { display: grid; } }
.side-tip kbd { margin-left: 8px; padding: 0 5px; border-radius: 4px; border: 1px solid rgba(255,255,255,.25); font: 500 12px var(--sans); opacity: .8; }
:root[data-theme="dark"] .side-tip kbd { border-color: rgba(16,19,24,.25); }

/* brand switch polish: inactive marks sit back; the active one springs forward as the thumb bounces across */
.brand-switch .mark { transition: opacity 260ms var(--ease-out), filter 260ms var(--ease-out); }
.brand-switch .bs-thumb { transition: transform 380ms var(--ease-move), left 320ms var(--ease-out), right 320ms var(--ease-out), top 320ms var(--ease-out),
  width 320ms var(--ease-out), height 320ms var(--ease-out), border-radius 320ms var(--ease-out), background-color 320ms var(--ease-out), box-shadow 320ms var(--ease-out); }
.brand-switch { transition: background-color 320ms var(--ease-out), border-color 320ms var(--ease-out); }
/* collapsed rail: no track, just a soft rounded tile that glides between the two marks */
@media (min-width: 961px) {
  .app.collapsed .brand-switch { background: transparent; border-color: transparent; }
  .app.collapsed .brand-switch .bs-thumb { left: 4px; right: 4px; top: 6px; height: 40px; border-radius: 12px; background: var(--brand-soft);
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 45%, transparent); }
  .app.collapsed .brand-switch [role=radio]:hover .mark { opacity: 1; filter: none; }
}
.app.no-anim, .app.no-anim .side, .app.no-anim .side * { transition: none !important; }

/* ================= Content production: team picks, clean script page, calendar, studio ================= */
.push { margin-left: auto; }
/* links that act as buttons share the button look */
a.button { font: 600 14px/1 var(--sans); min-height: 42px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
a.button:hover { background: var(--hover); }
a.button.secondary { border-color: var(--primary); color: var(--primary-text); } a.button.secondary:hover { background: var(--primary-soft); }
a.button.quiet { border-color: transparent; background: transparent; color: var(--text-2); padding: 0 10px; } a.button.quiet:hover { background: var(--hover); }
svg.i { flex: 0 0 auto; }

/* ---- idea rows: the title link covers the row, so buttons inside it still work ---- */
.row { position: relative; }
.row .row-link { color: inherit; text-decoration: none; }
.row .row-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.row .row-link:focus-visible { outline: none; }
.row:has(.row-link:focus-visible) { outline: 2px solid var(--ring); outline-offset: -2px; }
.row .pick, .row .tags a { position: relative; z-index: 1; }

/* ---- pick button + avatars ---- */
.av { --h: 212; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 600 10px/1 var(--sans); letter-spacing: .02em;
  background: hsl(var(--h) 45% 90%); color: hsl(var(--h) 45% 28%); box-shadow: 0 0 0 2px var(--surface); flex: 0 0 auto; }
:root[data-theme="dark"] .av { background: hsl(var(--h) 30% 26%); color: hsl(var(--h) 60% 85%); }
.av.more { --h: 30; background: var(--hover); color: var(--muted); }
button.pick .pk-av { display: inline-flex; margin-left: 2px; }
button.pick .pk-av:empty { display: none; }
button.pick .pk-av .av + .av { margin-left: -6px; }
button.pick.sm .av { width: 19px; height: 19px; font-size: 9px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }

/* sidebar: who's signed in */
.nav-item.who .av { width: 22px; height: 22px; margin: 0 -1px; box-shadow: none; }
.nav-item.who .txt span { display: grid; line-height: 1.2; }
.nav-item.who small { font-size: 12px; color: var(--faint); font-weight: 500; }

/* ---- make prompt ---- */
.make-opts { display: grid; gap: 10px; margin: 14px 0; }
button.make-opt { justify-content: flex-start; gap: 14px; min-height: 64px; padding: 12px 14px; text-align: left; white-space: normal; border-color: var(--border); }
button.make-opt:hover { border-color: var(--primary); background: var(--primary-soft); }
button.make-opt b { display: block; font-size: 15px; }
button.make-opt .meta { display: block; font-weight: 400; margin-top: 3px; }
.mo-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); flex: 0 0 auto; }

/* ---- make flow ---- */
.wait-card { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 44px 28px; }
.wait-card h2 { font-size: 26px; }
.wait-card p { max-width: 52ch; color: var(--text-2); }
.spinner.lg { width: 30px; height: 30px; border-width: 3px; color: var(--brand); }
.read-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 20px 0 6px; }
.piece-seg { grid-auto-columns: minmax(88px, 1fr); }
button.cta { background: var(--orange); border-color: var(--orange); color: #fff; }

/* the script, set for reading aloud */
.script-read { max-width: 68ch; font: 400 17px/1.75 var(--sans); color: var(--text); padding: 6px 0 8px; }
.script-read p + p { margin-top: 1em; }
.script-read .cue, .pr-text .cue { color: var(--faint); font-size: .82em; font-style: italic; }
.takes li { gap: 12px; align-items: center; }
.tk-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--hover); color: var(--muted); flex: 0 0 auto; }
.takes li > span:nth-child(2) { flex: 1; min-width: 0; }

/* ---- clean script page ---- */
.doc-head { max-width: 980px; margin-bottom: 22px; }
.doc-head h1 { font-size: 44px; line-height: 1.08; letter-spacing: -.02em; margin-top: 12px; }
.doc-head .promise { margin-top: 12px; font-size: 17px; line-height: 1.55; color: var(--text-2); max-width: 70ch; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.date-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 6px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--muted); }
.date-pick input { border: 0; background: transparent; min-height: 38px; padding: 0 4px; font: 500 14px var(--sans); color: var(--text); box-shadow: none; }
.date-pick:focus-within { border-color: var(--primary); }
.piece-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.piece-nav a { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 14px; color: var(--muted); font-weight: 600; text-decoration: none; box-shadow: inset 0 -2px 0 transparent; white-space: nowrap; transition: color var(--t-fast), box-shadow var(--t) var(--ease-move); }
.piece-nav a:hover { color: var(--text); }
.piece-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.piece-nav small { font-weight: 500; color: var(--faint); font-size: 12px; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.doc-main { padding: 22px 28px 28px; }
.doc-main .panel-head .seg { grid-auto-columns: minmax(92px, 1fr); }
.sp-aside { display: flex; flex-direction: column; gap: 16px; }
.sp-aside .titles li { gap: 10px; }
.sp-aside .titles input { flex: 1; min-width: 0; }
.thumbs.one { grid-template-columns: 1fr; }
.desc-text { white-space: pre-wrap; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.edit-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; border-radius: var(--r); background: var(--brand-soft); }
textarea.script-edit { width: 100%; min-height: 420px; resize: vertical; font: 400 17px/1.7 var(--sans); padding: 16px 18px; }

/* ---- library ---- */
.lib-filters { display: contents; }
.planned { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary-text); }
.planned svg.i { width: 15px; height: 15px; }
.seg button svg.i { width: 16px; height: 16px; }

/* ---- content calendar ---- */
.cal-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.cal-rail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; transition: box-shadow var(--t), border-color var(--t); }
.cal-rail .meta { margin: -2px 0 12px; }
.rail-items { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.cal-card { display: grid; gap: 4px; padding: 9px 10px 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none;
  box-shadow: 0 1px 2px rgba(16,19,24,.05); cursor: grab; position: relative; transition: border-color var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast); }
.cal-card:hover { border-color: var(--border-strong); box-shadow: 0 4px 14px -6px rgba(16,19,24,.18); }
.cal-card:active { cursor: grabbing; }
.cal-card.dragging { opacity: .4; }
.cal-card.draft { border-style: dashed; }
.cc-fmt { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cc-fmt i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.f-core90 .cc-fmt i, .f-dialogue .cc-fmt i, .f-data_explainer .cc-fmt i { background: var(--navy); }
.f-short_a .cc-fmt i, .f-short_b .cc-fmt i, .f-rough_short .cc-fmt i { background: var(--orange); }
.f-teardown .cc-fmt i, .f-archival .cc-fmt i, .f-trending .cc-fmt i { background: var(--ok); }
:root[data-theme="dark"] .f-core90 .cc-fmt i, :root[data-theme="dark"] .f-dialogue .cc-fmt i, :root[data-theme="dark"] .f-data_explainer .cc-fmt i { background: #7FB2DD; }
.cc-t { font: 600 14px/1.35 var(--sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-card.landed { animation: land 260ms var(--ease-move); }
@keyframes land { from { opacity: .5; transform: scale(.97); } to { opacity: 1; transform: none; } }
.cal-month { padding: 16px 16px 18px; }
.cal-head { display: flex; align-items: center; gap: 6px; margin: 0 2px 14px; }
.cal-head h2 { font-size: 26px; margin: 0 6px; min-width: 200px; }
.flip { display: inline-grid; transform: rotate(180deg); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--border); gap: 1px; }
.cal-dow { background: var(--surface-2); padding: 8px 10px; font: 600 12px var(--sans); color: var(--muted); letter-spacing: .03em; }
.cal-day { background: var(--surface); min-height: 118px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 6px; transition: background var(--t-fast), box-shadow var(--t-fast); }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .cal-n, .cal-day.past .cal-n { color: var(--faint); }
.cal-n { font: 600 13px var(--sans); color: var(--text-2); padding: 2px 4px; align-self: flex-start; border-radius: 6px; }
.cal-day.today .cal-n { background: var(--brand); color: #fff; padding: 3px 7px; }
.cal-items { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cal-items .cal-card { padding: 7px 8px 8px 9px; }
.cal-items .cc-t { font-size: 13px; }
body.cal-dragging .cal-day, body.cal-dragging .cal-rail { transition: background var(--t-fast), box-shadow var(--t-fast); }
.cal-day.over { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.cal-rail.over { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.cal-agenda { display: none; }
.ag-day { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.ag-day:first-child { border-top: 0; }
.kicker.is-today { color: var(--brand-text); }

/* ================= Studio: teleprompter + recorder ================= */
body.studio-open { overflow: hidden; }
.studio { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #0C0E11; color: #F3EFE7;
  --line: rgba(255,255,255,.1); animation: studio-in 260ms var(--ease-move); }
.studio.leaving { animation: studio-out 200ms var(--ease-in) forwards; }
@keyframes studio-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes studio-out { to { opacity: 0; transform: scale(.985); } }
.studio button { color: inherit; }
.pr-top { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.pr-title { display: grid; gap: 2px; min-width: 0; }
.pr-title .kicker { color: rgba(243,239,231,.55); }
.pr-title b { font: 600 15px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.pr-saved { font: 500 13px var(--sans); color: #9FD5AE; }
.pr-close { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: transparent; }
.pr-close:hover { background: rgba(255,255,255,.08); }
.pr-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.pr-seg button { min-height: 34px; padding: 0 12px; border: 0; background: transparent; color: rgba(243,239,231,.65); font-size: 14px; gap: 7px; }
.pr-seg button:hover { background: transparent; color: #fff; }
.pr-seg button[aria-checked="true"] { background: rgba(255,255,255,.14); color: #fff; }
.pr-seg button svg.i { width: 16px; height: 16px; }
.pr-stage { position: relative; min-height: 0; overflow: hidden; }
.pr-scroll { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; outline: none; }
.pr-scroll::-webkit-scrollbar { display: none; }
.pr-text { max-width: 980px; margin: 0 auto; padding: 34vh 48px 70vh; font-size: var(--psize, 44px); font-family: var(--sans); font-weight: 500; line-height: 1.5; letter-spacing: .005em; }
.pr-text p + p { margin-top: .7em; }
/* reading line: text passing it is what you say next */
.pr-guide { position: absolute; left: 0; right: 0; top: 34vh; height: 2.2em; transform: translateY(-.25em); pointer-events: none; font-size: var(--psize, 44px);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.045) 12%, rgba(255,255,255,.045) 88%, transparent);
  border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.pr-guide::before { content: ""; position: absolute; left: 18px; top: 50%; border: 8px solid transparent; border-left-color: var(--orange); transform: translateY(-50%); }
.pr-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(#0C0E11 0%, rgba(12,14,17,0) 22%, rgba(12,14,17,0) 70%, #0C0E11 100%); }
.pr-pip { position: absolute; z-index: 2; right: 20px; top: 16px; width: min(300px, 32vw); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; transform: scaleX(-1);
  background: #000; box-shadow: 0 10px 30px -8px rgba(0,0,0,.6), 0 0 0 1px var(--line); }
.pr-count { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; font: 700 160px/1 var(--display); color: #fff; opacity: 0; pointer-events: none; }
.pr-count.show { animation: count 850ms var(--ease-move); }
@keyframes count { 0% { opacity: 0; transform: scale(1.12); } 25% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.studio.counting .pr-stage::before { content: ""; position: absolute; inset: 0; z-index: 2; background: rgba(12,14,17,.55); }
.pr-note { position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: min(560px, 90%); text-align: center;
  padding: 10px 16px; border-radius: 12px; background: rgba(255,255,255,.08); font-size: 14px; line-height: 1.45; }
.pr-note:empty { display: none; }
.pr-review { position: absolute; z-index: 4; right: 20px; bottom: 96px; width: min(420px, calc(100% - 40px)); padding: 16px; border-radius: 16px;
  background: #171A1F; border: 1px solid var(--line); box-shadow: 0 20px 50px -12px rgba(0,0,0,.7); display: grid; gap: 12px; animation: rise-in 260ms var(--ease-move); }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pr-review[hidden] { display: none; }
.rv-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rv-head .meta { color: rgba(243,239,231,.6); }
.pr-review video { width: 100%; border-radius: 10px; background: #000; }
.pr-review audio { width: 100%; }
.rv-actions { display: flex; justify-content: flex-end; gap: 8px; }
.rv-actions .quiet { color: rgba(243,239,231,.75); }
.rv-actions .quiet:hover { background: rgba(255,255,255,.08); }
.pr-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); background: #101317; }
.pr-center { display: flex; align-items: center; gap: 14px; }
button.pr-rec { min-height: 52px; padding: 0 22px 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); font-size: 15px; gap: 10px; }
button.pr-rec:hover { background: rgba(255,255,255,.12); }
.pr-rec .dot { width: 18px; height: 18px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 3px rgba(229,72,77,.25); }
.pr-rec .sq { width: 14px; height: 14px; border-radius: 3px; background: #E5484D; }
.studio.recording button.pr-rec { border-color: rgba(229,72,77,.6); background: rgba(229,72,77,.12); }
.pr-clock { font: 600 16px var(--sans); min-width: 44px; color: rgba(243,239,231,.7); }
.studio.recording .pr-clock { color: #FF8A8E; }
.studio.recording .pr-top::after { content: "Recording"; margin-left: 4px; padding: 5px 10px; border-radius: 999px; background: rgba(229,72,77,.16); color: #FF8A8E; font: 600 12px var(--sans); order: 3; }
.pr-meter { width: 72px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.pr-meter span { display: block; height: 100%; background: #6FCF97; transform-origin: left; transform: scaleX(0); transition: transform 80ms linear; }
.pr-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
button.pr-btn { min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; font-size: 14px; }
button.pr-btn:hover { background: rgba(255,255,255,.08); }
button.pr-btn[aria-pressed="true"] { background: rgba(255,255,255,.14); }
.pr-range { display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--sans); color: rgba(243,239,231,.65); }
.pr-range input { width: 96px; accent-color: var(--orange); }
.studio [inert] { opacity: .45; }

/* ---- responsive ---- */
@media (max-width: 1100px) { .doc-grid { grid-template-columns: 1fr; } .cal-wrap { grid-template-columns: 1fr; } .cal-rail { position: static; max-height: none; }
  .rail-items { flex-direction: row; overflow-x: auto; padding-bottom: 4px; } .rail-items .cal-card { flex: 0 0 220px; } }
@media (max-width: 820px) {
  .cal-grid { display: none; } .cal-agenda { display: block; }
  .pr-bar { grid-template-columns: 1fr; justify-items: center; gap: 10px; } .pr-tools { justify-content: center; }
  .pr-text { padding: 30vh 22px 70vh; } .pr-guide { top: 30vh; }
  .pr-pip { width: 38vw; right: 12px; top: 12px; } .pr-review { right: 12px; left: 12px; width: auto; bottom: 12px; }
  .pr-top .pr-seg { display: none; }
}
@media (max-width: 640px) { .doc-head h1 { font-size: 32px; } .doc-main { padding: 18px 16px 20px; } .script-read { font-size: 17px; } .cal-head h2 { min-width: 0; font-size: 22px; } }
@media (prefers-reduced-motion: reduce) {
  .studio, .studio.leaving, .pr-review, .cal-card.landed { animation: none !important; }
  .pr-count.show { animation: none; opacity: 1; }
}
.sp-aside .titles li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
.sp-aside .titles li .t, .sp-aside .titles li input { grid-column: 1 / -1; }

/* pick popover: quiet, anchored to the Pick button */
.pick-pop { position: fixed; z-index: 150; width: 340px; max-width: calc(100vw - 24px); padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 18px 44px -14px rgba(16,19,24,.28), 0 2px 6px rgba(16,19,24,.06); display: grid; gap: 10px; animation: pp-in 180ms var(--ease-move); }
.pick-pop.out { animation: pp-out 150ms var(--ease-in) forwards; }
@keyframes pp-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes pp-out { to { opacity: 0; transform: translateY(-4px); } }
.pp-head { display: flex; align-items: center; gap: 8px; }
.pp-head b { font-size: 14px; }
.pp-head .meta { margin-left: auto; }
.pp-ok { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.pp-ok svg.i { width: 13px; height: 13px; }
.pick-pop textarea { min-height: 64px; font-size: 14px; resize: vertical; }
.pp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.pp-foot .quiet { padding: 0 8px; color: var(--primary-text); }
.pp-foot .quiet svg.i { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .pick-pop, .pick-pop.out { animation: none; } }
.pr-bar > .pr-seg { justify-self: start; }
@media (max-width: 820px) { .pr-bar > .pr-seg { justify-self: center; } }

/* ---- idea card: at-a-glance signals + "Why this idea" drawer ---- */
.signals { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 9px; font-size: 13px; color: var(--muted); }
.sg { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sg svg.i { width: 14px; height: 14px; color: var(--faint); }
.sg b { color: var(--text); font-weight: 600; }
.sg-up { color: var(--ok); font-weight: 600; margin-left: 2px; }
.sg i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.sg-ok i { background: var(--ok); } .sg-warn i { background: #C98A12; } .sg-bad i { background: var(--bad); }
.sg-flag { color: var(--warn); font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--warn-soft); font-size: 12px; }
.why-score .kicker, .why-text .kicker { display: block; margin-bottom: 8px; }
.sbars { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.sbars li { display: grid; grid-template-columns: 124px minmax(0, 1fr) 38px; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.sb-t { height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.sb-t span { display: block; height: 100%; border-radius: 3px; background: var(--primary); }
:root[data-theme="dark"] .sb-t span { background: #7FB2DD; }
.sb-v { text-align: right; color: var(--muted); font-size: 12px; }
.why-text { display: grid; gap: 14px; }
.why-text p { font-size: 14px; line-height: 1.55; color: var(--text-2); max-width: 78ch; }
.kw-list, .ev-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; }
.kw-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ev-list li { display: grid; gap: 1px; }
.ev-list a { color: var(--primary-text); }


/* ---- "Why this idea": a tinted strip on the card's bottom edge; details slide open beneath it.
   Motion (animation skills): height via grid rows 0fr -> 1fr on a decelerate curve, content fades + settles 4px after,
   closing is faster than opening, chevron turns with the panel. Reduced motion: instant. ---- */
.row { --rp-x: 20px; --rp-b: 18px; }
.why-wrap { grid-column: 1 / -1; margin: -10px calc(-1 * var(--rp-x)) calc(-1 * var(--rp-b)); position: relative; z-index: 1; }
button.why-strip { width: 100%; min-height: 40px; padding: 0 var(--rp-x); gap: 12px; justify-content: flex-start; border: 0; border-top: 1px solid var(--border); border-radius: 0;
  background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); color: var(--brand-text); font: 600 13px var(--sans); transition: background var(--t-fast); }
button.why-strip:hover { background: var(--brand-soft); }
button.why-strip:active:not(:disabled) { transform: none; }
button.why-strip:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.ws-sum { font-weight: 500; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ws-chev { margin-left: auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; transition: transform 280ms var(--ease-move), background var(--t-fast); }
.ws-chev svg.i { width: 15px; height: 15px; transform: rotate(90deg); }
button.why-strip:hover .ws-chev { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.row.open button.why-strip .ws-chev { transform: rotate(180deg); }
.why { display: grid; grid-template-rows: 0fr; background: color-mix(in srgb, var(--brand-soft) 30%, var(--surface)); transition: grid-template-rows 220ms var(--ease-in); }
.row.open .why { grid-template-rows: 1fr; transition: grid-template-rows 340ms var(--ease-move); }
.why-in { min-height: 0; overflow: hidden; display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 18px 32px; padding: 0 var(--rp-x);
  opacity: 0; transform: translateY(-4px); transition: opacity 140ms var(--ease-in), transform 140ms var(--ease-in); }
.row.open .why-in { opacity: 1; transform: none; padding: 16px var(--rp-x) 18px; transition: opacity 240ms var(--ease-out) 90ms, transform 300ms var(--ease-move) 90ms; }
.row.open button.why-strip { background: var(--brand-soft); }
@media (max-width: 820px) { .why-in { grid-template-columns: 1fr; } .ws-sum { display: none; } }
@media (max-width: 640px) { .row { --rp-x: 16px; --rp-b: 16px; } }
@media (prefers-reduced-motion: reduce) { .why, .row.open .why, .why-in, .row.open .why-in, .ws-chev { transition: none; } .why-in { transform: none; } }
.tag.manual { background: var(--hover); color: var(--text-2); }
.tag.manual .d { background: var(--muted); }

/* ---- idea cards: separated, soft shadow, strip is the clickable footer ---- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.idea-list { display: grid; gap: 14px; background: none; border: 0; border-radius: 0; overflow: visible; }
.idea-list > .row { --card-r: 14px; border: 1px solid var(--border); border-radius: var(--card-r); background: var(--surface);
  box-shadow: 0 1px 2px rgba(16,19,24,.04), 0 8px 22px -14px rgba(16,19,24,.16); }
.idea-list > .row.top { box-shadow: inset 3px 0 0 var(--orange), 0 1px 2px rgba(16,19,24,.04), 0 8px 22px -14px rgba(16,19,24,.16); }
/* hover depth: a pre-rendered shadow layer fades in (cheaper than animating box-shadow) */
.idea-list > .row::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 18px 40px -18px rgba(16,19,24,.28); transition: opacity 220ms var(--ease-out); }
.idea-list > .row:hover::before { opacity: 1; }
.idea-list > .row:hover { background: var(--surface); border-color: var(--border-strong); }
:root[data-theme="dark"] .idea-list > .row { box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 24px -14px rgba(0,0,0,.6); }
:root[data-theme="dark"] .idea-list > .row::before { box-shadow: 0 20px 44px -18px rgba(0,0,0,.75); }
.idea-list > .row:first-child { border-top: 1px solid var(--border); }
.idea-list .why-wrap { border-radius: 0 0 var(--card-r) var(--card-r); overflow: hidden; margin-top: -6px; }
/* scroll-in */
.idea-list > .row.reveal { opacity: 0; transform: translateY(16px); }
.idea-list > .row.reveal.in { opacity: 1; transform: none; transition: opacity 420ms var(--ease-out) var(--d, 0ms), transform 560ms var(--ease-move) var(--d, 0ms), border-color var(--t-fast); }
@media (prefers-reduced-motion: reduce) { .idea-list > .row.reveal { opacity: 1; transform: none; } }

/* the strip: taller, with an icon and an explicit "Show details" affordance */
button.why-strip { min-height: 50px; gap: 12px; font-size: 14px; }
.ws-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-text); flex: 0 0 auto; }
.ws-ic svg.i { width: 15px; height: 15px; }
.ws-go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  background: var(--surface); color: var(--brand-text); font-size: 13px; font-weight: 600; transition: border-color var(--t-fast), background var(--t-fast); }
button.why-strip:hover .ws-go { border-color: var(--brand); }
.ws-go .ws-chev { margin: 0; width: 18px; height: 18px; }
.ws-go .ws-chev svg.i { width: 14px; height: 14px; }
button.why-strip:hover .ws-chev { background: none; }
.ws-hide, .row.open .ws-show { display: none; }
.row.open .ws-hide { display: inline; }
@media (max-width: 640px) { .ws-go .ws-show, .ws-go .ws-hide { display: none !important; } .ws-go { padding: 5px; } .idea-list { gap: 12px; } }

/* ================= Type + rhythm pass (ui-ux-pro-max: one scale, weight hierarchy, 4.5:1 secondary text, 1.5+ body leading) =================
   Scale: 12 label · 13 meta · 14 UI · 15 body · 16–17 item titles · 20 subhead · 26 section · 36/44 page.
   Weights: 400 body · 500 meta emphasis · 600 labels, buttons, item titles · display serif for page/section titles. */
h1, h2, .page-head h1, .doc-head h1, .detail-head h1 { text-wrap: balance; }
p, .row .title p, .why-text p, .script-read p { text-wrap: pretty; }
.kicker, .stat .label { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.meta { font-size: 13px; line-height: 1.5; }
.label { font-size: 13px; }

/* page + section heads */
.page-head p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.view-note { font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.gh-title h2, .panel-head h2 { letter-spacing: -.012em; }
.gh-meta { font-size: 14px; margin-top: 6px; }
.group-head { margin-bottom: 14px; }
.group + .group { margin-top: 36px; }

/* idea cards: clear title → summary → signals → actions rhythm */
.row .title h3 { font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
.row .title p { font-size: 15px; line-height: 1.6; margin-top: 6px; color: var(--text-2); }
.signals { margin-top: 12px; font-size: 13px; gap: 6px 18px; }
.sg b { font-weight: 600; }
.row .title .tags { margin-top: 14px; gap: 8px 12px; }
.row .ev { gap: 4px; }
.row .ev .what { font-size: 14px; line-height: 1.5; }
.row .ev .more { font-size: 13px; color: var(--muted); }
.facet { font-size: 13px; }
.tag { font-size: 12px; padding: 5px 9px; letter-spacing: .01em; }
button.why-strip { font-size: 14px; }
.ws-sum { font-size: 13px; }
.ws-go { font-size: 13px; }
.idea-list > .row { padding-top: 20px; }

/* stats tiles */
.stat { gap: 4px; }
.stat .sub { font-size: 13px; color: var(--muted); }

/* panels + detail pages */
.panel-head { margin-bottom: 16px; }
.panel p { line-height: 1.6; }
.lead { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.field { font-size: 14px; font-weight: 600; }
.field .hint { font-weight: 400; }
.why-text p, .desc-text { font-size: 14px; line-height: 1.65; }
.sbars li { font-size: 13px; }
.titles li .t { font-weight: 500; line-height: 1.45; }
.plain li .meta { margin-top: 2px; }
.crumbs { font-size: 14px; }
.doc-meta { gap: 8px 16px; }
.doc-head .promise { font-size: 18px; line-height: 1.6; }
table.stack th { font-size: 12px; letter-spacing: .06em; }
table.stack td { font-size: 14px; }

/* long unbroken tokens (URLs, "a+b+c" titles) wrap instead of widening tables and cards */
td.t-main, .row .title, .row .ev .what, .why-text, .ev-list li, .evlist, .plain li, .cal-card .cc-t, .titles li .t { overflow-wrap: anywhere; }
td.t-main { min-width: 200px; } td.signal { min-width: 96px; color: var(--text-2); }
@media (max-width: 640px) { .toolbar > .seg { width: 100%; grid-auto-columns: minmax(0, 1fr); } .toolbar > .seg button { padding: 0 6px; font-size: 13px; } }

/* ---- Touch screens + phones (ui-ux-pro-max: touch-target-size 44px, readable-font-size 16px inputs, touch-spacing) ----
   Regular controls grow to 44px; compact controls keep their look but get an invisible 44px hit area. */
@media (pointer: coarse), (max-width: 640px) {
  button:not(.sm):not(.pick):not(.star):not(.ic-more):not(.copy):not(.why-strip), a.button, select, .crumbs a.back,
  input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=date]) { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  .theme-slot { height: 52px; }
  button.sm, button.pick, button.star, button.ic-more, button.copy, .icon-btn, .piece-nav a, .crumbs a:not(.back) { position: relative; }
  button.sm::after, button.pick::after, button.star::after, button.ic-more::after, button.copy::after, .piece-nav a::after, .crumbs a:not(.back)::after {
    content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 44px; transform: translateY(-50%); }
  table.stack td.t-main a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; }
  .date-pick input { font-size: 16px; }
  .date-pick { min-height: 44px; }
}

/* pick sheet (phones / touch): slides up from the bottom, above a light scrim; never auto-focuses */
.pick-pop.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; border-radius: 18px 18px 0 0; border-bottom: 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); gap: 12px; box-shadow: 0 -14px 40px -14px rgba(16,19,24,.32); animation: sheet-in 280ms var(--ease-move); }
.pick-pop.sheet.out { animation: sheet-out 200ms var(--ease-in) forwards; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { to { transform: translateY(100%); } }
.pp-grab { justify-self: center; width: 38px; height: 4px; border-radius: 2px; background: var(--border-strong); margin-bottom: 2px; }
.pick-pop.sheet .pp-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick-pop.sheet .pp-foot .quiet { justify-content: center; min-height: 44px; border: 1px solid var(--border); background: var(--surface-2); padding: 0 10px; }
.pick-pop.sheet .pp-foot .push { grid-column: 1 / -1; margin-left: 0; min-height: 46px; }
.pick-pop.sheet textarea { font-size: 16px; }
.pp-scrim { position: fixed; inset: 0; z-index: 149; background: rgba(16,19,24,.28); animation: fade-in 200ms var(--ease-out); }
.pp-scrim.out { opacity: 0; transition: opacity 200ms var(--ease-in); }
@media (prefers-reduced-motion: reduce) { .pick-pop.sheet, .pick-pop.sheet.out, .pp-scrim { animation: none; } }

/* sheet buttons share the width and may wrap, never pushing past the screen edge (360px phones) */
.pick-pop.sheet .pp-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pick-pop.sheet .pp-foot .quiet { min-width: 0; white-space: normal; line-height: 1.25; text-align: center; padding: 6px 8px; }
.pick-pop.sheet .pp-head, .pick-pop.sheet textarea { min-width: 0; max-width: 100%; }

/* ================= Pick: Apple-style capsule =================
   Tinted capsule "+ Pick" -> solid brand capsule "✓ Picked". Behind an unpicked capsule, a soft pre-blurred aura of brand
   colour slowly swells and fades (only opacity + scale animate; the blur never changes, so it stays buttery smooth). */
button.pick { position: relative; isolation: isolate; border: 0; border-radius: 999px; min-height: 36px; padding: 0 15px 0 12px; gap: 7px;
  background: color-mix(in srgb, var(--brand) 11%, var(--surface)); color: var(--brand-text); font: 600 13.5px/1 var(--sans); letter-spacing: -.005em;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent);
  transition: background 240ms var(--ease-out), color 240ms var(--ease-out), box-shadow 240ms var(--ease-out), transform 160ms var(--ease-out); }
button.pick:hover { background: color-mix(in srgb, var(--brand) 17%, var(--surface)); }
button.pick:active:not(:disabled) { transform: scale(.96); }
button.pick:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
button.pick[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16,19,24,.12), 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
:root[data-theme="dark"] button.pick[aria-pressed="true"] { color: #0E1216; }
button.pick.sm { min-height: 32px; padding: 0 13px 0 10px; font-size: 13px; gap: 6px; }
/* the glyph: plus and check share one slot and crossfade */
.pk-g { position: relative; width: 14px; height: 14px; flex: 0 0 auto; }
.pk-g > span { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-move); }
.pk-g svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
.pk-g .g-ok { opacity: 0; transform: scale(.6) rotate(-12deg); }
button.pick[aria-pressed="true"] .g-add { opacity: 0; transform: scale(.6) rotate(45deg); }
button.pick[aria-pressed="true"] .g-ok { opacity: 1; transform: none; }
button.pick .pk-av .av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 11%, var(--surface)); }
button.pick[aria-pressed="true"] .pk-av .av { box-shadow: 0 0 0 2px var(--brand); }

/* Pick, glass: frosted capsule with a fine top highlight + a soft light streak that glides across every few seconds
   (sheen sweep from the svg-animation skill, done in CSS; only transform animates; the blur is static per the 60fps skill). */
button.pick { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, rgba(255,255,255,.82)), color-mix(in srgb, var(--brand) 13%, var(--surface)));
  -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent),
    0 1px 2px rgba(16,19,24,.06), 0 6px 16px -8px color-mix(in srgb, var(--brand) 40%, transparent); }
button.pick:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 9%, rgba(255,255,255,.86)), color-mix(in srgb, var(--brand) 18%, var(--surface))); }
button.pick[aria-pressed="true"] { background: linear-gradient(180deg, color-mix(in srgb, #fff 14%, var(--brand)), var(--brand));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(16,19,24,.12), 0 8px 18px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
:root[data-theme="dark"] button.pick { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 22%, rgba(255,255,255,.06)), color-mix(in srgb, var(--brand) 12%, var(--surface)));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent), 0 6px 16px -8px rgba(0,0,0,.6); }
:root[data-theme="dark"] button.pick[aria-pressed="true"] { background: linear-gradient(180deg, color-mix(in srgb, #fff 12%, var(--brand)), var(--brand)); }
button.pick > :not(.pk-shine) { position: relative; z-index: 1; }
.pk-shine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 0; }
.pk-shine::before { content: ""; position: absolute; top: -40%; bottom: -40%; left: 0; width: 42%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.7) 50%, transparent 100%);
  transform: translateX(-170%) skewX(-20deg); animation: pk-sheen 5.6s cubic-bezier(.45, 0, .25, 1) infinite; }
:root[data-theme="dark"] .pk-shine::before { background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.2) 50%, transparent 100%); }
@keyframes pk-sheen { 0% { transform: translateX(-170%) skewX(-20deg); } 34%, 100% { transform: translateX(380%) skewX(-20deg); } }
button.pick[aria-pressed="true"] .pk-shine { display: none; }
@media (prefers-reduced-motion: reduce) { .pk-shine { display: none; } .pk-g > span { transition: none; } }

/* ================= Idea views: controls, collapsible groups, grid of compact cards ================= */
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 22px; }
.list-bar .view-note { margin: 0; min-height: 0; flex: 1 1 320px; }
.list-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ctl { display: inline-flex; align-items: center; gap: 8px; font: 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ctl select { min-height: 36px; padding: 0 30px 0 12px; font: 500 14px var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); }
.icon-seg { grid-auto-columns: 40px; }
.icon-seg button { min-height: 32px; padding: 0; }
.icon-seg button svg.i { width: 17px; height: 17px; }
.ctl-all { color: var(--primary-text); }

/* collapsible groups */
.group.collapsible .group-head h2 { margin: 0; }
button.group-toggle { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 6px 0 0; margin-left: -4px; border: 0; background: none; border-radius: 10px;
  font: inherit; color: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; white-space: normal; }
button.group-toggle:hover { background: none; }
button.group-toggle:hover .gt-chev { background: var(--border); }
button.group-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.gt-chev { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); flex: 0 0 auto; transition: background var(--t-fast); }
.gt-chev svg.i { width: 15px; height: 15px; transform: rotate(90deg); transition: transform 300ms var(--ease-move); }
.group.closed .gt-chev svg.i { transform: rotate(0deg); }
.group-toggle .count { font: 600 12px/1 var(--sans); color: var(--muted); background: var(--hover); border-radius: 999px; padding: 4px 8px; }
.gt-badge { font: 600 12px/1 var(--sans); color: var(--brand-text); background: var(--brand-soft); border-radius: 999px; padding: 5px 9px; }
.group-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 340ms var(--ease-move); }
.group.closed .group-body { grid-template-rows: 0fr; transition-duration: 240ms; transition-timing-function: var(--ease-in); }
.group-inner { min-height: 0; }
.group.closed .group-inner, .group.anim .group-inner { overflow: hidden; }
.group.anim .group-inner { padding: 0 3px 4px; margin: 0 -3px -4px; }
.group.closed { margin-bottom: 18px; }
.group.closed .group-head { margin-bottom: 0; }
.group-inner > * { transition: opacity 220ms var(--ease-out); }
.group.closed .group-inner > * { opacity: 0; }
.facet.wk { color: var(--brand-text); font-weight: 500; }

/* grid of compact cards */
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 220px; padding: 16px 16px 14px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16,19,24,.04), 0 8px 22px -14px rgba(16,19,24,.16); transition: border-color var(--t-fast), transform 220ms var(--ease-out); }
.tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; box-shadow: 0 18px 40px -18px rgba(16,19,24,.28); transition: opacity 220ms var(--ease-out); }
.tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tile:hover::before { opacity: 1; }
.tile.top { box-shadow: inset 3px 0 0 var(--orange), 0 1px 2px rgba(16,19,24,.04), 0 8px 22px -14px rgba(16,19,24,.16); }
:root[data-theme="dark"] .tile { box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 24px -14px rgba(0,0,0,.6); }
.t-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.t-top .kicker { color: var(--primary-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-score { font: 600 20px/1 var(--sans); color: var(--text); padding: 4px 0 6px; border-bottom: 3px solid var(--orange); }
.tile h3 { font: 600 16px/1.35 var(--sans); letter-spacing: -.01em; color: var(--text); margin: 2px 0 0; }
.tile-hit { all: unset; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile-hit::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.tile-hit:focus-visible::after { outline: 2px solid var(--ring); outline-offset: -2px; }
.tile:hover .tile-hit { color: var(--primary-text); }
.tile p { font-size: 14px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.t-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.t-meta b { color: var(--text); font-weight: 600; }
.t-best { color: var(--accent-text); font-weight: 600; }
.t-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.t-foot .pick, .t-foot .tag { position: relative; z-index: 1; }
.idea-grid > .tile.reveal { opacity: 0; transform: translateY(16px); }
.idea-grid > .tile.reveal.in { opacity: 1; transform: none; transition: opacity 420ms var(--ease-out) var(--d, 0ms), transform 560ms var(--ease-move) var(--d, 0ms), border-color var(--t-fast); }
.idea-grid > .tile.reveal.in:hover { transform: translateY(-2px); transition-delay: 0ms; }
.tile-open { grid-column: 1 / -1; animation: tile-open 340ms var(--ease-move); }
.tile-bar { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.tile-bar svg.i { transform: rotate(-90deg); width: 15px; height: 15px; }
@keyframes tile-open { from { opacity: 0; transform: scale(.985) translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .idea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tile { min-height: 200px; padding: 14px 12px 12px; }
  .tile h3 { font-size: 15px; } .tile p { -webkit-line-clamp: 2; } .list-ctl { width: 100%; } .ctl { flex: 1 1 auto; } .ctl select { flex: 1; } }
@media (max-width: 340px) { .idea-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .group-body, .gt-chev svg.i, .group-inner > *, .tile-open, .tile { transition: none !important; animation: none !important; } .idea-grid > .tile.reveal { opacity: 1; transform: none; } }


/* Published: the video itself on the card */
.row .ev a.yt-link { position: relative; z-index: 1; color: var(--primary-text); font-weight: 600; text-decoration: none; }
.row .ev a.yt-link:hover { text-decoration: underline; }
.t-thumb { position: relative; z-index: 1; display: block; margin: -16px -16px 4px; border-radius: 13px 13px 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--hover); }
.t-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms var(--ease-out); }
.t-thumb:hover img { transform: scale(1.03); }
.t-views { position: absolute; right: 8px; bottom: 8px; padding: 4px 8px; border-radius: 999px; background: rgba(12,14,17,.72); color: #fff; font: 600 12px/1 var(--sans); }
@media (max-width: 640px) { .t-thumb { margin: -14px -12px 4px; } }
