/* Creator Vault — light, rounded, quiet. Layout follows the reference (gray canvas, white frame,
   segmented tabs, icon sidebar, hero composer, action cards); color, spacing, and type follow Vercel Geist.

   COLOR   tokens read from vercel.com/geist/colors (light) on 2026-09-15. Step roles: 100 default bg · 200 hover bg ·
           300 active bg · 400 border · 500 hover border · 700 solid · 900 secondary text · 1000 primary text.
           Semantics (Geist Badge/Note docs): blue informational · green success · red error · amber warning · gray neutral.
   SPACING Geist 4px grid: 4 8 12 16 24 32 40. Named gaps: gap 24 · gap-half 12 · gap-quarter 8 · gap-section 32 · gap-double 40.
   TYPE    Geist pairs: copy-13 13/18 · copy-14 14/20 · copy-16 16/24 · copy-18 18/28 · label-13 13/16 · label-14 14/20 ·
           label-16 16/20 · heading-16 16/24 (-.32px) · heading-20 20/26 (-.4px) · heading-24 24/32 (-.96px) · heading-32 32/40 (-1.28px) ·
           button-14 14/20 medium. Controls: small 32 · medium 36 (14px) · large 40 (16px). */
:root {
  --ds-background-100: #fff; --ds-background-200: #fafafa;
  --ds-gray-100: #f2f2f2; --ds-gray-200: #ebebeb; --ds-gray-300: #e6e6e6; --ds-gray-400: #eaeaea; --ds-gray-500: #c9c9c9;
  --ds-gray-600: #a8a8a8; --ds-gray-700: #8f8f8f; --ds-gray-800: #7d7d7d; --ds-gray-900: #4d4d4d; --ds-gray-1000: #171717;
  --ds-blue-200: #eaf4ff; --ds-blue-300: #e0efff; --ds-blue-400: #cce7ff; --ds-blue-700: #0070f7; --ds-blue-800: #005edc; --ds-blue-900: #0064e2;
  --ds-red-200: #ffe9ea; --ds-red-300: #ffe4e5; --ds-red-400: #ffd8d7; --ds-red-700: #fc0035; --ds-red-900: #d60020;
  --ds-amber-200: #fff4d4; --ds-amber-300: #fff1c8; --ds-amber-400: #ffdd84; --ds-amber-700: #ffb200; --ds-amber-900: #a64f00;
  --ds-green-200: #e5fce7; --ds-green-300: #d3fad1; --ds-green-400: #b9f5bc; --ds-green-700: #28a948; --ds-green-900: #107d32;
  --ds-teal-200: #ddfef6; --ds-teal-300: #ccf9f1; --ds-teal-900: #007a6e;
  --ds-purple-200: #f9f1ff; --ds-purple-300: #f5e8ff; --ds-purple-900: #7c00c9;
  --ds-pink-200: #ffeaf2; --ds-pink-300: #ffe0eb; --ds-pink-900: #c41562;

  /* color roles */
  --canvas: var(--ds-gray-100); --panel: var(--ds-background-100); --panel-2: var(--ds-gray-100); --active-bg: var(--ds-gray-200);
  --line: var(--ds-gray-400); --line-2: var(--ds-gray-500); --line-3: var(--ds-gray-600);
  /* gray-700 is 3.2:1 on white (fails AA for small text) → muted copy uses Geist's secondary-text step, gray-900;
     gray-700 only for placeholders and eyebrows. */
  --ink: var(--ds-gray-1000); --ink-2: var(--ds-gray-900); --muted: var(--ds-gray-900); --faint: var(--ds-gray-700);
  --link: var(--ds-blue-900); --focus: var(--ds-blue-700);
  --red-bg: var(--ds-red-200); --red: var(--ds-red-900); --blue-bg: var(--ds-blue-200); --blue: var(--ds-blue-900);
  --green-bg: var(--ds-green-200); --green: var(--ds-green-900); --amber-bg: var(--ds-amber-200); --amber: var(--ds-amber-900);
  --mark: var(--ds-amber-400);

  /* spacing (Geist 4px grid) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-16: 64px;
  --gap: 24px; --gap-half: 12px; --gap-quarter: 8px; --gap-section: 32px; --gap-double: 40px;
  --control-sm: 32px; --control-md: 36px; --control-lg: 40px;

  /* radii: controls use Geist 6px; cards keep the reference's soft look on the 4px grid */
  --r-control: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.05);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- base */
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased; }   /* copy-14 */
body.center { min-height: 100vh; display: grid; place-items: center; padding: var(--sp-4); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: 24px; line-height: 32px; letter-spacing: -.96px; }                      /* heading-24 */
h2 { font-size: 16px; line-height: 24px; letter-spacing: -.32px; }                      /* heading-16 */
h3 { font-size: 16px; line-height: 24px; letter-spacing: -.32px; }
p { margin: 0 0 var(--sp-2); }
p:last-child { margin-bottom: 0; }
code { font-family: var(--mono); font-size: 13px; background: var(--panel-2); padding: 1px 6px; border-radius: var(--r-control); }
pre.code, pre.log { margin: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); overflow: auto; white-space: pre-wrap; font: 13px/20px var(--mono); }
pre.log { max-height: 70vh; }
pre.wrap { white-space: pre-wrap; font-family: inherit; }
.ic { flex: none; vertical-align: -4px; }
.muted { color: var(--muted); } .faint { color: var(--faint); font-weight: 400; }
.small { font-size: 13px; line-height: 18px; }                                          /* copy-13 */
.err { color: var(--red); } .center-text { text-align: center; }

/* ---------- accessibility & interaction baseline (Web Interface Guidelines) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--sp-4); top: -48px; z-index: 100; background: var(--ink); color: #fff; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-control); font-weight: 500; }
.skip:focus { top: var(--sp-4); outline: 2px solid var(--focus); outline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
a, button, summary, select, input[type=checkbox], input[type=file], label.check { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:where(p, .meta, .note, .flash, .side-empty, .card.empty) a { color: var(--link); }
:where(p, td, .meta, .crumbs, .pager, .section-head, .hit, .note, .flash, .side-empty) a:hover { text-decoration: underline; }
.tabular, .nums b, .badge, .status, table.list td.num, table.list td.date { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- app frame */
.app { background: var(--panel); border-radius: 24px; margin: var(--sp-3); min-height: calc(100vh - 24px); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: var(--gap); padding: 0 var(--sp-6); height: 64px; border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; color: var(--ink); }
.tabs { display: flex; align-items: center; gap: var(--sp-2); flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: var(--sp-2); height: var(--control-md); padding: 0 var(--sp-3); font-size: 16px; line-height: 20px; color: var(--ink-2); border-radius: var(--r-sm); white-space: nowrap; }   /* label-16 */
.tab .ic { color: var(--ink-2); }
.tab:hover { background: var(--panel-2); }
.tab.active { background: var(--active-bg); color: var(--ink); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: var(--sp-3); }
.pill { display: inline-flex; align-items: center; gap: var(--sp-2); height: 28px; padding: 0 var(--sp-3); font-size: 13px; line-height: 16px; color: var(--ink-2); background: var(--panel-2); border-radius: 999px; }   /* label-13 */
.pill.live { color: var(--blue); background: var(--blue-bg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.frame { display: flex; flex: 1; min-height: 0; }
.sidebar { width: 288px; flex: none; border-right: 1px solid var(--line); padding: var(--sp-6) var(--sp-4); }
.side-nav { display: flex; flex-direction: column; gap: var(--sp-1); }
.side-item { display: flex; align-items: center; gap: var(--sp-3); height: var(--control-lg); padding: 0 var(--sp-3); font-size: 16px; line-height: 20px; color: var(--ink); border-radius: var(--r-md); }   /* label-16 */
.side-item .ic { color: var(--ink-2); }
.side-item:hover { background: var(--panel-2); }
.side-item.active { background: var(--active-bg); }
.side-item .badge { margin-left: auto; }
.side-section { color: var(--faint); font-size: 14px; line-height: 20px; padding: 0 var(--sp-3); margin: var(--sp-6) 0 var(--sp-2); }   /* label-14 */
.side-empty { color: var(--faint); font-size: 14px; line-height: 20px; padding: 0 var(--sp-3); }

.content { flex: 1; min-width: 0; padding: var(--sp-8) var(--sp-10) var(--sp-16); }

/* ---------- avatars & badges */
.av { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 11px; line-height: 1; font-weight: 600; letter-spacing: .02em; flex: none; }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.av.lg { width: 48px; height: 48px; font-size: 16px; }
.av-0 { background: var(--ds-pink-300); color: var(--ds-pink-900); } .av-1 { background: var(--ds-blue-300); color: var(--ds-blue-900); } .av-2 { background: var(--ds-amber-300); color: var(--ds-amber-900); }
.av-3 { background: var(--ds-purple-300); color: var(--ds-purple-900); } .av-4 { background: var(--ds-green-300); color: var(--ds-green-900); } .av-5 { background: var(--ds-teal-300); color: var(--ds-teal-900); }
.badge { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 500; padding: 2px var(--sp-2); border-radius: var(--r-control); }   /* label-12 */
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.green { background: var(--green-bg); color: var(--green); }

/* ---------- hero composer */
.hero { max-width: 760px; margin: var(--sp-4) auto 0; }
.hero.compact { margin-top: 0; }
.hero-title { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); font-size: 32px; line-height: 40px; letter-spacing: -1.28px; font-weight: 500; margin: var(--sp-6) 0; }   /* heading-32 */
.composer { position: relative; z-index: 2; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: var(--sp-5) var(--sp-5) var(--sp-4); }
.composer:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--ds-blue-300), var(--shadow); }
.composer-input { width: 100%; border: 0; outline: 0; background: transparent; font: 500 20px/28px var(--font); color: var(--ink); padding: 0 0 var(--sp-4); }
.composer-input:focus-visible { outline: none; }
.composer-input::placeholder { color: var(--faint); font-weight: 400; }
.composer-input.sm { font: 400 16px/24px var(--font); height: var(--control-lg); padding: 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-control); margin: var(--sp-4) 0 var(--sp-3); }
.composer-bar { display: flex; align-items: center; gap: var(--sp-2); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--control-md); height: var(--control-md); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink-2); background: var(--panel); }
.icon-btn:hover { border-color: var(--line-2); background: var(--panel-2); }
.chip-select { display: inline-flex; flex-direction: row; align-items: center; gap: var(--sp-2); height: var(--control-md); padding: 0 var(--sp-3); font-size: 16px; line-height: 20px; color: var(--ink); border-radius: var(--r-sm); }
.chip-select:hover { background: var(--panel-2); }
.chip-select select { border: 0; background: transparent; font: inherit; color: inherit; padding: 0; height: auto; cursor: pointer; appearance: none; -webkit-appearance: none; }
.chip-select .ic { color: var(--ink-2); }
.composer-go { margin-left: auto; width: var(--control-lg); height: var(--control-lg); border-radius: 50%; border: 0; padding: 0; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.composer-go:hover { background: var(--ds-gray-900); }
.project-strip { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--sp-2); margin: calc(-1 * var(--sp-3)) var(--sp-6) 0; padding: var(--sp-6) var(--sp-5) var(--sp-3); background: var(--panel-2); border-radius: 0 0 var(--r-lg) var(--r-lg); font-size: 16px; line-height: 20px; color: var(--ink); }
.project-strip .ic { color: var(--ink-2); }
.project-strip:hover { background: var(--active-bg); }

/* ---------- action cards */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); max-width: 760px; margin: var(--gap-section) auto 0; }
.action { display: flex; flex-direction: column; gap: var(--sp-1); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); color: var(--ink); min-width: 0; }
.action .ic { color: var(--ink-2); margin-bottom: var(--sp-5); }
.action b { font-size: 16px; line-height: 24px; letter-spacing: -.32px; font-weight: 600; }
.action span { color: var(--muted); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.action:hover { border-color: var(--line-2); box-shadow: var(--shadow); }

/* ---------- sections, cards, lists */
.section-head { display: flex; align-items: center; gap: var(--sp-3); margin: var(--gap-section) 0 var(--sp-3); flex-wrap: wrap; }
.section-head .inline { margin-left: auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-6); margin: 0 0 var(--sp-4); }
.card > h2 { margin-bottom: var(--sp-3); }
.card.empty { text-align: center; padding: var(--sp-10); }
.card.login { width: min(400px, 100%); padding: var(--sp-8); text-align: center; box-shadow: var(--shadow); border-radius: var(--r-xl); }
.login-logo { display: flex; justify-content: center; margin-bottom: var(--sp-2); }
.card.login h1 { font-size: 20px; line-height: 26px; letter-spacing: -.4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-4); }
a.card.creator { display: block; margin: 0; min-width: 0; }
a.card.creator:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
a.card.creator h3 { overflow-wrap: anywhere; }
.creator-head { display: flex; align-items: center; gap: var(--sp-3); }
.creator-head p { margin: 2px 0 0; }
.nums { display: flex; gap: var(--sp-6); margin-top: var(--sp-4); }
.nums div { display: flex; flex-direction: column; }
.nums b { font-size: 20px; line-height: 26px; letter-spacing: -.4px; font-weight: 600; }
.nums span { color: var(--muted); font-size: 13px; line-height: 16px; }
.kind, .chip { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 500; text-transform: capitalize; padding: 2px var(--sp-2); border-radius: var(--r-control); margin-right: var(--sp-1); background: var(--panel-2); color: var(--ink-2); }
.kind.youtube, .chip.youtube { background: var(--ds-red-200); color: var(--ds-red-900); } .kind.podcast, .chip.podcast { background: var(--ds-purple-200); color: var(--ds-purple-900); }
.kind.blog, .chip.blog { background: var(--ds-teal-200); color: var(--ds-teal-900); } .kind.course, .chip.course { background: var(--ds-green-200); color: var(--ds-green-900); }
.status { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 500; padding: 2px var(--sp-2); border-radius: var(--r-control); background: var(--panel-2); color: var(--muted); text-transform: capitalize; }
.status.ready, .status.done { background: var(--green-bg); color: var(--green); }
.status.running { background: var(--blue-bg); color: var(--blue); }
.status.pending, .status.blocked, .status.needs_transcription { background: var(--amber-bg); color: var(--amber); }
.status.failed, .status.error { background: var(--red-bg); color: var(--red); }

table.list { width: 100%; border-collapse: collapse; }
table.list td { padding: var(--sp-3) var(--sp-2); border-top: 1px solid var(--line); vertical-align: middle; min-width: 0; overflow-wrap: anywhere; }
table.list tr:first-child td { border-top: 0; }
table.list td a { font-weight: 500; }
table.list td a:hover { text-decoration: underline; }
table.list td.num { text-align: right; white-space: nowrap; color: var(--muted); }
table.list td.date { white-space: nowrap; width: 7.5em; color: var(--muted); }
table.list td.actions { text-align: right; white-space: nowrap; }
table.list td.actions .inline { display: inline-block; margin-left: var(--sp-2); }
tr.dim { opacity: .5; }
.pager { display: flex; gap: var(--sp-3); justify-content: center; align-items: center; color: var(--muted); margin: var(--sp-4) 0; }

/* ---------- forms & controls (Geist: small 32 · medium 36/14px · large 40/16px · radius 6px) */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=file]):not(.composer-input), select:not(.chip-select select) {
  height: var(--control-md); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-control); padding: 0 var(--sp-3); font-size: 14px; line-height: 20px; color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { width: 100%; min-height: 160px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-control); padding: var(--sp-2) var(--sp-3); font-size: 14px; line-height: 20px; }
select { background-color: var(--panel); color: var(--ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--line-2); }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
label { display: flex; flex-direction: column; gap: var(--sp-2); font-size: 13px; line-height: 16px; color: var(--ink-2); }   /* label-13 */
label.check, label.row-label { flex-direction: row; align-items: center; gap: var(--sp-2); color: var(--ink); font-size: 14px; line-height: 20px; }
label.row-label { flex-wrap: wrap; }
label.check > span { flex: 1 1 0; min-width: 0; }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--ds-blue-700); }
fieldset.inline-fields { margin: 0; border: 1px solid var(--line); border-radius: var(--r-control); padding: var(--sp-2) var(--sp-3) var(--sp-2); display: flex; gap: var(--sp-3); flex-wrap: wrap; }
fieldset.inline-fields label { flex-direction: row; align-items: center; gap: var(--sp-2); font-size: 14px; line-height: 20px; color: var(--ink); }
fieldset legend { font-size: 12px; line-height: 16px; color: var(--faint); padding: 0 var(--sp-1); }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); height: var(--control-md); padding: 0 var(--sp-3); font-size: 14px; line-height: 20px; font-weight: 500; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-control); cursor: pointer; color: var(--ink); white-space: nowrap; }   /* button-14 */
button:hover, .btn:hover { border-color: var(--line-2); background: var(--panel-2); }
button.primary, .btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
button.primary:hover, .btn.primary:hover { background: var(--ds-gray-900); border-color: var(--ds-gray-900); }
button.small, .btn.small { height: var(--control-sm); padding: 0 var(--sp-2); }
.btn.wide { width: 100%; height: var(--control-lg); font-size: 16px; }
button.link { background: none; border: 0; padding: 0; height: auto; color: var(--ink-2); }
button.link:hover { background: none; color: var(--ink); }
button.danger, .danger { color: var(--red); }
button.danger:hover { border-color: var(--ds-red-400); background: var(--red-bg); }
button:disabled { opacity: .45; cursor: default; }
.inline { display: inline; }
.row { display: flex; align-items: center; gap: var(--sp-3); } .row.between { justify-content: space-between; } .row.wrap, .wrap { flex-wrap: wrap; } .gap { gap: var(--sp-2); } .grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: var(--sp-4); } .narrow { max-width: 560px; }
.stack > h1, .stack > h2 { margin-bottom: 0; }
.actions { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.crumbs { color: var(--muted); font-size: 13px; line-height: 16px; margin: 0 0 var(--sp-3); }
.crumbs a:hover { color: var(--ink); }
.page-head { margin-bottom: var(--sp-6); }
.creator-header { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.creator-titles { min-width: 0; } .creator-titles p { margin: 0; overflow-wrap: anywhere; }
.w-6 { width: 6em; }
.flash { display: flex; align-items: center; gap: var(--sp-2); background: var(--green-bg); color: var(--green); border: 1px solid var(--ds-green-400); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); }
.note { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--ds-amber-400); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-3); font-size: 14px; line-height: 20px; }
details.inline { display: inline-block; } details.inline summary { list-style: none; cursor: pointer; } details.inline[open] { display: block; width: 100%; }
details.inline[open] form { margin-top: var(--sp-3); }
details.danger-zone summary { cursor: pointer; color: var(--muted); } details.danger-zone form { margin-top: var(--sp-4); }
details.desc { margin-top: var(--sp-3); } details.desc summary { cursor: pointer; color: var(--muted); } details.desc pre { color: var(--ink-2); margin-top: var(--sp-2); }
.filters { gap: var(--sp-2); }
.filters input[type=search] { min-width: 220px; }
.bundle p { margin-bottom: var(--sp-4); }
.bundle-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3) var(--sp-4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.field-row label { min-width: 160px; }
.bundle .small.muted { margin-top: var(--sp-3); }
#bundle { scroll-margin-top: var(--sp-5); }

/* ---------- search hits & transcript */
.hit { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.hit:first-child { padding-top: 0; } .hit:last-child { border-bottom: 0; padding-bottom: 0; }
.hit .title { font-weight: 600; display: block; font-size: 16px; line-height: 24px; letter-spacing: -.32px; }
.hit .title:hover { text-decoration: underline; }
.hit .snippet { margin: var(--sp-1) 0 0; color: var(--ink-2); }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }
article.transcript { max-width: 760px; min-width: 0; }
article.transcript h1 { margin-bottom: var(--sp-2); }
article.transcript .meta { margin: 0 0 var(--sp-1); overflow-wrap: anywhere; }
article.transcript .actions { margin-top: var(--sp-3); }
article.transcript .body { margin-top: var(--sp-6); font-size: 18px; line-height: 28px; }   /* copy-18 */
article.transcript .body p { margin: 0 0 var(--sp-4); overflow-wrap: anywhere; }

/* ---------- mobile-only elements (hidden on desktop) */
.mobile-creators, .bottom-nav { display: none; }

/* ---------- phone layout: bottom tab bar + creator strip, stacked rows, full-width controls */
@media (max-width: 900px) {
  html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }   /* fixed tab bar must not cover a focused element */
  .app { margin: 0; border-radius: 0; min-height: 100vh; box-shadow: none; }
  .sidebar, .tabs { display: none; }
  .topbar { height: 56px; padding: 0 var(--sp-4); gap: var(--sp-3); justify-content: space-between; }
  .topbar-right { margin-left: auto; }
  .skip:focus { top: var(--sp-2); }
  .mobile-creators { display: flex; gap: var(--sp-2); overflow-x: auto; padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .mobile-creators::-webkit-scrollbar { display: none; }
  .mc { display: inline-flex; align-items: center; gap: var(--sp-2); height: var(--control-sm); padding: 0 var(--sp-3) 0 var(--sp-1); border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); flex: none; }
  .mc .ic { margin-left: var(--sp-1); color: var(--ink-2); }
  .mc.active { background: var(--active-bg); border-color: var(--active-bg); }
  .content { padding: var(--sp-4) var(--sp-4) calc(88px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--panel); border-top: 1px solid var(--line); padding: var(--sp-2) var(--sp-1) calc(var(--sp-2) + env(safe-area-inset-bottom)); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); font-size: 11px; line-height: 14px; font-weight: 500; color: var(--muted); position: relative; padding: 2px 0; }
  .bottom-nav a.active { color: var(--ink); }
  .nb-dot { position: absolute; top: 0; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--ds-blue-700); }

  h1 { font-size: 20px; line-height: 26px; letter-spacing: -.4px; }                       /* heading-20 */
  .hero { margin-top: var(--sp-1); }
  .hero-title { font-size: 24px; line-height: 32px; letter-spacing: -.96px; gap: var(--sp-2); margin: var(--sp-4) 0 var(--sp-5); }
  .composer { padding: var(--sp-4) var(--sp-4) var(--sp-3); }
  .composer-input { font-size: 18px; line-height: 28px; padding-bottom: var(--sp-3); }
  .icon-btn, .chip-select { height: var(--control-md); }
  .chip-select { font-size: 15px; padding: 0 var(--sp-2); }
  .composer-go { width: var(--control-md); height: var(--control-md); }
  .project-strip { margin: calc(-1 * var(--sp-3)) var(--sp-3) 0; padding: var(--sp-6) var(--sp-4) var(--sp-3); font-size: 15px; }
  .action-grid { gap: var(--sp-3); margin-top: var(--sp-6); }
  .action { padding: var(--sp-4); }
  .action .ic { margin-bottom: var(--sp-3); }
  .action b { font-size: 15px; } .action span { font-size: 13px; line-height: 18px; }

  .section-head { margin: var(--sp-6) 0 var(--sp-3); gap: var(--sp-2) var(--sp-3); }
  .section-head .inline { margin-left: 0; flex-basis: 100%; }
  .grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .card { padding: var(--sp-4); margin-bottom: var(--sp-3); border-radius: var(--r-md); }
  .creator-header { align-items: flex-start; }
  .page-head { margin-bottom: var(--sp-4); }

  /* tables become stacked blocks: one item per "card row" */
  table.list, table.list tbody { display: block; }
  table.list tr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
  table.list tr:first-child { border-top: 0; padding-top: 0; }
  table.list td { display: block; padding: 0; border: 0; min-width: 0; }
  table.list td:nth-child(2) { flex: 1 1 60%; }
  table.list td.date, table.list td.num, table.list td.actions { flex: 0 0 auto; text-align: left; font-size: 13px; line-height: 18px; }
  table.list td.num { margin-left: auto; }
  table.list td.actions { flex-basis: 100%; display: flex; gap: var(--sp-2); align-items: center; margin-top: var(--sp-2); }
  table.list td.actions .inline { margin-left: 0; }
  table.list.items tr { gap: 2px var(--sp-2); }
  table.list.items td.date { flex-basis: 100%; order: 3; }

  /* forms: Geist "large" controls (40px / 16px) so iOS doesn't zoom on focus */
  input:not([type=checkbox]):not([type=file]):not(.composer-input), select:not(.chip-select select) { height: var(--control-lg); font-size: 16px; line-height: 24px; }
  textarea { font-size: 16px; line-height: 24px; }
  button, .btn { height: var(--control-lg); font-size: 16px; }
  button.small, .btn.small { height: var(--control-md); font-size: 14px; }
  .filters { width: 100%; }
  .filters input[type=search] { flex: 1 1 100%; min-width: 0; }
  .filters select { flex: 1 1 30%; min-width: 0; }
  .bundle-form > * { flex-basis: 100%; }
  .bundle-form button { width: 100%; }
  .field-row label { min-width: 0; }
  .row.between { align-items: flex-start; }
  .narrow { max-width: none; }
  article.transcript .body { font-size: 16px; line-height: 24px; }
  pre.code { font-size: 12px; line-height: 18px; }
}
@media (max-width: 560px) { .action-grid { grid-template-columns: 1fr 1fr; } }
