:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-warm: #fbfcf9;
  --surface-soft: #f0f3ed;
  --surface-strong: #e5ebe1;
  --ink: #171817;
  --muted: #646b64;
  --line: #d8ded4;
  --navy: #18334d;
  --green: #526b47;
  --red: #a94338;
  --gold: #aa7f24;
  --shadow: 0 12px 34px rgba(23, 24, 23, 0.08);
  --shadow-soft: 0 8px 22px rgba(23, 24, 23, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, #eef2ea 0, var(--bg) 270px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

:where(h1, h2, h3, p, a, span, strong, td, th, label) {
  min-width: 0;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

:where(.term-index-word, .video-card h3 a, .snippet-stack p, .snippet-feed p, .transcript-text, td a) {
  overflow-wrap: break-word;
}

:where(.trend-legend span, .total-bars a, .peak-row, .co-list a, .report-starter-grid a, .compact-term-list a, .dashboard-episode-list a, .cast-card) {
  overflow-wrap: break-word;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  background: rgba(246, 247, 244, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(23, 24, 23, 0.02);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  background: linear-gradient(135deg, var(--ink), var(--navy));
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.94rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.74rem;
}

.nav-links {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-links a {
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.nav-links a.active,
.nav-links a:hover {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(23, 24, 23, 0.06);
}

main {
  padding-bottom: 48px;
}

.dashboard-hero,
.content-band,
.page-shell,
.episode-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 26px auto 0;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.hero-copy {
  display: flex;
  min-width: 0;
  min-height: 330px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(20, 22, 20, 0.9), rgba(20, 22, 20, 0.48)),
    url("https://i.ytimg.com/vi/hLoFNYvyY-s/hqdefault.jpg") center / cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  color: #fff;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy h1,
.page-heading h1,
.episode-details h1 {
  max-width: 100%;
  margin: 0;
  line-height: 1.08;
}

.hero-copy h1 {
  max-width: 660px;
  font-size: 3rem;
}

.page-heading h1 {
  font-size: 2.3rem;
}

.episode-details h1 {
  font-size: 2.35rem;
}

.hero-search,
.search-row,
.mini-search,
.report-inline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hero-search {
  width: min(620px, 100%);
  margin-top: 22px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(20, 22, 20, 0.18);
}

.search-row {
  padding-left: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.report-inline {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mini-search {
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(360px, 100%);
}

.hero-search svg,
.search-row svg {
  flex: 0 0 auto;
  color: var(--muted);
}

.hero-search input,
.search-row input,
.mini-search input,
.report-inline input,
.control-panel textarea,
.filters input,
.filters select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}

.hero-search input,
.search-row input,
.report-inline input {
  height: 40px;
  border: 0;
  padding: 0 4px;
  background: transparent;
}

.mini-search input,
.filters input,
.filters select,
.control-panel textarea {
  min-height: 40px;
  padding: 8px 10px;
}

.control-panel textarea {
  resize: vertical;
}

.hero-search button,
.search-row button,
.mini-search button,
.report-inline button,
.primary-action,
.watch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--radius);
  background: var(--red);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

.hero-search button:hover,
.search-row button:hover,
.mini-search button:hover,
.report-inline button:hover,
.primary-action:hover,
.watch-link:hover {
  background: #95392f;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 10px;
}

.stat-grid div {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 102px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.hero-stats div:nth-child(2) {
  border-top-color: var(--navy);
}

.hero-stats div:nth-child(3) {
  border-top-color: var(--gold);
}

.hero-stats div:nth-child(4) {
  border-top-color: var(--red);
}

.stat-grid svg {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.stat-grid strong {
  display: block;
  font-size: 2rem;
  line-height: 1.05;
}

.stat-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.section-heading,
.page-heading,
.report-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  gap: 14px;
  margin-bottom: 16px;
}

.page-heading {
  align-items: flex-start;
  flex-direction: column;
  gap: 0;
}

.section-heading > div,
.page-heading > div,
.report-card-head > div {
  min-width: 0;
}

.section-heading h2,
.report-card h2,
.transcript-panel h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.12;
}

.text-link,
.back-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 850;
}

.text-link {
  padding: 7px 9px;
  background: rgba(24, 51, 77, 0.07);
  border-radius: var(--radius);
}

.text-link:hover {
  background: rgba(24, 51, 77, 0.12);
}

.text-link svg,
.back-link svg {
  width: 16px;
  height: 16px;
}

.control-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 10px;
}

label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.wide-label {
  display: block;
}

.primary-action {
  width: fit-content;
}

.result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.summary-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.summary-metric strong {
  font-size: 1.5rem;
  line-height: 1;
}

.summary-metric span {
  color: var(--muted);
  font-weight: 800;
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.cast-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--cast-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.cast-red {
  --cast-color: var(--red);
}

.cast-navy {
  --cast-color: var(--navy);
}

.cast-green {
  --cast-color: var(--green);
}

.cast-gold {
  --cast-color: var(--gold);
}

.cast-media {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
}

.cast-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(23, 24, 23, 0.02), rgba(23, 24, 23, 0.18));
  pointer-events: none;
}

.cast-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cast-avatar {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(23, 24, 23, 0.16);
  color: var(--cast-color);
  font-weight: 900;
}

.cast-card-body {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 14px 15px 15px;
}

.cast-role {
  margin: 0;
  color: var(--cast-color);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cast-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.16;
}

.cast-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cast-meta span {
  padding: 4px 6px;
  background: var(--surface-soft);
  border: 1px solid rgba(216, 222, 212, 0.7);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.cast-card p:not(.cast-role) {
  margin: 0;
  color: #444a43;
  font-size: 0.9rem;
  line-height: 1.45;
}

.cast-card a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  margin-top: 2px;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 850;
}

.cast-card a:hover {
  color: var(--red);
}

.cast-card a svg {
  width: 15px;
  height: 15px;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.term-panel {
  min-width: 0;
}

.term-panel h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.2;
}

.term-index {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.term-index a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 18px;
  min-width: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.term-index a:first-child {
  border-top: 0;
}

.term-index a:nth-child(even) {
  background: var(--surface-warm);
}

.term-index a:hover {
  background: var(--surface-soft);
}

.term-index-word {
  color: var(--ink);
  font-weight: 800;
}

.term-index strong {
  padding: 2px 7px;
  background: rgba(82, 107, 71, 0.1);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.video-grid,
.results-list {
  display: grid;
  gap: 12px;
}

.video-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.results-list {
  grid-template-columns: 1fr;
}

.video-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(23, 24, 23, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.video-card:hover {
  border-color: #c9d2c4;
  box-shadow: var(--shadow-soft);
}

.video-grid .video-card {
  grid-template-columns: 1fr;
}

.thumb {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #d9ddd5;
}

.thumb::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 22, 20, 0) 55%, rgba(20, 22, 20, 0.18));
  content: "";
  pointer-events: none;
}

.results-list .thumb {
  height: 100%;
  min-height: 124px;
  aspect-ratio: auto;
}

.thumb img,
.episode-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-pill {
  position: absolute;
  left: 8px;
  top: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 7px;
  background: rgba(20, 22, 20, 0.84);
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
}

.video-card-body {
  min-width: 0;
  padding: 13px 14px;
}

.card-meta,
.episode-meta {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.card-meta span,
.episode-meta span {
  max-width: 100%;
  padding: 4px 6px;
  background: var(--surface-soft);
  border: 1px solid rgba(216, 222, 212, 0.7);
  border-radius: var(--radius);
}

.video-card h3 {
  margin: 9px 0 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.28;
}

.video-card h3 a:hover,
td a:hover,
.snippet-feed a:hover strong {
  color: var(--red);
}

.snippet-stack {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.snippet-stack p,
.snippet-feed p {
  margin: 0;
  color: #444a43;
  font-size: 0.9rem;
  line-height: 1.5;
}

.snippet-stack p {
  padding: 9px 10px;
  background: var(--surface-warm);
  border-left: 3px solid var(--gold);
}

mark {
  padding: 0 3px;
  background: #ffe08a;
  border-radius: 4px;
}

.empty-state,
.report-empty {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-state svg {
  color: var(--muted);
}

.reports-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.dashboard-panel {
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.dashboard-summary,
.quick-reports-panel,
.recent-report-panel {
  grid-column: 1 / -1;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-stat-grid div {
  position: relative;
  min-width: 0;
  min-height: 96px;
  padding: 14px;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
}

.dashboard-stat-grid div:nth-child(2) {
  border-top-color: var(--navy);
}

.dashboard-stat-grid div:nth-child(3) {
  border-top-color: var(--gold);
}

.dashboard-stat-grid div:nth-child(4) {
  border-top-color: var(--red);
}

.dashboard-stat-grid svg {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.dashboard-stat-grid strong {
  display: block;
  margin-top: 34px;
  font-size: 1.55rem;
  line-height: 1;
}

.dashboard-stat-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.source-mix {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.source-mix div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.source-mix strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.source-mix i {
  grid-column: 1 / -1;
  display: block;
  width: max(4px, var(--source-size));
  height: 9px;
  background: linear-gradient(90deg, var(--navy), var(--green));
  border-radius: 999px;
}

.report-starter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.report-starter-grid a {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 13px;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.report-starter-grid a:hover {
  border-color: #c9d2c4;
  background: var(--surface-soft);
}

.report-starter-grid svg {
  width: 19px;
  height: 19px;
  color: var(--red);
}

.report-starter-grid strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.report-starter-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.35;
}

.compact-term-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compact-term-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  min-width: 0;
  padding: 9px 10px;
  border-top: 1px solid var(--line);
}

.compact-term-list a:first-child {
  border-top: 0;
}

.compact-term-list a:nth-child(even) {
  background: var(--surface-warm);
}

.compact-term-list a:hover {
  background: var(--surface-soft);
}

.compact-term-list span {
  font-weight: 850;
}

.compact-term-list strong {
  color: var(--green);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-episode-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-episode-list a {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dashboard-episode-list img {
  width: 100%;
  height: 100%;
  min-height: 78px;
  object-fit: cover;
}

.dashboard-episode-list span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 9px 10px 9px 0;
}

.dashboard-episode-list strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.24;
}

.dashboard-episode-list small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 14px;
  margin-bottom: 16px;
}

.analytics-card {
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.analytics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  margin-bottom: 12px;
}

.analytics-head > div {
  min-width: 0;
}

.analytics-head h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.16;
}

.trend-card {
  grid-row: span 2;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.trend-legend i {
  width: 10px;
  height: 10px;
  background: var(--series-color);
  border-radius: 999px;
}

.trend-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 260px;
}

.chart-grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-axis {
  stroke: #b9c2b5;
  stroke-width: 1.3;
}

.chart-y-label,
.chart-x-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.chart-x-label {
  text-anchor: middle;
}

.trend-line {
  fill: none;
  stroke: var(--series-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.trend-point {
  fill: #fff;
  stroke: var(--series-color);
  stroke-width: 2.3;
}

.total-bars,
.peak-list,
.co-list {
  display: grid;
  gap: 8px;
}

.total-bars a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  min-width: 0;
  padding: 9px 0 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
}

.total-bars strong {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.total-bars i {
  grid-column: 1 / -1;
  display: block;
  width: max(4px, var(--bar-size));
  height: 9px;
  background: var(--series-color);
  border-radius: 999px;
}

.peak-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 4px 10px;
  min-width: 0;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.peak-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.peak-row span {
  color: var(--ink);
  font-weight: 900;
}

.peak-row span::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  background: var(--series-color);
  border-radius: 999px;
  content: "";
}

.peak-row strong,
.peak-row em {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 850;
}

.peak-row a {
  grid-column: 1 / -1;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 800;
}

.co-card {
  grid-column: 1 / -1;
}

.co-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.co-list a {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 10px 11px;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  border-radius: var(--radius);
}

.co-list span {
  color: var(--ink);
  font-weight: 900;
}

.co-list strong,
.co-list em {
  color: var(--muted);
  font-size: 0.83rem;
  font-style: normal;
  font-weight: 850;
}

.co-list small {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
}

.report-stack {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.report-card,
.transcript-panel {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.report-metrics {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
}

.report-metrics span {
  min-width: 0;
  padding: 7px 9px;
  background: var(--surface-soft);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.report-metrics strong {
  color: var(--ink);
}

.month-chart {
  display: grid;
  gap: 7px;
  margin: 14px 0 18px;
  padding: 12px;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.month-bar {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) max-content;
  align-items: center;
  min-width: 0;
  gap: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.month-bar strong {
  font-variant-numeric: tabular-nums;
}

.month-bar i {
  display: block;
  width: var(--size);
  min-width: 4px;
  height: 10px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 999px;
}

.snippet-feed {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.snippet-feed a {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 11px 12px;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
}

.snippet-feed span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.snippet-feed strong {
  font-size: 0.96rem;
  line-height: 1.3;
}

.report-section-title {
  margin: 18px 0 9px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(23, 24, 23, 0.02);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  font-size: 0.9rem;
}

td:first-child {
  width: 58%;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: var(--surface-warm);
}

.episode-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  align-items: stretch;
  gap: 16px;
}

.episode-image {
  min-height: 240px;
  overflow: hidden;
  background: #d9ddd5;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.episode-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.watch-link {
  width: fit-content;
  background: var(--navy);
}

.transcript-panel {
  margin-top: 16px;
}

.transcript-text {
  max-width: 90ch;
  color: #30342f;
  font-size: 1rem;
  line-height: 1.68;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .dashboard-hero,
  .episode-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 260px;
  }

  .section-heading,
  .report-card-head,
  .analytics-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .reports-dashboard {
    grid-template-columns: 1fr;
  }

  .cast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-summary,
  .quick-reports-panel,
  .recent-report-panel {
    grid-column: auto;
  }

  .dashboard-stat-grid,
  .report-starter-grid,
  .dashboard-episode-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trend-card,
  .co-card {
    grid-column: auto;
    grid-row: auto;
  }

  .trend-legend {
    justify-content: flex-start;
  }

  .video-card {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  body {
    font-size: 14px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  .dashboard-hero,
  .content-band,
  .page-shell,
  .episode-shell {
    width: calc(100% - 24px);
    margin-top: 14px;
  }

  .hero-copy {
    min-height: 220px;
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: 2.15rem;
  }

  .page-heading h1 {
    font-size: 2rem;
  }

  .episode-details h1 {
    font-size: 1.85rem;
  }

  .hero-search,
  .search-row,
  .report-inline,
  .mini-search {
    grid-template-columns: 1fr;
  }

  .hero-search svg,
  .search-row svg {
    display: none;
  }

  .hero-search button,
  .search-row button,
  .mini-search button,
  .report-inline button,
  .primary-action,
  .watch-link {
    width: 100%;
  }

  .stat-grid div {
    min-height: 82px;
  }

  .language-grid {
    grid-template-columns: 1fr;
  }

  .cast-grid {
    grid-template-columns: 1fr;
  }

  .analytics-card {
    padding: 14px;
  }

  .dashboard-panel {
    padding: 14px;
  }

  .dashboard-stat-grid,
  .report-starter-grid,
  .dashboard-episode-list {
    grid-template-columns: 1fr;
  }

  .dashboard-episode-list a {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .trend-svg {
    min-height: 220px;
  }

  .chart-y-label,
  .chart-x-label {
    font-size: 14px;
  }

  .peak-row {
    grid-template-columns: 1fr;
  }

  .results-list .video-card {
    grid-template-columns: 1fr;
  }

  .results-list .thumb {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .month-bar {
    grid-template-columns: 64px minmax(0, 1fr) max-content;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 8px;
  }

  tr {
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  td,
  td:first-child {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    padding: 5px 0;
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .episode-image {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}
