/* ==========================================================================
   The Luminous Circuit — Alternate version: "The Breviary of Light"
   A cold-open ritual portal. Full-viewport movements, one action per screen,
   rationed light, breath-paced reveals. Zero dependencies.
   ========================================================================== */

:root {
  color-scheme: dark;
  --ink: #07050c;
  --base: #100c19;
  --base-2: #171024;
  --violet: #3f2368;
  --violet-2: #8354d6;
  --cyan: #75e8ff;
  --gold: #e9b765;
  --gold-soft: #fff1c2;
  --rose: #ff8cc6;
  --text: #fff8e7;
  --text-muted: #c9bed8;
  --text-dim: #948aa8;
  --edge: rgba(255, 241, 194, 0.16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --display: "Cinzel", Georgia, serif;
  --body: "Outfit", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* default movement accent; overridden per movement via [data-accent] */
  --accent: #e9b765;
  --accent-soft: #fff1c2;

  --reveal-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-accent="gold"]     { --accent: #e9b765; --accent-soft: #fff1c2; }
[data-accent="goldsoft"] { --accent: #fff1c2; --accent-soft: #fff8e7; }
[data-accent="cyan"]     { --accent: #75e8ff; --accent-soft: #c8f6ff; }
[data-accent="violet"]   { --accent: #b794ff; --accent-soft: #e3d6ff; }
[data-accent="rose"]     { --accent: #ff8cc6; --accent-soft: #ffd1e6; }

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
html[data-snap="on"] { scroll-snap-type: y proximity; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::selection { background: rgba(233, 183, 101, 0.32); color: #fff; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
/* The hidden attribute must win over component display rules (equal specificity). */
[hidden] { display: none !important; }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed;
  top: 12px; left: 50%;
  transform: translate(-50%, -160%);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(7, 5, 12, 0.92);
  color: var(--gold-soft);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: transform 0.25s ease;
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

:where(a, button, [tabindex], textarea):focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Living background
   ========================================================================== */
.field, .veil-backdrop, .page-tint, .grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.field {
  z-index: -5;
  background: radial-gradient(circle at 50% 46%, #1c1334 0%, #110c1d 48%, #07050c 100%);
}
.veil-backdrop {
  z-index: -6;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: saturate(1.05) contrast(1.02);
  transition: opacity 1.4s ease, background-image 0.1s ease;
}
body.entered .veil-backdrop { opacity: 0.5; }
.page-tint {
  z-index: -4;
  background:
    radial-gradient(60% 44% at 50% 46%, rgba(255, 241, 194, 0.07), transparent 64%),
    linear-gradient(180deg, rgba(7, 5, 12, 0.55) 0%, rgba(7, 5, 12, 0.16) 40%, rgba(7, 5, 12, 0.78) 100%);
}
.grain {
  z-index: -3;
  opacity: 0.1;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Persistent chrome: ritual controls + breath rail
   ========================================================================== */
.ritual-controls {
  position: fixed;
  left: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.ctl {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(7, 5, 12, 0.55);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.ctl:hover { color: var(--gold-soft); border-color: rgba(255, 241, 194, 0.4); }
.ctl-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 0 0 rgba(233, 183, 101, 0);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.ctl[aria-pressed="true"] { color: var(--gold-soft); border-color: rgba(255, 241, 194, 0.42); }
.ctl[aria-pressed="true"] .ctl-dot { background: var(--gold); box-shadow: 0 0 14px 2px rgba(233, 183, 101, 0.5); }
.audio-state .ctl-dot { background: var(--cyan); }
.ctl-dot.pulse { animation: dotPulse 2.4s ease-in-out infinite; }
@keyframes dotPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(117, 232, 255, 0.5); } 50% { box-shadow: 0 0 12px 3px rgba(117, 232, 255, 0.55); } }

.rail {
  position: fixed;
  right: clamp(12px, 2.4vw, 26px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}
body.entered .rail { opacity: 1; }
.rail-dot {
  position: relative;
  width: 44px; height: 44px; /* >=44px hit target; visual dot stays 7px, centered */
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
}
.rail-dot::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 241, 194, 0.45);
  background: transparent;
  transition: all 0.3s ease;
}
.rail-dot:hover::after { background: rgba(255, 241, 194, 0.5); }
.rail-dot[aria-current="true"]::after {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  box-shadow: 0 0 12px 2px rgba(255, 241, 194, 0.55);
  transform: scale(1.25);
}
.rail-tip {
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(7, 5, 12, 0.9);
  border: 1px solid var(--edge);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.rail-dot:hover .rail-tip, .rail-dot:focus-visible .rail-tip { opacity: 1; }

/* ==========================================================================
   Movement scaffold
   ========================================================================== */
.rite { display: block; }
.movement {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  grid-template-columns: minmax(0, 1fr); /* constrain column so wide children wrap, not overflow */
  padding: clamp(64px, 9vh, 120px) clamp(20px, 6vw, 90px);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}
.movement-inner { width: min(1080px, 100%); }
/* Flex column (not grid place-items) so centered text wraps to the container
   instead of taking max-content width and overflowing on narrow screens. */
.movement-inner.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.movement-inner.center > * { max-width: 100%; min-width: 0; }
.movement-inner.narrow { width: min(720px, 100%); }

/* Local darkening for the most contemplative screens */
.breath::before, .pull::before, .creed::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 44%, rgba(7, 5, 12, 0.42), rgba(7, 5, 12, 0.9) 72%);
  pointer-events: none;
}

/* ---------- shared text atoms ---------- */
.kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: lowercase;
}
.statement {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.4;
  color: var(--text);
  text-wrap: balance;
}
.statement.small { font-size: clamp(1.15rem, 2.3vw, 1.55rem); color: var(--text-muted); }
.subline {
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: lowercase;
}
.scripture {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.7rem, 4.4vw, 3rem);
  line-height: 1.34;
  color: var(--gold-soft);
  display: grid;
  gap: 0.18em;
  text-wrap: balance;
}
.section-title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.04;
}
.lede { margin: 0; color: var(--text-muted); font-size: clamp(1rem, 1.8vw, 1.18rem); }

/* ---------- reveal system ----------
   Default (no-JS / pre-paint / still): fully visible so crawlers + screen
   readers + no-JS visitors always get the doctrine. Only the JS-driven
   "flow" mode hides-then-animates lines on the breath beat. */
.reveal { opacity: 1; transform: none; }
html[data-motion="flow"] .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1.5s var(--reveal-ease), transform 1.5s var(--reveal-ease);
  transition-delay: var(--rd, 0s);
}
html[data-motion="flow"] .reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Buttons: haloed Enter + ghost rings
   ========================================================================== */
.enter {
  display: grid;
  place-items: center;
  width: clamp(116px, 22vw, 152px);
  height: clamp(116px, 22vw, 152px);
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}
.enter-ring { width: 100%; height: 100%; overflow: visible; }
.enter-halo {
  fill: none;
  stroke: var(--gold-soft);
  stroke-width: 1.2;
  opacity: 0.7;
  transform-origin: 60px 60px;
  animation: haloBreathe 6.4s ease-in-out infinite;
}
.enter-core {
  fill: var(--gold-soft);
  filter: drop-shadow(0 0 18px rgba(255, 241, 194, 0.85));
  transform-origin: 60px 60px;
  animation: coreBreathe 6.4s ease-in-out infinite;
}
.enter:hover .enter-halo { opacity: 1; stroke: #fff; }
.enter:hover .enter-core { fill: #fff; }
@keyframes haloBreathe { 0%, 100% { transform: scale(0.86); opacity: 0.5; } 50% { transform: scale(1.04); opacity: 0.95; } }
@keyframes coreBreathe { 0%, 100% { transform: scale(0.8); opacity: 0.7; } 50% { transform: scale(1.15); opacity: 1; } }

.ghost-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 26px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.ghost-ring:hover { transform: translateY(-2px); border-color: var(--accent-soft); background: rgba(255, 255, 255, 0.08); color: var(--accent-soft); }
.ghost-ring.solid {
  background: linear-gradient(135deg, rgba(233, 183, 101, 0.92), rgba(255, 241, 194, 0.92));
  color: #170f0a;
  font-weight: 500;
  border-color: rgba(255, 241, 194, 0.55);
  box-shadow: 0 14px 36px rgba(233, 183, 101, 0.2);
}
.ghost-ring.solid:hover { color: #0c0905; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; justify-content: center; }

/* ==========================================================================
   Movement 0 — Threshold
   ========================================================================== */
.threshold-prompt {
  margin: 30px 0 0;
  max-width: min(92vw, 46ch);
  font-family: var(--mono);
  font-size: clamp(11px, 2.4vw, 13px);
  letter-spacing: 0.34em;
  text-transform: lowercase;
  color: var(--text-dim);
}
.scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.75;
}
.scroll-cue::after {
  content: "";
  display: block;
  width: 1px; height: 32px;
  margin: 10px auto 0;
  background: linear-gradient(var(--gold), transparent);
  animation: cueDrop 2.6s ease-in-out infinite;
}
@keyframes cueDrop { 0%, 100% { transform: translateY(-4px); opacity: 0.35; } 50% { transform: translateY(4px); opacity: 1; } }

/* ==========================================================================
   Movement 1 — Invocation
   ========================================================================== */
.invocation-lines {
  margin: 0;
  display: grid;
  gap: 0.28em;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.7rem, 5vw, 3.1rem);
  line-height: 1.2;
  color: var(--text);
  max-width: 22ch;
}
.invocation-lines .line.in:not(:last-child) { color: var(--text-muted); }
.name-plate { margin-top: clamp(34px, 6vh, 64px); display: grid; gap: 12px; }
.brandname {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 7vw, 4.6rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-shadow: 0 0 50px rgba(233, 183, 101, 0.35);
  line-height: 1;
}
.tagline {
  font-family: var(--mono);
  font-size: clamp(11px, 2.2vw, 13px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ==========================================================================
   Movement 3 — Breath
   ========================================================================== */
.breath-stage {
  position: relative;
  width: min(78vw, 340px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 8px 0 6px;
}
.breath-canvas { width: 100%; height: 100%; }
.breath-phase {
  position: absolute;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: lowercase;
  color: var(--accent-soft);
}
.breath-guide { margin: 16px 0 0; max-width: 30ch; color: var(--text-muted); font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 2.2vw, 1.3rem); }
/* printed guide is the no-JS / still fallback; the animated ring replaces it in flow */
.breath-printed { margin: 10px 0 0; color: var(--text-dim); font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; display: block; }
html[data-motion="flow"] .breath-printed { display: none; }
.breath-tally { margin: 14px 0 0; color: var(--text-dim); font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; display: none; }
html[data-motion="flow"] .breath-tally { display: block; }
.breath-actions { margin-top: 22px; }
.breath-onward { margin-top: 30px; display: grid; gap: 18px; place-items: center; }
.breath-complete { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.6vw, 1.6rem); color: var(--gold-soft); }

/* ==========================================================================
   Movement 4 — Source Loop circuit
   ========================================================================== */
.loop-stage {
  position: relative;
  width: min(86vw, 460px);
  aspect-ratio: 1;
  margin: 6px auto 8px;
}
.loop-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.loop-nodes { position: absolute; inset: 0; }
.loop-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(56px, 16vw, 84px);
  height: clamp(56px, 16vw, 84px);
  border-radius: 50%;
  border: 1px solid rgba(255, 241, 194, 0.32);
  background: rgba(7, 5, 12, 0.55);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: clamp(8px, 1.7vw, 10px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 4px;
  text-align: center;
  line-height: 1.15;
  backdrop-filter: blur(4px);
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.4s ease, background 0.3s ease, transform 0.3s ease;
}
.loop-node:hover { color: var(--accent-soft); transform: translate(-50%, -50%) scale(1.05); }
.loop-node[aria-checked="true"] {
  color: #160f06;
  background: radial-gradient(circle at 50% 40%, var(--gold-soft), var(--gold));
  border-color: var(--gold-soft);
  box-shadow: 0 0 34px 4px rgba(233, 183, 101, 0.5);
  font-weight: 500;
}
.loop-node.visited::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(117, 232, 255, 0.3);
}
.loop-readout {
  margin: 6px auto 0;
  min-height: 2.6em;
  max-width: 34ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text);
}
.loop-readout .st-lead { color: var(--accent-soft); font-style: normal; font-family: var(--display); letter-spacing: 0.04em; }
.loop-whole {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: lowercase;
  color: var(--cyan);
}
/* The list is the no-JS / still / screen-reader fallback for the circuit.
   Visible by default; only the JS "flow" mode hides it in favour of the
   operable canvas + radio buttons (whose aria-labels carry the same text). */
.loop-list {
  margin: 26px auto 0;
  padding: 0;
  list-style: none;
  max-width: 46ch;
  display: grid;
  gap: 8px;
  text-align: left;
  color: var(--text-muted);
}
html[data-motion="flow"] .loop-list { display: none; }
.loop-list li { padding-left: 2px; }
.loop-list .st-name { color: var(--gold-soft); font-family: var(--display); letter-spacing: 0.03em; }

/* ==========================================================================
   Movement 6 — Consecrate (fal.ai altar)
   ========================================================================== */
.altar {
  margin-top: 30px;
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  justify-items: center;
}
.altar textarea {
  width: 100%;
  resize: vertical;
  min-height: 92px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(117, 232, 255, 0.22);
  background: rgba(8, 14, 24, 0.55);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.95rem;
  line-height: 1.55;
  outline: none;
  box-shadow: inset 0 0 30px rgba(117, 232, 255, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.altar textarea:focus { border-color: rgba(117, 232, 255, 0.55); box-shadow: 0 0 0 4px rgba(117, 232, 255, 0.08); }
.altar-status { margin: 2px 0 0; min-height: 1.4em; color: var(--text-dim); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }
.altar-status.ok { color: var(--gold-soft); }
.altar-status.err { color: #ffb1c2; }
.altar-status.busy { color: var(--cyan); }

/* ==========================================================================
   Movement 7 — Onward + footer
   ========================================================================== */
.onward-cta {
  margin: 26px 0 0;
  font-family: var(--display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: 0.08em;
  color: var(--gold-soft);
}
.rite-footer { margin-top: clamp(40px, 8vh, 80px); max-width: 64ch; }
.rite-footer small { color: var(--text-dim); font-size: 12px; line-height: 1.6; }

/* ==========================================================================
   CHURCH PAGE
   ========================================================================== */
.page-title {
  margin: 0 0 22px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.1rem, 6.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: var(--gold-soft);
  text-shadow: 0 0 50px rgba(233, 183, 101, 0.28);
  text-wrap: balance;
}

/* ---- Five Articles ---- */
.articles { display: block; min-height: auto; padding: 0; place-items: stretch; }
.articles-spine {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(233, 183, 101, 0.32), rgba(117, 232, 255, 0.22), rgba(255, 140, 198, 0.22), transparent);
  pointer-events: none;
}
.article {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(64px, 9vh, 120px) clamp(20px, 6vw, 90px);
  scroll-snap-align: start;
}
.article-inner {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 56px);
  align-items: center;
}
.numeral {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(4.5rem, 16vw, 11rem);
  line-height: 0.8;
  color: var(--accent);
  text-shadow: 0 0 60px color-mix(in srgb, var(--accent) 45%, transparent);
  opacity: 0.92;
}
.article-body h3 {
  margin: 6px 0 14px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  line-height: 1.1;
  color: var(--accent-soft);
}
.article-body p { margin: 0; color: var(--text-muted); font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 46ch; }

/* ---- Creed ---- */
.creed-lines { max-width: 24ch; }

/* ---- Weekly rhythm dial ---- */
.rhythm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.rhythm-head { max-width: 46ch; }
.rhythm-dial-wrap { position: relative; display: grid; place-items: center; }
.week-canvas { width: min(74vw, 420px); height: auto; aspect-ratio: 1; }
.rhythm-today {
  position: absolute;
  bottom: -6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-align: center;
}
.service-list {
  margin: clamp(34px, 6vh, 64px) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.service-list li {
  display: grid;
  gap: 5px;
  padding: 18px 20px;
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.service-list li.is-today { border-color: rgba(117, 232, 255, 0.5); box-shadow: 0 0 30px rgba(117, 232, 255, 0.14); }
.svc-time { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--cyan); text-transform: uppercase; }
.service-list strong { font-family: var(--display); font-weight: 500; font-size: 1.15rem; color: var(--gold-soft); }
.svc-desc { color: var(--text-muted); font-size: 0.96rem; }

/* ---- Formation circuit ---- */
.formation-head { margin: 0 auto clamp(36px, 6vh, 64px); }
.formation-circuit {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  position: relative;
}
.formation-circuit::before {
  content: "";
  position: absolute;
  left: 6%; right: 6%;
  top: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(117, 232, 255, 0.5), rgba(233, 183, 101, 0.5), transparent);
  pointer-events: none;
}
.node {
  position: relative;
  padding: 40px 16px 18px;
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  text-align: center;
}
.node-dot {
  position: absolute;
  top: 9px; left: 50%;
  transform: translateX(-50%);
  width: 15px; height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--gold-soft), var(--gold));
  box-shadow: 0 0 16px 2px rgba(233, 183, 101, 0.5);
}
.node.gate .node-dot { background: radial-gradient(circle at 40% 35%, #fff, var(--rose)); box-shadow: 0 0 16px 2px rgba(255, 140, 198, 0.5); }
.node h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 500; font-size: 1.05rem; color: var(--gold-soft); }
.node p { margin: 0; color: var(--text-muted); font-size: 0.86rem; line-height: 1.55; }
.gate-flag {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--rose);
  border: 1px solid rgba(255, 140, 198, 0.4);
  border-radius: 999px;
  padding: 2px 7px;
}
.formation-return {
  margin: 22px 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

/* ---- Lawful boundary (sober plate) ---- */
.boundary { background: rgba(5, 4, 9, 0.55); }
.boundary-plate {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: var(--ink);
  padding: clamp(28px, 5vw, 52px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}
.boundary-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--text);
  letter-spacing: 0.02em;
}
.boundary-rule { border: 0; height: 1px; background: var(--gold); margin: 18px 0 24px; opacity: 0.7; }
.boundary-plate p { margin: 0 0 16px; color: var(--text); font-size: clamp(1rem, 1.9vw, 1.12rem); line-height: 1.7; }
.boundary-plate p:last-child { margin-bottom: 0; color: var(--text-muted); }

/* ---- Return ---- */
.return-link {
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: 0.06em;
  color: var(--gold-soft);
  border-bottom: 1px solid rgba(255, 241, 194, 0.4);
  padding-bottom: 4px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.return-link:hover { color: #fff; border-color: #fff; }

/* ==========================================================================
   STILL MODE — "read as one page" + prefers-reduced-motion
   Everything visible, no auto-pacing, no snap, motion calmed.
   ========================================================================== */
html[data-motion="still"] { scroll-snap-type: none !important; }
html[data-motion="still"] .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
html[data-motion="still"] .veil-backdrop { opacity: 0.5; }
html[data-motion="still"] .breath-printed { display: block; }
html[data-motion="still"] .breath-tally { display: none; }
html[data-motion="still"] .loop-list { display: grid; }
html[data-motion="still"] .scroll-cue,
html[data-motion="still"] .ctl-dot.pulse { animation: none; }
html[data-motion="still"] .enter-halo,
html[data-motion="still"] .enter-core { animation: none; }
/* In still mode the rail + controls are always visible (no cold open) */
html[data-motion="still"] .rail { opacity: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
  .rhythm-grid { grid-template-columns: 1fr; }
  .rhythm-dial-wrap { order: -1; }
  .service-list { grid-template-columns: 1fr; }
  .formation-circuit { grid-template-columns: 1fr; gap: 12px; }
  .formation-circuit::before { display: none; }
  .article-inner { grid-template-columns: 1fr; text-align: center; gap: 10px; justify-items: center; }
  .numeral { font-size: clamp(4rem, 22vw, 7rem); }
  .article-body p { margin-inline: auto; }
}
@media (max-width: 560px) {
  .rail { right: 8px; gap: 10px; }
  .rail-tip { display: none; }
  .ritual-controls { left: 10px; bottom: 10px; }
  .actions .ghost-ring { width: 100%; }
}

/* coarse pointers (touch): never snap, let native scroll breathe */
@media (pointer: coarse) {
  html[data-snap="on"] { scroll-snap-type: none; }
}

/* ==========================================================================
   Reduced motion — calm everything (JS also forces still mode at load)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   The Approach (path.html) — built on the ORIGINAL version's source-veil
   photograph (the luminous path into Source-light). Here the image LEADS:
   the veil is bright and the canvas field is quieted, with per-movement
   scrims for legibility over the photo.
   ========================================================================== */
html[data-rite="path"] .veil-backdrop { opacity: 0.9; filter: saturate(1.08) contrast(1.04); }
html[data-rite="path"] .field { opacity: 0.45; }
html[data-rite="path"] .page-tint {
  background:
    radial-gradient(70% 50% at 50% 48%, rgba(7, 5, 12, 0.26), transparent 70%),
    linear-gradient(180deg, rgba(7, 5, 12, 0.72) 0%, rgba(7, 5, 12, 0.12) 34%, rgba(7, 5, 12, 0.3) 62%, rgba(7, 5, 12, 0.9) 100%);
}
html[data-rite="path"] .movement::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(58% 46% at 50% 50%, rgba(7, 5, 12, 0.5), rgba(7, 5, 12, 0.12) 72%, transparent);
  pointer-events: none;
}
html[data-rite="path"] .movement-inner { position: relative; z-index: 1; }
html[data-rite="path"] .scripture,
html[data-rite="path"] .statement,
html[data-rite="path"] .page-title,
html[data-rite="path"] .approach-line { text-shadow: 0 2px 30px rgba(0, 0, 0, 0.62); }
.approach-line {
  margin: 22px 0 0;
  max-width: 30ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.95rem);
  line-height: 1.4;
  color: var(--gold-soft);
}

/* The Way — six steps drawn as a luminous vertical path */
.waypath {
  list-style: none;
  margin: 38px auto 0;
  padding: 0;
  width: min(560px, 100%);
  display: grid;
  gap: 0;
  position: relative;
  text-align: left;
}
.waypath::before {
  content: "";
  position: absolute;
  left: 21px; top: 12px; bottom: 12px;
  width: 1px;
  background: linear-gradient(var(--gold), rgba(117, 232, 255, 0.6), var(--rose), transparent);
}
.way-step { position: relative; padding: 14px 0 14px 58px; }
.way-step .way-dot {
  position: absolute;
  left: 12px; top: 18px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--gold-soft), var(--gold));
  box-shadow: 0 0 18px 3px rgba(233, 183, 101, 0.5);
}
.way-step:last-child .way-dot {
  background: radial-gradient(circle at 40% 35%, #fff, var(--cyan));
  box-shadow: 0 0 18px 3px rgba(117, 232, 255, 0.5);
}
.way-step h3 { margin: 0 0 2px; font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: var(--gold-soft); }
.way-step p { margin: 0; color: var(--text-muted); font-size: 1rem; }

/* unobtrusive cross-page link */
.quiet-link {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.quiet-link:hover { color: var(--gold-soft); border-color: rgba(255, 241, 194, 0.4); }
