:root {
  --bg0: #0b0f14;
  --bg1: #0f151c;
  --bg2: #141c24;
  --panel: #0f141b;
  --panel2: #121922;
  --fg0: #e6edf3;
  --fg1: #c9d4df;
  --muted: #8fa1b3;
  --muted2: #6b7a8a;
  --border: #243041;
  --border2: #1a2431;
  --accent: #7cc4b7;
  --accent2: #c8a06a;
  --danger: #e57373;
  --warn: #d8b26a;
  --ok: #7bbf99;
  --shadow: rgba(0, 0, 0, 0.55);
  --shadow2: rgba(0, 0, 0, 0.25);
  --radius: 6px;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scrollbar-gutter: stable; }

/* Utility classes for overflow handling */
.flex-shrink { min-width: 0; }
.text-wrap { overflow-wrap: break-word; word-break: break-word; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body {
  margin: 0;
  font-family: var(--mono);
  line-height: 1.45;
  color: var(--fg0);
  background-color: var(--bg0);
  background-image:
    radial-gradient(1400px 1000px at 12% 8%, rgba(124, 196, 183, 0.12), rgba(124, 196, 183, 0.04) 42%, transparent 72%),
    radial-gradient(1200px 900px at 86% 84%, rgba(200, 160, 106, 0.10), rgba(200, 160, 106, 0.03) 46%, transparent 74%),
    linear-gradient(180deg, #0f151c 0%, #0b1016 54%, #0a0f14 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.closed-overlay {
  position: fixed;
  inset: 0;
  background: #000 url("/casey-shocked.jpeg") center / cover no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

/* Subtle scanline/noise overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1400px 900px at 12% 10%, rgba(255, 255, 255, 0.045), transparent 60%),
    radial-gradient(1100px 800px at 78% 72%, rgba(255, 255, 255, 0.035), transparent 58%),
    radial-gradient(800px 700px at 46% 40%, rgba(255, 255, 255, 0.025), transparent 60%);
  background-repeat: no-repeat;
  opacity: 0.22;
  mix-blend-mode: soft-light;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1400px 1000px at 50% 18%, rgba(0,0,0,0.0), rgba(0,0,0,0.40)),
    radial-gradient(900px 700px at 50% 70%, rgba(0,0,0,0.0), rgba(0,0,0,0.28));
  background-repeat: no-repeat;
  opacity: 0.85;
}

::selection { background: rgba(124, 196, 183, 0.25); }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted rgba(124, 196, 183, 0.35);
}
a:hover { border-bottom-color: rgba(124, 196, 183, 0.75); }
a:focus-visible { outline: 2px solid rgba(124, 196, 183, 0.55); outline-offset: 2px; }

/* Guest name links */
.guest-name-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-bottom: 1px dotted transparent;
  transition: border-color 0.2s ease;
}
.guest-name-link:hover {
  border-bottom-color: rgba(124, 196, 183, 0.5);
}

/* RSS link in hero */
.rss-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-bottom: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.rss-link:hover {
  opacity: 1;
}
.rss-link-icon {
  width: 20px;
  height: 20px;
  color: #ff6600;
}

.navigation {
  padding-block: 12px;
  padding-inline: 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 26, 0.7);
}
.navigation-links {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.navigation-link {
  text-decoration: none;
  border-bottom: none;
  opacity: 0.7;
  font-weight: 500;
}
.navigation-link[aria-current="page"] {
  opacity: 1;
  font-weight: 600;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 18px 54px;
  transition: width 180ms ease, height 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 24, 32, 0.96), rgba(12, 18, 24, 0.92));
  box-shadow: 0 18px 60px var(--shadow), 0 2px 0 var(--border2);
  position: relative;
  overflow: hidden;
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.terminal::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: calc(var(--radius) - 2px);
  pointer-events: none;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 28, 38, 0.95), rgba(16, 22, 30, 0.95));
}

.terminal-dots { display: flex; gap: 8px; align-items: center; }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}
.dot--danger { background: var(--danger); }
.dot--warn { background: var(--warn); }
.dot--ok { background: var(--ok); }

.terminal-title {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  user-select: none;
}

.terminal-hint {
  margin-left: auto;
  color: var(--muted2);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: none;
  user-select: none;
}

.terminal-bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 26, 0.7);
  color: var(--fg1);
  font-size: 12px;
  line-height: 1;
}

.terminal-body {
  padding: 18px 18px 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -2px -2px;
}

.overview {
  padding: 12px 12px 14px;
  border: 1px solid var(--border2);
  background: linear-gradient(180deg, rgba(16, 22, 30, 0.60), rgba(12, 18, 24, 0.35));
  box-shadow: 0 12px 30px var(--shadow2);
}
.overview .hero {
  margin-top: 10px;
  padding: 12px 12px;
  border-left-color: rgba(124, 196, 183, 0.45);
  background: rgba(12, 18, 24, 0.35);
}

.command-output {
  padding: 12px 12px 14px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: var(--radius);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: rgba(12, 18, 24, 0.45);
  box-shadow: 0 12px 30px var(--shadow2);
}

.episodes-section {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(143, 161, 179, 0.22);
}

.prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: rgba(12, 18, 24, 0.60);
}
.prompt-lhs { color: var(--fg1); white-space: nowrap; flex-shrink: 0; }
.prompt-lhs .dim { color: var(--muted2); }
.prompt-cmd {
  color: var(--accent);
  flex: 1 1 auto;
}
.prompt-cmd,
.filter-input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: rgba(12, 18, 24, 0.70);
  box-shadow: 0 10px 24px var(--shadow2);
  min-width: 0;
  flex: 1 1 auto;
}
.filter:focus-within {
  border-color: rgba(124, 196, 183, 0.55);
  box-shadow: 0 0 0 2px rgba(124, 196, 183, 0.18), 0 10px 26px var(--shadow2);
}
.filter-label {
  color: rgba(124, 196, 183, 0.85);
  font-size: 13px;
  user-select: none;
  flex-shrink: 0;
}
.filter-input {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg0);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  width: 320px;
  max-width: 52vw;
}
.filter-input::placeholder { color: rgba(134, 160, 138, 0.65); }
.hero {
  margin-top: 14px;
  padding: 14px 12px;
  border-left: 3px solid rgba(124, 196, 183, 0.35);
}
.hero-title,
.hero-subtitle,
.hero-desc {
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero-title {
  font-size: 22px;
  letter-spacing: 0.01em;
  font-weight: 650;
  margin: 0 0 6px 0;
}
.hero-title--tight {
  margin: 0;
}
.hero-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero--with-actions {
  position: relative;
}
.hero-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 0.5em;
}
.hero-subtitle {
  color: var(--fg1);
  margin: 0 0 10px 0;
  font-weight: 520;
}
.hero-desc {
  color: var(--muted);
  margin: 0;
  max-width: 78ch;
}

.listen-block {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.listen-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
}
.listen-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.listen-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  color: var(--fg1);
  opacity: 0.8;
  line-height: 1;
  text-decoration: none;
  border-bottom: none;
}
.listen-link:hover {
  opacity: 1;
  color: var(--accent);
}
.listen-link-icon {
  width: 18px;
  height: 18px;
  display: block;
  transform-origin: center;
}
.listen-link-spotify {
  color: rgba(29, 185, 84, 0.95);
}
.listen-link-spotify:hover {
  color: rgba(29, 185, 84, 1);
}
.listen-link-youtube {
  color: rgba(255, 0, 0, 0.9);
}
.listen-link-youtube:hover {
  color: rgba(255, 0, 0, 1);
}
.listen-link-youtube .listen-link-icon {
  transform: scale(1.12);
}
.listen-link-amazon {
  color: #25d1da;
}
.listen-link-amazon:hover {
  color: #2fe6ef;
}
.listen-link-amazon .listen-link-icon {
  transform: scale(1.16);
}
.listen-link-apple {
  color: rgba(188, 152, 255, 0.95);
}
.listen-link-apple:hover {
  color: rgba(188, 152, 255, 1);
}
.listen-link-rss {
  color: #ff6600;
}

.divider {
  margin: 18px 0 12px;
  border: 0;
  border-top: 1px solid var(--border);
}

.episodes-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 28, 38, 0.78), rgba(12, 18, 24, 0.58));
  box-shadow: 0 12px 30px var(--shadow2);
  margin-bottom: 10px;
}
.episodes-header-left,
.episodes-header-right {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.episodes-header-left { flex: 1 1 auto; }
.episodes-header-right { flex-shrink: 0; }
.episodes-header-title {
  font-size: 14px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg1);
  font-weight: 780;
  margin: 0;
}
.episodes-header-count {
  color: var(--muted2);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episodes {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
}

details.episode {
  border: 1px solid var(--border);
  background: rgba(12, 18, 24, 0.55);
}
details.episode[open] {
  background: rgba(16, 22, 30, 0.72);
  box-shadow: 0 10px 28px var(--shadow2);
  border-left-color: rgba(124, 196, 183, 0.55);
  border-left-width: 3px;
}

summary.episode-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 12px 12px;
  display: grid;
  grid-template-columns: 34px 124px 1fr 92px;
  gap: 12px;
  align-items: baseline;
  min-width: 0;
}
summary.episode-summary::-webkit-details-marker { display: none; }
summary.episode-summary:focus-visible { outline: 2px solid rgba(124, 196, 183, 0.55); outline-offset: 2px; }
details.episode:hover summary.episode-summary { background: rgba(124, 196, 183, 0.05); }

.episode-idx {
  color: var(--muted2);
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  opacity: 0.8;
}

/* Episode text overflow handling */
.episode-date {
  color: var(--muted2);
  font-size: 12px;
  white-space: nowrap;
}
.episode-duration {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.episode-title {
  color: var(--fg0);
  font-weight: 650;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.episode-duration {
  color: var(--accent2);
  font-size: 12px;
  text-align: right;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.episode-duration-text {
  min-width: 7ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.episode-summary-link {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
  border-bottom: none;
}

.episode-summary-link:hover {
  border-color: rgba(124, 196, 183, 0.55);
}

.episode-body {
  border-top: 1px solid var(--border);
  padding: 12px 12px 14px;
}

.episode-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: start;
}

.episode-img {
  width: 160px;
  height: 160px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: rgba(0,0,0,0.35);
  border-radius: 4px;
}

.episode-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.episode-links {
  margin-top: 12px;
}

.episode-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(12, 18, 24, 0.7);
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
  border-bottom: none;
}

.episode-link:hover {
  border-color: rgba(124, 196, 183, 0.55);
}

mark.hl {
  background: rgba(124, 196, 183, 0.16);
  color: var(--fg0);
  border: 1px solid rgba(124, 196, 183, 0.35);
  padding: 0 2px;
}

.episode-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  color: var(--fg1);
  background: rgba(12, 18, 24, 0.60);
  font-size: 12px;
  line-height: 1;
}
.tag--spotify {
  border-color: rgba(29, 185, 84, 0.35);
  color: rgba(29, 185, 84, 0.95);
}
.tag--spotify:hover {
  border-color: rgba(29, 185, 84, 0.65);
}
.icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  flex: 0 0 auto;
  fill: currentColor;
}
.icon--inline {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
}
.tag--accent { border-color: rgba(124, 196, 183, 0.32); }

.episode-audio {
  margin-top: 10px;
  border: 1px solid var(--border);
  background: rgba(12, 18, 24, 0.65);
  padding: 8px;
}
audio { width: 100%; height: 34px; }

.spotify-embed {
  margin-top: 12px;
  border: 1px solid var(--border);
  background: rgba(12, 18, 24, 0.65);
  padding: 8px;
  border-radius: var(--radius);
  box-shadow: none;
}
.spotify-embed-frame {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
}

.episode-page-nav {
  margin-bottom: 12px;
}

.episode-page-content {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  background: rgba(12, 18, 24, 0.45);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px var(--shadow2);
}

.footer {
  color: var(--muted2);
  margin-top: 16px;
  font-size: 12px;
}

.page-section {
  padding-block: 20px;
}
.page-section + .page-section {
  margin-top: 12px;
}
.page-section--spaced {
  margin-bottom: 32px;
}
.page-section-title {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: var(--fg0);
  font-weight: 600;
}
.page-section-grid {
  display: grid;
  gap: 20px;
}
.page-section-empty {
  margin: 0;
  color: var(--muted);
}

.person-card {
  display: flex;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  background: rgba(12, 18, 24, 0.45);
  border-radius: var(--radius);
}
.person-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}
.person-card-body {
  flex: 1;
  min-width: 0;
}
.person-card-name {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: var(--fg0);
}
.person-card-handle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.person-card-desc {
  margin: 12px 0 0 0;
  color: var(--fg1);
  line-height: 1.6;
}
.person-card-episodes {
  margin: 12px 0 0 0;
  color: var(--fg1);
  line-height: 1.6;
  font-size: 14px;
}
.person-card-episodes a {
  border-bottom: 1px dotted rgba(124, 196, 183, 0.35);
}
.person-card-social {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.person-card-social-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-bottom: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.person-card-social-link:hover {
  opacity: 1;
}
.person-card-social-icon {
  color: var(--muted);
}

.sponsor-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot--button {
  appearance: none;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.35);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}

.dot--warn.dot--button {
  background: var(--warn);
}

.dot--ok.dot--button {
  background: var(--ok);
}

.dot--button:hover {
  filter: brightness(1.08);
}

.dot--button:focus-visible {
  outline: 2px solid rgba(228, 188, 118, 0.6);
  outline-offset: 3px;
}

body[data-window-state="minimized"] {
  overflow: hidden;
}

body[data-window-state="minimized"] .page {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(260px, calc(100vw - 36px));
  height: 60px;
  padding: 0;
  margin: 0;
  z-index: 5;
}

body[data-window-state="maximized"] {
  overflow: hidden;
}

body[data-window-state="maximized"] .page {
  max-width: none;
  width: 100vw;
  height: 100vh;
  padding: 0;
  margin: 0;
}

body[data-window-state="maximized"] .terminal {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

body[data-window-state="maximized"] .terminal::after {
  inset: 0;
  border-radius: 0;
}

body[data-window-state="closed"] {
  overflow: hidden;
}

body[data-window-state="closed"] .page {
  display: none;
}

body[data-window-state="closed"] .closed-overlay {
  opacity: 1;
  pointer-events: auto;
}

body[data-window-state="minimized"] .terminal {
  height: 100%;
  box-shadow: 0 12px 30px var(--shadow2);
}

body[data-window-state="minimized"] .terminal-body {
  display: none;
}

body[data-window-state="minimized"] .terminal-bar {
  border-bottom: 0;
  height: 100%;
  padding: 8px 10px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body[data-window-state="minimized"] .terminal-title {
  display: none;
}

body[data-window-state="minimized"] .terminal-hint {
  display: inline-flex;
}

body[data-window-state="minimized"] .terminal-dots {
  gap: 10px;
}

body[data-window-state="minimized"] .dot--danger,
body[data-window-state="minimized"] .dot--warn {
  display: none;
}

body[data-window-state="minimized"] .dot--ok {
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 1px rgba(123, 191, 153, 0.25), 0 0 10px rgba(123, 191, 153, 0.35);
}

.sponsors-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.sponsor-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  background: rgba(12, 18, 24, 0.55);
  border-radius: var(--radius);
  align-items: center;
}

.sponsor-card-image img {
  width: 100%;
  height: 100px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border2);
  object-fit: cover;
  display: block;
}

.sponsor-card-title {
  margin: 0;
  font-size: 18px;
  color: var(--fg0);
}

.sponsor-card-desc {
  margin: 8px 0 0 0;
  color: var(--fg1);
  font-size: 14px;
  line-height: 1.6;
}

.sponsor-card-link {
  display: inline-flex;
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
}

.sponsor-card-ads {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(36, 48, 65, 0.6);
}

.sponsor-card-ads-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted2);
  margin-bottom: 8px;
}

.ad-production-list {
  display: grid;
  gap: 14px;
}

.ad-production-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(12, 18, 24, 0.45);
}

.ad-production-title {
  font-size: 14px;
  color: var(--fg0);
  margin: 0;
  flex: 1;
}

.ad-production-links {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.ad-production-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(15, 20, 26, 0.7);
  color: var(--muted);
}

.ad-production-link:hover {
  color: var(--fg0);
  border-color: rgba(124, 196, 183, 0.45);
}

.ad-production-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.sponsor-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(124, 196, 183, 0.4);
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(124, 196, 183, 0.12);
}

.ad-productions {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.ad-productions--compact {
  gap: 8px;
}

.ad-productions li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(12, 18, 24, 0.45);
}

.ad-productions a {
  border-bottom: none;
  color: var(--accent);
}

.ad-productions a:hover {
  border-bottom: none;
  color: var(--fg0);
}

@media (max-width: 820px) {
  .page { padding: 18px 12px 44px; }
  
  /* Mobile overflow handling - ensure flex/grid items can shrink */
  .prompt,
  .episodes-header,
  .filter,
  summary.episode-summary,
  .episode-title,
  .episode-date,
  .episode-duration {
    min-width: 0;
  }
  
  /* Mobile layout adjustments */
  .episodes-header {
    flex-wrap: wrap;
    align-items: center;
  }
  .episodes-header-left { flex: 1 1 100%; }
  .episodes-header-right {
    width: 100%;
    justify-content: space-between;
  }
  .filter {
    flex: 1 1 auto;
    max-width: 100%;
  }
  .filter-input {
    width: 100%;
    max-width: none;
  }
  .prompt-cmd {
    white-space: normal;
    word-break: break-all;
    overflow-wrap: break-word;
  }
  summary.episode-summary {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
  }
  .hero-actions {
    position: static;
    margin-top: 8px;
  }
  .episode-date {
    grid-row: 1;
    grid-column: 1;
  }
  .episode-idx {
    grid-row: 1;
    grid-column: 2;
    text-align: right;
  }
  .episode-title {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .episode-duration {
    grid-row: 3;
    grid-column: 1 / -1;
    text-align: left;
  }
  .episode-grid { grid-template-columns: 1fr; }
  .episode-img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .person-card { flex-direction: column; align-items: flex-start; }
  .sponsor-card { grid-template-columns: 1fr; }
  .sponsor-card-image img { height: 180px; }
  .ad-production-row { flex-direction: column; align-items: flex-start; }
}
