/* ==========================================================================
   RewindFlow — homepage
   Visual language: "broadcast / editorial"
   - Near-black theater for the product (video is the hero)
   - Warm paper sections for the story
   - Serif display type, monospace timecodes, one signal color (REC red)
   ========================================================================== */

:root {
  --ink-0: #0b0b0c;
  --ink-1: #111113;
  --ink-2: #19191c;
  --ink-3: #232327;
  --line: rgb(255 255 255 / 0.09);
  --line-strong: rgb(255 255 255 / 0.18);
  --fg: #f2f0eb;
  --fg-muted: #a6a5a2;
  --fg-dim: #85848a;

  --signal: #ff5a36;
  --signal-hover: #ff7352;
  --signal-ink: #140703;
  --signal-soft: rgb(255 90 54 / 0.14);
  --link-dark: #9cc2ff;

  --paper: #f3efe6;
  --paper-2: #ebe5d8;
  --paper-ink: #17171a;
  --paper-muted: #57544e;
  --paper-line: #d6cebd;
  --paper-signal: #c2381a;

  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 10px;
  --nav-h: 3.75rem;
  --chat-w: 420px;
  --gutter: clamp(1rem, 0.5rem + 2vw, 2.5rem);

  color-scheme: dark;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-padding-top: calc(var(--nav-h) + 0.5rem);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

ol,
ul {
  padding: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--signal);
  color: var(--signal-ink);
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-block-size: 2.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn--sm {
  min-block-size: 2.25rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.875rem;
}

.btn--signal {
  background: var(--signal);
  color: var(--signal-ink);
}

.btn--signal:hover {
  background: var(--signal-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  border-color: var(--fg-muted);
  background: rgb(255 255 255 / 0.04);
}

.btn--outline {
  background: transparent;
  color: var(--paper-ink);
  border-color: var(--paper-ink);
}

.btn--outline:hover {
  background: var(--paper-ink);
  color: var(--paper);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(11 11 12 / 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-block-size: var(--nav-h);
  padding-inline: var(--gutter);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark img {
  border-radius: 6px;
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  margin-inline-start: 1rem;
}

.nav__links a {
  color: var(--fg-muted);
  font-size: 0.875rem;
  text-decoration: none;
  padding-block: 0.4rem;
}

.nav__links a:hover {
  color: var(--fg);
}

.nav__actions {
  display: flex;
  gap: 0.5rem;
  margin-inline-start: auto;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--gutter) clamp(2rem, 1rem + 3vw, 3.5rem);
}

.hero__inner {
  max-width: 82rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rec-dot,
.status-dot {
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .rec-dot {
    animation: rec-pulse 1.8s ease-in-out infinite;
  }
}

@keyframes rec-pulse {
  50% {
    opacity: 0.25;
  }
}

.hero__title {
  margin-top: 1.25rem;
  max-width: 17ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__title em,
.section h2 em,
.contact h2 em {
  font-style: italic;
  color: var(--signal);
}

.paper .section__head h2 em,
.paper.contact h2 em {
  color: var(--paper-signal);
}

.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 46rem) auto;
  align-items: end;
  justify-content: space-between;
  gap: 2rem 4rem;
  margin-top: 1.75rem;
}

.hero__lede {
  max-width: 60ch;
  color: var(--fg-muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.175rem);
  text-wrap: pretty;
}

.hero__stats {
  display: flex;
  gap: 2.25rem;
  padding-inline-start: 2rem;
  border-inline-start: 1px solid var(--line-strong);
}

.hero__stats div {
  display: flex;
  flex-direction: column-reverse;
}

.hero__stats dd {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 1.5vw, 3rem);
  line-height: 1;
}

.hero__stats dt {
  margin-top: 0.35rem;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ==========================================================================
   Theater (full-bleed demo)
   ========================================================================== */
.theater {
  border-block: 1px solid var(--line);
  background: #000;
}

.theater__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto var(--chat-w);
  block-size: clamp(36rem, calc(100dvh - var(--nav-h)), 62rem);
}

/* Stage column */
.stage-col {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  min-block-size: 0;
  background: #000;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--ink-0);
  border-bottom: 1px solid var(--line);
}

.stage-head__title {
  min-inline-size: 0;
}

.stage-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.1;
}

.stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
  color: var(--fg-muted);
  font-size: 0.8125rem;
}

.stage-head__tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--fg-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.chip--mono {
  font-family: var(--font-mono);
}

.seg {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.seg__btn {
  min-block-size: 1.9rem;
  padding: 0.2rem 0.8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.seg__btn[aria-pressed="true"] {
  background: var(--fg);
  color: var(--ink-0);
}

/* Video stage: fits the largest 16:9 frame into the available space */
.stage {
  flex: 1;
  min-block-size: 0;
  display: grid;
  place-items: center;
  container-type: size;
  background: #000;
}

.stage__frame {
  position: relative;
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

@supports (width: 1cqw) {
  .stage__frame {
    inline-size: min(100cqw, calc(100cqh * 16 / 9));
  }
}

.yt-mount,
.stage__frame iframe {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
}

.facade {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: #fff;
  overflow: hidden;
}

.facade img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.facade__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.1) 40%, rgb(0 0 0 / 0.65));
}

.facade__play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  inline-size: 5rem;
  block-size: 5rem;
  padding-inline-start: 0.3rem;
  border-radius: 50%;
  background: var(--signal);
  color: var(--signal-ink);
  box-shadow: 0 0 0 0.6rem rgb(255 90 54 / 0.2);
  transition: scale 160ms ease, box-shadow 160ms ease;
}

.facade:hover .facade__play,
.facade:focus-visible .facade__play {
  scale: 1.06;
  box-shadow: 0 0 0 0.9rem rgb(255 90 54 / 0.22);
}

.facade__label {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  translate: -50% 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.6);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.facade__label .mono {
  color: var(--fg-muted);
  font-size: 0.8125rem;
}

/* Chat track (timeline) */
.track {
  padding: 0.75rem 1.25rem 0.85rem;
  background: var(--ink-0);
  border-top: 1px solid var(--line);
}

.track__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.track__label {
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.track__time {
  color: var(--fg-muted);
  font-size: 0.75rem;
}

.track__bar {
  position: relative;
  block-size: 2.75rem;
  border-radius: 6px;
  background: var(--ink-2);
  cursor: pointer;
  touch-action: none;
  overflow: hidden;
}

.track__chapters,
.track__ticks {
  position: absolute;
  inset: 0;
}

.track__chapter {
  position: absolute;
  top: 0;
  bottom: 0;
  border-inline-start: 1px solid var(--line-strong);
}

.track__chapter:first-child {
  border-inline-start: 0;
}

.track__tick {
  position: absolute;
  bottom: 0;
  inline-size: 3px;
  margin-inline-start: -1px;
  border-radius: 2px 2px 0 0;
  background: var(--fg-dim);
  block-size: var(--h, 30%);
  transition: background-color 200ms ease;
}

.track__tick.is-past {
  background: var(--signal);
}

.track__progress {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: 0;
  background: rgb(255 255 255 / 0.05);
  pointer-events: none;
}

.track__head-line {
  position: absolute;
  inset-block: 0;
  inline-size: 2px;
  margin-inline-start: -1px;
  background: var(--fg);
  pointer-events: none;
}

.track__hover {
  position: absolute;
  top: 0.25rem;
  translate: -50% 0;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--fg);
  color: var(--ink-0);
  font-size: 0.6875rem;
  pointer-events: none;
}

.chapters {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.6rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.chapters::-webkit-scrollbar {
  display: none;
}

.chapter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  min-block-size: 2rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.chapter:hover {
  border-color: var(--line-strong);
  color: var(--fg);
}

.chapter .mono {
  color: var(--fg-dim);
  font-size: 0.75rem;
}

.chapter[aria-current="true"] {
  border-color: var(--fg);
  color: var(--fg);
}

.chapter[aria-current="true"] .mono {
  color: var(--signal);
}

/* Splitter */
.splitter {
  inline-size: 6px;
  padding: 0;
  border: 0;
  border-inline: 1px solid var(--line);
  background: var(--ink-1);
  cursor: col-resize;
  touch-action: none;
}

.splitter:hover,
.splitter:focus-visible,
.is-resizing .splitter {
  background: var(--signal);
}

.is-resizing iframe {
  pointer-events: none;
}

/* Chat panel */
.chat {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  min-block-size: 0;
  background: var(--ink-1);
}

.chat__tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--line);
}

.chat__tabs [role="tab"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-block-size: 3rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--fg-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.chat__tabs [role="tab"]:hover {
  color: var(--fg);
}

.chat__tabs [role="tab"][aria-selected="true"] {
  color: var(--fg);
}

/* Border-based indicator survives Forced Colors Mode */
.chat__tabs [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset-inline: 0.5rem;
  inset-block-end: -1px;
  border-block-end: 2px solid var(--signal);
}

.count {
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--ink-3);
  color: var(--fg-muted);
  font-size: 0.6875rem;
}

.chat__tools {
  display: grid;
  gap: 0.6rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.chat__search {
  position: relative;
  display: block;
}

.chat__search input {
  inline-size: 100%;
  min-block-size: 2.5rem;
  padding: 0.5rem 4.5rem 0.5rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink-0);
  font-size: 0.875rem;
}

.chat__search input::placeholder {
  color: var(--fg-dim);
}

.chat__search input:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 0;
}

.chat__clock {
  position: absolute;
  inset-inline-end: 0.5rem;
  top: 50%;
  translate: 0 -50%;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  background: var(--signal-soft);
  color: var(--signal);
  font-size: 0.75rem;
  pointer-events: none;
}

.names {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  color: var(--fg-muted);
  font-size: 0.8125rem;
}

.names__label {
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.names label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-block-size: 1.5rem;
  cursor: pointer;
}

.names input {
  accent-color: var(--signal);
  margin: 0;
}

.chat__panel {
  position: relative;
  flex: 1;
  min-block-size: 0;
  display: flex;
  flex-direction: column;
}

.chat__panel[hidden] {
  display: none;
}

.chat__scroll {
  flex: 1;
  min-block-size: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-3) transparent;
}

.chat__notice {
  margin: 0.25rem 0.75rem 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 0.8125rem;
}

.chat__notice button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--signal);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Messages */
.msgs {
  list-style: none;
  padding: 0.5rem 0;
}

.msg {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0 0.7rem;
  padding: 0.6rem 0.9rem 0.6rem 0.75rem;
  border-inline-start: 2px solid transparent;
  cursor: pointer;
}

.msg:hover {
  background: rgb(255 255 255 / 0.025);
}

.msg.is-current {
  border-inline-start-color: var(--signal);
  background: rgb(255 90 54 / 0.06);
}

.msg.is-reply {
  margin-inline-start: 1rem;
  border-inline-start: 2px solid rgb(255 90 54 / 0.45);
}

.msg-empty {
  padding: 2rem 1.25rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: center;
}

.msg.is-future {
  opacity: 0.55;
}

@media (prefers-reduced-motion: no-preference) {
  .msg.is-new {
    animation: msg-in 280ms ease-out;
  }
}

@keyframes msg-in {
  from {
    opacity: 0;
    translate: 0 6px;
  }
}

.avatar {
  grid-row: span 3;
  display: grid;
  place-items: center;
  inline-size: 2rem;
  block-size: 2rem;
  border-radius: 50%;
  background: hsl(var(--hue, 20) 28% 26%);
  color: hsl(var(--hue, 20) 70% 86%);
  font-size: 0.75rem;
  font-weight: 600;
}

.msg__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
}

.msg__name {
  font-size: 0.875rem;
  font-weight: 600;
}

.host-tag {
  padding: 0.02rem 0.35rem;
  border-radius: 4px;
  background: var(--ink-3);
  color: var(--fg-muted);
  font-size: 0.6875rem;
  font-weight: 500;
}

.tc {
  margin-inline-start: auto;
  padding: 0.1rem 0.35rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.tc:hover {
  background: var(--signal-soft);
  color: var(--signal);
}

.msg__reply {
  margin-top: 0.2rem;
  padding-inline-start: 0.5rem;
  border-inline-start: 2px solid var(--line-strong);
  color: var(--fg-dim);
  font-size: 0.75rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.msg__text {
  margin-top: 0.15rem;
  color: #dcdad5;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg__text a,
.link a {
  color: var(--link-dark);
  text-decoration: underline;
  text-decoration-color: rgb(156 194 255 / 0.4);
  text-underline-offset: 2px;
}

.msg__text a:hover,
.link a:hover {
  text-decoration-color: currentColor;
}

mark {
  background: rgb(255 90 54 / 0.28);
  color: inherit;
  border-radius: 2px;
}

.reacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
  list-style: none;
}

.react {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-2);
  font-size: 0.75rem;
  cursor: pointer;
}

.react:hover,
.react:focus-visible {
  border-color: var(--line-strong);
  background: var(--ink-3);
}

.react .mono {
  color: var(--fg-muted);
  font-size: 0.6875rem;
}

.react__tip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 20;
  width: max-content;
  max-width: 14rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--ink-0);
  color: var(--fg);
  font-size: 0.72rem;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.65);
  pointer-events: none;
  transition: opacity 140ms ease;
}

.react:hover .react__tip,
.react:focus-visible .react__tip {
  visibility: visible;
  opacity: 1;
}

.jump-live {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  translate: -50% 0;
  min-block-size: 2rem;
  padding: 0.3rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: var(--fg);
  color: var(--ink-0);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.5);
}

/* Links tab */
.links {
  list-style: none;
  padding: 0.5rem 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.link {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink-2);
  min-inline-size: 0;
}

.link a {
  font-size: 0.875rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.link__meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  color: var(--fg-dim);
  font-size: 0.75rem;
}

.link__meta .tc {
  margin-inline-start: auto;
}

.link.is-future {
  opacity: 0.55;
}

/* Description tab (matching rewindflow.com/demo) */
.desc {
  padding: 1rem 0.95rem 1.25rem;
  display: grid;
  align-content: start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #dcdad5;
}

.desc__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--fg);
}

.desc__speaker {
  color: var(--signal);
  font-size: 0.8125rem;
  font-weight: 500;
}

.desc__qa {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-inline-start: 2px solid var(--signal);
  border-radius: 8px;
  background: var(--ink-2);
  display: grid;
  gap: 0.35rem;
}

.desc__q {
  color: var(--fg);
  font-size: 0.8125rem;
}

.desc__a {
  color: var(--fg-muted);
  font-size: 0.78rem;
}

.desc__sub {
  margin-top: 0.35rem;
  color: var(--fg-dim);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.desc__chapters {
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.desc__chapters li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
}

.desc__time {
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--signal-soft);
  color: var(--signal);
  font-size: 0.75rem;
  font-weight: 600;
}

.desc__time:hover {
  background: var(--signal);
  color: var(--signal-ink);
  border-color: var(--signal);
}

.chat__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}

.chat__status .status-dot {
  background: var(--fg-dim);
}

.chat__status.is-live .status-dot {
  background: var(--signal);
}

/* ==========================================================================
   Paper sections (light scheme for the story)
   ========================================================================== */
.paper {
  color-scheme: light;
  background: var(--paper);
  color: var(--paper-ink);
}

.paper :focus-visible {
  outline-color: var(--paper-signal);
}

.section {
  padding: clamp(3.5rem, 2rem + 5vw, 7rem) var(--gutter);
}

.section--rule {
  padding-top: 0;
}

.section--rule .section__inner {
  padding-top: clamp(3.5rem, 2rem + 5vw, 6rem);
  border-top: 1px solid var(--paper-line);
}

.section__inner {
  max-width: 82rem;
  margin-inline: auto;
}

.section__head {
  max-width: 50rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.eyebrow {
  color: var(--paper-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2 {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 1.4rem + 2.6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section__lede {
  margin-top: 1.1rem;
  max-width: 60ch;
  color: var(--paper-muted);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  text-wrap: pretty;
}

/* Testimonial */
.quote-section {
  padding: clamp(3.5rem, 2rem + 5vw, 7rem) var(--gutter) 0;
}

.quote {
  max-width: 62rem;
  margin-inline: auto;
}

.quote p {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.75rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.quote figcaption {
  margin-top: 1.5rem;
  color: var(--paper-muted);
  font-size: 0.9375rem;
}

.quote figcaption strong {
  color: var(--paper-ink);
  font-weight: 600;
}

/* Comparison table */
.table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.compare {
  inline-size: 100%;
  min-inline-size: 44rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare th,
.compare td {
  padding: 1rem 1rem;
  border-bottom: 1px solid var(--paper-line);
  text-align: start;
  vertical-align: middle;
}

.compare thead th {
  padding-top: 0;
  color: var(--paper-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: balance;
  border-bottom-color: var(--paper-ink);
}

.compare tbody th {
  font-weight: 500;
  inline-size: 34%;
  text-wrap: balance;
}

.compare .is-us {
  background: var(--paper-2);
}

.compare thead .is-us {
  color: var(--paper-ink);
  font-weight: 700;
}

.yes,
.no,
.part {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.yes::before,
.no::before,
.part::before {
  font-family: var(--font-mono);
  font-weight: 600;
}

.yes::before {
  content: "✓";
  color: #1d7a3e;
}

.no {
  color: var(--paper-muted);
}

.no::before {
  content: "✕";
}

.part {
  color: var(--paper-muted);
}

.part::before {
  content: "~";
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 2.5rem;
  list-style: none;
}

.steps li {
  display: grid;
  align-content: start;
  gap: 0.6rem;
}

.steps__n {
  color: var(--paper-signal);
  font-size: 0.8125rem;
}

.steps h3,
.mode h3,
.plan h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.9rem);
  line-height: 1.1;
}

.steps p,
.mode p:not(.mode__tag) {
  color: var(--paper-muted);
  text-wrap: pretty;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: var(--paper-2);
}

/* Privacy modes */
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0;
  border-top: 1px solid var(--paper-ink);
}

.mode {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 1.75rem 2rem 0 0;
}

.mode + .mode {
  padding-inline-start: 2rem;
  border-inline-start: 1px solid var(--paper-line);
}

.mode__tag {
  color: var(--paper-signal);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mode a {
  color: var(--paper-ink);
  text-underline-offset: 2px;
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.75rem;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.35);
}

.plan--feature {
  color-scheme: dark;
  background: var(--ink-0);
  color: var(--fg);
  border-color: var(--ink-0);
}

.plan__price {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 2rem + 1vw, 3rem);
  line-height: 1;
}

.plan__price span {
  margin-inline-start: 0.25rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--paper-muted);
}

.plan--feature .plan__price span,
.plan--feature .plan__desc,
.plan--feature li {
  color: var(--fg-muted);
}

.plan__desc {
  color: var(--paper-muted);
}

.plan ul {
  display: grid;
  gap: 0.5rem;
  margin-block: 0.25rem 0.75rem;
  list-style: none;
  font-size: 0.9375rem;
}

.plan li {
  display: flex;
  gap: 0.55rem;
}

.plan li::before {
  content: "—";
  color: var(--paper-signal);
}

.plan--feature li::before {
  color: var(--signal);
}

.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}

.plan--feature :focus-visible {
  outline-color: var(--signal);
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.contact__head {
  margin-bottom: 0;
}

.contact__sig {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--paper-muted);
}

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  inline-size: 100%;
  min-block-size: 2.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #a49c8b;
  border-radius: 8px;
  background: #fffdf8;
  color: var(--paper-ink);
  font-size: 1rem;
}

.field textarea {
  resize: vertical;
}

.field :focus-visible {
  outline: 2px solid var(--paper-signal);
  outline-offset: 1px;
}

.field :user-invalid {
  border-color: var(--paper-signal);
}

.form__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.form__status {
  color: var(--paper-muted);
  font-size: 0.875rem;
}

.form__status.is-error {
  color: var(--paper-signal);
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: 2rem var(--gutter);
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.footer__inner p {
  flex: 1;
  min-inline-size: 16rem;
}

.footer__inner p a {
  color: var(--fg);
  text-underline-offset: 2px;
}

.footer nav {
  display: flex;
  gap: 1.25rem;
}

.footer nav a {
  text-decoration: none;
}

.footer nav a:hover {
  color: var(--fg);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav__links {
    display: none;
  }

  .hero__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__stats {
    padding-inline-start: 0;
    border-inline-start: 0;
  }
}

@media (max-width: 960px) {
  .theater__grid {
    grid-template-columns: minmax(0, 1fr);
    block-size: auto;
  }

  .splitter {
    display: none;
  }

  .stage {
    flex: none;
    container-type: normal;
  }

  .stage__frame {
    inline-size: 100%;
  }

  .chat {
    block-size: min(70svh, 40rem);
    border-top: 1px solid var(--line);
  }

  .contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .mode,
  .mode + .mode {
    padding: 1.5rem 0;
    border-inline-start: 0;
  }

  .mode + .mode {
    border-top: 1px solid var(--paper-line);
  }
}

@media (max-width: 640px) {
  .nav__actions .btn--ghost {
    display: none;
  }

  .stage-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .form {
    grid-template-columns: minmax(0, 1fr);
  }

  .facade__play {
    inline-size: 3.75rem;
    block-size: 3.75rem;
  }
}

/* Forced colors: keep key indicators visible */
@media (forced-colors: active) {
  .track__tick,
  .track__head-line,
  .rec-dot,
  .status-dot {
    background: CanvasText;
    forced-color-adjust: none;
  }

  .track__tick.is-past {
    background: Highlight;
  }

  .msg.is-current {
    border-inline-start-color: Highlight;
  }

  .seg__btn[aria-pressed="true"] {
    outline: 2px solid Highlight;
  }
}

