/* Modern CSS Reset & Variable Tokens */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   "Dusk" design tokens (Round 2 handoff — supersedes Half-light)
   The app is dark throughout; there is no light mode.
   ========================================================================== */
/* Tokens live in tokens.css, linked ahead of this file. */

/* The only two keyframes in the app; slow, staggered, never synchronised */
@keyframes widen {
  from { transform: scaleX(0.9); opacity: 0.45; }
  to   { transform: scaleX(1.06); opacity: 0.92; }
}
@keyframes lift {
  from { opacity: 0.3; }
  to   { opacity: 0.85; }
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* Fully legible static — nothing conveys meaning through motion alone */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

body {
  background-color: var(--night);
  color: var(--night-ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* The narrated experience needs a locked viewport; the home page scrolls. */
body.experience {
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Dusk — the introduction (experience.html)

   The canvas is the subject; the script panel is the quiet apparatus beside it.
   Class names are load-bearing: app.js drives .chapter-item, .script-sentence,
   .script-paragraph, #subtitle-text, .canvas-tooltip and .ambient-orb glow-*.
   ========================================================================== */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s;
  z-index: 1;
}
.screen.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

/* --- Landing --- */
#landing-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 46%, #14161F 0%, #0E0F16 58%, var(--night) 100%);
}
.landing-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(240, 160, 46, 0.07) 0%, transparent 46%);
  pointer-events: none;
}
.landing-content {
  position: relative;
  max-width: 560px;
  width: 90%;
  padding: 0 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 10;
}
.glow-orb {
  position: absolute;
  top: -150px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,160,46,.16) 0%, rgba(240,160,46,.04) 46%, transparent 70%);
  filter: blur(8px);
  animation: lift 16s infinite alternate ease-in-out;
  pointer-events: none;
}
.home-link {
  font-size: 12.5px;
  color: var(--ink-42);
  text-decoration: none;
  transition: color 0.2s ease;
}
.home-link:hover { color: var(--night-ink); }
.landing-title {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--night-ink);
  text-wrap: pretty;
}
.landing-subtitle {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
}
.landing-description {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-62);
  text-wrap: pretty;
}
.audio-notice {
  font-size: 12.5px;
  color: var(--ink-45);
}
.audio-notice strong { font-weight: 500; color: var(--ink-62); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border: none;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-primary {
  background: var(--amber);
  color: #14151A;
}
.btn-primary:hover { background: var(--amber-hover); }

/* --- Main layout --- */
#experience-screen { background: var(--night); }
.main-layout {
  display: grid;
  grid-template-columns: 1fr 372px;
  height: 100vh;
  width: 100vw;
}

/* Canvas side */
.visualizer-container {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 46% 48%, #191B26 0%, #0F1016 60%, #0B0C10 100%);
}
#animation-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
}
.canvas-glow {
  position: absolute;
  left: 46%;
  top: 48%;
  width: 600px;
  height: 600px;
  margin: -300px 0 0 -300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,160,46,.09) 0%, rgba(6,182,212,.05) 46%, transparent 70%);
  filter: blur(48px);
  animation: lift 16s infinite alternate ease-in-out;
  pointer-events: none;
  z-index: 1;
}

/* The cursor hint — a sentence, not a status label */
.canvas-tooltip {
  position: absolute;
  left: 26px;
  top: 24px;
  z-index: 5;
  padding: 6px 13px;
  border: 1px solid rgba(242, 241, 238, 0.14);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 400;
  white-space: nowrap;
  color: var(--ink-55);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.canvas-tooltip.active { opacity: 1; }

/* The narration line, on the ground with no panel */
.subtitle-overlay {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 52px;
  z-index: 5;
  text-align: center;
  pointer-events: none;
}
#subtitle-text {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(242, 241, 238, 0.94);
  text-wrap: pretty;
}

/* --- Script panel --- */
.control-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;          /* required: without it the scroller buries the transport */
  overflow: hidden;
  background: var(--night-raised);
  border-left: 1px solid var(--rule);
}
.panel-header {
  padding: 26px 26px 20px;
  border-bottom: 1px solid var(--rule);
}
.panel-title {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.05;
  color: var(--night-ink);
}
.panel-subtitle {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-42);
}
.panel-home { display: inline-block; margin-top: 12px; }

/* Chapter rail */
.chapter-navigation {
  padding: 18px 26px;
  border-bottom: 1px solid var(--rule);
}
.chapter-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.chapter-item {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12.5px;
  color: var(--ink-45);
  cursor: pointer;
  transition: color 0.2s ease;
}
.chapter-item:hover { color: var(--ink-80); }
.chapter-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(242, 241, 238, 0.22);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.chapter-item.active { color: var(--night-ink); }
.chapter-item.active .chapter-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(240, 160, 46, 0.18);
}

/* Script scroller */
.script-scroller-container {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 26px;
}
.script-content { display: flex; flex-direction: column; gap: 16px; }
.script-fade-top,
.script-fade-bottom {
  position: sticky;
  left: 0;
  right: 0;
  height: 40px;
  pointer-events: none;
  z-index: 2;
}
.script-fade-top {
  top: 0;
  margin-bottom: -40px;
  background: linear-gradient(180deg, var(--night-raised), rgba(18, 19, 26, 0));
}
.script-fade-bottom {
  bottom: 0;
  margin-top: -40px;
  background: linear-gradient(0deg, var(--night-raised), rgba(18, 19, 26, 0));
}
.script-paragraph {
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(242, 241, 238, 0.38);
  cursor: pointer;
  transition: color 0.4s ease, border-color 0.4s ease;
  border-left: 1px solid transparent;
  padding-left: 15px;
  text-wrap: pretty;
}
.script-paragraph:hover { color: rgba(242, 241, 238, 0.6); }
.script-paragraph.active {
  color: var(--ink-80);
  border-left-color: var(--amber);
}
.script-sentence { transition: color 0.4s ease, box-shadow 0.4s ease; }
/* The live sentence is marked, not filled */
.script-sentence.highlight {
  color: var(--night-ink);
  box-shadow: inset 0 -7px 0 rgba(240, 160, 46, 0.2);
}

/* Transport */
.player-controls-container {
  padding: 18px 26px 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.timeline-container { display: flex; align-items: center; gap: 11px; }
.time-label {
  min-width: 30px;
  font-size: 11px;
  color: var(--ink-45);
  font-variant-numeric: tabular-nums;
}
.time-label:last-child { text-align: right; }
.timeline-bar {
  position: relative;
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: rgba(242, 241, 238, 0.14);
  cursor: pointer;
}
.timeline-progress {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 2px;
  background: var(--amber);
}
.timeline-handle {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--amber);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.media-buttons { display: flex; align-items: center; gap: 8px; }
.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn-icon:hover {
  color: var(--night-ink);
  border-color: rgba(242, 241, 238, 0.14);
}
.btn-play {
  width: 42px;
  height: 42px;
  border-color: var(--amber);
  color: var(--amber);
}
.btn-play:hover {
  background: rgba(240, 160, 46, 0.14);
  border-color: var(--amber);
  color: var(--amber-hover);
}
.hidden { display: none !important; }

.settings-toggles { display: flex; align-items: center; gap: 8px; }
.control-group { position: relative; }
.slider-popover {
  position: absolute;
  bottom: 42px;
  right: 0;
  width: 180px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #171923;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  z-index: 20;
}
.control-group:hover .slider-popover,
.control-group:focus-within .slider-popover {
  opacity: 1;
  visibility: visible;
}
.slider-popover label {
  display: block;
  margin-bottom: 9px;
  font-size: 11px;
  color: var(--ink-55);
}
.slider-popover input[type="range"] {
  width: 100%;
  height: 2px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(242, 241, 238, 0.16);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.slider-popover input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border: none;
  border-radius: 50%;
  background: var(--amber);
  cursor: pointer;
}
.slider-popover input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: none;
  border-radius: 50%;
  background: var(--amber);
  cursor: pointer;
}

/* Ambient scene tint behind the whole screen */
.background-glow-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient-orb {
  position: absolute;
  left: 30%;
  top: 50%;
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  transition: background 2s ease;
}
/* Scene tints — slow reads cold, fast reads hot (see canvas.js colours) */
.glow-intro     { background: radial-gradient(circle, rgba(6,182,212,.1) 0%, transparent 68%); }
.glow-delta     { background: radial-gradient(circle, rgba(45,78,138,.16) 0%, transparent 68%); }
.glow-theta     { background: radial-gradient(circle, rgba(46,143,168,.14) 0%, transparent 68%); }
.glow-alpha     { background: radial-gradient(circle, rgba(240,160,46,.14) 0%, transparent 68%); }
.glow-beta      { background: radial-gradient(circle, rgba(239,68,68,.13) 0%, transparent 68%); }
.glow-gamma     { background: radial-gradient(circle, rgba(255,233,176,.12) 0%, transparent 68%); }
.glow-synchrony { background: radial-gradient(circle, rgba(240,160,46,.16) 0%, transparent 68%); }
.glow-effort    { background: radial-gradient(circle, rgba(239,68,68,.14) 0%, transparent 68%); }
.glow-shape     { background: radial-gradient(circle, rgba(6,182,212,.12) 0%, transparent 68%); }
.glow-hitter    { background: radial-gradient(circle, rgba(240,160,46,.13) 0%, transparent 68%); }
.glow-guided    { background: radial-gradient(circle, rgba(6,182,212,.12) 0%, transparent 68%); }

/* Scrollbar */
.script-scroller-container::-webkit-scrollbar { width: 3px; }
.script-scroller-container::-webkit-scrollbar-track { background: transparent; }
.script-scroller-container::-webkit-scrollbar-thumb {
  background: rgba(242, 241, 238, 0.14);
  border-radius: 2px;
}
.script-scroller-container::-webkit-scrollbar-thumb:hover { background: rgba(242, 241, 238, 0.28); }

@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 340px;
  }
  .control-panel { border-left: none; border-top: 1px solid var(--rule); }
  .panel-header { padding: 18px 20px 14px; }
  .panel-title { font-size: 19px; }
  .chapter-navigation { padding: 14px 20px; }
  .script-scroller-container { padding: 16px 20px; }
  .player-controls-container { padding: 14px 20px 18px; }
  .subtitle-overlay { left: 5%; right: 5%; bottom: 26px; }
  #subtitle-text { font-size: 17px; }
  .canvas-tooltip { left: 16px; top: 16px; font-size: 10.5px; }
  .slider-popover { bottom: unset; top: 42px; right: 0; }
}

/* ==========================================================================
   Dusk — Home (index.html)
   Full-bleed photograph, Instrument Serif display, one amber accent.
   No streaks, no completion state; the only progress is a resume bookmark.
   ========================================================================== */
body.home {
  background: var(--night);
  color: var(--night-ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 640px;
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim-v {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(11,12,16,.55) 0%, rgba(11,12,16,.05) 26%,
    rgba(11,12,16,.32) 66%, rgba(11,12,16,.82) 88%, #0B0C10 100%);
}
.hero-scrim-h {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(11,12,16,.72) 0%, rgba(11,12,16,.34) 38%, rgba(11,12,16,0) 68%);
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 56px 44px;
  pointer-events: none;
}
.hero-content a, .hero-content button { pointer-events: auto; }

.hero-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.wordmark {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 241, 238, 0.7);
  text-decoration: none;
}
.nav {
  display: flex;
  gap: 26px;
}
.nav a {
  font-size: 12.5px;
  color: var(--ink-62);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--night-ink); }

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
}
.hero-main { flex: 1 1 760px; min-width: 0; }
.kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}
.hero-title {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(44px, 6.4vw, 92px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.hero-title em { font-style: italic; }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
}
.cta {
  flex: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  padding: 16px 30px;
  border: none;
  border-radius: 999px;
  background: var(--amber);
  color: #14151A;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cta:hover { background: var(--amber-hover); }
.hero-alt {
  flex: none;
  white-space: nowrap;
  font-size: 13.5px;
  color: rgba(242, 241, 238, 0.66);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 241, 238, 0.24);
  padding-bottom: 3px;
  transition: color 0.2s ease;
}
.hero-alt:hover { color: var(--night-ink); }
.hero-aside { max-width: 250px; }
.hero-aside .kicker {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ink-42);
}
.hero-aside p {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(242, 241, 238, 0.5);
  text-wrap: pretty;
}

/* --- Page body --- */
.page {
  padding: 0 56px 40px;
  display: flex;
  flex-direction: column;
}

/* The introduction, feature row */
.feature {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 44px;
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}
.feature:hover { border-bottom-color: var(--amber); }
.feature .kicker { font-size: 10.5px; letter-spacing: 0.2em; }
.feature-title {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.05;
}
.feature-body {
  margin-top: 10px;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-55);
  text-wrap: pretty;
}
.feature-meta {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-45);
}
.feature-meta .arrow { font-size: 18px; color: var(--ink-62); }

/* Section headers */
.section { margin-top: 22px; }
.section-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-strong);
}
.section-bar .stack { display: flex; flex-direction: column; gap: 7px; }
.slabel {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 241, 238, 0.85);
}
.section-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}
.smeta { font-size: 11.5px; color: var(--ink-45); }

/* Exercise shelf */
.shelf {
  display: grid;
  /* minmax(0, …): a bare 1fr is minmax(auto, 1fr), and the no-wrap subtitle
     makes each row's min-content wider than a phone, pushing the pill off-screen */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 56px;
  margin-top: 8px;
}
.shelf-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 4px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
.shelf-row:hover { background: var(--fill-row-hover); }
/* An odd number of exercises leaves the last one beside an empty cell. Rather
   than read as an unfinished grid, it takes the full width and closes the
   shelf -- which suits Grip, the one exercise that is about letting go.
   :nth-child(odd) on the last row means this lapses on its own at an even
   count, where the grid already comes out square. */
.shelf-row:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.tile {
  flex: 0 0 62px;
  height: 62px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(242, 241, 238, 0.07);
  position: relative;
}
/* Tile artwork: each exercise's actual visual, in CSS */
.tile-periphery { background: radial-gradient(ellipse at 50% 50%, #101A1D 0%, #0E1316 70%, #0E0F14 100%); }
.tile-periphery::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: rgba(242, 241, 238, 0.9);
  box-shadow: 0 0 8px rgba(242, 241, 238, 0.4);
}
.tile-periphery::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 1px dotted rgba(6, 182, 212, 0.65);
}
.tile-grip { background: radial-gradient(ellipse at 50% 50%, #1C1315 0%, #131013 70%, #0E0F14 100%); }
.tile-grip::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #FFDEDE 0%, var(--grip) 48%, rgba(239,68,68,.3) 78%, transparent 100%);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
}
.tile-grip::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 1px solid rgba(239, 68, 68, 0.34);
  box-shadow: inset 0 0 0 7px rgba(239, 68, 68, 0.08), inset 0 0 0 14px rgba(239, 68, 68, 0.05);
}
.tile-between { background: radial-gradient(ellipse at 50% 50%, #12161A 0%, #0F1216 70%, #0E0F14 100%); }
.tile-between::before {
  /* the stirring: a soft breath in the emptiness */
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 166, 178, 0.4) 0%, rgba(143, 166, 178, 0.1) 55%, transparent 75%);
}
.tile-between::after {
  /* the stars it sits between */
  content: '';
  position: absolute;
  left: 12px; top: 13px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(242, 241, 238, 0.75);
  box-shadow: 34px 4px 0 -0.5px rgba(242, 241, 238, 0.6),
              6px 32px 0 -0.5px rgba(242, 241, 238, 0.55),
              37px 33px 0 0 rgba(242, 241, 238, 0.7);
}
.tile-two { background: radial-gradient(ellipse at 50% 50%, #16130E 0%, #100F12 70%, #0E0F14 100%); }
.tile-two::before, .tile-two::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 12px; height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #FFF6E6 0%, #F0A52A 46%, rgba(217,119,6,.35) 76%, transparent 100%);
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.5);
}
.tile-two::before { left: 9px; }
.tile-two::after { right: 9px; }
.tile-contact { background: radial-gradient(ellipse at 50% 50%, #0F141F 0%, #0E1117 70%, #0E0F14 100%); }
.tile-contact::before {
  /* the meeting ring */
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 1.5px solid rgba(59, 130, 246, 0.55);
}
.tile-contact::after {
  /* the approaching mote, mid-streak */
  content: '';
  position: absolute;
  right: 8px; top: 14px;
  width: 18px; height: 2.5px;
  border-radius: 2px;
  transform: rotate(28deg);
  background: linear-gradient(to left, #EAF2FF, rgba(59, 130, 246, 0.7), transparent);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}
.tile-clearing { background: radial-gradient(ellipse at 50% 50%, #101613 0%, #0E1210 70%, #0E0F14 100%); }
.tile-clearing::before {
  /* the clearing: a ringed opening amid the motes */
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 1px solid rgba(131, 166, 139, 0.5);
  background: radial-gradient(circle, rgba(242, 241, 238, 0.06) 0%, transparent 70%);
}
.tile-clearing::after {
  /* the motes it holds off */
  content: '';
  position: absolute;
  left: 11px; top: 11px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(131, 166, 139, 0.85);
  box-shadow: 36px 2px 0 -0.5px rgba(131, 166, 139, 0.7),
              4px 36px 0 -0.5px rgba(131, 166, 139, 0.65),
              38px 37px 0 -1px rgba(131, 166, 139, 0.75),
              20px -3px 0 -1.5px rgba(131, 166, 139, 0.5);
}
.tile-shift { background: radial-gradient(ellipse at 50% 50%, #151222 0%, #0F0F16 70%, #0E0F14 100%); }
.tile-shift::before {
  /* the wide anchor ring, the open half */
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 1px solid rgba(160, 143, 208, 0.28);
}
.tile-shift::after {
  /* the point, gripped tight: a bright core inside a close ring */
  content: '';
  position: absolute;
  left: 17px; top: 15px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #F2F1EE;
  box-shadow: 0 0 0 4px rgba(160, 143, 208, 0.55), 0 0 10px rgba(160, 143, 208, 0.7);
}
.shelf-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.shelf-name { font-size: 15.5px; font-weight: 500; line-height: 1.2; }
.shelf-sub {
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(242, 241, 238, 0.52);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shelf-meta { font-size: 11px; color: var(--ink-42); }
.shelf-meta .cat-periphery { color: var(--periphery); }
.shelf-meta .cat-grip { color: var(--grip); }
.shelf-meta .cat-between { color: var(--between); }
.shelf-meta .cat-two { color: var(--two); }
.shelf-meta .cat-contact { color: var(--contact); }
.shelf-meta .cat-clearing { color: var(--clearing); }
.shelf-meta .cat-shift { color: var(--shift); }
.shelf-pill {
  flex: none;
  padding: 7px 17px;
  border-radius: 999px;
  background: var(--fill-quiet);
  color: var(--night-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s ease;
}
.shelf-row:hover .shelf-pill { background: var(--fill-quiet-hover); }

/* Meditations list */
.med-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}
.med-list .section-bar { grid-column: 1 / -1; padding-bottom: 12px; }
.med-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(242, 241, 238, 0.09);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
.med-row:hover { background: var(--fill-row-hover); }
.med-title { flex: 1; font-size: 15.5px; font-weight: 400; }
.med-mins { font-size: 11.5px; color: var(--ink-45); }
/* The one permitted piece of progress state: a bookmark in a single session */
.med-row.resume .med-title { color: var(--amber); }
.med-row.resume .med-mins { color: var(--amber); font-weight: 500; }

/* Footer */
.home-foot {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  /* The three blocks stack -- .foot-legal and .foot-row carry their own
     margin-top, and the paragraphs cap at 68ch. As a flex row they became
     three squeezed columns instead. space-between belongs to .foot-row. */
  font-size: 11.5px;
  color: rgba(242, 241, 238, 0.4);
}
.home-foot .foot-about, .home-foot .foot-legal {
  max-width: 68ch;
  line-height: 1.6;
  text-wrap: pretty;
}
.home-foot .foot-legal { margin-top: 8px; color: rgba(242, 241, 238, 0.5); }
.home-foot .foot-row {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}
.med-tag {
  margin-left: 8px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--periphery);
}
.after-intro {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(242, 241, 238, 0.5);
}
.after-intro a {
  color: rgba(242, 241, 238, 0.78);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 241, 238, 0.22);
}
/* Quiet "read more" line under a section: guide and transcript pages */
.section-more {
  margin: 18px 0 40px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(242, 241, 238, 0.4);
}
.section-more a {
  color: rgba(242, 241, 238, 0.7);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 241, 238, 0.22);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.section-more a:hover { color: var(--night-ink); border-bottom-color: var(--amber); }
.home-foot a {
  color: rgba(242, 241, 238, 0.4);
  text-decoration: none;
}
.home-foot a:hover { color: var(--night-ink); }

/* Resume bar — phone only, and only when a session is part-played */
.resume-bar { display: none; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .shelf { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .shelf-row:last-child:nth-child(odd) {
    margin-top: 0;
    padding-top: 12px;
    border-top: none;
  }
}
@media (max-width: 700px) {
  /* Intrinsic height: the aside makes the hero taller than any fixed value,
     and .hero clips (overflow: hidden). */
  .hero { height: auto; min-height: 392px; }
  .hero-scrim-h { display: none; }
  .hero-scrim-v {
    background: linear-gradient(180deg,
      rgba(11,12,16,.62) 0%, rgba(11,12,16,.06) 30%,
      rgba(11,12,16,.5) 74%, #0B0C10 100%);
  }
  .hero-content { position: relative; padding: 44px 22px 30px; gap: 30px; }
  .hero-top { flex-wrap: wrap; gap: 8px 14px; }
  .nav { gap: 14px; font-size: 12px; }
  /* flex-basis 760px is horizontal at desktop; in a column it becomes height. */
  .hero-bottom { flex-direction: column; align-items: stretch; gap: 20px; }
  .hero-main { flex: none; }
  /* The no-schedule promise stays on the phone; only its second sentence goes. */
  .hero-aside { max-width: none; }
  .hero-aside .aside-rest { display: none; }
  .hero-title { margin-top: 14px; line-height: 0.98; letter-spacing: -0.01em; }
  .hero-actions { margin-top: 22px; flex-wrap: wrap; }
  .cta {
    flex: 1;
    justify-content: center;
    height: 50px;
    padding: 0 20px;
  }
  .hero-alt { width: 100%; text-align: center; margin-top: 12px; }

  .page { padding: 22px 22px 0; }
  .feature { display: block; padding: 0 0 18px; border-top: none; border-bottom: 1px solid rgba(242,241,238,.12); }
  .feature-title { font-size: 26px; }
  /* Keep the 'why' — the chapter count is already in .feature-meta below. */
  .feature-body { margin-top: 8px; font-size: 13.5px; line-height: 1.6; }
  .feature-body .body-rest { display: none; }
  .feature-meta { display: block; margin-top: 6px; font-size: 12.5px; color: rgba(242,241,238,.5); }
  .feature-meta .arrow { display: none; }

  .section { margin-top: 20px; }
  .section-title { font-size: 26px; }
  .smeta { display: none; }

  .shelf-row { gap: 13px; padding: 9px 0; }
  .tile { flex: 0 0 54px; height: 54px; border-radius: 13px; }
  .shelf-name { font-size: 15px; }
  .shelf-pill { height: 32px; display: inline-flex; align-items: center; padding: 0 16px; font-size: 11.5px; }

  .med-list { grid-template-columns: 1fr; gap: 0; }

  .home-foot { margin-top: 26px; padding-bottom: 26px; }

  /* Pinned resume bar */
  .resume-bar.visible {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    align-items: center;
    gap: 13px;
    padding: 14px 22px 26px;
    border-top: 1px solid var(--rule);
    background: var(--night);
    z-index: 20;
  }
  body.has-resume .home-foot { padding-bottom: 96px; }
  .resume-play {
    flex: none;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--amber);
    color: #14151A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    text-decoration: none;
  }
  .resume-body { flex: 1; min-width: 0; }
  .resume-title {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--night-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .resume-track {
    margin-top: 7px;
    height: 2px;
    border-radius: 1px;
    background: rgba(242, 241, 238, 0.14);
    overflow: hidden;
  }
  .resume-fill { height: 100%; background: var(--amber); }
  .resume-left { flex: none; font-size: 11px; color: var(--ink-45); }
}
