/* =========================================================================
   Cope · brand-aligned visual system.

   Background: cool off-white. Type: near-black DM Sans for everything,
   Jost for the wordmark. The single iconic device is a solid black dot
   prefix used before headings, as a status indicator, and as decoration.
   Pill eyebrows do the metadata work. Whitespace does the rest.
   ========================================================================= */

:root {
  /* Brand palette */
  --bg:        #F6F6F7;
  --ink:       #1B1A1A;
  --ink-soft:  #4A4948;
  --ink-mute:  #8A8987;
  --rule:      #DCDCDD;
  --rule-soft: #E9E9EB;
  --pill:      #E5E5E7;
  --pill-ink:  #5E5D5C;
  --field:     #FFFFFF;

  --blue:      #607AC2;
  --navy:      #172A50;
  --green:     #6DA578;
  --butter:    #DFC25B;
  --danger:    #B0413E;

  /* Type stacks */
  --logo:  "Jost", "Futura", "Helvetica Neue", sans-serif;
  --sans:  "DM Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "kern", "calt";
}

#app { min-height: 100vh; }

/* =========================================================================
   Top bar — Cope wordmark left, menu pill right. Appears on every screen
   except the opening ritual (which has its own treatment).
   ========================================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  padding: 22px 28px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.brand {
  font-family: var(--logo);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.brand:hover { opacity: 0.7; }
.menu-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pill);
  border: 0;
  padding: 7px 14px 8px;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--pill-ink);
  cursor: pointer;
  line-height: 1;
}
.menu-pill .mini-dots {
  display: inline-block;
  width: 12px;
  height: 12px;
  background:
    radial-gradient(circle 1px at 2px 2px,  var(--pill-ink) 100%, transparent 0),
    radial-gradient(circle 1px at 6px 2px,  var(--pill-ink) 100%, transparent 0),
    radial-gradient(circle 1px at 10px 2px, var(--pill-ink) 100%, transparent 0),
    radial-gradient(circle 1px at 2px 6px,  var(--pill-ink) 100%, transparent 0),
    radial-gradient(circle 1px at 6px 6px,  var(--pill-ink) 100%, transparent 0),
    radial-gradient(circle 1px at 10px 6px, var(--pill-ink) 100%, transparent 0),
    radial-gradient(circle 1px at 2px 10px, var(--pill-ink) 100%, transparent 0),
    radial-gradient(circle 1px at 6px 10px, var(--pill-ink) 100%, transparent 0),
    radial-gradient(circle 1px at 10px 10px,var(--pill-ink) 100%, transparent 0);
}

/* =========================================================================
   Shell — main column under the top bar.
   ========================================================================= */

.shell {
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 28px 120px;
  min-height: calc(100vh - 60px);
}

/* =========================================================================
   The dot — Cope's signature device. Solid filled circle inline with text,
   roughly cap-height. Modifiers re-tint to the accent palette.
   ========================================================================= */

.dot {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.04em;
  margin-right: 0.42em;
  flex-shrink: 0;
}
.dot--green  { background: var(--green); }
.dot--blue   { background: var(--blue); }
.dot--navy   { background: var(--navy); }
.dot--butter { background: var(--butter); }
.dot--danger { background: var(--danger); }
.dot--mute   { background: var(--ink-mute); }

/* =========================================================================
   Eyebrow pill — replaces the old "crumb". Slightly darker than the page,
   small body text inside.
   ========================================================================= */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 7px;
  border-radius: 100px;
  background: var(--pill);
  color: var(--pill-ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1;
  margin: 0 0 28px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  margin-right: 0;
}
.eyebrow--accent { background: rgba(96, 122, 194, 0.14); color: var(--navy); }
.eyebrow--green  { background: rgba(109, 165, 120, 0.18); color: #436D4D; }
.eyebrow--danger { background: rgba(176, 65, 62, 0.12); color: var(--danger); }

/* =========================================================================
   Type scale.
   ========================================================================= */

h1.display, h2.chapter, h3.prompt {
  font-family: var(--sans);
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.018em;
}
h1.display {
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 46px);
  line-height: 1.12;
  margin: 0 0 18px;
}
h2.chapter {
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 36px);
  line-height: 1.15;
  margin: 0 0 12px;
}
h3.prompt {
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
}
.lede {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 560px;
}
.help {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0 0 18px;
  line-height: 1.5;
}
.note {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-mute);
  margin-top: 6px;
}
.divider {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 32px 0;
}

/* =========================================================================
   Buttons.
   Primary: solid black pill.
   Ghost: text link with an arrow.
   ========================================================================= */

button.primary {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 0;
  cursor: pointer;
  padding: 14px 24px 15px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--bg);
  transition: background 140ms ease, transform 100ms ease, opacity 140ms ease;
  line-height: 1;
}
button.primary:hover { background: #000; }
button.primary:disabled {
  background: var(--pill);
  color: var(--ink-mute);
  cursor: not-allowed;
}
button.ghost {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 12px 0;
  line-height: 1;
}
button.ghost:hover { color: var(--ink); }
button.ghost::after { content: " →"; }

.actions {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* =========================================================================
   Inputs.
   ========================================================================= */

textarea, input[type="text"], input[type="email"], select {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 14px 16px;
  width: 100%;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
textarea { min-height: 130px; resize: vertical; }
textarea:focus, input:focus, select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(27, 26, 26, 0.05);
}
textarea::placeholder, input::placeholder { color: var(--ink-mute); }

/* =========================================================================
   Single / multi-select choices.
   Single: card with a black dot fill on the left when selected.
   Multi: same but the dot turns green to signal a positive accumulation.
   ========================================================================= */

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.choice {
  font-family: var(--sans);
  font-size: 16.5px;
  font-weight: 400;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.4;
  transition: border-color 140ms ease, background 140ms ease;
}
.choice:hover { border-color: var(--ink-mute); }
.choice.selected {
  border-color: var(--ink);
  background: var(--field);
}
.choice .mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-mute);
  flex-shrink: 0;
  transition: background 140ms ease, border-color 140ms ease;
  position: relative;
}
.choice.selected .mark {
  border-color: var(--ink);
  background: var(--ink);
}
.choice.multi.selected .mark {
  border-color: var(--green);
  background: var(--green);
}
.choice.multi .mark { border-radius: 4px; }

/* =========================================================================
   Likert (PHQ-9 / GAD-7).
   ========================================================================= */

.likert {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.likert:last-of-type { border-bottom: 0; }
.likert .prompt-row {
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 14px;
  font-weight: 400;
}
.likert-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.likert-option {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 8px;
  cursor: pointer;
  text-align: center;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.likert-option:hover { border-color: var(--ink-mute); }
.likert-option.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.likert-section-title {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-mute);
  margin: 0 0 8px;
}
.likert-stem {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 24px;
  line-height: 1.55;
}

/* =========================================================================
   Preference matrix.
   ========================================================================= */

.pref-cat {
  border-top: 1px solid var(--rule-soft);
  padding: 20px 0;
}
.pref-cat:last-child { border-bottom: 1px solid var(--rule-soft); }
.pref-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 16px;
}
.pref-cat-label {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.pref-cat-toggle {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-mute);
  text-align: right;
}
.pref-cat-body { margin-top: 14px; }
.pref-strength {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}
.pref-strength button {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  background: var(--field);
  color: var(--ink-soft);
  border-radius: 100px;
  cursor: pointer;
}
.pref-strength button.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  background: var(--field);
  color: var(--ink-soft);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.chip:hover { border-color: var(--ink-mute); }
.chip.selected {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* =========================================================================
   AI summary card — the reflective return moment.
   ========================================================================= */

.ai-card {
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 26px 28px;
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  margin: 12px 0 32px;
  min-height: 90px;
  font-weight: 400;
}
.ai-card .cursor {
  display: inline-block;
  width: 7px;
  height: 18px;
  background: var(--ink);
  margin-left: 2px;
  vertical-align: -3px;
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* =========================================================================
   Match reveal.
   ========================================================================= */

.match-note {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  background: var(--field);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blue);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 36px;
}
.match-note strong { font-weight: 600; color: var(--ink); }

.match-section { margin-bottom: 44px; }
.match-section-title {
  /* repurposed as eyebrow */
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 7px;
  border-radius: 100px;
  background: var(--pill);
  color: var(--pill-ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1;
  margin: 0 0 18px;
}
.match-section-title .dot {
  width: 6px;
  height: 6px;
  margin-right: 0;
}

.therapist-card {
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 26px 28px;
  margin-bottom: 12px;
  transition: border-color 140ms ease;
}
.therapist-card.chosen { border-color: var(--ink); }
.therapist-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.005em;
  flex-shrink: 0;
}
.therapist-name {
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 4px;
  letter-spacing: -0.012em;
}
.therapist-meta {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-mute);
  letter-spacing: 0.005em;
}
.therapist-reasoning {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 14px 0 22px;
}
.therapist-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.therapist-bio {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding: 16px 0 0;
  border-top: 1px solid var(--rule-soft);
  margin-top: 18px;
}
.video-placeholder {
  background: var(--ink);
  color: var(--bg);
  height: 180px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 18px;
}
.video-placeholder::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
  margin-right: 12px;
}

.match-submit {
  border-top: 1px solid var(--rule-soft);
  padding-top: 28px;
  margin-top: 12px;
}
.match-submit-summary {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.match-submit-summary strong { color: var(--ink); font-weight: 500; }
.match-submit .actions { margin-top: 20px; }

/* =========================================================================
   Safety detour.
   ========================================================================= */

.safety {
  background: var(--field);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--danger);
  border-radius: 16px;
  padding: 26px 28px;
}
.safety h2 {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
  color: var(--ink);
}
.safety .resources {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  margin: 18px 0;
}
.resource-line { padding: 6px 0; }
.resource-line strong { color: var(--ink); font-weight: 600; }

/* =========================================================================
   Therapist brief (demo stage).
   ========================================================================= */

.stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 7px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 24px;
}
.stage-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bg);
}
.brief-wrap { padding-bottom: 32px; }
.brief-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
}
.brief-meta > div { display: flex; flex-direction: column; gap: 4px; }
.brief-meta-k {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.brief-meta-v {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  font-weight: 400;
}
.brief-section { margin-bottom: 40px; }
.brief-h {
  /* eyebrow-style section header */
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 7px;
  border-radius: 100px;
  background: var(--pill);
  color: var(--pill-ink);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 16px;
}
.brief-h::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pill-ink);
}
.brief-prose {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 14px;
}
.brief-quote {
  font-family: var(--sans);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  padding: 6px 0 6px 18px;
  border-left: 2px solid var(--rule);
  margin: 0 0 14px;
}
.brief-meta-line {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 12px 0;
}
.brief-meta-line strong { font-weight: 500; color: var(--ink); }
.brief-meta-line .dot {
  width: 4px; height: 4px;
  background: var(--ink-mute);
  margin: 0 8px;
  vertical-align: 0.18em;
}
.brief-callout {
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink-soft);
  background: var(--rule-soft);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
}
.brief-callout strong { font-weight: 500; color: var(--ink); }
.brief-mirror {
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 14px 0 0;
  border-top: 1px dashed var(--rule);
  margin-top: 18px;
}
.brief-mirror-k {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: 6px;
}
.brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 28px;
}
.brief-grid > div { display: flex; flex-direction: column; gap: 4px; }
.brief-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brief-list li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: baseline;
}
.pref-tag {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  margin-left: 10px;
}
.pref-tag.hard { background: var(--ink); color: var(--bg); }
.pref-tag.flex { background: var(--pill); color: var(--pill-ink); }

.brief-warn {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: rgba(176, 65, 62, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border-left: 3px solid var(--danger);
}
.brief-warn strong { color: var(--danger); font-weight: 600; }

.brief-details {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 14px;
}
.brief-details summary {
  cursor: pointer;
  color: var(--blue);
  padding: 6px 0;
  list-style: none;
  display: inline-block;
  font-weight: 500;
}
.brief-details summary::before { content: "▸ "; }
.brief-details[open] summary::before { content: "▾ "; }
.brief-details summary::-webkit-details-marker { display: none; }

.brief-items { font-family: var(--sans); }
.brief-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.brief-items-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14.5px;
  vertical-align: top;
}
.brief-items-table td.num {
  width: 28px;
  color: var(--ink-mute);
  font-size: 12px;
}
.brief-items-table td.val {
  width: 180px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: right;
  white-space: nowrap;
}

.brief-raw {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
  background: var(--ink);
  color: #DAD8D2;
  padding: 18px;
  border-radius: 12px;
  overflow-x: auto;
  white-space: pre;
  margin-top: 14px;
  max-height: 480px;
  overflow-y: auto;
}

/* =========================================================================
   Opening ritual — three beats. Brand-aligned: black dot prefix, pill
   eyebrows for the numeric markers, geometric sans throughout. Single
   sparse dot decoration in the background (the brand's signature motif).
   ========================================================================= */

.ritual-stage {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 28px;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  font-family: var(--sans);
}

/* Sparse dot decoration — six dots scattered, of varying size, echoing the
   brand mark from the billboard. Pure CSS via radial gradients. */
.ritual-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 4px at 12% 22%, var(--ink) 100%, transparent 0),
    radial-gradient(circle 2.5px at 88% 18%, var(--ink) 100%, transparent 0),
    radial-gradient(circle 3px at 14% 78%, var(--ink) 100%, transparent 0),
    radial-gradient(circle 5px at 86% 82%, var(--ink) 100%, transparent 0),
    radial-gradient(circle 2px at 50% 8%, var(--ink) 100%, transparent 0),
    radial-gradient(circle 2px at 50% 94%, var(--ink) 100%, transparent 0);
  opacity: 0.6;
  pointer-events: none;
}

.ritual-card {
  position: relative;
  z-index: 1;
  max-width: 560px;
  text-align: center;
}
.ritual-numeral {
  /* block-level flex so it always sits on its own line; width: fit-content
     keeps the pill background hugging the text, margin: auto centers it. */
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 7px;
  border-radius: 100px;
  background: var(--pill);
  color: var(--pill-ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 auto 36px;
  animation: ritual-reveal 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 200ms both;
}
.ritual-numeral::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pill-ink);
}
.ritual-headline {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0 0 28px;
  display: block;
  text-align: center;
  text-wrap: balance;
  animation: ritual-reveal 1300ms cubic-bezier(0.2, 0.7, 0.2, 1) 700ms both;
}
.ritual-headline::before {
  /* Inline-block dot sits with the first word; if the text wraps the dot
     stays at the head of the first line. */
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--ink);
  vertical-align: 0.18em;
  margin-right: 0.32em;
}
.ritual-body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 auto 14px;
  max-width: 460px;
  text-wrap: balance;
  animation: ritual-reveal 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) 1500ms both;
}
.ritual-body--aside {
  font-size: 14.5px;
  color: var(--ink-mute);
  margin-top: 12px;
  animation-delay: 1900ms;
}
.ritual-action {
  margin-top: 52px;
  animation: ritual-reveal 1000ms cubic-bezier(0.2, 0.7, 0.2, 1) 2500ms both;
}
.ritual-btn {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.005em;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  border-radius: 100px;
  padding: 14px 28px 15px;
  cursor: pointer;
  line-height: 1;
  transition: background 140ms ease, transform 140ms ease;
}
.ritual-btn::after { content: "  →"; }
.ritual-btn:hover {
  background: #000;
  transform: translateX(2px);
}
.ritual-mark {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-family: var(--logo);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  opacity: 0;
  animation: ritual-reveal 1200ms ease-out 2800ms both;
}

@keyframes ritual-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ritual-leave-active { transition: opacity 600ms ease, transform 600ms ease; }
.ritual-leave-to { opacity: 0; transform: translateY(-6px); }

/* =========================================================================
   Transitions.
   ========================================================================= */

.fade-enter-active, .fade-leave-active { transition: opacity 220ms ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* =========================================================================
   Loading state.
   ========================================================================= */

.loading {
  font-family: var(--sans);
  color: var(--ink-mute);
  font-size: 16px;
  text-align: center;
  padding: 80px 0;
  letter-spacing: 0.01em;
}
.loading::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-mute);
  margin-right: 10px;
  vertical-align: 0.18em;
  animation: blink 1.2s steps(2) infinite;
}

/* =========================================================================
   Responsive.
   ========================================================================= */

@media (max-width: 540px) {
  body { font-size: 16px; }
  .topbar { padding: 18px 20px 14px; }
  .shell { padding: 28px 20px 80px; }
  .lede { font-size: 17px; }
  .ai-card { padding: 22px 22px; font-size: 17px; }
  .likert-options { grid-template-columns: 1fr 1fr; }
  .brief-meta, .brief-grid { grid-template-columns: 1fr; }
  .brief-list li { grid-template-columns: 1fr; gap: 4px; }
  .brief-items-table td.val { width: auto; }
  .ritual-stage { padding: 40px 24px; }
  .ritual-headline { font-size: 32px; }
  .ritual-action { margin-top: 40px; }
}
