/* ==========================================================================
   Episome - launch website
   Every value here is taken from the app's own design system
   (src/theme/tokens.js, src/theme/episodeTypes.js, DESIGN.md), so the page and
   the product are the same room: wine walls, cream ink, serif titles,
   condensed numbers, and the six episode colours as the only colours that
   mean something.
   ========================================================================== */

/* --- Fonts: the app's three voices, self-hosted Latin subsets ------------- */
@font-face {
  font-family: 'DM Serif Display';
  src: url('/fonts/DMSerifDisplay-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Serif Display';
  src: url('/fonts/DMSerifDisplay-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-variable.woff2') format('woff2');
  font-weight: 100 900; /* one variable file covers every weight */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bebas Neue';
  src: url('/fonts/BebasNeue-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* The dark room (DARK_PALETTE). The site is dark first, like the app. */
  --room: #250810;
  --surface: #360b13;
  --surface-raised: #4a1520;
  --poster-shade: #1a040a;
  --hairline: rgba(255, 228, 228, 0.1);
  --border: rgba(255, 228, 228, 0.22);
  --text: #f7ebe7;
  --text-secondary: #d8b9b9;
  --text-faint: #b08e8e;
  --accent: #e9a3b0;
  --accent-fill: #7e2438;
  --on-color: #fbf3ee;

  /* The paper (LIGHT_PALETTE), used for the one light section. */
  --paper: #efe3d9;
  --paper-surface: #faf3ec;
  --ink: #33101a;
  --ink-secondary: #5e3a3f;
  --wine: #6d1e2e;

  /* Type */
  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --marquee: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;

  /* Space (the app's scale: xs 4, sm 8, md 16, lg 24, xl 36, xxl 56) */
  --xs: 4px;
  --sm: 8px;
  --md: 16px;
  --lg: 24px;
  --xl: 36px;
  --xxl: 56px;
  --section: clamp(88px, 14vw, 168px); /* the gap between chapters */
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1180px;

  /* Shape (radius.small, card, poster, pill) */
  --r-small: 10px;
  --r-card: 18px;
  --r-poster: 22px;
  --r-pill: 999px;

  /* The six episode types, five shades each (lightest = lowest score). */
  --routine-0: #d6d1c7; --routine-1: #b8b2a7; --routine-2: #9a9287; --routine-3: #7b7469; --routine-4: #5b564d;
  --chaos-0: #efc7a4; --chaos-1: #d9925a; --chaos-2: #c25e1c; --chaos-3: #984a16; --chaos-4: #6e3610;
  --celebration-0: #e8d093; --celebration-1: #d3b054; --celebration-2: #be9114; --celebration-3: #957211; --celebration-4: #6c530c;
  --first-0: #c0d6b0; --first-1: #91b47e; --first-2: #62924b; --first-3: #4c7239; --first-4: #375228;
  --pause-0: #b5d2dc; --pause-1: #7faebe; --pause-2: #4a8aa0; --pause-3: #396c7d; --pause-4: #294e5b;
  --romantic-0: #efc9d6; --romantic-1: #da98af; --romantic-2: #c4678a; --romantic-3: #9c5270; --romantic-4: #743c53;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --- Base ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* anchors land below the sticky nav */
}

body {
  margin: 0;
  background: var(--room);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; /* a decorative element may never create sideways scroll */
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

/* Keyboard focus is always visible, in the accent tone. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--md);
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--on-color);
  color: var(--room);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: var(--md);
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* --- Shared type ------------------------------------------------------------ */
/* Kickers: small, tracked capitals in Inter SemiBold, like type.kicker. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker--wine {
  color: var(--wine);
}
.ico-inline {
  width: 14px;
  height: 14px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  color: var(--on-color);
  text-decoration: none;
}

.chapter-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-top: var(--md);
  text-wrap: balance;
}

.chapter-lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 34em;
}

/* "Coming soon": a label, never a link or a button. */
.soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}
.soon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.soon-pill {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  background: var(--accent-fill);
  color: var(--on-color);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* --- Nav -------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(37, 8, 16, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lg);
  min-height: 68px;
}
/* The right end of the nav: the language switch and "Coming soon". */
.nav-end {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
}
.lang-switch:hover {
  color: var(--text);
  background: rgba(255, 228, 228, 0.06);
}
.nav-links {
  display: none; /* shown from tablet up; on a phone the page itself is the menu */
  gap: 4px;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current='location'] {
  color: var(--text);
  background: rgba(255, 228, 228, 0.06);
}
@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
}

/* --- Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 96px) 0 clamp(72px, 10vw, 140px);
}
/* The light the app draws behind a poster with no photo, at room scale. */
.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120%;
  background:
    radial-gradient(ellipse 50% 45% at 72% 38%, rgba(98, 146, 75, 0.2), transparent 70%),
    radial-gradient(ellipse 60% 55% at 20% 10%, rgba(120, 96, 92, 0.28), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  gap: clamp(48px, 6vw, 80px);
  align-items: center;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 116px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-top: var(--lg);
  text-wrap: balance;
}
/* Turkish words are longer: a little smaller, so the line sets in two. */
:lang(tr) .hero-title {
  font-size: clamp(48px, 8vw, 100px);
}
.hero-lede {
  margin-top: var(--lg);
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 30em;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--md) var(--lg);
  margin-top: var(--xl);
}
.hero-note {
  font-size: 14px;
  color: var(--text-faint);
  max-width: 22em;
}
.hero-visual {
  display: flex;
  justify-content: center;
}
@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
  .hero-visual {
    justify-content: flex-end;
  }
}

/* --- Phone frame: a plain device, no brand ----------------------------------- */
.phone {
  position: relative;
  width: min(100%, 340px);
  padding: 10px;
  border-radius: 48px;
  background: #12030a;
  border: 1px solid rgba(255, 228, 228, 0.14);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
}
.phone--hero {
  width: min(100%, 360px);
}
.screen {
  position: relative;
  aspect-ratio: 390 / 844;
  border-radius: 38px;
  overflow: hidden;
  background: var(--room);
  container-type: inline-size;
}
/* Inside a screen, 1em is 16 app points at the 390pt design width. */
.screen > * {
  font-size: calc(100cqw / 24.375);
  font-family: var(--sans);
  line-height: 1.45;
  color: var(--text);
  height: 100%;
}
.s-ico {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}
.s-ico--dim {
  color: var(--text-secondary);
  width: 1.1em;
  height: 1.1em;
}

/* A poster with no photo: dark, lit in the episode's colour (AmbientPoster). */
.s-poster {
  --c: #7b6f69;
  position: relative;
  height: 66%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.4em 1.5em 1.5em;
  background:
    linear-gradient(to bottom, rgba(26, 4, 10, 0.1) 0%, rgba(26, 4, 10, 0.2) 45%, var(--room) 100%),
    radial-gradient(ellipse 75% 55% at 32% 30%, color-mix(in srgb, var(--c) 62%, transparent), transparent 75%),
    var(--poster-shade);
}
.s-poster--first { --c: var(--first-2); }
.s-poster--romantic { --c: var(--romantic-2); }
.s-poster--celebration { --c: var(--celebration-2); }
.s-poster--short {
  height: 42%;
}
.phone--shared .s-poster--short {
  height: 50%;
}
.s-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.s-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--serif);
  font-size: 1.6em;
  line-height: 1;
  color: var(--on-color);
}
.s-wordmark--small {
  font-size: 1.15em;
}
.s-glassbtns {
  display: flex;
  gap: 0.5em;
}
.s-glassbtn {
  display: grid;
  place-items: center;
  width: 2.75em;
  height: 2.75em;
  border-radius: 50%;
  border: 1px solid rgba(255, 233, 233, 0.22);
  background: rgba(40, 9, 16, 0.4);
  color: var(--on-color);
}
.s-hero-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}
.s-kicker {
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 243, 238, 0.82);
}
.s-glass {
  padding: 1.1em 1.25em 1.25em;
  border-radius: 1.125em;
  border: 1px solid rgba(255, 233, 233, 0.16);
  background: rgba(40, 9, 16, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.s-date {
  font-size: 0.85em;
  color: var(--text-secondary);
}
.s-title {
  font-family: var(--serif);
  font-size: 1.75em;
  line-height: 1.12;
  color: var(--on-color);
  margin-top: 0.15em;
}
.s-title--big {
  font-size: 2.1em;
  line-height: 1.08;
}
.s-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35em;
  margin-top: 0.55em;
  font-size: 0.8em;
  color: var(--text-secondary);
}
.s-dotsep {
  color: var(--text-faint);
}
.s-swatch {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
}
.s-swatch--lg {
  width: 1.2em;
  height: 1.2em;
}
.s-buttons {
  display: flex;
  gap: 0.6em;
  margin-top: 1em;
}
.s-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  min-height: 2.9em;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
}
.s-btn .s-ico {
  width: 1.1em;
  height: 1.1em;
}
.s-btn--primary {
  background: var(--accent-fill);
  color: var(--on-color);
}
.s-btn--glass {
  border: 1px solid rgba(255, 233, 233, 0.22);
  background: rgba(255, 233, 233, 0.08);
  color: var(--on-color);
}
.s-body {
  padding: 0.6em 1.5em 1.5em;
}
.s-section {
  display: flex;
  align-items: center;
  gap: 0.55em;
  margin: 1.2em 0 0.7em;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.s-section .s-ico {
  width: 1.4em;
  height: 1.4em;
  color: var(--text-faint);
}
.s-rail {
  display: flex;
  gap: 0.75em;
  margin-right: -1.5em;
}
.s-tile {
  flex: 0 0 38%;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  padding: 0.7em;
  border-radius: 1.2em;
  background:
    linear-gradient(to bottom, transparent 40%, rgba(26, 4, 10, 0.85)),
    radial-gradient(ellipse 90% 70% at 35% 30%, color-mix(in srgb, var(--c) 80%, transparent), transparent 80%),
    var(--poster-shade);
}
.s-tile-title {
  font-family: var(--serif);
  font-size: 0.95em;
  line-height: 1.15;
  color: var(--on-color);
}
.s-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}
.s-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 2.5em;
  padding: 0 1em;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85em;
}
.s-chip--glass {
  background: rgba(255, 233, 233, 0.1);
  border-color: rgba(255, 233, 233, 0.2);
  color: var(--on-color);
}
.s-card {
  border-radius: 1.125em;
  border: 1px solid rgba(233, 163, 176, 0.14);
  background: var(--surface);
}
.s-scores {
  padding: 0.3em 1.1em;
}
.s-score {
  display: grid;
  grid-template-columns: 5.6em 1fr 1.6em;
  align-items: center;
  gap: 0.6em;
  padding: 0.7em 0;
}
.s-score + .s-score {
  border-top: 1px solid var(--hairline);
}
.s-score-label {
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
/* Eleven bars, 0 to 10. Bars below the value are lit, the value itself in the accent. */
.s-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.22em;
  height: 1.8em;
}
.s-bars i {
  flex: 1;
  border-radius: 0.2em;
  background: rgba(233, 163, 176, 0.2);
}
.s-bars i:nth-child(1) { height: 25%; }
.s-bars i:nth-child(2) { height: 32%; }
.s-bars i:nth-child(3) { height: 40%; }
.s-bars i:nth-child(4) { height: 47%; }
.s-bars i:nth-child(5) { height: 55%; }
.s-bars i:nth-child(6) { height: 62%; }
.s-bars i:nth-child(7) { height: 70%; }
.s-bars i:nth-child(8) { height: 77%; }
.s-bars i:nth-child(9) { height: 85%; }
.s-bars i:nth-child(10) { height: 92%; }
.s-bars i:nth-child(11) { height: 100%; }
.s-bars[data-v='6'] i:nth-child(-n + 6),
.s-bars[data-v='9'] i:nth-child(-n + 9),
.s-bars[data-v='10'] i:nth-child(-n + 10) {
  background: rgba(251, 243, 238, 0.78);
}
.s-bars[data-v='6'] i:nth-child(7),
.s-bars[data-v='9'] i:nth-child(10),
.s-bars[data-v='10'] i:nth-child(11) {
  background: var(--accent);
}
.s-score-num {
  font-family: var(--marquee);
  font-size: 1.7em;
  line-height: 1;
  text-align: right;
  color: var(--on-color);
}
.s-line {
  padding: 1em 1.2em;
}
.s-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2em;
  line-height: 1.35;
  color: var(--on-color);
}
.s-quote--small {
  font-size: 1.05em;
}
.s-source {
  margin-top: 0.4em;
  font-size: 0.8em;
  color: var(--text-faint);
}
.s-voice {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin-top: 0.7em;
  padding: 0.8em 1.1em;
}
.s-voice-btn {
  display: grid;
  place-items: center;
  width: 2.6em;
  height: 2.6em;
  border-radius: 50%;
  background: var(--accent-fill);
  color: var(--on-color);
}
.s-voice-btn .s-ico {
  width: 1em;
  height: 1em;
}
.s-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.2em;
  height: 1.6em;
}
.s-wave i {
  flex: 1;
  border-radius: 0.2em;
  background: rgba(233, 163, 176, 0.5);
  height: 40%;
}
.s-wave i:nth-child(3n) { height: 85%; }
.s-wave i:nth-child(4n + 1) { height: 60%; }
.s-wave i:nth-child(5n + 2) { height: 100%; }
.s-voice-time {
  font-family: var(--marquee);
  font-size: 1.2em;
  color: var(--text-secondary);
}
.s-scene {
  padding: 1em 0;
  border-bottom: 1px solid var(--hairline);
}
.s-scene-head {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.5em;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.s-avatar {
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--on-color);
  font-size: 1.1em;
  letter-spacing: 0;
}
.s-avatar--me {
  background: var(--accent-fill);
}
.s-scene-text {
  font-size: 0.95em;
  color: var(--text);
}

/* --- Chapters --------------------------------------------------------------- */
.chapter {
  padding: var(--section) 0;
  border-top: 1px solid var(--hairline);
}
.chapter-head {
  margin-bottom: clamp(48px, 7vw, 88px);
}
.chapter-head--split {
  display: grid;
  gap: var(--lg);
  align-items: end;
}
@media (min-width: 900px) {
  .chapter-head--split {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--xxl);
  }
}

/* "Every day gets a title. / A genre. / A cast." - one line each, fading back. */
.rhythm {
  display: flex;
  flex-direction: column;
  margin-top: var(--md);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.rhythm span {
  text-wrap: balance; /* no single word left alone on a line */
}
.rhythm span:nth-child(2) { color: var(--text-secondary); }
.rhythm span:nth-child(3) { color: var(--text-faint); }
.rhythm-last {
  margin-top: 0.3em;
  font-style: italic;
  color: var(--accent);
  font-size: 0.72em;
  line-height: 1.15;
  max-width: 16em;
}

.note h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: var(--text);
}
.note p {
  margin-top: 8px;
  color: var(--text-secondary);
  max-width: 30em;
}
.aside {
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: var(--lg);
  border-top: 1px solid var(--hairline);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--text-secondary);
  max-width: 34em;
}

/* --- Episodes --------------------------------------------------------------- */
.episode-layout {
  display: grid;
  gap: var(--xxl);
  align-items: start;
}
.phone--day {
  justify-self: center;
}
.episode-notes {
  display: grid;
  gap: var(--xl);
}
@media (min-width: 700px) {
  .episode-notes {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1000px) {
  .episode-layout {
    grid-template-columns: 340px 1fr;
    gap: clamp(56px, 7vw, 110px);
  }
  .phone--day {
    position: sticky;
    top: 100px;
  }
}
.genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
/* "Your own": the premium custom genres, drawn as an open slot beside the six. */
.genre-chips .genre-own {
  border-style: dashed;
  color: var(--text-secondary);
}
.swatch--own {
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px dashed var(--border);
  font-size: 12px;
  line-height: 1;
}
.genre-chips li,
.key-genres li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--text);
}
.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- Archive ---------------------------------------------------------------- */
.archive-layout {
  display: grid;
  gap: var(--xxl);
  align-items: start;
}
@media (min-width: 1000px) {
  .archive-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(56px, 6vw, 96px);
  }
}
.archive-board {
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-poster);
  background: #2a0a12;
  border: 1px solid var(--hairline);
}
.board-head {
  margin-bottom: var(--lg);
  padding-bottom: var(--md);
  border-bottom: 1px solid var(--hairline);
}
.board-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.board-title {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  margin-top: 4px;
}
.board-meta {
  font-size: 15px;
  color: var(--text-secondary);
}
/* Five columns, like the app: seven would read as a week. */
.squares {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 10px);
}
.sq {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-small);
  background: var(--c);
  overflow: hidden;
}
/* The genre mark, bottom right, in a small dark circle. */
.sq b {
  position: absolute;
  right: 7%;
  bottom: 7%;
  display: grid;
  place-items: center;
  width: 26%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(26, 4, 10, 0.55);
  color: var(--on-color);
  font-size: clamp(8px, 1.2vw, 12px);
  font-weight: 400;
  line-height: 1;
  z-index: 2;
}
/* A photo day: the photo fills the square, an inner frame in the day's colour. */
.sq--photo {
  background: var(--poster-shade);
}
.sq--photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: clamp(3px, 0.45vw, 5px) solid var(--c);
  z-index: 1;
}
.sq--lg {
  width: clamp(88px, 22vw, 120px);
  border-radius: 14px;
}
/* Photo stand-ins. These are drawn, not photographed: swap in real photos. */
.photo {
  position: absolute;
  inset: 0;
}
.photo--dusk {
  background:
    radial-gradient(circle at 70% 62%, rgba(255, 214, 170, 0.95) 0 7%, transparent 8%),
    linear-gradient(to bottom, #2c1a3d 0%, #8a4a63 42%, #e39a78 62%, #3b2230 63%, #1b0f19 100%);
}
.photo--sea {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 250, 230, 0.9) 0 6%, transparent 7%),
    linear-gradient(to bottom, #9cc8d8 0%, #d8ecef 48%, #3f7d91 50%, #214f63 100%);
}
.photo--warm {
  background:
    radial-gradient(circle at 60% 40%, rgba(255, 220, 150, 0.9) 0 10%, transparent 30%),
    radial-gradient(circle at 25% 70%, rgba(255, 180, 120, 0.7) 0 6%, transparent 20%),
    linear-gradient(135deg, #7a4020, #b86b32 55%, #4a2412);
}
.archive-key {
  display: grid;
  gap: var(--xl);
}
.key-kicker {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.2;
  margin-bottom: 14px;
}
.key-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.glyph {
  color: var(--text-faint);
  font-size: 12px;
}
.key-note {
  margin-top: 14px;
  color: var(--text-secondary);
  max-width: 30em;
}
.depth {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-width: 420px;
}
.depth span {
  aspect-ratio: 1;
  border-radius: var(--r-small);
}
.depth-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-width: 420px;
  margin-top: 8px;
  font-family: var(--marquee);
  font-size: 18px;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--text-faint);
}
.frame-demo {
  display: flex;
  align-items: center;
  gap: var(--md);
}
.frame-arrow {
  font-size: 22px;
  color: var(--text-faint);
}

/* --- Seasons ---------------------------------------------------------------- */
/* The recap scenes sit in a row that scrolls sideways inside itself on
   narrow screens - never the page. */
.recap-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(264px, 1fr);
  gap: var(--md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) var(--md);
  scroll-padding: 0 var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: var(--surface-raised) transparent;
}
.recap {
  scroll-snap-align: start;
  position: relative;
  aspect-ratio: 9 / 16;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 22px;
  border-radius: var(--r-poster);
  border: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 80% 45% at 30% 30%, rgba(120, 96, 92, 0.42), transparent 75%),
    linear-gradient(to bottom, #2a1216, var(--poster-shade));
  overflow: hidden;
}
.recap--poster {
  background:
    linear-gradient(to bottom, rgba(26, 4, 10, 0) 30%, rgba(26, 4, 10, 0.9) 78%),
    radial-gradient(ellipse 90% 60% at 40% 30%, rgba(74, 138, 160, 0.85), transparent 80%),
    var(--poster-shade);
}
.recap-progress {
  display: flex;
  gap: 4px;
}
.recap-progress i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(251, 243, 238, 0.22);
}
.recap-progress i.on {
  background: var(--on-color);
}
.recap-top {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-color);
}
.recap-body {
  margin-top: auto;
}
.recap-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.recap-code {
  font-family: var(--marquee);
  font-size: 84px;
  line-height: 0.9;
  margin-top: 8px;
  color: var(--on-color);
}
.recap-title {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
  margin-top: 8px;
  color: var(--on-color);
}
.recap-dates {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}
.recap-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 8px;
  margin: 18px 0 0;
}
.recap-stats div {
  display: flex;
  flex-direction: column-reverse;
}
.recap-stats dd {
  margin: 0;
  font-family: var(--marquee);
  font-size: 34px;
  line-height: 1;
  color: var(--on-color);
}
.recap-stats dt {
  white-space: nowrap;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.pulse {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  height: 230px;
}
.pulse-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 6px;
}
.pulse-meter {
  width: 100%;
  height: calc(var(--h) * 150px);
  border-radius: 10px;
  background: linear-gradient(to top, var(--accent-fill), var(--accent));
  transform-origin: bottom;
}
.pulse-num {
  font-family: var(--marquee);
  font-size: 30px;
  line-height: 1;
  color: var(--on-color);
}
.pulse-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.genre-bar,
.card-bar {
  display: flex;
  gap: 3px;
  height: 14px;
  margin-top: 18px;
}
.genre-bar span,
.card-bar span {
  border-radius: 3px;
}
.cast-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.cast-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-raised);
  font-family: var(--serif);
  font-size: 18px;
  color: var(--on-color);
}
.cast-name {
  flex: 1;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--on-color);
}
.cast-count {
  font-family: var(--marquee);
  font-size: 26px;
  color: var(--text-secondary);
}
.recap-score {
  margin-top: 12px;
  font-family: var(--marquee);
  font-size: 64px;
  line-height: 0.9;
  color: var(--on-color);
}
.recap-score span {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.season-notes {
  display: grid;
  gap: var(--xl);
  margin-top: clamp(48px, 6vw, 72px);
}
@media (min-width: 800px) {
  .season-notes {
    grid-template-columns: 1fr 1fr;
    gap: var(--xxl);
  }
}
@media (min-width: 1200px) {
  .recap-strip {
    grid-auto-columns: 1fr;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}

/* --- Together --------------------------------------------------------------- */
.together-layout {
  display: grid;
  gap: var(--xxl);
  align-items: center;
}
.together-copy .chapter-lede {
  margin-top: var(--lg);
}
.points {
  display: grid;
  gap: var(--lg);
  margin-top: var(--xl);
  max-width: 36em;
}
.points li {
  padding-left: 20px;
  border-left: 2px solid var(--accent-fill);
  color: var(--text-secondary);
}
.points strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 4px;
}
.phone--shared {
  justify-self: center;
}
@media (min-width: 1000px) {
  .together-layout {
    grid-template-columns: 1fr 340px;
    gap: clamp(56px, 8vw, 120px);
  }
}

/* --- Share (the one light chapter: the paper, in wine ink) ------------------- */
.chapter--paper {
  background: var(--paper);
  color: var(--ink);
  border-top: 0;
}
.chapter--paper .chapter-title {
  color: var(--ink);
}
.chapter--paper .chapter-lede {
  color: var(--ink-secondary);
}
.chapter--paper :focus-visible {
  outline-color: var(--wine);
}
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(20px, 3vw, 40px);
}
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card figcaption {
  font-size: 14px;
  color: var(--ink-secondary);
  text-align: center;
}
.card figcaption strong {
  color: var(--ink);
  font-weight: 600;
}
.card--story { width: min(100%, 260px); }
.card--post { width: min(100%, 300px); }
.card--square { width: min(100%, 300px); }
.card-art {
  --c: var(--routine-2);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: 14px;
  overflow: hidden;
  color: var(--on-color);
  box-shadow: 0 30px 60px -30px rgba(51, 16, 26, 0.55);
  container-type: inline-size;
}
.card--story .card-art { aspect-ratio: 9 / 16; }
.card--post .card-art { aspect-ratio: 4 / 5; }
.card--square .card-art { aspect-ratio: 1; }
/* Poster: a picture (here the episode's own glow) framed in the episode colour. */
.card-art--poster {
  justify-content: flex-end;
  background:
    linear-gradient(to bottom, rgba(26, 4, 10, 0.35), rgba(26, 4, 10, 0) 30%, rgba(26, 4, 10, 0.96) 85%),
    radial-gradient(ellipse 90% 60% at 40% 32%, color-mix(in srgb, var(--c) 90%, transparent), transparent 80%),
    var(--poster-shade);
  border: 8px solid var(--c);
}
/* Episode: the editorial title card. Type first. */
.card-art--editorial {
  background:
    radial-gradient(ellipse 80% 50% at 80% 0%, color-mix(in srgb, var(--c) 35%, transparent), transparent 80%),
    var(--poster-shade);
  padding-top: 30px;
}
.card-band {
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--c);
}
.card-art--recap {
  justify-content: flex-end;
  background:
    radial-gradient(ellipse 80% 50% at 25% 20%, rgba(120, 96, 92, 0.4), transparent 75%),
    var(--poster-shade);
}
.card-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.card-art--poster .card-kicker { color: var(--pause-0); }
.card-kicker--type { color: var(--first-1); }
.card-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.card-title {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.08;
}
.card-title--xl {
  font-size: clamp(26px, 12cqw, 36px);
  margin-top: 14px;
}
.card-score {
  font-family: var(--marquee);
  font-size: 44px;
  line-height: 0.9;
}
.card-quote {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--text-secondary);
}
.card-meta {
  margin-top: auto;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.card-code {
  font-family: var(--marquee);
  font-size: 72px;
  line-height: 0.9;
  margin-top: 6px;
}
.card-sign {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(251, 243, 238, 0.16);
  font-size: 11px;
  color: var(--text-secondary);
}
.card-sign span:first-child {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--on-color);
}
.share-notes {
  display: grid;
  gap: var(--xl);
  margin-top: clamp(56px, 7vw, 88px);
}
@media (min-width: 800px) {
  .share-notes {
    grid-template-columns: repeat(3, 1fr);
  }
}
.note--paper h3 { color: var(--ink); }
.note--paper p { color: var(--ink-secondary); }

/* --- Premium ---------------------------------------------------------------- */
.premium-layout {
  display: grid;
  gap: var(--xxl);
}
@media (min-width: 1000px) {
  .premium-layout {
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(56px, 7vw, 110px);
    align-items: start;
  }
  .premium-head {
    position: sticky;
    top: 110px;
  }
}
.premium-head .chapter-lede {
  margin-top: var(--lg);
}
.premium-status {
  margin-top: var(--lg);
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 30em;
}
.perks {
  display: grid;
}
.perk {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}
.perk:first-child {
  padding-top: 0;
}
.perk-ico {
  width: 26px;
  height: 26px;
  margin-top: 3px;
  color: var(--accent);
}
.perk h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
}
.perk p {
  margin-top: 6px;
  color: var(--text-secondary);
}

/* --- Finale ----------------------------------------------------------------- */
.finale {
  position: relative;
  overflow: hidden;
  padding: calc(var(--section) * 1.1) 0;
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.finale-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 55% at 50% 45%, rgba(126, 36, 56, 0.45), transparent 75%);
  pointer-events: none;
}
.finale-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.finale-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 120px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: var(--lg);
}
.finale-lede {
  margin-top: var(--lg);
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--text-secondary);
  max-width: 28em;
}
.finale-inner .soon-pill {
  margin-top: var(--xl);
}
.finale-tag {
  margin-top: var(--lg);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

/* --- Footer ----------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--hairline);
  background: var(--poster-shade);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--md) var(--xl);
  padding-top: var(--xl);
  padding-bottom: calc(var(--xl) + env(safe-area-inset-bottom));
}
.wordmark--footer {
  font-size: 24px;
}
/* The app icon beside the name, with the corner rounding a phone gives it. */
.wordmark-logo {
  flex-shrink: 0;
  border-radius: 22%;
  box-shadow: 0 0 0 1px rgba(251, 248, 241, 0.14);
}
.footer-links {
  display: flex;
  gap: 4px;
}
.footer-links a,
.credit a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 14px;
  color: var(--text-secondary);
  text-underline-offset: 4px;
}
.footer-links a:hover,
.credit a:hover {
  color: var(--text);
}

/* --- Simple pages (privacy, terms, 404) ------------------------------------- */
.page {
  min-height: 70vh;
  padding: clamp(64px, 12vw, 140px) 0;
}
.page-inner {
  max-width: 44em;
}
.page .chapter-lede {
  margin-top: var(--lg);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: var(--xl);
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 4px;
}

/* --- Motion ----------------------------------------------------------------- */
/* Only when JavaScript is running (it adds .js) and only when the visitor has
   not asked for less motion. Without either, everything is simply there. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
  /* Archive squares arrive one by one, the way a season fills in. */
  .js .archive-board .sq {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
    transition-delay: calc(var(--i, 0) * 28ms);
  }
  .js .archive-board.is-in .sq {
    opacity: 1;
    transform: none;
  }
  .js .pulse-meter {
    transform: scaleY(0.1);
    transition: transform 1.1s var(--ease) 0.2s;
  }
  .js .is-in .pulse-meter {
    transform: none;
  }
  /* The share cards settle into their places. */
  .js .card.reveal:nth-child(1) { transform: translateY(24px) rotate(-2deg); }
  .js .card.reveal:nth-child(3) { transform: translateY(24px) rotate(2deg); }
  .js .card.reveal.is-in { transform: none; }
  .js .card.reveal:nth-child(2) { transition-delay: 0.08s; }
  .js .card.reveal:nth-child(3) { transition-delay: 0.16s; }
  .soon-dot {
    animation: breathe 2.4s ease-in-out infinite;
  }
}
@keyframes breathe {
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}


/* --- Questions ---------------------------------------------------------------- */
.faq-list {
  max-width: 46em;
  margin-top: var(--xl);
  border-top: 1px solid var(--hairline);
}
.faq-item {
  border-bottom: 1px solid var(--hairline);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--md);
  min-height: 44px;
  padding: 20px 0;
  font-family: var(--serif);
  font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.3;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-family: var(--sans, inherit);
  font-size: 24px;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item p {
  max-width: 40em;
  padding-bottom: 22px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.faq-more {
  margin-top: var(--xl);
}
.faq-more ul {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.faq-more a {
  color: var(--accent);
  text-underline-offset: 4px;
}

/* --- Long text: guides, privacy, terms ------------------------------------------- */
.prose {
  margin-top: var(--lg);
}
.prose h2 {
  margin: 48px 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  color: var(--text);
}
.prose p,
.prose li {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.prose p + p {
  margin-top: 14px;
}
.prose ul {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 1.2em;
  list-style: disc;
}
.prose li::marker {
  color: var(--accent);
}
.prose .updated {
  font-size: 14px;
  color: var(--text-faint);
}
.prose .contact a,
.prose .related a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 4px;
}
.prose .related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
