/* Layout concept: a studio shell. Project rail on the left, one working canvas in the
   middle, contextual drawers from the right. Timecodes, waveforms and caption cues are
   the recurring motif; each white-label project brings its own palette and type. */
:root {
  --bg: #F3F5F7; --bg-2: #E9EDF1; --panel: #FFFFFF; --panel-2: #F6F8FA; --panel-3: #EDF0F4;
  --line: #E0E5EB; --line-2: #CDD5DE;
  --fg: #101722; --fg-2: #354152; --muted: #5F6D80; --faint: #8E99AA;
  --accent: #0E7C6B; --accent-2: #0A6658; --accent-soft: rgba(14,124,107,.10); --accent-line: rgba(14,124,107,.34); --on-accent: #FFFFFF;
  --mark: #FFE38A; --mark-ink: #2B2300;
  --good: #11845B; --good-soft: rgba(17,132,91,.12);
  --warn: #9F5F00; --warn-soft: rgba(201,133,0,.15);
  --bad: #C42F3C; --bad-soft: rgba(196,47,60,.10);
  --info: #2D63D2; --info-soft: rgba(45,99,210,.10);
  --gold: #8F6200; --gold-soft: rgba(237,161,0,.17);
  --s-ministry: #eda100; --s-greens: #1baf7a; --s-survival: #eb6834; --s-crypto: #2a78d6;
  --grid: #E7EBF0; --axis: #C6CED8;
  --shadow-1: 0 1px 2px rgba(16,23,34,.06);
  --shadow-2: 0 18px 40px -16px rgba(16,23,34,.30), 0 2px 6px rgba(16,23,34,.06);
  --scrim: rgba(13,18,26,.42);
  --stage: #07090C; --stage-ink: #F4F6F8;
  --font-display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --font-ui: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --side-w: 252px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0A0E13; --bg-2: #0C1117; --panel: #11171F; --panel-2: #151C25; --panel-3: #1A222D;
  --line: #212A35; --line-2: #2D3845;
  --fg: #E8EDF3; --fg-2: #C2CBD6; --muted: #8E99A9; --faint: #626D7D;
  --accent: #3DCBB1; --accent-2: #66DAC5; --accent-soft: rgba(61,203,177,.12); --accent-line: rgba(61,203,177,.40); --on-accent: #032019;
  --mark: rgba(255,210,92,.30); --mark-ink: #FFE9A8;
  --good: #3DD68C; --good-soft: rgba(61,214,140,.13);
  --warn: #F2B544; --warn-soft: rgba(242,181,68,.14);
  --bad: #FF6B74; --bad-soft: rgba(255,107,116,.13);
  --info: #7FAAFF; --info-soft: rgba(127,170,255,.13);
  --gold: #F0C24F; --gold-soft: rgba(240,194,79,.14);
  --s-ministry: #c98500; --s-greens: #199e70; --s-survival: #d95926; --s-crypto: #3987e5;
  --grid: #1D2630; --axis: #2E3946;
  --shadow-1: 0 1px 2px rgba(0,0,0,.45);
  --shadow-2: 0 18px 44px -14px rgba(0,0,0,.75), 0 2px 8px rgba(0,0,0,.4);
  --scrim: rgba(2,5,9,.62);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0A0E13; --bg-2: #0C1117; --panel: #11171F; --panel-2: #151C25; --panel-3: #1A222D;
  --line: #212A35; --line-2: #2D3845;
  --fg: #E8EDF3; --fg-2: #C2CBD6; --muted: #8E99A9; --faint: #626D7D;
  --accent: #3DCBB1; --accent-2: #66DAC5; --accent-soft: rgba(61,203,177,.12); --accent-line: rgba(61,203,177,.40); --on-accent: #032019;
  --mark: rgba(255,210,92,.30); --mark-ink: #FFE9A8;
  --good: #3DD68C; --good-soft: rgba(61,214,140,.13);
  --warn: #F2B544; --warn-soft: rgba(242,181,68,.14);
  --bad: #FF6B74; --bad-soft: rgba(255,107,116,.13);
  --info: #7FAAFF; --info-soft: rgba(127,170,255,.13);
  --gold: #F0C24F; --gold-soft: rgba(240,194,79,.14);
  --s-ministry: #c98500; --s-greens: #199e70; --s-survival: #d95926; --s-crypto: #3987e5;
  --grid: #1D2630; --axis: #2E3946;
  --shadow-1: 0 1px 2px rgba(0,0,0,.45);
  --shadow-2: 0 18px 44px -14px rgba(0,0,0,.75), 0 2px 8px rgba(0,0,0,.4);
  --scrim: rgba(2,5,9,.62);
  color-scheme: dark;
}

/* ---------- base */
html, body, #app { height: 100%; }
body { margin:0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
mark { background: var(--mark); color: var(--mark-ink); border-radius: 3px; padding: 0 2px; }
svg { flex: none; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- type */
.h1 { font: 650 30px/1.12 var(--font-display); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.h2 { font: 650 21px/1.2 var(--font-display); letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.h3 { font: 600 15px/1.3 var(--font-ui); margin: 0; }
.eyebrow { font: 600 11px/1.2 var(--font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.lede { color: var(--fg-2); font-size: 15px; margin: 0; max-width: 72ch; }
p { margin: 0; }

/* ---------- layout primitives */
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.row-tight { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.row-nw { display: flex; align-items: center; gap: 10px; min-width: 0; }
.between { justify-content: space-between; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main-side { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- app shell */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100%; overflow: hidden; }
.side { background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; z-index: 30; }
.side-top { padding: 14px 12px 8px; }
.ws { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; width: 100%; padding: 6px; border-radius: var(--r); }
.ws:hover { background: var(--panel-3); }
.ws .logo { grid-row: span 2; width: 34px; height: 34px; border-radius: 9px; background: var(--fg); color: var(--bg); display: grid; place-items: center; }
.ws-name { font: 700 16px/1.1 var(--font-display); letter-spacing: -.01em; }
.ws-sub { font-size: 11.5px; color: var(--muted); }
.side-scroll { flex: 1; overflow-y: auto; padding: 4px 10px 12px; min-height: 0; }
.side-label { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 6px; font: 600 11px/1 var(--font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.proj, .nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--fg-2); min-width: 0; font-weight: 500; }
.proj:hover, .nav-item:hover { background: var(--panel-3); color: var(--fg); }
.proj.on, .nav-item.on { background: var(--panel); color: var(--fg); box-shadow: var(--shadow-1); }
.nav-item.on svg { color: var(--accent); }
.nav-item svg { color: var(--muted); }
.proj-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { margin-left: auto; font: 500 11.5px/1 var(--font-mono); color: var(--faint); }
.nav-item .count.alert { color: var(--warn); }
.nav-item.locked { opacity: .45; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.6s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.side-foot { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.workers { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 6px 8px; border-radius: 8px; }
.workers:hover { background: var(--panel-3); color: var(--fg); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { height: 56px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); position: relative; z-index: 20; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; color: var(--muted); }
.crumbs b { color: var(--fg); font-weight: 600; }
.crumbs .sep { color: var(--faint); }
.cmdk { display: flex; align-items: center; gap: 8px; margin-left: auto; height: 34px; padding: 0 8px 0 10px; min-width: 240px; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; color: var(--muted); }
.cmdk:hover { border-color: var(--line-2); color: var(--fg); }
.cmdk .cmdk-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd, kbd { font: 500 11px/1 var(--font-mono); padding: 3px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--panel-2); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.scroll { flex: 1; overflow-y: auto; min-height: 0; scroll-behavior: smooth; }
.view { padding: 26px 28px 60px; max-width: 1480px; margin: 0 auto; width: 100%; }
.view.view-full { max-width: none; }
.only-mobile { display: none !important; }
.side-scrim { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-104%); transition: transform .22s ease; box-shadow: var(--shadow-2); padding-top: env(safe-area-inset-top, 0px); }
  .side[data-open="true"] { transform: none; }
  .side-scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 25; }
  .only-mobile { display: inline-grid !important; }
  .cmdk { min-width: 0; flex: 0 1 auto; }
  .cmdk .cmdk-label, .cmdk .kbd { display: none; }
  .hide-mobile { display: none !important; }
  .top { padding: 0 12px; }
  .view { padding: 18px 16px 60px; }
}

/* ---------- surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); min-width: 0; flex-wrap: wrap; }
.card-head .h3 { flex: 1; min-width: 0; }
.card-body { padding: 16px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.well { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line); color: var(--fg-2); font-size: 13px; }
.note.info { background: var(--info-soft); border-color: transparent; }
.note.warn { background: var(--warn-soft); border-color: transparent; }
.note.good { background: var(--good-soft); border-color: transparent; }
.note.accent { background: var(--accent-soft); border-color: transparent; }
.note svg { margin-top: 2px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.page-actions > * { max-width: 100%; }
.section-title { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; margin: 6px 0 10px; flex-wrap: wrap; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px; font-weight: 550; font-size: 13.5px; white-space: nowrap; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: var(--panel-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--panel-3); border-color: transparent; color: var(--fg); }
.btn-danger { color: var(--bad); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; gap: 6px; }
.btn-lg { height: 42px; padding: 0 18px; font-size: 14.5px; border-radius: 11px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--fg-2); position: relative; }
.icon-btn:hover { background: var(--panel-3); color: var(--fg); }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 7px; }
.icon-btn .badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font: 600 10px/16px var(--font-ui); padding: 0 4px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-3); border-radius: 10px; border: 1px solid var(--line); }
.seg button { height: 28px; padding: 0 11px; border-radius: 7px; font-size: 12.5px; font-weight: 550; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--panel); color: var(--fg); box-shadow: var(--shadow-1); }
.link { color: var(--accent); font-weight: 550; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }

/* ---------- inputs */
.input, .select, .textarea { width: 100%; min-width: 0; height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel); color: var(--fg); outline: none; transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.hint { font-size: 12px; color: var(--muted); }
.search-box { position: relative; display: flex; align-items: center; }
.search-box > svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search-box .input { height: 50px; padding-left: 44px; padding-right: 120px; font-size: 16px; border-radius: 13px; }
.search-box.search-box-wide .input { padding-right: 215px; }
.search-box .sb-right { position: absolute; right: 8px; display: flex; gap: 6px; align-items: center; }
.search-intent { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px; }
.search-why { color: var(--fg); background: var(--accent-soft); border-left: 2.5px solid var(--accent); padding: 5px 10px; border-radius: 0 7px 7px 0; line-height: 1.45; }
.search-sources { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.toggle { position: relative; width: 36px; height: 21px; border-radius: 11px; background: var(--line-2); transition: background .15s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(15px); }
.toggle[disabled] { opacity: .5; cursor: not-allowed; }
input[type=range] { accent-color: var(--accent); width: 100%; }
input[type=color] { width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; background: var(--panel); cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- pills, chips */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font: 600 11.5px/1 var(--font-ui); white-space: nowrap; background: var(--panel-3); color: var(--fg-2); }
.pill .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.pill.outline { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.pill.live .d { animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); font-size: 12.5px; font-weight: 550; color: var(--fg-2); white-space: nowrap; }
.chip:hover { border-color: var(--faint); color: var(--fg); }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.filter-bar { display: flex; flex-direction: column; gap: 10px; }
.filter-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-controls .input { width: 220px; height: 32px; font-size: 13px; }
.filter-controls .select { width: auto; height: 32px; font-size: 13px; }
.filter-controls .select.active { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); }
.filter-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.filter-meta b { color: var(--fg); }
.chip.wrap { white-space: normal; height: auto; min-height: 30px; padding: 6px 12px; text-align: left; line-height: 1.35; max-width: 100%; }
.g-video { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
@media (max-width: 1180px) { .g-video { grid-template-columns: minmax(0, 1fr); } .g-video > .tx { position: static !important; } }
.chip .c { font: 500 11px/1 var(--font-mono); opacity: .7; }
.tc { display: inline-flex; align-items: center; gap: 4px; font: 500 11.5px/1 var(--font-mono); padding: 4px 6px; border-radius: 6px; background: var(--panel-3); color: var(--fg-2); border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
button.tc:hover, a.tc:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.ent { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: 6px; font: 600 11.5px/1 var(--font-ui); white-space: nowrap; border: 1px solid transparent; }
.ent.t-scripture { background: var(--gold-soft); color: var(--gold); }
.ent.t-coin, .ent.t-supply, .ent.t-step { background: var(--accent-soft); color: var(--accent); }
.ent.t-price_level, .ent.t-timing, .ent.t-gear { background: var(--info-soft); color: var(--info); }
.ent.t-claim, .ent.t-problem { background: var(--warn-soft); color: var(--warn); }
.ent.t-safety { background: var(--bad-soft); color: var(--bad); }
.ent.t-event, .ent.t-checklist, .ent.t-crop { background: var(--good-soft); color: var(--good); }
.ent.flag { border-color: var(--bad); }
.bm { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font: 700 10.5px/1 var(--font-ui); letter-spacing: .02em; flex: none; }
.bm.lg { width: 40px; height: 40px; border-radius: 11px; font-size: 14px; }
.bm.xl { width: 52px; height: 52px; border-radius: 14px; font-size: 17px; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font: 600 11.5px/1 var(--font-ui); color: #fff; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }

/* ---------- progress & meters */
.progress { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; position: relative; }
.progress > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); transition: width .5s ease; }
.progress.thin { height: 4px; }
.progress.indet > i { width: 40% !important; animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { from { left: -40%; } to { left: 100%; } }
.meter-row { display: grid; grid-template-columns: 120px minmax(0,1fr) 64px; gap: 10px; align-items: center; font-size: 12.5px; }

/* ---------- tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 40px; padding: 0 12px; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tab:hover { color: var(--fg); }
.tab.on { color: var(--fg); border-bottom-color: var(--accent); }
.tab .count { font: 500 11px/1 var(--font-mono); color: var(--faint); }

/* ---------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { position: sticky; top: 0; background: var(--panel-2); text-align: left; font: 600 11.5px/1 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--fg); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--panel-2); }
.table tr.click { cursor: pointer; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .cell-edit { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 6px; margin: -4px -6px; min-width: 120px; }
.table .cell-edit:hover { border-color: var(--line-2); }
.table .cell-edit:focus { border-color: var(--accent); background: var(--panel); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- lists */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.li-title { font-weight: 550; min-width: 0; }
.li-sub { font-size: 12.5px; color: var(--muted); min-width: 0; }
.feed .li { align-items: flex-start; }
.feed-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-3); color: var(--fg-2); flex: none; }

/* ---------- stat tiles */
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; min-width: 0; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.stat .value { font: 650 26px/1.1 var(--font-display); letter-spacing: -.02em; }
.stat .delta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .delta.up { color: var(--good); }
.stats-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stats-strip > * + * { border-left: 1px solid var(--line); }
@media (max-width: 1180px) { .stats-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stats-strip > :nth-child(4) { border-left: 0; } .stats-strip > :nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 620px) { .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats-strip > * { border-left: 0 !important; border-top: 1px solid var(--line); } .stats-strip > :nth-child(-n+2) { border-top: 0; } .stats-strip > :nth-child(even) { border-left: 1px solid var(--line) !important; } }

/* ---------- charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font: 500 11px var(--font-ui); }
.chart .grid-l { stroke: var(--grid); stroke-width: 1; }
.chart .axis-l { stroke: var(--axis); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); border-radius: 9px; padding: 9px 11px; font-size: 12px; min-width: 150px; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); }
.tip .t-title { font-weight: 650; margin-bottom: 5px; }
.tip .t-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tip .t-row span:first-child { display: flex; align-items: center; gap: 6px; color: var(--fg-2); }
.sw { width: 9px; height: 9px; border-radius: 3px; flex: none; display: inline-block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--fg-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.hbar { display: grid; grid-template-columns: 112px minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 12.5px; padding: 4px 0; border-radius: 6px; }
.hbar:hover { background: var(--panel-2); }
.hbar .track { height: 14px; position: relative; }
.hbar .fill { position: absolute; inset: 0 auto 0 0; background: var(--gold); border-radius: 0 4px 4px 0; opacity: .9; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg-2); }

/* ---------- overlays */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; display: grid; place-items: center; padding: 20px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal { width: min(640px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); animation: rise .18s ease; overflow: hidden; }
.modal.wide { width: min(920px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head .h2 { flex: 1; font-size: 18px; }
.modal-body { padding: 18px; overflow-y: auto; min-height: 0; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow-2); z-index: 55; display: flex; flex-direction: column; animation: slidein .2s ease; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head .h3 { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 16px 20px; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); padding: 6px; z-index: 70; animation: rise .14s ease; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; text-align: left; font-size: 13.5px; }
.menu-item:hover { background: var(--panel-3); }
.menu-item.on { color: var(--accent); font-weight: 600; }
.menu-label { padding: 8px 10px 4px; font: 600 11px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.toasts { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px)); padding: 11px 14px; border-radius: 11px; background: var(--fg); color: var(--bg); box-shadow: var(--shadow-2); font-size: 13.5px; font-weight: 500; animation: rise .2s ease; }
.toast .ico { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--bg) 16%, transparent); flex: none; }
.toast button { color: var(--bg); text-decoration: underline; font-weight: 600; }

/* command palette */
.palette { width: min(640px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); overflow: hidden; animation: rise .16s ease; align-self: start; margin-top: 10vh; }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-in input { flex: 1; height: 54px; border: 0; outline: none; background: transparent; font-size: 16px; }
.palette-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette-group { padding: 10px 10px 4px; font: 600 11px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 9px; text-align: left; min-width: 0; }
.palette-item.sel { background: var(--accent-soft); }
.palette-item .pi-sub { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.palette-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); flex-wrap: wrap; }

/* tour */
.tour-hole { position: fixed; z-index: 80; border-radius: 12px; box-shadow: 0 0 0 9999px var(--scrim), 0 0 0 2px var(--accent); pointer-events: none; transition: all .3s ease; }
.tour-card { position: fixed; z-index: 81; width: min(360px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); padding: 16px; animation: rise .2s ease; transition: top .3s ease, left .3s ease; }
.tour-card .h3 { font-size: 16px; margin: 4px 0 6px; }
.tour-dots { display: flex; gap: 4px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.tour-dots i.on { background: var(--accent); width: 16px; border-radius: 3px; }

/* ---------- thumbnails & video cards */
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--stage); max-width: 100%; isolation: isolate; }
.thumb > img, .thumb > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .dur { position: absolute; right: 7px; bottom: 7px; font: 600 11px/1 var(--font-mono); background: rgba(5,7,10,.78); color: #fff; padding: 4px 6px; border-radius: 5px; }
.thumb .st { position: absolute; left: 7px; top: 7px; }
.thumb .st .pill { box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.thumb .st .pill:not(.good):not(.warn):not(.bad):not(.info) { background: rgba(5,7,10,.72); color: #fff; }
.thumb .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.18); }
.thumb .bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); transition: width .5s ease; }
.thumb .ov { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5,7,10,.45); color: #fff; font-weight: 600; font-size: 12.5px; gap: 8px; text-align: center; padding: 10px; }
.vcard { display: flex; flex-direction: column; gap: 10px; min-width: 0; border-radius: var(--r-lg); padding: 8px; margin: -8px; transition: background .12s; text-align: left; }
.vcard:hover { background: var(--panel-3); }
.vcard:hover .thumb > img, .vcard:hover .thumb > svg { transform: scale(1.025); }
.thumb > img, .thumb > svg { transition: transform .35s ease; }
.vc-title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.vc-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.vc-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 22px 18px; }

/* ---------- dropzone */
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--panel); padding: 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .drop-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.drop-full { position: fixed; inset: 0; z-index: 85; background: color-mix(in srgb, var(--accent) 12%, var(--scrim)); display: grid; place-items: center; pointer-events: none; animation: fade .12s ease; }
.drop-full .box { background: var(--panel); border: 2px dashed var(--accent); border-radius: 20px; padding: 32px 40px; text-align: center; box-shadow: var(--shadow-2); max-width: calc(100vw - 32px); }

/* ---------- player */
.player { background: var(--stage); color: var(--stage-ink); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; cursor: pointer; max-width: 100%; }
.stage > img, .stage > svg, .stage > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage > video { object-fit: contain; background: #000; }
.stage .dim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 40%, rgba(0,0,0,.6)); transition: opacity .3s; }
.stage.playing .dim { opacity: .7; }
.stage .cap { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); width: min(86%, 760px); text-align: center; font-size: clamp(13px, 1.7vw, 18px); line-height: 1.4; font-weight: 500; text-wrap: balance; }
.stage .cap span { background: rgba(0,0,0,.72); padding: 3px 8px; border-radius: 5px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.stage .bigplay { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: 66px; height: 66px; border-radius: 50%; background: rgba(255,255,255,.92); color: #0B0E12; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .15s, opacity .2s; }
.stage:hover .bigplay { transform: translate(-50%, -50%) scale(1.06); }
.stage.playing .bigplay { opacity: 0; pointer-events: none; }
.stage .badge-l { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; }
.result > button, .s-res > button { align-self: start; display: block; width: 100%; }
.stage .badge-l .pill { background: rgba(0,0,0,.6); color: #fff; }
.pbar { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.scrub { position: relative; height: 22px; cursor: pointer; touch-action: none; }
.scrub .rail { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); }
.scrub .fill { position: absolute; left: 0; top: 9px; height: 4px; border-radius: 4px; background: var(--accent); }
.scrub .head { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.35); }
.scrub .win { position: absolute; top: 9px; height: 4px; background: rgba(255,255,255,.34); border-radius: 2px; }
.scrub .mk { position: absolute; top: 0; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; }
.scrub .mk.t-scripture { background: #F0C24F; }
.scrub .mk.flag { background: #FF6B74; }
.scrub .mk.ent-other { background: #66DAC5; }
.scrub .ck { position: absolute; top: 7px; width: 2px; height: 8px; background: rgba(0,0,0,.85); }
.pctl { display: flex; align-items: center; gap: 6px; }
.pctl .icon-btn { color: #E6EAF0; }
.pctl .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.pctl .time { font: 500 12.5px/1 var(--font-mono); color: #C9D1DB; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pctl .rate { font: 600 12px/1 var(--font-mono); color: #E6EAF0; padding: 6px 8px; border-radius: 6px; }
.pctl .rate:hover { background: rgba(255,255,255,.1); }
.pctl .chap { font-size: 12.5px; color: #C9D1DB; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- transcript */
.tx { display: flex; flex-direction: column; min-height: 0; }
.tx-tools { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tx-tools .input { height: 32px; flex: 1; min-width: 140px; }
.tx-scroll { overflow-y: auto; padding: 6px 6px 14px; max-height: 640px; scroll-behavior: smooth; }
.tx-gap { display: flex; align-items: center; gap: 10px; padding: 12px 10px; color: var(--faint); font-size: 12px; }
.tx-gap::before, .tx-gap::after { content: ""; flex: 1; border-top: 1px dashed var(--line-2); }
.tx-line { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 8px 8px; border-radius: 9px; align-items: start; transition: background .2s; }
.tx-line:hover { background: var(--panel-2); }
.tx-line.active { background: var(--accent-soft); }
.tx-line.active .tc { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tx-line.changed { box-shadow: inset 2px 0 0 var(--warn); }
.tx-line .who { font: 600 11.5px/1.3 var(--font-ui); color: var(--muted); margin-bottom: 2px; }
.tx-line .txt { font-size: 14px; line-height: 1.6; color: var(--fg); }
.tx-line .txt.raw { color: var(--fg-2); font-family: var(--font-mono); font-size: 12.5px; }
.tx-line textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 9px; background: var(--panel); resize: vertical; min-height: 64px; line-height: 1.55; font-size: 14px; }
.tx-line textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tx-ents { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.editbar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }

/* ---------- diff */
.diff { font-size: 13.5px; line-height: 1.65; }
.diff ins { text-decoration: none; background: var(--good-soft); color: var(--good); border-radius: 3px; padding: 0 1px; }
.diff del { background: var(--bad-soft); color: var(--bad); border-radius: 3px; padding: 0 1px; }
.diff-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ver { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.ver.pub { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.ver .vn { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 600 12px/1 var(--font-mono); background: var(--panel-3); }
.ver.pub .vn { background: var(--accent); color: var(--on-accent); }

/* ---------- pipeline */
.pipe { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 2px 10px; }
.pnode { position: relative; flex: none; width: 168px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.pnode.layer { border-style: dashed; }
.pnode.off { opacity: .5; }
.pnode .pn-top { display: flex; align-items: center; gap: 8px; }
.pnode .pn-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.pnode.layer .pn-ico { background: var(--gold-soft); color: var(--gold); }
.pnode .pn-name { font-weight: 600; font-size: 13px; line-height: 1.25; }
.pnode .pn-meta { font-size: 11.5px; color: var(--muted); }
.pnode .pn-count { position: absolute; top: -8px; right: 10px; }
.plink { flex: none; width: 22px; align-self: center; height: 2px; background: var(--line-2); position: relative; }
.plink::after { content: ""; position: absolute; right: -1px; top: -3px; border: 4px solid transparent; border-left-color: var(--line-2); border-right: 0; }
.plink.flow { background: linear-gradient(90deg, var(--line-2) 0 30%, var(--accent) 30% 60%, var(--line-2) 60%); background-size: 200% 100%; animation: flow 1.2s linear infinite; }
@keyframes flow { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* lanes (simultaneous projects) */
.lanes { display: flex; flex-direction: column; gap: 10px; }
.lane { display: grid; grid-template-columns: 190px minmax(0, 1fr) 92px; gap: 14px; align-items: center; }
.lane-name { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 550; }
.lane-track { position: relative; height: 34px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; display: flex; gap: 4px; padding: 4px; }
.job { position: relative; min-width: 0; flex: 1 1 0; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; padding: 0 8px; font-size: 11.5px; font-weight: 550; gap: 6px; white-space: nowrap; }
.job .jf { position: absolute; inset: 0 auto 0 0; opacity: .2; transition: width .6s ease; }
.job span { position: relative; overflow: hidden; text-overflow: ellipsis; }
.job.queued { opacity: .55; border-style: dashed; }
.lane-cap { font-size: 12px; color: var(--muted); text-align: right; }
@media (max-width: 760px) { .lane { grid-template-columns: minmax(0, 1fr); gap: 6px; } .lane-cap { text-align: left; } }

/* ---------- chat */
.chat { display: flex; flex-direction: column; gap: 16px; }
.ask-chat { max-height: min(52vh, 620px); overflow-y: auto; padding: 3px 6px 3px 3px; }
.msg { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.msg .who-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--panel-3); }
.msg.ai .who-ico { background: var(--accent-soft); color: var(--accent); }
.msg .bubble { min-width: 0; flex: 1; font-size: 14.5px; line-height: 1.65; }
.msg.user .bubble { font-weight: 550; padding-top: 4px; }
.msg .bubble p + p { margin-top: 10px; }
.cite { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; margin: 0 1px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font: 600 11px/1 var(--font-mono); vertical-align: 2px; }
.cite:hover { background: var(--accent); color: var(--on-accent); }
.src { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); text-align: left; width: 100%; }
.src:hover { border-color: var(--accent-line); }
.src .n { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--panel-3); font: 600 11px/1 var(--font-mono); }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea { flex: 1; border: 0; outline: none; background: transparent; resize: none; min-height: 24px; max-height: 160px; padding: 6px 4px; line-height: 1.5; font-size: 14.5px; }
.ask-suggestions { padding-top: 16px; border-top: 1px solid var(--line); }
.ask-question-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.ask-question { min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel); color: var(--fg); text-align: left; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.ask-question:not(:disabled):hover { border-color: var(--accent-line); background: var(--accent-soft); }
.ask-question .ask-topic { color: var(--fg); text-align: left; line-height: 1.4; }
.ask-question button:disabled { cursor: default; opacity: .65; }
.ai-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--panel); color: var(--muted); white-space: nowrap; }
.ai-pill .d { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.ai-pill.ready .d { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.ai-pill.ready { color: var(--fg-2); }
.spark-ico { color: var(--accent); }

/* ---------- code */
.code { font: 12.5px/1.6 var(--font-mono); background: var(--stage); color: #D5DCE5; border-radius: 12px; padding: 14px 16px; overflow-x: auto; white-space: pre; tab-size: 2; max-height: 520px; overflow-y: auto; }
.code .k { color: #7FD8C6; } .code .s { color: #F2C879; } .code .n { color: #9DB8FF; } .code .b { color: #F28B9A; } .code .c { color: #6C7889; }
.endpoint { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; width: 100%; text-align: left; font: 500 12.5px/1.3 var(--font-mono); min-width: 0; }
.endpoint:hover { background: var(--panel-3); }
.endpoint.on { background: var(--accent-soft); }
.method { font: 700 10.5px/1 var(--font-mono); padding: 4px 6px; border-radius: 5px; flex: none; }
.method.get { background: var(--info-soft); color: var(--info); }
.method.post { background: var(--good-soft); color: var(--good); }
.keyval { font-family: var(--font-mono); font-size: 12.5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; }

/* ---------- misc */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .e-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--panel-3); color: var(--fg-2); }
.skel { background: linear-gradient(90deg, var(--panel-3), var(--panel-2), var(--panel-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.boot { height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.boot .boot-in { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.wave { display: flex; gap: 3px; align-items: center; height: 26px; }
.wave i { width: 3px; border-radius: 2px; background: var(--accent); animation: wave 1s ease-in-out infinite; }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 24px; } }
.role-banner { display: flex; align-items: center; gap: 10px; padding: 8px 20px; background: var(--info-soft); color: var(--info); font-size: 13px; font-weight: 550; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.layer-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.layer-card .l-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-3); color: var(--fg-2); }
.layer-card.on .l-ico { background: var(--accent-soft); color: var(--accent); }
.layer-card.domain.on .l-ico { background: var(--gold-soft); color: var(--gold); }
.err-card { border: 1px solid var(--bad); background: var(--bad-soft); color: var(--fg); border-radius: 12px; padding: 16px; }
.split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.sticky-top { position: sticky; top: 16px; }
.qrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.qrow:last-child { border-bottom: 0; }
.qrow .qbar { width: 70px; height: 5px; border-radius: 3px; background: var(--panel-3); position: relative; flex: none; }
.qrow .qbar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 3px; }
.proj-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; text-align: left; transition: border-color .15s, transform .15s; }
.proj-card:hover { border-color: var(--line-2); }
.proj-card .pc-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.proj-card .pc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.proj-card .pc-stats div { display: flex; flex-direction: column; gap: 2px; }
.proj-card .pc-stats b { font: 650 18px/1.1 var(--font-display); }
.proj-card .pc-stats span { font-size: 11.5px; color: var(--muted); }
.hero-strip { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-end; }
.hero-num { font: 650 46px/1 var(--font-display); letter-spacing: -.03em; }
.hero-strip .hs-item { display: flex; flex-direction: column; gap: 4px; }
.answer-card { border: 1px solid var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--panel); border-radius: var(--r-lg); padding: 16px 18px; }
.result { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.result:last-child { border-bottom: 0; }
.moment { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 8px; text-align: left; width: 100%; }
.moment:hover { background: var(--panel-2); }
.moment .txt { font-size: 13.5px; color: var(--fg-2); line-height: 1.55; }
@media (max-width: 640px) { .result { grid-template-columns: minmax(0, 1fr); } }
.article { max-width: none; }
.article h2 { font: 650 19px/1.3 var(--font-display); margin: 22px 0 8px; }
.article p { font-size: 15px; line-height: 1.72; color: var(--fg-2); }
.art-sec { position: relative; padding: 4px 0; border-radius: 10px; }
.art-sec .sec-tools { position: absolute; right: 0; top: 18px; opacity: 0; transition: opacity .15s; display: flex; gap: 4px; }
.art-sec:hover .sec-tools, .art-sec:focus-within .sec-tools { opacity: 1; }
.art-sec.busy { opacity: .55; }
@media (hover: none) { .art-sec .sec-tools { opacity: 1; position: static; margin-top: 6px; } }
.cover-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cover-pick button { border-radius: 8px; overflow: hidden; border: 2px solid transparent; aspect-ratio: 16/9; position: relative; }
.cover-pick button.on { border-color: var(--accent); }
.cover-pick canvas, .cover-art canvas { width: 100%; height: 100%; display: block; }
.cover-art { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--panel-3); max-width: 100%; }
.dgrid-wrap { overflow: auto; max-height: 620px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.dgrid { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.dgrid th { position: sticky; top: 0; z-index: 1; background: var(--panel-2); font: 600 11.5px/1 var(--font-mono); color: var(--muted); text-align: left; padding: 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; }
.dgrid td { padding: 8px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
.dgrid tr:hover td { background: var(--panel-2); }
.dgrid tr.sel td { background: var(--accent-soft); }
.dgrid td.rn { color: var(--faint); text-align: right; width: 1%; }
.tbl-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px; text-align: left; font: 500 12.5px/1.2 var(--font-mono); }
.tbl-btn:hover { background: var(--panel-3); }
.tbl-btn.on { background: var(--accent-soft); color: var(--accent); }
.tbl-btn .c { margin-left: auto; color: var(--faint); }
.json { font: 12px/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 520px; overflow: auto; }
.wizard-steps { display: flex; gap: 6px; }
.wizard-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.wizard-steps i.on { background: var(--accent); }
.tpl { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; text-align: left; background: var(--panel); }
.tpl:hover { border-color: var(--line-2); }
.tpl.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line-2); }
.swatches button.on { box-shadow: 0 0 0 2px var(--fg); }
.clip { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.clips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 22px 18px; }
.clip-poster { padding: 0; border: 0; position: relative; isolation: isolate; display: block; width: 100%; aspect-ratio: 16 / 9; container-type: inline-size; border-radius: 10px; overflow: hidden; cursor: pointer; background: #17232b; color: white; text-align: left; }
.clip-poster > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip-poster::after { content: ''; position: absolute; inset: 25% 0 0; background: linear-gradient(transparent, rgba(6,12,18,.88) 76%, #080f15); pointer-events: none; }
.clip-play, .clip-length { position: absolute; z-index: 1; top: 10px; border-radius: 5px; background: rgba(10,15,20,.9); color: #fff; }
.clip-play { left: 10px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); }
.clip-poster:hover .clip-play, .clip-poster:focus-visible .clip-play { background: white; color: #171819; }
.clip-length { right: 10px; padding: 4px 6px; font: 12px var(--font-mono); }
.clip-title { position: absolute; z-index: 1; bottom: 12px; left: 13px; right: 12px; color: #fff; text-wrap: pretty; font: 700 clamp(17px,5.5cqw,27px)/1.06 var(--font-display, sans-serif); text-shadow: 0 1px 4px #051019; }
.clip-excerpt { position: absolute; inset: 0; background: radial-gradient(ellipse at 80% 5%, hsl(var(--clip-hue) 58% 58%), transparent 65%), hsl(var(--clip-hue) 43% 22%); }
.clip-review-thumb { width: 112px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.clip-channel-poster::after { display: none; }
.clip-channel-poster .clip-play, .clip-channel-poster .clip-length { opacity: 0; }
.clip-channel-poster:is(:hover,:focus-visible) :is(.clip-play,.clip-length) { opacity: 1; }
.clip-channel-title { color: var(--fg); font: 700 16px/1.2 var(--font-display, sans-serif); }
.clip-poster:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.clip-review-video { display: block; width: 100%; max-height: 55vh; background: #111; aspect-ratio: 16/9; object-fit: contain; }
.clip-quote { margin: 0; padding-left: 12px; border-left: 2px solid var(--line); }
.clip-format { margin-right: auto; font-size: 13px; }
.clip-format summary { cursor: pointer; }
.clip-format label { display: grid; gap: 4px; margin-top: 6px; }
.int { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.int .int-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--panel-3); }

/* ---------- white-label public site (brand tokens are set inline per project) */
.browser { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow-2); background: var(--panel); margin: 0 auto; transition: max-width .3s ease; width: 100%; }
.browser .chrome { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.browser .dots { display: flex; gap: 6px; }
.browser .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.browser .url { flex: 1; min-width: 0; height: 28px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; gap: 6px; padding: 0 10px; font: 500 12px/1 var(--font-mono); color: var(--muted); overflow: hidden; white-space: nowrap; }
.browser .url b { color: var(--fg); font-weight: 500; }
.site { container-type: inline-size; background: var(--b-bg); color: var(--b-ink); font-family: var(--b-body); min-height: 560px; max-height: 78vh; overflow-y: auto;
  --panel: var(--b-surface); --panel-2: var(--b-surface2); --panel-3: var(--b-surface2); --fg: var(--b-ink); --fg-2: var(--b-ink); --muted: var(--b-muted); --faint: var(--b-faint);
  --line: var(--b-line); --line-2: var(--b-line); --accent: var(--b-accent); --accent-2: var(--b-accent); --on-accent: var(--b-accent-ink);
  --accent-soft: color-mix(in srgb, var(--b-accent) 15%, transparent); --accent-line: color-mix(in srgb, var(--b-accent) 45%, transparent); }
.site * { border-color: var(--b-line); }
.s-wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.s-head { position: sticky; top: 0; z-index: 3; background: color-mix(in srgb, var(--b-bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--b-line); }
.s-head .s-wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.s-logo { display: flex; align-items: center; gap: 10px; font-family: var(--b-display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.s-logo .s-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--b-accent); color: var(--b-accent-ink); font: 800 12px/1 var(--font-ui); }
.s-nav { display: flex; gap: 4px; margin-left: auto; }
.s-nav button { padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 550; color: var(--b-muted); }
.s-nav button:hover, .s-nav button.on { color: var(--b-ink); background: var(--b-surface2); }
.s-hero { padding: 56px 0 40px; }
.s-kicker { font: 700 12px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--b-accent); }
.s-h1 { font-family: var(--b-display); font-size: clamp(30px, 5.4cqi, 56px); line-height: 1.04; letter-spacing: -.02em; margin: 12px 0 14px; font-weight: 700; text-wrap: balance; max-width: 18ch; }
.s-sub { color: var(--b-muted); font-size: 17px; max-width: 56ch; line-height: 1.55; }
.s-search { margin-top: 26px; display: flex; gap: 8px; padding: 7px; border-radius: 16px; background: var(--b-surface); border: 1px solid var(--b-line); max-width: 720px; box-shadow: 0 18px 40px -24px rgba(0,0,0,.45); }
.s-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; padding: 0 12px; color: var(--b-ink); }
.s-search input::placeholder { color: var(--b-faint); }
.s-btn { height: 44px; padding: 0 18px; border-radius: 11px; background: var(--b-accent); color: var(--b-accent-ink); font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.s-btn.ghost { background: transparent; color: var(--b-ink); border: 1px solid var(--b-line); }
.s-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.s-chip { padding: 7px 12px; border-radius: 999px; background: var(--b-surface2); color: var(--b-ink); font-size: 13px; font-weight: 550; border: 1px solid var(--b-line); }
.s-chip:hover { border-color: var(--b-accent); }
.s-chip.on { background: var(--b-accent); color: var(--b-accent-ink); border-color: var(--b-accent); }
.s-statline { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; color: var(--b-muted); font-size: 13.5px; }
.s-statline b { color: var(--b-ink); font-family: var(--b-display); font-size: 20px; display: block; }
.s-sec { padding: 26px 0; }
.s-sec h2 { font-family: var(--b-display); font-size: 24px; margin: 0 0 16px; font-weight: 700; letter-spacing: -.01em; }
.s-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
a.s-card, a.s-feature, .s-res > a { color: inherit; text-decoration: none; }
.s-card { display: flex; flex-direction: column; gap: 10px; text-align: left; min-width: 0; }
.s-card .thumb { border-radius: 12px; }
.s-card .s-ct { font-weight: 650; font-size: 15px; line-height: 1.35; font-family: var(--b-display); }
.s-card .s-cm { font-size: 12.5px; color: var(--b-muted); }
.s-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.s-panel { background: var(--b-surface); border: 1px solid var(--b-line); border-radius: 14px; padding: 16px; min-width: 0; }
.s-res { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--b-line); }
.s-res:last-child { border-bottom: 0; }
.s-moment { display: flex; gap: 10px; align-items: baseline; padding: 5px 6px; border-radius: 8px; text-align: left; font-size: 13.5px; color: var(--b-muted); width: 100%; }
.s-moment:hover { background: var(--b-surface2); color: var(--b-ink); }
.s-tc { font: 600 11.5px/1 var(--font-mono); padding: 4px 6px; border-radius: 6px; background: var(--b-surface2); color: var(--b-accent); border: 1px solid var(--b-line); white-space: nowrap; }
.site mark { background: color-mix(in srgb, var(--b-accent) 32%, transparent); color: var(--b-ink); }
.s-answer { border-radius: 14px; padding: 16px 18px; background: var(--b-surface); border: 1px solid color-mix(in srgb, var(--b-accent) 45%, var(--b-line)); margin-bottom: 18px; }
.s-answer .cite { background: color-mix(in srgb, var(--b-accent) 20%, transparent); color: var(--b-ink); }
.s-watch-title { font-family: var(--b-display); font-size: clamp(22px, 3.2cqi, 32px); line-height: 1.15; margin: 18px 0 8px; font-weight: 700; text-wrap: balance; }
.s-tx { max-height: 460px; overflow-y: auto; }
.s-tx .s-moment { color: var(--b-ink); }
.s-tx .s-moment.on { background: color-mix(in srgb, var(--b-accent) 16%, transparent); }
.s-article { max-width: none; margin: 0; padding: 30px 0 60px; }
.s-wrap.s-wrap-full { max-width: none; }
.seo-bar { border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; color: var(--muted); background: var(--panel-2); }
.seo-bar.on-site { border-color: color-mix(in srgb, var(--b-ink) 14%, transparent); background: transparent; color: var(--b-muted); margin: 0 0 16px; }
.seo-line { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; min-width: 0; }
.seo-tag { display: inline-flex; opacity: .7; flex: none; }
.seo-url { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; color: inherit; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.seo-url:hover { text-decoration: underline; text-underline-offset: 2px; }
.seo-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.seo-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.seo-body { display: grid; gap: 6px; padding: 8px 12px 10px; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.seo-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 2px 12px; align-items: baseline; }
.seo-k { font-size: 11.5px; font-weight: 600; opacity: .75; }
.seo-v { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.seo-n { margin-left: 8px; font-size: 11px; opacity: .6; white-space: nowrap; }
.seo-warn { flex: none; color: var(--warn, #b45309); font-weight: 600; font-size: 11.5px; }
@media (max-width: 640px) { .seo-row { grid-template-columns: minmax(0, 1fr); } }
.art-link { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; }
.art-link a { color: var(--fg-2); min-width: 0; }
.s-article h1 { font-family: var(--b-display); font-size: clamp(28px, 4.6cqi, 44px); line-height: 1.1; margin: 14px 0 12px; text-wrap: balance; }
.s-article h2 { font-family: var(--b-display); font-size: 22px; margin: 28px 0 8px; }
.s-article p { font-size: 17px; line-height: 1.75; color: var(--b-ink); opacity: .92; }
.s-article .dek { font-size: 19px; color: var(--b-muted); opacity: 1; }
.s-foot { border-top: 1px solid var(--b-line); padding: 26px 0 40px; color: var(--b-faint); font-size: 13px; margin-top: 20px; }
/* Public library templates */
.s-logo { min-width: 0; }
.s-logo .s-mark { flex: none; }
.s-logo-name { overflow: hidden; text-overflow: ellipsis; }
.s-hero-copy, .s-hero-tools { min-width: 0; }
.s-feature { display: block; background: var(--b-surface); border: 1px solid var(--b-line); border-radius: var(--s-radius, 12px); overflow: hidden; text-align: left; min-width: 0; margin-top: 24px; }
.s-feature:hover { border-color: var(--b-accent); }
.s-feature-media { position: relative; }
.s-feature-media .thumb { border-radius: 0; aspect-ratio: 16 / 9; }
.s-feature-play { position: absolute; left: 17px; bottom: 14px; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; color: var(--b-accent-ink); background: var(--b-accent); }
.s-feature-caption { padding: 13px 16px; display: grid; gap: 4px; }
.s-feature-label { color: var(--b-accent); font-size: 12px; font-weight: 700; }
.s-feature-caption .s-ct { font: 650 16px/1.3 var(--b-display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.site[data-site-layout]:not([data-site-layout="classic"]) { --s-radius: 8px; --s-control-radius: 6px; }
.site[data-site-layout]:not([data-site-layout="classic"]) :is(.s-search, .s-panel, .s-card .thumb, .s-answer) { border-radius: var(--s-radius); }
.site[data-site-layout]:not([data-site-layout="classic"]) :is(.s-btn, .s-mark, .s-nav button, .s-chip) { border-radius: var(--s-control-radius); }
.site[data-site-layout]:not([data-site-layout="classic"]) .s-search:focus-within { outline: 2px solid var(--b-accent); outline-offset: 3px; }

.site[data-site-layout="manuscript"] { --s-radius: 3px; --s-control-radius: 2px; }
[data-site-layout="manuscript"] .s-head { border-bottom: 3px double var(--b-line); }
[data-site-layout="manuscript"] .s-sec h2 { padding-bottom: 10px; border-bottom: 3px double var(--b-line); }
[data-site-layout="manuscript"] .s-h1 { max-width: 23ch; font-size: clamp(34px, 7cqi, 78px); font-weight: 500; }
[data-site-layout="manuscript"] .s-statline { padding-top: 20px; max-width: 610px; margin-inline: auto; border-top: 3px double var(--b-line); }

[data-site-layout="index"] .s-hero { background: var(--b-surface2); border-bottom: 1px solid var(--b-line); padding-block: 38px 30px; }
[data-site-layout="index"] .s-hero-tools { background: var(--b-surface); padding: clamp(12px, 2.5cqi, 24px); margin-top: 20px; border: 1px solid var(--b-line); border-radius: var(--s-radius); }
[data-site-layout="index"] .s-search { margin: 0; box-shadow: none; }
[data-site-layout="index"] .s-latest .s-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 0 22px; }
[data-site-layout="index"] .s-latest .s-card { display: grid; grid-template-columns: minmax(76px, 25%) 1fr; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--b-line); }
[data-site-layout="index"] .s-latest .thumb { grid-row: span 2; }

.site[data-site-layout="cinema"] { --s-radius: 15px; --s-control-radius: 9px; }
[data-site-layout="cinema"] .s-hero { background: linear-gradient(145deg, var(--b-surface), var(--b-bg) 70%); padding-block: 48px 36px; }
[data-site-layout="cinema"] .s-h1 { max-width: 18ch; font-size: clamp(35px, 6.3cqi, 82px); }
[data-site-layout="cinema"] .s-feature { box-shadow: 0 24px 48px -26px #0009; }
[data-site-layout="cinema"] .s-feature-media .thumb { aspect-ratio: 16 / 10; }

.site[data-site-layout="field"] { --s-radius: 4px; --s-control-radius: 4px; }
[data-site-layout="field"] .s-hero { padding-block: 28px; background: var(--b-surface2); }
[data-site-layout="field"] .s-hero-copy { padding-inline-start: 18px; border-inline-start: 4px solid var(--b-accent); }
[data-site-layout="field"] .s-h1 { max-width: 22ch; }

.site[data-site-layout="journal"] { --s-radius: 4px; --s-control-radius: 4px; }
[data-site-layout="journal"] .s-hero { padding-block: 35px; }
[data-site-layout="journal"] .s-hero-copy { border-block: 1px solid var(--b-line); padding-block: 20px; }
[data-site-layout="journal"] .s-h1 { max-width: 25ch; font-size: clamp(36px, 7.4cqi, 86px); }
[data-site-layout="journal"] .s-latest .s-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); border-top: 1px solid var(--b-line); padding-top: 16px; }

.site[data-site-layout="atlas"] { --s-radius: 19px; --s-control-radius: 999px; }
[data-site-layout="atlas"] .s-hero { background: radial-gradient(ellipse at center, var(--b-surface) 7%, var(--b-surface2) 95%); }
[data-site-layout="atlas"] .s-h1 { max-width: 22ch; }
[data-site-layout="atlas"] .s-search { border-radius: 999px; max-width: 630px; }
:is([data-site-layout="atlas"], [data-site-layout="manuscript"]) .s-hero { text-align: center; padding-block: clamp(35px, 7cqi, 82px) 38px; }
:is([data-site-layout="atlas"], [data-site-layout="manuscript"]) :is(.s-h1, .s-sub, .s-search) { margin-inline: auto; }
:is([data-site-layout="atlas"], [data-site-layout="manuscript"]) :is(.s-chips, .s-statline) { justify-content: center; }

.site[data-site-layout="studio"] { --s-radius: 0px; --s-control-radius: 0px; }
[data-site-layout="studio"] .s-hero { border-block: 5px solid var(--b-accent); background: var(--b-surface2); padding-block: 28px 33px; }
[data-site-layout="studio"] .s-h1 { font-size: clamp(38px, 8.4cqi, 100px); line-height: 1.04; max-width: 17ch; }
[data-site-layout="studio"] .s-search { border-color: var(--b-accent); box-shadow: 4px 4px 0 var(--b-accent); }
[data-site-layout="studio"] .s-latest .s-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

.site[data-site-layout="signal"] { --s-radius: 5px; --s-control-radius: 5px; }
[data-site-layout="signal"] .s-head { background: var(--b-surface); }
[data-site-layout="signal"] .s-hero { padding-block: 25px 30px; border-bottom: 1px solid var(--b-line); }
[data-site-layout="signal"] .s-h1 { font-size: clamp(31px, 5.1cqi, 59px); max-width: 25ch; }
[data-site-layout="signal"] .s-search { box-shadow: none; }
[data-site-layout="signal"] .s-statline { padding: 16px; background: var(--b-surface); border: 1px solid var(--b-line); border-inline-start: 3px solid var(--b-accent); border-radius: var(--s-radius); }
[data-site-layout="signal"] .s-statline b { font-family: var(--font-mono); }

@container (min-width: 560px) {
  :is([data-site-layout="index"], [data-site-layout="signal"]) .s-hero-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 19px; align-items: center; }
  [data-site-layout="index"] .s-hero-tools { margin: 0; }
  [data-site-layout="index"] .s-statline { grid-column: 1 / -1; margin: 0; }
  [data-site-layout="signal"] .s-hero-tools { grid-column: 1; }
  [data-site-layout="signal"] .s-statline { grid-column: 2; grid-row: 1 / span 2; margin: 0; gap: 13px; }
  [data-site-layout="signal"] .s-search { margin: 0; }
  :is([data-site-layout="cinema"], [data-site-layout="field"], [data-site-layout="journal"]) .has-feature { display: grid; align-items: start; gap: 16px 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  [data-site-layout="cinema"] .s-feature { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; }
  [data-site-layout="field"] .s-feature { grid-column: 1; grid-row: 1 / span 3; margin: 0; }
  [data-site-layout="field"] .has-feature :is(.s-hero-copy, .s-hero-tools, .s-statline) { grid-column: 2; }
  [data-site-layout="journal"] .has-feature .s-hero-copy { grid-column: 1 / -1; }
  [data-site-layout="journal"] .s-feature { grid-column: 2; grid-row: 2 / span 2; margin: 0; }
  .has-feature :is(.s-search, .s-statline) { margin-top: 0; }
}

.brand-workspace { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 24px; align-items: start; }
.brand-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.brand-template { position: relative; display: grid; grid-template-rows: auto 1fr; min-width: 0; border: 1px solid var(--line-2); border-radius: 13px; overflow: hidden; background: var(--panel); }
.brand-template:is(:hover, .selected) { border-color: var(--accent); }
.brand-template:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand-template.selected { box-shadow: inset 0 0 0 1px var(--accent); }
.brand-template-preview { aspect-ratio: 17 / 9; overflow: hidden; background: var(--panel-2); border-bottom: 1px solid var(--line); pointer-events: none; }
.brand-template-preview .site { min-height: 0; max-height: none; overflow: hidden; zoom: .30; }
.brand-template-detail { display: grid; gap: 5px; padding: 11px 12px; text-align: left; }
.brand-template-detail::after { content: ""; position: absolute; inset: 0; }
.brand-template-detail:focus-visible { outline: none; }
.brand-template-title { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; align-items: baseline; font-weight: 700; }
.brand-swatches { display: flex; gap: 4px; margin-top: 3px; }
.brand-swatches i { display: block; height: 7px; width: 21px; border-radius: 2px; box-shadow: inset 0 0 0 1px #80808026; }
.brand-preview-panel { position: sticky; top: 14px; min-width: 0; }
.brand-browser .site { max-height: min(580px, 65vh); min-height: 270px; }
.brand-customize { grid-column: 1 / -1; }
.brand-customize > summary { cursor: pointer; }
.brand-customize[open] > .stack { margin-top: 16px; max-width: 760px; }
.spend-metric { display: grid; align-content: start; gap: 7px; padding: 18px; }
.spend-metric > strong { font-size: clamp(25px, 3vw, 36px); font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -.035em; }
.spend-models {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr));gap:16px;margin:4px 0 8px}
.spend-models dd {margin:4px 0 0;font-weight:650}
.spend-detail > summary { cursor: pointer; }
.spend-detail[open] > :not(summary) { margin-top: 14px; }
@media (max-width: 1100px) { .brand-workspace { grid-template-columns: minmax(0, 1fr); } .brand-preview-panel { position: static; } .brand-template-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); } }
@media (max-width: 440px) { .brand-template-preview .site { zoom: .25; } .brand-browser .site { max-height: 370px; } }
@container (max-width: 820px) { .s-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .s-cols { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 520px) { .s-grid { grid-template-columns: minmax(0, 1fr); } .s-nav { display: none; } .s-wrap { padding: 0 16px; } .s-hero { padding: 34px 0 24px; } .s-res { grid-template-columns: minmax(0, 1fr); } .s-search { flex-wrap: wrap; } .s-search input { height: 40px; } .s-search .s-btn { width: 100%; justify-content: center; } }
@container (max-width: 520px) {
  .site[data-site-layout]:not([data-site-layout="classic"]) .s-head .s-wrap { flex-wrap: wrap; gap: 6px; height: auto; min-height: 58px; padding-block: 9px; }
  .site[data-site-layout]:not([data-site-layout="classic"]) .s-nav { display: flex; margin-left: 0; }
  .site[data-site-layout]:not([data-site-layout="classic"]) .s-nav button { padding: 6px 9px; }
  [data-site-layout="atlas"] .s-search { border-radius: var(--s-radius); }
}
.widget-host { border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); padding: 18px; }
.widget { border-radius: 14px; background: var(--b-surface); color: var(--b-ink); font-family: var(--b-body); border: 1px solid var(--b-line); padding: 14px; max-width: 420px; box-shadow: 0 14px 34px -18px rgba(0,0,0,.5); }
.fake-lines { display: flex; flex-direction: column; gap: 8px; }
.fake-lines i { height: 9px; border-radius: 5px; background: var(--line); display: block; }

/* People and the member workspace */
.signin-page { min-height:100dvh; height:auto; overflow:auto; display:grid; align-content:center; justify-items:center; gap:24px; padding:24px; background:var(--bg); }
.signin-card { width:min(100%,460px); padding:clamp(24px,5vw,42px); border:1px solid var(--line); background:var(--panel); border-radius:var(--r-lg); box-shadow:var(--shadow-1); display:grid; gap:22px; }
.signin-brand { display:flex; align-items:center; gap:10px; font:700 19px var(--font-display); }
.signin-brand span { display:grid; place-items:center; width:34px; height:34px; border-radius:8px; background:var(--accent); color:var(--on-accent); }
.signin-card .h1 { font-size:clamp(30px,4vw,39px); }
.signin-card .lede { font-size:15px; margin-top:-10px; }
.signin-card .input,.signin-card .btn { height:44px; }
.signin-footer { font-size:12px; color:var(--muted); }
.team-footer-mobile { display:none; }
.extra-tools summary { cursor:pointer; margin:12px 8px 6px; color:var(--muted); font-size:12px; }
@media(max-width:960px){ .team-footer-mobile { display:block; text-align:center; padding:16px; color:var(--muted); font-size:12px; } }
.people-search { width:min(100%,220px); }
.person-row { display:grid; grid-template-columns:minmax(160px,1.1fr) minmax(130px,1fr) minmax(105px,.65fr) 148px; align-items:center; gap:18px; padding:15px 20px; }
.person-row+.person-row,.work-video+.work-video { border-top:1px solid var(--line); }
.person-id { display:flex; gap:10px; align-items:center; min-width:0; }
.person-id>div,.person-login,.person-projects { display:grid; gap:3px; min-width:0; }
.person-id span,.person-projects { overflow-wrap:anywhere; }
.person-projects { font-size:12px; color:var(--muted); }
.assignment-box { border:0; padding:0; margin:0; }
.assignment-box legend { font-weight:650; margin-bottom:6px; }
.assignment-row { display:flex; gap:12px; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); min-height:52px; }
.assignment-row label { display:flex; gap:9px; align-items:center; }
.assignment-row input { accent-color:var(--accent); width:17px; height:17px; }
.assignment-row select { width:auto; }
.member-page { max-width:1000px; margin-inline:auto; }
.member-page .page-head { margin-bottom:0; }
.member-projects { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr)); gap:16px; }
.project-entry { border:1px solid var(--line); border-radius:var(--r-lg); padding:24px; background:var(--panel); color:var(--fg); display:flex; align-items:center; gap:16px; }
.project-entry:hover,.work-video:hover { background:var(--panel-2); }
.project-entry .h2 { margin:5px 0; font-size:21px; }
.entry-arrow { margin-left:auto; color:var(--accent); }
.work-steps { counter-reset:workflow; list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(3,1fr); border-radius:var(--r-lg); background:var(--accent-soft); }
.work-steps li { counter-increment:workflow; position:relative; padding:20px 12px 20px 50px; }
.work-steps li::before { content:counter(workflow); position:absolute; left:16px; display:grid; place-items:center; width:23px; height:23px; font:600 12px var(--font-mono); border:1px solid var(--accent-line); border-radius:50%; color:var(--accent); }
.work-steps b,.work-steps span { display:block; }
.work-steps span { font-size:13px; color:var(--muted); margin-top:5px; }
.work-video { color:var(--fg); display:grid; grid-template-columns:76px minmax(0,1fr) auto; gap:16px; align-items:center; padding:12px 18px; }
.mini-thumb { width:76px; }
.work-tabs { display:flex; flex-wrap:wrap; gap:7px; }
.work-tabs .selected { color:var(--accent); background:var(--accent-soft); border-color:var(--accent-line); }
.member-transcript { padding:8px 20px 20px; }
.member-transcript p { display:grid; grid-template-columns:52px minmax(0,1fr); gap:12px; align-items:baseline; margin:14px 0; line-height:1.65; }
.member-transcript .tc { justify-self:start; }
@media(max-width:960px) {
  .person-row { grid-template-columns:minmax(0,1fr) auto; gap:8px; }
  .person-projects { grid-column:1; }
  .person-login { grid-column:2; }
  .person-row>.row-tight { grid-column:2; grid-row:1; }
}
@media(max-width:640px) {
  .work-steps { grid-template-columns:1fr; }
  .work-steps li { padding-block:10px; }
  .person-row { display:flex; flex-wrap:wrap; gap:8px 16px; }
  .person-id,.person-projects { width:100%; }
  .person-row>.row-tight { margin-left:auto; }
  .people-search { width:145px; }
  .role-banner { flex-wrap:wrap; }
  .role-banner .spacer { display:none; }
}

.source-switch{display:flex;flex-wrap:wrap;gap:.4rem}
.source-switch [aria-pressed=true]{color:var(--accent);border-color:var(--accent);font-weight:700}
.source-list{max-height:36vh;overflow:auto}
.source-video{display:flex;align-items:center;justify-content:space-between;gap:.8rem;width:100%;background:transparent;border:0;border-bottom:1px solid var(--line);text-align:left;padding:.7rem .2rem;color:inherit;cursor:pointer}
.source-video:hover,.source-video:focus-visible{background:var(--surface-2,#f3f6f7)}
.source-video small{display:block;color:var(--muted);margin-top:.2rem}
.source-video>span:last-child{color:var(--accent);font-weight:600}
.art-fields [hidden]{display:none}
.art-fields{min-width:0;margin:0;border:0;padding:0}
.art-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(205px,100%),1fr));gap:1rem}
.art-option{min-width:0}
.art-option img,.article-picture{width:100%;height:100%;object-fit:cover;display:block}
.art-option img{height:auto;aspect-ratio:16/9;border-radius:.6rem;margin-bottom:.4rem}
.art-studio summary{cursor:pointer;margin-bottom:.4rem}
.processing-filters,.processing-tools,.processing-tools .row-tight,.processing-record .row-tight{flex-wrap:wrap}
.processing-tools input[type=search]{width:13rem;max-width:100%}
.processing-tools select{width:auto}
.processing-table{min-width:42rem}
.processing-table td{vertical-align:top;white-space:normal}
.processing-title{text-align:left;font-weight:600}
.processing-record{padding:.5rem .75rem;white-space:normal}
.processing-record .link{font-size:.85rem}
.tx-view{padding:12px 14px 10px;border-bottom:1px solid var(--line)}
.tx-view .row-tight{flex-wrap:wrap}
.tx-view p{margin:8px 0 0;color:var(--fg-2);line-height:1.45}

.summary-switch { display:flex; gap:4px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.summary-switch button { background:transparent; color:var(--muted); border:0; padding:8px 13px; border-radius:6px; font:inherit; font-weight:600; cursor:pointer; }
.summary-switch button[aria-pressed="true"] { color:var(--accent-2); background:var(--accent-soft); }
.summary-lab,.summary-results { display:grid; gap:14px; min-width:0; }
.summary-lab-head h3,.summary-results h3,.summary-result h4 { margin:0; color:var(--fg); line-height:1.25; }
.summary-lab-head h3 { font-size:1.25rem; margin-bottom:4px; }
.summary-controls { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.summary-controls label,.summary-pickers label { display:grid; gap:5px; font-weight:600; font-size:.82rem; }
.summary-controls label { margin-bottom:5px; }
.summary-controls select { min-width:200px; }
.summary-controls .btn,.summary-controls .select { min-height:40px; }
.summary-progress { display:grid; gap:8px; border:1px solid var(--accent-line); border-radius:10px; background:var(--accent-soft); padding:14px 16px; }
.summary-meter { width:100%; height:7px; accent-color:var(--accent); }
.summary-steps { display:flex; flex-wrap:wrap; gap:16px; padding:0; margin:0; list-style:none; font-size:.76rem; color:var(--muted); }
.summary-steps .current,.summary-steps .complete { color:var(--accent-2); font-weight:650; }
.summary-results { border-top:1px solid var(--line); padding-top:16px; }
.summary-pickers,.summary-run-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.summary-pickers .select { width:100%; min-width:0; font-size:.82rem; font-weight:400; }
.summary-result { min-width:0; display:flex; flex-direction:column; gap:12px; padding:16px; border:1px solid var(--line); border-radius:10px; }
.summary-result-cap,.summary-result-title { display:flex; justify-content:space-between; gap:10px; align-items:baseline; }
.summary-result-cap { font-weight:650; font-size:.8rem; color:var(--muted); }
.summary-inuse { color:var(--accent-2); }
.summary-result h4 { font-size:1.12rem; }
.summary-price { font-variant-numeric:tabular-nums; font-size:1.02rem; }
.summary-prose { margin:0; font-size:.95rem; line-height:1.6; overflow-wrap:anywhere; }
.summary-more,.summary-settings { border-top:1px solid var(--line); padding-top:10px; font-size:.85rem; }
.summary-more summary,.summary-settings summary { cursor:pointer; font-weight:600; }
.summary-more h5 { font-size:.83rem; margin:14px 0 5px; }
.summary-more ul { padding-left:18px; } .summary-more li { margin:5px 0; }
.summary-more blockquote { margin:8px 0; padding-left:12px; border-left:2px solid var(--accent-line); }
.summary-more small { display:block; color:var(--muted); }
.summary-receipt { margin:8px 0; }
.summary-receipt div { display:flex; justify-content:space-between; gap:10px; padding:3px 0; }
.summary-receipt dt { color:var(--muted); } .summary-receipt dd { margin:0; text-align:right; overflow-wrap:anywhere; }
.summary-result>.btn { align-self:flex-start; margin-top:auto; }
@media(max-width:760px) { .summary-run-grid,.summary-pickers {grid-template-columns:1fr;} .summary-controls {align-items:stretch;} .summary-controls>div {flex:1 1 190px;} .summary-controls select {width:100%;min-width:0;} .summary-controls>.btn {align-self:end;} }

/* live processing panel (Library) */
.act-list { display: flex; flex-direction: column; }
.act-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.act-row:first-child { padding-top: 0; }
.act-row:last-child { border-bottom: 0; }
.act-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.act-num { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; min-width: 72px; }
.act-num .pct { font: 600 22px/1 var(--font-mono); color: var(--fg); font-variant-numeric: tabular-nums; }
.act-queue { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
.act-q { display: inline-flex; align-items: baseline; gap: 5px; flex-wrap: wrap; padding: 6px 11px; border-radius: 10px; background: var(--panel-3); font-size: 12.5px; color: var(--fg-2); }
.act-q.warn { background: var(--warn-soft); color: var(--warn); }
.act-q b { color: var(--fg); font-weight: 650; }
.status-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.status-cell .progress { width: 100%; min-width: 96px; }
@media (max-width: 640px) {
  .act-row { grid-template-columns: 72px minmax(0, 1fr); }
  .act-num { grid-column: 2; flex-direction: row; align-items: baseline; gap: 8px; text-align: left; }
}

/* recently completed (Library) */
.act-done { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.act-done .row-tight svg { color: var(--good); }
.act-done-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; padding: 5px 0; border: 0; background: none; color: var(--fg-2); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.act-done-row:hover { color: var(--fg); }
.act-done-row .ellipsis { min-width: 0; }

/* sortable table headers */
.table th.sortable { padding: 0; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; width: 100%; padding: 11px 12px; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; white-space: nowrap; }
.table th.num .th-sort { justify-content: flex-end; }
.th-sort .dir { opacity: .35; font-size: 11px; }
.th-sort:hover .dir, .table th.on .th-sort .dir { opacity: 1; }
.table th.on .th-sort { color: var(--fg); }

/* component checklist badges (Library table) */
.parts { display: inline-flex; gap: 4px; }
.part { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 6px; font: 600 11px/1 var(--font-mono); background: var(--panel-3); color: var(--muted); }
.part .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.part.good { background: var(--good-soft); color: var(--good); }
.part.warn { background: var(--warn-soft); color: var(--warn); }
.part.bad { background: var(--bad-soft); color: var(--bad); }
.part.info { background: var(--info-soft); color: var(--info); }
.part.live .d { animation: blink 1.2s ease-in-out infinite; }
.part.outline { background: transparent; border: 1px solid var(--line-2); }

/* article page: byline, related teachings, keywords */
.s-article .s-byline { font-size: 14px; color: var(--b-muted); margin: 4px 0 0; }
.s-article .s-byline span { color: var(--b-ink); font-weight: 600; }
.s-related { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--b-line); }
.s-related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.s-related a { display: flex; flex-direction: column; gap: 2px; color: var(--b-ink); text-decoration: none; font-size: 16px; line-height: 1.4; }
.s-related a:hover { color: var(--b-accent, var(--b-ink)); text-decoration: underline; }
.s-related-kind { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--b-muted); }
.s-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.s-tags span { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--b-line); color: var(--b-muted); opacity: 1; }

/* articles list */
.art-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.art-row { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.art-row:last-child { border-bottom: 0; }
.art-thumb { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; overflow: hidden; }
.art-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.art-title { padding: 0; border: 0; background: none; text-align: left; font: 650 16.5px/1.3 var(--font-ui); color: var(--fg); cursor: pointer; text-wrap: balance; }
.art-title:hover { text-decoration: underline; }
.art-dek { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.art-src { font-size: 12px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-actions { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) {
  .art-row { grid-template-columns: 96px minmax(0, 1fr); }
  .art-actions { grid-column: 2; flex-direction: row; }
}

/* ---------- YouTube Shorts publishing */
.yt-grid { display: grid; grid-template-columns: minmax(200px, 270px) 1fr; gap: 22px; align-items: start; }
@media (max-width: 720px) { .yt-grid { grid-template-columns: 1fr; } .yt-mini, .yt-phone { max-width: 260px; margin: 0 auto; } }
.yt-mini { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: #0d1114; }
.yt-phone { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #000; border: 6px solid #111417; box-shadow: var(--shadow-2); }
.yt-phone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 12px 52px; display: grid; gap: 7px; color: #fff; pointer-events: none; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.yt-ov-channel { display: flex; align-items: center; gap: 7px; font-size: 12.5px; min-width: 0; }
.yt-ov-channel b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-ov-channel img, .yt-ov-channel .yt-avatar { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.yt-sub { flex: none; padding: 4px 9px; border-radius: 999px; background: #fff; color: #0f0f0f; font-weight: 650; font-size: 11.5px; }
.yt-ov-title { font-size: 13.5px; line-height: 1.3; font-weight: 550; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.yt-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.yt-channel { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); min-width: 0; }
.yt-channel img { width: 34px; height: 34px; border-radius: 50%; }
.yt-facts { display: grid; grid-template-columns: max-content 1fr; gap: 9px 16px; margin: 0; font-size: 13.5px; }
.yt-facts dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.yt-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.yt-desc { max-height: 190px; overflow-y: auto; padding: 9px 11px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); }
.yt-desc p { margin: 0 0 6px; }
.yt-desc p:last-child { margin: 0; }
.yt-hash, .yt-desc a { color: var(--accent); }
.yt-steps { margin: 0; padding-left: 20px; display: grid; gap: 9px; color: var(--fg-2); }
.yt-code { font: 12px var(--font-mono); padding: 5px 8px; border-radius: 7px; background: var(--panel-3); overflow-wrap: anywhere; }
.yt-bar { width: min(320px, 100%); height: 6px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.yt-bar i { display: block; height: 100%; background: var(--accent); transition: width .4s ease; }
.bad-text { color: var(--bad); font-weight: 600; }

/* Book sources: bookshelf, one book, review workspace, scans */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root { --font-serif: "Newsreader", Georgia, "Times New Roman", serif; }
.bs-serif { font-family: var(--font-serif); font-weight: 600; }
.bs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.bs-kicker { font: 600 11.5px/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.bs-title { margin: 0; font: 700 40px/1.05 var(--font-display); letter-spacing: -.02em; }
.bs-label { margin: 0; font: 600 11px/1.2 var(--font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.bs-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.bs-band > div { background: var(--panel); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bs-band-l { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.bs-band-n { font: 700 30px/1 var(--font-display); letter-spacing: -.01em; }
.bs-band-s { color: var(--muted); font-size: 12.5px; }
@media (max-width: 900px) { .bs-band { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bs-title { font-size: 32px; } }
.bs-search { flex: 1 1 360px; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--muted); }
.bs-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bs-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--fg); font-size: 15px; height: 100%; }
.bs-sort { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--fg-2); font-size: 13.5px; background: var(--panel); }
.bs-sort select { border: 0; background: transparent; color: var(--fg); font-weight: 600; outline: none; }
.bs-viewtog { display: flex; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.bs-viewtog button { width: 44px; display: grid; place-items: center; color: var(--muted); }
.bs-viewtog button + button { border-left: 1px solid var(--line-2); }
.bs-viewtog button.on { background: var(--panel-3); color: var(--fg); }
.bs-dot { width: 8px; height: 8px; border-radius: 99px; flex: none; display: inline-block; }
.bs-dot.lib { background: var(--accent); }
.bs-dot.borrow { border: 2px solid var(--gold); }
.chip.on .bs-dot.lib { background: var(--bg); }
.chip.on .bs-dot.borrow { border-color: var(--bg); }
.bs-callout { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.bs-callout-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); display: grid; place-items: center; flex: none; }
.bs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.bs-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: border-color .12s, transform .12s; }
.bs-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.bs-cover-wrap { position: relative; }
.bs-cover { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(120% 90% at 50% 30%, var(--panel-3), var(--bg-2)); }
.bs-cover.is-still { background: var(--stage); }
.bs-still { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.4); transform-origin: 46% 48%; transition: transform .25s ease; }
.bs-card:hover .bs-still { transform: scale(1.48); }
.bs-cover-empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--faint); background: var(--panel-3); }
.bs-cover-badges { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.bs-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font: 600 11.5px/1 var(--font-ui); background: var(--panel-2); color: var(--fg-2); border: 1px solid var(--line-2); white-space: nowrap; }
.bs-cover-wrap .bs-badge { background: color-mix(in srgb, var(--stage) 84%, transparent); color: #E8EDF3; border-color: rgba(255,255,255,.18); }
.bs-badge.lib { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.bs-cover-wrap .bs-badge.lib { color: #66DAC5; border-color: rgba(61,203,177,.5); background: color-mix(in srgb, var(--stage) 84%, transparent); }
.bs-badge.borrow { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: var(--gold-soft); }
.bs-cover-wrap .bs-badge.borrow { color: #F0C24F; border-color: rgba(240,194,79,.5); background: color-mix(in srgb, var(--stage) 84%, transparent); }
.bs-flip { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; font: 600 11.5px/1 var(--font-ui); color: #E8EDF3; background: color-mix(in srgb, var(--stage) 84%, transparent); border: 1px solid rgba(255,255,255,.2); opacity: 0; transition: opacity .15s; }
.bs-card:hover .bs-flip, .bs-flip:focus-visible, .bs-flip[aria-pressed="true"] { opacity: 1; }
@media (hover: none) { .bs-flip { opacity: 1; } }
.bs-imgtog button { width: auto; padding: 0 12px; display: inline-flex; gap: 7px; font-size: 13px; font-weight: 600; }

/* The typeset cover: clothbound boards, gold-foil title, sized to its box with container units. */
.bs-art { display: grid; place-items: end center; width: 100%; height: 100%; container-type: size; padding-bottom: 6%; box-sizing: border-box; }
.bs-art-book { position: relative; height: 78%; aspect-ratio: 2 / 3; max-width: 92%; border-radius: 2px 5px 5px 2px; background: linear-gradient(90deg, rgba(0,0,0,.38) 0, rgba(255,255,255,.07) 3.5%, rgba(0,0,0,.16) 6%, transparent 9%), radial-gradient(140% 100% at 70% 20%, color-mix(in srgb, var(--cloth) 82%, #fff 18%), var(--cloth) 60%, color-mix(in srgb, var(--cloth) 70%, #000 30%)); box-shadow: 0 14px 26px -12px rgba(0,0,0,.65), 0 2px 5px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06); color: #E4C47E; overflow: hidden; }
.bs-art-frame { position: absolute; inset: 7% 8% 7% 12%; border: 1px solid rgba(228,196,126,.55); outline: 1px solid rgba(228,196,126,.25); outline-offset: 2.5cqh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqh; padding: 4cqh 6%; text-align: center; }
.bs-art-t { font-family: var(--font-serif); font-weight: 600; line-height: 1.12; letter-spacing: .01em; text-wrap: balance; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.bs-art-t.l { font-size: 7.8cqh; } .bs-art-t.m { font-size: 6cqh; } .bs-art-t.s { font-size: 4.9cqh; } .bs-art-t.xs { font-size: 4.4cqh; }
.bs-art-t { flex-shrink: 0; max-height: 64%; }
.bs-art-orn { width: 22%; height: 1px; background: currentColor; opacity: .7; position: relative; }
.bs-art-orn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.6cqh; height: 1.6cqh; border: 1px solid currentColor; background: var(--cloth); transform: translate(-50%, -50%) rotate(45deg); }
.bs-art-a { font-family: var(--font-serif); font-size: 3.6cqh; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.bs-art-y { font-family: var(--font-serif); font-size: 3.4cqh; letter-spacing: .1em; opacity: .75; }
.bs-badge.bad { color: var(--bad); }
.bs-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.bs-book-t { margin: 0; font: 600 18px/1.22 var(--font-serif); letter-spacing: -.005em; }
.bs-book-t .bs-tlink { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bs-book-t.sm { font-size: 16px; text-align: left; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.bs-tlink { color: var(--fg); text-align: left; font: inherit; }
.bs-tlink:hover { color: var(--accent); }
.bs-card-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bs-ok { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/1 var(--font-ui); color: var(--good); }
.bs-list { overflow: hidden; }
.bs-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto auto; gap: 16px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.bs-row:first-child { border-top: 0; }
.bs-row-cover { width: 72px; height: 54px; border-radius: 7px; overflow: hidden; background: var(--panel-2); display: grid; place-items: center; color: var(--faint); }
.bs-row-cover.is-still { background: var(--stage); }
@media (max-width: 760px) { .bs-row { grid-template-columns: 56px minmax(0, 1fr) auto; } .bs-row-cover { width: 56px; height: 40px; } }

/* one book */
.bs-hero { display: flex; flex-wrap: wrap; gap: 36px; align-items: flex-start; }
.bs-hero-fig { margin: 0; flex: 0 1 380px; min-width: 240px; display: flex; flex-direction: column; gap: 10px; }
.bs-hero-img { display: block; width: 100%; aspect-ratio: 4 / 3.4; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: radial-gradient(120% 90% at 50% 30%, var(--panel-3), var(--bg-2)); }
.bs-hero-img.is-still { background: var(--stage); cursor: zoom-in; }
.bs-hero-img .bs-still { transform: scale(1.35); }
.bs-hero-t { margin: 0; font: 600 44px/1.08 var(--font-serif); letter-spacing: -.015em; text-wrap: balance; }
@media (max-width: 760px) { .bs-hero-t { font-size: 32px; } }
.bs-stats { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bs-stats > div { background: var(--panel); padding: 14px 16px; min-width: 0; }
.bs-stats dt { font: 600 11px/1.2 var(--font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.bs-stats dd { margin: 8px 0 0; font: 700 24px/1 var(--font-display); }
.bs-stats small { font: 500 13px var(--font-ui); color: var(--muted); }
@media (max-width: 600px) { .bs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bs-split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.bs-tl { position: relative; height: 40px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.bs-tl-m { position: absolute; top: 6px; bottom: 6px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--accent); opacity: .85; }
.bs-tl-m:hover { opacity: 1; transform: scaleY(1.15); }
.bs-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.bs-pcell { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); color: var(--fg); }
.bs-pcell:hover { border-color: var(--accent-line); }
.bs-pbars { display: flex; gap: 3px; height: 22px; align-items: flex-end; }
.bs-pbars span { flex: 1; max-width: 14px; height: 100%; border-radius: 2px; background: var(--accent); opacity: .85; }
.bs-prow { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .bs-prow { grid-template-columns: 1fr auto; } }
.bs-quote { margin: 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--line-2); font: 400 19px/1.55 var(--font-serif); color: var(--fg); }
.bs-quote.sm { font-size: 15.5px; margin: 6px 0; }
.bs-quote mark { background: var(--accent-soft); color: inherit; }
.bs-file { width: 40px; height: 48px; border-radius: 6px; background: var(--panel-3); border: 1px solid var(--line-2); display: grid; place-items: center; font: 700 10px/1 var(--font-mono); color: var(--fg-2); flex: none; }
.bs-snippet { margin: 0; font: 12px/1.6 var(--font-mono); color: var(--fg-2); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; word-break: break-word; }
.bs-ed { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); text-align: left; }
.bs-ed:hover { border-color: var(--line-2); }
.bs-ed.on { border-color: var(--accent); background: var(--accent-soft); }
.bs-way { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--fg); }
.bs-way:hover { border-color: var(--accent-line); }

/* review */
.bs-rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.bs-rcard { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); text-align: left; }
.bs-rcard:hover { border-color: var(--accent-line); }
.bs-prog { display: block; height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.bs-prog > span { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
.bs-ws { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.bs-ws-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-2); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.bs-ws > .table-wrap, .bs-ws > .empty { margin: 16px; }
.bs-ws-body { display: flex; flex-wrap: wrap; align-items: stretch; min-height: calc(100vh - 220px); }
.bs-queue { flex: 1 1 280px; max-width: 320px; max-height: calc(100vh - 200px); overflow-y: auto; border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 3px; background: var(--bg-2); border-radius: 0 0 0 var(--r-lg); }
.bs-q { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; text-align: left; flex: none; }
.bs-q:hover { background: var(--panel-2); }
.bs-q.on { background: var(--panel-3); border-color: var(--accent); }
.bs-q-thumb { width: 64px; height: 44px; border-radius: 6px; overflow: hidden; background: var(--panel-3); display: grid; place-items: center; color: var(--faint); }
.bs-q-thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); transform-origin: 46% 48%; }
.bs-sig { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.bs-sig .d { width: 7px; height: 7px; border-radius: 99px; background: var(--faint); }
.bs-sig.good .d { background: var(--accent); }
.bs-sig.warn .d { background: var(--warn); }
.bs-good { color: var(--good); }
.bs-bad { color: var(--bad); }
.bs-stage { flex: 999 1 480px; min-width: 0; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.bs-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--stage); border: 1px solid var(--line); display: grid; place-items: center; }
.bs-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bs-frame-tc { position: absolute; left: 12px; bottom: 12px; background: rgba(7,9,12,.82); color: #F4F6F8; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; padding: 6px 9px; font-size: 12.5px; }
.bs-frame-zoom { position: absolute; right: 12px; bottom: 12px; background: rgba(7,9,12,.82); color: #F4F6F8; border-color: rgba(255,255,255,.16); }
.bs-kbd { font: 600 10.5px/1 var(--font-mono); padding: 3px 5px; border-radius: 5px; border: 1px solid currentColor; opacity: .6; }
.bs-insp { flex: 1 1 340px; max-width: 400px; border-left: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 16px; background: var(--bg-2); min-width: 0; border-radius: 0 0 var(--r-lg) 0; }
.bs-insp-t { margin: 0; font: 600 28px/1.15 var(--font-serif); text-wrap: balance; }
.bs-why { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; line-height: 1.4; }
.bs-why-i { width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; font: 800 12px/1 var(--font-ui); flex: none; background: var(--panel-3); color: var(--muted); }
.bs-why-i.good { background: var(--accent-soft); color: var(--accent); }
.bs-why-i.warn { background: var(--warn-soft); color: var(--warn); }
.bs-alts { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.bs-alts li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.bs-decide { margin-top: auto; }
.bs-dec { height: 50px; border-radius: 11px; font: 700 14px/1 var(--font-ui); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); width: 100%; }
.bs-dec:hover:not(:disabled) { border-color: var(--faint); }
.bs-dec.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bs-dec.primary:hover:not(:disabled) { background: var(--accent-2); }
.bs-dec.on.bad { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.bs-dec.ghost { height: 42px; font-weight: 600; font-size: 13px; background: transparent; }
.bs-dec:disabled { opacity: .6; cursor: progress; }
.bs-more { position: relative; }
.bs-more > summary { list-style: none; padding: 0 10px; }
.bs-more > summary::-webkit-details-marker { display: none; }
.bs-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 300px; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--shadow-2); display: flex; flex-direction: column; }
.bs-more-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13px; text-align: left; color: var(--fg-2); }
.bs-more-menu button:hover { background: var(--panel-3); color: var(--fg); }
@media (max-width: 1100px) {
  .bs-queue { max-width: none; max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); flex-basis: 100%; border-radius: 0; }
  .bs-insp { max-width: none; border-left: 0; border-top: 1px solid var(--line); flex-basis: 100%; }
}

/* scans */
.bs-costs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.bs-best { border-color: var(--accent-line); }
.bs-sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.bs-srow { display: grid; grid-template-columns: minmax(0, 1.5fr) 120px minmax(0, 1.4fr) 70px 70px 110px; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .bs-srow { grid-template-columns: minmax(0, 1fr) auto; } .bs-srow > :nth-child(2), .bs-srow > :nth-child(4), .bs-srow > :nth-child(5) { display: none; } }
.bs-stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--panel-3); }
.bs-stack > span { display: block; height: 100%; }
.bs-mrow { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.bs-bar { display: block; height: 10px; border-radius: 99px; min-width: 2px; flex: none; }
.bs-todo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent); color: var(--warn); }
.bs-new { position: sticky; top: 12px; }
.bs-pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); }
.bs-results { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.bs-results button { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; text-align: left; border-top: 1px solid var(--line); min-width: 0; }
.bs-results button:first-child { border-top: 0; }
.bs-results button:hover { background: var(--panel-2); }
.bs-opt { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; }
.bs-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.bs-opt input { margin: 3px 0 0; accent-color: var(--accent); }
.bs-more-set { border-top: 1px solid var(--line); padding-top: 14px; }
.bs-more-set > summary { cursor: pointer; color: var(--fg-2); }
.bs-new-foot { border-top: 1px solid var(--line); padding-top: 16px; }

/* full-size still viewer */
.bs-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5,7,10,.94); display: grid; grid-template-rows: auto 1fr; padding: 12px 16px 16px; }
.bs-lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #fff; padding-bottom: 10px; min-width: 0; }
.bs-lb-bar > span:first-child { min-width: 0; }
.bs-lb-img { justify-self: center; align-self: center; max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; border-radius: 6px; }
.bs-lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; font-size: 34px; line-height: 1; color: #fff; background: rgba(255,255,255,.12); cursor: pointer; }
.bs-lb-nav:hover:not(:disabled) { background: rgba(255,255,255,.25); }
.bs-lb-nav:disabled { opacity: .25; cursor: default; }
.bs-lb-nav.prev { left: 12px; }
.bs-lb-nav.next { right: 12px; }
@media (max-width: 720px) { .bs-lb-bar { flex-wrap: wrap; } }

/* library coverage: which videos still need a book scan */
.bs-cov { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.bs-cov-bar { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* video page: Sources tab */
.bs-art.fill { padding: 0; place-items: stretch; }
.bs-art.fill .bs-art-book { height: 100%; max-width: none; width: 100%; aspect-ratio: auto; }
.vs-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--panel-2); }
.vs-empty-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }
.vs-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vs-book { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 14px 16px; border-top: 1px solid var(--line); }
.vs-book:first-child { border-top: 0; }
.vs-cover { width: 52px; height: 74px; }
.vs-title { margin: 0; font: 600 17px/1.25 var(--font-serif); min-width: 0; }
.vs-tc { cursor: pointer; gap: 5px; }
.vs-tc:hover { border-color: var(--accent); color: var(--accent); }
.vs-pg { color: var(--muted); font-family: var(--font-ui); }
.vs-act { align-self: center; }
@media (max-width: 760px) { .vs-book { grid-template-columns: 44px minmax(0, 1fr); } .vs-cover { width: 44px; height: 62px; } .vs-act { grid-column: 2; } }

/* Book sources › Videos: scan status per video */
.bs-vlist { overflow: hidden; }
.bs-vrow { display: grid; grid-template-columns: minmax(0, 1fr) 80px 110px 110px 170px; gap: 14px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); }
.bs-vrow:first-child { border-top: 0; }
.bs-vhead { padding-top: 10px; padding-bottom: 10px; background: var(--panel-2); }
@media (max-width: 900px) { .bs-vrow { grid-template-columns: minmax(0, 1fr) auto; } .bs-vrow > :nth-child(2), .bs-vrow > :nth-child(3), .bs-vrow > :nth-child(4) { display: none; } }

/* scan status: finished marker and the live queue bar */
.bs-fin { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font: 600 12px/1 var(--font-ui); color: var(--good); background: var(--good-soft); white-space: nowrap; align-self: flex-start; }
.bs-fin.sm { height: 20px; padding: 0 7px; font-size: 11px; gap: 4px; }
.bs-queue-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); }

/* bookshelf: our own copies */
.bs-libbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }

/* clips: guided search, where a clip lives, YouTube playback */
.clip-finder { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.clip-focus { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; max-width: 100%; font: 600 11.5px/1.3 var(--font-ui); color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 3px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-where { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; background: var(--panel-2); }
.clip-where > summary { cursor: pointer; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; color: var(--fg-2); }
.clip-where dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 14px; margin: 12px 0 2px; font-size: 13px; }
.clip-where dt { color: var(--muted); font-weight: 600; }
.clip-where dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.clip-where code { font: 12px/1.4 var(--font-mono); word-break: break-all; color: var(--fg-2); }
@media (max-width: 640px) { .clip-where dl { grid-template-columns: 1fr; } }

/* video archive panel */
.archive-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.archive-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); flex: none; }
.archive-failed { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.archive-failed li { display: flex; flex-direction: column; min-width: 0; }
.archive-bar.blocked { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 6%, var(--panel)); }
.archive-ico.warn { background: var(--warn-soft); color: var(--warn); }
.archive-steps { margin: 2px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--fg-2); }

/* clips: recent searches with live progress, filters, New tag */
.cs { display: flex; flex-direction: column; gap: 10px; }
.cs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.cs-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.cs-card.live { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.cs-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cs-kind { font-size: 13.5px; }
.clip-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.clip-sel { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--fg-2); font-size: 13px; }
.clip-sel select { border: 0; background: transparent; color: var(--fg); font-weight: 600; outline: none; max-width: 240px; }
.clips-tab .clip-sel { height: 32px; }
.clip-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13.5px; }
.clip-new-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 99px; font: 700 11px/1 var(--font-ui); letter-spacing: .03em; text-transform: uppercase; background: var(--gold); color: #1a1200; }
.clip-new-tag.on-poster { position: absolute; top: 8px; left: 8px; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.35); }

/* Items held for review: a clear block at the top of the Layers tab, reachable from the red badge on each card. */
.pill-link { cursor: pointer; }
.pill-link:hover { background: var(--bad); color: #fff; }
.flag-review { scroll-margin-top: 140px; padding: 14px 16px; border-radius: var(--r); background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.flag-review .list { background: var(--panel); border-radius: var(--r); }
.flag-review-ico { display: inline-flex; color: var(--bad); }
.flag-item .tc { display: inline-flex; align-items: center; gap: 4px; }
.flag-banner { align-items: center; }
.flag-same { align-self: flex-start; margin-top: 2px; padding: 4px 8px; border-radius: 6px; background: var(--panel-2); color: var(--fg-2); }
.pill-books:hover { background: var(--accent-soft); color: var(--accent); }
/* Status on a thumbnail sits on busy artwork: a solid dark chip with the status colour on the dot keeps it readable. */
.thumb .st .pill, .thumb .st .pill.good, .thumb .st .pill.warn, .thumb .st .pill.bad, .thumb .st .pill.info { background: rgba(5,7,10,.82); color: #fff; backdrop-filter: blur(6px); box-shadow: 0 1px 6px rgba(0,0,0,.45); }
.thumb .st .pill.good .d { background: var(--good); }
.thumb .st .pill.warn .d { background: var(--warn); }
.thumb .st .pill.bad .d { background: var(--bad); }
.thumb .st .pill.info .d { background: var(--info); }
/* Project setup → Sources */
.feeds .card-head .h3 { display: inline-flex; align-items: center; gap: 8px; }
.feeds .list .li { padding: 12px 18px; }
.feed-row .li-title.link { display: inline-flex; align-items: center; gap: 5px; }
.feed-row .li-sub.link { color: var(--fg-3); max-width: 100%; }
.empty-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.empty-inline > .stack-sm { flex: 1 1 260px; }
