:root {
  --paper: #f8f7f3;
  --panel-bg: #f8f7f3;
  --ink: #3a3a37;
  --muted: #6f6b62;
  --line: #c8c1b4;
  --peach: #ffe2c2;
  --shadow: rgba(58, 58, 55, 0.06);
  --psychological-accent: #725780;
  --cover-button-bg: #e7c5a5;
  --cover-button-bg-hover: #ddb794;
  --cover-button-text: #332f2b;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

/* Minimal Editorial Archive framework: reserved for future shared page migration. */
:root {
  --site-bg: #f8f7f3;
  --page-bg: #f8f7f3;

  --text-primary: #302f2c;
  --text-secondary: rgba(48, 47, 44, 0.62);
  --line-color: #d5d0c6;

  --page-max-width: 1480px;
  --page-gutter: 58px;
  --page-top-space: 34px;
  --page-bottom-space: 48px;

  --content-max-width: 1260px;
  --reading-max-width: 820px;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 28px;
  --space-lg: 48px;
  --space-xl: 72px;
  --space-2xl: 96px;

  --font-serif: var(--serif);
  --font-sans: var(--sans);
}

.chapter-page {
  --page-gutter: 58px;
  width: calc(100% - 56px);
  max-width: var(--page-max-width);
  min-height: calc(100vh - 56px);
  margin: 28px auto;
  padding: var(--page-top-space) var(--page-gutter) var(--page-bottom-space);
  box-sizing: border-box;
  background: var(--page-bg);
}

.chapter-header {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 230px;
  align-items: start;
  width: 100%;
  padding-bottom: 26px;
}

.chapter-header__left {
  justify-self: start;
  padding-top: 9px;
}

.chapter-header__centre {
  justify-self: center;
  text-align: center;
}

.chapter-header__right {
  width: 100%;
}

.chapter-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(46px, 4vw, 58px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.chapter-subtitle {
  max-width: 600px;
  margin: 14px auto 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.chapter-kicker,
.chapter-back {
  border: 0;
  padding: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.chapter-divider {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line-color);
}

.reading-column {
  width: 100%;
  max-width: var(--reading-max-width);
  margin-left: auto;
  margin-right: auto;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
}

.button-primary {
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid var(--text-primary);
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--page-bg);
}

.button-secondary {
  min-height: 46px;
  padding: 11px 24px;
  border: 1px solid var(--line-color);
  background: transparent;
  color: var(--text-primary);
}

@media (max-width: 1100px) {
  :root {
    --page-gutter: 40px;
  }

  .chapter-header {
    grid-template-columns: 180px minmax(0, 1fr) 180px;
  }

  .chapter-page {
    --page-gutter: 40px;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 22px;
    --page-top-space: 24px;
    --page-bottom-space: 36px;
  }

  .chapter-page {
    --page-gutter: 22px;
    width: calc(100% - 24px);
    min-height: calc(100vh - 24px);
    margin: 12px auto;
  }

  .chapter-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .chapter-header__centre {
    width: 100%;
  }

  .chapter-title,
  .chapter-subtitle {
    text-align: center;
  }

  .chapter-header__right {
    display: none;
  }
}

/* Many Voices: keep background keywords inside the quote field. */
.many-voices-content .voices-wall {
  position: relative;
  overflow: visible;
}

.voices-wall__content {
  position: relative;
  z-index: 1;
  overflow: visible;
}

.background-keyword-layer.voices-whisper-layer {
  position: absolute;
  inset: 40px 80px;
  z-index: 0;
  display: block;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.background-keyword-layer .voice-whisper {
  position: absolute;
  display: block;
  max-width: 100%;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(72px, 9vw, 140px);
  line-height: 1;
  color: var(--voice-accent);
  opacity: 0.075;
  white-space: nowrap;
  transform: none;
}

.background-keyword-layer .voice-whisper--1 { top: 4%; left: 0; }
.background-keyword-layer .voice-whisper--2 { top: 20%; left: 28%; }
.background-keyword-layer .voice-whisper--3 { top: 36%; left: 8%; }
.background-keyword-layer .voice-whisper--4 { top: 52%; left: 36%; }
.background-keyword-layer .voice-whisper--5 { top: 68%; left: 4%; }
.background-keyword-layer .voice-whisper--6 { top: 82%; left: 30%; }
.background-keyword-layer .voice-whisper--7 { top: 90%; left: 8%; }

.background-keyword-layer .voice-whisper--long {
  max-width: 44vw;
  font-size: clamp(56px, 7vw, 110px);
  line-height: 0.95;
  white-space: normal;
}

.voices-wall__content .voices-opening,
.voices-wall__content .voices-chorus,
.voices-wall__content .voices-release,
.voices-wall__content .voice-slot,
.voices-wall__content .voice-quote {
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  .background-keyword-layer.voices-whisper-layer {
    inset: 28px 20px;
  }

  .background-keyword-layer .voice-whisper {
    font-size: clamp(50px, 15vw, 86px);
  }

  .background-keyword-layer .voice-whisper--long {
    max-width: 88%;
    font-size: clamp(42px, 12vw, 68px);
  }
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  background: var(--paper);
}

body {
  height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
  background: var(--paper);
}

button {
  font: inherit;
}

.app-shell {
  height: 100vh;
  overflow: hidden;
}

.intro-screen,
.diary-screen {
  height: 100vh;
  padding: 40px;
  overflow: hidden;
}

.intro-screen {
  display: grid;
  place-items: center;
  position: relative;
  text-align: center;
  background: var(--panel-bg);
  border: 14px solid rgba(238, 238, 238, 0.92);
}

.cover-page {
  --cursor-x: 50%;
  --cursor-y: 50%;
  overflow: hidden;
}

.cover-background,
.cover-ordinary-layer,
.cover-symptom-layer {
  position: absolute;
  inset: 0;
}

.cover-background {
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.cover-background p {
  position: absolute;
  margin: 0;
  font-family: var(--serif);
  line-height: 1.05;
  white-space: nowrap;
}

.cover-ordinary-layer p {
  color: var(--text-primary);
  font-size: clamp(42px, 5.2vw, 92px);
  opacity: 0.045;
}

.cover-ordinary-layer p:nth-child(1) {
  top: 19%;
  left: 8%;
}

.cover-ordinary-layer p:nth-child(2) {
  top: 34%;
  right: 8%;
}

.cover-ordinary-layer p:nth-child(3) {
  bottom: 28%;
  left: 6%;
}

.cover-ordinary-layer p:nth-child(4) {
  right: 8%;
  bottom: 13%;
}

.cover-symptom-layer {
  opacity: 0;
  transition: opacity 280ms ease;
  -webkit-mask-image: radial-gradient(circle 180px at var(--cursor-x) var(--cursor-y), #000 0%, #000 38%, transparent 72%);
  mask-image: radial-gradient(circle 180px at var(--cursor-x) var(--cursor-y), #000 0%, #000 38%, transparent 72%);
}

.cover-page.is-cover-active .cover-symptom-layer,
.cover-page.is-button-hovering .cover-symptom-layer {
  opacity: 1;
}

.cover-page.is-button-hovering .cover-symptom-layer {
  -webkit-mask-image: radial-gradient(circle 320px at 50% 52%, #000 0%, #000 38%, transparent 72%);
  mask-image: radial-gradient(circle 320px at 50% 52%, #000 0%, #000 38%, transparent 72%);
}

.cover-symptom-layer p {
  color: var(--active-accent, #b06a5b);
  font-size: clamp(34px, 4.5vw, 78px);
  font-style: italic;
  opacity: 0.18;
}

.cover-symptom-layer p:nth-child(1) {
  top: 26%;
  right: 10%;
}

.cover-symptom-layer p:nth-child(2) {
  top: 43%;
  left: 10%;
}

.cover-symptom-layer p:nth-child(3) {
  right: 14%;
  bottom: 35%;
}

.cover-symptom-layer p:nth-child(4) {
  bottom: 22%;
  left: 9%;
}

.cover-symptom-layer p:nth-child(5) {
  right: 10%;
  bottom: 14%;
}

.intro-screen .small-label {
  position: absolute;
  z-index: 2;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.intro-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  margin-top: clamp(52px, 8vh, 96px);
}

.intro-screen h1 {
  margin: 0;
  font-size: clamp(4rem, 9vw, 9.5rem);
  line-height: 0.92;
  font-family: var(--serif);
  font-weight: 500;
}

.cover-title {
  font-size: clamp(86px, 9vw, 132px);
  margin-bottom: 16px;
  transition: transform 420ms ease, letter-spacing 420ms ease;
}

.cover-page.is-cover-active .cover-title {
  transform: translateY(-2px);
  letter-spacing: -0.035em;
}

.cover-content {
  position: relative;
  z-index: 3;
}

.intro-copy {
  max-width: 760px;
  margin: 12px auto 0;
  font-size: clamp(1.25rem, 2vw, 2.2rem);
  line-height: 1.35;
}

.cover-subtitle {
  max-width: 760px;
  margin: 0 auto 18px;
}

@media (min-width: 1100px) {
  .intro-content.cover-content {
    width: 100%;
    max-width: 1280px;
  }

  .intro-content.cover-content .cover-subtitle {
    width: max-content;
    max-width: none;
    white-space: nowrap;
  }
}

.intro-note {
  margin: 0 auto 44px;
  color: var(--muted);
  font-size: clamp(0.78rem, 1vw, 1rem);
  line-height: 1.4;
}

.start-button {
  margin-top: 0;
  padding: 17px 38px;
  border: 0;
  border-radius: 999px;
  background: var(--cover-button-bg);
  color: var(--cover-button-text);
  font-size: 1.28rem;
  cursor: pointer;
  box-shadow: none;
  transition: transform 320ms ease, background 320ms ease;
}

.cover-button {
  min-width: 220px;
  padding: 16px 30px;
}

@media (max-width: 760px) {
  .cover-ordinary-layer p {
    font-size: clamp(30px, 8vw, 52px);
  }

  .cover-symptom-layer {
    opacity: 0.5;
    -webkit-mask-image: radial-gradient(circle 220px at 50% 55%, #000 0%, #000 36%, transparent 76%);
    mask-image: radial-gradient(circle 220px at 50% 55%, #000 0%, #000 36%, transparent 76%);
  }

  .cover-page:not(.is-cover-active) .cover-symptom-layer {
    opacity: 0.5;
  }

  .cover-symptom-layer p {
    font-size: clamp(26px, 7vw, 46px);
  }

  .cover-symptom-layer p:nth-child(2),
  .cover-symptom-layer p:nth-child(5) {
    white-space: normal;
    max-width: 78%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cover-title,
  .cover-symptom-layer {
    transition: none;
  }
}

.start-button:hover {
  transform: translateY(-1px);
  background: var(--cover-button-bg-hover);
}

.start-button:active {
  transform: translateY(0);
}

.start-button:focus-visible {
  outline: 2px solid rgba(51, 47, 43, 0.55);
  outline-offset: 4px;
}

.is-hidden {
  display: none;
}

.paper-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 360px);
  gap: 30px;
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  align-items: stretch;
}

.diary-panel,
.symptom-panel {
  position: relative;
  height: 100%;
  min-height: 0;
  background: var(--panel-bg);
  border: 1px solid rgba(200, 193, 180, 0.34);
  box-shadow: 0 16px 42px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.diary-panel {
  display: flex;
  flex-direction: column;
  padding: 0 clamp(58px, 5vw, 86px) clamp(32px, 3.7vw, 58px);
  overflow: hidden;
}

.diary-panel::before,
.symptom-panel::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}

.panel-header {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 24px 0 14px;
  border-bottom: 1px solid var(--line);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.panel-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 3.15vw, 52px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.diary-title {
  text-align: center;
}

.panel-sub-row {
  display: flex;
  align-items: flex-start;
  min-height: 52px;
  margin-top: 12px;
  box-sizing: border-box;
}

.diary-meta-row,
.symptom-description-row {
  justify-content: flex-start;
}

.date-stack {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--muted);
}

.date-stack .small-label {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.date-stack p:last-child {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink);
}

.small-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.timeline {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  padding-top: 30px;
  --axis-left: 112px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 43px;
  bottom: 54px;
  left: var(--axis-left);
  width: 1px;
  background: rgba(111, 107, 98, 0.32);
}

.diary-scroll {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 16px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 240ms ease;
}

.diary-scroll:hover,
.diary-scroll.is-scrolling {
  scrollbar-color: rgba(70, 66, 60, 0.28) transparent;
}

.diary-scroll::-webkit-scrollbar {
  width: 5px;
}

.diary-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.diary-scroll::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.diary-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(58, 58, 55, 0);
  transition: background 240ms ease;
}

.diary-scroll:hover::-webkit-scrollbar-thumb,
.diary-scroll.is-scrolling::-webkit-scrollbar-thumb {
  background: rgba(70, 66, 60, 0.26);
}

.entry {
  display: grid;
  grid-template-columns: 88px 24px minmax(0, 780px);
  column-gap: 12px;
  padding: 0 0 38px;
  border: 0;
}

.entry:last-child {
  padding-bottom: 0;
}

.entry time {
  position: relative;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
  padding-top: 2px;
  text-align: right;
  color: var(--ink);
}

.entry p {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
}

.time-axis {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 100%;
  grid-column: 2;
  grid-row: 1;
}

.axis-dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 1.5px solid rgba(58, 58, 55, 0.72);
  border-radius: 50%;
  background: var(--panel-bg);
  transition: background 420ms ease, border-color 420ms ease;
}

.entry.is-affected .axis-dot {
  border-color: var(--entry-color);
  background: var(--entry-color);
}

.entry-copy {
  grid-column: 3;
  min-width: 0;
}

.original-text {
  color: var(--ink);
}

.symptom-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    grid-template-rows var(--reveal-duration, 360ms) cubic-bezier(0.22, 1, 0.36, 1),
    opacity var(--fade-duration, 340ms) ease,
    transform var(--reveal-duration, 360ms) cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.symptom-reveal.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
}

.symptom-reveal__inner {
  overflow: hidden;
}

.symptom-reveal.is-visible .symptom-reveal__inner {
  overflow: visible;
}

.symptom-text {
  position: relative;
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--symptom-color);
}

.day-summary {
  display: grid;
  grid-template-columns: 88px 24px minmax(0, 780px);
  column-gap: 12px;
  margin: 38px 0 4px;
  padding: 0;
  border: 0;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 300ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.day-summary.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 600ms ease 500ms,
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1) 500ms;
}

.summary-copy {
  grid-column: 3;
}

.summary-line {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
}

.symptom-panel {
  display: flex;
  flex-direction: column;
  padding: 0 28px 30px;
  background: var(--panel-bg);
  overflow: hidden;
  position: sticky;
  top: 40px;
  align-self: flex-start;
}

.symptom-panel-title {
  text-align: center;
}

.symptom-panel-copy {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}

.symptom-panel-description {
  max-width: 300px;
  margin: 0;
  text-align: left;
}

.symptom-list {
  display: grid;
  gap: 0;
  margin-top: 0;
}

.symptom-button {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 16px;
  align-items: center;
  width: 100%;
  height: 58px;
  min-height: 58px;
  padding: 0 10px 0 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.symptom-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: transparent;
}

.symptom-button.is-active {
  background: color-mix(in srgb, var(--symptom-color) 8%, transparent);
}

.symptom-button.is-active[data-symptom="psychologicalIssues"] {
  background: rgba(114, 87, 128, 0.09);
}

.symptom-button.is-active::before {
  background: var(--symptom-color);
}

.symptom-button:last-child {
  border-bottom: 1px solid var(--line);
}

.symptom-button:first-child {
  border-top: 0;
}

.symptom-marker {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.symptom-button.is-active .symptom-marker {
  border-color: var(--symptom-color);
  background: var(--symptom-color);
}

.symptom-name {
  width: fit-content;
  padding: 2px 0;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
  transition: color 220ms ease, letter-spacing 220ms ease, text-shadow 220ms ease, transform 220ms ease;
}

.symptom-button.is-active .symptom-name,
.symptom-button.is-active:hover .symptom-name {
  background: transparent;
  color: var(--symptom-color);
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: 0 0 0.01px currentColor;
}

.symptom-button:hover .symptom-name {
  background: transparent;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0;
  text-shadow: none;
  transform: translateX(2px);
}

.symptom-button:hover,
.symptom-button:focus-visible {
  background: rgba(200, 193, 180, 0.1);
}

.reset-button {
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  cursor: pointer;
}

.symptom-source-note {
  margin: 20px 0 12px;
  padding: 0;
  text-align: left;
}

.interaction-hint {
  margin: 10px 0 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transition: opacity 500ms ease;
}

.interaction-hint.is-visible {
  opacity: 1;
}

.interactive-phrase {
  position: relative;
  display: inline-block;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  text-decoration-color: currentColor;
  outline: none;
}

.interactive-phrase:hover,
.interactive-phrase:focus-visible {
  text-decoration-style: solid;
}

.interactive-phrase:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.hot-flash-trigger::before {
  content: "";
  position: absolute;
  inset: -0.35em -0.45em;
  z-index: -1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(164, 96, 83, 0.2), rgba(164, 96, 83, 0));
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 500ms ease, transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hot-flash-trigger:hover::before,
.hot-flash-trigger:focus-visible::before,
.hot-flash-trigger.is-active::before {
  opacity: 0.16;
  transform: scale(1);
}

.hot-flash-wave {
  position: absolute;
  left: var(--origin-x);
  top: var(--origin-y);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      circle,
      rgba(171, 83, 62, 0.23) 0%,
      rgba(194, 111, 78, 0.13) 42%,
      rgba(194, 111, 78, 0) 72%
    );
  transform: translate(-50%, -50%) scale(0.35);
  opacity: 0;
}

.hot-flash-wave.is-active {
  animation: hot-flash-expand 2200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes hot-flash-expand {
  0% {
    transform: translate(-50%, -50%) scale(0.35);
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  58% {
    opacity: 0.8;
  }

  100% {
    transform: translate(-50%, -50%) scale(8);
    opacity: 0;
  }
}

.pain-sting-phrase {
  transform-origin: center;
  will-change: transform, font-weight;
}

.pain-sting-phrase.is-stinging {
  animation: pain-sting 560ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pain-sting {
  0%,
  100% {
    transform: scale(1);
    font-weight: 400;
  }

  18% {
    transform: scale(1.1);
    font-weight: 650;
  }

  52% {
    transform: scale(0.99);
    font-weight: 500;
  }
}

.sleep-time-trigger {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: default;
}

.sleep-time-trigger.interactive-time {
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  text-decoration-color: currentColor;
}

.sleep-time-trigger.interactive-time:hover,
.sleep-time-trigger.interactive-time:focus-visible {
  text-decoration-style: solid;
}

.sleep-time-trigger:focus-visible {
  outline: 1px solid var(--entry-color);
  outline-offset: 4px;
}

.sleep-interaction-hint {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 150px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  text-align: right;
  opacity: 0;
  transition: opacity 500ms ease;
  pointer-events: none;
}

.sleep-interaction-hint.is-visible {
  opacity: 1;
}

.sleep-main-time,
.interrupted-night-timeline,
.interrupted-night-node,
.interrupted-night-node__copy {
  overflow: visible;
}

.entry.sleep-timeline-open .sleep-main-time {
  grid-column: 1 / 3;
  width: 124px;
  padding-top: 0;
  text-align: left;
}

.entry.sleep-timeline-open .time-axis {
  opacity: 0;
}

.entry.sleep-timeline-open .sleep-time-trigger {
  display: none;
}

.interrupted-night-timeline {
  --rail-x: 112px;
  position: relative;
  display: grid;
  grid-template-rows: 0fr;
  width: 124px;
  padding: 0 0 6px;
  opacity: 0;
  transition:
    grid-template-rows 650ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 360ms ease;
}

.interrupted-night-timeline.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.interrupted-night-timeline__inner {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.interrupted-night-timeline__rail {
  position: absolute;
  z-index: 1;
  left: calc(var(--rail-x) - 0.5px);
  top: 11px;
  bottom: 53px;
  width: 1px;
  background: rgba(82, 108, 130, 0.52);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.interrupted-night-timeline.is-open .interrupted-night-timeline__rail {
  transform: scaleY(1);
}

.interrupted-night-node {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 100px 24px;
  column-gap: 0;
  align-items: start;
  width: 124px;
  min-height: 82px;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  opacity: 0;
  transform: translateY(-5px);
  transition:
    opacity 560ms ease,
    transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0ms;
}

.interrupted-night-timeline.is-open .interrupted-night-node {
  transition-delay: var(--node-delay, 0ms);
}

.interrupted-night-node:last-child {
  min-height: 64px;
}

.interrupted-night-node.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.interrupted-night-node__copy {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 12px;
  text-align: right;
}

.interrupted-night-node__time {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  white-space: nowrap;
}

.interrupted-night-node:not(.interrupted-night-node--start) .interrupted-night-node__time {
  color: var(--entry-color);
}

.interrupted-night-node__label {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.interrupted-night-node__dot {
  grid-column: 2;
  justify-self: center;
  position: relative;
  z-index: 2;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border: 1px solid var(--entry-color);
  border-radius: 50%;
  background: var(--panel-bg);
  transition: background-color 350ms ease, border-color 350ms ease;
}

.interrupted-night-node.is-visible .interrupted-night-node__dot {
  background: var(--entry-color);
}

.interrupted-night-node--start {
  cursor: pointer;
}

.interrupted-night-node--start .interrupted-night-node__time {
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  text-decoration-color: currentColor;
}

.interrupted-night-node--start:hover .interrupted-night-node__time,
.interrupted-night-node--start:focus-visible .interrupted-night-node__time {
  text-decoration-style: solid;
}

.interrupted-night-node--start:focus-visible {
  outline: 1px solid var(--entry-color);
  outline-offset: 4px;
}

.sleep-inline-time {
  border-radius: 2px;
  transition:
    color 350ms ease,
    background-color 350ms ease;
}

.sleep-inline-time.is-highlighted {
  color: var(--entry-color);
  background: rgba(82, 108, 130, 0.09);
}

.psych-trigger {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  text-decoration-color: currentColor;
}

.psych-trigger:hover,
.psych-trigger:focus-visible,
.psych-trigger.is-active {
  text-decoration-style: solid;
}

.psych-trigger:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.psych-word-layer {
  position: absolute;
  inset: -18px 0 -22px;
  z-index: 3;
  pointer-events: none;
}

.psych-floating-word {
  position: absolute;
  left: var(--word-x);
  top: var(--word-y);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid rgba(114, 87, 128, 0.22);
  border-radius: 8px;
  background: rgba(235, 229, 239, 0.8);
  box-shadow: 0 4px 14px rgba(58, 58, 55, 0.08);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  color: #5c4a72;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) translateY(6px) scale(0.96);
}

.psych-word-layer.is-active .psych-floating-word {
  animation: psych-word-appear 3800ms ease forwards;
  animation-delay: var(--word-delay);
}

@keyframes psych-word-appear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(8px) scale(0.96);
  }

  22% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }

  72% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-3px) scale(0.99);
  }
}

.reset-button:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.reset-button:disabled {
  cursor: default;
  opacity: 0.42;
}

button:focus-visible {
  outline: 2px solid rgba(58, 58, 55, 0.55);
  outline-offset: 3px;
}

@media (max-width: 1250px) {
  .panel-title {
    font-size: 46px;
  }
}

@media (max-width: 1080px) {
  .panel-title {
    font-size: 40px;
  }
}

@media (max-width: 980px) {
  .intro-screen,
  .diary-screen {
    padding: 28px;
  }

  .paper-stage {
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 18px;
  }

  .diary-panel {
    padding: 0 38px 42px;
  }

  .symptom-panel {
    padding: 0 22px 42px;
  }

  .entry {
    grid-template-columns: 72px 22px minmax(0, 1fr);
    gap: 12px;
  }

  .timeline {
    --axis-left: 95px;
  }

  .entry.sleep-timeline-open .sleep-main-time {
    width: 106px;
  }

  .interrupted-night-timeline {
    --rail-x: 95px;
    width: 106px;
  }

  .interrupted-night-node {
    grid-template-columns: 84px 22px;
    width: 106px;
  }

  .day-summary {
    grid-template-columns: 72px 22px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  html,
  body,
  .app-shell {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .diary-screen {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .paper-stage {
    grid-template-columns: 1fr;
    height: auto;
  }

  .symptom-panel {
    grid-row: 1;
    position: static;
    height: auto;
  }

  .diary-panel {
    height: auto;
    min-height: 70vh;
  }

  .diary-scroll {
    overflow: visible;
    padding-right: 0;
  }

}

@media (max-width: 560px) {
  .intro-screen {
    border-width: 8px;
  }

  .intro-screen h1 {
    font-size: 4.4rem;
  }

  .intro-copy {
    font-size: 1.18rem;
  }

  .start-button {
    margin-top: 70px;
  }

  .cover-button {
    margin-top: 0;
  }

  .diary-panel {
    padding: 0 22px 34px;
  }

  .entry p {
    font-size: 1rem;
  }

  .entry {
    grid-template-columns: 52px 20px minmax(0, 1fr);
  }

  .timeline {
    --axis-left: 74px;
  }

  .entry time {
    grid-column: 1;
  }

  .entry.sleep-timeline-open .sleep-main-time {
    width: 84px;
  }

  .interrupted-night-timeline {
    --rail-x: 74px;
    width: 84px;
  }

  .interrupted-night-node {
    grid-template-columns: 64px 20px;
    width: 84px;
    min-height: 76px;
  }

  .interrupted-night-node__copy {
    padding-right: 10px;
  }

  .interrupted-night-node__time {
    font-size: 17px;
  }

  .interrupted-night-node__label {
    font-size: 14px;
  }

  .entry-copy {
    grid-column: 3;
  }

  .day-summary {
    grid-template-columns: 52px 20px minmax(0, 1fr);
  }

}

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

  .hot-flash-wave,
  .brain-fog-word,
  .pain-sting-phrase,
  .interrupted-night-timeline,
  .interrupted-night-timeline__rail,
  .interrupted-night-node,
  .sleep-inline-time,
  .psych-floating-word {
    animation: none !important;
    transition-duration: 1ms !important;
  }

  .psych-word-layer.is-active .psych-floating-word {
    animation: psych-word-reduced 2800ms ease forwards !important;
    animation-delay: 0ms !important;
  }

  .interactive-phrase.is-static,
  .interactive-phrase.is-active {
    text-decoration-style: solid;
  }
}

@keyframes psych-word-reduced {
  0%,
  10% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

.summary-next-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 0 24px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  cursor: pointer;
  transition: border-color 220ms ease, color 220ms ease, background 220ms ease;
}

.summary-next-button:hover,
.summary-next-button:focus-visible {
  border-color: var(--ink);
  background: rgba(200, 193, 180, 0.1);
}

.voices-intro-screen,
.voices-screen {
  height: 100vh;
  padding: 40px;
  background: var(--paper);
}

.voices-intro-screen {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.voices-intro-shell {
  width: min(100%, var(--page-content-max, 1280px));
  padding: clamp(44px, 6vw, 84px);
  background: var(--panel-bg);
  border: 1px solid rgba(200, 193, 180, 0.36);
  box-shadow: 0 18px 46px rgba(58, 58, 55, 0.055);
  text-align: center;
}

.chapter-number {
  margin: 0 0 28px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.16em;
}

.voices-intro-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(68px, 9vw, 132px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.voices-intro-copy {
  max-width: 720px;
  margin: 34px auto 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.32;
}

.voices-intro-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 760px;
  margin: 62px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.voices-intro-stats div {
  display: grid;
  gap: 8px;
}

.voices-intro-stats strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 62px);
  font-weight: 400;
  line-height: 1;
}

.voices-intro-stats span {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.voices-enter-button {
  margin-top: 58px;
}

.voices-screen {
  overflow-y: auto;
  overflow-x: hidden;
}

.voices-screen::-webkit-scrollbar {
  width: 5px;
}

.voices-screen::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(70, 66, 60, 0.24);
}

.voices-shell {
  position: relative;
  width: min(100%, 1440px);
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  padding: clamp(34px, 4.5vw, 64px);
  background: var(--panel-bg);
  border: 1px solid rgba(200, 193, 180, 0.36);
  box-shadow: 0 18px 46px rgba(58, 58, 55, 0.055);
}

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.chapter-link {
  appearance: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0 0 5px;
  background: transparent;
  color: rgba(58, 58, 55, 0.46);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

button.chapter-link {
  cursor: pointer;
}

.chapter-link.is-current {
  color: var(--ink);
  border-color: var(--ink);
}

.chapter-link.is-disabled {
  opacity: 0.42;
}

.voices-hero {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin-top: 56px;
}

.voices-hero h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(72px, 8vw, 128px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.voices-hero p:last-child {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.45;
}

.voices-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-top: 50px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.voices-tab {
  appearance: none;
  position: relative;
  border: 0;
  padding: 0 0 8px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.voices-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--voice-accent);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: left;
  transition: opacity 220ms ease, transform 220ms ease;
}

.voices-tab:hover::after,
.voices-tab:focus-visible::after,
.voices-tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.voices-tab.is-active {
  color: var(--voice-accent);
  font-weight: 600;
}

.voices-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-top: 42px;
}

.voices-overview h3 {
  margin: 8px 0 0;
  color: var(--voice-accent, var(--ink));
  font-family: var(--serif);
  font-size: clamp(44px, 4.6vw, 72px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.voices-overview p:not(.small-label),
.voices-progress,
.theme-count,
.voices-source-note,
.voices-conclusion p {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
}

.voices-overview p:not(.small-label) {
  max-width: 520px;
  margin: 16px 0 0;
}

.voices-progress {
  margin: 0;
  text-align: right;
}

.voices-theme-area {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.voices-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.theme-chip {
  appearance: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0 0 4px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}

.theme-chip span {
  margin-left: 5px;
  color: rgba(111, 107, 98, 0.72);
}

.theme-chip:hover,
.theme-chip:focus-visible,
.theme-chip.is-active {
  color: var(--ink);
  border-color: var(--voice-accent);
}

.theme-count {
  min-height: 22px;
  margin: 0;
}

.voices-wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 64px;
  margin-top: clamp(64px, 8vw, 110px);
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line);
}

.voice-quote {
  grid-column: var(--quote-col);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  outline: none;
}

.voices-wall.is-visible .voice-quote {
  animation: quote-enter 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--quote-delay);
}

.voices-wall.is-visible .voice-quote.is-muted {
  animation: quote-enter-muted 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--quote-delay);
}

@keyframes quote-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes quote-enter-muted {
  to {
    opacity: 0.36;
    transform: translateY(0);
  }
}

.voice-quote__number {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.12em;
}

.voice-quote__rule {
  display: block;
  width: 34px;
  height: 1px;
  margin: 13px 0 18px;
  background: var(--quote-accent);
  transform-origin: left;
  transition: width 260ms ease;
}

.voice-quote__text {
  margin: 0;
  color: inherit;
  font-family: var(--serif);
  font-weight: 400;
}

.voice-quote--large .voice-quote__text {
  font-size: clamp(27px, 3vw, 34px);
  line-height: 1.25;
}

.voice-quote--medium .voice-quote__text {
  font-size: clamp(21px, 2vw, 25px);
  line-height: 1.38;
}

.voice-quote--small .voice-quote__text {
  font-size: clamp(17px, 1.45vw, 19px);
  line-height: 1.55;
}

.voice-quote__themes {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.45;
}

.voice-quote__open {
  appearance: none;
  margin-top: 18px;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0 0 3px;
  background: transparent;
  color: var(--quote-accent);
  font-family: var(--sans);
  font-size: 13px;
  opacity: 0;
  cursor: pointer;
  transition: opacity 220ms ease;
}

.voice-quote:hover .voice-quote__rule,
.voice-quote:focus-within .voice-quote__rule,
.voice-quote:focus-visible .voice-quote__rule {
  width: 72px;
}

.voice-quote:hover .voice-quote__open,
.voice-quote:focus-within .voice-quote__open,
.voice-quote:focus-visible .voice-quote__open {
  opacity: 1;
}

.voices-wall:has(.voice-quote:hover) .voice-quote:not(:hover),
.voices-wall:has(.voice-quote:focus-visible) .voice-quote:not(:focus-visible):not(:focus-within) {
  opacity: 0.52;
}

.voice-quote.has-opened .voice-quote__number::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 7px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  color: var(--quote-accent);
}

.voices-conclusion {
  max-width: 760px;
  margin-top: 72px;
}

.voices-conclusion h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.voices-conclusion p {
  max-width: 620px;
  margin: 22px 0 0;
}

.reflection-button {
  min-height: 46px;
  margin-top: 26px;
  padding: 0 24px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
}

.reflection-button:disabled {
  opacity: 0.5;
}

.voices-source-note {
  display: grid;
  gap: 4px;
  margin-top: 62px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.voices-source-note p {
  margin: 0;
}

.quote-overlay[hidden] {
  display: none;
}

.quote-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.quote-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.quote-overlay__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(238, 235, 229, 0.76);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  cursor: pointer;
}

.quote-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: min(82vh, 760px);
  overflow-y: auto;
  padding: clamp(30px, 5vw, 54px);
  background: var(--panel-bg);
  border: 1px solid rgba(200, 193, 180, 0.74);
  box-shadow: 0 22px 64px rgba(58, 58, 55, 0.14);
  transform: translateY(8px);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.quote-overlay.is-open .quote-overlay__panel {
  transform: translateY(0);
}

.quote-overlay__meta {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.quote-overlay__title {
  margin: 20px 0 0;
  color: var(--voice-accent, var(--ink));
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.quote-overlay__text {
  margin: 30px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.quote-overlay__source {
  margin: 24px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}

.quote-overlay__themes {
  margin-top: 26px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}

.quote-overlay__themes span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quote-overlay__themes p {
  margin: 0;
}

.quote-overlay__actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.quote-nav-button,
.quote-close-button {
  min-height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  cursor: pointer;
}

.quote-nav-button:disabled {
  opacity: 0.42;
  cursor: default;
}

body.quote-overlay-open .voices-screen {
  overflow: hidden;
}

@media (max-width: 980px) {
  .voices-intro-screen,
  .voices-screen {
    padding: 28px;
  }

  .voices-shell {
    min-height: calc(100vh - 56px);
    padding: 34px;
  }

  .voices-wall {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 52px;
  }

  .voice-quote {
    grid-column: span 3 !important;
  }

  .voices-overview {
    grid-template-columns: 1fr;
  }

  .voices-progress {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .voices-intro-screen,
  .voices-screen {
    height: auto;
    min-height: 100vh;
    padding: 18px;
    overflow: visible;
  }

  .voices-screen {
    overflow-y: visible;
  }

  .voices-intro-shell,
  .voices-shell {
    padding: 28px 22px;
  }

  .voices-intro-stats {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .chapter-nav,
  .voices-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 16px;
  }

  .voices-hero {
    margin-top: 42px;
  }

  .voices-hero h2,
  .voices-intro-title {
    font-size: clamp(54px, 17vw, 78px);
  }

  .voices-wall {
    grid-template-columns: 1fr;
    row-gap: 46px;
    margin-top: 58px;
  }

  .voice-quote {
    grid-column: 1 / -1 !important;
  }

  .voice-quote--large .voice-quote__text,
  .voice-quote--medium .voice-quote__text {
    font-size: 24px;
  }

  .voice-quote--small .voice-quote__text {
    font-size: 18px;
  }

  .quote-overlay {
    padding: 0;
  }

  .quote-overlay__panel {
    width: 100%;
    min-height: 100vh;
    max-height: 100vh;
    border: 0;
  }

  .quote-overlay__text {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .voices-wall.is-visible .voice-quote,
  .voices-wall.is-visible .voice-quote.is-muted,
  .quote-overlay,
  .quote-overlay__panel {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition-duration: 0.001ms !important;
  }

  .voices-wall.is-visible .voice-quote.is-muted {
    opacity: 0.36 !important;
  }
}

.voices-hero {
  gap: 14px;
  margin-top: 42px;
}

.voices-hero h2 {
  font-size: clamp(64px, 7vw, 104px);
}

.voices-tabs {
  margin-top: 34px;
  padding: 16px 0;
}

.voices-overview {
  margin-top: 28px;
}

.voices-overview h3 {
  font-size: clamp(38px, 4vw, 62px);
}

.voices-theme-area {
  gap: 10px;
  margin-top: 24px;
}

.voices-wall {
  margin-top: 42px;
}

.panel-title,
.voices-hero h2 {
  color: #333333;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
}

.entry p,
.original-text,
.voice-quote__text,
.voice-quote--large .voice-quote__text,
.voice-quote--medium .voice-quote__text,
.voice-quote--small .voice-quote__text {
  color: #333333;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
}

.symptom-text {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
}

/* Symptom passages inherit the selected button's accent colour. */
.entry p.symptom-text {
  color: var(--symptom-color);
}

.symptom-name,
.voices-tab,
.reset-button,
.voices-shortcut-button,
.reflection-button,
.reflection-back-button,
.quote-nav-button,
.quote-close-button {
  font-family: var(--sans);
  font-size: 15px;
  color: #333333;
}

.symptom-panel-copy,
.voices-hero p:last-child,
#voicesCategoryDescription,
.voices-conclusion p,
.reflection-shell p {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: #555555;
}

.small-label,
.date-stack .small-label,
.date-stack p:last-child,
.entry time,
.voice-quote__number,
.voice-quote__themes,
.voices-progress,
.theme-chip,
.theme-count,
.quote-overlay__meta,
.quote-overlay__themes,
.voices-source-note {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
  color: #777777;
  letter-spacing: 0.5px;
}

.date-stack p:last-child,
.entry time,
.voice-quote__themes,
.theme-chip,
.theme-count,
.voices-progress,
.voices-source-note {
  text-transform: none;
}

.voices-shortcut-button {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.voices-shortcut-button:hover,
.voices-shortcut-button:focus-visible,
.reflection-button:hover,
.reflection-button:focus-visible,
.reflection-back-button:hover,
.reflection-back-button:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
}

.summary-next-button,
.day-summary--bridge {
  display: none;
}

.chapter-nav,
.voices-hero .small-label,
.voices-overview > div {
  display: none;
}

.voices-screen {
  padding: 40px;
}

.voices-shell {
  padding: clamp(34px, 4vw, 56px);
}

.voices-hero {
  margin-top: 0;
  gap: 10px;
}

.voices-tabs {
  gap: 18px 34px;
  margin-top: 34px;
  padding: 16px 0;
}

.voices-tab {
  font-size: 16px;
}

.voices-overview {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.voices-progress {
  margin: 0;
  text-align: right;
}

.voices-theme-area {
  margin-top: 22px;
}

.theme-count:empty {
  display: none;
}

.voices-wall {
  column-gap: 44px;
  row-gap: 40px;
  margin-top: 34px;
}

.voice-quote__number {
  text-transform: uppercase;
}

.voice-quote__rule {
  width: 28px;
  margin: 9px 0 16px;
}

.voice-quote__themes {
  margin-top: 12px;
}

.voice-quote__open {
  margin-top: 12px;
  font-size: 12px;
}

.voices-conclusion h3 {
  color: #333333;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.16;
  font-weight: 400;
  letter-spacing: 0;
}

.reflection-button {
  cursor: pointer;
  opacity: 1;
}

.quote-overlay__panel {
  width: min(100%, 680px);
  padding: 48px 54px 44px;
}

.quote-overlay__x {
  position: absolute;
  top: 18px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #333333;
  font-family: var(--sans);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.quote-overlay__panel:focus {
  outline: none;
}

.quote-overlay__title {
  color: var(--voice-accent, #333333);
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0;
}

.quote-overlay__text {
  color: #333333;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
}

.quote-overlay__source {
  display: none;
}

.quote-overlay__actions {
  grid-template-columns: 1fr 1fr;
}

.reflection-screen {
  height: 100vh;
  padding: 40px;
  background: var(--paper);
  overflow: hidden;
}

.reflection-shell {
  position: relative;
  display: block;
  width: min(100%, 1440px);
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  padding: clamp(46px, 6vw, 86px);
  background: var(--panel-bg);
  border: 1px solid rgba(200, 193, 180, 0.36);
  box-shadow: 0 18px 46px rgba(58, 58, 55, 0.055);
}

.reflection-nav {
  position: absolute;
  top: 28px;
  left: clamp(34px, 4vw, 56px);
  z-index: 2;
}

.reflection-content {
  width: min(100%, 760px);
  margin: 0 auto;
  text-align: center;
}

.reflection-shell h2 {
  margin: 10px 0 0;
  color: #333333;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.1;
  font-weight: 400;
}

.reflection-question {
  display: block;
  margin-top: clamp(46px, 6vw, 76px);
  color: #333333;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
  font-weight: 400;
}

.reflection-back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #777777;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
}

.reflection-back-button::before {
  content: "<";
}

.reflection-input {
  width: min(100%, 640px);
  min-height: 168px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: #333333;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  resize: vertical;
}

.reflection-input:focus-visible {
  outline: 2px solid rgba(58, 58, 55, 0.28);
  outline-offset: 4px;
}

@media (max-width: 720px) {
  .panel-title,
  .voices-hero h2,
  .voices-conclusion h3,
  .quote-overlay__title,
  .reflection-shell h2 {
    font-size: 34px;
  }

  .voices-tabs {
    gap: 16px 24px;
  }

  .voices-wall {
    row-gap: 34px;
  }

  .reflection-screen {
    height: auto;
    min-height: 100vh;
    padding: 18px;
    overflow: visible;
  }

  .reflection-shell {
    min-height: calc(100vh - 36px);
    padding: 28px 22px;
  }

  .reflection-nav {
    position: static;
    margin-bottom: 24px;
  }
}

.diary-header,
.symptom-header {
  padding-top: 26px;
  padding-bottom: 10px;
}

.panel-sub-row {
  min-height: 32px;
  margin-top: 8px;
}

.diary-meta-row {
  align-items: center;
}

.date-stack {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.date-stack .small-label,
.date-stack p:last-child {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 400;
  color: #555555;
  letter-spacing: 0;
}

.date-stack .small-label {
  text-transform: uppercase;
}

.symptom-panel-description {
  font-size: 14px;
  line-height: 1.35;
}

.timeline {
  padding-top: 22px;
}

.voices-shell {
  position: relative;
  padding-top: 26px;
}

.chapter-nav {
  position: absolute;
  top: 28px;
  left: clamp(34px, 4vw, 56px);
  z-index: 2;
  display: block;
  padding: 0;
  border: 0;
}

.chapter-link {
  display: none;
}

#voicesBackToDiary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #777777;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#voicesBackToDiary::before {
  content: "<";
}

.voices-hero {
  justify-items: center;
  text-align: center;
  margin-top: 0;
  padding-top: 0;
}

.voices-hero h2 {
  margin-top: 0;
}

.voices-hero p:last-child {
  max-width: 520px;
  text-align: center;
}

.voices-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  justify-content: stretch;
  gap: 0;
  margin-top: 24px;
  padding: 12px 0;
}

.voices-tab {
  justify-self: stretch;
  text-align: center;
  white-space: nowrap;
}

.voices-overview {
  display: none;
}

.voices-theme-area {
  display: none;
}

.voices-theme-area .small-label,
.theme-chip,
.theme-chip span,
.theme-count {
  font-size: 12px;
  font-weight: 400;
  color: #777777;
  letter-spacing: 0.5px;
}

.voices-themes {
  gap: 8px 16px;
}

.voices-wall {
  width: 100%;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  row-gap: 32px;
  padding-bottom: 0;
  border-bottom: 0;
}

.voice-quote {
  grid-column: auto !important;
  text-align: left;
}

.voice-quote__text,
.voice-quote--large .voice-quote__text,
.voice-quote--medium .voice-quote__text,
.voice-quote--small .voice-quote__text {
  font-size: 18px;
  line-height: 1.6;
}

.voice-quote__themes {
  font-size: 12px;
  line-height: 1.4;
  color: #777777;
}

.voices-progress {
  display: none;
}

.voices-conclusion,
.voices-source-note {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.voices-conclusion {
  max-width: none;
  margin-top: 52px;
  padding-top: 52px;
  border-top: 1px solid var(--line);
}

.voices-source-note {
  border-top: 1px solid var(--line);
}

.quote-overlay__themes {
  display: none;
}

@media (max-width: 980px) {
  .voices-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 34px;
    row-gap: 30px;
  }
}

@media (max-width: 720px) {
  .date-stack {
    flex-wrap: wrap;
  }

  .chapter-nav {
    position: static;
    margin-bottom: 22px;
  }

  .voices-wall {
    grid-template-columns: 1fr;
  }

  .voices-tabs {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }
}

/* Many Voices and Reflection refinements */
.voices-shell {
  position: relative;
  padding: 30px clamp(42px, 4.2vw, 58px) 58px;
}

.chapter-nav {
  position: static;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.chapter-link {
  display: none;
}

#voicesBackToDiary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.voices-hero {
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.voices-hero h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
}

.voices-hero p:last-child {
  max-width: 560px;
  margin: 12px auto 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
}

.voices-tabs-wrapper {
  width: 100%;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.voices-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.voices-tab {
  position: relative;
  min-height: 54px;
  border: 0;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}

.voices-tab::after {
  left: 14%;
  right: 14%;
  bottom: -1px;
  height: 1.5px;
  background: var(--voice-accent);
  transform-origin: center;
}

.voices-tab:hover,
.voices-tab:focus-visible,
.voices-tab.is-active {
  color: var(--voice-accent);
}

.voices-tab.is-active {
  font-weight: 600;
}

.voices-theme-area,
.voices-overview,
.voices-progress {
  display: none;
}

.voices-wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 34px;
  row-gap: 72px;
  width: 100%;
  margin: 42px 0 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.voice-quote {
  grid-column: var(--quote-col) !important;
  color: var(--ink);
  text-align: left;
}

.voice-quote__number {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.voice-quote.has-opened .voice-quote__number::after,
.voice-quote.is-read .voice-quote__number::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 7px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

.voice-quote__rule {
  width: 30px;
  height: 1px;
  margin: 12px 0 20px;
  background: var(--quote-accent);
}

.voice-quote:hover .voice-quote__rule,
.voice-quote:focus-within .voice-quote__rule,
.voice-quote:focus-visible .voice-quote__rule {
  width: 46px;
}

.voice-quote__text,
.voice-quote--large .voice-quote__text,
.voice-quote--medium .voice-quote__text,
.voice-quote--small .voice-quote__text {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
}

.voice-quote--large .voice-quote__text {
  font-size: 25px;
  line-height: 1.35;
}

.voice-quote--medium .voice-quote__text {
  font-size: 21px;
  line-height: 1.45;
}

.voice-quote--small .voice-quote__text {
  font-size: 18px;
  line-height: 1.55;
}

.voice-quote__themes {
  margin-top: 14px;
  color: rgba(45, 42, 38, 0.64);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

.voice-quote__open {
  display: inline-block;
  margin-top: 12px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--quote-accent);
  font-family: var(--sans);
  font-size: 14px;
  opacity: 0;
  transform: translateY(3px);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: opacity 240ms ease, transform 240ms ease;
}

.voice-quote:hover .voice-quote__open,
.voice-quote:focus-within .voice-quote__open,
.voice-quote:focus-visible .voice-quote__open {
  opacity: 1;
  transform: translateY(0);
}

.quote-overlay__panel {
  width: min(100%, 760px);
  background: var(--panel-bg);
}

.quote-overlay__x {
  font-size: 0;
}

.quote-overlay__x::before {
  content: "\00d7";
  font-size: 26px;
  line-height: 1;
}

.quote-overlay__text {
  max-width: 720px;
  margin: 28px auto 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.6;
}

.quote-overlay__themes {
  display: grid;
  gap: 8px;
  max-width: 720px;
  margin: 26px auto 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}

.quote-overlay__source-label {
  margin: 0;
  color: rgba(45, 42, 38, 0.64);
}

.quote-overlay__themes p {
  margin: 0;
}

.quote-overlay__actions {
  grid-template-columns: 1fr 1fr minmax(82px, auto);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.voices-conclusion {
  width: 100%;
  max-width: none;
  margin: 76px 0 0;
  padding: 54px 0 0;
  border-top: 1px solid var(--line);
}

.voices-conclusion h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: 0;
}

.voices-conclusion p {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
}

.reflection-button {
  min-height: 44px;
  margin-top: 26px;
  padding: 0 24px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
}

.voices-source-note {
  width: 100%;
  max-width: none;
  margin: 76px 0 0;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
  color: rgba(45, 42, 38, 0.58);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.65;
}

.reflection-screen {
  height: 100vh;
  min-height: 100vh;
  padding: 40px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--paper);
}

.reflection-shell {
  display: block;
  width: min(100%, 1440px);
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  padding: 0 0 80px;
  background: var(--panel-bg);
  border: 1px solid rgba(200, 193, 180, 0.36);
  box-shadow: 0 18px 46px rgba(58, 58, 55, 0.055);
}

.reflection-header {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  align-items: center;
  padding: 30px 0 22px;
}

.reflection-back-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.reflection-header h2 {
  justify-self: center;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
}

.reflection-form {
  width: 100%;
  max-width: 760px;
  margin: 44px auto 0;
}

.reflection-question-block {
  margin: 0 0 54px;
  border: 0;
  padding: 0;
}

.reflection-question-block legend,
.reflection-open-label {
  display: grid;
  width: 100%;
  margin: 0;
}

.reflection-question-number {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1;
}

.reflection-question-title {
  display: block;
  margin: 10px 0 20px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.3;
  font-weight: 400;
}

.reflection-question-help {
  margin: -10px 0 18px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
}

.reflection-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
}

.reflection-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
}

.reflection-option:has(input:checked) {
  background: rgba(200, 193, 180, 0.16);
  font-weight: 600;
}

.reflection-textarea {
  width: 100%;
  min-height: 170px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: transparent;
  resize: vertical;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
}

.reflection-textarea::placeholder {
  color: rgba(45, 42, 38, 0.48);
}

.reflection-character-count {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.3;
  text-align: right;
}

.reflection-data-note {
  margin: 24px 0 20px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
}

.reflection-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.reflection-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  min-height: 52px;
  padding: 14px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--cover-button-bg);
  color: var(--cover-button-text);
  font-family: var(--sans);
  font-size: 16px;
  cursor: pointer;
  transition: background-color 280ms ease, transform 280ms ease;
}

.reflection-submit:hover {
  background: var(--cover-button-bg-hover);
  transform: translateY(-1px);
}

.reflection-submit:active {
  transform: translateY(0);
}

.reflection-skip {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.reflection-feedback {
  width: 100%;
  max-width: 760px;
  margin: 44px auto 0;
  color: var(--ink);
}

.reflection-feedback h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.2;
  font-weight: 400;
}

.reflection-feedback p {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
}

.reflection-feedback-summary {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.reflection-feedback-summary h4 {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reflection-feedback-summary ul {
  margin: 0;
  padding-left: 20px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}

.reflection-feedback-summary blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
}

.reflection-feedback-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
}

.reflection-feedback-actions button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  cursor: pointer;
}

.voices-tab:focus-visible,
.voice-quote:focus-visible,
.voice-quote__open:focus-visible,
.quote-nav-button:focus-visible,
.quote-close-button:focus-visible,
.quote-overlay__x:focus-visible,
.reflection-back-button:focus-visible,
.reflection-submit:focus-visible,
.reflection-skip:focus-visible,
.reflection-feedback-actions button:focus-visible,
.reflection-option:focus-within,
.reflection-textarea:focus-visible {
  outline: 2px solid rgba(58, 58, 55, 0.3);
  outline-offset: 4px;
}

@media (max-width: 980px) {
  .voices-hero h2,
  .reflection-header h2 {
    font-size: 42px;
  }

  .voices-tabs-wrapper,
  .voices-wall,
  .voices-conclusion,
  .voices-source-note {
    width: 100%;
  }

  .voices-wall {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 58px;
  }

  .voice-quote {
    grid-column: span 3 !important;
  }

  .reflection-header {
    grid-template-columns: 180px minmax(0, 1fr) 180px;
    padding: 28px 34px 20px;
  }
}

@media (max-width: 760px) {
  .voices-screen,
  .reflection-screen {
    height: auto;
    min-height: 100vh;
    padding: 18px;
    overflow-y: auto;
  }

  .voices-shell,
  .reflection-shell {
    min-height: calc(100vh - 36px);
    padding: 26px 0 54px;
  }

  .chapter-nav {
    position: static;
    margin: 0 22px 22px;
  }

  .voices-hero {
    padding: 0;
  }

  .voices-hero h2,
  .reflection-header h2 {
    font-size: 38px;
  }

  .voices-tabs-wrapper {
    width: 100%;
    overflow-x: auto;
  }

  .voices-tabs {
    display: flex;
    min-width: max-content;
  }

  .voices-tab {
    min-width: 150px;
  }

  .voices-wall {
    display: block;
    width: 100%;
    margin-top: 44px;
  }

  .voice-quote {
    margin-bottom: 50px;
  }

  .voice-quote__open {
    opacity: 1;
    transform: none;
  }

  .voice-quote--large .voice-quote__text,
  .voice-quote--medium .voice-quote__text {
    font-size: 22px;
  }

  .voices-conclusion,
  .voices-source-note {
    width: 100%;
  }

  .reflection-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 26px 0 18px;
  }

  .reflection-header h2 {
    align-self: center;
  }

  .reflection-header-spacer {
    display: none;
  }

  .reflection-form,
  .reflection-feedback {
    width: 100%;
    margin: 36px 0 0;
  }

  .reflection-option {
    min-height: 48px;
  }

  .reflection-textarea {
    font-size: 16px;
  }

  .reflection-actions,
  .reflection-feedback-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .reflection-skip {
    text-align: center;
  }
}

/* Unified editorial layout for Many Voices and Your Reflection */
:root {
  --page-gutter: 60px;
  --page-content-max: 1280px;
  --reading-column-max: 820px;
  --section-gap-large: 72px;
  --section-gap-medium: 48px;
  --section-gap-small: 24px;
}

.editorial-page {
  width: 100%;
  box-sizing: border-box;
}

.editorial-page__inner {
  width: 100%;
  max-width: var(--page-content-max);
  margin: 0 auto;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
  box-sizing: border-box;
}

.voices-screen,
.reflection-screen {
  background: var(--paper);
}

.voices-shell,
.reflection-shell {
  display: block;
  width: min(100%, 1440px);
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  padding: 0 0 80px;
  background: var(--panel-bg);
  border: 1px solid rgba(200, 193, 180, 0.36);
  box-shadow: 0 18px 46px rgba(58, 58, 55, 0.055);
}

.many-voices-header,
.reflection-header {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  align-items: start;
  width: 100%;
  padding: 30px 0 24px;
  box-sizing: border-box;
}

.chapter-nav {
  position: static;
  margin: 0;
}

.chapter-link {
  display: none;
}

#voicesBackToDiary,
.reflection-back-button {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

#voicesNavReflection {
  display: none !important;
}

.many-voices-heading {
  grid-column: 2;
  justify-self: center;
  width: 100%;
  text-align: center;
}

.many-voices-header__spacer,
.reflection-header-spacer {
  grid-column: 3;
  width: 100%;
}

.voices-hero {
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.voices-hero h2,
.reflection-header h2 {
  justify-self: center;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
}

.voices-hero p:last-child {
  max-width: 560px;
  margin: 14px auto 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
}

.voices-tabs-wrapper {
  width: 100%;
  max-width: none;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

.voices-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.voices-tab {
  min-height: 58px;
  border: 0;
  padding: 0 16px;
  background: transparent;
  font-family: var(--sans);
  font-size: 16px;
  text-align: center;
}

.voices-wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 34px;
  row-gap: 72px;
  width: 100%;
  max-width: none;
  margin: 42px 0 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}

.voice-quote {
  grid-column: var(--quote-col) !important;
  margin: 0;
  padding: 0;
}

.voice-quote__number {
  margin: 0;
}

.voice-quote__rule {
  width: 30px;
  height: 1px;
  margin: 12px 0 20px;
}

.voice-quote__text {
  margin: 0;
}

.voice-quote__themes {
  margin: 14px 0 0;
}

.voice-quote__open {
  margin: 12px 0 0;
}

.voices-conclusion {
  width: 100%;
  max-width: none;
  margin: 76px 0 0;
  padding: 54px 0 0;
  border-top: 1px solid var(--line);
  box-sizing: border-box;
}

.voices-conclusion__content {
  max-width: 760px;
}

.voices-conclusion h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.18;
  font-weight: 400;
  letter-spacing: 0;
}

.voices-conclusion p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
}

.reflection-button {
  margin-top: 28px;
}

.voices-source-note {
  width: 100%;
  max-width: none;
  margin: 76px 0 0;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
  box-sizing: border-box;
  color: rgba(45, 42, 38, 0.58);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.65;
}

.voices-source-note__text {
  max-width: 760px;
}

.reflection-content {
  width: 100%;
  max-width: var(--reading-column-max);
  margin: 48px auto 0;
}

.reflection-form,
.reflection-feedback {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.reflection-question-block,
.reflection-option,
.reflection-textarea,
.reflection-data-note,
.reflection-actions,
.reflection-character-count {
  width: 100%;
  box-sizing: border-box;
}

.quote-overlay__themes,
.quote-close-button {
  display: none !important;
}

.quote-overlay__panel {
  background: var(--panel-bg);
  scrollbar-color: rgba(58, 58, 55, 0.34) transparent;
  scrollbar-gutter: stable;
}

.quote-overlay__panel::-webkit-scrollbar {
  width: 8px;
}

.quote-overlay__panel::-webkit-scrollbar-track {
  background: transparent;
}

.quote-overlay__panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid var(--panel-bg);
  background: rgba(58, 58, 55, 0.28);
}

.quote-overlay__actions {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 1100px) {
  :root {
    --page-gutter: 40px;
  }

  .many-voices-header,
  .reflection-header {
    grid-template-columns: 180px minmax(0, 1fr) 180px;
  }

  .voices-hero h2,
  .reflection-header h2 {
    font-size: 44px;
  }

  .voices-wall {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 58px;
  }

  .voice-quote {
    grid-column: span 3 !important;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 22px;
  }

  .voices-screen,
  .reflection-screen {
    height: auto;
    min-height: 100vh;
    padding: 18px;
    overflow-y: auto;
  }

  .voices-shell,
  .reflection-shell {
    min-height: calc(100vh - 36px);
    padding-bottom: 54px;
  }

  .many-voices-header,
  .reflection-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding-top: 24px;
    padding-bottom: 20px;
  }

  .many-voices-heading,
  .voices-hero h2,
  .reflection-header h2 {
    width: 100%;
    text-align: center;
  }

  #voicesBackToDiary,
  .reflection-back-button {
    margin: 0;
  }

  .many-voices-header__spacer,
  .reflection-header-spacer {
    display: none;
  }

  .voices-tabs-wrapper {
    overflow-x: auto;
  }

  .voices-tabs {
    display: flex;
    min-width: max-content;
  }

  .voices-tab {
    min-width: 148px;
  }

  .voices-wall {
    display: block;
    width: 100%;
    margin-top: 36px;
  }

  .voice-quote {
    width: 100%;
    margin-bottom: 50px;
  }

  .voices-conclusion {
    margin-top: 56px;
    padding-top: 42px;
  }

  .voices-source-note {
    margin-top: 56px;
  }

  .reflection-content {
    max-width: none;
    margin-top: 36px;
  }
}

/* Final diary typography and symptom color normalization */
.voices-shell > .editorial-page__inner,
.reflection-shell > .editorial-page__inner {
  max-width: none;
  padding-left: var(--page-gutter);
  padding-right: var(--page-gutter);
}

.entry time,
.entry time .sleep-time-trigger,
.entry time .interrupted-night-node__time {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.entry time {
  text-align: right;
}

.interrupted-night-node:not(.interrupted-night-node--start) .interrupted-night-node__time,
.sleep-inline-time.is-highlighted {
  color: var(--ink);
}

.symptom-text,
.symptom-text *,
.symptom-text button,
.symptom-text .interactive-phrase,
.symptom-text .psych-trigger,
.symptom-text .brain-fog-word,
.symptom-text .sleep-inline-time {
  color: var(--symptom-color);
}

.symptom-text .interactive-phrase:focus-visible,
.symptom-text .psych-trigger:focus-visible {
  outline-color: var(--symptom-color);
}

@media (max-width: 760px) {
  .entry time,
  .entry time .sleep-time-trigger,
  .entry time .interrupted-night-node__time {
    font-size: 18px;
  }
}

.is-hidden {
  display: none !important;
}

/* Stage 2: shared chapter headers for Diary, Many Voices and Your Reflection. */
.diary-header.chapter-header,
.many-voices-header.chapter-header,
.reflection-header.chapter-header {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 230px;
  align-items: start;
  width: 100%;
  min-height: 100px;
  padding: 0 0 26px;
  border: 0;
  box-sizing: border-box;
}

.diary-header .chapter-header__left,
.many-voices-header .chapter-header__left,
.reflection-header .chapter-header__left {
  justify-self: start;
  padding-top: 9px;
}

.diary-header .chapter-header__centre,
.many-voices-header .chapter-header__centre,
.reflection-header .chapter-header__centre {
  justify-self: center;
  text-align: center;
}

.diary-header .chapter-header__right,
.many-voices-header .chapter-header__right,
.reflection-header .chapter-header__right {
  width: 100%;
}

.diary-header .chapter-title,
.many-voices-header .chapter-title,
.reflection-header .chapter-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(46px, 4vw, 58px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.diary-header .chapter-subtitle,
.many-voices-header .chapter-subtitle,
.reflection-header .chapter-subtitle {
  max-width: 600px;
  margin: 14px auto 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--text-secondary);
}

.diary-header .chapter-kicker,
.many-voices-header .chapter-back,
.reflection-header .chapter-back {
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.many-voices-header .chapter-back,
.reflection-header .chapter-back {
  cursor: pointer;
}

#voicesBackToDiary.chapter-back,
#reflectionBackButton.chapter-back {
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.many-voices-header .chapter-back:hover,
.many-voices-header .chapter-back:focus-visible,
.reflection-header .chapter-back:hover,
.reflection-header .chapter-back:focus-visible {
  color: var(--text-primary);
}

.diary-header + .chapter-divider,
.many-voices-header + .chapter-divider,
.reflection-header + .chapter-divider {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line-color);
}

.diary-date-row {
  flex: 0 0 auto;
  padding: 24px 0 0;
}

.many-voices-header + .chapter-divider + .voices-tabs-wrapper {
  border-top: 0;
}

@media (max-width: 1100px) {
  .diary-header.chapter-header,
  .many-voices-header.chapter-header,
  .reflection-header.chapter-header {
    grid-template-columns: 180px minmax(0, 1fr) 180px;
  }
}

@media (max-width: 760px) {
  .diary-header.chapter-header,
  .many-voices-header.chapter-header,
  .reflection-header.chapter-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    min-height: 0;
    padding-bottom: 20px;
  }

  .diary-header .chapter-header__centre,
  .many-voices-header .chapter-header__centre,
  .reflection-header .chapter-header__centre {
    width: 100%;
  }

  .diary-header .chapter-title,
  .diary-header .chapter-subtitle,
  .many-voices-header .chapter-title,
  .many-voices-header .chapter-subtitle,
  .reflection-header .chapter-title,
  .reflection-header .chapter-subtitle {
    text-align: center;
  }

  .diary-header .chapter-header__right,
  .many-voices-header .chapter-header__right,
  .reflection-header .chapter-header__right {
    display: none;
  }
}

/* Stage 3: Diary body as a single editorial page with two functional regions. */
.diary-screen {
  padding: 0;
}

.paper-stage.diary-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: calc(100% - 56px);
  height: calc(100vh - 56px);
  min-height: calc(100vh - 56px);
  margin: 28px auto;
  max-width: var(--page-max-width);
  align-items: stretch;
  overflow: hidden;
}

.diary-page .diary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px 300px;
  column-gap: 38px;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 28px;
}

.diary-page .diary-layout__divider {
  width: 1px;
  min-height: 100%;
  background: var(--line-color);
}

.diary-page .diary-main,
.diary-page .symptom-sidebar {
  position: relative;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.diary-page .diary-main {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.diary-page .diary-panel::before,
.diary-page .symptom-panel::before {
  content: none;
}

.diary-page .diary-date-row {
  flex: 0 0 auto;
  padding: 0;
}

.diary-page .diary-scroll {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 22px;
}

.diary-page .symptom-sidebar {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 0;
  overflow: visible;
}

.diary-page .symptom-header {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 0 0 22px;
  border: 0;
}

.diary-page .symptom-sidebar__title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-align: left;
}

.diary-page .symptom-panel-description {
  max-width: 300px;
  margin: 0;
}

.diary-page .symptom-list {
  margin-top: 0;
}

.diary-page .reset-button.button-secondary,
.diary-page .voices-shortcut-button.button-primary {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
}

.diary-page .reset-button.button-secondary {
  min-height: 46px;
  margin-top: auto;
  padding: 11px 24px;
  border: 1px solid var(--line-color);
  background: transparent;
  color: var(--text-primary);
}

.diary-page .voices-shortcut-button.button-primary {
  min-height: 48px;
  margin-top: 14px;
  padding: 12px 28px;
  border: 1px solid var(--text-primary);
  background: var(--text-primary);
  color: var(--page-bg);
}

.diary-page .symptom-source-note {
  margin: 20px 0 0;
}

@media (max-width: 980px) {
  .paper-stage.diary-page {
    height: calc(100vh - 56px);
  }

  .diary-page .diary-layout {
    grid-template-columns: minmax(0, 1fr) 1px 270px;
    column-gap: 24px;
  }
}

@media (max-width: 720px) {
  .diary-screen {
    padding: 0;
  }

  .paper-stage.diary-page {
    height: auto;
    min-height: calc(100vh - 24px);
    width: calc(100% - 24px);
    margin: 12px auto;
    overflow: visible;
  }

  .diary-page .diary-layout {
    display: block;
  }

  .diary-page .diary-layout__divider {
    width: 100%;
    min-height: 1px;
    margin: 28px 0;
  }

  .diary-page .symptom-sidebar {
    height: auto;
  }

  .diary-page .diary-scroll {
    overflow: visible;
    padding-right: 0;
  }
}

/* Stage 4: shared Many Voices content boundary below the chapter header. */
.voices-shell.chapter-page {
  --page-gutter: 58px;
  width: calc(100% - 56px);
  max-width: var(--page-max-width);
  min-height: calc(100vh - 56px);
  margin: 28px auto;
  padding: var(--page-top-space) var(--page-gutter) var(--page-bottom-space);
  box-sizing: border-box;
}

.voices-shell.chapter-page > .editorial-page__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.many-voices-content,
.many-voices-content .voices-tabs-wrapper,
.many-voices-content .voices-overview,
.many-voices-content .voices-theme-area,
.many-voices-content .voices-wall,
.many-voices-content .voices-conclusion,
.many-voices-content .voices-source-note {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
  transform: none;
}

.many-voices-content {
  padding-top: 0;
}

.many-voices-content .voices-tabs-wrapper {
  margin-top: 0;
  border-top: 0;
  border-bottom: 1px solid var(--line-color);
}

.many-voices-content .voices-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
}

.many-voices-content .voices-wall {
  margin-top: 42px;
}

.many-voices-content .voices-conclusion,
.many-voices-content .voices-source-note {
  border-top-color: var(--line-color);
}

.many-voices-content .reflection-button.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid var(--text-primary);
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--page-bg);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .voices-shell.chapter-page {
    --page-gutter: 40px;
  }
}

@media (max-width: 760px) {
  .voices-shell.chapter-page {
    --page-gutter: 22px;
    width: calc(100% - 24px);
    min-height: calc(100vh - 24px);
    margin: 12px auto;
  }
}

/* Stage 4 refinement: align Many Voices outer frame with the Diary chapter page. */
.voices-screen {
  height: 100vh;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--site-bg);
}

.voices-shell.chapter-page {
  margin-top: 28px;
  margin-bottom: 28px;
}

#voicesBackToDiary.chapter-back::before {
  content: none;
}

@media (max-width: 980px) {
  .voices-screen {
    padding: 0;
  }
}

@media (max-width: 760px) {
  .voices-screen {
    height: auto;
    min-height: 100vh;
    padding: 0;
    overflow-y: auto;
  }
}

/* Stage 3 refinement: align the Diary content rhythm with the chapter framework. */
.diary-page .diary-layout {
  grid-template-columns: minmax(0, 1fr) 1px 320px;
  column-gap: 38px;
  padding-top: 24px;
}

.diary-page .diary-date-row {
  display: flex;
  align-items: flex-start;
  min-height: 36px;
}

.diary-page .diary-scroll {
  margin-top: 8px;
}

.diary-page .symptom-sidebar {
  padding-top: 0;
}

.diary-page .symptom-header {
  min-height: 92px;
  padding: 0 0 20px;
  box-sizing: border-box;
}

.diary-page .symptom-sidebar__title {
  margin-bottom: 14px;
}

.diary-page .reset-button.button-secondary,
.diary-page .voices-shortcut-button.button-primary {
  min-height: 52px;
  width: 100%;
  border-radius: 0;
  box-sizing: border-box;
}

.diary-page .reset-button.button-secondary {
  margin-top: auto;
  color: var(--text-primary);
}

.diary-page .voices-shortcut-button.button-primary {
  margin-top: 14px;
}

@media (max-width: 980px) {
  .diary-page .diary-layout {
    grid-template-columns: minmax(0, 1fr) 1px 292px;
    column-gap: 24px;
  }
}

/* Diary sidebar alignment and pill button polish. */
.diary-page .symptom-sidebar {
  transform: translateY(-42px);
}

.diary-page .reset-button.button-secondary,
.diary-page .voices-shortcut-button.button-primary {
  min-height: 52px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--text-primary);
  background: var(--text-primary);
  color: var(--page-bg);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  box-sizing: border-box;
}

.diary-page .reset-button.button-secondary:disabled {
  border-color: rgba(48, 47, 44, 0.18);
  background: rgba(48, 47, 44, 0.08);
  color: rgba(48, 47, 44, 0.36);
}

.diary-page .reset-button.button-secondary:not(:disabled):hover,
.diary-page .reset-button.button-secondary:not(:disabled):focus-visible,
.diary-page .voices-shortcut-button.button-primary:hover,
.diary-page .voices-shortcut-button.button-primary:focus-visible {
  background: #1f1e1c;
  border-color: #1f1e1c;
}

@media (max-width: 720px) {
  .diary-page .symptom-sidebar {
    transform: none;
  }
}

/* Stabilize symptom switching and match diary action buttons to the cover button. */
.diary-page .diary-scroll,
.diary-page .timeline,
.diary-page .entry,
.diary-page .symptom-reveal,
.diary-page #daySummary {
  overflow-anchor: none;
}

.diary-page .symptom-list {
  flex: 0 0 auto;
}

.diary-page .interaction-hint {
  position: absolute;
  top: 104px;
  left: 0;
  right: 0;
  z-index: 3;
  margin: 0;
  pointer-events: none;
}

.diary-page .symptom-button {
  height: 58px;
  min-height: 58px;
  box-sizing: border-box;
}

.diary-page .reset-button.button-secondary,
.diary-page .voices-shortcut-button.button-primary {
  flex: 0 0 auto;
  background: var(--cover-button-bg);
  border-color: var(--cover-button-bg);
  color: var(--cover-button-text);
  transition: background-color 260ms ease, border-color 260ms ease, transform 260ms ease;
}

.diary-page .reset-button.button-secondary:not(:disabled):hover,
.diary-page .reset-button.button-secondary:not(:disabled):focus-visible,
.diary-page .voices-shortcut-button.button-primary:hover,
.diary-page .voices-shortcut-button.button-primary:focus-visible {
  background: var(--cover-button-bg-hover);
  border-color: var(--cover-button-bg-hover);
  color: var(--cover-button-text);
}

.diary-page .reset-button.button-secondary:disabled {
  background: color-mix(in srgb, var(--cover-button-bg) 46%, transparent);
  border-color: color-mix(in srgb, var(--cover-button-bg) 54%, transparent);
  color: color-mix(in srgb, var(--cover-button-text) 42%, transparent);
}

/* Diary symptom switching stability: keep the frame fixed and only fade the changed text. */
.diary-page .diary-layout {
  align-items: stretch;
  min-height: 0;
}

.diary-page .diary-main {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.diary-page .diary-scroll {
  min-height: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.diary-page .diary-date-row {
  margin-bottom: 0;
}

.diary-page .timeline {
  margin-top: 0;
}

.diary-page .symptom-list {
  flex: 0 0 auto;
  margin-bottom: 28px;
}

.diary-page .symptom-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 62px;
  min-height: 62px;
  padding: 0 14px;
  box-sizing: border-box;
  border-top: 0;
  border-bottom: 1px solid var(--line-color);
}

.diary-page .symptom-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: transparent;
}

.diary-page .symptom-button.is-active::before {
  background: var(--symptom-color);
}

.diary-page .symptom-marker {
  flex: 0 0 20px;
}

.diary-page .symptom-name {
  display: block;
  min-width: 0;
  width: auto;
  margin-left: 14px;
  padding: 0;
  transform: none;
}

.diary-page .symptom-button:hover .symptom-name,
.diary-page .symptom-button:focus-visible .symptom-name,
.diary-page .symptom-button.is-active .symptom-name {
  transform: none;
}

.diary-page .symptom-button.is-active .symptom-name,
.diary-page .symptom-button.is-active:hover .symptom-name,
.diary-page .symptom-button.is-active:focus-visible .symptom-name {
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: 0 0 0.01px currentColor;
}

.diary-page .reset-button.button-secondary {
  margin-top: 0;
}

.diary-page .voices-shortcut-button.button-primary {
  margin-top: 14px;
}

@keyframes symptomFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.diary-page .symptom-reveal {
  display: block;
  grid-template-rows: none;
  opacity: 1;
  transform: none;
  transition: none;
  transition-delay: 0ms;
}

.diary-page .symptom-reveal:not(.is-visible) .symptom-text {
  display: none;
}

.diary-page .symptom-reveal__inner,
.diary-page .symptom-reveal.is-visible .symptom-reveal__inner {
  overflow: visible;
}

.diary-page .symptom-reveal.is-visible .symptom-text {
  animation: symptomFadeIn 450ms ease both;
}

.diary-page .day-summary {
  transform: none;
  transition: opacity 300ms ease;
}

.diary-page .day-summary.is-visible {
  transform: none;
  transition: opacity 450ms ease 240ms;
}

@media (max-width: 720px) {
  .diary-page .diary-main {
    overflow: visible;
  }

  .diary-page .diary-scroll {
    overflow: visible;
    scrollbar-gutter: auto;
  }
}

/* Diary vertical stability: symptom changes and Reset must not resize the page grid. */
.diary-page .diary-layout {
  height: calc(100vh - 210px);
  min-height: 560px;
  align-items: stretch;
}

.diary-page .diary-main,
.diary-page .symptom-sidebar {
  min-height: 0;
  height: 100%;
}

.diary-page .diary-main {
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.diary-page .diary-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.diary-page .symptom-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
}

.diary-page .symptom-header {
  flex: 0 0 auto;
}

.diary-page .symptom-list {
  flex: 0 0 auto;
  margin-top: 22px;
  margin-bottom: 0;
}

.diary-page .symptom-button {
  position: relative;
  min-height: 64px;
  height: 64px;
  padding: 0 14px;
  box-sizing: border-box;
  border-top: 0;
  border-bottom: 1px solid var(--line-color);
  font-size: 15px;
}

.diary-page .symptom-button.is-active {
  min-height: 64px;
  height: 64px;
  padding: 0 14px;
  border-bottom-width: 1px;
}

.diary-page .symptom-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: transparent;
}

.diary-page .symptom-button.is-active::before {
  background: var(--symptom-color);
}

.diary-page .symptom-name,
.diary-page .symptom-button.is-active .symptom-name,
.diary-page .symptom-button:hover .symptom-name,
.diary-page .symptom-button:focus-visible .symptom-name {
  font-size: 15px;
  margin-left: 14px;
  transform: none;
}

.diary-page .reset-button.button-secondary {
  flex: 0 0 auto;
  margin-top: 28px;
}

.diary-page .voices-shortcut-button.button-primary {
  flex: 0 0 auto;
  margin-top: 14px;
}

.diary-page .symptom-source-note {
  flex: 0 0 auto;
  margin-top: 18px;
}

.diary-page .symptom-reveal {
  transform: none;
  transition: none;
}

.diary-page .symptom-reveal.is-visible .symptom-text {
  animation: symptomFadeIn 450ms ease both;
}

@media (max-width: 720px) {
  .diary-page .diary-layout {
    height: auto;
    min-height: 0;
  }

  .diary-page .diary-main,
  .diary-page .symptom-sidebar {
    height: auto;
  }
}

/* Diary spacing pass: reduce vertical gaps without changing the page frame. */
.diary-page .diary-date-row {
  min-height: 0;
  margin: 0 0 14px;
  padding: 0;
}

.diary-page .diary-scroll {
  margin-top: 0;
}

.diary-page .timeline {
  margin-top: 0;
  padding-top: 0;
}

.diary-page .symptom-sidebar {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
  scrollbar-gutter: stable;
}

.diary-page .symptom-header {
  min-height: 0;
  padding: 0;
}

.diary-page .symptom-sidebar__title {
  margin: 0 0 8px;
}

.diary-page .symptom-panel-description {
  margin: 0 0 16px;
  line-height: 1.4;
}

.diary-page .symptom-list {
  margin: 0;
}

.diary-page .symptom-button,
.diary-page .symptom-button.is-active {
  min-height: 56px;
  height: 56px;
  padding: 0 14px;
  box-sizing: border-box;
  border-bottom-width: 1px;
}

.diary-page .reset-button.button-secondary {
  margin-top: 22px;
}

.diary-page .voices-shortcut-button.button-primary {
  margin-top: 12px;
}

.diary-page .symptom-source-note {
  margin-top: 16px;
  margin-bottom: 0;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .diary-page .symptom-sidebar {
    overflow: visible;
    padding-bottom: 0;
    scrollbar-gutter: auto;
  }
}

/* Diary sidebar compact pass: keep all controls visible without an inner scrollbar. */
.diary-page .symptom-sidebar {
  height: 100%;
  min-height: 0;
  overflow: visible;
  overflow-y: visible;
  overflow-x: visible;
  padding-bottom: 0;
  scrollbar-gutter: auto;
}

.diary-page .symptom-sidebar__title {
  margin: 0 0 6px;
  font-size: 32px;
  line-height: 1.05;
}

.diary-page .symptom-panel-description {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.35;
}

.diary-page .symptom-list {
  margin: 0;
}

.diary-page .symptom-button,
.diary-page .symptom-button.is-active {
  min-height: 52px;
  height: 52px;
  padding: 0 12px;
  box-sizing: border-box;
  border-bottom-width: 1px;
}

.diary-page .reset-button.button-secondary,
.diary-page .voices-shortcut-button.button-primary {
  min-height: 48px;
  padding: 10px 20px;
}

.diary-page .reset-button.button-secondary {
  margin-top: 14px;
}

.diary-page .voices-shortcut-button.button-primary {
  margin-top: 10px;
}

.diary-page .symptom-source-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

/* Diary reset state polish: disabled remains legible, enabled follows the active symptom softly. */
.diary-page {
  --active-accent-soft: rgba(181, 103, 82, 0.14);
}

.diary-page:has(.symptom-button.is-active[data-symptom="hotFlashes"]) {
  --active-accent-soft: rgba(164, 96, 83, 0.14);
}

.diary-page:has(.symptom-button.is-active[data-symptom="brainFog"]) {
  --active-accent-soft: rgba(100, 120, 142, 0.14);
}

.diary-page:has(.symptom-button.is-active[data-symptom="pain"]) {
  --active-accent-soft: rgba(139, 98, 92, 0.14);
}

.diary-page:has(.symptom-button.is-active[data-symptom="sleepIssues"]) {
  --active-accent-soft: rgba(82, 108, 130, 0.14);
}

.diary-page:has(.symptom-button.is-active[data-symptom="psychologicalIssues"]) {
  --active-accent-soft: rgba(114, 87, 128, 0.14);
}

.diary-page .reset-button.button-secondary {
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
}

.diary-page .reset-button.button-secondary:disabled,
.diary-page .reset-button.button-secondary:disabled:hover,
.diary-page .reset-button.button-secondary:disabled:focus-visible {
  opacity: 1;
  cursor: not-allowed;
  background: rgba(181, 103, 82, 0.06);
  border: 1px solid rgba(181, 103, 82, 0.28);
  color: rgba(48, 47, 44, 0.48);
}

.diary-page .reset-button.button-secondary:not(:disabled) {
  background: var(--active-accent-soft);
  border: 1px solid transparent;
  color: var(--text-primary);
  cursor: pointer;
}

/* Reflection header alignment: reuse the same chapter frame as Many Voices. */
.reflection-shell.chapter-page {
  --page-gutter: 58px;
  width: calc(100% - 56px);
  max-width: var(--page-max-width);
  min-height: calc(100vh - 56px);
  margin: 28px auto;
  padding: var(--page-top-space) var(--page-gutter) var(--page-bottom-space);
  box-sizing: border-box;
}

.reflection-shell.chapter-page > .editorial-page__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.reflection-header.chapter-header {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 230px;
  align-items: start;
  width: 100%;
  min-height: 100px;
  margin: 0;
  padding: 0 0 26px;
  border: 0;
  position: static;
  top: auto;
  left: auto;
  transform: none;
  box-sizing: border-box;
}

.reflection-header .chapter-header__left {
  justify-self: start;
  padding-top: 9px;
}

.reflection-header .chapter-header__centre {
  justify-self: center;
  text-align: center;
}

.reflection-header .chapter-header__right {
  width: 100%;
}

.reflection-header .chapter-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(46px, 4vw, 58px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.reflection-header .chapter-subtitle {
  max-width: 600px;
  margin: 14px auto 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--text-secondary);
}

.reflection-header .chapter-back,
#reflectionBackButton.chapter-back {
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
}

.reflection-header + .chapter-divider {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line-color);
}

.reflection-content {
  margin-top: 48px;
}

@media (max-width: 1100px) {
  .reflection-shell.chapter-page {
    --page-gutter: 40px;
  }

  .reflection-header.chapter-header {
    grid-template-columns: 180px minmax(0, 1fr) 180px;
  }
}

@media (max-width: 760px) {
  .reflection-shell.chapter-page {
    --page-gutter: 22px;
    width: calc(100% - 24px);
    min-height: calc(100vh - 24px);
    margin: 12px auto;
  }

  .reflection-header.chapter-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    min-height: 0;
    padding-bottom: 20px;
  }

  .reflection-header .chapter-header__centre {
    width: 100%;
  }

  .reflection-header .chapter-title,
  .reflection-header .chapter-subtitle {
    text-align: center;
  }

  .reflection-header .chapter-header__right {
    display: none;
  }
}

/* Reflection page frame: match Diary and Many Voices outer chapter dimensions. */
.reflection-screen {
  height: 100vh;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--site-bg);
}

.reflection-page.chapter-page {
  width: calc(100% - 56px);
  max-width: 1480px;
  min-height: calc(100vh - 56px);
  margin: 28px auto;
  padding: 34px 58px 48px;
  box-sizing: border-box;
  background: var(--page-bg);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.reflection-page.chapter-page > .editorial-page__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.reflection-page .reflection-content {
  width: 100%;
  max-width: var(--reading-max-width);
  margin: 48px auto 0;
}

@media (max-width: 1100px) {
  .reflection-page.chapter-page {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media (max-width: 760px) {
  .reflection-screen {
    height: auto;
    min-height: 100vh;
    padding: 0;
  }

  .reflection-page.chapter-page {
    width: calc(100% - 24px);
    min-height: calc(100vh - 24px);
    margin: 12px auto;
    padding: 24px 22px 36px;
  }
}

/* Reflection spacing pass: tighten the form rhythm without changing the shared page frame. */
.reflection-page .reflection-content {
  margin-top: 24px;
}

.reflection-page .reflection-form {
  margin-top: 0;
}

.reflection-page .reflection-form > .reflection-question-block:first-child {
  margin-top: 0;
  padding-top: 0;
}

.reflection-page .reflection-question-block legend,
.reflection-page .reflection-open-label {
  margin: 0;
  padding: 0;
}

.reflection-page .reflection-question-number {
  display: block;
  margin: 0 0 8px;
}

.reflection-page .reflection-question-title {
  margin: 0 0 10px;
}

.reflection-page .reflection-question-help {
  margin: 0 0 24px;
}

.reflection-page .reflection-textarea {
  margin-bottom: 6px;
}

.reflection-page .reflection-character-count {
  margin: 0 0 10px;
  text-align: right;
}

.reflection-page .reflection-data-note {
  margin: 0 0 20px;
  line-height: 1.4;
}

.reflection-page .reflection-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  margin: 0 auto;
}

.reflection-page .reflection-actions .reflection-submit {
  min-width: 220px;
}

.reflection-page .reflection-actions .reflection-skip {
  margin: 0;
}

.reflection-page .reflection-form > .reflection-question-block:nth-child(3) {
  margin-bottom: 8px;
}

.reflection-page .reflection-character-count {
  margin-bottom: 4px;
}

@media (max-width: 760px) {
  .reflection-page .reflection-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
}

/* Unified page background color across Diary, Many Voices, and Your Reflection. */
html,
body,
.app-shell,
.intro-screen,
.diary-screen,
.voices-screen,
.reflection-screen,
.chapter-page,
.editorial-page__inner,
.diary-page,
.many-voices-page,
.reflection-page {
  background-color: #f8f7f3;
}

/* Many Voices should read as an open page, not a separate card. */
.voices-shell.chapter-page,
.voices-shell.chapter-page > .editorial-page__inner {
  background: #f8f7f3;
  border: 0;
  box-shadow: none;
  outline: 0;
}

/* Many Voices: typographic chorus */
.many-voices-content .voices-wall {
  position: relative;
  display: block;
  margin-top: 44px;
  padding-bottom: 96px;
  border: 0;
  isolation: isolate;
}

.voices-opening,
.voices-chorus,
.voices-release {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  column-gap: clamp(18px, 2.6vw, 42px);
}

.voice-slot {
  position: relative;
  display: flex;
  align-items: center;
  grid-column: var(--slot-col) !important;
  min-height: 260px;
}

.voice-slot--hero { min-height: 360px; }
.voice-slot--large { min-height: 320px; }
.voice-slot--medium { min-height: 260px; }
.voice-slot--small { min-height: 220px; }

.voice-slot--short { --expanded-font-size: clamp(58px, 6vw, 92px); }
.voice-slot--medium-text { --expanded-font-size: clamp(46px, 4.8vw, 72px); }
.voice-slot--long { --expanded-font-size: clamp(36px, 3.8vw, 56px); }

.voices-opening {
  min-height: clamp(420px, 54vh, 560px);
  padding: 36px 0 48px;
}

.voices-chorus {
  row-gap: 24px;
  padding: 24px 0 58px;
}

.voices-release {
  row-gap: 0;
  padding-top: 30px;
}

.voices-whisper-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.many-voices-content .voice-quote {
  position: relative;
  z-index: 1;
  min-height: 0 !important;
  width: 100%;
  margin: 0;
  padding: clamp(12px, 1.4vw, 20px);
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: rgba(48, 47, 44, 0.72);
  cursor: pointer;
  opacity: 0.82;
  outline: none;
  transition: opacity 220ms ease, color 220ms ease;
}

.many-voices-content .voice-quote::before {
  content: "";
  position: absolute;
  inset: -12px -16px;
  z-index: -1;
  background: color-mix(in srgb, var(--quote-accent) 6%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.many-voices-content .voices-wall.is-visible .voice-quote {
  animation: chorus-enter 620ms ease both;
  animation-delay: var(--quote-delay);
}

@keyframes chorus-enter {
  from { opacity: 0.42; transform: translateY(8px); }
  to { opacity: 0.82; transform: translateY(0); }
}

.many-voices-content .voice-quote--opening { margin: 0; }
.many-voices-content .voice-quote--chorus { margin: 0; }
.many-voices-content .voice-quote--release {
  margin-top: clamp(48px, 6vw, 92px);
  margin-bottom: clamp(42px, 5vw, 72px);
}

.many-voices-content .voice-quote--hero .voice-quote__text {
  font-size: clamp(24px, 2.2vw, 34px) !important;
  line-height: 1.25 !important;
  letter-spacing: 0;
}

.many-voices-content .voice-quote--hero,
.many-voices-content .voices-wall.is-visible .voice-quote--hero { opacity: 0.82; }

.many-voices-content .voice-quote--medium .voice-quote__text {
  font-size: clamp(24px, 2.2vw, 34px) !important;
  line-height: 1.25 !important;
}

.many-voices-content .voice-quote--small .voice-quote__text {
  font-size: clamp(24px, 2.2vw, 34px) !important;
  line-height: 1.25 !important;
}

.many-voices-content .voice-quote__text {
  font-size: clamp(24px, 2.2vw, 34px) !important;
  line-height: 1.25 !important;
  opacity: 1;
  color: rgba(48, 47, 44, 0.78);
  transition: color 220ms ease, opacity 220ms ease;
}

.many-voices-content .voice-quote__number {
  font-family: var(--font-sans);
  font-size: 12px !important;
  letter-spacing: 0.06em;
  opacity: 0.48;
}

.many-voices-content .voice-quote__themes {
  display: none;
}

.many-voices-content .voice-quote__open {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.many-voices-content .voice-quote--hero .voice-quote__open {
  opacity: 0.58;
  pointer-events: auto;
}

.many-voices-content .voice-quote.is-muted { opacity: 0.32; }

.many-voices-content .voice-quote:hover::before,
.many-voices-content .voice-quote:focus-visible::before,
.many-voices-content .voice-quote:focus-within::before,
.many-voices-content .voice-quote.is-focused::before { opacity: 0.06; }

.many-voices-content .voice-quote:hover,
.many-voices-content .voice-quote:focus-visible,
.many-voices-content .voice-quote:focus-within,
.voice-slot.is-focused .voice-quote {
  opacity: 1 !important;
  color: var(--text-primary);
}

.many-voices-content .voice-quote:hover .voice-quote__text,
.many-voices-content .voice-quote:focus-within .voice-quote__text,
.voice-slot.is-focused .voice-quote__text {
  font-size: var(--expanded-font-size) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}

.voice-slot:hover .voice-quote__text,
.voice-slot:focus-within .voice-quote__text {
  font-size: var(--expanded-font-size) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}

.many-voices-content .voice-quote:hover .voice-quote__themes,
.many-voices-content .voice-quote:focus-visible .voice-quote__themes,
.many-voices-content .voice-quote:focus-within .voice-quote__themes { display: none; }

.many-voices-content .voice-quote:hover .voice-quote__open,
.many-voices-content .voice-quote:focus-visible .voice-quote__open,
.many-voices-content .voice-quote:focus-within .voice-quote__open {
  opacity: 1;
  pointer-events: auto;
}

.many-voices-content .voices-wall:has(.voice-quote:hover) .voice-quote:not(:hover),
.many-voices-content .voices-wall:has(.voice-quote:focus-visible) .voice-quote:not(:focus-visible):not(:focus-within) {
  opacity: 0.38 !important;
}

.many-voices-content .voices-wall.has-focused-quote .voice-slot:not(.is-focused) .voice-quote { opacity: 0.36 !important; }

.many-voices-content .voices-wall:has(.voice-quote:hover) .voices-whisper-layer,
.many-voices-content .voices-wall:has(.voice-quote:focus-visible) .voices-whisper-layer { opacity: 1; }

.many-voices-content .voices-wall.has-focused-quote .voice-whisper { opacity: 0.025; }

.voice-whisper {
  display: block;
  font-family: var(--serif);
  font-size: clamp(86px, 11vw, 160px);
  line-height: 1.35;
  letter-spacing: -0.035em;
  color: var(--voice-accent);
  opacity: 0.055;
  white-space: nowrap;
}

.voice-whisper:nth-child(1) { margin-left: 6%; }
.voice-whisper:nth-child(2) { margin-left: 24%; }
.voice-whisper:nth-child(3) { margin-left: 12%; }
.voice-whisper:nth-child(4) { margin-left: 38%; }
.voice-whisper:nth-child(5) { margin-left: 18%; }
.voice-whisper:nth-child(6) { margin-left: 30%; }

@media (max-width: 760px) {
  .many-voices-content .voices-wall {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 34px;
    margin-top: 40px;
    padding-bottom: 56px;
  }

  .voices-whisper-layer { display: none; }

  .voices-opening,
  .voices-chorus,
  .voices-release {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 0;
    row-gap: 34px;
  }

  .voice-slot,
  .voice-slot--hero,
  .voice-slot--large,
  .voice-slot--medium,
  .voice-slot--small {
    min-height: auto;
    margin-bottom: 56px;
  }

  .many-voices-content .voice-quote,
  .many-voices-content .voice-quote--opening,
  .many-voices-content .voice-quote--chorus,
  .many-voices-content .voice-quote--release {
    grid-column: 1 / -1 !important;
    margin: 0;
    padding: 0;
    opacity: 1;
  }

  .many-voices-content .voice-quote--hero .voice-quote__text {
    font-size: clamp(34px, 10vw, 44px) !important;
  }

  .voice-slot:hover .voice-quote__text,
  .voice-slot:focus-within .voice-quote__text,
  .voice-slot.is-focused .voice-quote__text {
    font-size: 28px !important;
    line-height: 1.25 !important;
    letter-spacing: 0;
  }

  .many-voices-content .voice-quote--medium .voice-quote__text {
    font-size: clamp(24px, 7vw, 30px) !important;
  }

  .many-voices-content .voice-quote--small .voice-quote__text { font-size: 18px !important; }

  .many-voices-content .voice-quote__open {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .many-voices-content .voices-wall.is-visible .voice-quote { animation: none; opacity: 0.82; }
}

/* Stable quote expansion: the normal layer owns layout; the expanded layer is visual only. */
.voice-slot,
.voice-slot--short,
.voice-slot--medium-text,
.voice-slot--long,
.voice-slot--large,
.voice-slot--hero {
  min-height: 180px;
  overflow: visible;
}

.many-voices-content .voices-wall,
.voice-quote,
.voice-text-wrap {
  overflow: visible;
}

.voice-text-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
}

.many-voices-content .voice-quote {
  width: 100%;
  max-width: none;
}

.many-voices-content .voice-quote__text--normal {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 34px) !important;
  line-height: 1.28 !important;
  letter-spacing: 0;
  color: rgba(48, 47, 44, 0.78);
  transition: opacity 320ms ease, color 320ms ease;
}

.voice-quote__text-expanded {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: var(--expanded-font-size);
  line-height: var(--expanded-line-height, 1.16);
  letter-spacing: -0.035em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 520ms ease, transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.voice-slot--short {
  min-height: 180px;
  --expanded-font-size: clamp(52px, 5.2vw, 78px);
  --expanded-line-height: 1.14;
}

.voice-slot--medium-text {
  min-height: 200px;
  --expanded-font-size: clamp(42px, 4.4vw, 64px);
  --expanded-line-height: 1.16;
}

.voice-slot--long {
  min-height: 220px;
  --expanded-font-size: clamp(34px, 3.4vw, 50px);
  --expanded-line-height: 1.2;
}

.voice-slot:hover .voice-quote__text--normal,
.voice-slot:focus-within .voice-quote__text--normal,
.voice-slot.is-focused .voice-quote__text--normal {
  opacity: 0;
}

.voice-slot:hover .voice-quote__text-expanded,
.voice-slot:focus-within .voice-quote__text-expanded,
.voice-slot.is-focused .voice-quote__text-expanded {
  opacity: 1;
  transform: translateY(0);
}

.voice-slot:hover .voice-quote__text,
.voice-slot:focus-within .voice-quote__text,
.voice-slot.is-focused .voice-quote__text {
  font-size: clamp(24px, 2.2vw, 34px) !important;
  line-height: 1.28 !important;
  letter-spacing: 0;
}

.voice-quote__link {
  display: inline-block;
  margin-top: 14px;
  position: relative;
  z-index: 3;
  transition: opacity 320ms ease, color 320ms ease;
}

.many-voices-content .voices-wall {
  position: relative;
  overflow: visible;
  row-gap: 42px;
}

.voices-opening {
  min-height: auto;
  padding-top: 34px;
  padding-bottom: 42px;
  overflow: visible;
}

.voices-chorus {
  row-gap: 38px;
  padding-top: 24px;
  padding-bottom: 42px;
  overflow: visible;
}

.voices-release {
  min-height: auto;
  padding-top: 44px;
  padding-bottom: 48px;
  overflow: visible;
}

.voices-whisper-layer {
  position: absolute;
  inset: 0;
  min-height: 100%;
  height: 100%;
  width: 100%;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}

.voice-whisper {
  position: absolute;
  display: block;
  max-width: 90%;
  margin: 0;
  font-size: clamp(78px, 9vw, 138px);
  line-height: 1.45;
  color: var(--voice-accent);
  opacity: 0.075;
  white-space: nowrap;
}

.voice-whisper--1,
.voice-whisper:nth-child(1) { top: 6%; left: 8%; }
.voice-whisper--2,
.voice-whisper:nth-child(2) { top: 18%; left: 34%; }
.voice-whisper--3,
.voice-whisper:nth-child(3) { top: 31%; left: 12%; }
.voice-whisper--4,
.voice-whisper:nth-child(4) { top: 45%; left: 40%; }
.voice-whisper--5,
.voice-whisper:nth-child(5) { top: 59%; left: 8%; }
.voice-whisper--6,
.voice-whisper:nth-child(6) { top: 73%; left: 30%; }
.voice-whisper--7,
.voice-whisper:nth-child(7) { top: 87%; left: 12%; }

.many-voices-content .voices-wall.has-focused-quote .voice-whisper { opacity: 0.035; }

.voice-slot--hero.voice-slot--short { min-height: 180px; }

.voice-slot:hover,
.voice-slot:focus-within,
.voice-slot.is-focused { z-index: 10; }

/* Many Voices source context and quiet quote-link state. */
.voices-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  margin-bottom: 30px;
  text-align: center;
}

.voices-intro__line1,
.voices-intro__line2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--text-secondary);
}

/* Many Voices intro: both lines intentionally share one quiet text style. */
.voices-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 14px auto 30px;
  text-align: center;
}

.voices-intro__text {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--text-secondary);
  opacity: 1;
}

/* Fixed whisper tracks: one phrase per row, never scattered over another phrase. */
.voices-whisper-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-rows: repeat(7, minmax(180px, 1fr));
  row-gap: 80px;
  padding: 40px 72px;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.voice-whisper {
  position: relative;
  display: block;
  max-width: 72vw;
  margin: 0;
  white-space: normal;
  font-family: var(--font-serif);
  font-size: clamp(72px, 9vw, 150px);
  line-height: 0.95;
  color: var(--voice-accent);
  opacity: 0.075;
  overflow-wrap: normal;
  transform: none;
}

.voices-whisper-layer .voice-whisper {
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.voices-whisper-layer .voice-whisper--1 { grid-row: 1; justify-self: start; }
.voices-whisper-layer .voice-whisper--2 { grid-row: 2; justify-self: center; }
.voices-whisper-layer .voice-whisper--3 { grid-row: 3; justify-self: end; }
.voices-whisper-layer .voice-whisper--4 { grid-row: 4; justify-self: start; }
.voices-whisper-layer .voice-whisper--5 { grid-row: 5; justify-self: center; }
.voices-whisper-layer .voice-whisper--6 { grid-row: 6; justify-self: end; }
.voices-whisper-layer .voice-whisper--7 { grid-row: 7; justify-self: start; }

.voice-slot,
.voice-quote {
  position: relative;
  z-index: 2;
}

.voice-quote__footer {
  margin-top: 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.voice-slot:hover .voice-quote__footer,
.voice-slot:focus-within .voice-quote__footer,
.voice-slot.is-focused .voice-quote__footer,
.voice-slot.is-active .voice-quote__footer {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 0s;
}

.voice-quote--hero .voice-quote__open,
.voice-quote--hero .voice-quote__link { opacity: inherit; }

.voices-whisper-layer {
  position: absolute;
  inset: 0;
  min-height: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.voice-whisper {
  position: absolute;
  max-width: 78vw;
  font-size: clamp(72px, 10vw, 220px);
  line-height: 0.9;
  white-space: nowrap;
  transform: translate(-50%, -50%) translate(var(--whisper-adjust-x, 0px), var(--whisper-adjust-y, 0px));
}

.voices-whisper-layer .voice-whisper--1 { top: 6%; left: 16%; }
.voices-whisper-layer .voice-whisper--2 { top: 21%; left: 48%; }
.voices-whisper-layer .voice-whisper--3 { top: 35%; left: 23%; }
.voices-whisper-layer .voice-whisper--4 { top: 49%; left: 56%; }
.voices-whisper-layer .voice-whisper--5 { top: 63%; left: 24%; }
.voices-whisper-layer .voice-whisper--6 { top: 77%; left: 52%; }
.voices-whisper-layer .voice-whisper--7 { top: 90%; left: 26%; }

.voice-whisper--long {
  max-width: 42vw;
  font-size: clamp(56px, 8vw, 160px);
  line-height: 0.9;
  white-space: normal;
}

/* Single-layer quote enlargement: transform only, no reflowing type. */
.voices-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 14px auto 30px;
}

.voices-intro__line1,
.voices-intro__line2 {
  margin: 0;
  text-align: center;
  font-family: var(--font-sans);
}

.voices-intro__line1 {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.5;
}

.voices-intro__line2 {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.many-voices-content .voices-wall,
.voices-whisper-layer,
.voice-slot,
.voice-quote,
.voice-text-wrap {
  overflow: visible;
}

.voices-whisper-layer {
  top: -40px;
  right: -40px;
  bottom: -40px;
  left: -40px;
  width: auto;
  height: auto;
}

.voice-whisper {
  max-width: calc(100% - 120px);
  opacity: 0.09;
}

.many-voices-content .voice-quote {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.voice-text-wrap {
  width: 100%;
  min-height: 220px;
}

.voice-slot--long .voice-text-wrap { min-height: 300px; }
.voice-slot--medium .voice-text-wrap,
.voice-slot--medium-text .voice-text-wrap { min-height: 250px; }
.voice-slot--short .voice-text-wrap { min-height: 200px; }

.many-voices-content .voice-quote__text,
.many-voices-content .voice-quote__text--normal {
  margin: 0;
  transform-origin: top left;
  transform: scale(1);
  opacity: 0.7;
  color: var(--text-secondary);
  font-size: clamp(24px, 2.2vw, 34px) !important;
  line-height: 1.16 !important;
  letter-spacing: 0;
  will-change: transform, opacity, color;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms ease, color 280ms ease;
}

.voice-slot:hover .voice-quote__text,
.voice-slot:focus-within .voice-quote__text,
.voice-slot.is-focused .voice-quote__text {
  opacity: 1;
  color: var(--text-primary);
}

.voice-slot--short:hover .voice-quote__text,
.voice-slot--short:focus-within .voice-quote__text,
.voice-slot--short.is-focused .voice-quote__text { transform: scale(1.32); }

.voice-slot--medium-text:hover .voice-quote__text,
.voice-slot--medium-text:focus-within .voice-quote__text,
.voice-slot--medium-text.is-focused .voice-quote__text { transform: scale(1.22); }

.voice-slot--long:hover .voice-quote__text,
.voice-slot--long:focus-within .voice-quote__text,
.voice-slot--long.is-focused .voice-quote__text { transform: scale(1.12); }

.voice-quote__footer {
  margin-top: 18px;
  position: relative;
  z-index: 12;
}

.voice-quote__link {
  display: inline-block;
  margin-top: 0;
  position: relative;
  z-index: 12;
}

.voice-quote__text-expanded { display: none; }

@media (max-width: 760px) {
  .voices-intro { margin-bottom: 22px; }

  .voice-text-wrap,
  .voice-slot--long .voice-text-wrap,
  .voice-slot--medium .voice-text-wrap,
  .voice-slot--medium-text .voice-text-wrap,
  .voice-slot--short .voice-text-wrap { min-height: auto; }

  .voice-slot:hover .voice-quote__text,
  .voice-slot:focus-within .voice-quote__text,
  .voice-slot.is-focused .voice-quote__text { transform: scale(1); }
}

@media (max-width: 760px) {
  .voices-wall {
    display: block;
  }

  .voice-slot,
  .voice-slot--short,
  .voice-slot--medium-text,
  .voice-slot--long,
  .voice-slot--hero.voice-slot--short {
    min-height: auto;
    margin-bottom: 56px;
    overflow: visible;
  }

  .voice-slot:hover .voice-quote__text--normal,
  .voice-slot:focus-within .voice-quote__text--normal,
  .voice-slot.is-focused .voice-quote__text--normal {
    opacity: 1;
  }

  .voice-quote__text-expanded {
    display: none;
  }
}

/* Final Many Voices keyword boundary rules. These deliberately override earlier experiments. */
.many-voices-content .voices-wall {
  position: relative;
  overflow: visible;
}

.voices-wall__content {
  position: relative;
  z-index: 1;
  overflow: visible;
}

.voices-wall__content > .background-keyword-layer.voices-whisper-layer {
  position: absolute;
  inset: 40px 80px;
  z-index: 0;
  display: block;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.voices-wall__content > .background-keyword-layer .voice-whisper {
  position: absolute;
  display: block;
  max-width: 100%;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(72px, 9vw, 140px);
  line-height: 1;
  color: var(--voice-accent);
  opacity: 0.075;
  white-space: nowrap;
  transform: none;
}

.voices-wall__content > .background-keyword-layer .voice-whisper--1 { top: 4%; left: 0; }
.voices-wall__content > .background-keyword-layer .voice-whisper--2 { top: 20%; left: 28%; }
.voices-wall__content > .background-keyword-layer .voice-whisper--3 { top: 36%; left: 8%; }
.voices-wall__content > .background-keyword-layer .voice-whisper--4 { top: 52%; left: 36%; }
.voices-wall__content > .background-keyword-layer .voice-whisper--5 { top: 68%; left: 4%; }
.voices-wall__content > .background-keyword-layer .voice-whisper--6 { top: 82%; left: 30%; }
.voices-wall__content > .background-keyword-layer .voice-whisper--7 { top: 90%; left: 8%; }

.voices-wall__content > .background-keyword-layer .voice-whisper--long {
  max-width: 44vw;
  font-size: clamp(56px, 7vw, 110px);
  line-height: 0.95;
  white-space: normal;
}

.voices-wall__content .voices-opening,
.voices-wall__content .voices-chorus,
.voices-wall__content .voices-release,
.voices-wall__content .voice-slot,
.voices-wall__content .voice-quote {
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  .voices-wall__content > .background-keyword-layer.voices-whisper-layer {
    inset: 28px 20px;
  }

  .voices-wall__content > .background-keyword-layer .voice-whisper {
    font-size: clamp(50px, 15vw, 86px);
  }

  .voices-wall__content > .background-keyword-layer .voice-whisper--long {
    max-width: 88%;
    font-size: clamp(42px, 12vw, 68px);
  }
}

/* Many Voices vertical rhythm: tighten only the three page-level transitions. */
.voices-shell .voices-intro {
  margin-bottom: 10px;
}

.many-voices-content .voices-wall {
  margin-top: 28px;
  padding-bottom: 56px;
}

.many-voices-content .voices-opening {
  padding-top: 22px;
}

.many-voices-content .voices-conclusion {
  margin-top: 44px;
  padding-top: 36px;
}

@media (max-width: 760px) {
  .voices-shell .voices-intro {
    margin-bottom: 10px;
  }

  .many-voices-content .voices-wall {
    margin-top: 24px;
    padding-bottom: 42px;
  }

  .many-voices-content .voices-opening {
    padding-top: 18px;
  }

  .many-voices-content .voices-conclusion {
    margin-top: 34px;
    padding-top: 28px;
  }
}

/* Many Voices: reserve room for transformed quote text before the blog link. */
.many-voices-content .voice-quote {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.many-voices-content .voice-text-wrap {
  position: relative;
  width: 100%;
  min-height: var(--expanded-text-height, 0px);
  overflow: visible;
}

.many-voices-content .voice-slot {
  --hover-scale: 1.2;
  min-height: 0;
  margin-bottom: 0;
}

.many-voices-content .voice-slot--short {
  --hover-scale: 1.28;
}

.many-voices-content .voice-slot--medium,
.many-voices-content .voice-slot--medium-text {
  --hover-scale: 1.18;
}

.many-voices-content .voice-slot--long {
  --hover-scale: 1.1;
}

.many-voices-content .voice-quote__text {
  transform-origin: top left;
}

.many-voices-content .voice-quote__footer {
  position: relative;
  z-index: 5;
  margin-top: 14px;
}

.many-voices-content .voice-quote__link {
  position: relative;
  z-index: 6;
  display: inline-block;
}

.many-voices-content .voice-slot:hover .voice-quote__footer,
.many-voices-content .voice-slot:focus-within .voice-quote__footer,
.many-voices-content .voice-slot.is-focused .voice-quote__footer,
.many-voices-content .voice-slot.is-active .voice-quote__footer {
  margin-top: 16px;
}

.many-voices-content .voice-slot:hover .voice-quote__text,
.many-voices-content .voice-slot:focus-within .voice-quote__text,
.many-voices-content .voice-slot.is-focused .voice-quote__text,
.many-voices-content .voice-slot.is-active .voice-quote__text {
  transform: scale(var(--hover-scale));
}

.many-voices-content .voices-wall {
  row-gap: 36px;
}

@media (max-width: 760px) {
  .many-voices-content .voice-text-wrap,
  .many-voices-content .voice-slot--short .voice-text-wrap,
  .many-voices-content .voice-slot--medium .voice-text-wrap,
  .many-voices-content .voice-slot--medium-text .voice-text-wrap,
  .many-voices-content .voice-slot--long .voice-text-wrap {
    min-height: auto;
  }
}

/* Many Voices: keep the blog link in the metadata row, outside transformed text. */
.many-voices-content .voice-text-wrap {
  min-height: 0;
}

.many-voices-content .voice-quote__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 24px;
  margin-bottom: 18px;
  position: relative;
  z-index: 8;
}

.many-voices-content .voice-quote__number {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-secondary);
}

.many-voices-content .voice-quote__meta .voice-quote__link {
  position: relative;
  z-index: 8;
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1;
  color: var(--active-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transform: translateY(2px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.many-voices-content .voice-slot:hover .voice-quote__meta .voice-quote__link,
.many-voices-content .voice-slot:focus-within .voice-quote__meta .voice-quote__link,
.many-voices-content .voice-slot.is-focused .voice-quote__meta .voice-quote__link,
.many-voices-content .voice-slot.is-active .voice-quote__meta .voice-quote__link {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 0s;
}

.many-voices-content .voice-quote__footer {
  display: none;
}

/* Fine visual adjustment: a little more breath in enlarged multi-line quotes. */
.many-voices-content .voice-quote__text {
  line-height: 1.30 !important;
}

/* Restore the cover as a full-bleed page without the accidental outer frame. */
.intro-screen {
  border: 0;
}

/* Many Voices: quiet, archive-like full-account reading panel. */
.quote-overlay__backdrop {
  background: rgba(239, 237, 232, 0.72);
  backdrop-filter: blur(3px);
}

.quote-overlay__panel {
  width: min(760px, calc(100vw - 48px));
  max-height: min(82vh, 760px);
  padding: 50px 56px 42px;
  box-sizing: border-box;
  overflow-y: auto;
  border: 1px solid rgba(48, 47, 44, 0.12);
  border-radius: 2px;
  background: var(--page-bg);
  box-shadow: 0 28px 80px rgba(48, 47, 44, 0.12);
  animation: quoteModalIn 260ms ease both;
}

.quote-overlay__meta {
  margin: 0 0 24px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.quote-overlay__title {
  margin: 0 0 26px;
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.1;
  font-weight: 400;
  color: var(--voice-accent, var(--active-accent));
}

.quote-overlay__text {
  max-width: 660px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.6;
  color: var(--text-primary);
}

.quote-overlay__text p {
  margin: 0;
}

.quote-overlay__themes {
  display: block !important;
  max-width: 660px;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.quote-overlay__source {
  display: block;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.voice-meta {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.voice-meta p {
  margin: 0;
}

.voice-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.voice-meta a:hover {
  color: var(--active-accent);
}

.quote-overlay__themes .voice-meta__last-accessed {
  display: inline;
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: none;
  white-space: nowrap;
}

.quote-overlay__divider {
  height: 1px;
  margin: 34px 0 24px;
  border: 0;
  background: var(--line-color);
}

.quote-overlay__actions,
.quote-overlay__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.quote-overlay__actions .quote-nav-button {
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.quote-overlay__actions .quote-nav-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.quote-overlay__x {
  position: absolute;
  top: 28px;
  right: 30px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0;
  line-height: 1;
  color: var(--text-primary);
  cursor: pointer;
}

.quote-overlay__x::before {
  content: "\00d7";
  font-size: 22px;
  line-height: 1;
}

.quote-overlay__x:hover {
  opacity: 0.6;
}

@keyframes quoteModalIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .quote-overlay__panel {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
    padding: 38px 28px 30px;
  }

  .quote-overlay__text { font-size: 19px; line-height: 1.58; }

  .quote-overlay__actions,
  .quote-overlay__nav { flex-direction: column; align-items: flex-start; gap: 14px; }
}
/* Continuous chapter narrative: existing page visuals remain inside one document flow. */
html {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.app-shell.site-scroll {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

.site-scroll > .scroll-section {
  display: block;
  min-height: 100vh;
}

.site-scroll > .intro-screen,
.site-scroll > .diary-screen,
.site-scroll > .voices-screen,
.site-scroll > .reflection-screen {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

/* The cover keeps its original centred grid composition. */
.site-scroll > .intro-screen {
  display: grid;
  place-items: center;
}

/* Cross-chapter navigation is now provided by natural scrolling. */
.site-scroll #startButton,
.site-scroll #readMoreVoicesButton,
.site-scroll #reflectButton {
  display: none !important;
}

/* The Diary is part of the continuous document, not a nested scroll panel. */
.site-scroll > .diary-screen,
.paper-stage.diary-page {
  height: auto;
  min-height: calc(100vh - 56px);
  overflow: visible;
}

.diary-page .diary-layout {
  height: auto;
  min-height: 0;
  align-items: stretch;
}

.diary-page .diary-main,
.diary-page .diary-scroll,
.diary-page .diary-content,
.diary-page .diary-timeline {
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
  scrollbar-gutter: auto;
}

.diary-page .diary-scroll {
  flex: 0 0 auto;
}

.diary-page .symptom-sidebar {
  height: fit-content;
  max-height: none;
  min-height: 0;
  overflow: visible;
  scrollbar-gutter: auto;
}

/* Continuous-scroll chapters no longer need page-to-page navigation labels. */
.diary-header .chapter-kicker,
#voicesBackToDiary,
#reflectionBackButton {
  display: none !important;
}

/* Keep the Diary's symptom controls beside the timeline on desktop. */
@media (min-width: 721px) {
  .site-scroll .paper-stage.diary-page .diary-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 1px minmax(280px, 320px) !important;
    grid-template-rows: auto;
    grid-auto-flow: row;
    column-gap: 38px !important;
    width: 100%;
    align-items: start;
  }

  .site-scroll .paper-stage.diary-page .diary-main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .site-scroll .paper-stage.diary-page .diary-layout__divider {
    display: block;
    grid-column: 2;
    grid-row: 1;
    width: 1px;
    align-self: stretch;
  }

  .site-scroll .paper-stage.diary-page .symptom-sidebar {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    align-self: start;
  }
}

/* Light scrollytelling refinements: preserve the existing structure and interactions. */
.site-scroll #startButton.cover-scroll-cue {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 0;
  margin-top: 46px;
  padding: 0;
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-secondary);
  font-family: var(--font-sans, var(--sans));
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.site-scroll .cover-description {
  margin-bottom: 0;
}

.site-scroll #startButton.cover-scroll-cue:hover,
.site-scroll #startButton.cover-scroll-cue:active,
.site-scroll #startButton.cover-scroll-cue:focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-primary);
  transform: none;
}

.site-scroll #startButton.cover-scroll-cue:focus-visible {
  outline: 1px solid rgba(48, 47, 44, 0.34);
  outline-offset: 8px;
}

.cover-scroll-cue__arrow {
  font-size: 18px;
  line-height: 1;
  opacity: 0.55;
  animation: coverArrowDrift 1800ms ease-in-out infinite;
}

@keyframes coverArrowDrift {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  50% {
    transform: translateY(5px);
    opacity: 0.8;
  }
}

.diary-page .symptom-button,
.diary-page .symptom-button:hover,
.diary-page .symptom-button:focus-visible {
  background: transparent;
  box-shadow: none;
}

.diary-page .symptom-button.is-active,
.diary-page .symptom-button.is-active:hover,
.diary-page .symptom-button.is-active:focus-visible {
  background: rgba(48, 47, 44, 0.025);
}

.diary-page .symptom-button.is-active::before {
  width: 2px;
  background: var(--symptom-color);
}

.diary-page .reset-button.button-secondary:disabled,
.diary-page .reset-button.button-secondary:disabled:hover,
.diary-page .reset-button.button-secondary:disabled:focus-visible {
  opacity: 1;
  color: rgba(48, 47, 44, 0.42);
  background: rgba(48, 47, 44, 0.035);
  border: 1px solid rgba(48, 47, 44, 0.14);
  box-shadow: none;
}

.diary-page .reset-button.button-secondary:not(:disabled),
.diary-page .reset-button.button-secondary:not(:disabled):hover,
.diary-page .reset-button.button-secondary:not(:disabled):focus-visible {
  color: var(--text-primary);
  background: var(--active-accent-soft, rgba(176, 106, 91, 0.14));
  border: 1px solid color-mix(in srgb, var(--active-accent-soft, rgba(176, 106, 91, 0.14)) 72%, rgba(48, 47, 44, 0.18));
  box-shadow: none;
}

.site-scroll > .reflection-screen {
  padding-top: clamp(96px, 12vh, 150px);
  padding-bottom: clamp(100px, 14vh, 170px);
}

.reflection-page .reflection-content {
  margin-top: clamp(64px, 8vh, 96px);
}

.reflection-page .reflection-form > .reflection-question-block:nth-child(-n + 2) {
  margin-bottom: clamp(70px, 8vh, 96px);
}

.reflection-page .reflection-form > .reflection-question-block:nth-child(3) {
  margin-bottom: 28px;
}

.reflection-page .reflection-data-note {
  margin-bottom: 0;
}

.reflection-page .reflection-actions {
  margin-top: 34px;
}

.scroll-progress {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(-50%);
}

.scroll-progress__link {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(48, 47, 44, 0.18);
  opacity: 0.8;
  transition:
    transform 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.scroll-progress__link:hover,
.scroll-progress__link:focus-visible,
.scroll-progress__link.is-active {
  background: rgba(48, 47, 44, 0.52);
  opacity: 1;
  transform: scale(1.25);
}

.scroll-progress__link:focus-visible {
  outline: 1px solid rgba(48, 47, 44, 0.34);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .cover-scroll-cue__arrow {
    animation: none;
  }
}

@media (max-width: 760px) {
  .site-scroll > .reflection-screen {
    padding-top: 72px;
    padding-bottom: 88px;
  }

  .reflection-page .reflection-content {
    margin-top: 56px;
  }

  .reflection-page .reflection-form > .reflection-question-block:nth-child(-n + 2) {
    margin-bottom: 64px;
  }

  .scroll-progress {
    display: none;
  }
}

/* Continuous chapter hierarchy: the Cover remains the only hero-sized opening. */
.cover-section {
  min-height: 100vh;
  padding-bottom: clamp(56px, 7vh, 84px);
}

.site-scroll #startButton.cover-scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(12px, 2vh, 24px);
  margin: 0;
  gap: 8px;
  color: rgba(48, 47, 44, 0.62);
  transform: translateX(-50%);
}

.site-scroll #startButton.cover-scroll-cue:hover,
.site-scroll #startButton.cover-scroll-cue:active,
.site-scroll #startButton.cover-scroll-cue:focus-visible {
  transform: translateX(-50%);
}

.cover-scroll-cue__arrow {
  opacity: 0.65;
}

.site-scroll > .diary-section,
.site-scroll > .voices-section,
.site-scroll > .reflection-section {
  padding-top: clamp(64px, 8vh, 92px);
}

.diary-section .diary-page,
.voices-section .voices-shell.chapter-page,
.reflection-section .reflection-shell.chapter-page {
  margin-top: 0;
}

.voices-section .voices-shell.chapter-page,
.reflection-section .reflection-shell.chapter-page {
  padding-top: 0;
}

.section-header.chapter-header {
  min-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: clamp(28px, 4vh, 40px);
}

.diary-header .section-title,
.many-voices-header .section-title,
.reflection-header .section-title {
  margin: 0;
  font-family: var(--font-serif, var(--serif));
  font-size: clamp(46px, 4vw, 60px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  text-align: center;
}

.diary-header .section-subtitle,
.reflection-header .section-subtitle,
.many-voices-header .voices-intro.section-subtitle {
  max-width: 760px;
  margin: 12px auto 0;
  color: var(--text-secondary);
  font-family: var(--font-sans, var(--sans));
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

.many-voices-header .voices-intro.section-subtitle {
  display: grid;
  gap: 2px;
}

.many-voices-header .voices-intro__text {
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: center;
}

.diary-section .diary-page .diary-layout {
  padding-top: clamp(32px, 4vh, 44px);
}

.voices-section .many-voices-content {
  padding-top: clamp(32px, 4vh, 44px);
}

.reflection-section .reflection-page .reflection-content {
  margin-top: clamp(42px, 6vh, 64px);
}

@media (max-width: 760px) {
  .cover-section {
    padding-bottom: 48px;
  }

  .site-scroll #startButton.cover-scroll-cue {
    bottom: 16px;
  }

  .site-scroll > .diary-section,
  .site-scroll > .voices-section,
  .site-scroll > .reflection-section {
    padding-top: 56px;
  }

  .section-header.chapter-header {
    gap: 0;
    padding-bottom: 26px;
  }

  .diary-header .section-title,
  .many-voices-header .section-title,
  .reflection-header .section-title {
    font-size: clamp(40px, 11vw, 52px);
  }
}

/* One shared visual language for every narrative heading beneath the Cover. */
.site-scroll > .diary-section,
.site-scroll > .voices-section,
.site-scroll > .reflection-section {
  padding-top: 0;
}

.flow-heading {
  position: relative;
  display: block;
  width: 100%;
  max-width: 720px;
  min-height: 0;
  margin: clamp(48px, 6vh, 72px) 0 clamp(24px, 4vh, 36px);
  padding: 0;
  text-align: left;
}

.flow-heading .chapter-header__left,
.flow-heading .chapter-header__right {
  display: none !important;
}

.flow-heading__copy {
  width: 100%;
}

.flow-heading .flow-heading-kicker {
  display: block;
  margin: 0 0 10px;
  color: rgba(48, 47, 44, 0.42);
  font-family: var(--font-sans, var(--sans));
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.flow-heading .flow-heading-title {
  display: block;
  width: 100%;
  justify-self: start;
  align-self: start;
  margin: 0 0 10px;
  color: var(--text-primary);
  font-family: var(--font-serif, var(--serif));
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-align: left;
}

.flow-heading .flow-heading-subtitle {
  display: block;
  max-width: 620px;
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-sans, var(--sans));
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
}

.reflection-header.flow-heading {
  max-width: 720px;
  margin-right: 0;
  margin-left: 0;
}

.diary-header + .chapter-divider,
.many-voices-header + .chapter-divider,
.reflection-header + .chapter-divider {
  display: none;
}

.diary-section .diary-page .diary-layout,
.voices-section .many-voices-content {
  padding-top: 0;
}

.reflection-section .reflection-page .reflection-content {
  margin-top: 0;
}

.many-voices-content .voices-conclusion {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border-top: 0;
}

.voices-conclusion .voices-conclusion__content {
  width: 100%;
  max-width: none;
  text-align: left;
}

.voices-conclusion .voices-conclusion__heading {
  margin-right: 0;
  margin-left: 0;
}

/* Keep the full reflection survey on one left-aligned reading axis. */
.reflection-page .reflection-content,
.reflection-page .reflection-form,
.reflection-page .reflection-question-block,
.reflection-page .reflection-question-block legend,
.reflection-page .reflection-open-label {
  text-align: left;
}

.reflection-page .reflection-content {
  margin-right: auto;
  margin-left: 0;
}

.reflection-page .reflection-question-block legend,
.reflection-page .reflection-open-label {
  justify-items: start;
}

.reflection-page .reflection-question-number,
.reflection-page .reflection-question-title,
.reflection-page .reflection-question-help {
  width: 100%;
  text-align: left;
}

/* Light editorial hierarchy pass: stronger transitions, quieter supporting layers. */
.flow-heading {
  margin-bottom: clamp(30px, 4vh, 46px);
}

.flow-heading .flow-heading-kicker {
  color: rgba(48, 47, 44, 0.36);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.flow-heading .flow-heading-title {
  font-size: clamp(32px, 3vw, 44px);
}

.many-voices-content .voice-quote__text {
  color: rgba(48, 47, 44, 0.72);
  opacity: 0.86;
}

.many-voices-content .voice-slot:hover .voice-quote__text,
.many-voices-content .voice-slot:focus-within .voice-quote__text,
.many-voices-content .voice-slot.is-focused .voice-quote__text,
.many-voices-content .voice-slot.is-active .voice-quote__text {
  color: var(--text-primary);
  opacity: 1;
}

.voices-wall__content > .background-keyword-layer .voice-whisper {
  opacity: 0.07;
}

.reflection-header.flow-heading {
  margin-top: clamp(40px, 5vh, 64px);
}

/* Diary micro-interactions: hover/focus affordance without changing layout. */
.interactive-phrase,
.psych-trigger,
.sleep-time-trigger.interactive-time,
.interrupted-night-node--start .interrupted-night-node__time {
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  text-decoration-color: currentColor;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    opacity 180ms ease,
    transform 220ms ease,
    font-weight 220ms ease;
}

.interactive-phrase:hover,
.interactive-phrase:focus-visible,
.psych-trigger:hover,
.psych-trigger:focus-visible,
.sleep-time-trigger.interactive-time:hover,
.sleep-time-trigger.interactive-time:focus-visible,
.interrupted-night-node--start:hover .interrupted-night-node__time,
.interrupted-night-node--start:focus-visible .interrupted-night-node__time {
  text-decoration-style: solid;
  background-color: rgba(255, 255, 255, 0.28);
}

.brain-fog-word-wrapper {
  position: relative;
  display: inline;
  width: auto;
  min-width: 0;
}

.brain-fog-trigger,
.brain-fog-trigger.is-active {
  position: relative;
  display: inline;
  width: auto;
  min-width: 0;
  white-space: normal;
  cursor: pointer;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  text-decoration-skip-ink: auto;
  text-decoration-color: currentColor;
  transition: background-color 180ms ease;
}

.brain-fog-word {
  display: inline;
  grid-area: auto;
  width: auto;
  min-width: 0;
  white-space: normal;
  text-align: inherit;
  opacity: 1;
  filter: none;
  animation: none;
  transition:
    opacity 400ms ease-in-out,
    filter 400ms ease-in-out;
}

.brain-fog-trigger.is-fading .brain-fog-word {
  opacity: 0;
  filter: blur(1px);
}

.hot-flash-trigger::before {
  transition: opacity 260ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hot-flash-wave.is-active {
  animation-duration: 1200ms;
}

.pain-sting-phrase.is-stinging {
  animation: none;
  transform: translateY(2px) scale(1.01);
  font-weight: 550;
}

.psych-floating-word {
  animation: none;
  opacity: 0;
  transform: translate(-50%, -50%) translateY(8px) scale(0.98);
  transition:
    opacity 300ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0ms;
}

.psych-word-layer.is-active .psych-floating-word {
  animation: none;
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0) scale(1);
  transition-duration: 1300ms;
  transition-delay: var(--word-delay);
}

.entry.sleep-timeline-open .sleep-time-trigger {
  position: absolute;
  display: inline-block;
  opacity: 0;
  pointer-events: none;
}

.interrupted-night-timeline {
  transition:
    grid-template-rows 420ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms ease;
}

.interrupted-night-timeline__rail {
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reflection: a left-aligned close with a quiet tab rail and optional prompts. */
.reflection-section {
  --reflection-accent: #a46053;
  --reflection-line-soft: rgba(48, 47, 44, 0.12);
}

.reflection-section .reflection-header.flow-heading {
  max-width: 980px;
  margin-right: 0;
  margin-left: 0;
  text-align: left;
}

.reflection-section .reflection-header.flow-heading .flow-heading-kicker {
  margin-bottom: 22px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-align: left;
}

.reflection-section .reflection-header.flow-heading .flow-heading-title {
  margin-bottom: 22px;
  font-size: clamp(56px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-align: left;
}

.reflection-section .reflection-header.flow-heading .flow-heading-subtitle {
  max-width: 720px;
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  text-align: left;
}

.reflection-section .reflection-page .reflection-content {
  width: 100%;
  max-width: none;
  margin: 64px 0 0;
  text-align: left;
}

.reflection-position-block {
  width: 100%;
  margin: 0;
  text-align: left;
}

.reflection-position-block h3 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.08;
  font-weight: 400;
  color: var(--text-primary);
  text-align: left;
}

.reflection-section .reflection-position-note {
  max-width: 720px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: left;
}

.reflection-position-options.reflection-position-tabs-wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  min-height: 88px;
  margin: 42px auto 0;
  border-top: 1px solid var(--reflection-line-soft);
  border-bottom: 1px solid var(--reflection-line-soft);
}

.reflection-position-option.reflection-position-tab {
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  margin: 0;
  padding: 18px 18px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  transition:
    color 220ms ease,
    background-color 220ms ease;
}

.reflection-position-option.reflection-position-tab::after {
  content: "";
  position: absolute;
  right: 15%;
  bottom: -1px;
  left: 15%;
  height: 2px;
  background: transparent;
  transition: background-color 220ms ease;
}

.reflection-position-option.reflection-position-tab:hover {
  color: var(--reflection-accent);
  background: rgba(164, 96, 83, 0.03);
}

.reflection-position-option.reflection-position-tab:focus-visible {
  color: var(--reflection-accent);
  outline: none;
  background: rgba(164, 96, 83, 0.03);
}

.reflection-position-option.reflection-position-tab:focus-visible::after {
  background: rgba(164, 96, 83, 0.68);
}

.reflection-position-option.reflection-position-tab.is-selected,
.reflection-position-option.reflection-position-tab[aria-pressed="true"] {
  color: var(--reflection-accent);
  font-weight: 600;
  background: rgba(164, 96, 83, 0.025);
}

.reflection-position-option.reflection-position-tab.is-selected::after,
.reflection-position-option.reflection-position-tab[aria-pressed="true"]::after {
  background: var(--reflection-accent);
}

.reflection-position-tab .tab-index {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: rgba(48, 47, 44, 0.42);
}

.reflection-position-tab.is-selected .tab-index,
.reflection-position-tab[aria-pressed="true"] .tab-index {
  color: rgba(164, 96, 83, 0.72);
}

.reflection-tab-label {
  display: inline;
}

.reflection-prompt-space[hidden],
.reflection-section .reflection-closing[hidden] {
  display: none;
}

.reflection-prompt-space {
  width: 100%;
  max-width: 1080px;
  min-height: 220px;
  margin: 56px auto 0;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.reflection-prompt-space.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reflection-section .reflection-prompt-guide {
  max-width: 680px;
  margin: 0 0 30px;
  color: var(--text-secondary);
  font-family: var(--font-sans, var(--sans));
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  text-align: left;
}

.reflection-prompt-content.reflection-prompt-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 28px;
  width: 100%;
}

.reflection-prompt-card {
  min-height: 220px;
  padding: 24px 24px 28px;
  border: 1px solid rgba(48, 47, 44, 0.08);
  border-top: 2px solid rgba(164, 96, 83, 0.32);
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
  text-align: left;
}

.reflection-prompt-index {
  display: inline-block;
  margin-bottom: 18px;
  font-family: var(--font-sans);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(164, 96, 83, 0.62);
}

.reflection-section .reflection-prompt {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 2vw, 34px);
  line-height: 1.2;
  font-weight: 400;
  color: var(--text-primary);
}

.reflection-section .reflection-closing {
  max-width: 620px;
  margin: 48px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(48, 47, 44, 0.08);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: left;
}

@media (max-width: 980px) {
  .reflection-prompt-content.reflection-prompt-deck {
    grid-template-columns: 1fr;
    max-width: 640px;
  }

  .reflection-prompt-card {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .reflection-position-options.reflection-position-tabs-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .reflection-section .reflection-header.flow-heading .flow-heading-title {
    font-size: clamp(44px, 13vw, 58px);
  }

  .reflection-section .reflection-page .reflection-content {
    margin-top: 48px;
  }

  .reflection-position-options.reflection-position-tabs-wrap {
    grid-template-columns: 1fr;
  }

  .reflection-position-option.reflection-position-tab {
    min-height: 74px;
  }

  .reflection-prompt-space {
    min-height: 210px;
    margin-top: 48px;
  }

  .reflection-section .reflection-closing {
    margin-top: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reflection-prompt-space,
  .reflection-position-option.reflection-position-tab,
  .reflection-position-option.reflection-position-tab::after {
    transition: none;
  }
}

/* Final shared hierarchy for the three narrative sections. */
.diary-section .diary-header.flow-heading .flow-heading-kicker,
.voices-section .many-voices-header.flow-heading .flow-heading-kicker,
.reflection-section .reflection-header.flow-heading .flow-heading-kicker {
  margin: 0 0 22px;
  color: rgba(48, 47, 44, 0.42);
  font-family: var(--font-sans, var(--sans));
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.diary-section .diary-header.flow-heading .flow-heading-title,
.voices-section .many-voices-header.flow-heading .flow-heading-title,
.reflection-section .reflection-header.flow-heading .flow-heading-title {
  margin: 0 0 20px;
  color: var(--text-primary);
  font-family: var(--font-serif, var(--serif));
  font-size: clamp(54px, 5.2vw, 72px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.diary-section .diary-header.flow-heading .flow-heading-subtitle,
.voices-section .many-voices-header.flow-heading .flow-heading-subtitle,
.reflection-section .reflection-header.flow-heading .flow-heading-subtitle {
  max-width: 720px;
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-sans, var(--sans));
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.symptom-sidebar__title,
.voices-conclusion__heading .flow-heading-title,
.reflection-position-block h3 {
  font-family: var(--font-serif, var(--serif));
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.08;
  font-weight: 400;
  color: var(--text-primary);
}

/* Reflection tabs use the same dimensions and interaction language as Many Voices. */
.reflection-position-options.reflection-position-tabs-wrap {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 58px;
  border-top: 1px solid var(--line-color, var(--line));
  border-bottom: 1px solid var(--line-color, var(--line));
}

.reflection-position-option.reflection-position-tab {
  min-height: 58px;
  padding: 0 16px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  transition: color 180ms ease;
}

.reflection-position-option.reflection-position-tab::after {
  right: 14%;
  bottom: -1px;
  left: 14%;
  height: 1.5px;
  background: var(--reflection-accent);
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.reflection-position-option.reflection-position-tab:hover,
.reflection-position-option.reflection-position-tab:focus-visible,
.reflection-position-option.reflection-position-tab.is-selected,
.reflection-position-option.reflection-position-tab[aria-pressed="true"] {
  color: var(--reflection-accent);
  background: transparent;
}

.reflection-position-option.reflection-position-tab:hover::after,
.reflection-position-option.reflection-position-tab:focus-visible::after,
.reflection-position-option.reflection-position-tab.is-selected::after,
.reflection-position-option.reflection-position-tab[aria-pressed="true"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.reflection-position-option.reflection-position-tab:focus-visible {
  outline: 2px solid rgba(58, 58, 55, 0.3);
  outline-offset: 4px;
}

.reflection-position-option.reflection-position-tab.is-selected,
.reflection-position-option.reflection-position-tab[aria-pressed="true"] {
  font-weight: 600;
}

.reflection-position-tab .tab-index {
  margin-right: 0;
  color: rgba(48, 47, 44, 0.42);
  font-size: 11px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.reflection-position-tab.is-selected .tab-index,
.reflection-position-tab[aria-pressed="true"] .tab-index {
  color: rgba(164, 96, 83, 0.68);
}

.reflection-section .reflection-prompt {
  font-size: clamp(26px, 2.1vw, 34px);
  line-height: 1.22;
}

@media (max-width: 900px) {
  .reflection-position-options.reflection-position-tabs-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .diary-section .diary-header.flow-heading .flow-heading-title,
  .voices-section .many-voices-header.flow-heading .flow-heading-title,
  .reflection-section .reflection-header.flow-heading .flow-heading-title {
    font-size: clamp(44px, 12vw, 54px);
  }

  .reflection-position-options.reflection-position-tabs-wrap {
    grid-template-columns: 1fr;
  }

  .reflection-position-option.reflection-position-tab {
    min-height: 58px;
  }
}

/* Keep the first two narrative titles on one line at desktop widths. */
@media (min-width: 1100px) {
  .diary-section .diary-header.flow-heading,
  .voices-section .many-voices-header.flow-heading {
    max-width: none;
  }

  .diary-section .diary-header.flow-heading .flow-heading-title,
  .voices-section .many-voices-header.flow-heading .flow-heading-title {
    white-space: nowrap;
  }
}

/* Tighten the narrative handoff from Many Voices into Reflection. */
@media (min-width: 761px) {
  .many-voices-content .voices-conclusion__heading {
    width: 100%;
    max-width: none;
  }

  .many-voices-content .voices-conclusion__heading .flow-heading-subtitle {
    width: fit-content;
    max-width: none;
    white-space: nowrap;
  }
}

.many-voices-content .voices-source-note {
  margin-top: 32px;
}

.reflection-section .reflection-page .reflection-content {
  margin-top: 44px;
}

@media (max-width: 760px) {
  .many-voices-content .voices-conclusion__heading .flow-heading-subtitle {
    width: auto;
    white-space: normal;
  }
}
