:root {
  color-scheme: light;
  --ink: oklch(18% 0.018 155);
  --sage: oklch(69% 0.045 145);
  --blue: oklch(59% 0.028 238);
  --brand-blue: oklch(20% 0.05 238);
  --terracotta: #b06f60;
  --terracotta-deep: oklch(18% 0.05 35);
  --emergency: #4a1d1b;
  --paper: oklch(97% 0.006 150);
  --line: oklch(18% 0.018 155 / 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Playfair Display", Georgia, serif;
  --font-ui: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font-ui);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; background: var(--sage); color: var(--ink); }

button, a { font: inherit; }

.app-shell { --accent: var(--ink); --accent-on: var(--paper); --accent-hover: oklch(18% 0.018 155 / 0.12); --accent-focus: oklch(18% 0.018 155 / 0.42); min-height: 100svh; position: relative; overflow: hidden; }
.app-shell[data-accent-mode="light"] { --accent: var(--paper); --accent-on: var(--ink); --accent-hover: oklch(97% 0.006 150 / 0.18); --accent-focus: oklch(97% 0.006 150 / 0.6); }

.brand { position: fixed; z-index: 2; top: 1.5rem; left: clamp(1.25rem, 5vw, 4rem); margin: 0; color: var(--brand-blue); font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.brand--terracotta { color: var(--terracotta-deep); }
.restart-button { position: fixed; z-index: 3; top: 1.35rem; right: clamp(1.25rem, 5vw, 4rem); padding: 0; border: 0; background: transparent; color: var(--accent); cursor: default; font: inherit; font-size: 0.9rem; text-decoration: underline; text-underline-offset: 0.25em; }
.restart-button:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 3px; }

.screen { position: absolute; inset: 0; display: none; min-height: 100svh; padding: 6.5rem clamp(1.25rem, 5vw, 4rem) 7rem; place-items: center; overflow: hidden; }
.screen.is-active { z-index: 1; display: grid; animation: screen-in 620ms var(--ease); }
.screen.is-exiting { z-index: 0; display: grid; pointer-events: none; }
.screen--sage { background: var(--sage); }
.screen--blue { background: var(--blue); }
.screen--terracotta { background: var(--terracotta); }
.screen--urgent { background: var(--terracotta); color: var(--ink); }

.screen__content { position: relative; z-index: 1; width: min(100%, 39rem); }
.screen__content--wide { width: min(100%, 47rem); }
.screen__message, .quote { max-width: 13ch; margin: 0; font-family: var(--font-display); font-size: clamp(2.8rem, 10vw, 6rem); font-weight: 500; line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
.type-target:not(:empty)::after { display: inline-block; width: 0.06em; height: 0.82em; margin-left: 0.07em; background: currentColor; content: ""; vertical-align: -0.06em; animation: cursor-blink 850ms steps(1, end) infinite; }
.screen__message--small { max-width: 17ch; font-size: clamp(2.25rem, 8vw, 4.8rem); }
.screen__note, .quote-source, .urgent-copy, .support-copy, .support-hours, .support-safety { max-width: 34rem; margin: 1.35rem 0 0; font-size: 1rem; line-height: 1.55; }
.quote-source { display: block; font-size: 0.9rem; font-style: normal; opacity: 0.78; }
.support-hours, .support-safety { font-size: 0.9rem; }
.support-safety { font-weight: 650; }

.step { margin: 0 0 1rem; font-size: 0.9rem; font-weight: 650; }
h1 { max-width: 15ch; margin: 0 0 2rem; font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }

.choice-list { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.choice, .button { border: 1px solid var(--accent); border-radius: 0.55rem; background: transparent; color: inherit; cursor: default; padding: 0.9rem 1rem; line-height: 1.2; text-align: left; transition: transform 150ms var(--ease), background-color 150ms var(--ease); }
.choice:hover, .choice:focus-visible, .button:hover, .button:focus-visible { background: var(--accent-hover); outline: 3px solid var(--accent-focus); outline-offset: 3px; }
.choice:active, .button:active { transform: scale(0.98); }
.button { display: inline-block; margin-top: 2rem; background: var(--accent); color: var(--accent-on); text-decoration: none; }
.button--text { padding: 0; border: 0; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 0.25em; }
.button--outline { display: block; width: fit-content; margin-top: 0.75rem; border-color: var(--accent); background: transparent; color: var(--accent); }
.button--emergency { border-color: var(--emergency); background: var(--emergency); color: var(--paper); font-weight: 700; }
.button--emergency:hover, .button--emergency:focus-visible { background: oklch(24% 0.07 30); outline-color: oklch(24% 0.07 30 / 0.55); }

.activity-title { margin-bottom: 0.8rem; }
.activity-title, .activity-text { font-family: var(--font-display); }
.activity-text { max-width: 28ch; margin: 0; font-size: clamp(1.45rem, 4vw, 2.25rem); line-height: 1.25; letter-spacing: -0.01em; }
.activity-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-top: 2.25rem; }
.activity-actions[hidden] { display: none; }
.activity-actions .button { margin-top: 0; }
.helpline { position: fixed; z-index: 3; right: 1.25rem; bottom: 1.25rem; border-radius: 999px; background: var(--accent); color: var(--accent-on); cursor: default; padding: 0.85rem 1rem; font-size: 0.9rem; font-weight: 700; text-decoration: none; box-shadow: 0 4px 8px oklch(18% 0.018 155 / 0.22); }
.preference-controls { position: fixed; z-index: 3; bottom: 1.5rem; left: clamp(1.25rem, 5vw, 4rem); display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.sound-toggle, .accent-toggle { border: 0; background: transparent; color: var(--accent); cursor: default; font-size: 0.8rem; text-decoration: underline; text-underline-offset: 0.25em; }
@keyframes screen-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cursor-blink { 0%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }
@media (max-width: 35rem) {
  .screen { padding-top: 8.5rem; }
  .screen[data-screen="question"] { align-items: start; overflow-y: auto; padding-bottom: 2rem; }
  .choice { width: 100%; }
  .preference-controls { top: 3.8rem; bottom: auto; }
  .restart-button { top: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
