/* v3.css · cahager.com v3.0-a "The Soul Breathing Through"
 *
 * Loaded last on every page. It re-dresses the v2.2-a system in Chris's own brand (his tokens from
 * hagerca.github.io/cahager-assets, his type trio from his library pages) and adds the v3 pieces:
 * the four faces, the face rooms, the value stack, the ritual stats, the year strip, warm paper.
 *
 * Two grounds. DARK is the default everywhere: Chris is dyslexic, and white grounds make letters
 * move. WARM PAPER (#FBF8F4) is a reading mode a visitor chooses for long reads; like his own
 * library pages, it keeps dark plum bands. A dark band is any element that re-declares the dark
 * tokens below, so every component inside it reads correctly in either mode.
 * Contrast (WCAG 2.x, measured by tools in VERSION-NOTES): every text token passes AA on every
 * ground it sits on in both modes.
 */

/* ============================================================ tokens ==== */
:root,
:root[data-theme="paper"] :is(.v3-band, .lb-sec--deep, .rv-hero, .fr-hero, .v3-foot, .rv-index, .v3-threshold, .fr-others, .rv-sheet) {
  /* his palette */
  --crown: #1B0C20; --mystic: #3B1A4C; --triton: #7C2D50; --ankh: #A57626; --ankh-hi: #D9A648; --gaia: #1D3237; --mirror-tone: #E7E7E7;
  --ink:      #1B0C20;           /* CROWN: the ground                          */
  --ink-2:    #241029;
  --ink-3:    #2E1634;
  --deep:     #150919;
  --mystic:   #3B1A4C;
  --gold:     #A57626;           /* ANKH: hairlines and fills                   */
  --gold-lit: #D9A648;           /* ANKH hi: the only gold small text           */
  --wine:     #7C2D50;           /* TRITON                                      */
  --mirror:   #E7E7E7;           /* MIRROR: text                                */
  --soft:     #C9BECF;
  --dim:      #A898B0;
  --line:     rgba(231, 231, 231, 0.12);
  --line-2:   rgba(231, 231, 231, 0.22);
  --gold-line: rgba(217, 166, 72, 0.45);
  --wine-line: rgba(176, 74, 120, 0.8);
  --dots: rgba(231, 231, 231, 0.06);
  --sc-canvas: var(--ink);
  --sc-surface: var(--ink-2);
  --sc-ink: var(--mirror);
  --sc-ink-soft: var(--soft);
  --sc-accent: var(--gold-lit);
  --sc-accent-ink: var(--crown);
  color-scheme: dark;
}
:root[data-theme="paper"] :is(.v3-band, .lb-sec--deep, .rv-hero, .fr-hero, .v3-foot, .rv-index, .v3-threshold, .fr-others, .rv-sheet) {
  color: var(--mirror);
  --ground: #1B0C20;
}
:root {
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;   /* display, his      */
  --sans:  "DM Sans", "Helvetica Neue", Arial, sans-serif;          /* body, his         */
  --kick:  "Space Grotesk", "DM Sans", Arial, sans-serif;           /* small tracked     */
  --pray:  "Literata", "Iowan Old Style", Georgia, serif;           /* the prayer text   */
  --sc-font-display: var(--serif);
  --sc-font-text: var(--sans);
  --breath: cubic-bezier(.22, .61, .36, 1);
  --breath-d: 900ms;
  --r: 2px;
  --ground: #1B0C20;
  --v3-gutter: clamp(1rem, 4vw, 5.5rem);
  --v3-wide: 76rem;
  --chakra-root: #C8242B; --chakra-sacral: #E8732A; --chakra-solar: #F2C230; --chakra-heart: #3FA86A;
  --chakra-throat: #2456B8; --chakra-thirdeye: #4B3BA6; --chakra-crown: #9B5FD0;
}
/* WARM PAPER. Ink #1B0C20 on #FBF8F4 / #F4EEE6. */
:root[data-theme="paper"] {
  --ink:      #FBF8F4;
  --ink-2:    #F4EEE6;
  --ink-3:    #ECE3D7;
  --deep:     #1B0C20;
  --gold:     #A57626;
  --gold-lit: #7A5410;
  --wine:     #7C2D50;
  --mirror:   #1B0C20;
  --soft:     #45344E;
  --dim:      #5F4E67;
  --line:     rgba(27, 12, 32, 0.13);
  --line-2:   rgba(27, 12, 32, 0.24);
  --gold-line: rgba(122, 84, 16, 0.5);
  --wine-line: rgba(124, 45, 80, 0.7);
  --dots: rgba(27, 12, 32, 0.05);
  --sc-canvas: var(--ink);
  --sc-surface: var(--ink-2);
  --sc-ink: var(--mirror);
  --sc-ink-soft: var(--soft);
  --sc-accent: var(--gold-lit);
  --sc-accent-ink: #FBF8F4;
  --ground: #FBF8F4 !important;
  color-scheme: light;
}
html { background: var(--ink); }
body, body.lb { background: var(--ground); color: var(--mirror); font-family: var(--sans); font-size: clamp(1.125rem, 1.08rem + .2vw, 1.25rem); line-height: 1.75; font-optical-sizing: auto; }
:root[data-theme="paper"] body { background: var(--ink); }
.sc-grain { display: none; }
h1, h2, h3, h4 { font-synthesis: none; }
::selection { background: rgba(217, 166, 72, .35); color: inherit; }
:focus-visible { outline: 2px solid var(--gold-lit); outline-offset: 3px; border-radius: var(--r); }

/* his dot grid, 7px, on every dark band */
.v3-band, .lb-sec--deep, .fr-others {
  background-color: var(--deep);
  background-image: radial-gradient(circle at center, var(--dots) 1px, transparent 1.4px);
  background-size: 7px 7px;
}
:root[data-theme="paper"] :is(.v3-band, .lb-sec--deep, .fr-others) { background-color: #1B0C20; }

/* ============================================================ type ==== */
.lb-h1, .lb-h2, .lb-h3, .lb-h4, .rv-h2, .rv-h3, .v3-h2, .v3-h3, .rv-hero__h1, .ww-t__title, .la-card__name, .lib-piece__title, .lb-item__title,
.lb-next__title, .tl__name, .ck-name, .rv-step__name, .rv-summit__name, .rv-index a, .lb-statement, .lb-ask, .lb-big p, .lb-quote p, .rv-quote p, .rv-hinge__line p,
.sos-amt, .lb-fact__n, .ww-ratio, .rv-big, .rv-mid, .fx-panel__h, .fr-hero__h, .vs-rung__h, .rs-total__n {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em;
}
.lb-h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 5.4rem); line-height: 1.02; }
.lb-h2, .rv-h2, .v3-h2 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; }
.lb-h3, .v3-h3 { font-size: clamp(1.65rem, 1.35rem + 1.1vw, 2.3rem); line-height: 1.12; }
.lb-h4 { font-size: clamp(1.4rem, 1.25rem + .5vw, 1.7rem); line-height: 1.2; }
:is(.lb-h1, .lb-h2, .lb-h3, .rv-h2, .v3-h2, .v3-h3, .rv-hero__h1, .fx-panel__h, .fr-hero__h) em { font-style: italic; color: var(--gold-lit); }
.lb-quote p, .rv-quote p, .lb-big p { font-style: italic; }

/* reading text: DM Sans, never below 18px, 1.7+, a 60-66ch measure, never justified */
.lb-lead, .v3-lede { font-family: var(--sans); font-weight: 400; font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); line-height: 1.7; color: var(--mirror); max-width: 36em; }
.lb-col p, .lb-col li, .rv-body, .v3-wrap p { max-width: 64ch; text-align: left; }
.lb-col :is(.lb-quote, .lb-big, .lb-statement) p { max-width: 30em; }
.lb-statement { font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.3rem); line-height: 1.3; font-style: italic; }
.lb-said, .lb-spoken, .lb-closing, .lb-sub, .ck-ld, .kg-qs legend, .la-qs legend, .kg-pick legend, .la-dist li, .ab-nine li, .ww-sec__q, .ck-rung__q, .ck-ck__q,
.ck-qt p, .kg-ag__p, .lb-faq > summary, .cl-facts dd, .ww-k__say [data-ksay], .ck-close, .la-ladder b, .gf-steps__w, .gf-ladder tbody th, .ck-sk, .sos-signals__s, .rv-foot__tag {
  font-family: var(--sans);
}
.lb-said, .lb-spoken, .lb-closing { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); }
.kg-qs legend, .la-qs legend, .kg-pick legend { font-size: 1.15rem; line-height: 1.6; }

/* small tracked kickers: Space Grotesk, never below 12px */
.rv-eyebrow, .lb-tag, .lb-index__h, .lb-count, .lb-sig, .lb-byline, .lb-quote figcaption, .lb-big figcaption, .rv-quote figcaption, .rv-hinge__line figcaption,
.lb-pull__lbl, .lb-next__kind, .lb-item__kind, .lib-piece__kind, .gf-ladder thead th, .ck-num, .ck-pane__h, .ck-close small, .kg-trail__stop,
.kg-station__num, .la-card__num, .la-pole dt, .ab-who dt, .cl-facts dt, .rv-step__kind, .lb-head__name, .rv-hero__name, .rv-reps__lbl, .rv-reps__asof,
.rv-ledger__yr, .rv-prayer__by, .pr__by, .rv-film__who, .fx-panel__kick, .fx-panel__lbl, .fx-key__el, .fx-center__kick, .fr-ch__h, .vs-rung__line,
.rs-total__l, .ys-year figcaption b, .fx-arcana dt, .v3-credit, .fr-others__el, .lb-door__terms, .vs-door__terms, .rs-name, .rs-pct {
  font-family: var(--kick); font-weight: 500;
}
.rv-eyebrow, .lb-tag, .lb-index__h, .lb-pull__lbl, .lb-next__kind, .lb-item__kind, .lib-piece__kind, .rv-step__kind, .lb-quote figcaption, .lb-big figcaption,
.rv-quote figcaption, .rv-hinge__line figcaption, .ck-num, .kg-station__num, .la-card__num, .fx-panel__kick, .fx-panel__lbl, .fx-center__kick, .fr-ch__h, .rv-reps__lbl, .rv-reps__asof {
  font-size: .8125rem; letter-spacing: .16em; text-transform: uppercase; line-height: 1.6;
}
.rv-eyebrow { color: var(--gold-lit); display: flex; align-items: center; gap: .6rem; }
.rv-eyebrow .rv-glyph { width: 18px; height: 18px; color: var(--gold-lit); flex: none; }
.lb-quote figcaption, .lb-big figcaption, .rv-quote figcaption, .rv-hinge__line figcaption { color: var(--dim); }
.gm { font-size: .75rem; color: #F2D7E3; }
.gm--attr { font-size: .75rem; }
:root[data-theme="paper"] .gm { color: #5B1E39; background: rgba(124, 45, 80, .12); }
:root[data-theme="paper"] :is(.v3-band, .lb-sec--deep, .rv-hero, .fr-hero, .v3-foot, .v3-threshold, .fr-others) .gm { color: #F2D7E3; background: rgba(124, 45, 80, .35); }

/* Egyptian glyphs as section marks (CSS masks over assets/icons) */
.v3-mark { width: 30px; height: 30px; color: var(--gold-lit); display: block; }

/* ============================================================ links + buttons ==== */
.rv-link { font-family: var(--sans); font-weight: 500; text-underline-offset: .32em; text-decoration-thickness: 1px; }
.rv-link--gold { color: var(--gold-lit); text-decoration-color: var(--gold-line); }
.rv-btn {
  font-family: var(--kick); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .875rem;
  background: var(--ankh); color: #1B0C20; border-radius: var(--r); min-height: 48px; padding: 0 1.5rem;
  transition: background var(--breath-d) var(--breath), transform 400ms var(--breath);
}
.rv-btn:hover { background: var(--ankh-hi, #D9A648); }
:root[data-theme="paper"] .rv-btn { background: #1B0C20; color: #FBF8F4; }
:root[data-theme="paper"] :is(.v3-band, .lb-sec--deep, .rv-hero, .fr-hero, .v3-threshold) .rv-btn { background: var(--ankh); color: #1B0C20; }

/* ============================================================ header ==== */
.lb-head { z-index: 40; background: var(--ink); }
.lb-head__in { gap: 1.25rem; }
.lb-head__name { font-size: .8125rem; letter-spacing: .26em; text-transform: uppercase; font-weight: 600; }
.lb-nav a { font-family: var(--sans); font-weight: 500; font-size: 1rem; color: var(--soft); }
.lb-head__menu { font-family: var(--kick); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .8125rem; }
.lb-head--over { position: absolute; inset: 0 0 auto 0; background: linear-gradient(to bottom, rgba(27, 12, 32, .82), rgba(27, 12, 32, 0)); border-bottom: 0; }
:root[data-theme="paper"] .lb-head--over { --mirror: #E7E7E7; --soft: #C9BECF; --line-2: rgba(231,231,231,.22); --gold: #A57626; --gold-lit: #D9A648; --gold-line: rgba(217,166,72,.45); color: #E7E7E7; }
.v3-theme {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 .9rem; background: transparent; color: var(--soft);
  border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; font: 600 .8125rem/1 var(--kick); letter-spacing: .12em; text-transform: uppercase;
  transition: color 300ms var(--breath), border-color 300ms var(--breath);
}
.v3-theme:hover { color: var(--mirror); border-color: var(--gold-line); }
.v3-theme__dot { width: 12px; height: 12px; border-radius: 50%; background: #F4EEE6; box-shadow: inset 0 0 0 1px rgba(27,12,32,.3); flex: none; }
.v3-theme[aria-pressed="true"] .v3-theme__dot { background: #1B0C20; box-shadow: inset 0 0 0 1px rgba(231,231,231,.4); }
@media (max-width: 1000px) { .lb-head__in { gap: .6rem; } }
@media (max-width: 520px) {
  .lb-head__name { display: none; }
  .v3-theme { padding: 0 .7rem; }
}

/* the index dialog */
.rv-index { background: rgba(21, 9, 25, .985); }
.lb-index { max-width: 64rem; }
@media (min-width: 900px) { .lb-index__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rv-index .lb-index a { font-size: clamp(1.3rem, 1.15rem + .7vw, 1.75rem); }

/* ============================================================ layout ==== */
.v3-wrap { width: 100%; max-width: calc(var(--v3-wide) + 2 * var(--v3-gutter)); padding-inline: var(--v3-gutter); margin-inline: auto; }
.v3-head { max-width: 46rem; }
.v3-head > * + * { margin-top: 1rem; }
.v3-head--center { margin-inline: auto; text-align: center; }
.v3-head--center .rv-eyebrow { justify-content: center; }
.v3-head--center .v3-lede, .v3-head--center p { margin-inline: auto; text-align: center; }
.v3-credit { font-size: .8125rem; line-height: 1.7; letter-spacing: .04em; color: var(--dim); max-width: 52ch; }
.v3-act { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .8rem 1.8rem; align-items: center; }
.lb-sec { border-top-color: var(--line); }

/* reveal: in, at breath pace, once. Never hides content when JS or motion is off. */
.js [data-v3-in] { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity var(--breath-d) var(--breath), transform var(--breath-d) var(--breath); }
.js [data-v3-in].is-in { opacity: 1; transform: none; }

/* ============================================================ THE HERO (three planes) ==== */
.v3-hero { background: var(--ink); }
/* the far plate stays soft, dark and ember-lit: the wall is a 1024px plate, never shown sharp */
.v3-hero .rv-hero__base { filter: blur(2.2px) brightness(.62) saturate(.8); }
.v3-hero .rv-hero__light { filter: blur(1.4px); opacity: .85; }
.v3-hero .rv-hero__figure { right: max(5vw, calc(50% - 38rem)); height: min(92svh, 1060px); }
.v3-hero .rv-hero__figure picture, .v3-hero .rv-hero__figure img { display: block; height: 100%; width: auto; }
.v3-hero .rv-hero__aura {
  background:
    radial-gradient(closest-side at 50% 40%, rgba(217,166,72,.2), transparent 60%),
    radial-gradient(closest-side at 50% 52%, rgba(124,45,80,.36), rgba(59,26,76,.28) 52%, transparent 100%);
}
.v3-hero__copy { width: min(40rem, 50vw); bottom: clamp(3rem, 12svh, 8.5rem); }
.v3-hero .rv-hero__name { font-family: var(--kick); font-weight: 600; font-size: .8125rem; letter-spacing: .3em; color: var(--gold-lit); }
.v3-hero .rv-hero__h1 { font-size: clamp(3rem, 1.6rem + 4.6vw, 6.2rem); line-height: .98; letter-spacing: -0.015em; margin-top: 1rem; color: var(--mirror); text-wrap: balance; }
.v3-hero .rv-hero__h1 em { color: var(--gold-lit); }
.v3-hero__q { margin: 1.6rem 0 0; }
.v3-hero__q blockquote { margin: 0; }
.v3-hero__q p { font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 1.1rem + .8vw, 1.8rem); line-height: 1.35; color: var(--soft); max-width: 26em; }
.v3-hero__q figcaption { margin-top: .5rem; font: 500 .8125rem/1.6 var(--kick); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.v3-hero__acts { margin-top: 1.6rem; display: flex; gap: .6rem 1.8rem; flex-wrap: wrap; }
.v3-hero__acts .rv-link { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 760px) {
  .v3-hero { min-height: 680px; }
  .v3-hero .rv-hero__figure { top: 9svh; height: 54svh; right: auto; left: 50%; translate: -50% 0; }
  .v3-hero__copy { width: auto; bottom: max(1.5rem, 3svh); }
  .v3-hero .rv-hero__h1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 3rem); }
  .v3-hero__q p { font-size: 1.25rem; }
}

/* ============================================================ THE BREATH ==== */
.v3-breath { padding-block: clamp(5rem, 12vw, 10rem); text-align: center; }
.v3-breath__in { display: grid; justify-items: center; gap: 1.6rem; }
.v3-breath__q { margin: 0; max-width: 54rem; }
.v3-breath__q blockquote { margin: 0; }
.v3-breath__q p { font-family: var(--serif); font-style: normal; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.8rem); line-height: 1.12; color: var(--mirror); text-wrap: balance; max-width: none; text-align: center; }
.v3-breath__q figcaption { margin-top: 1.2rem; font: 500 .8125rem/1.6 var(--kick); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.v3-breath__who { color: var(--soft); text-align: center !important; margin-inline: auto; }

/* ============================================================ FOUR FACES ==== */
.v3-faces { padding-block: clamp(5rem, 10vw, 8.5rem); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: clip; }
.v3-faces .v3-h2 { font-size: clamp(2.4rem, 1.6rem + 3.2vw, 4.4rem); }
.fx { margin-top: clamp(2.5rem, 5vw, 4rem); }
.fx-stage { position: relative; width: min(100%, 560px); aspect-ratio: 1; margin-inline: auto; }
.fx-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fx-ring__dots { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 1 6; }
.fx-ring__base { fill: none; stroke: var(--line-2); stroke-width: 1; }
.fx-diamond { fill: none; stroke: rgba(217, 166, 72, .16); stroke-width: 1; }
.fx-rays path { stroke: rgba(217, 166, 72, .16); stroke-width: 1; }
.fx-rays { transform-origin: 250px 250px; animation: fx-rays 16s var(--breath) infinite alternate; }
.fx-arc { fill: none; stroke: var(--fc); stroke-width: 2; stroke-linecap: round; opacity: .55; transition: opacity var(--breath-d) var(--breath), stroke-width var(--breath-d) var(--breath); }
.fx-arc.is-on { opacity: 1; stroke-width: 4; filter: drop-shadow(0 0 8px var(--fc)); }
@keyframes fx-rays { from { transform: rotate(0deg) scale(.97); opacity: .7; } to { transform: rotate(4deg) scale(1.03); opacity: 1; } }

.fx-center {
  position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; translate: -50% -50%;
  display: grid; place-content: center; justify-items: center; text-align: center; gap: .35rem; border-radius: 50%;
}
.fx-breath { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.fx-breath span { position: absolute; inset: 0; border-radius: 50%; }
.fx-breath span:nth-child(1) { background: radial-gradient(closest-side, rgba(217,166,72,.36), rgba(124,45,80,.22) 55%, transparent 100%); animation: fx-breathe 9s var(--breath) infinite; }
.fx-breath span:nth-child(2) { inset: 14%; border: 1px solid rgba(217,166,72,.3); animation: fx-breathe 9s var(--breath) infinite; animation-delay: -1.2s; }
.fx-breath span:nth-child(3) { inset: 28%; border: 1px solid rgba(217,166,72,.18); animation: fx-breathe 9s var(--breath) infinite; animation-delay: -2.4s; }
@keyframes fx-breathe { 0%, 100% { transform: scale(.9); opacity: .65; } 45%, 55% { transform: scale(1.06); opacity: 1; } }
.fx-center__kick { position: relative; color: var(--gold-lit); }
.fx-center__promise { position: relative; font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, .9rem + .9vw, 1.6rem); line-height: 1.15; color: var(--mirror); max-width: 11em; text-align: center !important; }
.fx-center__go { position: relative; display: inline-flex; align-items: center; min-height: 44px; font: 500 .9375rem/1.3 var(--sans); color: var(--soft); text-underline-offset: .3em; text-decoration-color: var(--gold-line); }
.fx-center__go:hover { color: var(--mirror); }

.fx-keys { list-style: none; margin: 0; padding: 0; }
.fx-key { position: absolute; --m: 64px; }
.fx-key--top    { left: 50%; top: 10%; }
.fx-key--bottom { left: 50%; top: 90%; }
.fx-key--left   { left: 10%; top: 50%; }
.fx-key--right  { left: 90%; top: 50%; }
.fx-key__btn {
  display: flex; align-items: center; gap: .55rem .9rem; min-height: 44px; padding: 0; cursor: pointer; background: transparent; border: 0; color: var(--mirror);
  font: inherit; text-align: center;
}
.fx-key--top .fx-key__btn    { flex-direction: column-reverse; translate: -50% calc(-100% + var(--m) / 2); }
.fx-key--bottom .fx-key__btn { flex-direction: column; translate: -50% calc(var(--m) / -2); }
.fx-key--left .fx-key__btn, .fx-key--right .fx-key__btn { flex-direction: column; translate: -50% calc(var(--m) / -2); }
.fx-key__med {
  position: relative; display: grid; place-items: center; width: var(--m); height: var(--m); border-radius: 50%; flex: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--fc) 26%, var(--deep)), var(--deep));
  border: 1px solid color-mix(in srgb, var(--fc) 70%, transparent);
  box-shadow: 0 0 0 6px var(--deep), 0 0 24px -6px var(--fc);
  transition: box-shadow var(--breath-d) var(--breath), border-color var(--breath-d) var(--breath), transform 700ms var(--breath);
}
.fx-key__glyph { width: 30px; height: 30px; color: var(--fc); transition: color var(--breath-d) var(--breath); }
.fx-key__txt { display: grid; gap: .25rem; }
.fx-key__txt { justify-items: center; padding: .25rem .6rem .3rem; background: color-mix(in srgb, var(--deep) 88%, transparent); border-radius: var(--r); }
.fx-key__name { font-family: var(--serif); font-size: 1.9rem; line-height: 1; transition: color var(--breath-d) var(--breath); }
.fx-key__el { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.fx-sign { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; flex: none; }
.fx-key__btn:hover .fx-key__med, .fx-key__btn[aria-expanded="true"] .fx-key__med { border-color: var(--gold-lit); box-shadow: 0 0 0 6px var(--deep), 0 0 34px 2px color-mix(in srgb, var(--fc) 70%, transparent); transform: scale(1.06); }
.fx-key__btn[aria-expanded="true"] .fx-key__glyph { color: var(--gold-lit); }
.fx-key__btn[aria-expanded="true"] .fx-key__name, .fx-key__btn:hover .fx-key__name { color: var(--gold-lit); }
.fx-key__btn[aria-expanded="true"] .fx-key__el { color: var(--soft); }
.fx-key__btn:focus-visible { outline: none; }
.fx-key__btn:focus-visible .fx-key__med { outline: 2px solid var(--gold-lit); outline-offset: 4px; }

.fx-panels { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
.fx-panel {
  position: relative; padding: 1.6rem 1.4rem 1.5rem; border: 1px solid var(--line); border-top: 2px solid var(--fc, var(--gold)); border-radius: var(--r);
  background: color-mix(in srgb, var(--deep) 88%, var(--fc, var(--mystic)));
}
.fx-panel--intro { --fc: var(--gold); }
.fx-panel__kick { display: flex; align-items: center; gap: .55rem; color: var(--soft); }
.fx-panel__kick .rv-glyph { width: 20px; height: 20px; color: var(--fc); }
.fx-panel__kick .fx-sign { color: var(--fc); }
.fx-panel__h { margin-top: .5rem; font-size: clamp(2.2rem, 1.7rem + 1.6vw, 3.2rem); line-height: 1; }
.fx-panel__the { font-style: italic; color: var(--gold-lit); font-size: .62em; vertical-align: .18em; }
.fx-panel__theme { margin-top: .4rem; font: 500 .875rem/1.5 var(--kick); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.fx-panel__q { margin: 1.1rem 0 0; }
.fx-panel__q blockquote { margin: 0; }
.fx-panel__q p { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 1.15rem + .5vw, 1.6rem); line-height: 1.32; color: var(--mirror); }
.fx-panel__q figcaption { margin-top: .5rem; font: 500 .8125rem/1.6 var(--kick); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.fx-panel__lbl { margin-top: 1.3rem; color: var(--dim); }
.fx-panel__list { list-style: none; margin: .4rem 0 0; padding: 0; }
.fx-panel__list a { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .25rem 0; color: var(--mirror); text-decoration: none; border-bottom: 1px solid var(--line); font-size: 1.0625rem; line-height: 1.4; }
.fx-panel__list a:hover { color: var(--gold-lit); }
.fx-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.fx-panel__go { margin-top: 1.2rem; }
.fx-panel__go .rv-link, .fx-panel__note { min-height: 44px; display: inline-flex; align-items: center; }
.fx-panel__note { color: var(--soft); margin-top: 1rem; }

/* wide screens: the living figure (v3.js adds .is-live) */
@media (min-width: 1000px) {
  .fx.is-live { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
  .fx.is-live .fx-stage { width: min(100%, 600px); margin: 3.5rem auto; }
  .fx.is-live .fx-panels { margin-top: 0; min-height: 34rem; align-content: center; }
  .fx.is-live .fx-panel { animation: fx-panel-in 700ms var(--breath) both; }
  .fx.is-live .fx-panel[hidden] { display: none; }
  @keyframes fx-panel-in { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
}
@media (max-width: 999.98px) {
  .fx-stage { width: min(calc(100% - 3.5rem), 360px); margin-block: 2.5rem 3rem; }
  .fx-key { --m: 46px; }
  .fx-key__glyph { width: 22px; height: 22px; }
  .fx-key__name { font-size: 1.3rem; }
  .fx-key__el { display: none; }
  .fx-key__txt { padding: .1rem .45rem; }
  .fx-center__go { font-size: .875rem; }
  .fx-center__promise { font-size: 1.05rem; }
  .fx-panel[hidden] { display: block !important; }
}

/* ============================================================ THE PRAYER (component kept, re-dressed) ==== */
.v3-prayer { padding-top: clamp(5rem, 9vw, 8rem); }
.v3-prayer .rv-prayer__title { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.8rem); }
.v3-prayer__skip { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.v3-prayer__skip .rv-link { min-height: 44px; display: inline-flex; align-items: center; }
.rv-reading { font-family: var(--pray); }
.rv-reading .rv-stanza__h { font-family: var(--kick); }
.rv-voice__opt { font-family: var(--kick); font-weight: 600; letter-spacing: .08em; }
:root[data-theme="paper"] .rv-reading { --wait: #6B5D75; --risen: #34253C; --here: #1B0C20; --unsaid: #5C4E66; }
:root[data-theme="paper"] .rv-reading.is-breathing .ph.is-here { text-shadow: none; }
:root[data-theme="paper"] .rv-voice--dock, :root[data-theme="paper"] .rv-return { background: rgba(251, 248, 244, .96); border-color: rgba(122, 84, 16, .4); }
:root[data-theme="paper"] .rv-reading .w.is-now { color: #7A5410; }

/* ============================================================ THE PROOF ==== */
.v3-proof { padding-bottom: clamp(4rem, 8vw, 7rem); }
.v3-proof .rv-big { color: var(--mirror); }
.rv-egy svg path { stroke: var(--gold-lit); }
.v3-proof__voices, .v3-proof__rituals { margin-top: clamp(4rem, 8vw, 6.5rem); }
.v3-films { margin-top: 2rem; display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 900px) { .v3-films { grid-template-columns: minmax(0, 1fr); } .v3-films .rv-film[data-aspect="9/16"] { max-width: 20rem; } }
.rv-film figcaption p { font-family: var(--serif); font-style: italic; font-size: 1.35rem; line-height: 1.35; }
.rv-film figcaption .rv-film__who { font-family: var(--kick); font-style: normal; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

/* the ritual stats */
.rs { margin-top: 2rem; display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 5vw, 5rem); align-items: start; }
.rs-total__n { font-size: clamp(3.6rem, 2.4rem + 4vw, 6rem); line-height: .95; color: var(--mirror); font-variant-numeric: lining-nums; }
.rs-total__l { margin-top: .6rem; font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); max-width: 18rem; }
.rs-rows { list-style: none; margin: 0; padding: 0; }
.rs-rows li { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr) 5.5rem; align-items: center; gap: 1rem; min-height: 52px; border-bottom: 1px solid var(--line); }
.rs-name { font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mirror); }
.rs-bar { position: relative; height: 2px; background: var(--line); }
.rs-bar span { position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 1%); background: linear-gradient(90deg, var(--gold), var(--gold-lit)); transform-origin: 0 50%; }
.js .rs:not(.is-in) .rs-bar span { transform: scaleX(0); }
.rs-bar span { transition: transform 1600ms var(--breath); }
.rs-pct { text-align: right; font-size: 1.125rem; color: var(--gold-lit); font-variant-numeric: tabular-nums; }
.rs-pct small { display: block; white-space: nowrap; font-size: .75rem; letter-spacing: .06em; color: var(--dim); }
.rs-quote { grid-column: 1 / -1; margin-top: 1rem; }
.rs-quote p { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.2rem); }
@media (max-width: 760px) {
  .rs { grid-template-columns: minmax(0, 1fr); }
  .rs-rows li { grid-template-columns: minmax(0, 1fr) 4.6rem; row-gap: .3rem; padding-block: .6rem; }
  .rs-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* ============================================================ THE VALUE STACK ==== */
.v3-stack { padding-block: clamp(5rem, 10vw, 8rem); }
.vs { list-style: none; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: 0; display: grid; gap: 0; counter-reset: none; }
.vs-rung { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 1rem clamp(2rem, 4vw, 4rem); padding: 1.6rem 0; border-top: 1px solid var(--line); }
@media (min-width: 1000px) { .vs:not(.vs--full) .vs-rung { margin-left: calc(var(--i) * 1.6rem); } }
.vs-rung__head { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); column-gap: .6rem; align-items: baseline; }
.vs-rung__n { font-family: var(--serif); font-style: italic; color: var(--gold-lit); font-size: 1.4rem; }
.vs-rung__h { font-size: clamp(1.6rem, 1.35rem + .8vw, 2.1rem); line-height: 1.1; }
.vs-rung__line { grid-column: 2; margin-top: .3rem; font-size: .875rem; letter-spacing: .04em; color: var(--soft); }
.vs-doors { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.vs-door { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem 1.5rem; min-height: 48px; padding: .55rem 0; color: var(--mirror); text-decoration: none; border-bottom: 1px dashed var(--line); }
.vs-door:hover .vs-door__name { color: var(--gold-lit); }
.vs-door__name { font-size: 1.15rem; transition: color 300ms var(--breath); }
.vs-door__terms { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.vs-rung--summit { border-top-color: var(--gold-line); }
.vs-rung--summit .vs-rung__h { color: var(--gold-lit); font-style: italic; }
.vs--full .vs-rung { grid-template-columns: minmax(0, 1fr); }
.vs--full .lb-doors { margin-top: .4rem; }
@media (max-width: 760px) { .vs-rung { grid-template-columns: minmax(0, 1fr); } }

/* the doors (cards) */
.lb-door { border-radius: var(--r); }
.lb-door__terms { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-lit); }
.rv-step__name { font-size: clamp(1.6rem, 1.4rem + .7vw, 2.1rem); line-height: 1.1; }
.lb-door--summit { border-color: var(--gold-line); }

/* ============================================================ HIS YEARS (strip) ==== */
.v3-years { padding-block: clamp(5rem, 10vw, 8rem); }
.ys { margin-top: 2.2rem; }
.ys-rail {
  list-style: none; margin: 0; padding: .5rem var(--v3-gutter) 1.2rem; display: flex; gap: 1.1rem; overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--gold-line) transparent; overscroll-behavior-x: contain;
}
.ys-rail:focus-visible { outline-offset: -2px; }
.ys-year { flex: none; scroll-snap-align: start; }
.ys-year figure { margin: 0; width: auto; }
.ys-year img { display: block; height: clamp(190px, 26vw, 280px); width: auto; border-radius: var(--r); filter: saturate(.92); }
.ys-year figcaption { margin-top: .6rem; max-width: 15rem; font-size: 1rem; line-height: 1.45; color: var(--soft); }
.ys-year figcaption b { display: block; font-size: .8125rem; letter-spacing: .14em; color: var(--gold-lit); font-weight: 500; }

/* ============================================================ THE LETTER ==== */
.v3-threshold { background: var(--ink); }
.rv-letter__salute, .rv-letter__p { font-family: var(--serif); }
.rv-threshold__promise { font-family: var(--serif); font-style: italic; }

/* ============================================================ FACE ROOMS ==== */
.fr-hero { position: relative; overflow: clip; isolation: isolate; background: var(--ink); border-bottom: 1px solid var(--line); --hy: 0; }
.fr-hero__plate {
  position: absolute; inset: -10% 0 -10% 0; z-index: -1;
  background:
    radial-gradient(60% 70% at 72% 46%, color-mix(in srgb, var(--fc) 34%, transparent), transparent 70%),
    radial-gradient(40% 40% at 74% 40%, rgba(217,166,72,.16), transparent 70%),
    linear-gradient(rgba(27,12,32,.86), rgba(27,12,32,.86)),
    url(../img/egyptian-plate.webp) center / cover no-repeat;
  filter: saturate(.7);
  transform: translate3d(0, calc(var(--hy) * .25px), 0);
}
.fr-hero__in { max-width: calc(var(--v3-wide) + 2 * var(--v3-gutter)); margin-inline: auto; padding: clamp(2rem, 5vw, 4rem) var(--v3-gutter) 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem; align-items: end; min-height: min(82svh, 760px); }
.fr-hero__copy { padding-bottom: clamp(3rem, 8vw, 6rem); }
.fr-hero__copy > * + * { margin-top: 1rem; }
.fr-hero__h { font-size: clamp(3.4rem, 2rem + 5vw, 7rem); line-height: .95; }
.fr-hero__the { font-style: italic; color: var(--gold-lit); font-size: .5em; vertical-align: .35em; margin-right: .1em; }
.fr-hero__theme { display: flex; align-items: center; gap: .6rem; font: 500 .9375rem/1.5 var(--kick); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.fr-hero__theme .fx-sign { color: var(--fc); }
.fr-hero__q { margin: 1.6rem 0 0; }
.fr-hero__q blockquote { margin: 0; }
.fr-hero__q p { font-family: var(--serif); font-style: italic; font-size: clamp(1.45rem, 1.2rem + .9vw, 2rem); line-height: 1.3; color: var(--mirror); max-width: 24em; }
.fr-hero__q figcaption { margin-top: .5rem; font: 500 .8125rem/1.6 var(--kick); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.fr-hero__fig { margin: 0; align-self: end; justify-self: center; height: min(78svh, 720px); transform: translate3d(0, calc(var(--hy) * .08px), 0); }
.fr-hero__fig picture, .fr-hero__fig img { display: block; height: 100%; width: auto; max-width: none; }
.fr-hero__fig img { -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 99%); mask-image: linear-gradient(to bottom, #000 72%, transparent 99%); filter: drop-shadow(0 30px 60px rgba(8,4,12,.5)); }
@media (max-width: 760px) {
  .fr-hero__in { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 1.5rem; }
  .fr-hero__fig { order: -1; height: 46svh; max-height: 420px; }
  .fr-hero__copy { padding-bottom: 3rem; }
}
.fr-words .lb-quote + .lb-quote { margin-top: 2.2rem; }
.fx-arcana { margin: 2.5rem 0 0; display: grid; gap: 1rem; padding: 1.4rem 0 0; border-top: 1px solid var(--line); }
.fx-arcana dt { font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.fx-arcana dd { margin: .2rem 0 0; font-size: 1.15rem; line-height: 1.6; }
.fx-arcana__src { font-size: 1rem; color: var(--soft); }
.fr-credit { color: var(--dim); }
.fr-ch { margin-top: 2.6rem; }
.fr-ch__h { display: flex; align-items: center; gap: .7rem; color: var(--soft); padding-bottom: .6rem; border-bottom: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }
.fr-ch__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 70%, transparent); }
.fr-ch .lb-items { margin-top: .4rem; }
.fr-others__list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.fr-others__list a { display: grid; gap: .4rem; min-height: 44px; padding: 1.4rem; border: 1px solid var(--line-2); border-top: 2px solid var(--fc); border-radius: var(--r); color: var(--mirror); text-decoration: none; transition: border-color 400ms var(--breath), background 400ms var(--breath); }
.fr-others__list a:hover { border-color: var(--gold-lit); background: color-mix(in srgb, var(--deep) 85%, var(--fc)); }
.fr-others__list .rv-glyph { width: 26px; height: 26px; color: var(--fc); }
.fr-others__name { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.fr-others__el { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
@media (max-width: 760px) { .fr-others__list { grid-template-columns: minmax(0, 1fr); } }
.fr-years .ys { margin-top: 1.4rem; }

/* ============================================================ library + pages ==== */
.lb-hero { position: relative; }
.v3-original { margin: 0 auto; max-width: calc(var(--lb-col, 44rem) + 2 * var(--lb-gutter, 1rem)); padding: 2rem var(--lb-gutter, 1rem) 3rem; }
.v3-original p { display: flex; gap: .7rem; align-items: baseline; font-size: 1rem; line-height: 1.7; color: var(--soft); border-top: 1px solid var(--line); padding-top: 1.4rem; }
.v3-original .rv-glyph { width: 16px; height: 16px; color: var(--gold-lit); flex: none; translate: 0 2px; }
.v3-original a { color: var(--mirror); text-decoration-color: var(--gold-line); text-underline-offset: .3em; }
.lb-item { border-radius: var(--r); }

/* footer */
.v3-foot { background: var(--ink); border-top: 1px solid var(--line); }
.v3-foot .rv-foot__tag { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--soft); }
.v3-foot .rv-foot__small { font-size: 1rem; }

/* ============================================================ warm paper adjustments ==== */
:root[data-theme="paper"] .lb-head:not(.lb-head--over) { background: var(--ink); }
:root[data-theme="paper"] .lb-head__mark { background: var(--mirror); }
:root[data-theme="paper"] .lb-item:hover, :root[data-theme="paper"] .lb-next:hover { background: rgba(27, 12, 32, .04); }
:root[data-theme="paper"] .rv-letter input, :root[data-theme="paper"] .rv-letter select, :root[data-theme="paper"] .rv-letter textarea { color: var(--mirror); }
:root[data-theme="paper"] img.rv-foot__word, :root[data-theme="paper"] .rv-index__word { filter: none; }
:root[data-theme="paper"] .ys-year img { filter: none; }
:root[data-theme="paper"] .lb-door, :root[data-theme="paper"] .fx-panel { background: var(--ink-2); }
:root[data-theme="paper"] .lb-sec--deep .lb-door { background: var(--deep); }
:root[data-theme="paper"] .tm-node text { fill: var(--soft); }

/* ============================================================ reduced motion ==== */
@media (prefers-reduced-motion: reduce) {
  .fx-rays, .fx-breath span { animation: none !important; }
  .fr-hero__plate, .fr-hero__fig { transform: none !important; }
  .js [data-v3-in] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .rs:not(.is-in) .rs-bar span { transform: none; }
  .rs-bar span { transition: none; }
  .fx.is-live .fx-panel { animation: none !important; }
}
.fx-dot--door { border-radius: 1px; transform: rotate(45deg); }
.fx-panel { scroll-margin-top: 80px; }
.lb-doors > .lb-door--summit { grid-column: 1 / -1; }
.lb-door--summit .lb-door__terms { font-family: var(--kick); font-size: .875rem; font-weight: 500; }
.lb-door--summit .rv-step__name { font-size: clamp(2.2rem, 1.7rem + 1.6vw, 3.2rem); }
:root[data-theme="paper"] .rv-mark { background: rgba(251, 248, 244, .94); color: #1B0C20; border-color: rgba(27, 12, 32, .2); }
.lb-pull { background: linear-gradient(180deg, var(--deep), var(--ink) 60%); }
:root[data-theme="paper"] .lb-pull { background: linear-gradient(180deg, var(--ink-2), var(--ink) 60%); }

/* warm paper: v2.2-a surfaces that were typed as dark hexes */
:root[data-theme="paper"] :is(.kg-qs li, .ck-ck__row, .ck-result, .la-result, .kg-verdict, .sos-split__ten) { background: var(--ink-2); }
:root[data-theme="paper"] .ck-card { background: linear-gradient(170deg, color-mix(in oklab, var(--c) 10%, #F4EEE6) 0%, #F4EEE6 45%); }
:root[data-theme="paper"] :is(.lb-next, .tl__link, .ck-rung, .wk-where a):hover { background: rgba(27, 12, 32, .05); }
:root[data-theme="paper"] .lb-door--summit { background: linear-gradient(165deg, #F4EEE6 0%, #EFE6DA 100%); }
:root[data-theme="paper"] .pr__voice.rv-voice--sheet { background: var(--ink); }
:root[data-theme="paper"] .rv-voice__opt { color: var(--mirror); }
:root[data-theme="paper"] .rv-voice--dock .rv-voice__opt, :root[data-theme="paper"] .rv-return button { color: #1B0C20; }

/* Echoes of Love sits where the Warm paper button was (Christopher, 2026-11-12): the same pill, as a link */
a.v3-theme { text-decoration: none; }
