:root {
  --ink: #101112;
  --paper: #f3efe7;
  --muted: #8d8b85;
  --line: rgba(243, 239, 231, 0.17);
  --voice-a: #78cbd1;
  --voice-b: #e8906f;
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button { font: inherit; }

.home {
  min-height: 100svh;
  padding: clamp(22px, 3vw, 44px);
  overflow: hidden;
}
.home--dialogue { display: grid; grid-template-rows: auto 1fr; gap: 22px; }
.home-masthead { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.home-wordmark {
  margin: 0;
  font-family: inherit;
  font-size: clamp(30px, 3.5vw, 52px);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.045em;
}
.home-masthead p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.25; text-align: right; text-transform: uppercase; letter-spacing: .12em; }
.dialogue {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  width: min(100%, 1180px);
  min-height: 0;
  margin: auto;
  color: var(--paper);
  text-decoration: none;
  isolation: isolate;
}
.dialogue::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: min(78vw, 760px); height: 1px; background: linear-gradient(90deg, var(--voice-a), var(--line) 42%, var(--line) 58%, var(--voice-b)); transform: translate(-50%, -50%); }
.dialogue-message { position: relative; z-index: 2; grid-column: 1; justify-self: center; display: grid; place-content: center; width: min(74vw, 540px); aspect-ratio: 1; padding: clamp(30px, 4vw, 56px); border: 1px solid var(--line); background: var(--ink); text-align: center; transition: border-color 220ms ease, transform 300ms ease; }
.dialogue-message::before,
.dialogue-message::after { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; border: 3px solid var(--ink); border-radius: 50%; transform: translateY(-50%); }
.dialogue-message::before { left: -5px; background: var(--voice-a); box-shadow: 0 0 0 1px var(--voice-a); }
.dialogue-message::after { right: -5px; background: var(--voice-b); box-shadow: 0 0 0 1px var(--voice-b); }
.dialogue-kicker { display: block; margin-bottom: 18px; color: var(--voice-a); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.dialogue-message strong { display: block; max-width: 100%; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 4.2vw, 60px); font-weight: 400; line-height: .88; letter-spacing: -.055em; }
.dialogue-open { display: inline-flex; gap: 18px; margin-top: 28px; padding-bottom: 5px; border-bottom: 1px solid var(--paper); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.dialogue-open b { color: var(--voice-b); font-size: 15px; transition: transform 180ms ease; }
.dialogue:hover .dialogue-message { border-color: rgba(243, 239, 231, .45); transform: scale(1.015); }
.dialogue:hover .dialogue-open b { transform: translate(3px, -3px); }
.dialogue:focus-visible { outline: 1px solid var(--paper); outline-offset: 8px; }

.delta { min-height: 100svh; padding: clamp(28px, 6vw, 90px) clamp(20px, 7vw, 120px) 36px; }
.intro { max-width: 760px; margin: 0 auto clamp(36px, 7vw, 84px); }
.intro-meta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eyebrow, .viewer-count, .pair-meta { color: var(--muted); }
.eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
h1 { margin: 0; max-width: 700px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 6vw, 82px); font-weight: 400; line-height: 1.02; letter-spacing: -.035em; }
.about-season { display: grid; grid-template-columns: 142px minmax(0, 1fr); gap: 32px; margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); }
.about-label { margin: 3px 0 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; line-height: 1.4; }
.about-copy { max-width: 560px; }
.about-copy p { margin: 0; font-size: 16px; line-height: 1.62; }
.about-copy p + p { margin-top: 16px; }
.bot-credit { margin: 24px 0 0 174px; color: var(--muted); font-size: 13px; }
.bot-credit a { color: var(--paper); text-underline-offset: 3px; }
.bot-credit a:hover { color: var(--accent, #b4d76b); }
.language-switch { display: inline-flex; flex: 0 0 auto; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.language-switch button { min-width: 38px; border: 0; border-radius: 999px; padding: 6px 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.language-switch button[aria-pressed="true"] { color: var(--ink); background: var(--paper); }

.river-index { max-width: 1280px; margin: auto; }
.pair-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); }
.pair { position: relative; min-height: 300px; padding: 0; overflow: hidden; border: 0; border-radius: 2px; background: #1d1e1d; color: var(--paper); cursor: pointer; text-align: left; isolation: isolate; }
.pair::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.78) 100%); }
.pair:hover img, .pair:focus-visible img { transform: scale(1.035); }
.pair:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.pair:disabled { cursor: default; opacity: .46; }
.pair:disabled:hover img { transform: none; }
.pair img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform 350ms ease; z-index: -2; }
.pair-copy { position: absolute; right: 15px; bottom: 14px; left: 15px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.pair-label { font-family: Georgia, "Times New Roman", serif; font-size: 26px; letter-spacing: -.04em; }
.pair-meta { font-size: 12px; }
.thread { position: absolute; top: 0; bottom: 0; left: 12px; width: 3px; background: var(--accent); }
.pair.done .thread::after { content: ""; position: absolute; bottom: 10px; left: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.pair:not(.done) .thread::after { content: ""; position: absolute; bottom: 8px; left: -4px; width: 9px; height: 9px; border: 2px solid var(--accent); border-radius: 50%; background: var(--ink); }
.delta-footer { display: flex; justify-content: space-between; gap: 24px; max-width: 1280px; margin: 32px auto 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.viewer { display: none; min-height: 100svh; background: var(--ink); }
.viewer.open { display: block; }
.viewer-topbar { position: fixed; inset: 0 0 auto; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 68px; padding: 12px clamp(16px, 3vw, 38px); border-bottom: 1px solid var(--line); background: rgba(16, 17, 18, .96); backdrop-filter: blur(14px); }
.close { border: 0; padding: 9px 0; color: var(--paper); background: transparent; cursor: pointer; text-align: left; }
.close::before { content: "← "; color: var(--accent); }
.viewer-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 18px; white-space: nowrap; }
.viewer-tools { justify-self: end; display: flex; align-items: center; gap: 18px; }
.viewer-count { justify-self: end; margin: 0; font-size: 12px; }
.language-switch--compact button { min-width: 30px; padding: 4px 6px; font-size: 9px; }
.timeline { position: relative; width: min(100%, 820px); margin: 0 auto; padding: 132px 24px 18vh 88px; outline: none; }
.timeline::before { content: ""; position: absolute; top: 132px; bottom: calc(18vh + 18px); left: 42px; width: 1px; background: var(--line); }
.timeline-item { --voice-color: var(--voice-a); --item-gap: clamp(54px, 9vh, 104px); --thread-x: -46px; position: relative; margin: 0 0 var(--item-gap); scroll-margin-top: 94px; }
.timeline-item.voice-b { --voice-color: var(--voice-b); }
.timeline-item::after { content: ""; position: absolute; top: 5px; bottom: calc(var(--item-gap) * -1); left: var(--thread-x); width: 1px; background: var(--voice-color); }
.timeline-item::before { content: ""; position: absolute; z-index: 1; top: 5px; left: calc(var(--thread-x) - 5px); width: 9px; height: 9px; border: 2px solid var(--ink); border-radius: 50%; background: var(--voice-color); box-shadow: 0 0 0 1px var(--voice-color); }
.photo-frame { display: flex; width: 100%; justify-content: flex-start; }
.timeline-item.voice-b .photo-frame { justify-content: flex-end; }
.photo-frame img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(72svh, 760px); background: #18191a; box-shadow: 0 14px 42px rgba(0, 0, 0, .25); }
.slide-caption { display: flex; justify-content: space-between; gap: 16px; margin: 0 0 12px; color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.slide-caption span:last-child { color: var(--voice-color); }
.timeline-item.voice-b .slide-caption { flex-direction: row-reverse; }
.timeline-end { position: relative; min-height: 42px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.timeline-end::before { content: ""; position: absolute; top: 4px; left: -54px; width: 11px; height: 11px; border: 1px solid var(--accent); border-radius: 50%; background: var(--ink); }
.timeline-end.complete::before { background: var(--accent); }
.timeline-end p { margin: 0; }

@media (max-width: 800px) {
  .home { padding: 20px 16px; }
  .home-wordmark { font-size: clamp(28px, 9vw, 42px); }
  .dialogue { width: 100%; margin: 0; }
  .dialogue-message { width: min(86vw, 480px); padding: 36px 20px; }
  .dialogue-message strong { font-size: clamp(38px, 12vw, 58px); }
  .dialogue-open { gap: 10px; margin-top: 24px; font-size: 10px; }
  .delta { padding-top: 40px; }
  .about-season { grid-template-columns: 1fr; gap: 12px; margin-top: 30px; padding-top: 18px; }
  .about-copy p { font-size: 15px; }
  .bot-credit { margin-left: 0; }
  .delta-footer { flex-direction: column; gap: 8px; }
  .pair-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pair { min-height: 225px; }
  .viewer-topbar { grid-template-columns: 1fr auto auto; min-height: 58px; padding: 8px 14px; gap: 12px; }
  .close { font-size: 13px; }
  .viewer-title { font-size: 15px; letter-spacing: -.02em; }
  .viewer-tools { gap: 9px; }
  .viewer-count { font-size: 11px; }
  .timeline { width: 100%; padding: 104px 16px 14vh 50px; }
  .timeline::before { top: 104px; bottom: calc(14vh + 15px); left: 23px; }
  .timeline-item { --item-gap: 58px; --thread-x: -27px; scroll-margin-top: 76px; }
  .timeline-item.voice-a .photo-frame { justify-content: flex-start; }
  .timeline-item.voice-b .photo-frame { justify-content: flex-end; }
  .photo-frame img { max-width: 82%; max-height: 58svh; }
  .timeline-item.voice-a .slide-caption { margin-right: 18%; }
  .timeline-item.voice-b .slide-caption { margin-left: 18%; }
  .timeline-end::before { left: -34px; }
}

@media (max-width: 420px) {
  h1 { font-size: 38px; line-height: 1.04; }
  .close { font-size: 0; }
  .close::before { font-size: 20px; }
  .viewer-topbar { grid-template-columns: 34px 1fr auto; }
  .viewer-title { justify-self: center; }
  .language-switch--compact button { min-width: 27px; padding-inline: 5px; }
}
