/* Equil — dark, quiet, alive. The screen stays wordless; the body speaks
   through shape and colour. Only the brand + live stats (top-right), the
   bottom chrome, and the modals carry text. */

:root {
  --glow:      #6fd3c7;
  --glow-2:    #b58cff;
  --bg-0:      #04060a;
  --bg-1:      #0a1018;
  --ink:       #f4f8fb;
  --ink-soft:  rgba(244, 248, 251, 0.62);
  --ink-faint: rgba(244, 248, 251, 0.34);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Phase moods — slow transitions so nothing twitches. */
body[data-phase="settling"] { --glow:#6fd3c7; --glow-2:#7aa8ff; --bg-1:#08121a; }
body[data-phase="coherent"] { --glow:#9be7c4; --glow-2:#ffd9a8; --bg-1:#0c1612; }
body[data-phase="active"]   { --glow:#ffc46b; --glow-2:#ff8fab; --bg-1:#160f0a; }
body[data-phase="stressed"] { --glow:#ff7a9c; --glow-2:#b58cff; --bg-1:#160a10; }

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

html, body {
  height: 100%; background: var(--bg-0); color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
body {
  transition: background 2.4s var(--ease);
  background: radial-gradient(120% 120% at 50% 50%, var(--bg-1) 0%, var(--bg-0) 70%);
}

#mandala { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; cursor: pointer; }

.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(120% 120% at 50% 50%, transparent 52%, rgba(0,0,0,0.6) 100%);
}
.grain {
  position: fixed; inset: -50%; pointer-events: none; opacity: 0.04; z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)}
  40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-2%)} 80%{transform:translate(3%,3%)}
}

/* Wordless breath ring */
.breath {
  position: fixed; inset: 0; z-index: 4; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 1.6s var(--ease);
}
.breath.on { opacity: 1; }
.breath-ring {
  width: 180px; height: 180px; border-radius: 50%;
  border: 1px solid var(--glow);
  box-shadow: 0 0 40px -6px var(--glow), inset 0 0 30px -10px var(--glow);
  transform: scale(0.5);
  animation: breathe var(--breath-dur, 10s) var(--ease) infinite;
}
@keyframes breathe {
  0%{transform:scale(0.45);opacity:.5} 45%{transform:scale(1);opacity:1}
  55%{transform:scale(1);opacity:1} 100%{transform:scale(0.45);opacity:.5}
}

/* ── Top-right panel: brand + stats ──────────────────────────────────── */
.panel {
  position: fixed; top: 2.6vh; right: 2.6vw; z-index: 8;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1.1rem;
  transition: opacity 0.6s var(--ease);
  transform: scale(1.4); transform-origin: top right;
}
.brand { display: flex; align-items: center; gap: 0.55rem; }
.brand-logo { height: 24px; width: auto; opacity: 0.92; }
.brand-name {
  font-family: 'Cormorant Garamond', serif; font-weight: 500;
  font-size: 1.5rem; letter-spacing: 0.34em; padding-left: 0.34em; color: var(--ink);
  text-shadow: 0 0 24px rgba(0,0,0,0.7), 0 0 30px var(--glow);
  transition: text-shadow 2s var(--ease);
}

.stats { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.stat { display: flex; align-items: baseline; gap: 0.5em; line-height: 1; }
.stat-val {
  font-size: 1.55rem; font-weight: 600; font-variant-numeric: tabular-nums;
  color: #ffffff; letter-spacing: 0.01em;
  /* colour reflects state via glow; numbers stay bright white for contrast */
  text-shadow: 0 0 16px var(--glow), 0 1px 2px rgba(0,0,0,0.8);
  min-width: 2.4em; text-align: right;
  transition: text-shadow 2s var(--ease);
}
.stat-label {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--ink-soft); min-width: 4.2em; text-align: left;
}
.stat-coh { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.35rem; align-self: stretch; }
.stat-coh-bar { flex: 1; height: 3px; background: rgba(255,255,255,0.12); border-radius: 3px; overflow: hidden; }
.stat-coh-fill {
  height: 100%; width: 50%; background: var(--glow);
  box-shadow: 0 0 12px var(--glow); border-radius: 3px;
  transition: width 1s var(--ease), background 2s var(--ease);
}
.stat-src {
  font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--glow); transition: color 2s var(--ease);
}
.panel.dim .stats { opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease); }

/* ── Bottom chrome (auto-hides) ──────────────────────────────────────── */
.chrome {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 2.6vw 2.6vh; pointer-events: none;
  opacity: 1; transition: opacity 0.7s var(--ease);
}
.chrome.hidden { opacity: 0; }
.chrome > * { pointer-events: auto; }
.chrome > :first-child { justify-self: start; }
.chrome > .center-cluster { justify-self: center; }
.chrome > :last-child { justify-self: end; }

.center-cluster { display: flex; align-items: center; gap: 1rem; }

.chrome-right {
  display: flex; align-items: center; gap: 0.7rem;
  justify-self: end;
}

.sessions-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(10,16,24,0.55); backdrop-filter: blur(14px);
  border: 2px solid var(--glow); color: var(--glow);
  font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 0 18px -5px var(--glow), inset 0 0 14px -8px var(--glow);
  line-height: 1;
}
.sessions-btn:hover { color: var(--ink); background: rgba(111,211,199,0.12); box-shadow: 0 0 28px -4px var(--glow), inset 0 0 20px -8px var(--glow); }
.sessions-btn[hidden] { display: none; }

.controls {
  display: flex; align-items: center; gap: 0;
  padding: 0.42rem 0.2rem;
  border-radius: 4px;
  background: rgba(10, 8, 18, 0.68); backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 12px rgba(0,0,0,0.3);
}
.ctrl-group {
  display: flex; flex-direction: column; align-items: center; gap: 0.38em;
  padding: 0.26em 1.3em;
}
.ctrl {
  display: flex; flex-direction: column; align-items: center; gap: 0.42em;
  background: none; border: none; cursor: pointer;
  padding: 0;
  transition: all 0.5s var(--ease);
}
.ctrl-lamp {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  transition: all 0.5s var(--ease);
}
.ctrl-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.76rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(244,248,251,0.36); font-weight: 400; line-height: 1;
  transition: color 0.5s var(--ease);
}
.ctrl-vol-slider {
  -webkit-appearance: none; appearance: none;
  width: 66px; height: 3px;
  background: rgba(255,255,255,0.18); border-radius: 2px; outline: none; cursor: pointer;
}
.ctrl-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: rgba(200,215,235,0.7); cursor: pointer;
  box-shadow: 0 0 4px rgba(0,0,0,0.5); transition: background 0.3s;
}
.ctrl-group:has(.ctrl.active) .ctrl-vol-slider::-webkit-slider-thumb {
  background: var(--glow); box-shadow: 0 0 7px var(--glow);
}
.ctrl:hover .ctrl-name { color: rgba(244,248,251,0.65); }
.ctrl:hover .ctrl-lamp { border-color: rgba(255,255,255,0.5); }
.ctrl.active .ctrl-name { color: var(--ink); }
.ctrl.active .ctrl-lamp {
  background: rgba(111,211,199,0.55); border-color: rgba(111,211,199,0.6);
  box-shadow: 0 0 6px rgba(111,211,199,0.3);
}
.ctrl-divider { width: 1px; height: 42px; background: rgba(255,255,255,0.1); flex-shrink: 0; }

.faq-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(10,16,24,0.55); backdrop-filter: blur(14px);
  border: 2px solid var(--glow); color: var(--glow);
  font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 0 18px -5px var(--glow), inset 0 0 14px -8px var(--glow);
}
.faq-btn:hover { color: var(--ink); background: rgba(111,211,199,0.12); box-shadow: 0 0 28px -4px var(--glow), inset 0 0 20px -8px var(--glow); }

/* ── Intro sequence ──────────────────────────────────────────────────── */
.intro {
  position: fixed; inset: 0; z-index: 18;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2.6rem; background: radial-gradient(120% 120% at 50% 45%, var(--bg-1), var(--bg-0));
  transition: opacity 1.4s var(--ease), visibility 1.4s;
}
.intro.gone { opacity: 0; visibility: hidden; }
.intro-line {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(1.5rem, 4.2vw, 2.7rem); letter-spacing: 0.02em; text-align: center;
  max-width: 80vw; color: var(--ink); opacity: 0; transform: translateY(10px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.intro-line.show { opacity: 0.95; transform: translateY(0); }
.intro-dots { display: flex; gap: 0.6rem; }
.intro-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: all 0.5s var(--ease); }
.intro-dots span.on { background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.intro-skip {
  position: fixed; bottom: 3vh; right: 3vw; background: none; border: none;
  color: var(--ink-faint); font-family: inherit; font-size: 0.7rem; letter-spacing: 0.2em;
  text-transform: uppercase; cursor: pointer; transition: color 0.3s var(--ease);
}
.intro-skip:hover { color: var(--ink); }

/* ── Spoken-word sessions ────────────────────────────────────────────── */
.sessions-overlay {
  position: fixed; inset: 0; z-index: 16; display: grid; place-items: center;
  background: rgba(2,4,8,0.0); backdrop-filter: blur(0px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0.6s, background 0.6s, backdrop-filter 0.6s;
}
.sessions-overlay.open { opacity: 1; visibility: visible; background: rgba(2,4,8,0.7); backdrop-filter: blur(10px); }
.sessions-card {
  position: relative; width: 90vw; max-height: 86vh; overflow: hidden;
  padding: 1.8rem 2rem 1.8rem; border-radius: 18px;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(16,22,32,0.96), rgba(8,12,20,0.98));
  border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 30px 90px -20px rgba(0,0,0,0.8);
  transform: translateY(14px); transition: transform 0.6s var(--ease);
}
.sessions-overlay.open .sessions-card { transform: translateY(0); }
.sessions-byline {
  text-align: center; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: lowercase;
  color: var(--glow); opacity: 1; margin: 0 0 1rem; flex-shrink: 0;
}

/* ── Meditation mat grid ─────────────────────────────────────────────── */
.mat-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  align-content: center;
  overflow: hidden;
}

.mat-tile {
  position: relative;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  text-align: left;
  font-family: inherit;
  overflow: hidden;

  /* Woven fabric texture — fine linen crosshatch */
  background:
    repeating-linear-gradient(
      0deg, transparent 0, transparent 2px,
      rgba(155,185,255,0.032) 2px, rgba(155,185,255,0.032) 3px
    ),
    repeating-linear-gradient(
      90deg, transparent 0, transparent 2px,
      rgba(155,185,255,0.032) 2px, rgba(155,185,255,0.032) 3px
    ),
    linear-gradient(145deg, rgba(70,105,215,0.16) 0%, transparent 52%),
    radial-gradient(ellipse at 50% 38%, rgba(45,75,165,0.12) 0%, rgba(0,0,12,0.22) 100%),
    linear-gradient(148deg, #1d3068 0%, #0f1b4c 52%, #141f54 100%);

  border: 1.5px solid rgba(88,115,205,0.38);
  box-shadow:
    inset 0 2px 5px rgba(120,155,255,0.08),
    inset 0 -3px 8px rgba(0,0,20,0.26),
    0 3px 14px rgba(0,0,0,0.4);

  transition: transform 0.2s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

/* Subtle inner seam — like fabric binding */
.mat-tile::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(130,160,245,0.1);
  pointer-events: none;
}

/* Soft fabric sheen across top */
.mat-tile::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 38%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, rgba(110,148,255,0.09) 0%, transparent 100%);
  pointer-events: none;
}

.mat-tile:hover {
  border-color: rgba(110,138,222,0.62);
  box-shadow:
    inset 0 2px 6px rgba(130,165,255,0.12),
    inset 0 -3px 8px rgba(0,0,20,0.3),
    0 4px 20px rgba(0,0,0,0.5),
    0 0 16px rgba(88,130,240,0.1);
}
.mat-tile:active { transform: scale(0.97); }

.mat-tile.playing {
  border-color: var(--glow);
  box-shadow:
    0 0 20px -6px var(--glow),
    0 0 38px -12px var(--glow),
    inset 0 0 20px rgba(111,211,199,0.07);
}

.mat-title {
  position: relative;
  z-index: 1;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: rgba(238, 245, 255, 1);
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0,0,30,0.8);
}

.mat-voice-desc {
  position: relative;
  z-index: 1;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  color: rgba(205, 224, 255, 0.7);
  font-weight: 500;
  line-height: 1.1;
  text-shadow: 0 1px 6px rgba(0,0,30,0.7);
  white-space: nowrap;
}

.mat-playing-dot {
  position: relative;
  z-index: 1;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 6px var(--glow);
  opacity: 0;
  transition: opacity 0.4s;
  margin-left: auto;
  flex-shrink: 0;
}
.mat-tile.playing .mat-playing-dot { opacity: 1; }

.sessions-list { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.sessions-x, .faq-x, .wf-x {
  position: absolute; top: 1.1rem; right: 1.1rem; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.14);
  color: var(--ink-soft); cursor: pointer; display: grid; place-items: center;
  transition: all 0.3s var(--ease);
}
.sessions-x:hover, .faq-x:hover, .wf-x:hover { color: var(--ink); border-color: var(--glow); box-shadow: 0 0 16px -4px var(--glow); }

.spoken-item {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  color: var(--ink-soft); font-family: inherit; font-size: 0.72rem; letter-spacing: 0.06em;
  padding: 0.55em 1.1em; border-radius: 999px; cursor: pointer; transition: all 0.3s var(--ease);
}
.spoken-item:hover { color: var(--ink); border-color: var(--glow); }
.spoken-item.playing { color: var(--bg-0); background: var(--glow); border-color: var(--glow); }

/* ── FAQ ─────────────────────────────────────────────────────────────── */
.faq-overlay {
  position: fixed; inset: 0; z-index: 17; display: grid; place-items: center;
  background: rgba(2,4,8,0.0); backdrop-filter: blur(0px);
  opacity: 0; visibility: hidden; transition: opacity 0.6s var(--ease), visibility 0.6s, background 0.6s, backdrop-filter 0.6s;
}
.faq-overlay.open { opacity: 1; visibility: visible; background: rgba(2,4,8,0.72); backdrop-filter: blur(10px); }
.faq-card {
  position: relative; width: min(620px, 88vw); max-height: 82vh; overflow-y: auto;
  padding: 3rem 2.8rem 2.4rem; border-radius: 20px;
  background: linear-gradient(160deg, rgba(16,22,32,0.96), rgba(8,12,20,0.98));
  border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 30px 90px -20px rgba(0,0,0,0.8);
  transform: translateY(16px); transition: transform 0.6s var(--ease);
}
.faq-overlay.open .faq-card { transform: translateY(0); }
.faq-title {
  font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 2rem;
  letter-spacing: 0.3em; padding-left: 0.3em; margin-bottom: 1.6rem; color: var(--ink);
}
.faq-body h2 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--glow); margin: 1.5rem 0 0.5rem; font-weight: 600;
}
.faq-body p { font-weight: 300; font-size: 0.92rem; line-height: 1.6; color: var(--ink-soft); }
.faq-body code { font-size: 0.82rem; color: var(--ink); background: rgba(255,255,255,0.07); padding: 0.1em 0.45em; border-radius: 5px; }
.faq-replay {
  margin-top: 2rem; background: none; border: 1px solid rgba(255,255,255,0.16); color: var(--ink-soft);
  font-family: inherit; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.55em 1.3em; border-radius: 999px; cursor: pointer; transition: all 0.3s var(--ease);
}
.faq-replay:hover { color: var(--ink); border-color: var(--glow); }

/* Demo Mode — launches the full-screen immersion (/flow) */
/* Demos — full-screen immersion links at the bottom of the FAQ panel.
   (Named .faq-launch to avoid colliding with faq.js's .faq-demo* toggle.) */
.faq-launches { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.faq-launches-head {
  font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 0.2rem;
}
.faq-launch {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.78em 1.05em; border-radius: 12px; text-decoration: none;
  border: 1px solid rgba(111,211,199,0.26);
  background: linear-gradient(180deg, rgba(111,211,199,0.09), rgba(111,211,199,0.025));
  transition: all 0.3s var(--ease);
}
.faq-launch:hover { border-color: var(--glow); box-shadow: 0 0 30px -12px var(--glow); }
.faq-launch-name {
  font-size: 0.92rem; letter-spacing: 0.04em; color: var(--ink); font-weight: 500;
  flex-shrink: 0; min-width: 4.6rem;
}
.faq-launch-sub {
  flex: 1; font-size: 0.66rem; color: var(--ink-faint); letter-spacing: 0.02em; line-height: 1.4;
}
.faq-launch svg { color: var(--glow); flex-shrink: 0; }
@media (max-width: 540px) {
  .faq-launch { flex-wrap: wrap; }
  .faq-launch-sub { flex-basis: 100%; order: 3; }
}

/* tabs inside the info panel */
.tabs { display: flex; gap: 1.4rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1.4rem; }
.tab {
  background: none; border: none; color: var(--ink-faint); cursor: pointer;
  font-family: inherit; font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 0 0 0.8rem; position: relative; transition: color 0.3s var(--ease);
}
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--ink); }
.tab.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--glow); box-shadow: 0 0 10px var(--glow);
}

/* settings */
.set-group { margin-bottom: 1.4rem; }
.set-label { display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--glow); margin-bottom: 0.6rem; font-weight: 600; }
.set-select {
  width: 100%; padding: 0.7em 0.9em; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.05); color: var(--ink);
  border: 1px solid rgba(255,255,255,0.16); font-family: inherit; font-size: 0.9rem;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23889' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1em center;
}
.set-select:focus { outline: none; border-color: var(--glow); box-shadow: 0 0 14px -4px var(--glow); }
.set-note { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.9rem; font-size: 0.84rem; line-height: 1.55; color: var(--ink-soft); font-weight: 300; }
.badge { flex: none; font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.14em; padding: 0.25em 0.6em; border-radius: 999px; margin-top: 0.15rem; }
.badge.live { color: #0a1410; background: var(--glow); }
.badge.periodic { color: var(--ink-soft); border: 1px solid rgba(255,255,255,0.2); }
.set-fine { font-size: 0.74rem; line-height: 1.55; color: var(--ink-faint); font-weight: 300; }
.set-fine code { font-size: 0.7rem; color: var(--ink-soft); background: rgba(255,255,255,0.07); padding: 0.05em 0.4em; border-radius: 4px; }

/* ── Demo-data toggle (bottom of the Guide) ──────────────────────────── */
.faq-demo { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,0.08); }
.faq-demo-toggle { display: flex; align-items: center; gap: 0.7rem; background: none; border: none; padding: 0; cursor: pointer; }
.faq-demo-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.82rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(244,248,251,0.45); font-weight: 400; transition: color 0.4s var(--ease);
}
.faq-demo-state {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--ink-faint); font-weight: 600; transition: color 0.4s var(--ease);
}
.faq-demo-toggle:hover .faq-demo-label { color: rgba(244,248,251,0.7); }
.faq-demo-toggle:hover .ctrl-lamp { border-color: rgba(255,255,255,0.5); }
.faq-demo-toggle.active .faq-demo-label { color: var(--ink); }
.faq-demo-toggle.active .faq-demo-state { color: var(--glow); }
.faq-demo-toggle.active .ctrl-lamp {
  background: rgba(111,211,199,0.55); border-color: rgba(111,211,199,0.6);
  box-shadow: 0 0 6px rgba(111,211,199,0.3);
}
.faq-demo .set-fine { margin-top: 0.8rem; }

/* ── Way Forward button ──────────────────────────────────────────────── */
.wayforward-btn {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.76rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(244,248,251,0.36); cursor: pointer;
  padding: 0.26em 1.3em; border-radius: 4px;
  background: none;
  border: none;
  box-shadow: none;
  transition: color 0.5s var(--ease); white-space: nowrap;
}
.wayforward-btn:hover {
  color: rgba(244,248,251,0.65); background: none; box-shadow: none;
}
.wayforward-btn:active { transform: scale(0.98); }

/* ── Way Forward overlay ─────────────────────────────────────────────── */
.wf-overlay {
  position: fixed; inset: 0; z-index: 17; display: grid; place-items: center;
  background: rgba(2,4,8,0.0); backdrop-filter: blur(0px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0.6s, background 0.6s, backdrop-filter 0.6s;
}
.wf-overlay.open { opacity: 1; visibility: visible; background: rgba(2,4,8,0.74); backdrop-filter: blur(12px); }
.wf-card {
  position: relative; width: min(720px, 90vw); max-height: 86vh; overflow-y: auto;
  padding: 2.8rem 2.6rem 2.4rem; border-radius: 20px;
  background: linear-gradient(160deg, rgba(16,22,32,0.96), rgba(8,12,20,0.98));
  border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 30px 90px -20px rgba(0,0,0,0.8);
  transform: translateY(16px); transition: transform 0.6s var(--ease);
}
.wf-overlay.open .wf-card { transform: translateY(0); }
.wf-byline {
  text-align: center; font-size: 0.62rem; letter-spacing: 0.24em; text-transform: lowercase;
  color: var(--glow); opacity: 0.6; margin: 0 0 0.7rem;
}
.wf-headline {
  font-family: 'Cormorant Garamond', serif; font-weight: 400;
  font-size: 1.5rem; line-height: 1.4; text-align: center; color: var(--ink);
  margin: 0 0 1.6rem; min-height: 0;
}
.wf-headline:empty { display: none; }

.wf-goals { display: grid; gap: 1rem; margin-bottom: 1.4rem; }
.wf-goal { display: flex; flex-direction: column; gap: 0.4rem; }
.wf-goal-label {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--glow); font-weight: 600; opacity: 0.85;
}
.wf-goal-input {
  width: 100%; padding: 0.7em 0.9em; border-radius: 10px;
  background: rgba(255,255,255,0.05); color: var(--ink);
  border: 1px solid rgba(255,255,255,0.16); font-family: inherit; font-size: 0.92rem;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.wf-goal-input::placeholder { color: var(--ink-faint); }
.wf-goal-input:focus { outline: none; border-color: var(--glow); box-shadow: 0 0 14px -4px var(--glow); }

.wf-reveal {
  display: block; width: 100%; margin: 0 0 1.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); cursor: pointer; padding: 0.9em 1.3em; border-radius: 999px;
  background: rgba(111,211,199,0.12); border: 1px solid var(--glow);
  box-shadow: inset 0 0 20px -12px var(--glow); transition: all 0.3s var(--ease);
}
.wf-reveal:hover:not(:disabled) { background: rgba(111,211,199,0.2); box-shadow: 0 0 24px -6px var(--glow); }
.wf-reveal:disabled { opacity: 0.5; cursor: default; }

.wf-status {
  text-align: center; font-size: 0.84rem; color: var(--ink-soft);
  font-weight: 300; line-height: 1.5; padding: 0.4rem 0 0.8rem;
}

.wf-cards { display: grid; gap: 0.9rem; }
.wf-tile {
  position: relative; border-radius: 14px; padding: 1.1rem 1.2rem 1.2rem 1.4rem;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-direction: column; gap: 0.35rem;
  opacity: 0; transform: translateY(10px);
  animation: wf-rise 0.55s var(--ease) forwards;
}
@keyframes wf-rise { to { opacity: 1; transform: translateY(0); } }
.wf-tile::before {
  content: ''; position: absolute; left: 0; top: 0.9rem; bottom: 0.9rem; width: 3px;
  border-radius: 3px; background: var(--glow); box-shadow: 0 0 10px var(--glow);
}
.wf-now  { --glow: #6fd3c7; }
.wf-mid  { --glow: #9be7c4; }
.wf-long { --glow: #b58cff; }
.wf-tile-horizon {
  font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--glow); font-weight: 600;
}
.wf-tile-title {
  font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; line-height: 1.3;
  color: var(--ink); font-weight: 500;
}
.wf-tile-body {
  font-size: 0.9rem; line-height: 1.55; color: var(--ink-soft); font-weight: 300;
}

@media (max-width: 640px) {
  .panel { top: 1.8vh; right: 1.8vh; }
  .stat-val { font-size: 1.3rem; }
  .center-cluster { flex-direction: column-reverse; gap: 0.6rem; }
  .wayforward-btn { font-size: 0.8rem; padding: 0.7rem 1.2rem; }
}
