/* =========================================================================
   CONTROLLED AI — design system v2 · "The Aperture"
   Concept: light through a widening window. Ink atmosphere, film grain,
   editorial serif (Fraunces) + instrument numerals (Space Grotesk).
   All fonts self-hosted — zero external requests, the privacy promise holds.
   ========================================================================= */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #090d12;
  --ink-2: #0c1118;
  --surface: rgba(214, 235, 226, 0.028);
  --surface-hover: rgba(214, 235, 226, 0.05);
  --line: rgba(203, 226, 217, 0.11);
  --line-soft: rgba(203, 226, 217, 0.065);

  --text: #eae7df;
  --text-dim: #a2aca5;
  --text-faint: #626c65;

  --light: #dff2e9;            /* window light */
  --accent: #8fdcc0;           /* mint */
  --accent-deep: #4fa787;
  --accent-dim: rgba(143, 220, 192, 0.10);
  --glow: rgba(143, 220, 192, 0.16);

  --calm: #86c8a8;
  --warm: #d9b36c;
  --hot: #d98a6c;
  --alert: #e07070;
  --neutral: #9aa49f;

  --radius: 16px;
  --radius-sm: 11px;
  --maxw: 660px;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-data: "Space Grotesk", "SF Mono", ui-monospace, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- atmosphere: two soft glows breathing behind everything ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(52% 38% at 68% -6%, rgba(143, 220, 192, 0.075), transparent 70%),
    radial-gradient(45% 34% at 12% 108%, rgba(90, 140, 170, 0.055), transparent 72%),
    linear-gradient(180deg, #0a0e14 0%, #090d12 55%, #080b10 100%);
}

/* ---- film grain: kills the flat-black genericness ---- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(143, 220, 192, 0.28); color: var(--light); }

#app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 24px 100px;
  animation: fadein 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 480;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: 2.15rem; line-height: 1.18; margin-bottom: 16px; }
h2 { font-size: 1.5rem; line-height: 1.28; margin-bottom: 12px; }
h3 { font-size: 1.14rem; margin-bottom: 6px; font-weight: 520; }

p { margin-bottom: 14px; }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); font-size: 0.85rem; }
.small { font-size: 0.9rem; }

.eyebrow {
  font-family: var(--font-data);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 500;
}

.serif-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  font-weight: 420;
  line-height: 1.45;
  color: var(--light);
  letter-spacing: 0.002em;
}

/* ---------- structure ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 52px;
}

.wordmark {
  font-family: var(--font-data);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 13px;
}
/* brand mark: signal compressing into dots (inline SVG from app.js) */
.wordmark .brandmark {
  display: block;
  filter: drop-shadow(0 0 8px var(--glow));
}
.wordmark span { color: var(--accent); }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(234, 231, 223, 0.035);
}

.divider {
  height: 1px;
  border: 0;
  margin: 38px 0;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
  position: relative;
}
.divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--accent-deep);
  box-shadow: 0 0 10px var(--glow);
}

.section { margin: 52px 0; }

/* ---------- the aperture (hero mark) ---------- */

/* the widening window: two edges of light part, the gap glows faintly */
.aperture {
  position: relative;
  height: 84px;
  width: 150px;
  margin-bottom: 36px;
}
.aperture::before, .aperture::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2.5px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, var(--light) 26%, var(--light) 74%, transparent);
  box-shadow: 0 0 16px var(--glow);
  animation: edge-left 2.7s cubic-bezier(0.16, 0.8, 0.24, 1) 0.3s both;
}
.aperture::after { animation-name: edge-right; }
@keyframes edge-left  { from { transform: translateX(-3px); } to { transform: translateX(-56px); } }
@keyframes edge-right { from { transform: translateX(1px); }  to { transform: translateX(54px); } }
.aperture span {
  position: absolute;
  top: 6%; bottom: 6%;
  left: 50%;
  width: 106px;
  transform: translateX(-50%);
  background: radial-gradient(52% 64% at 50% 50%, rgba(223, 242, 233, 0.2), rgba(223, 242, 233, 0.05) 60%, transparent 78%);
  animation: gap-glow 2.7s cubic-bezier(0.16, 0.8, 0.24, 1) 0.3s both;
}
@keyframes gap-glow {
  from { opacity: 0; transform: translateX(-50%) scaleX(0.05); }
  to   { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

/* ---------- buttons ---------- */

button {
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  border: 0;
  border-radius: var(--radius-sm);
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.18s ease,
              background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  display: block;
  width: 100%;
  padding: 16px 22px;
  background: linear-gradient(115deg, var(--light) 0%, #b7e5d1 100%);
  color: #0a1710;
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 34px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 16px 44px -8px rgba(143, 220, 192, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.35; cursor: default; transform: none; }

.btn-ghost {
  display: block;
  width: 100%;
  padding: 14px 22px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(203, 226, 217, 0.3); background: var(--surface); }

.btn-quiet {
  background: none;
  color: var(--text-faint);
  font-size: 0.85rem;
  padding: 12px 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(203, 226, 217, 0.25);
}
.btn-quiet:hover { color: var(--text-dim); text-decoration-color: currentColor; }

.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

.btn-urge {
  display: block;
  width: 100%;
  padding: 16px 22px;
  background: rgba(217, 138, 108, 0.05);
  border: 1px solid rgba(217, 138, 108, 0.4);
  color: #e8a586;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.btn-urge:hover {
  background: rgba(217, 138, 108, 0.11);
  border-color: rgba(217, 138, 108, 0.65);
  box-shadow: 0 8px 30px -10px rgba(217, 138, 108, 0.25);
}

/* ---------- landing ---------- */

.hero { margin: 20px 0 44px; }
.hero h1 {
  font-size: clamp(2.3rem, 6.5vw, 3.05rem);
  font-weight: 460;
  line-height: 1.14;
}
.hero .sub { font-size: 1.1rem; color: var(--text-dim); margin: 20px 0 30px; max-width: 54ch; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 30px; }
.pill {
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--surface);
}

.privacy-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(115deg, var(--accent-dim), rgba(143, 220, 192, 0.04));
  border: 1px solid rgba(143, 220, 192, 0.22);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.93rem;
  color: var(--text-dim);
}
.privacy-note .lock {
  color: var(--accent);
  font-size: 0.8rem;
  line-height: 1.9;
  text-shadow: 0 0 12px var(--glow);
}

.how-step { display: flex; gap: 20px; margin-bottom: 26px; }
.how-num {
  font-family: var(--font-data);
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 500;
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(143, 220, 192, 0.3);
  border-radius: 50%;
  margin-top: 2px;
}

/* ---------- safety & assessment ---------- */

.progress-track {
  height: 2px;
  background: var(--line-soft);
  border-radius: 4px;
  margin-bottom: 44px;
  overflow: visible;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--light));
  border-radius: 4px;
  transition: width 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
  position: relative;
}
.progress-fill::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--light);
  box-shadow: 0 0 10px 2px var(--glow);
}

.q-domain {
  font-family: var(--font-data);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.q-text {
  font-family: var(--font-display);
  font-size: 1.62rem;
  font-weight: 440;
  line-height: 1.36;
  margin-bottom: 36px;
  min-height: 3.4em;
  text-wrap: balance;
}

.scale-options { display: flex; flex-direction: column; gap: 9px; }

.scale-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  position: relative;
  overflow: hidden;
}
.scale-btn::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2.5px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}
.scale-btn:hover { border-color: rgba(143, 220, 192, 0.35); background: var(--surface-hover); transform: translateX(3px); }
.scale-btn.selected { border-color: rgba(143, 220, 192, 0.45); background: var(--accent-dim); }
.scale-btn.selected::before { transform: scaleY(1); }
.scale-num {
  font-family: var(--font-data);
  color: var(--text-faint);
  min-width: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}
.scale-btn.selected .scale-num, .scale-btn:hover .scale-num { color: var(--accent); }

.yn-row { display: flex; gap: 10px; margin-top: 24px; }
.yn-row button {
  flex: 1;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 1.02rem;
}
.yn-row button:hover { border-color: rgba(143, 220, 192, 0.4); background: var(--surface-hover); }
.yn-row button.selected { border-color: var(--accent); background: var(--accent-dim); }

.helper { font-size: 0.85rem; color: var(--text-faint); text-align: center; margin-top: 28px; }

/* ---------- processing ---------- */

.processing { text-align: center; padding: 110px 0; }
.pulse-ring {
  width: 60px;
  height: 74px;
  margin: 0 auto 36px;
  display: flex;
  justify-content: center;
  gap: 0;
  position: relative;
}
.pulse-ring::before, .pulse-ring::after {
  content: "";
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, transparent, var(--light) 25%, var(--light) 75%, transparent);
  box-shadow: 0 0 18px var(--glow);
  animation: part 1.9s ease-in-out infinite;
}
.pulse-ring::after { animation-name: part-r; }
@keyframes part {
  0%, 100% { transform: translateX(9px); opacity: 0.5; }
  50%      { transform: translateX(-9px); opacity: 1; }
}
@keyframes part-r {
  0%, 100% { transform: translateX(-9px); opacity: 0.5; }
  50%      { transform: translateX(9px); opacity: 1; }
}

/* ---------- results ---------- */

.score-hero { text-align: center; padding: 28px 0 8px; }

.score-dial { width: 216px; height: 216px; margin: 0 auto 6px; position: relative; }
.score-dial svg { transform: rotate(-90deg); overflow: visible; }
.dial-ticks {
  fill: none;
  stroke: rgba(203, 226, 217, 0.12);
  stroke-width: 5;
  stroke-dasharray: 1 5.14; /* fine instrument ticks */
}
.dial-track { fill: none; stroke: rgba(203, 226, 217, 0.09); stroke-width: 6; }
.dial-value {
  fill: none;
  stroke: url(#dialGrad);
  stroke-width: 6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--glow));
  transition: stroke-dashoffset 1.3s cubic-bezier(0.22, 0.7, 0.25, 1);
}
.dial-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.dial-number {
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 3.7rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--light);
  text-shadow: 0 0 30px var(--glow);
  font-variant-numeric: tabular-nums;
}
.dial-label {
  font-family: var(--font-data);
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 8px;
}

.band-chip {
  display: inline-block;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid rgba(143, 220, 192, 0.3);
  color: var(--accent);
  background: var(--accent-dim);
  margin: 12px 0 4px;
}

.domain-bar { margin-bottom: 22px; }
.domain-bar .db-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.domain-bar .db-name { font-size: 0.97rem; font-weight: 600; letter-spacing: 0.01em; }
.domain-bar .db-val {
  font-family: var(--font-data);
  font-size: 0.76rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.domain-bar .db-track { height: 5px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.domain-bar .db-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.22, 0.7, 0.25, 1);
}
.domain-bar .db-desc { font-size: 0.86rem; color: var(--text-dim); margin-top: 8px; }

.lever-card {
  position: relative;
  background: linear-gradient(115deg, rgba(143, 220, 192, 0.07), var(--surface));
  border: 1px solid rgba(143, 220, 192, 0.16);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 20px 0;
  overflow: hidden;
}
.lever-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--light), var(--accent-deep));
  box-shadow: 0 0 14px var(--glow);
}

/* ---------- dashboard ---------- */

.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 15px;
  border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: var(--surface);
}
.state-dot { width: 7px; height: 7px; border-radius: 50%; }
.state-dot.calm    { background: var(--calm);    box-shadow: 0 0 8px rgba(134, 200, 168, 0.6); }
.state-dot.warm    { background: var(--warm);    box-shadow: 0 0 8px rgba(217, 179, 108, 0.6); }
.state-dot.hot     { background: var(--hot);     box-shadow: 0 0 8px rgba(217, 138, 108, 0.6); }
.state-dot.neutral { background: var(--neutral); }
.state-dot.alert   { background: var(--alert);   box-shadow: 0 0 8px rgba(224, 112, 112, 0.6); }

.day-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.day-num { font-family: var(--font-display); font-size: 1.75rem; font-weight: 470; }

.history-strip { display: flex; gap: 6px; margin: 18px 0 8px; flex-wrap: wrap; }
.hist-cell {
  width: 30px; height: 44px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  overflow: hidden;
  position: relative;
}
.hist-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  opacity: 0.55;
}
.hist-cell .mark {
  position: absolute;
  top: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 6px rgba(217, 179, 108, 0.8);
  font-size: 0;
}

.reflection {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 2.5px solid var(--accent-deep);
  border-radius: var(--radius);
  padding: 24px 26px;
  white-space: pre-line;
  font-size: 0.99rem;
  box-shadow: inset 0 1px 0 rgba(234, 231, 223, 0.035);
}
.reflection-label {
  font-family: var(--font-data);
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}

/* ---------- check-in ---------- */

.stress-readout {
  text-align: center;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 3.6rem;
  margin: 10px 0 2px;
  color: var(--light);
  text-shadow: 0 0 26px var(--glow);
  font-variant-numeric: tabular-nums;
}

.stress-slider {
  width: 100%;
  margin: 26px 0 10px;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-deep), var(--hot));
  outline: none;
}
.stress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--light);
  border: none;
  box-shadow: 0 0 0 5px rgba(223, 242, 233, 0.12), 0 0 18px var(--glow);
  cursor: grab;
}
.stress-slider::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--light);
  border: none;
  box-shadow: 0 0 0 5px rgba(223, 242, 233, 0.12), 0 0 18px var(--glow);
  cursor: grab;
}
.slider-labels {
  display: flex; justify-content: space-between;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 15px;
  min-height: 96px;
  resize: vertical;
  margin-top: 14px;
  transition: border-color 0.18s ease;
}
textarea:focus { outline: none; border-color: rgba(143, 220, 192, 0.5); }
textarea::placeholder { color: var(--text-faint); }

/* ---------- the window (urge tool) ---------- */

.window-timer { text-align: center; padding: 34px 0 10px; }

.breath-circle {
  width: 158px; height: 158px;
  margin: 0 auto 34px;
  border-radius: 50%;
  border: 1px solid rgba(223, 242, 233, 0.55);
  display: flex; align-items: center; justify-content: center;
  animation: breathe 8s ease-in-out infinite;
  font-family: var(--font-data);
  font-weight: 500;
  font-size: 2.1rem;
  color: var(--light);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1px rgba(143, 220, 192, 0.06), 0 0 50px -8px var(--glow);
}
@keyframes breathe {
  0%, 100% { transform: scale(0.84); box-shadow: 0 0 0 1px rgba(143,220,192,0.05), 0 0 30px -8px rgba(143,220,192,0.08); }
  50%      { transform: scale(1.05); box-shadow: 0 0 0 1px rgba(143,220,192,0.12), 0 0 70px -4px rgba(143,220,192,0.22); }
}

.window-prompt {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 420;
  font-size: 1.28rem;
  color: var(--text-dim);
  min-height: 3.2em;
  padding: 0 12px;
  transition: opacity 0.5s ease;
  text-wrap: balance;
}

.option-card {
  display: block; width: 100%; text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 19px 22px;
  margin-bottom: 12px;
  color: var(--text);
}
.option-card:hover {
  border-color: rgba(143, 220, 192, 0.35);
  background: var(--surface-hover);
  transform: translateY(-1.5px);
  box-shadow: 0 12px 34px -14px rgba(143, 220, 192, 0.18);
}
.option-card .oc-title { font-weight: 640; margin-bottom: 3px; }
.option-card .oc-desc { font-size: 0.88rem; color: var(--text-dim); }

/* ---------- safety screens ---------- */

.stop-screen { border-left: 2.5px solid var(--alert); padding-left: 24px; margin-top: 30px; }
.stop-screen.medical { border-color: var(--warm); }
.resource-list { list-style: none; margin: 20px 0; }
.resource-list li {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 9px;
  font-size: 0.95rem;
}
.resource-list a { color: var(--light); text-underline-offset: 3px; }

/* ---------- footer ---------- */

.legal {
  margin-top: 76px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--text-faint);
}

@media (max-width: 480px) {
  #app { padding: 22px 18px 76px; }
  .hero h1 { font-size: 2.05rem; }
  .q-text { font-size: 1.34rem; }
  .aperture { height: 66px; margin-bottom: 26px; }
  .score-dial { width: 192px; height: 192px; }
  .score-dial svg { width: 192px; height: 192px; }
}

/* Notched devices */
@supports (padding: env(safe-area-inset-top)) {
  #app {
    padding-top: calc(30px + env(safe-area-inset-top));
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Values set by JS (dial offset, bar widths) still apply — just instantly. */
  * { animation: none !important; transition: none !important; }
  /* aperture rests in its open state */
  .aperture::before { transform: translateX(-56px); }
  .aperture::after  { transform: translateX(54px); }
  .aperture span    { opacity: 1; }
}

/* ---------- waitlist input ---------- */

.wl-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 15px 16px;
  transition: border-color 0.18s ease;
}
.wl-input:focus { outline: none; border-color: rgba(143, 220, 192, 0.5); }
.wl-input::placeholder { color: var(--text-faint); }
