/* The home page. Shared fonts and colours come from brand.css. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--sans); color: var(--plum); background: var(--ivory); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1.06; text-wrap: balance; }
h1 em, h2 em { font-style: italic; color: var(--gold-ink); }
.dark h1 em, .dark h2 em { color: var(--gold-hi); }
a { color: inherit; }
:lang(hi) { font-family: "Noto Sans Devanagari", var(--sans); }
.kick { font: 600 12px/1.3 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink); }
.dark .kick { color: var(--gold); }
.muted { color: var(--muted); }
.dark .muted { color: #BDB0C9; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid var(--plum); border-radius: 6px;
  background: var(--plum); color: var(--ivory); font: 600 15px var(--sans); text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -10px rgba(42, 24, 50, .55); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn.gold { background: linear-gradient(180deg, #EBD3A0, #C9A76C); border-color: #C9A76C; color: var(--night); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
:focus-visible { outline: 2px solid var(--ame); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--gold-hi); }

/* Birth-date form */
.dform { display: flex; gap: 10px; flex-wrap: wrap; }
.dform input { flex: 1 1 190px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--plum); font: 500 16px var(--sans); }
.dark .dform input { background: rgba(255, 255, 255, .07); border-color: rgba(235, 211, 160, .4); color: #fff; color-scheme: dark; }
.micro { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.dark .micro { color: #BDB0C9; }
.micro span::before { content: "✓"; margin-right: 6px; color: var(--gold-ink); }
.dark .micro span::before { color: var(--gold); }

/* Teaser result */
.teaser { display: none; margin-top: 22px; padding: 22px; border-radius: 10px; background: var(--paper); color: var(--plum); border: 1px solid var(--line); box-shadow: 0 20px 50px -30px rgba(23, 13, 34, .5); }
.teaser.on { display: block; animation: rise .5s both; }
.teaser .kick { color: var(--gold-ink); }
.teaser .truth { margin: 10px 0 14px; font: 400 20px/1.4 var(--serif); }
.teaser .stamp { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.teaser .stamp span { padding: 3px 10px; border-radius: 99px; background: var(--lav); font-size: 12.5px; font-weight: 600; color: var(--ame); }
.teaser .locked, .teaser .shift { font-size: 14.5px; color: var(--muted); margin-bottom: 8px; }
.teaser .btn { margin-top: 8px; }
.err { color: var(--red); font-size: 14px; min-height: 1em; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Invite form */
.invite-form, .ticket { padding: 28px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); color: var(--plum); box-shadow: 0 30px 70px -40px rgba(23, 13, 34, .6); }
.invite-form h3 { font-size: 28px; margin-bottom: 18px; }
.invite-form label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.invite-form input[type=text] { display: block; width: 100%; min-height: 46px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; font: 400 16px var(--sans); background: #fff; }
.invite-form .chk, .invite-form .via label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 0 14px 0 0; }
.invite-form .chk { display: flex; margin-bottom: 10px; }
.invite-form .via { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.invite-form .btn { width: 100%; }
.fine { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.ticket { text-align: center; background: linear-gradient(160deg, #FBF1DC, #F3E2BC); border-color: var(--gold); }
.ticket .no { font: 400 54px/1.1 var(--serif); margin: 8px 0; }
.ticket .ref { font-size: 12px; word-break: break-all; margin: 12px 0; color: var(--muted); }

/* Kundli */
.kd { display: block; width: 100%; height: auto; overflow: visible; --k-line: var(--plum); --k-dim: var(--muted); --k-hot: rgba(201, 167, 108, .3); --k-asp: var(--ame); }
.dark .kd { --k-line: var(--gold); --k-dim: #A996BA; --k-hot: rgba(235, 211, 160, .2); --k-asp: #9DAEE6; }
.kd .ln { fill: none; stroke: var(--k-line); stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.9s cubic-bezier(.6, 0, .2, 1); }
.kd.drawn .ln { stroke-dashoffset: 0; }
.kd .hs { fill: transparent; transition: fill .7s; }
.kd .hs.hot { fill: var(--k-hot); }
.kd .sg { font: 500 13px var(--sans); fill: var(--k-dim); text-anchor: middle; dominant-baseline: central; opacity: 0; transition: opacity .7s; }
.kd .sg.asc { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; fill: var(--k-line); }
.kd.signed .sg { opacity: 1; }
.kd .pl { opacity: 0; transition: transform 1.15s cubic-bezier(.2, .8, .2, 1), opacity .6s; }
.kd .pl.on { opacity: 1; }
.kd.focus .pl.on:not(.f) { opacity: .25; }
.kd .pl circle { fill: var(--c); stroke: rgba(23, 13, 34, .35); stroke-width: .8; transition: fill .5s, stroke .5s; }
.kd .pl text { font: 700 9.5px var(--sans); fill: var(--night); text-anchor: middle; dominant-baseline: central; transition: fill .5s; }
.kd .pl.f circle { filter: drop-shadow(0 0 7px var(--c)); }
.kd.transit .pl circle { fill: transparent; stroke: var(--c); stroke-width: 1.6; stroke-dasharray: 3 2.5; }
.kd.transit .pl text { fill: var(--c); }
.kd .aspl { stroke: var(--k-asp); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s ease-out; }
.kd .aspl.on { stroke-dashoffset: 0; }
.kd .aspd { fill: var(--k-asp); opacity: 0; transition: opacity .4s; }
.kd .aspd.on { opacity: 1; }
.kd .hatch { stroke: #E27A5F; stroke-width: 2.2; }
.kd .veil { opacity: 0; transition: opacity .7s; }
.kd .veil.on { opacity: .75; }

/* Advanced overlays: strength rings, badges, per-house values */
.kd .ring { fill: none; stroke: #8CCB9B; stroke-width: 2.4; stroke-linecap: round; opacity: 0; transition: opacity .5s, stroke-dasharray 1.2s cubic-bezier(.2, .8, .2, 1); stroke-dasharray: 0 100; }
.kd .ring.on { opacity: 1; } .kd .ring.weak { stroke: #E27A5F; }
.kd .bdg { opacity: 0; transition: transform 1.15s cubic-bezier(.2, .8, .2, 1), opacity .5s; pointer-events: none; }
.kd .bdg.on { opacity: 1; }
.kd .bdg rect { fill: var(--night); stroke: var(--gold); stroke-width: .7; }
.kd .bdg text { font: 700 7.5px var(--sans); fill: var(--gold-hi); text-anchor: middle; dominant-baseline: central; }
.kd .hv { font: 400 30px var(--serif); fill: var(--gold-hi); text-anchor: middle; dominant-baseline: central; opacity: 0; transition: opacity .6s; pointer-events: none; }
.kd.hvmode .hv { opacity: 1; } .kd.hvmode .sg { opacity: 0; } .kd.hvmode .pl.on { opacity: .13; } .kd.hvmode .bdg { opacity: 0; }
.kd.hvsmall .hv { font: 600 10.5px var(--sans); letter-spacing: .04em; }
.kd .aspl.lord { stroke: var(--gold); stroke-dasharray: none; }

/* Vimshottari bar */
.dasha { position: relative; display: flex; gap: 2px; height: 30px; font: 600 9.5px/30px var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.dasha span { overflow: hidden; text-align: center; border-radius: 3px; background: var(--lav); color: var(--ame); min-width: 0; }
.dasha span:nth-of-type(even) { background: #E3D9EF; }
.dark .dasha span { background: rgba(184, 162, 210, .16); color: #CFC0E0; }
.dark .dasha span:nth-of-type(even) { background: rgba(184, 162, 210, .26); }
.dasha .now { position: absolute; top: -5px; bottom: -5px; left: 0; width: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: sweep 16s linear infinite; }
@keyframes sweep { to { left: 100%; } }

/* Reveal */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s, transform .8s cubic-bezier(.2, .8, .2, 1); }
.rv.in { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; } .d3 { transition-delay: .3s; }

/* The five checks: struck-out draft sentences */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: 400 17px/1.45 var(--serif); }
.checks q { quotes: none; background: linear-gradient(var(--red), var(--red)) no-repeat 0 55% / 0 1.5px; transition: background-size .9s ease-out, color .6s; transition-delay: calc(var(--i) * .35s + .4s); }
.checks b { display: block; margin-top: 6px; font: 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--red); opacity: 0; transition: opacity .5s; transition-delay: calc(var(--i) * .35s + .9s); }
.checks .keep b { color: var(--green); }
.checks.in .cut q { background-size: 100% 1.5px; color: var(--muted); }
.checks.in b { opacity: 1; }
.checks .keep { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}

/* ---------- layout: the pinned chart stage beside the story ---------- */
body { background: var(--ivory); }

.stage { position: fixed; inset: 0 auto 0 0; width: 40vw; background: radial-gradient(120% 80% at 30% 20%, #33184A 0%, var(--night2) 45%, var(--night) 100%); color: var(--ivory);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 76px 5vw 34px; overflow: hidden; z-index: 5; }
.stage::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 1px; background: linear-gradient(transparent, var(--gold), transparent); opacity: .5; }
.brand { position: absolute; top: 22px; left: 28px; display: flex; align-items: center; gap: 10px; font: 400 23px var(--serif); color: var(--ivory); text-decoration: none; z-index: 2; }
.brand img { border-radius: 50%; }
.stars, .glow { position: absolute; inset: 0; pointer-events: none; }
.stars { background-image: radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 78% 9%, #fff 50%, transparent 51%), radial-gradient(1.4px 1.4px at 64% 31%, #EBD3A0 50%, transparent 51%),
  radial-gradient(1px 1px at 23% 62%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 88% 71%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 41% 88%, #EBD3A0 50%, transparent 51%),
  radial-gradient(1px 1px at 6% 91%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 93% 44%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 52% 6%, #fff 50%, transparent 51%);
  opacity: .7; animation: twinkle 7s ease-in-out infinite alternate; }
.glow { background: radial-gradient(38% 30% at 50% 46%, rgba(184, 162, 210, .22), transparent 70%); animation: breathe 9s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .35; } }
@keyframes breathe { to { transform: scale(1.18); opacity: .7; } }

.board { position: relative; width: min(100%, 62vh, 470px); text-align: center; }
.count { display: flex; justify-content: space-between; align-items: center; font: 500 12px var(--sans); letter-spacing: .2em; color: #A996BA; margin-bottom: 18px; }
.mode { padding: 4px 11px; border-radius: 99px; border: 1px solid rgba(184, 162, 210, .4); letter-spacing: .12em; text-transform: uppercase; font-size: 10.5px; transition: all .4s; }
.mode.adv { background: linear-gradient(180deg, #EBD3A0, #C9A76C); border-color: transparent; color: var(--night); font-weight: 700; }
.count b { color: var(--gold-hi); font-weight: 600; }
.cap { margin-top: 20px; min-height: 2.5em; font: 400 21px/1.25 var(--serif); color: var(--gold-hi); }
.whose { font-size: 12.5px; color: #A996BA; margin-top: 6px; }
.timebars { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s, opacity .6s; text-align: left; }
.bar .timebars { max-height: 130px; opacity: 1; overflow: visible; }
.timebars p { font: 600 9.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #A996BA; margin: 8px 0 5px; }
.timebars .dasha { height: 22px; line-height: 22px; font-size: 8.5px; }
.timebars .dasha span.cur { background: rgba(235, 211, 160, .85); color: var(--night); }
.timebars .dasha .now { animation: none; }

.notes { list-style: none; margin: 22px 0 0; padding: 0; height: 66px; width: min(100%, 470px); overflow: hidden; position: relative; font: 500 12.5px/22px ui-monospace, "SF Mono", Menlo, monospace; color: #8F7EA3; }
.notes li { height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translateY(calc((1 - var(--at, 0)) * 22px)); transition: transform .6s cubic-bezier(.2, .8, .2, 1), color .4s; }
.notes li::before { content: "·  "; }
.notes li.done::before { content: "✓  "; color: var(--gold); }
.notes li.now { color: var(--ivory); }
.notes li.now::before { content: "→  "; color: var(--gold-hi); }
.rail { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; gap: 7px; }
.rail i { width: 3px; height: 13px; border-radius: 2px; background: rgba(255, 255, 255, .16); transition: background .4s; }
.rail i.on { background: #B8A2D2; }
.rail i.on.adv { background: var(--gold); }

.story { margin-left: 40vw; }
.nav { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: flex-end; gap: 26px; padding: 14px 5vw; background: rgba(251, 247, 241, .86); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.nav nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; font-size: 14.5px; font-weight: 500; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.nav a:not(.btn):hover { color: var(--plum); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.nav .lang:lang(hi) { font-family: "Noto Sans Devanagari Label", var(--sans); }    /* "हिन्दी" without the full Hindi font */

.step { min-height: 100vh; padding: 12vh 5vw 12vh 6vw; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 800px; border-bottom: 1px solid var(--line); }
.step.hero { min-height: calc(100vh - 69px); padding-top: 4vh; }
.hero-emblem { display: block; width: 132px; height: 132px; margin-bottom: 22px; border-radius: 50%; }
.step h1 { font-size: clamp(44px, 5.4vw, 84px); }
.step h2 { font-size: clamp(34px, 3.9vw, 58px); }
.step p { max-width: 56ch; }
.lead { font-size: 20px; color: var(--muted); }
.small { font-size: 13.5px; }
.tag { font: 600 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tag b { display: inline-block; margin-right: 10px; padding: 3px 9px; border-radius: 99px; background: var(--plum); color: var(--gold-hi); letter-spacing: .08em; }
.scrollcue { margin-top: 10px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.scrollcue::after { content: "↓"; display: inline-block; margin-left: 10px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

.birth { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); width: fit-content; max-width: 100%; }
.birth div { padding: 14px 22px; border-right: 1px solid var(--line); }
.birth div:last-child { border: 0; }
.birth dt { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.birth dd { margin: 2px 0 0; font: 400 21px var(--serif); }

.seats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seats li { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 9px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); font-size: 14.5px; font-weight: 500; }
.seats i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(23, 13, 34, .25); }

.why { margin: 0; padding: 26px 28px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 30px 60px -44px rgba(23, 13, 34, .7); }
.why blockquote { margin: 0 0 16px; font: 400 23px/1.4 var(--serif); }
.why figcaption { padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.why cite { font-style: normal; color: var(--plum); font-weight: 600; }
.why code { font: 600 12.5px ui-monospace, Menlo, monospace; padding: 2px 7px; border-radius: 4px; background: var(--lav); color: var(--ame); }
.chip { display: inline-block; margin-right: 8px; padding: 3px 11px; border-radius: 99px; background: var(--plum); color: var(--ivory); font-size: 12.5px; font-weight: 600; }

.tri, .never, .feat ul { list-style: none; margin: 0; padding: 0; }
.tri { display: grid; gap: 0; border-top: 1px solid var(--line); }
.tri li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.tri b { color: var(--plum); font-weight: 600; }
.feat { padding: 24px 26px; border-radius: 12px; background: var(--lav); }
.feat h3 { font-size: 25px; margin-bottom: 12px; }
.feat li { padding: 5px 0 5px 24px; position: relative; font-size: 15.5px; }
.feat li::before { content: "✦"; position: absolute; left: 0; color: var(--gold-ink); font-size: 12px; top: 8px; }
.never li { padding: 16px 0 16px 38px; border-bottom: 1px solid var(--line); font: 400 22px/1.3 var(--serif); position: relative; }
.never li::before { content: ""; position: absolute; left: 4px; top: 27px; width: 20px; height: 1.5px; background: var(--red); }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.nums div { font-size: 13.5px; color: var(--muted); }
.nums b { display: block; font: 400 clamp(30px, 3.4vw, 46px)/1.1 var(--serif); color: var(--plum); }

.asks { display: flex; flex-wrap: wrap; gap: 10px; }
.asks button { padding: 10px 18px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); font: 600 15px var(--sans); color: var(--plum); cursor: pointer; transition: all .25s; }
.asks small { margin-left: 6px; font-weight: 400; color: var(--muted); }
.asks button[aria-pressed=true] { background: var(--plum); border-color: var(--plum); color: var(--ivory); }
.asks button[aria-pressed=true] small { color: var(--gold-hi); }

.places { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.places i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(201, 167, 108, .7); animation: ping 2s infinite; }
@keyframes ping { to { box-shadow: 0 0 0 12px rgba(201, 167, 108, 0); } }
.step.last { border: 0; padding-bottom: 4vh; }
[data-invite] { max-width: 460px; }
footer { margin-top: 8vh; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

.tag.adv b { background: linear-gradient(180deg, #EBD3A0, #C9A76C); color: var(--night); }
.bridge { font: 400 24px/1.3 var(--serif); padding-top: 18px; border-top: 1px solid var(--plum); }
.bridge em { color: var(--gold-ink); }
.callout { padding: 18px 22px; border-left: 3px solid var(--gold); background: var(--paper); border-radius: 0 10px 10px 0; font: 400 19px/1.4 var(--serif); }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 400; }
.tbl thead th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tbl tbody th { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tbl tr:last-child > * { border-bottom: 0; }
.tbl tr.hl > * { background: #FBF1DC; }
.tbl i, .bala i[style*=background], .kar i { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(23, 13, 34, .25); }
.bala { display: grid; gap: 9px; }
.bala > div { display: grid; grid-template-columns: 92px 1fr 84px; align-items: center; gap: 12px; font-size: 14px; }
.bala span { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.bala span i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(23, 13, 34, .25); }
.bala .track { position: relative; height: 12px; border-radius: 99px; background: var(--lav); }
.bala .track b { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #4C9A66, #1F6F3F); transform-origin: left; transform: scaleX(0); transition: transform 1.1s cubic-bezier(.2, .8, .2, 1) .3s; }
.bala.in .track b { transform: none; }
.bala .weak .track b { background: linear-gradient(90deg, #E27A5F, #B42318); }
.bala .track i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--plum); }
.bala em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.bala .weak em { color: var(--red); font-weight: 600; }
.kar { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.kar li { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.kar b { color: var(--plum); min-width: 66px; }
.kar li:first-child, .kar li:last-child { background: linear-gradient(90deg, #FBF1DC, transparent); }

/* Phones: the chart keeps its 40%, pinned to the top of the screen. */
@media (max-width: 860px) {
  .stage { inset: 0 0 auto 0; width: 100%; height: 40svh; padding: 8px 16px 6px; flex-direction: row; gap: 14px; justify-content: center; }
  .stage::after { inset: auto 0 0 0; width: auto; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
  .brand { top: 10px; left: 14px; font-size: 0; } .brand img { width: 40px; height: 40px; }
  .board { width: auto; display: grid; grid-template-columns: auto; justify-items: center; }
  .chart { width: min(calc(40svh - 78px), 70vw); }
  .notes, .rail { display: none; }
  .cap { margin-top: 8px; font-size: 15px; min-height: 0; } .whose { font-size: 10.5px; margin-top: 2px; }
  .bar .timebars { display: none; }
  .mode { position: absolute; top: 14px; right: 14px; font-size: 9px; }
  .count { display: block; margin: 0; } .count > span:last-child { display: none; }
  .story { margin: 40svh 0 0; }
  .nav { position: static; flex-wrap: wrap; gap: 10px; padding: 10px 16px; justify-content: center; } .nav nav { display: none; }
  .nav .social { width: 100%; justify-content: center; } .nav .btn { width: 100%; }
  .step { min-height: 62svh; padding: 9vh 20px; gap: 18px; scroll-margin-top: 40svh; }
  .step.hero { min-height: 0; padding-top: 4vh; }
  .birth { grid-template-columns: 1fr; width: 100%; } .birth div { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .never li { font-size: 19px; }
}

/* Preview B reading desk: a quiet instrument, animated by the reading itself. */
.stage{--light-x:38%;--light-y:35%;padding:92px 3.3vw 66px;isolation:isolate;background:radial-gradient(ellipse at 10% 55%,#33232b 0,transparent 62%),linear-gradient(150deg,#1e1824,#100e16);}
.stage .glow{background:radial-gradient(ellipse at var(--light-x) var(--light-y),#d1aa7220,transparent 60%);animation:desk-light 18s ease-in-out infinite alternate;z-index:-1}
@keyframes desk-light{to{opacity:.45;transform:scale(1.15)}}
.stage .brand{top:12px;left:3.3vw;font-size:22px;gap:10px}
.stage .brand img{width:42px;height:42px}
.stage .board{width:min(100%,48vh,470px);text-align:left;z-index:1}
.stage .count{margin:0 0 12px;font-size:10px;letter-spacing:.16em;color:#91848e}
.stage .mode,.stage .mode.adv{padding:0;border:0;background:none;color:#c8b698;border-radius:0;font-size:9px;font-weight:500;letter-spacing:.16em}
.stage .count b{font-size:12px;font-weight:400;color:#f0dec0}
.stage-title{font:400 clamp(25px,2.5vw,38px)/1.1 var(--serif);letter-spacing:-.025em;margin:0 0 25px;color:#f5ece0}
.stage-title em{color:#d4b68c;font-weight:400}
.instrument{position:relative;background:radial-gradient(ellipse at 15% 0,#493b4038,transparent 60%),linear-gradient(135deg,#2e2631,#211b27 55%,#2a222d);border:1px solid #bca17a55;border-radius:3px;box-shadow:0 24px 55px -20px #000b,0 2px 3px #0005,inset 0 1px 0 #f8dfb126,inset 0 -1px 0 #0009;transition:transform .55s ease-out;transform-style:preserve-3d}
.instrument:before{content:"";position:absolute;inset:5px;border:1px solid #cfb48b18;pointer-events:none;z-index:2}
.instrument:after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.17;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.22' filter='url(%23grain)'/%3E%3C/svg%3E")}
.instrument-label{display:flex;justify-content:space-between;align-items:center;margin:0 18px;padding:15px 0 12px;border-bottom:1px solid #dec7a31c;font:400 8px/1 var(--sans);letter-spacing:.16em;text-transform:uppercase;color:#bfae9b}
.instrument-label span:last-child{color:#ecdbbf;letter-spacing:.08em}
.stage .chart{width:100%;padding:8px 10px 0}
.instrument-foot{display:flex;justify-content:center;align-items:center;gap:7px;min-height:34px;padding:4px 12px 12px;color:#aa9b9d;font:400 10px/1.2 var(--sans);letter-spacing:.025em}
.reading-signal{height:4px;width:4px;background:#d1b585;border-radius:50%;box-shadow:0 0 7px #d1b58555}
.reading-caption{margin-top:24px;padding-left:15px;border-left:1px solid #d6b78577;min-height:76px}
.reading-label{display:block;font:500 8px/1 var(--sans);letter-spacing:.2em;text-transform:uppercase;color:#b5a295;margin-bottom:9px}
.stage .cap{margin:0;color:#f0dfc5;font:400 clamp(18px,1.65vw,25px)/1.25 var(--serif);min-height:0;text-wrap:balance}
.stage .whose{font:400 9px/1.6 var(--sans);color:#a394a2;letter-spacing:.02em;margin-top:17px;text-align:center}
.stage .notes{display:none}
.stage .rail{right:13px;gap:6px}
.stage .rail i{width:2px;height:9px;background:#ffffff14}
.stage .rail i.on{background:#beaa8840}
.stage .rail i.on.adv{background:#beaa8870}
.stage .rail i.current{height:22px;background:#ddc59e;box-shadow:0 0 8px #d9b68333}
.stage::after{width:1px;inset:0 0 auto auto;height:calc(var(--chapter-progress,0)*100%);background:linear-gradient(#b9966233,#e5cdaa);transition:height .15s linear;opacity:.7}
.living-kd .ln{transition:none;stroke-width:.9;filter:drop-shadow(0 1px 0 #0009)}
.living-kd .sg{fill:#b9a9bd;font-size:12px}
.living-kd .sg.asc{fill:#dfc195}
.living-kd .hs{transition:fill .9s ease;stroke:none}
.living-kd .hs.hot{fill:#e8cf9e0e;stroke:none}
.living-kd .house-trace{fill:none;stroke:#f3d6a3;stroke-width:1.25;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;filter:drop-shadow(0 0 3px #e2ba7255);animation:house-ink 2s cubic-bezier(.3,.1,.2,1) forwards;pointer-events:none}
@keyframes house-ink{0%{stroke-dashoffset:1;opacity:1}75%{opacity:1}100%{stroke-dashoffset:0;opacity:.55}}
.living-kd .pl{cursor:pointer;outline:none}
.living-kd .pl .planet-surface{opacity:1;transition:opacity .5s}
.living-kd .pl .planet-shading{stroke:none;pointer-events:none}
.living-kd .pl .planet-rim{fill:none;stroke:#e7d6b966;stroke-width:.7;filter:drop-shadow(0 2px 2px #000a)}
.living-kd .pl .planet-abbr{fill:#fff4dc;stroke:#120b20;stroke-width:2.8;paint-order:stroke fill;font-size:9px;font-weight:650;pointer-events:none}
.living-kd .pl .ring{fill:none;stroke:#a1bc92;stroke-width:1.8;filter:none}
.living-kd .pl .ring.weak{stroke:#d8977d}
.living-kd .pl.f .planet-rim,.living-kd .pl.inspected .planet-rim,.living-kd .pl:focus-visible .planet-rim{stroke:#fff1c9;stroke-width:1.5;filter:drop-shadow(0 0 5px #e8d5a866)}
.living-kd.focus .pl.on:not(.f){opacity:.38}
.living-kd .lunar-node .disc{fill:#272134;stroke:#c4b0c9;stroke-width:1.2}
.living-kd .lunar-node .planet-abbr{fill:#dccde0}
.living-kd.transit .pl .planet-surface{opacity:.45}
.living-kd.transit .pl .planet-rim{stroke:#d4c7ad;stroke-width:1.3;stroke-dasharray:2 2}
.living-kd .aspl{fill:none;stroke-width:1.2;transition:stroke-dashoffset 1.5s cubic-bezier(.3,.1,.2,1)}
.living-kd .aspl.lord{stroke-dasharray:1;stroke-dashoffset:1}
.living-kd .aspl.lord.on{stroke-dashoffset:0}
.living-kd .aspd{filter:drop-shadow(0 0 4px #c3badb80)}
.chart-peek{position:absolute;bottom:9px;left:12px;right:12px;margin:0;min-height:24px;display:grid;place-items:center;color:#f2dec0;background:#251e2a;font:400 10px/1.4 var(--sans);text-align:center;z-index:3;pointer-events:none}
.chart-peek[hidden]{display:none}
.motion-controls{position:absolute;bottom:22px;left:3.3vw;right:3.3vw;display:flex;justify-content:space-between;gap:18px;z-index:6;border-top:1px solid #d3b78c1a;padding-top:10px}
.motion-controls button{border:0;background:transparent;color:#b4a6b4;padding:7px 0;font:400 10px var(--sans);letter-spacing:.04em;cursor:pointer;min-height:30px}
.motion-controls button:hover,.motion-controls button:focus-visible{color:#f4dfb9;outline-offset:5px}
.motion-paused *,.motion-paused *:before,.motion-paused *:after,.page-idle *,.page-idle *:before,.page-idle *:after{animation-play-state:paused!important}
.motion-paused .living-kd *{transition-duration:.01ms!important;transition-delay:0ms!important}
@media(min-width:861px) and (max-height:800px){
 .stage{padding-top:80px;padding-bottom:65px}.stage .board{width:min(100%,44vh,470px)}.stage-title{font-size:27px;margin-bottom:17px}.reading-caption{margin-top:17px;min-height:52px}.stage .cap{font-size:19px}.stage .whose{margin-top:10px}.instrument-label{padding:12px 0 10px}.instrument-foot{min-height:26px;padding-bottom:10px}.motion-controls{bottom:12px}
}
@media(max-width:860px){
 .stage{padding:39px 15px 32px;height:40svh;display:flex;justify-content:center}
 .stage .brand{left:15px;top:9px;font-size:0}.stage .brand img{width:40px;height:40px}
 .stage .board{width:100%;height:100%;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:1fr auto;column-gap:16px;align-items:center;justify-items:stretch;transform:none!important}
 .stage .count{position:absolute;top:-25px;right:0;margin:0;display:block}.stage .mode{position:static;font-size:8px;max-width:none}.stage .count>span:last-child{display:none}
 .stage-title{display:none}
 .instrument{grid-column:1;grid-row:1 / 3;width:min(100%,calc(40svh - 82px));justify-self:center;transform:none!important}
 .instrument-label{padding:9px 0 6px;margin:0 8px;font-size:6px;letter-spacing:.05em}.instrument-label span:first-child{display:none}.instrument-label span:last-child{margin:auto}
 .stage .chart{width:100%;padding:2px 3px 0}
 .instrument-foot{display:none}
 .reading-caption{grid-column:2;grid-row:1;margin:0;border-left:none;padding:0;min-height:0}
 .reading-label{font-size:7px;margin-bottom:10px}.stage .cap{font-size:clamp(16px,4.5vw,23px);line-height:1.25;margin:0;max-width:100%;text-wrap:initial}
 .stage .whose{grid-column:2;grid-row:2;font-size:8px;text-align:left;line-height:1.6;margin:8px 0 0;max-width:100%;padding-bottom:5px}
 .stage .rail,.notes,.timebars{display:none}
 .motion-controls{left:15px;right:15px;bottom:0;padding:0;border:0;gap:15px}.motion-controls button{font-size:9px;min-height:30px;padding:6px 0}
 .chart-peek{bottom:0;left:0;right:0;transform:translateY(100%);font-size:8px;padding:4px;min-height:0;border:1px solid #bca17a55;background:#241c29}
 .stage::after{inset:auto auto 0 0;height:1px;width:calc(var(--chapter-progress,0)*100%);transition:width .15s linear}
}
@media(max-width:860px) and (max-height:700px){.stage .cap{font-size:15px}.stage .whose{font-size:7px}.stage .board{column-gap:12px}.reading-label{margin-bottom:6px}.stage{padding-top:35px;padding-bottom:30px}}
@media(prefers-reduced-motion:reduce){.stage .instrument{transform:none!important;transition:none}.stage .glow{animation:none!important}.living-kd .pl,.living-kd .bdg{transition:none!important}.living-kd .house-trace{animation:none;stroke-dashoffset:0;opacity:.55}}
@media(min-width:861px) and (max-height:800px){.stage{padding-top:75px;padding-bottom:55px}.stage .board{width:min(100%,50vh,470px)}}
@media(min-width:861px){.bar .stage .board{width:min(100%,42vh,440px)}.bar .stage-title{display:none}.bar .reading-caption{min-height:0;margin-top:16px}.bar .stage .whose{margin-top:10px}}
/* Material study: ivory in a solid brass frame, with one consistent light source. */
.stage{background:radial-gradient(ellipse at 35% 34%,#40312d 0%,#251d23 45%,#15131a 100%);padding-top:86px}
.stage .glow{background:radial-gradient(ellipse at 20% 25%,#f4dfb313,transparent 60%);animation:none}
.stage .board{width:min(100%,46vh,462px)}
.stage-title{font-size:clamp(29px,2.7vw,40px);line-height:.98;letter-spacing:-.025em;margin-bottom:24px}
.stage-title br{display:none}
.stage-title em{color:#ddc5a0}
.instrument{--surface-light-x:28%;--surface-light-y:15%;background:radial-gradient(ellipse at var(--surface-light-x) var(--surface-light-y),#fffaf0c9 0%,transparent 65%),linear-gradient(125deg,#eadcc3,#e4d1b0 70%,#d5bd94);border:7px solid #98754c;border-top-color:#e2c397;border-left-color:#c6a274;border-right-color:#745235;border-bottom-color:#68482f;border-radius:5px;transform:perspective(1100px) rotateX(3.5deg) rotateY(-2.5deg);transform-style:preserve-3d;transition:none;box-shadow:1px 1px 0 #ffe2b8,-1px -1px 0 #705538,3px 5px 0 #4d3526,4px 8px 0 #8c663e,5px 10px 0 #37251c,9px 20px 16px -7px #0008,22px 42px 45px -15px #0009,inset 0 0 0 1px #f9eed5,inset 2px 3px 6px #644c3550,inset -2px -2px 3px #fff9e5a6}
.instrument:before{inset:7px;border:1px solid #9577524d;box-shadow:inset 1px 1px 0 #fff9e6a6,1px 1px 0 #fff9e6a6;z-index:0}
.instrument:after{opacity:.5;mix-blend-mode:multiply;border-radius:0}
.instrument-label{position:relative;color:#746047;border-color:#9b7e5340;font-size:8px;padding-top:16px;text-shadow:0 1px 0 #fff9e9}
.instrument-label span:last-child{color:#57432f}
.instrument-foot{position:relative;color:#77634c;text-shadow:0 1px 0 #fff9e9;font-size:9px;min-height:31px}
.reading-signal{background:#876744;box-shadow:none;width:3px;height:3px}
.plate-corners{position:absolute;inset:0;pointer-events:none;z-index:3}
.plate-corners i{position:absolute;width:5px;height:5px;border-radius:50%;background:linear-gradient(135deg,#f2dab3,#98774c 55%,#d7b88a);box-shadow:0 1px 1px #4e3529,0 -1px 0 #fff0c8}
.plate-corners i:nth-child(1){left:-5px;top:-5px}.plate-corners i:nth-child(2){right:-5px;top:-5px}.plate-corners i:nth-child(3){left:-5px;bottom:-5px}.plate-corners i:nth-child(4){right:-5px;bottom:-5px}
.living-kd{--k-line:#795b3f;--k-dim:#786352;--k-asp:#816274}
.living-kd .ln{stroke-width:1.3;filter:drop-shadow(.65px 1px 0 #fffaf1)}
.living-kd .sg{fill:#7a6553;font-family:var(--serif);font-size:15px;font-weight:400;text-shadow:0 1px #fff9eb}
.living-kd .sg.asc{fill:#96713e;font-family:var(--sans);font-size:8px;letter-spacing:.12em}
.living-kd .hs.hot{fill:#b5853020}
.living-kd .house-trace{stroke:#9a5c27;stroke-width:1.8;filter:drop-shadow(0 1px 0 #fff9e6)}
.living-kd .pl{filter:drop-shadow(2px 3px 1.8px #49372566)}
.living-kd .pl .planet-rim{stroke:#f7dcb099;stroke-width:.65;filter:none}
.living-kd .pl.f .planet-rim,.living-kd .pl.inspected .planet-rim,.living-kd .pl:focus-visible .planet-rim{stroke:#6e442c;stroke-width:1.6;filter:drop-shadow(0 0 2px #fff9d9)}
.living-kd.focus .pl.on:not(.f){opacity:.5}
.living-kd .pl .ring{stroke:#536c43;stroke-width:2}
.living-kd .pl .ring.weak{stroke:#a25a41}
.living-kd .aspl{stroke:#816274;stroke-width:1.4}
.living-kd .aspl.lord{stroke:#966b36}
.living-kd .aspd{fill:#816274;filter:none}
.living-kd .bdg rect{fill:#f6ead0;stroke:#b39a75;stroke-width:.6}
.living-kd .bdg text{fill:#61482d}
.living-kd .hv{fill:#76552f;text-shadow:0 1px #fffae9}
.chart-peek{display:none!important}
.reading-caption{position:relative;display:flex;align-items:center;gap:18px;border-left:0;padding-left:0;margin-top:30px;min-height:76px}
.reading-label{color:#b8a384;font-size:8px;letter-spacing:.18em}
.caption-copy{min-width:0;flex:1}
.stage .cap{font-size:clamp(18px,1.6vw,23px);color:#eee0c8}
.planet-lens{width:58px;height:58px;flex:none;border-radius:50%;background-size:cover;background-position:center;box-shadow:inset -14px -8px 16px #05050be8,inset 2px 2px 5px #fff2,7px 8px 14px #0006;position:relative;border:1px solid #dcc49d33}
.planet-lens:after{content:"";position:absolute;inset:0;border-radius:inherit;background:radial-gradient(circle at 30% 24%,#fff4,transparent 45%,#0008);pointer-events:none}
.planet-lens.node{background:radial-gradient(circle at 30% 30%,#a08f9e,#393044 55%,#18141f);border:1px dashed #d3c5d1}
.planet-lens[hidden],.inspection-close[hidden]{display:none}
.inspection-close{align-self:flex-start;border:1px solid #d8ba8c44;border-radius:50%;background:#ffffff08;color:#ddc8ac;font-size:17px;line-height:1;width:26px;height:26px;cursor:pointer;flex:none}
.inspection-close:hover,.inspection-close:focus-visible{background:#ffffff18;outline-offset:3px}
.stage .whose{font-size:9px;margin-top:14px;color:#b2a297}
.motion-controls{border-color:#dec1931a}
@media(min-width:861px) and (max-height:800px){.stage{padding-top:75px;padding-bottom:55px}.stage .board{width:min(100%,48vh,460px)}.stage-title{font-size:29px;margin-bottom:20px}.reading-caption{margin-top:23px;min-height:56px}.stage .cap{font-size:18px}.planet-lens{width:44px;height:44px}.reading-caption{gap:12px}}
@media(min-width:861px){.bar .stage .board{width:min(100%,40vh,420px)}.bar .stage-title{display:none}}
@media(max-width:860px){
 .stage{padding-top:39px}.stage .board{width:100%;height:100%}.stage-title{display:none}
 .instrument{border-width:4px;transform:none!important;width:min(100%,calc(40svh - 85px));box-shadow:1px 2px 0 #715235,2px 4px 0 #4b3526,7px 11px 14px -3px #0008,inset 1px 1px 3px #5a422f55}
 .instrument-label{font-size:6px;padding:9px 0 6px}.instrument:before{inset:4px}
 .plate-corners i{width:3px;height:3px}.plate-corners i:nth-child(1){left:-3px;top:-3px}.plate-corners i:nth-child(2){right:-3px;top:-3px}.plate-corners i:nth-child(3){left:-3px;bottom:-3px}.plate-corners i:nth-child(4){right:-3px;bottom:-3px}
 .reading-caption{margin:0;min-height:0;display:block}.stage .cap{font-size:clamp(16px,4.5vw,23px)}.reading-label{font-size:7px}
 .planet-lens{width:38px;height:38px;margin-bottom:10px}.inspection-close{position:absolute;top:0;right:0;width:28px;height:28px}
 .stage .whose{font-size:8px;margin-top:8px}.reading-caption.inspecting .cap{font-size:15px}
}
@media(max-width:860px) and (max-height:700px){.stage{padding-top:35px}.stage .cap{font-size:15px}.stage .whose{font-size:7px}.planet-lens{width:30px;height:30px;margin-bottom:6px}.reading-caption.inspecting .cap{font-size:13px}}
@media(prefers-reduced-motion:reduce){.stage .instrument{transform:none!important;transition:none}}
.motion-paused .instrument{transform:none!important}

/* ---------- motion: life layered over the brass-plate chart. Everything here stops under "Pause motion" and reduced motion ---------- */

/* Stage atmosphere */
.starfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .85; }
.board { position: relative; }
.wheel { position: absolute; z-index: -1; pointer-events: none; opacity: .8; -webkit-mask-image: linear-gradient(#000 62%, transparent 90%); mask-image: linear-gradient(#000 62%, transparent 90%); }
.wheel-spin { animation: wheel-turn 420s linear infinite; transform-origin: 0 0; }
@keyframes wheel-turn { to { transform: rotate(-360deg); } }
.w-ring { fill: none; stroke: #d9bc8a; stroke-width: .8; opacity: .38; }
.w-ring.thin { stroke-width: .5; opacity: .2; stroke-dasharray: 2 5; }
.w-tick { stroke: #d9bc8a; stroke-width: .7; opacity: .3; }
.w-tick.big { stroke-width: 1.3; opacity: .7; }
.w-sign { font: 400 17px var(--serif); fill: #d9bc8a; opacity: .5; text-anchor: middle; }
.w-body { transition: opacity 1.2s; }
.w-body circle { fill: #f6e3b4; }
.w-body.moon circle { fill: #f3effa; }
.w-body .halo { opacity: .28; transform-box: fill-box; transform-origin: center; animation: halo 3.2s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.7); opacity: .08; } }

/* Live sky line */
.livesky { position: absolute; top: 62px; left: 3.3vw; z-index: 3; display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 99px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(217, 188, 138, .28); font: 500 10.5px/1.2 var(--sans); letter-spacing: .04em; color: #d8cbbb; backdrop-filter: blur(6px); max-width: calc(100% - 6.6vw); }
.livesky i { width: 7px; height: 7px; border-radius: 50%; background: #7fd39a; box-shadow: 0 0 0 0 #7fd39a99; animation: live-ping 2s infinite; flex: none; }
@keyframes live-ping { to { box-shadow: 0 0 0 9px #7fd39a00; } }
.livesky b { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #f0dec0; font-size: 9.5px; white-space: nowrap; }
.livesky .ls-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.livesky time { font-variant-numeric: tabular-nums; color: #9f9389; }

/* Planets: bigger, lit, and never still */
.living-kd .pl { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c) 70%, transparent)) drop-shadow(2px 4px 2.5px #3a2a1a80); }
.living-kd .pl .planet-abbr { font-size: 7.6px; }
.living-kd .pl .corona { fill: #f6b84a; opacity: .5; transform-box: fill-box; transform-origin: center; animation: corona 3.6s ease-in-out infinite; }
@keyframes corona { 0%, 100% { transform: scale(1.12); opacity: .5; } 50% { transform: scale(1.5); opacity: .12; } }
.living-kd .pl .saturn-ring { fill: none; stroke: #e9d6a6; stroke-width: 1.5; opacity: .9; }
.living-kd .pl.lunar-node .disc { animation: node-breathe 5s ease-in-out infinite; }
@keyframes node-breathe { 50% { opacity: .72; } }
.living-kd .pl.f, .living-kd .pl.inspected { filter: drop-shadow(0 0 9px var(--c)) drop-shadow(0 0 3px #fff8e0) drop-shadow(2px 4px 2.5px #3a2a1a80); }

/* Comet tails and landing rings */
.kd-fx .comet { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .5s; filter: blur(1.6px); }
.kd-fx .comet.on { opacity: .55; transition: none; }
.kd-fx .landing { fill: none; stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: landing 1s ease-out forwards; }
.kd-fx .landing.big { animation-duration: 1.4s; stroke-width: 2.2; }
@keyframes landing { from { transform: scale(.7); opacity: .9; } to { transform: scale(3); opacity: 0; } }

/* Lines carry a slow travelling glint; highlighted houses breathe */
.living-kd.drawn .ln { animation: line-glint 7s ease-in-out infinite; animation-delay: calc(var(--line-order) * .9s + 4s); }
@keyframes line-glint { 0%, 78%, 100% { filter: none; } 88% { filter: drop-shadow(0 0 3.5px #fff3cf) brightness(1.5); } }
.living-kd .hs.hot { animation: house-breathe 3.4s ease-in-out infinite; }
@keyframes house-breathe { 50% { fill-opacity: .45; } }
.living-kd .asp-pulse { fill: #6a4a8c; opacity: 0; animation: pulse-in .6s forwards; filter: drop-shadow(0 0 3px #b79be0); }
.living-kd .asp-pulse.lord { fill: #a66a1e; filter: drop-shadow(0 0 3px #f0c877); }
@keyframes pulse-in { to { opacity: 1; } }
.living-kd .hv { transition: opacity .6s; font-variant-numeric: tabular-nums; }

/* A band of light crosses the plate each time the chapter changes */
.instrument { position: relative; }
.instrument::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(105deg, transparent 38%, rgba(255, 250, 230, .5) 50%, transparent 62%); background-size: 260% 100%; background-position: 130% 0; opacity: 0; }
.instrument.sweep::after { animation: sweep-light 1.1s ease-out; }
@keyframes sweep-light { 0% { background-position: 130% 0; opacity: 1; } 100% { background-position: -40% 0; opacity: 1; } }

/* The reading side responds too */
.story [data-p] { cursor: pointer; transition: background .25s, box-shadow .25s, transform .25s; }
.seats li.lit, .seats li:hover { background: #FBF1DC; box-shadow: 0 0 0 1px var(--gold), 0 6px 16px -8px rgba(128, 85, 31, .5); transform: translateY(-2px); }
.tbl tr.lit > *, .tbl tr[data-p]:hover > * { background: #FBF1DC; }
.bala > div.lit, .kar li.lit { background: linear-gradient(90deg, #FBF1DC, transparent); box-shadow: -3px 0 0 var(--gold); }
.hint-link { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.hint-link::before { content: "☞ "; color: var(--gold-ink); }
.lightcatch { position: relative; }
.lightcatch::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(201, 167, 108, .16), transparent 70%); }
.lightcatch:hover::before { opacity: 1; }
.step h1 em, .step h2 em { background: linear-gradient(100deg, var(--gold-ink) 40%, #c99a4e 50%, var(--gold-ink) 60%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ink-sheen 9s ease-in-out infinite; }
@keyframes ink-sheen { 0%, 60% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Birth details: date is enough for one line; time and place switch every step to the visitor's own chart */
.dform { align-items: end; }
.dform .fld { flex: 1 1 150px; display: grid; gap: 5px; font: 600 11.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); position: relative; min-width: 0; }
.dform .fld em { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .8; }
.dform .fld input { width: 100%; flex: none; text-transform: none; letter-spacing: 0; }
.dform .placebox { flex: 2 1 220px; }
#b-places { position: absolute; z-index: 6; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 40px -18px rgba(23, 13, 34, .5); }
#b-places li { padding: 9px 12px; border-radius: 6px; font: 500 14.5px var(--sans); letter-spacing: 0; text-transform: none; color: var(--plum); cursor: pointer; }
#b-places li:hover, #b-places li:focus { background: var(--lav); outline: none; }
.formnote { font-size: 14px; color: var(--muted); max-width: 58ch; }
.formnote b { color: var(--plum); }
.formnote.calc { margin-top: 10px; }
.formnote.calc a { color: var(--plum); font-weight: 600; }
.mine-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px 16px; border-radius: 10px; background: linear-gradient(100deg, #FBF1DC, #F3E2BC); border: 1px solid var(--gold); font-size: 14.5px; animation: rise .5s both; }
.mine-bar[hidden] { display: none; }
.mine-bar .btn { min-height: 38px; padding: 0 14px; font-size: 13.5px; }

@media (max-width: 860px) { .wheel, .livesky time, .livesky b { display: none; } .stage .count { visibility: hidden; } .livesky { top: 8px; left: auto; right: 62px; padding: 4px 9px; font-size: 9.5px; max-width: 70%; } }
@media (prefers-reduced-motion: reduce) { .wheel-spin, .living-kd .ln, .living-kd .hs.hot, .step h1 em, .step h2 em, .w-body .halo, .livesky i, .living-kd .corona { animation: none !important; } }

/* ---------- final layout: a 30 / 70 split, a larger chart that fills its panel, deeper chapters, and more movement ---------- */

/* ---------- the chart panel: mulberry. The plate keeps its ivory and brass. ---------- */
.stage { background: radial-gradient(ellipse at 32% 26%, var(--mulberry-a) 0%, var(--mulberry-b) 48%, var(--mulberry-c) 100%); }
.stage .glow { background: radial-gradient(ellipse at 24% 20%, #F3ECFB26, transparent 62%); }
.stage .brand, .stage .cap { color: var(--ivory); }
.stage .count, .stage .mode, .stage .mode.adv { color: #E6DCF2; }
.stage .count b { color: #F3DDAE; }
.reading-label, .pos-h { color: #DCD0EC !important; }
.stage .whose { color: #D5C8E6; }
.motion-controls { border-color: #ffffff26; }
.motion-controls button { color: #E0D5EE; }
.livesky { background: var(--plum)40; border-color: #EBD3A066; color: #F1E9F8; }
.livesky time { color: #D5C8E6; }
.pos { border-color: #ffffff24 !important; }
.pos-c { background: #ffffff17 !important; border-color: #ffffff1f !important; }
.pos-c b { color: var(--ivory) !important; } .pos-c span { color: #DCD0EC !important; }
.starfield { opacity: .6; }
.chart-peek { color: #F1E9F8; }

/* redacted birth details */
.birth.redacted dd span { display: inline-block; padding: 1px 12px; border-radius: 4px; background: var(--plum); color: var(--plum); font: 600 12px var(--sans); letter-spacing: .22em; text-transform: uppercase; position: relative; user-select: none; }
.birth.redacted dd span::after { content: "Redacted"; position: absolute; inset: 0; display: grid; place-items: center; color: #D8C9EA; }
.privacy { font-size: 14.5px; color: var(--muted); padding-left: 16px; border-left: 2px solid var(--gold); }
.privacy b { color: var(--plum); }

/* ---------- planets: drawn spheres, sharp at any size ---------- */
.living-kd { shape-rendering: geometricPrecision; text-rendering: geometricPrecision; }
.living-kd .pl, .living-kd .pl.f, .living-kd .pl.inspected { filter: none !important; }
.living-kd .pl .orb-halo { stroke: none; opacity: .5; transform-box: fill-box; transform-origin: center; transition: opacity .4s, transform .4s; }
.living-kd .pl .disc { stroke: rgba(46, 28, 10, .5); stroke-width: .55; stroke-dasharray: none; animation: none !important; }
.living-kd .pl .orb-band { fill: none; stroke-width: 1.5; opacity: .3; }
.living-kd .pl .orb-shine { fill: #fff; opacity: .62; stroke: none; }
.living-kd .pl .planet-rim { fill: none; stroke: rgba(255, 249, 228, .8); stroke-width: .45; filter: none !important; }
.living-kd .pl .planet-abbr { stroke: none; paint-order: normal; font: 700 8.4px var(--sans); letter-spacing: .01em; }
.living-kd .pl .corona { stroke: none; }
.living-kd .pl .saturn-ring { stroke: #cfd6ff; stroke-width: 1.3; opacity: .95; }
.living-kd .pl.f .orb-halo, .living-kd .pl.inspected .orb-halo, .living-kd .pl:hover .orb-halo { opacity: 1; transform: scale(1.3); }
.living-kd .pl.f .planet-rim, .living-kd .pl.inspected .planet-rim, .living-kd .pl:focus-visible .planet-rim { stroke: #fffdf2; stroke-width: 1.3; }
.living-kd.transit .pl .disc { opacity: .5; }
.living-kd.transit .pl .orb-halo { stroke: none; opacity: .18; }
.living-kd.transit .pl .orb-shine, .living-kd.transit .pl .orb-band { opacity: .2; stroke-dasharray: none; }
.living-kd.transit .pl .planet-rim { stroke: #7a5a34; stroke-width: 1; stroke-dasharray: 2.4 2; }

/* ---------- reading progress ---------- */
.readbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; pointer-events: none; }
.readbar i { display: block; height: 100%; background: linear-gradient(90deg, #765587, #C9A76C, #EBD3A0); transform-origin: left; transform: scaleX(0); }

@media (min-width: 861px) {
  /* ---------- 30 / 70 ---------- */
  .stage { width: 35vw; min-width: 372px; padding: 92px 14px 54px; justify-content: flex-start; }
  .story { margin-left: max(35vw, 372px); }
  .stage .brand { left: 18px; top: 12px; }
  .livesky { left: 18px; top: 58px; max-width: calc(100% - 36px); }
  .stage-title { display: none; }
  .stage .board, .bar .stage .board { width: min(100%, 45vh); }
  .stage .count { margin: 0 4px 10px; }
  .instrument { border-width: 6px; }
  .instrument-label { margin: 0 12px; padding: 11px 0 8px; }
  .stage .chart { padding: 6px 6px 0; }
  .instrument-foot { min-height: 24px; padding: 2px 10px 8px; }
  .reading-caption { margin-top: 16px; min-height: 54px; padding: 0 4px; }
  .stage .cap { font-size: clamp(18px, 1.5vw, 22px); }
  .stage .whose { margin-top: 10px; }
  .motion-controls { left: 18px; right: 18px; bottom: 12px; }
  .stage .rail { display: none; }

  /* the chart itself: larger numbers, larger planets, house names */
  .living-kd .sg { font-size: 19px; }
  .living-kd .sg.asc { font-size: 9.5px; }
  .living-kd .hv { font-size: 34px; }
  .living-kd.hvsmall .hv { font-size: 12.5px; font-weight: 700; }
  .living-kd .bdg text { font-size: 9px; }
  .living-kd .bdg rect { height: 15px; y: -7.5px; }

  /* positions panel under the chart */
  .pos { margin-top: 14px; padding: 12px 4px 0; border-top: 1px solid #d3b78c26; }
  .pos-h { font: 600 9.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #a89a8c; margin-bottom: 8px; }
  .pos-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .pos-c { display: grid; grid-template-columns: auto 1fr; column-gap: 7px; align-items: center; padding: 6px 8px; border-radius: 7px; background: #ffffff0a; border: 1px solid #ffffff0d; cursor: pointer; transition: background .25s, border-color .25s, transform .25s; }
  .pos-c .pd { grid-row: span 2; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
  .pos-c b { font: 600 12px/1.2 var(--sans); color: #f1e4cf; }
  .pos-c span { font: 400 10.5px/1.2 var(--sans); color: #a89a8c; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .pos-c:hover, .pos-c.lit { background: #ebd3a01f; border-color: #ebd3a066; transform: translateY(-1px); }
  .bar .pos { display: none; }
  .bar .timebars { margin: 12px 4px 0; }

  /* ---------- the 70%: wider, with a detail layer ---------- */
  .step { max-width: 1120px; padding: 13vh 4.2vw 13vh 4.6vw; }
  .step > * { position: relative; z-index: 1; }
  .step h1 { font-size: clamp(52px, 6.2vw, 104px); }
  .step h2 { font-size: clamp(38px, 4.3vw, 70px); }
  .step > p { max-width: 62ch; }
  .nav { padding: 12px 4.2vw; }
}
@media (min-width: 861px) and (max-height: 860px) { .pos-g { grid-template-columns: repeat(3, 1fr); gap: 4px; } .pos-c { padding: 4px 7px; } .instrument-foot { display: none; } .stage { padding-top: 96px; } }
@media (min-width: 861px) and (max-height: 760px) { .pos { display: none; } .stage .board, .bar .stage .board { width: min(100%, 58vh); } }
@media (max-width: 860px) { .pos, .house-names { display: none; } }

.living-kd .hm { font: 600 7.4px var(--sans); letter-spacing: .16em; text-transform: uppercase; fill: #9b8566; opacity: .62; text-anchor: middle; dominant-baseline: central; pointer-events: none; transition: opacity .5s; }
.living-kd.hvmode .hm { opacity: .3; }

.step { position: relative; overflow-x: clip; }
.story { overflow-x: clip; }

/* ghost chapter numerals drifting behind the copy */
.step[data-n]::before { content: attr(data-n); position: absolute; right: 2vw; top: 6vh; z-index: 0; font: 300 clamp(150px, 20vw, 300px)/.8 var(--serif); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px rgba(128, 85, 31, .16); pointer-events: none; }
@supports (animation-timeline: view()) {
  .step[data-n]::before { animation: ghost-drift linear both; animation-timeline: view(); }
  .orb { animation: orb-drift linear both; animation-timeline: view(); }
  @keyframes ghost-drift { from { transform: translateY(90px); } to { transform: translateY(-90px); } }
  @keyframes orb-drift { from { transform: translateY(140px) rotate(-14deg); } to { transform: translateY(-140px) rotate(14deg); } }
}

/* planet photographs beside the chapters */
.step > .bala, .step > .tbl, .step > .kar { max-width: 640px; }
.step > .orb { position: absolute; z-index: 0; right: -190px; bottom: 9vh; width: clamp(240px, 26vw, 400px); aspect-ratio: 1; border-radius: 50%; background-size: cover; background-position: center; opacity: .9; pointer-events: none;
  box-shadow: inset -46px -30px 80px #170d22, inset 8px 8px 30px #fff3, 0 40px 90px -30px rgba(42, 24, 50, .55); }
.step > .orb::after { content: ""; position: absolute; inset: -9%; border-radius: 50%; border: 1px solid rgba(201, 167, 108, .35); }
@media (max-width: 1180px) { .step > .orb { opacity: .28; right: -150px; } }
@media (max-width: 860px) { .step > .orb, .step[data-n]::before { display: none; } }

/* ---------- hero ---------- */
.step.hero::after { content: ""; position: absolute; z-index: 0; right: -14%; top: -18%; width: 62%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 40% 40%, rgba(184, 162, 210, .5), rgba(201, 167, 108, .22) 45%, transparent 70%); filter: blur(30px); animation: aurora 14s ease-in-out infinite alternate; }
@keyframes aurora { to { transform: translate(-9%, 12%) scale(1.18); } }
.ticker { margin: 14px -4.6vw 0; overflow: hidden; border-block: 1px solid var(--line); padding: 13px 0; font: 500 12.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ame);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker div { display: flex; width: max-content; animation: tick 46s linear infinite; }
.ticker span { padding: 0 22px; white-space: nowrap; } .ticker span::after { content: "✦"; margin-left: 44px; color: var(--gold); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- the interlude between basics and advanced ---------- */
.interlude { position: relative; overflow: hidden; padding: clamp(80px, 16vh, 170px) 4.6vw; display: grid; gap: 26px; background: linear-gradient(180deg, #170D22, #2B1540); color: var(--ivory); isolation: isolate; }
.il-sky { position: absolute; inset: 0; z-index: -1; background: url("/static/img/cosmic-landscape.webp") center 70% / cover; opacity: .55; -webkit-mask-image: linear-gradient(transparent 5%, #000 70%); mask-image: linear-gradient(transparent 5%, #000 70%); animation: sky-pan 40s ease-in-out infinite alternate; }
@keyframes sky-pan { from { transform: scale(1.08) translateX(-2%); } to { transform: scale(1.16) translateX(2%); } }
.il-big { font: 400 clamp(38px, 5.4vw, 88px)/1.02 var(--serif); letter-spacing: -.02em; max-width: 16ch; text-wrap: balance; }
.il-big em { color: var(--gold-hi); }
.il-row { display: flex; flex-wrap: wrap; gap: 14px 44px; margin-top: 12px; }
.il-row span { display: grid; font: 500 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #cdbfd8; }
.il-row b { font: 400 clamp(44px, 5vw, 76px)/1 var(--serif); letter-spacing: -.02em; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.il-cue { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #cdbfd8; }
.il-cue::after { content: "↓"; display: inline-block; margin-left: 10px; animation: bob 1.6s ease-in-out infinite; }

/* ---------- detail layer ---------- */
.detail { display: grid; gap: 16px; margin-top: 10px; max-width: 880px; opacity: 0; transform: translateY(26px); transition: opacity .9s, transform .9s cubic-bezier(.2, .8, .2, 1); }
.detail.in { opacity: 1; transform: none; }
.dgrid.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dcard, .dstat { padding: 22px 24px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 24px 50px -40px rgba(23, 13, 34, .6); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s; }
.dcard:hover, .dstat:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 34px 60px -36px rgba(128, 85, 31, .55); }
.dcard h3 { font-size: 24px; margin-bottom: 10px; }
.dcard p { font-size: 14.5px; color: var(--muted); }
.dk { font: 600 10.5px var(--sans) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink) !important; margin-bottom: 6px; }
.dnote { margin-top: 14px; font-size: 13px !important; }
.dstat b { display: block; font: 400 clamp(40px, 4vw, 60px)/1 var(--serif); color: var(--plum); letter-spacing: -.02em; }
.dstat span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.ticks { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.ticks li { padding: 4px 0 4px 22px; position: relative; } .ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--gold-ink); }
.pn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.pd { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(23, 13, 34, .25); }

.dtable { overflow-x: auto; margin: 0 -8px; }
.dtable table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dtable th, .dtable td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dtable thead th { font: 600 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dtable tbody tr { opacity: 0; transform: translateX(-10px); transition: opacity .5s, transform .5s, background .25s; }
.detail.in .dtable tbody tr { opacity: 1; transform: none; }
.dtable tbody tr:nth-child(n) { transition-delay: calc(var(--r, 0) * 1ms); }
.dtable tbody tr:nth-child(1) { --r: 60 } .dtable tbody tr:nth-child(2) { --r: 110 } .dtable tbody tr:nth-child(3) { --r: 160 } .dtable tbody tr:nth-child(4) { --r: 210 } .dtable tbody tr:nth-child(5) { --r: 260 } .dtable tbody tr:nth-child(6) { --r: 310 }
.dtable tbody tr:nth-child(7) { --r: 360 } .dtable tbody tr:nth-child(8) { --r: 410 } .dtable tbody tr:nth-child(9) { --r: 460 } .dtable tbody tr:nth-child(10) { --r: 510 } .dtable tbody tr:nth-child(11) { --r: 560 } .dtable tbody tr:nth-child(12) { --r: 610 }
.dtable tr.hl td { background: #FBF1DC; font-weight: 600; }
.dtable tr[data-p]:hover td, .dtable tr.lit td { background: var(--lav); }
.dtable tr:last-child td { border-bottom: 0; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.fstep { padding: 20px 20px 22px; border-right: 1px solid var(--line); position: relative; } .fstep:last-child { border: 0; }
.fstep b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--plum); color: var(--gold-hi); font: 600 12px var(--sans); margin-bottom: 12px; }
.fstep h3 { font-size: 21px; margin-bottom: 6px; } .fstep p { font-size: 13.5px; color: var(--muted); }
.fstep::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--ame), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform .7s ease-out; }
.detail.in .fstep::after { transform: none; }
.detail.in .fstep:nth-child(2)::after { transition-delay: .5s; } .detail.in .fstep:nth-child(3)::after { transition-delay: 1s; } .detail.in .fstep:nth-child(4)::after { transition-delay: 1.5s; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 3px; }
.stack { display: grid; grid-template-columns: 92px 1fr 52px; align-items: center; gap: 12px; padding: 5px 6px; border-radius: 8px; font-size: 14px; transition: background .25s; cursor: pointer; }
.stack.lit, .stack:hover { background: #FBF1DC; }
.sbar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; gap: 1px; transform-origin: left; transform: scaleX(0); transition: transform 1.2s cubic-bezier(.2, .8, .2, 1) .2s; }
.detail.in .sbar { transform: none; }
.stack em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.vargas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.varga { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); display: grid; gap: 1px; transition: transform .3s, border-color .3s, background .3s; }
.varga:hover { transform: translateY(-3px); border-color: var(--gold); }
.varga b { font: 400 22px var(--serif); } .varga span { font-size: 12px; font-weight: 600; } .varga em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.varga.live { background: linear-gradient(160deg, #FBF1DC, #F3E2BC); border-color: var(--gold); }

.savbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 190px; align-items: end; }
.sv { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; gap: 5px; font-size: 12px; color: var(--muted); }
.sv b { font: 400 17px var(--serif); color: var(--plum); align-self: end; }
.sv i { width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #B8A2D2, #765587); align-self: end; transform-origin: bottom; transform: scaleY(0); transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.sv { grid-template-rows: 1fr auto; } .sv b { grid-row: 1; align-self: end; margin-bottom: -2px; }
.sv { position: relative; } .sv i { position: absolute; bottom: 20px; left: 0; max-height: calc(100% - 46px); } .sv b { position: relative; z-index: 1; opacity: 0; transition: opacity .5s .8s; align-self: start; }
.detail.in .sv i { transform: none; } .detail.in .sv b { opacity: 1; }
.sv.hi i { background: linear-gradient(180deg, #EBD3A0, #C9A76C); } .sv.lo i { background: linear-gradient(180deg, #E8B4A2, #C0694E); }
.sv:nth-child(n) i { transition-delay: calc(var(--i, 0) * 60ms); }

.next { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.next li { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.next li:last-child { border: 0; } .next b { font: 400 21px var(--serif); } .next span { color: var(--muted); font-variant-numeric: tabular-nums; }
.next em { font-style: normal; font: 600 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.next li.now b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #3fae6a; animation: live-ping 2s infinite; }

/* ---------- typed exchange ---------- */
.convo { max-width: 620px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 30px 70px -44px rgba(23, 13, 34, .7); overflow: hidden; }
.step .convo-top { max-width: none; margin: 0; }
.convo-top { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-bottom: 1px solid var(--line); font: 600 12px var(--sans); letter-spacing: .08em; }
.convo-top i { width: 8px; height: 8px; border-radius: 50%; background: #3fae6a; animation: live-ping 2s infinite; }
.convo-top span { margin-left: auto; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; font-size: 10px; color: var(--muted); }
.convo-body { display: grid; align-content: start; gap: 10px; padding: 18px; min-height: 226px; }
.convo-body p { max-width: 86%; padding: 11px 15px; border-radius: 12px; font-size: 15px; line-height: 1.45; animation: rise .35s both; }
.cq { justify-self: end; background: var(--plum); color: var(--ivory); border-bottom-right-radius: 3px; min-height: 44px; }
.cq:empty::after, .ca:empty::after { content: "▍"; opacity: .5; }
.ca { background: var(--lav); border-bottom-left-radius: 3px; font-family: var(--serif); font-size: 17px !important; }
.ca.thinking { display: flex; gap: 5px; padding: 15px; } .ca.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--ame); animation: think 1s ease-in-out infinite; } .ca.thinking i:nth-child(2) { animation-delay: .15s; } .ca.thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes think { 50% { transform: translateY(-5px); opacity: .4; } }
.cw { font-size: 12.5px !important; color: var(--muted); background: none; border: 1px dashed var(--gold); } .cw b { color: var(--plum); margin-right: 4px; }

@media (max-width: 860px) {
  .dgrid.three, .flow { grid-template-columns: 1fr; } .fstep { border-right: 0; border-bottom: 1px solid var(--line); }
  .vargas { grid-template-columns: repeat(2, 1fr); } .savbars { gap: 4px; height: 150px; } .ticker { margin-inline: -20px; } .interlude { padding-inline: 20px; }
  .stack { grid-template-columns: 78px 1fr 44px; } .next li { grid-template-columns: 84px 1fr; } .next em { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .ticker div, .il-sky, .step.hero::after { animation: none !important; } .detail, .dtable tbody tr { opacity: 1; transform: none; } .sbar, .sv i { transform: none; } .sv b { opacity: 1; } }
.motion-paused .ticker div, .motion-paused .il-sky { animation-play-state: paused; }

/* ---------- Hindi (/hi): Devanagari has no italic, and letter-spacing pulls its joined letters apart ---------- */
html:lang(hi) em { font-style: normal; }
html:lang(hi) body * { letter-spacing: normal !important; }

/* ---------- stories (only when a consented one is published) ---------- */
.stories { display: grid; gap: 16px; margin-top: 18px; }
.member-story { margin: 0; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.member-story blockquote { margin: 0 0 12px; font: 400 21px/1.4 var(--serif); }
.member-story blockquote::before { content: "“"; } .member-story blockquote::after { content: "”"; }
.member-story figcaption { font-size: 14px; color: var(--muted); }
.member-story figcaption b { color: var(--plum); }
.member-story figcaption span { display: block; margin-top: 4px; }
