:root {
  color-scheme: dark;
  --tvl-black: #0D0F12;
  --tvl-charcoal: #151A22;
  --tvl-blue-black: #1C2333;
  --tvl-blue: #3B6EA5;
  --tvl-green: #2ECC71;
  --tvl-amber: #C49A3C;
  --tvl-ink: #E7EDF0;
  --tvl-muted: rgba(231, 237, 240, .68);
  --tvl-line: rgba(231, 237, 240, .16);
  --tvl-sans: "Segoe UI", system-ui, sans-serif;
  --tvl-serif: "Georgia", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

.tvl-body {
  background: var(--tvl-black);
  color: var(--tvl-ink);
  font-family: var(--tvl-sans);
}

.tvl-entry,
.tvl-chapter {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 88% 12%, rgba(196, 154, 60, .08), transparent 18rem),
    radial-gradient(circle at 18% 80%, rgba(59, 110, 165, .08), transparent 20rem),
    linear-gradient(180deg, var(--tvl-black), var(--tvl-charcoal) 54%, var(--tvl-blue-black));
}

.tvl-entry {
  padding: clamp(1.5rem, 5vw, 4rem);
}

.tvl-cloud,
.tvl-rain,
.tvl-amber,
.tvl-leds,
.tvl-waveform,
.tvl-chapter-led {
  pointer-events: none;
}

.tvl-cloud {
  position: absolute;
  width: min(58rem, 120vw);
  aspect-ratio: 1.8;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 25% 54%, rgba(41, 51, 65, .52), transparent 55%),
    radial-gradient(ellipse at 62% 42%, rgba(12, 14, 18, .72), transparent 58%),
    radial-gradient(ellipse at 82% 70%, rgba(30, 38, 52, .42), transparent 50%);
  filter: blur(26px);
  opacity: .42;
  z-index: -3;
}

.tvl-cloud-one {
  left: -24rem;
  top: 4vh;
  animation: tvl-cloud-drift-one 90s ease-in-out infinite alternate;
}

.tvl-cloud-two {
  right: -26rem;
  bottom: 1vh;
  opacity: .35;
  animation: tvl-cloud-drift-two 110s ease-in-out infinite alternate;
}

.tvl-rain {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    repeating-linear-gradient(112deg, transparent 0 15px, rgba(255, 255, 255, .05) 16px, transparent 17px),
    repeating-linear-gradient(165deg, transparent 0 34px, rgba(59, 110, 165, .04) 35px, transparent 36px);
  opacity: .22;
  animation: tvl-rain-fall 18s linear infinite;
}

.tvl-amber {
  position: absolute;
  right: -12rem;
  bottom: -10rem;
  width: min(34rem, 86vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 154, 60, .16), rgba(196, 154, 60, .035) 42%, transparent 70%);
  filter: blur(12px);
  z-index: -1;
}

.tvl-leds {
  position: absolute;
  inset: 10% 7%;
  z-index: 1;
}

.tvl-leds span,
.tvl-chapter-led {
  position: absolute;
  width: .45rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--tvl-green);
  box-shadow: 0 0 16px rgba(46, 204, 113, .68);
  opacity: .24;
  animation: tvl-led-blink 5.7s infinite;
}

.tvl-leds span:nth-child(1) { left: 8%; top: 14%; animation-delay: -.7s; }
.tvl-leds span:nth-child(2) { left: 24%; top: 78%; animation-delay: -3.1s; }
.tvl-leds span:nth-child(3) { left: 35%; top: 26%; animation-delay: -1.8s; }
.tvl-leds span:nth-child(4) { left: 48%; top: 64%; animation-delay: -4.6s; }
.tvl-leds span:nth-child(5) { left: 58%; top: 18%; animation-delay: -2.2s; }
.tvl-leds span:nth-child(6) { left: 69%; top: 82%; animation-delay: -5.3s; }
.tvl-leds span:nth-child(7) { left: 78%; top: 33%; animation-delay: -1.1s; }
.tvl-leds span:nth-child(8) { left: 87%; top: 58%; animation-delay: -3.8s; }
.tvl-leds span:nth-child(9) { left: 14%; top: 48%; animation-delay: -4.9s; }
.tvl-leds span:nth-child(10) { left: 92%; top: 18%; animation-delay: -2.9s; }

.tvl-waveform {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vh, 3.5rem);
  width: min(38rem, calc(100vw - 2rem));
  height: clamp(3.4rem, 7vh, 4.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.32rem, 1.2vw, .7rem);
  transform: translateX(-50%);
  opacity: .38;
}

.tvl-waveform span {
  width: clamp(.22rem, .7vw, .42rem);
  height: 32%;
  border-radius: 999px;
  background: var(--tvl-blue);
  box-shadow: 0 0 18px rgba(59, 110, 165, .35);
  animation: tvl-wave-rise 3.8s ease-in-out infinite;
}

.tvl-waveform span:nth-child(2) { height: 58%; animation-delay: -.7s; }
.tvl-waveform span:nth-child(3) { height: 26%; animation-delay: -1.9s; }
.tvl-waveform span:nth-child(4) { height: 76%; animation-delay: -1.1s; }
.tvl-waveform span:nth-child(5) { height: 44%; animation-delay: -2.7s; }
.tvl-waveform span:nth-child(6) { height: 88%; animation-delay: -1.4s; }
.tvl-waveform span:nth-child(7) { height: 38%; animation-delay: -3.2s; }
.tvl-waveform span:nth-child(8) { height: 66%; animation-delay: -.4s; }
.tvl-waveform span:nth-child(9) { height: 30%; animation-delay: -2.1s; }
.tvl-waveform span:nth-child(10) { height: 72%; animation-delay: -3.5s; }
.tvl-waveform span:nth-child(11) { height: 42%; animation-delay: -1.6s; }

.tvl-entry-copy,
.tvl-chapter-copy {
  position: relative;
  z-index: 2;
  width: min(52rem, 100%);
  text-align: center;
}

.tvl-kicker,
.tvl-meta,
.tvl-status,
.tvl-chapter-label,
.tvl-chapter-date {
  margin: 0;
  color: var(--tvl-muted);
  font-size: clamp(.78rem, 1.8vw, .92rem);
  letter-spacing: .18em;
}

.tvl-kicker {
  color: rgba(196, 154, 60, .82);
  text-transform: uppercase;
}

.tvl-chapter-label {
  text-transform: uppercase;
}

.tvl-title {
  margin: clamp(.85rem, 2.4vw, 1.35rem) auto;
  font-family: var(--tvl-serif);
  font-size: clamp(3.8rem, 10vw, 7.35rem);
  font-weight: 400;
  line-height: .84;
  letter-spacing: 0;
}

.tvl-title span {
  display: block;
  opacity: 0;
  transform: translateY(.55rem);
  animation: tvl-title-reveal .9s ease forwards;
}

.tvl-title span:nth-child(2) {
  animation-delay: .72s;
}

.tvl-title span:nth-child(3) {
  animation-delay: 1.42s;
}

.tvl-subtitle {
  max-width: 35rem;
  margin: 0 auto clamp(.75rem, 2vw, 1.05rem);
  color: rgba(231, 237, 240, .84);
  font-family: var(--tvl-serif);
  font-size: clamp(1.25rem, 3.4vw, 2rem);
  line-height: 1.35;
}

.tvl-status {
  margin-top: .32rem;
}

.tvl-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  margin-top: clamp(1.05rem, 2.8vw, 1.55rem);
}

.tvl-button,
.tvl-link,
.tvl-chapter-back {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.15rem;
  border-radius: 0;
  color: var(--tvl-ink);
  text-decoration: none;
  font-weight: 600;
}

.tvl-button {
  border: 1px solid rgba(46, 204, 113, .38);
  background: rgba(46, 204, 113, .12);
  box-shadow: 0 0 28px rgba(46, 204, 113, .12);
}

.tvl-link,
.tvl-chapter-back {
  border: 1px solid transparent;
  color: var(--tvl-muted);
}

.tvl-button:focus-visible,
.tvl-link:focus-visible,
.tvl-chapter-back:focus-visible {
  outline: 3px solid var(--tvl-green);
  outline-offset: 4px;
}

.tvl-leaving {
  animation: tvl-page-leave .52s ease forwards;
}

.tvl-chapter {
  padding: clamp(1.25rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 15% 86%, rgba(46, 204, 113, .035), transparent 14rem),
    radial-gradient(circle at 88% 18%, rgba(196, 154, 60, .055), transparent 18rem),
    linear-gradient(180deg, var(--tvl-black), var(--tvl-charcoal) 58%, var(--tvl-blue-black));
}

.tvl-chapter-copy {
  width: min(44rem, 100%);
}

.tvl-chapter-title {
  margin: .9rem 0;
  font-family: var(--tvl-serif);
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  font-weight: 400;
  line-height: .96;
  letter-spacing: 0;
}

.tvl-chapter-note {
  margin: clamp(1.4rem, 4vw, 2rem) 0;
  color: rgba(231, 237, 240, .76);
  font-family: var(--tvl-serif);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.tvl-chapter-back {
  margin-top: .35rem;
}

.tvl-chapter-led {
  left: clamp(1rem, 4vw, 2rem);
  bottom: clamp(1rem, 4vw, 2rem);
  width: .58rem;
  opacity: .5;
  animation-duration: 4.8s;
}

@keyframes tvl-cloud-drift-one {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(12vw, 2vh, 0) scale(1.08); }
}

@keyframes tvl-cloud-drift-two {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-10vw, -2vh, 0) scale(1.05); }
}

@keyframes tvl-rain-fall {
  from { transform: translateY(-3rem); }
  to { transform: translateY(3rem); }
}

@keyframes tvl-led-blink {
  0%, 16%, 100% { opacity: .2; }
  18%, 28% { opacity: 1; }
  31% { opacity: .38; }
}

@keyframes tvl-wave-rise {
  0%, 100% { transform: scaleY(.72); opacity: .28; }
  42% { transform: scaleY(1.22); opacity: .62; }
  68% { transform: scaleY(.88); opacity: .42; }
}

@keyframes tvl-title-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tvl-page-leave {
  to {
    opacity: 0;
    filter: blur(8px);
  }
}

@media (max-width: 620px) {
  .tvl-entry {
    align-items: center;
    padding: 1.25rem;
  }

  .tvl-title {
    font-size: clamp(3.45rem, 18vw, 5.2rem);
  }

  .tvl-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tvl-button,
  .tvl-link,
  .tvl-chapter-back {
    width: 100%;
  }

  .tvl-waveform {
    bottom: 1.2rem;
    height: 3.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .tvl-cloud,
  .tvl-rain,
  .tvl-leds span,
  .tvl-waveform span,
  .tvl-chapter-led,
  .tvl-title span,
  .tvl-leaving {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .tvl-rain {
    display: none;
  }
}
