/* In the AI of the Tornado: colors and type taken from the channel's thumbnails and show art. */
:root {
  --storm: #121620;      /* tornado cloud, the base */
  --storm-2: #1c2230;    /* raised surfaces */
  --chrome: #e8ebf0;     /* cracked-silver lettering */
  --mist: #9ba3b4;       /* secondary text */
  --magenta: #e3268f;    /* logo extrusion: brand moments and focus */
  --magenta-deep: #9e1262;
  --lightning: #49c2ff;  /* everything playback */
  --ember: #ff5a26;      /* the vortex eye: now playing */
  --line: rgb(232 235 240 / 0.1);

  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --text: "Instrument Sans", system-ui, sans-serif;
  --page: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--storm);
  color: var(--chrome);
  font: 400 1.0625rem/1.65 var(--text);
  overflow-x: hidden;
}
body.has-player { padding-bottom: 120px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lightning); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--chrome); color: var(--storm); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* The logo's look: silver letters with a stepped magenta edge. */
.title-chrome {
  font-family: var(--display);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.005em;
  color: var(--chrome);
  text-shadow:
    0.02em 0.02em 0 var(--magenta), 0.04em 0.04em 0 var(--magenta),
    0.06em 0.06em 0 var(--magenta-deep), 0.08em 0.08em 0 var(--magenta-deep),
    0 0.12em 0.4em rgb(0 0 0 / 0.45);
  text-wrap: balance;
}
.title-chrome a { color: inherit; text-decoration: none; }
.title-chrome a:hover { color: #fff; }

/* Header and footer */
.site-header {
  max-width: var(--page); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: relative; z-index: 2;
}
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--chrome);
  font: 800 1.25rem/1 var(--display); letter-spacing: 0.01em;
}
.brand img { border-radius: 8px; }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { color: var(--mist); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { color: var(--chrome); }
.site-footer {
  max-width: var(--page); margin: 64px auto 0; padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line); color: var(--mist); font-size: 0.875rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
}
.site-footer p { margin: 0; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
}
.button svg { width: 20px; height: 20px; fill: currentColor; }
.button-primary { background: var(--lightning); color: var(--storm); }
.button-primary:hover { background: #7dd3ff; }
.button-ghost { border-color: rgb(232 235 240 / 0.35); color: var(--chrome); }
.button-ghost:hover { border-color: var(--chrome); text-decoration: none; }
.text-link { font-weight: 500; }
.icon-pause { display: none; }
.is-on .icon-play { display: none; }
.is-on .icon-pause { display: block; }
[data-play].is-on { background: var(--ember); border-color: var(--ember); color: var(--storm); }

/* Hero: the show art inside a ring of storm light that spins while audio plays */
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: -64px; padding-top: 64px; }
.hero::before {
  content: ""; position: absolute; inset: -12%; z-index: -2;
  background: var(--art, none) center / cover;
  filter: blur(56px) saturate(1.3) brightness(0.42);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgb(18 22 32 / 0.2) 40%, var(--storm));
}
.hero-inner {
  max-width: var(--page); margin: 0 auto; padding: clamp(32px, 7vw, 88px) var(--gutter) clamp(48px, 8vw, 96px);
  display: grid; grid-template-columns: minmax(220px, 420px) 1fr; gap: clamp(32px, 6vw, 72px); align-items: center;
}
.cover { position: relative; margin: 0; }
.cover img { position: relative; width: 100%; height: auto; border-radius: 20px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.55); }
.cover-ring {
  position: absolute; inset: -16px; border-radius: 32px;
  background: conic-gradient(from var(--angle), var(--magenta), var(--lightning), var(--ember), var(--magenta));
  filter: blur(18px); opacity: 0.45;
  animation: spin 9s linear infinite paused;
  transition: opacity 600ms ease;
}
.is-playing .cover-ring { animation-play-state: running; opacity: 0.9; }
@keyframes spin { to { --angle: 360deg; } }
.lede { font-size: clamp(1.375rem, 2.5vw, 1.875rem); line-height: 1.32; margin: 0; max-width: 30ch; text-wrap: pretty; }
.hosts { color: var(--mist); margin: 16px 0 0; font-size: 1.0625rem; }

.listen { margin-top: 32px; }
.listen-label { margin: 0 0 10px; color: var(--mist); font-size: 0.875rem; }
.listen-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.listen-links a {
  display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1px solid rgb(232 235 240 / 0.16);
  color: var(--chrome); text-decoration: none; font-size: 0.875rem; font-weight: 500;
  background: rgb(18 22 32 / 0.35);
}
.listen-links a:hover { border-color: var(--magenta); }

/* Episodes */
.episodes { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.episodes > h2 { font: 900 clamp(2rem, 4vw, 2.75rem)/1 var(--display); margin: 0 0 28px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; color: var(--mist); font-size: 0.875rem; }
.meta > :first-child { color: var(--chrome); font-weight: 600; }
.summary { color: var(--mist); margin: 12px 0 0; max-width: 60ch; }

.feature {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center;
  padding-bottom: 48px;
}
.feature-thumb { position: relative; display: block; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgb(0 0 0 / 0.45); }
.feature-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.badge {
  position: absolute; right: 12px; bottom: 12px; padding: 2px 8px; border-radius: 6px;
  background: rgb(18 22 32 / 0.85); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.feature h3 { font-size: clamp(2rem, 4.2vw, 3.25rem); margin: 0 0 16px; }

.episode-list { list-style: none; margin: 0; padding: 0; }
.episode-row {
  display: grid; grid-template-columns: 56px 96px 1fr auto; gap: 20px; align-items: center;
  padding: 24px 0; border-top: 1px solid var(--line);
}
.number {
  font: 900 3.25rem/1 var(--display); text-align: center;
  color: transparent; -webkit-text-stroke: 1.5px rgb(232 235 240 / 0.45);
}
.row-art { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; }
.row-body h3 { font: 800 1.625rem/1.05 var(--display); margin: 0 0 8px; text-wrap: balance; }
.row-body h3 a { color: var(--chrome); text-decoration: none; }
.row-body h3 a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--magenta); }
.row-body .summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; }

.play-button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1.5px solid var(--lightning); background: transparent; color: var(--lightning);
  font-weight: 600;
}
.play-button svg { width: 20px; height: 20px; fill: currentColor; }
.play-button:hover { background: rgb(73 194 255 / 0.1); }
.play-button-round { width: 52px; height: 52px; padding: 0; justify-content: center; }
.play-button-round span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.empty { color: var(--mist); font-size: 1.125rem; }

/* Episode page */
.episode-header { max-width: var(--page); margin: 0 auto; padding: 8px var(--gutter) 0; }
.video { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgb(0 0 0 / 0.5); }
.video iframe, .video-facade { width: 100%; height: 100%; border: 0; display: block; }
.video-facade { position: relative; padding: 0; background: #000; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--magenta); box-shadow: 0 0 0 10px rgb(227 38 143 / 0.25), 0 12px 40px rgb(0 0 0 / 0.5);
  transition: transform 160ms ease;
}
.video-play svg { width: 40px; height: 40px; fill: var(--chrome); margin-left: 4px; }
.video-facade:hover .video-play { transform: scale(1.06); }
.episode-heading { margin-top: clamp(28px, 4vw, 44px); }
.episode-heading h1 { font-size: clamp(2.5rem, 6.5vw, 4.75rem); margin: 14px 0 0; max-width: 20ch; }

.episode-layout {
  max-width: var(--page); margin: 56px auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 64px); align-items: start;
}
.notes { max-width: 66ch; overflow-wrap: anywhere; }
.notes > p:first-child { font-size: 1.25rem; line-height: 1.5; margin-top: 0; }
.notes h3 { font: 800 1.5rem/1.1 var(--display); margin: 36px 0 8px; }
.episode-listen { max-width: var(--page); margin: 48px auto 0; padding: 0 var(--gutter); }
.episode-listen .listen { margin: 0; }

.chapters {
  position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--storm-2); border-radius: 18px; padding: 20px 14px 14px;
}
.has-player .chapters { max-height: calc(100vh - 150px); }
.chapters h2 { font: 800 1.5rem/1 var(--display); margin: 0 10px 12px; }
.chapters ol { list-style: none; margin: 0; padding: 0; }
.chapters a {
  display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--chrome); text-decoration: none; font-size: 0.9375rem; line-height: 1.4;
}
.chapters time { color: var(--mist); font-variant-numeric: tabular-nums; font-size: 0.875rem; padding-top: 1px; }
.chapters a:hover { background: rgb(73 194 255 / 0.1); }
.chapters a:hover time { color: var(--lightning); }
.chapters a[aria-current] { background: rgb(255 90 38 / 0.12); }
.chapters a[aria-current] time { color: var(--ember); font-weight: 600; }

.transcript { max-width: var(--page); margin: 56px auto 0; padding: 0 var(--gutter); }
.transcript summary {
  list-style: none; display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font: 800 1.5rem/1 var(--display);
}
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::after {
  content: "+"; margin-left: auto; font: 400 1.75rem/1 var(--text); color: var(--mist); transition: transform 200ms ease;
}
.transcript[open] summary::after { transform: rotate(45deg); }
.transcript-text { max-width: 68ch; padding-top: 12px; color: rgb(232 235 240 / 0.86); }

.pager {
  max-width: var(--page); margin: 56px auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.pager-link {
  display: grid; gap: 6px; padding: 20px 22px; border-radius: 16px; background: var(--storm-2);
  text-decoration: none; color: var(--chrome); border: 1px solid transparent;
}
.pager-link:hover { border-color: var(--magenta); }
.pager-newer { grid-column: 2; text-align: right; }
.pager-label { color: var(--mist); font-size: 0.875rem; }
.pager-title { font: 800 1.375rem/1.1 var(--display); text-wrap: balance; }

.not-found { max-width: var(--page); margin: 0 auto; padding: 96px var(--gutter); }
.not-found h1 { font-size: clamp(3rem, 9vw, 6rem); margin: 0 0 20px; }

/* Sticky player */
.player {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10;
  max-width: 980px; margin: 0 auto;
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 10px 14px 10px 10px; border-radius: 20px;
  background: rgb(28 34 48 / 0.92); border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.5);
}
.player[hidden] { display: none; }
.player-art { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.player-title {
  display: block; color: var(--chrome); text-decoration: none; font-weight: 600; font-size: 0.9375rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-title:hover { text-decoration: underline; }
.player-scrub { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.player-time { color: var(--mist); font-size: 0.75rem; font-variant-numeric: tabular-nums; min-width: 42px; }
.player-time:last-child { text-align: right; }
.player-scrub input {
  flex: 1; height: 4px; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 4px; cursor: pointer;
  background: linear-gradient(to right, var(--lightning) var(--progress, 0%), rgb(232 235 240 / 0.18) var(--progress, 0%));
}
.player-scrub input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--chrome); border: 0;
}
.player-scrub input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--chrome); border: 0; }
.player-controls { display: flex; align-items: center; gap: 4px; }
.icon-button {
  width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent;
  color: var(--chrome);
}
.icon-button:hover { background: rgb(232 235 240 / 0.08); }
.icon-button svg { width: 26px; height: 26px; fill: currentColor; }
.icon-button text { font: 700 6.5px var(--text); fill: currentColor; }
.play-toggle {
  width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--lightning); color: var(--storm); margin: 0 4px;
}
.play-toggle svg { width: 24px; height: 24px; fill: currentColor; }
.play-toggle .icon-pause { display: none; }
.play-toggle.is-on .icon-play { display: none; }
.play-toggle.is-on .icon-pause { display: block; }
.speed {
  min-width: 48px; height: 32px; border: 1px solid var(--line); border-radius: 999px; background: transparent;
  font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--mist);
}
.speed:hover { color: var(--chrome); border-color: rgb(232 235 240 / 0.3); }

/* Small screens */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .cover { max-width: 300px; }
  .feature { grid-template-columns: 1fr; }
  .episode-layout { grid-template-columns: 1fr; }
  .chapters { position: static; max-height: none; }
  .episode-row { grid-template-columns: 72px 1fr auto; gap: 16px; }
  .number { display: none; }
  .row-art { width: 72px; height: 72px; }
}
@media (max-width: 560px) {
  .site-header nav a:last-child { display: none; }
  .episode-row { grid-template-columns: 64px 1fr; }
  .row-art { width: 64px; height: 64px; align-self: start; }
  .episode-row .play-button-round { grid-column: 2; justify-self: start; width: auto; padding: 0 16px; height: 40px; }
  .episode-row .play-button-round span { position: static; width: auto; height: auto; clip-path: none; }
  .row-body h3 { font-size: 1.375rem; }
  .pager { grid-template-columns: 1fr; }
  .pager-newer { grid-column: 1; text-align: left; }
  .player { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; }
  .player-art { width: 44px; height: 44px; }
  .player-time, .speed, .icon-button[data-skip="-15"] { display: none; }
}

@media (max-width: 420px) {
  .site-header nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
