/* ==========================================================================
   InnerVision design system
   Deep indigo, warm ivory, muted gold. Mobile first. Calm by default.
   Theme: signature look is the indigo night palette. A light ivory palette is
   provided for viewers who prefer it, in all three theme states.
   ========================================================================== */

:root {
  /* Signature palette: indigo night */
  --ink: #f4efe3;
  --ink-soft: #cdc6b8;
  --ink-faint: #9b9487;
  --bg: #0e1030;
  --bg-raise: #171a3d;
  --bg-raise-2: #1f2350;
  --bg-sink: #090a22;
  --line: #2c2f5e;
  --line-soft: #23264d;
  --gold: #c9a55c;
  --gold-soft: #a98a48;
  --gold-wash: rgba(201, 165, 92, 0.12);
  --indigo-glow: rgba(120, 128, 232, 0.16);
  --accent: #8f97ea;
  --ok: #7fbf9a;
  --warn: #dfae68;
  --danger: #e08a86;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.22);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --pad: 20px;
  --gap: 16px;
  --maxw: 720px;

  /* Spectral: a calm screen serif, set light, for headings and narration.
     Karla: a humanist grotesque with enough character to carry the interface.
     Real fallbacks, because the font host may be unreachable. */
  --serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --t-fast: 140ms;
  --t-med: 260ms;
  --t-slow: 520ms;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #201d33;
    --ink-soft: #4b465f;
    --ink-faint: #736d85;
    --bg: #f7f2e7;
    --bg-raise: #fffdf7;
    --bg-raise-2: #f1ebdc;
    --bg-sink: #ece5d5;
    --line: #ddd3bf;
    --line-soft: #e7dfcd;
    --gold: #8a6a24;
    --gold-soft: #9d7c33;
    --gold-wash: rgba(138, 106, 36, 0.09);
    --indigo-glow: rgba(60, 66, 150, 0.08);
    --accent: #454bb0;
    --ok: #35704f;
    --warn: #8a5f18;
    --danger: #a33c37;
    --shadow: 0 1px 2px rgba(50, 40, 20, 0.08), 0 8px 24px rgba(50, 40, 20, 0.08);
    --shadow-soft: 0 1px 2px rgba(50, 40, 20, 0.07);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --ink: #201d33;
  --ink-soft: #4b465f;
  --ink-faint: #736d85;
  --bg: #f7f2e7;
  --bg-raise: #fffdf7;
  --bg-raise-2: #f1ebdc;
  --bg-sink: #ece5d5;
  --line: #ddd3bf;
  --line-soft: #e7dfcd;
  --gold: #8a6a24;
  --gold-soft: #9d7c33;
  --gold-wash: rgba(138, 106, 36, 0.09);
  --indigo-glow: rgba(60, 66, 150, 0.08);
  --accent: #454bb0;
  --ok: #35704f;
  --warn: #8a5f18;
  --danger: #a33c37;
  --shadow: 0 1px 2px rgba(50, 40, 20, 0.08), 0 8px 24px rgba(50, 40, 20, 0.08);
  --shadow-soft: 0 1px 2px rgba(50, 40, 20, 0.07);
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

/* High contrast, user toggled */
:root[data-contrast="high"] {
  --ink: #ffffff;
  --ink-soft: #ece8dd;
  --ink-faint: #cfcabc;
  --bg: #05061a;
  --bg-raise: #101334;
  --bg-raise-2: #1a1e45;
  --line: #5f64a8;
  --line-soft: #474c86;
  --gold: #f0cd85;
  --accent: #b8bdff;
}
:root[data-contrast="high"][data-theme="light"],
:root[data-contrast="high"]:not([data-theme="dark"]) {
  --ink: #000000;
  --ink-soft: #1d1a2c;
  --ink-faint: #3d3850;
  --bg: #ffffff;
  --bg-raise: #ffffff;
  --bg-raise-2: #f2eee3;
  --line: #6a6250;
  --line-soft: #8d8574;
  --gold: #5f4710;
  --accent: #23288c;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.22;
  margin: 0 0 0.4em;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: 1.72rem; font-weight: 300; }
h2 { font-size: 1.34rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.97rem; font-family: var(--sans); font-weight: 650; letter-spacing: 0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 3px; }

:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--bg-raise); color: var(--ink);
  padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--line);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; }

/* ---------- layout ---------- */

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

#topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
@supports not (backdrop-filter: blur(4px)) {
  #topbar { background: var(--bg); }
}

.brand {
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.brand .mark {
  width: 22px; height: 22px; flex: none;
  color: var(--gold);
}
.topbar-spacer { flex: 1; }

#main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 20px 120px;
}

#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg-sink) 94%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
}
@supports not (backdrop-filter: blur(4px)) {
  #tabbar { background: var(--bg-sink); }
}

.tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  color: var(--ink-faint);
  font: inherit; font-size: 0.68rem; letter-spacing: 0.02em;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px 5px;
  border-radius: var(--r-md);
  transition: color var(--t-fast), background var(--t-fast);
  min-height: 48px;
}
.tab svg { width: 21px; height: 21px; }
.tab:hover { color: var(--ink-soft); }
.tab[aria-current="page"] { color: var(--gold); background: var(--gold-wash); }

/* ---------- primitives ---------- */

.card {
  background: var(--bg-raise);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: var(--pad);
  box-shadow: var(--shadow-soft);
  margin-bottom: var(--gap);
}
.card.flush { padding: 0; overflow: hidden; }
.card h2, .card h3 { margin-top: 0; }

.card-gold {
  border-color: color-mix(in srgb, var(--gold) 38%, var(--line));
  background: linear-gradient(170deg, var(--gold-wash), transparent 62%), var(--bg-raise);
}

.eyebrow {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--gold); font-weight: 650; margin: 0 0 8px;
}
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.78rem; line-height: 1.5; }
.serif { font-family: var(--serif); }
.center { text-align: center; }
.stack > * + * { margin-top: var(--gap); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.grow { flex: 1; min-width: 0; }

.btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg-raise-2); color: var(--ink);
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast);
  text-decoration: none;
  text-align: center;
}
.btn:hover { border-color: var(--gold-soft); }
.btn:active { transform: scale(0.985); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: var(--gold); color: #17130a; border-color: var(--gold);
  font-weight: 700;
}
:root[data-theme="light"] .btn-primary,
:root:not([data-theme="dark"]) .btn-primary { color: #fffdf7; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { color: #17130a; }
}
.btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn-quiet { background: transparent; border-color: var(--line); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--line); color: var(--ink); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); color: var(--danger); }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 0.86rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-icon {
  min-height: 44px; min-width: 44px; padding: 0; border-radius: 50%;
}

.chip {
  appearance: none; cursor: pointer; font: inherit; font-size: 0.85rem;
  padding: 8px 14px; min-height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  transition: all var(--t-fast);
}
.chip:hover { border-color: var(--gold-soft); color: var(--ink); }
.chip[aria-pressed="true"], .chip.on {
  background: var(--gold-wash); border-color: var(--gold); color: var(--ink);
  font-weight: 600;
}

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 650;
  padding: 3px 9px; border-radius: var(--r-pill);
  border: 1px solid var(--line); color: var(--ink-faint);
}
.tag-spiritual { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tag-reflective { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.tag-research { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }

label, .label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--ink-soft); margin-bottom: 6px;
}
.hint { font-size: 0.8rem; color: var(--ink-faint); margin: 0 0 8px; line-height: 1.5; }

input[type="text"], input[type="number"], textarea, select {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg-sink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  min-height: 46px;
}
textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); opacity: 1; }

input[type="range"] { width: 100%; accent-color: var(--gold); min-height: 44px; }

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.switch-row:last-child { border-bottom: 0; }
.switch-row .label { margin: 0; }
.switch-row .hint { margin: 2px 0 0; }

.toggle {
  appearance: none; cursor: pointer; flex: none;
  width: 50px; height: 30px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--bg-sink);
  position: relative; transition: background var(--t-fast), border-color var(--t-fast);
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink-faint);
  transition: transform var(--t-med), background var(--t-fast);
}
.toggle[aria-checked="true"] { background: var(--gold-wash); border-color: var(--gold); }
.toggle[aria-checked="true"]::after { transform: translateX(20px); background: var(--gold); }

.divider { height: 1px; background: var(--line-soft); border: 0; margin: var(--gap) 0; }

.notice {
  border-left: 3px solid var(--gold);
  background: var(--gold-wash);
  padding: 12px 14px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 0.88rem; line-height: 1.55;
  color: var(--ink-soft);
}
.notice strong { color: var(--ink); }
.notice-quiet { border-left-color: var(--line); background: var(--bg-raise-2); }
.notice-warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }

.empty {
  text-align: center; padding: 34px 20px;
  border: 1px dashed var(--line); border-radius: var(--r-lg);
  color: var(--ink-faint);
}
.empty h3 { color: var(--ink-soft); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.list li:last-child { border-bottom: 0; }

.bullets { margin: 0 0 1em; padding-left: 1.25em; }
.bullets li { margin-bottom: 0.45em; }
.bullets li:last-child { margin-bottom: 0; }

/* ---------- pressable rows ---------- */

.rowbtn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  appearance: none; cursor: pointer; font: inherit; text-align: left;
  background: var(--bg-raise); color: var(--ink);
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 14px 16px; margin-bottom: 10px;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.rowbtn:hover { border-color: var(--gold-soft); }
.rowbtn:active { transform: scale(0.99); }
.rowbtn .rowbtn-body { flex: 1; min-width: 0; }
.rowbtn .rowbtn-title { font-weight: 640; display: block; }
.rowbtn .rowbtn-sub { font-size: 0.83rem; color: var(--ink-faint); display: block; margin-top: 2px; }
.rowbtn .rowbtn-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-raise-2); color: var(--gold);
  font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rowbtn[data-done="true"] .rowbtn-num { background: var(--gold-wash); color: var(--gold); }
/* Any icon dropped straight into a row is the trailing chevron. */
.rowbtn > svg { flex: none; width: 16px; height: 16px; color: var(--ink-faint); }
.rowbtn .rowbtn-num svg { width: 16px; height: 16px; }
.rowbtn .chev { flex: none; color: var(--ink-faint); width: 16px; height: 16px; }
.chip svg { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.chip svg + span, .chip svg + * { vertical-align: middle; }
.metric svg, .notice svg { width: 16px; height: 16px; }

/* ---------- vision board ---------- */

.board { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .board { grid-template-columns: 1fr 1fr; } }

.tile {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-sink);
  aspect-ratio: 4 / 3; max-width: 100%;
  display: grid;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-text {
  padding: 16px; font-family: var(--serif); font-size: 0.95rem; line-height: 1.5;
  color: var(--ink-soft);
  background: radial-gradient(120% 90% at 20% 10%, var(--indigo-glow), transparent 70%), var(--bg-sink);
  overflow: auto;
}
.tile-kind {
  position: absolute; top: 8px; left: 8px;
  font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: rgba(9, 10, 34, 0.78); color: #f4efe3;
  border: 1px solid rgba(244, 239, 227, 0.22);
}
.tile-imagined {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 0.68rem; padding: 5px 8px;
  background: rgba(9, 10, 34, 0.82); color: #cdc6b8; text-align: center;
}
.tile-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.tile-actions .btn {
  min-height: 32px; min-width: 32px; padding: 0;
  background: rgba(9, 10, 34, 0.78); color: #f4efe3;
  border-color: rgba(244, 239, 227, 0.22);
}
.tile.primary { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-wash); }

/* ---------- session player overlay ---------- */

#overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
#overlay[hidden] { display: none !important; }

.player {
  flex: 1; display: flex; flex-direction: column;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 16px 16px calc(84px + env(safe-area-inset-bottom, 0px));
}
.player-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }

.player-stage {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 24px 0; min-height: 200px;
}
.player-beat {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--gold); font-weight: 700; margin-bottom: 14px;
}
.player-line {
  font-family: var(--serif); font-weight: 300; font-size: 1.36rem; line-height: 1.5;
  color: var(--ink);
  transition: opacity var(--t-slow);
}
.player-line.fading { opacity: 0.2; }

.orb {
  width: 132px; height: 132px; margin: 0 auto 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--gold-wash), transparent 62%),
              radial-gradient(circle at 70% 72%, var(--indigo-glow), transparent 66%);
  border: 1px solid var(--line);
  position: relative;
}
.orb::after {
  content: ""; position: absolute; inset: 14px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.9); opacity: 0.45; }
  50% { transform: scale(1.04); opacity: 0.95; }
}

.progress {
  height: 4px; background: var(--line-soft); border-radius: var(--r-pill);
  overflow: hidden; margin: 8px 0 4px;
}
.progress span {
  display: block; height: 100%; background: var(--gold);
  transition: width var(--t-med) linear;
}

.player-controls {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 18px 0 10px;
}
.player-controls .btn-icon.big { min-height: 62px; min-width: 62px; }

.transcript {
  border-top: 1px solid var(--line-soft); margin-top: 12px; padding-top: 12px;
  max-height: 260px; overflow-y: auto;
}
.transcript-line {
  padding: 8px 10px; border-radius: var(--r-sm); font-size: 0.9rem;
  color: var(--ink-faint); line-height: 1.55;
}
.transcript-line.current {
  background: var(--gold-wash); color: var(--ink);
  border-left: 2px solid var(--gold);
}

.captions {
  position: sticky; bottom: 0;
  background: color-mix(in srgb, var(--bg-sink) 92%, transparent);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; margin-top: 10px;
  font-size: 1rem; line-height: 1.5; text-align: center;
  min-height: 62px; display: grid; place-items: center;
}

/* Always reachable, unmistakable, and deliberately calm rather than alarming. */
.ground-btn {
  position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  background: #a4504a; color: #fff6f2; border-color: #bb655e;
  font-weight: 700; box-shadow: var(--shadow);
}
.ground-btn:hover { background: #b3564f; border-color: #cc7268; }
:root[data-contrast="high"] .ground-btn { background: #8d2f28; border-color: #ffffff; color: #ffffff; }

/* ---------- sheet / modal ---------- */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(5, 6, 22, 0.66);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 620px) { .sheet-backdrop { align-items: center; padding: 20px; } }
.sheet {
  background: var(--bg-raise); color: var(--ink);
  width: 100%; max-width: 560px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow);
}
@media (min-width: 620px) { .sheet { border-radius: var(--r-lg); padding-bottom: 22px; } }

/* ---------- progress metrics ---------- */

.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 520px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metric {
  background: var(--bg-raise-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 14px;
}
.metric .n {
  font-family: var(--serif); font-weight: 400; font-size: 1.8rem; line-height: 1;
  font-variant-numeric: tabular-nums; display: block; color: var(--gold);
}
.metric .k { font-size: 0.76rem; color: var(--ink-faint); margin-top: 6px; display: block; }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 44px; margin-top: 10px; }
.spark i {
  flex: 1; background: var(--gold-wash); border-radius: 2px 2px 0 0;
  border-top: 2px solid var(--gold); min-height: 2px;
}

.scale-row { display: flex; gap: 6px; }
.scale-row .chip { flex: 1; padding: 8px 0; min-width: 0; }

/* ---------- journey ---------- */

.phase-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 22px 0 10px;
}
.phase-head h3 { margin: 0; }
.phase-head .days { font-size: 0.78rem; color: var(--ink-faint); }

.day-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--ink-faint);
}

/* ---------- accessibility preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
:root[data-motion="reduced"] .orb::after { opacity: 0.7; transform: scale(1); }

:root[data-text="large"] { font-size: 18px; }
:root[data-text="large"] body { font-size: 18px; }

/* ---------- misc ---------- */

.kv { display: grid; grid-template-columns: 1fr; gap: 3px; margin-bottom: 14px; }
.kv:last-child { margin-bottom: 0; }
.kv dt { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); font-weight: 650; }
.kv dd { margin: 0; color: var(--ink); }

details.src { border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 0; margin-bottom: 10px; background: var(--bg-raise-2); }
details.src > summary { cursor: pointer; padding: 12px 14px; font-weight: 620; font-size: 0.9rem; list-style: none; }
details.src > summary::-webkit-details-marker { display: none; }
details.src > summary::after { content: " +"; color: var(--gold); float: right; }
details.src[open] > summary::after { content: " −"; }
details.src .src-body { padding: 0 14px 14px; }

.srcitem { padding: 11px 0; border-top: 1px solid var(--line-soft); }
.srcitem:first-child { border-top: 0; }
.srcitem .t { font-weight: 640; font-size: 0.9rem; }
.srcitem .m { font-size: 0.78rem; color: var(--ink-faint); margin-top: 2px; }
.srcitem .n { font-size: 0.8rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }

.vstate {
  display: inline-block; font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: 0.07em; font-weight: 700; padding: 2px 7px;
  border-radius: var(--r-pill); border: 1px solid var(--line); margin-left: 6px;
  vertical-align: middle;
}
.vstate.primary { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.vstate.secondary { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.vstate.refuted { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }

.mic-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.82rem; color: var(--danger); font-weight: 620;
}
.mic-live .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--danger);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.stepdots { display: flex; gap: 5px; justify-content: center; margin-bottom: 18px; }
.stepdots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--line);
}
.stepdots i.on { background: var(--gold); }
.stepdots i.done { background: var(--gold-soft); }

.longread p { max-width: 64ch; }
.longread h3 { margin-top: 1.4em; }

table.reg { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.reg th, table.reg td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.reg th { color: var(--gold); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
