:root {
  color-scheme: light;
  --bg: oklch(0.972 0.006 250);
  --surface: oklch(0.997 0.002 250);
  --surface-low: oklch(0.948 0.008 250);
  --surface-mid: oklch(0.908 0.01 250);
  --surface-high: oklch(0.988 0.004 250);
  --text: oklch(0.18 0.02 255);
  --muted: oklch(0.38 0.02 255);
  --faint: oklch(0.54 0.018 255);
  --line: oklch(0.84 0.014 250);
  --line-strong: oklch(0.64 0.02 250);
  --navy: oklch(0.19 0.055 258);
  --green: oklch(0.64 0.17 158);
  --green-dark: oklch(0.39 0.13 158);
  --green-soft: oklch(0.9 0.1 158);
  --blue-soft: oklch(0.925 0.034 258);
  --danger: oklch(0.56 0.14 28);
  --danger-soft: oklch(0.94 0.035 28);
  --warning: oklch(0.5 0.11 62);
  --border: var(--line);
  --border-strong: var(--line-strong);
  --text-dim: var(--muted);
  --muted-soft: var(--faint);
  --primary: var(--green-dark);
  --primary-hover: oklch(0.34 0.13 158);
  --primary-soft: oklch(0.9 0.1 158 / 0.24);
  --primary-softer: oklch(0.9 0.1 158 / 0.12);
  --success: var(--green-dark);
  --on-primary: oklch(0.985 0.006 158);
  --ink-overlay: var(--navy);
  --radius-sm: 4px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px oklch(0.18 0.02 255 / 0.035);
  --shadow: none;
  --shadow-hover: none;
  --sidebar-w: 224px;
  --suite-bar-h: 42px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  min-height: 100vh;
  color: var(--text);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color 0.12s ease; }
a:hover { color: var(--primary-hover); }
button, input, select, textarea { font: inherit; }
button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: 0.58; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.muted, .dim { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
body.auth-required { overflow: hidden; }

/* Cross-tool suite navigation and shared account session */
.suite-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--suite-bar-h);
  padding: 0 32px;
  border-bottom: 1px solid oklch(0.3 0.025 255);
  background: var(--navy);
  color: oklch(0.96 0.008 250);
}
.suite-brand {
  color: var(--green-soft);
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
}
.suite-brand:hover { color: white; }
.suite-nav {
  display: flex;
  align-items: stretch;
  min-width: 0;
  height: var(--suite-bar-h);
  margin-left: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.suite-nav a {
  flex: 0 0 auto;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: oklch(0.78 0.015 250);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.suite-nav a:hover { color: white; }
.suite-nav a[aria-current="page"] {
  color: white;
  border-bottom-color: var(--green);
}
.suite-menu { position: relative; display: flex; flex: 0 0 auto; }
.suite-menu > button {
  display: flex; align-items: center; height: var(--suite-bar-h); padding: 0 13px;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: transparent; color: oklch(0.78 0.015 250);
  font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.suite-menu > button::after { content: "▾"; margin-left: 6px; color: oklch(0.64 0.02 250); font-size: 9px; }
.suite-menu:hover > button, .suite-menu:focus-within > button { color: white; }
.suite-submenu {
  position: fixed; top: 41px; left: 10px; z-index: 60; display: none;
  min-width: 190px; padding: 6px 0; border: 1px solid oklch(0.32 0.025 255);
  background: var(--navy); box-shadow: 0 12px 30px rgb(0 0 0 / .35);
}
.suite-menu:hover .suite-submenu, .suite-menu:focus-within .suite-submenu, .suite-menu.is-open .suite-submenu { display: block; }
.suite-submenu a, .suite-submenu [aria-disabled="true"] {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 34px; height: auto; padding: 8px 13px; border-bottom: 0;
}
.suite-submenu [aria-disabled="true"] { color: oklch(0.58 0.015 250); }
.suite-submenu small { font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
.suite-account {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-left: 16px;
  color: oklch(0.8 0.012 250);
  font-size: 11px;
}
#suite-account {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#suite-account[hidden],
#suite-signout[hidden] { display: none; }
.suite-signout {
  min-height: 27px;
  padding: 0 9px;
  border-color: oklch(0.52 0.02 255);
  background: transparent;
  color: oklch(0.88 0.01 250);
  font-size: 11px;
}
.suite-signout:hover {
  border-color: oklch(0.72 0.02 255);
  background: oklch(0.25 0.045 258);
}

.suite-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  padding: 24px;
  display: grid;
  place-items: center;
  background: oklch(0.12 0.025 255 / 0.72);
  backdrop-filter: blur(8px);
}
.suite-auth-overlay[hidden] { display: none; }
.suite-auth-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 80px oklch(0.08 0.025 255 / 0.32);
}
.suite-auth-heading {
  display: grid;
  gap: 7px;
  margin-bottom: 22px;
}
.suite-auth-kicker {
  color: var(--green-dark);
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.suite-auth-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
}
.suite-auth-copy {
  margin: 0;
  color: var(--muted);
}
.suite-auth-form {
  display: grid;
  gap: 15px;
}
.suite-auth-form[hidden] { display: none; }
.suite-auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.suite-auth-form input {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.suite-auth-form input:focus {
  outline: none;
  border-color: var(--green-dark);
  background: var(--surface);
  box-shadow: 0 0 0 2px oklch(0.75 0.14 158 / 0.2);
}
.suite-auth-form button {
  min-height: 42px;
  margin-top: 4px;
}
.suite-auth-form button:disabled,
.suite-signout:disabled { opacity: 0.55; cursor: wait; }
.suite-auth-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--green-dark);
  font-size: 12px;
}
.suite-auth-message.error { color: var(--danger); }
.primary-button {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: var(--on-primary);
  font-weight: 700;
}
.primary-button:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

/* App shell */
.sidebar {
  position: fixed;
  inset: calc(var(--suite-bar-h) + 62px) auto 0 0;
  z-index: 15;
  width: var(--sidebar-w);
  padding: 28px 14px 22px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
}
.logo-link:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--navy);
  color: var(--green-soft);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.masthead-brand h1 {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.05;
}
.masthead-brand p {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-link:hover { background: var(--surface-low); color: var(--text); }
.nav-link.active {
  background: var(--primary-soft);
  color: var(--green-dark);
  font-weight: 760;
}
.nav-footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}
.refresh-btn {
  width: 100%;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 0.95rem;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.refresh-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.deploy-meta {
  margin-top: 1rem;
  padding: 0 0.5rem;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.8;
  font-family: ui-monospace, monospace;
}
.deploy-meta b { color: var(--text-dim); font-weight: 700; }

.shell { margin-left: var(--sidebar-w); min-height: 100vh; }
.shell > .topbar { margin-left: calc(-1 * var(--sidebar-w)); }
.topbar {
  position: sticky;
  top: var(--suite-bar-h);
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(205px, auto) minmax(230px, 1fr) minmax(230px, auto) minmax(300px, auto);
  gap: 18px;
  align-items: center;
  min-height: 62px;
  padding: 10px 32px;
  background: oklch(0.993 0.003 250 / 0.98);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.top-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.top-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--text);
  padding-bottom: 7px;
}
.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.episode-masthead-context {
  color: var(--faint);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.12s ease, color 0.12s ease;
}
.icon-btn:hover { color: var(--primary); background: var(--surface-low); }
.canvas {
  max-width: 1520px;
  padding: 28px 32px 56px;
}
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 56px;
}

/* Topbar search */
.global-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 3px 4px 3px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.global-search:focus-within {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 2px oklch(0.75 0.14 158 / 0.2);
}
.search-mark { color: var(--muted); font-size: 18px; }
.global-search input[type="search"] {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0.35rem 0;
  outline: none;
}
.global-search input::placeholder { color: var(--muted); }
.global-search-show {
  max-width: 170px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-low);
  color: var(--text-dim);
  padding: 0.25rem 1.7rem 0.25rem 0.7rem;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3e%3cpath d='M1 1l4 4 4-4' stroke='%23757687' stroke-width='1.5' fill='none' stroke-linecap='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.global-search-show:hover,
.global-search-show:focus {
  border-color: var(--primary);
  color: var(--text);
}
.global-search-submit,
.global-search-brief {
  min-height: 32px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0.3rem 0.75rem;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.global-search-submit:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.global-search-brief {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}
.global-search-brief:hover { background: var(--primary-hover); color: var(--on-primary); }

/* Library */
.page-header {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.page-header > div {
  min-width: 0;
}
.page-kicker {
  margin: 0 0 0.15rem;
  color: var(--faint);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.page-title {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 28px;
  font-weight: 780;
  letter-spacing: -0.02em;
}
.chip-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  background: var(--primary-soft);
  color: var(--green-dark);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}
.dashboard {
  display: flex;
  margin-bottom: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.stat-block {
  flex: 1 0 150px;
  min-height: 66px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}
.stat-block:last-child { border-right: 0; }
.stat-label {
  color: var(--faint);
  font: 600 10px/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-value {
  margin-top: 4px;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 780;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.stat-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.errors-panel {
  background: var(--danger-soft);
  border: 1px solid oklch(0.72 0.08 28);
  border-radius: var(--radius);
  margin-bottom: 18px;
  padding: 0.1rem 0;
}
.errors-panel summary {
  padding: 0.75rem 1.15rem;
  cursor: pointer;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}
.errors-panel summary::-webkit-details-marker { display: none; }
.errors-panel ul { margin: 0; padding: 0 1.25rem 0.85rem 2rem; font-size: 12px; color: var(--text-dim); }
.errors-panel code { background: color-mix(in oklch, var(--surface) 70%, transparent); padding: 2px 6px; border-radius: 3px; }
.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}
.select {
  background-color: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 30px 8px 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  min-height: 40px;
}
select.select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3e%3cpath d='M1 1l4 4 4-4' stroke='%23757687' stroke-width='1.5' fill='none' stroke-linecap='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
input.select { min-width: 190px; }
.select:hover,
.select:focus {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 2px oklch(0.75 0.14 158 / 0.2);
}
.view-toggle {
  display: inline-flex;
  min-height: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 680;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}
.view-btn + .view-btn { border-left: 1px solid var(--border); }
.view-btn:hover { color: var(--text); }
.view-btn.active { background: var(--green-dark); color: var(--on-primary); }
.result-count {
  margin-left: auto;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.show-sections {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 32px;
}
.show-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.show-group-title {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  flex-wrap: wrap;
  min-width: 0;
}
.show-group-header h2 {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: 0;
}
.show-title-link {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}
.show-title-link:hover,
.show-title-link:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}
.show-group-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.show-link {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
}
.show-link:hover { color: var(--primary-hover); text-decoration: underline; }
.show-link.show-filter {
  color: var(--muted);
  font-weight: 600;
}
.show-link.show-filter:hover { color: var(--text); }
.show-group-meta {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.show-context,
.show-card-context,
.show-list-context {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.show-context {
  max-width: min(46vw, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.show-card-context {
  display: block;
  margin: -0.1rem 0 0.4rem;
}
.more-eps { margin-top: 1rem; }
.more-eps > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.more-eps > summary::-webkit-details-marker { display: none; }
.more-eps > summary:hover { background: var(--surface); border-color: var(--border-strong); }
.more-eps[open] > summary { margin-bottom: 1.1rem; }
.more-eps[open] .more-eps-chev { transform: rotate(180deg); }
.more-eps-chev { transition: transform 0.18s ease; }
.eps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 12px;
}
.card {
  display: block;
  overflow: hidden;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  transition: border-color 140ms ease;
}
.card:hover {
  border-color: var(--border-strong);
}
.card-main {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  color: inherit;
}
.card-main:hover { color: inherit; text-decoration: none; }
.card-thumb,
.show-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-low);
}
.card .card-thumb {
  min-height: 100%;
  aspect-ratio: auto;
}
.card-thumb img,
.show-card-thumb img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-thumb-image {
  background: var(--ink-overlay);
}
.card-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-mid);
}
.card-thumb-audio {
  background: oklch(0.925 0.026 158);
}
.card-thumb-video {
  background: var(--blue-soft);
}
.thumb-fallback-label {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  color: var(--primary);
  font-size: 22px;
  font-weight: 780;
  letter-spacing: 0.04em;
}
.thumb-word {
  position: relative;
  z-index: 2;
  color: var(--primary);
  border: 1px solid oklch(0.68 0.08 158);
  background: color-mix(in oklch, var(--surface) 78%, transparent);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.thumb-wave {
  position: absolute;
  inset: auto 18px 18px 18px;
  height: 42px;
  opacity: 0.44;
  border-top: 2px solid var(--green-dark);
  border-bottom: 1px solid var(--green-dark);
}
.thumb-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: oklch(0.12 0.025 255 / 0.18);
  pointer-events: none;
}
.card-thumb-image .thumb-word {
  position: absolute;
  left: 12px;
  top: 12px;
  color: var(--on-primary);
  border-color: color-mix(in oklch, var(--on-primary) 32%, transparent);
  background: rgba(16, 18, 24, 0.58);
}
.card-thumb-duration {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 10px;
  background: rgba(16, 18, 24, 0.72);
  color: var(--on-primary);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card-body { min-width: 0; padding: 12px 14px; }
.date-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.processing-meta {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.processing-quality {
  color: var(--muted-soft);
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.title {
  min-height: 0;
  margin-bottom: 6px;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 760;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-summary {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-provenance {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.card-provenance span + span {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--border-strong);
}
.card-taxonomy {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 11.5px;
  line-height: 1.35;
}
.card-taxonomy > span {
  color: var(--muted-soft);
  font-size: 9.5px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pill, .chip, .status-badge, .transcript-quality-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill { background: var(--primary-soft); color: var(--primary); }
.chip {
  color: var(--muted);
  background: var(--surface-low);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.status-badge {
  color: var(--muted);
  background: var(--surface-low);
  border: 1px solid var(--border);
}
.status-badge.status-complete { color: var(--success); border-color: oklch(0.68 0.08 158); background: var(--primary-softer); }
.status-badge.status-failed { color: var(--danger); border-color: oklch(0.72 0.08 28); background: var(--danger-soft); }
.status-badge.status-transcribing,
.status-badge.status-enriching,
.status-badge.status-pending { color: var(--warning); border-color: oklch(0.72 0.06 62); background: oklch(0.94 0.025 62); }
.processing-meta.status-complete { color: var(--success); }
.processing-meta.status-failed { color: var(--danger); }
.processing-meta.status-transcribing,
.processing-meta.status-enriching,
.processing-meta.status-pending { color: var(--warning); }
.transcript-quality-badge {
  border: 1px solid var(--border);
  background: var(--surface-low);
  color: var(--text-dim);
  border-radius: 999px;
  white-space: nowrap;
}
.date-line .transcript-quality-badge {
  margin-left: 0.35rem;
}
.transcript-quality-budget {
  color: var(--warning);
  border-color: oklch(0.72 0.06 62);
  background: oklch(0.94 0.025 62);
}
.transcript-quality-premium {
  color: var(--success);
  border-color: oklch(0.68 0.08 158);
  background: var(--primary-softer);
}
.transcript-quality-user {
  color: var(--navy);
  border-color: oklch(0.75 0.04 258);
  background: var(--blue-soft);
}
.stats {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 7px 0 0;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.stats > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stat-val { color: var(--text); font-size: 13px; font-weight: 600; }
.footer {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  color: var(--muted-soft);
  font: 9.5px/1.4 ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 14px 9px;
  border-top: 1px solid var(--border);
  background: var(--surface-low);
  font-size: 12px;
  font-weight: 600;
}
.show-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}
.show-card {
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: none;
  cursor: pointer;
  padding: 0;
  transition: border-color 140ms ease;
}
.show-card:hover {
  border-color: var(--border-strong);
}
.show-card-main {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.show-card-thumb { aspect-ratio: 1 / 1; }
.show-card-body { padding: 1rem 1.15rem 1.15rem; }
.show-card-title {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}
.show-card-meta,
.show-card-stats { color: var(--muted); font-size: 12px; }
.show-card-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 1.15rem 0.95rem;
  border-top: 1px solid var(--border);
  background: var(--surface-low);
}
.show-card-actions button,
.show-list-search {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  min-height: 30px;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.show-card-actions .show-search,
.show-list-search {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}
.show-card-actions button:hover,
.show-list-search:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: var(--on-primary);
}
.show-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: none;
}
.show-list-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.show-list-row:last-child { border-bottom: 0; }
.show-list-name {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-weight: 700;
}
.show-list-name span {
  display: block;
}
.show-list-context {
  margin-top: 0.15rem;
  font-weight: 500;
}
.show-list-name:hover { color: var(--primary); }
.show-list-count,
.show-list-latest,
.show-list-duration {
  font-size: 12px;
  white-space: nowrap;
}
.empty {
  text-align: left;
  color: var(--muted);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
}

/* Search panel */
.search-panel {
  position: fixed;
  top: var(--suite-bar-h);
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(680px, 100vw);
  padding: 1rem;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: none;
  transform: translateX(105%);
  transition: transform 0.18s ease;
  overflow-y: auto;
}
.search-panel.open { transform: translateX(0); }
.search-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.search-panel-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}
.mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  padding: 3px;
  margin-bottom: 1rem;
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.mode-toggle-three { grid-template-columns: repeat(3, minmax(94px, 1fr)); }
.mode-btn {
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.mode-btn.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}
.search-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.search-form input[type="search"] {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
}
.search-form input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid oklch(0.68 0.08 158);
  border-radius: var(--radius-sm);
  background: var(--primary-softer);
  color: var(--text-dim);
  font-size: 13px;
}
.search-scope strong {
  color: var(--text);
}
.search-scope button {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 800;
}
.search-scope button:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.filters select,
.filters input[type="text"],
.filters input[type="date"] {
  background: var(--surface-low);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 13px;
}
.filters .dash { color: var(--muted); }
.filters .check { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.quick-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.quick-query {
  border: 1px solid var(--border);
  background: var(--surface-low);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
}
.quick-query:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.explorer-guide {
  margin: -4px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-low);
}
.explorer-guide-title {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.explorer-guide p {
  margin: 4px 0 10px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
}
.explorer-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
button.primary,
button.secondary {
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
}
button.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
button.primary:hover { background: var(--primary-hover); }
button.secondary { background: var(--surface-low); color: var(--text); border-color: var(--border); }
button.secondary:hover { border-color: var(--primary); color: var(--primary); }
button.secondary:disabled {
  color: var(--muted-soft);
  border-color: var(--border);
  cursor: not-allowed;
}
button.link {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  padding: 0 6px;
}
button.link:hover { color: var(--text); }
a.link { color: var(--primary); font-size: 13px; }
.brief {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  margin-bottom: 18px;
  box-shadow: none;
}
.brief-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.brief-header strong {
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brief-header .link { margin-left: auto; }
.brief-body {
  max-width: 72ch;
  line-height: 1.62;
  font-size: 14px;
}
.brief-body p {
  margin: 0 0 13px;
}
.brief-lede {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-low);
}
.brief-lede p {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.58;
}
.brief-section-label,
.citation-list-title {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brief-section-title {
  margin: 18px 0 7px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0;
}
.brief-list {
  margin: 4px 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.brief-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-dim);
  line-height: 1.55;
}
.brief-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}
.brief-body sup.cite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  min-height: 18px;
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 5px;
  margin: 0 2px;
  font-size: 11px;
  line-height: 1;
  font-weight: 750;
  cursor: pointer;
  color: var(--primary);
}
.brief-body sup.cite:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.brief-citations {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.brief-citation-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-low);
}
.citation-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  font: 700 11px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.citation-main {
  min-width: 0;
}
.citation-main a {
  display: block;
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}
.citation-main a:hover { color: var(--primary); }
.citation-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
  color: var(--muted);
}
.citation-meta .ts {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.voice-study .brief-body { white-space: normal; }
.voice-study .brief-body h3 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 18px 0 6px;
}
.voice-study .brief-body h4 { font-size: 14px; margin: 12px 0 4px; color: var(--text); }
.voice-study .brief-body ul { margin: 4px 0 10px; padding-left: 20px; }
.voice-study .brief-body li { margin: 3px 0; }
.voice-study .brief-body p { margin: 6px 0; }
.results { display: flex; flex-direction: column; gap: 10px; }
.result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: none;
  transition: border-color 120ms;
}
.result:hover { border-color: var(--border-strong); }
.clip-result {
  background: var(--surface);
  border-color: oklch(0.68 0.08 158);
}
.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.result-head .ep-link { font-weight: 700; }
.result-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.result-meta .chip { border: 1px solid var(--border); }
.result-meta .speaker,
.key-chip { color: var(--primary); }
.result-summary { color: var(--text); font-size: 14px; line-height: 1.5; }
.result-text { color: var(--text-dim); font-size: 13px; line-height: 1.5; margin-top: 6px; }
.result-actions { margin-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.result-actions .ts {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.result video { width: 100%; max-width: 720px; margin-top: 10px; border-radius: 6px; background: var(--ink-overlay); }
.copy-link {
  background: transparent;
  border: 0;
  color: var(--primary);
  padding: 0;
  cursor: pointer;
  font-size: 13px;
}
.quote-result {
  background: var(--surface);
  border-color: oklch(0.68 0.08 158);
  padding: 14px 16px 16px;
}
.quote-result-head {
  align-items: flex-start;
}
.quote-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  margin-right: 7px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.evidence-high { color: var(--success); border-color: rgba(31, 143, 88, 0.32) !important; }
.evidence-medium { color: var(--primary); border-color: oklch(0.68 0.08 158) !important; }
.evidence-low { color: var(--muted); border-color: var(--border) !important; }
.transcript-chip { color: var(--warning); border-color: rgba(164, 92, 24, 0.25) !important; }
.quote-answer {
  padding: 14px 16px 16px;
  border: 1px solid oklch(0.68 0.08 158);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}
.quote-answer-label {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.quote-answer p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}
.quote-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}
.quote-label {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid oklch(0.68 0.08 158);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.quote-text {
  margin: 10px 0 12px;
  padding: 8px 12px;
  border: 0;
  border-left: 3px solid var(--green-dark);
  color: var(--text);
  background: var(--surface-low);
  border-radius: 0;
  font-size: 14.5px;
  line-height: 1.6;
}
.quote-note {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px dashed var(--border);
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.45;
}
.quote-note strong {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.quote-note.risk strong { color: var(--warning); }
.quote-misses {
  padding: 12px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-low);
  color: var(--text-dim);
  font-size: 13px;
}
.quote-misses strong {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.quote-misses ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.quote-misses li { margin: 3px 0; }

/* Episode detail */
.episode .ep-head { margin-bottom: 14px; }
.episode .ep-head h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.22; letter-spacing: 0; }
.media-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}
.episode .card,
.media-card {
  padding: 14px 16px 16px;
  box-shadow: none;
}
.episode .card:hover,
.media-card:hover {
  transform: none;
  box-shadow: none;
}
.media-card h2,
.episode .card h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}
.media-note { margin: 8px 0 0; font-size: 12px; }
.video-embed {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--ink-overlay);
}
.video-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.episode #player {
  width: 100%;
  background: var(--ink-overlay);
  border-radius: var(--radius);
}
.manual-transcript-card textarea,
.manual-transcript-card input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-low);
  color: var(--text);
  padding: 0.55rem 0.65rem;
  outline: none;
  resize: vertical;
}
.manual-transcript-card textarea:focus,
.manual-transcript-card input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.manual-transcript-card input[type="text"] {
  margin-top: 0.5rem;
}
.manual-transcript-card button {
  margin-top: 0.6rem;
}
.card-head-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}
.card-head-row h2 {
  margin: 0;
}
.transcript-source-meta {
  display: grid;
  gap: 0.55rem;
  margin: 0.8rem 0;
}
.transcript-source-meta div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: baseline;
}
.transcript-source-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.transcript-source-meta dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}
.transcript-source-card button {
  width: 100%;
  margin-top: 0.45rem;
}
.transcription-upgrade,
.transcription-pass-progress {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.transcription-upgrade h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0;
}
.transcription-upgrade > p {
  margin: 0.35rem 0 0;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.5;
}
.transcription-upgrade-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0.8rem 0 0;
}
.transcription-upgrade-facts div {
  min-width: 0;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface-low);
}
.transcription-upgrade-facts dt,
.transcription-dialog-facts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.transcription-upgrade-facts dd,
.transcription-dialog-facts dd {
  margin: 0.18rem 0 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
}
.transcription-source-card .transcription-upgrade-footnote {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 11.5px;
}
.transcription-pass-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}
.transcription-pass-heading strong {
  color: var(--text);
  font-size: 13.5px;
}
.transcription-pass-badge {
  flex: 0 0 auto;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-low);
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.transcription-pass-badge.is-active {
  color: var(--warning);
  border-color: oklch(0.72 0.06 62);
  background: oklch(0.94 0.025 62);
}
.transcription-pass-badge.is-complete {
  color: var(--success);
  border-color: oklch(0.68 0.08 158);
  background: var(--primary-softer);
}
.transcription-pass-badge.is-failed {
  color: var(--danger);
  border-color: oklch(0.72 0.08 28);
  background: var(--danger-soft);
}
.transcription-pass-stages {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.transcription-pass-stages::before {
  content: "";
  position: absolute;
  top: 5px;
  right: 10%;
  left: 10%;
  height: 1px;
  background: var(--border-strong);
}
.transcription-pass-stages li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  min-width: 0;
  margin: 0;
  color: var(--muted-soft);
  font-size: 9.5px;
  line-height: 1.25;
  text-align: center;
}
.transcription-pass-stages li::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
}
.transcription-pass-stages li.is-done {
  color: var(--text-dim);
}
.transcription-pass-stages li.is-done::before {
  border-color: var(--success);
  background: var(--success);
}
.transcription-pass-stages li.is-current {
  color: var(--text);
  font-weight: 750;
}
.transcription-pass-stages li.is-current::before {
  border-color: var(--warning);
  background: var(--surface);
  box-shadow: 0 0 0 3px oklch(0.94 0.025 62);
}
.transcription-pass-progress.is-complete .transcription-pass-stages li.is-current::before {
  border-color: var(--success);
  background: var(--success);
  box-shadow: 0 0 0 3px var(--primary-softer);
}
.transcription-pass-progress.is-failed .transcription-pass-stages li.is-current::before {
  border-color: var(--danger);
  background: var(--danger-soft);
  box-shadow: 0 0 0 3px var(--danger-soft);
}
.transcription-pass-status {
  min-height: 2.8em;
  margin: 0.85rem 0 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.45;
}
.transcription-pass-progress.is-failed .transcription-pass-status {
  color: var(--danger);
}
.transcription-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  overflow-wrap: anywhere;
  box-shadow: 0 24px 80px oklch(0.08 0.025 255 / 0.3);
}
.transcription-dialog::backdrop {
  background: oklch(0.12 0.025 255 / 0.64);
  backdrop-filter: blur(4px);
}
.transcription-dialog form {
  padding: 1.4rem;
}
.transcription-dialog header h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  letter-spacing: -0.015em;
}
.transcription-dialog header p {
  max-width: 54ch;
  margin: 0.4rem 0 0;
  color: var(--text-dim);
  line-height: 1.5;
}
.transcription-dialog-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1.1rem;
}
.transcription-dialog-comparison div {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-low);
}
.transcription-dialog-comparison div:last-child {
  border-color: oklch(0.68 0.08 158);
  background: var(--primary-softer);
}
.transcription-dialog-comparison span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.transcription-dialog-comparison strong {
  color: var(--text);
  font-size: 13px;
}
.transcription-dialog-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.1rem 0 0;
}
.transcription-dialog-warning,
.transcription-dialog-note {
  margin: 1rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  background: var(--surface-low);
  font-size: 12.5px;
  line-height: 1.45;
}
.transcription-dialog-warning {
  color: var(--warning);
  border: 1px solid oklch(0.72 0.06 62);
  background: oklch(0.94 0.025 62);
}
.transcription-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.2rem;
}
.transcription-dialog footer button {
  width: auto;
  min-width: 110px;
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}
.col { display: flex; flex-direction: column; gap: 12px; }
.col.side {
  position: sticky;
  top: calc(var(--suite-bar-h) + 80px);
  align-self: start;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span {
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
}
.chips.muted span { color: var(--muted); }
.episode ul { margin: 0; padding-left: 18px; }
.episode li { margin-bottom: 6px; }
dl#ep-arc { margin: 0; }
dl#ep-arc dt { font-weight: 700; font-size: 12px; color: var(--muted); margin-top: 6px; }
dl#ep-arc dd { margin: 0 0 4px; font-size: 14px; }
.transcript { display: flex; flex-direction: column; gap: 0; max-height: 600px; overflow-y: auto; }
.transcript .turn {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 9px 8px;
  font-size: 14px;
}
.transcript .turn:first-child { border-top: 1px solid var(--border); }
.transcript .turn.key { border-left: 3px solid var(--green-dark); background: var(--primary-softer); }
.transcript .turn-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  margin-bottom: 2px;
}
.transcript .turn-meta .speaker { color: var(--primary); font-weight: 700; }
.transcript .turn-meta .ts { cursor: pointer; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.transcript .turn-meta .ts:hover { color: var(--text); }
.transcript .turn-text { color: var(--text); line-height: 1.55; }
ul#ep-key-moments li { margin-bottom: 8px; line-height: 1.5; }
ul#ep-key-moments .ts {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
}
ul#ep-key-moments .moment-type {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--surface-low);
  color: var(--muted);
  margin-right: 6px;
}
ul#ep-quotes li { list-style: none; margin-bottom: 12px; }
ul#ep-quotes blockquote {
  margin: 0;
  padding: 7px 12px;
  border: 0;
  border-left: 3px solid var(--green-dark);
  border-radius: 0;
  font-size: 14px;
  background: var(--surface-low);
}
ul#ep-quotes .qspeaker { font-weight: 700; color: var(--primary); }
ul#ep-quotes .qctx { font-size: 12px; color: var(--muted); margin-top: 4px; }
.review-flag {
  display: inline-block;
  font-size: 11px;
  color: var(--warning);
  border: 1px solid rgba(164, 92, 24, 0.36);
  border-radius: 4px;
  padding: 0 6px;
  margin-left: 6px;
}
.speaker-empty {
  margin: 0.6rem 0 0;
  font-size: 13px;
}
.speaker-editor {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.speaker-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}
.speaker-editor-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0;
}
.speaker-editor-head p {
  margin: 0.2rem 0 0;
  font-size: 12px;
}
.speaker-editor-count {
  color: var(--muted);
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.speaker-rows {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.speaker-row {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.speaker-row--review {
  border-color: rgba(164, 92, 24, 0.28);
  background: rgba(164, 92, 24, 0.035);
}
.speaker-row-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.speaker-row-label {
  flex: 0 0 auto;
  min-width: 78px;
  color: var(--text-dim);
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  font: 12px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.speaker-row-name {
  flex: 1 1 220px;
  min-width: min(220px, 100%);
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-low);
  color: var(--text);
  font-size: 13px;
}
.speaker-row-name:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.speaker-row-save,
.speaker-row-clear,
.speaker-row-listen {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0.42rem 0.7rem;
  font-size: 12px;
  font-weight: 700;
}
.speaker-row-save {
  color: var(--on-primary);
  background: var(--primary);
  border-color: var(--primary);
}
.speaker-row-save:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.speaker-row-clear,
.speaker-row-listen {
  color: var(--text-dim);
  background: var(--surface-low);
}
.speaker-row-clear:hover {
  color: var(--danger);
  border-color: rgba(186, 26, 26, 0.35);
  background: rgba(186, 26, 26, 0.07);
}
.speaker-row-listen:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.speaker-row-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 12px;
}
.speaker-row-evidence {
  margin: 0.55rem 0 0;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.45;
}
.speaker-edit-status {
  margin-top: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface-low);
  color: var(--text-dim);
  font-size: 12px;
}
.speaker-edit-status--ok {
  background: rgba(31, 143, 88, 0.09);
  color: var(--success);
}
.speaker-edit-status--err {
  background: var(--danger-soft);
  color: var(--danger);
}

@media (max-width: 1260px) {
  .sidebar { display: none; }
  .shell { margin-left: 0; }
  .shell > .topbar { margin-left: 0; }
  .canvas,
  .container { padding-inline: 24px; }
}
@media (max-width: 1082px) {
  .topbar {
    grid-template-columns: minmax(205px, auto) minmax(0, 1fr) auto;
  }
  .top-nav { display: none; }
  .global-search,
  .episode-masthead-context { grid-column: 2; }
  .top-actions { grid-column: 3; }
  .global-search-show { max-width: 130px; }
}
@media (max-width: 920px) {
  .eps,
  .show-grid { grid-template-columns: 1fr; }
  .show-group-header { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .show-context { max-width: 100%; white-space: normal; }
  .result-count { margin-left: 0; }
  .show-list-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .media-grid,
  .grid { grid-template-columns: 1fr; }
  .col.side { position: static; }
  .episode .ep-head h1 { font-size: 23px; }
}
@media (max-width: 640px) {
  .suite-bar { padding: 0 12px; }
  .suite-nav { margin-left: 12px; }
  .suite-nav a, .suite-menu > button { padding-inline: 9px; }
  #suite-account { display: none; }
  .topbar {
    grid-template-columns: minmax(152px, auto) minmax(0, 1fr) auto;
    gap: 10px;
    padding-inline: 12px;
  }
  .masthead-brand h1 { font-size: 18px; }
  .brand-mark { width: 30px; height: 30px; }
  .global-search-show,
  .global-search-brief,
  .search-mark { display: none; }
  .global-search { padding-left: 8px; }
  .global-search-submit { padding-inline: 8px; }
  .episode-masthead-context { display: none; }
  .transcription-dialog form {
    padding: 1rem;
  }
  .transcription-dialog-comparison,
  .transcription-dialog-facts {
    grid-template-columns: 1fr;
  }
  .transcription-dialog footer {
    flex-direction: column-reverse;
  }
  .transcription-dialog footer button {
    width: 100%;
  }
  .canvas,
  .container { padding: 20px 12px 40px; }
  .card-main { grid-template-columns: 96px minmax(0, 1fr); }
  .dashboard { border-radius: var(--radius-sm); }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-panel { padding: 12px; }
  .quote-note { grid-template-columns: 1fr; gap: 2px; }
}

/* CD OPS Lobbying menu contract v2 */
.suite-menu > button {
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.suite-menu > button.active { border-bottom-color: #72d9a5; color: #f7fafc; }
.suite-menu .suite-submenu {
  z-index: 80;
  width: min(220px, calc(100vw - 20px));
  min-width: min(220px, calc(100vw - 20px));
  padding: 6px;
  border-color: #344154;
  background: #111827;
}
.suite-menu:hover .suite-submenu,
.suite-menu:focus-within .suite-submenu,
.suite-menu.is-open .suite-submenu { display: block; }
.suite-menu .suite-submenu a,
.suite-menu .suite-submenu [aria-disabled="true"] {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  color: #dce3ea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
}
.suite-menu .suite-submenu a:hover,
.suite-menu .suite-submenu a:focus-visible { color: #86efb6; background: #1c2737; outline: none; }
.suite-menu .suite-submenu a[aria-current="page"] { box-shadow: inset 2px 0 0 #72d9a5; color: #f7fafc; }
.suite-menu .suite-submenu [aria-disabled="true"] { color: #8c98a8; cursor: default; }
.suite-menu .suite-submenu small {
  color: inherit;
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}
