*{box-sizing:border-box}
[hidden]:not([hidden=until-found i]){display:none!important}
img{max-width:100%}
/* ============ TOKENS: light is the base ============ */
:root{
  --paper:#E8E7E0;
  --surface:#F3F2EC;
  --surface-2:#DEDDD4;
  --ink:#171C28;
  --ink-2:#3D4457;
  --ink-3:#6B7186;
  --rule:#C9C7BC;
  --rule-strong:#A6A497;
  --gold:#8F6F1C;
  --gold-bright:#B58C24;
  --gold-wash:rgba(181,140,36,.14);
  --madder:#8E3E32;
  --madder-wash:rgba(142,62,50,.10);
  --indigo:#2C4272;
  --shadow:rgba(23,28,40,.09);
  /* layer markers — verdigris, indigo-violet and lac, all traditional pigments */
  --verdigris:#2C6D60;
  --verdigris-wash:rgba(44,109,96,.13);
  --violet:#4E3E93;
  --violet-wash:rgba(78,62,147,.13);
  --lac:#9B2F5F;
  --lac-wash:rgba(155,47,95,.12);
  --porcelain:#16617F;
  --mark-fg:#F3F2EC;

  /* brand logo — measured off the supplied artwork, which is drawn light-ground */
  --logo-ink:#201F1D;
  --logo-rule:#201F1D;
  --logo-gold:#AE8443;
  --logo-soft:#C3A372;
  --logo-soft2:#D0B791;
  --logo-desc:#6E6C67;

  --f-display:"Fraunces",Georgia,"Times New Roman",serif;
  --f-body:"Public Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --f-mono:"JetBrains Mono",ui-monospace,"SFMono-Regular",Menlo,monospace;
  --f-deva:"Tiro Devanagari Sanskrit","Noto Serif Devanagari","Kohinoor Devanagari","Devanagari Sangam MN","Nirmala UI","Noto Sans Devanagari",serif;

  --col:min(68ch,100%);
  --wide:min(1120px,100%);
  --pad:clamp(1.1rem,4vw,2rem);
  --navh:52px;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --paper:#12151E;
    --surface:#1A1F2B;
    --surface-2:#232937;
    --ink:#E7E6DE;
    --ink-2:#B0B6C6;
    --ink-3:#848A9E;
    --rule:#2E3542;
    --rule-strong:#464E60;
    --gold:#D9AE49;
    --gold-bright:#EFC868;
    --gold-wash:rgba(217,174,73,.15);
    --madder:#D4796A;
    --madder-wash:rgba(212,121,106,.14);
    --indigo:#8AA2E0;
    --shadow:rgba(0,0,0,.4);
    --verdigris:#63C3B0;
    --verdigris-wash:rgba(99,195,176,.15);
    --violet:#A294EC;
    --violet-wash:rgba(162,148,236,.15);
    --lac:#E486AE;
    --lac-wash:rgba(228,134,174,.14);
    --porcelain:#5FB6DA;
    --mark-fg:#12151E;
    --logo-ink:#E7E6DE;
    --logo-rule:#7C8391;
    --logo-gold:#D9AE49;
    --logo-soft:#A8843A;
    --logo-soft2:#95773A;
    --logo-desc:#949AAB;
  }
}
:root[data-theme="dark"]{
  --paper:#12151E;
  --surface:#1A1F2B;
  --surface-2:#232937;
  --ink:#E7E6DE;
  --ink-2:#B0B6C6;
  --ink-3:#848A9E;
  --rule:#2E3542;
  --rule-strong:#464E60;
  --gold:#D9AE49;
  --gold-bright:#EFC868;
  --gold-wash:rgba(217,174,73,.15);
  --madder:#D4796A;
  --madder-wash:rgba(212,121,106,.14);
--indigo:#8AA2E0;
  --shadow:rgba(0,0,0,.4);
  --verdigris:#63C3B0;
  --verdigris-wash:rgba(99,195,176,.15);
  --violet:#A294EC;
  --violet-wash:rgba(162,148,236,.15);
  --lac:#E486AE;
  --lac-wash:rgba(228,134,174,.14);
  --porcelain:#5FB6DA;
  --mark-fg:#12151E;
  --logo-ink:#E7E6DE;
  --logo-rule:#7C8391;
  --logo-gold:#D9AE49;
  --logo-soft:#A8843A;
  --logo-soft2:#95773A;
  --logo-desc:#949AAB;
}

*{box-sizing:border-box}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--f-body);
  font-size:clamp(.93rem,.9rem + .16vw,.99rem);
  line-height:1.62;
  font-weight:380;
  -webkit-font-smoothing:antialiased;
  overflow-x:clip;
}

/* ============ PAGE SKELETON ============ */
.wrap{display:flex;flex-direction:column;align-items:center;padding:0 var(--pad) 6rem}
.view{width:100%;display:flex;flex-direction:column;align-items:center}
.view > section:first-of-type{margin-top:2rem}
.view > section:first-of-type h2{margin-top:0}
/* a view opening on a divider needs far less air above it than a mid-page one */
.view > .sep:first-child{margin-top:1.4rem}
.col{width:var(--col);display:flex;flex-direction:column;gap:1.15rem}

/* ============ APP SHELL: NAV, HOME, JUMP STRIPS ============ */
/* overflow-x must be CLIP, not hidden — hidden makes body a scroll container
   and silently kills position:sticky on the nav */
.topnav{
  position:sticky;top:0;z-index:40;width:100%;
  background:var(--paper);border-bottom:1px solid var(--rule);
  display:flex;align-items:center;gap:clamp(.6rem,2vw,1.4rem);
  padding:.4rem var(--pad);min-height:var(--navh);
}
.nav-home{
  flex:none;background:none;border:none;cursor:pointer;padding:.2rem .1rem;color:var(--ink);
  font-family:var(--f-deva);font-size:1.15rem;line-height:1.5;letter-spacing:0;
  display:flex;align-items:center;gap:.5rem;
}
.nav-home:hover{color:var(--gold)}
.nav-mark{width:23px;height:23px;flex:none;display:block}
.nav-mark .tri{stroke:var(--gold)}
@media(max-width:520px){
  /* the mark alone carries the brand once the pill row needs the width */
  .nav-home .deva{display:none}
  .nav-mark{width:26px;height:26px}
}
.nav-pills{
  display:flex;gap:.25rem;overflow-x:auto;scrollbar-width:none;
  -webkit-overflow-scrolling:touch;margin-left:auto;
}
.nav-pills::-webkit-scrollbar{display:none}
.pill{
  flex:none;font-family:var(--f-mono);font-size:.68rem;letter-spacing:.09em;text-transform:uppercase;
  background:none;border:1px solid transparent;color:var(--ink-3);
  padding:.42rem .62rem;border-radius:2px;cursor:pointer;white-space:nowrap;
}
.pill:hover{color:var(--ink)}
.pill[aria-current="page"]{color:var(--gold);border-color:var(--gold);background:var(--gold-wash)}

/* Nine questions is the target shape — three rows of three, echoing the Lo Shu
   square in the hero above. Six are built today; the rest hold their place as
   "coming soon" cards so the grid reads as 3×3 from the day the seventh ships,
   rather than reflowing the whole page each time a tool is added. */
.home-grid{display:grid;grid-template-columns:1fr;gap:.85rem;width:100%}
@media(min-width:620px){.home-grid{grid-template-columns:1fr 1fr}}
@media(min-width:960px){.home-grid{grid-template-columns:1fr 1fr 1fr}}
.hcard{
  text-align:left;font:inherit;color:inherit;cursor:pointer;
  background:var(--surface);border:1px solid var(--rule);border-radius:3px;
  padding:clamp(1.1rem,2.2vw,1.5rem);
  display:grid;grid-template-columns:auto 1fr;gap:.95rem;
  transition:border-color .15s,background .15s;
}
.hcard:hover{border-color:var(--gold);background:var(--gold-wash)}
.hcard .hn{
  font-family:var(--f-display);font-size:clamp(1.7rem,1.35rem + 1.1vw,2.3rem);font-weight:600;
  color:var(--gold);line-height:.92;width:1.35em;text-align:center;flex:none;
}
/* the hcard grid stretches both columns to the row's full height (equal-height
   cards in every row), and hbody is a flex column so .need can sit pinned to
   the card's bottom edge via margin-top:auto rather than trailing the text
   wherever it happens to end */
.hcard .hbody{display:flex;flex-direction:column;min-width:0}
.hcard .ht{font-family:var(--f-display);font-size:1.14rem;font-weight:600;line-height:1.25;letter-spacing:-.008em}
.hcard .hp{font-size:.87rem;line-height:1.58;color:var(--ink-2);margin-top:.4rem}
.hcard .need{
  font-family:var(--f-mono);font-size:.6rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--ink-3);margin-top:auto;padding-top:.7rem;
}
.hcard.wide{background:transparent;border-style:dashed;grid-column:1 / -1}
.hcard.wide:hover{background:var(--gold-wash)}
.hcard.wide .hn{font-family:var(--f-deva);font-size:1.9rem;line-height:1.1}

/* the three not-yet-built slots — same grid, same rhythm, deliberately quieter:
   no hover state and no pointer, since there is nowhere to go yet */
.hcard.soon{
  cursor:default;background:transparent;border-style:dashed;border-color:var(--rule-strong);
}
.hcard.soon:hover{border-color:var(--rule-strong);background:transparent}
.hcard.soon .hn{color:var(--ink-3)}
.hcard.soon .ht{color:var(--ink-2)}
.hcard.soon .hp{color:var(--ink-3)}
.hcard.soon .need{color:var(--gold);opacity:.85}

.jump{display:flex;flex-wrap:wrap;gap:.3rem;align-items:center;margin-top:.35rem}
.jump-lab{
  font-family:var(--f-mono);font-size:.6rem;letter-spacing:.13em;text-transform:uppercase;
  color:var(--ink-3);margin-right:.35rem;
}
.jump button{
  font-family:var(--f-mono);font-size:.65rem;letter-spacing:.04em;cursor:pointer;
  background:var(--surface);border:1px solid var(--rule);color:var(--ink-2);
  padding:.3rem .55rem;border-radius:2px;
}
.jump button:hover{border-color:var(--gold);color:var(--gold);background:var(--gold-wash)}
.anchor{display:block;height:0;scroll-margin-top:calc(var(--navh) + 14px)}

/* the home screen aligns its prose to the card grid's left edge rather than
   centring it, so the heading and the cards share one axis */
.home-intro{width:100%;max-width:66ch;align-self:flex-start}

/* the shared chart bar — one set of inputs, reused by three of the four tools.
   Tinted a step darker than a content panel so it reads as persistent chrome
   sitting above the page rather than as the first section of it. */
.chartbox{gap:0;background:var(--surface-2)}
.cb-head{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}
.cb-lab{
  font-family:var(--f-mono);font-size:.72rem;letter-spacing:.15em;text-transform:uppercase;color:var(--gold);
}
/* this line is the whole chart in one row, and on a collapsed bar it is the
   only thing telling you what the tool is reading from — size it to be read,
   not to be skimmed past */
.cb-sum{
  font-family:var(--f-mono);font-size:.95rem;color:var(--ink-2);line-height:1.55;
  min-width:0;overflow-wrap:anywhere;
}
.cb-sum b{color:var(--ink);font-weight:700}
@media(max-width:640px){.cb-sum{font-size:.86rem}}
.cb-toggle{
  margin-left:auto;flex:none;cursor:pointer;vertical-align:middle;line-height:1.4;
  font-family:var(--f-mono);font-size:.63rem;letter-spacing:.11em;text-transform:uppercase;
  background:none;border:1px solid var(--rule-strong);color:var(--ink-2);
  padding:.34rem .6rem;border-radius:2px;
}
.cb-toggle:hover{border-color:var(--gold);color:var(--gold)}
.cb-body{display:flex;flex-direction:column;gap:1.4rem;padding-top:1.15rem}
.cb-body[hidden]{display:none}
#chartbar{margin-top:1.6rem}
/* the full hero belongs to the home screen; the nav carries the name elsewhere */
body[data-view]:not([data-view="home"]) .hero{display:none}
.plate{width:var(--wide);display:flex;flex-direction:column;gap:1.15rem;align-items:center}

h1,h2,h3,h4{font-family:var(--f-display);font-weight:600;text-wrap:balance;margin:0;line-height:1.14;letter-spacing:-.012em}
h2{font-size:clamp(1.7rem,1.35rem + 1.5vw,2.5rem);margin-top:1.2rem}
h3{font-size:clamp(1.2rem,1.08rem + .55vw,1.5rem);margin-top:.8rem}
h4{font-size:1.03rem;font-weight:700;font-family:var(--f-body);letter-spacing:.005em}
p{margin:0}
a{color:var(--indigo)}
strong{font-weight:640;color:var(--ink)}
em{font-style:italic}
code,.mono{font-family:var(--f-mono);font-size:.885em;font-variant-numeric:tabular-nums}

.eyebrow{
  font-family:var(--f-mono);font-size:.7rem;letter-spacing:.19em;text-transform:uppercase;
  color:var(--gold);font-weight:500;
}
.lede{font-size:.94em;color:var(--ink-2);line-height:1.5}
.muted{color:var(--ink-3);font-size:.93em}

/* section divider that carries the 3x3 motif */
.sep{width:var(--col);display:flex;align-items:center;gap:1rem;margin:3.2rem 0 .4rem;color:var(--rule-strong)}
.sep::before,.sep::after{content:"";flex:1;height:1px;background:var(--rule)}
.sep .glyph{display:grid;grid-template-columns:repeat(3,4px);gap:2px}
.sep .glyph i{width:4px;height:4px;background:var(--rule-strong);border-radius:.5px}
.sep .glyph i.on{background:var(--gold)}

/* ============ HERO ============ */
.hero{
  width:100%;display:flex;flex-direction:column;align-items:center;
  padding:clamp(1.7rem,3.4vw,2.6rem) var(--pad) clamp(1.4rem,2.8vw,2.1rem);
  border-bottom:1px solid var(--rule);
  background:
    radial-gradient(80% 55% at 72% 42%, var(--gold-wash) 0%, transparent 68%),
    var(--paper);
}
.hero-inner{width:var(--wide);display:grid;grid-template-columns:1fr;gap:clamp(2rem,5vw,3.5rem);align-items:center}
@media(min-width:900px){
  .hero-inner{grid-template-columns:1fr auto;gap:clamp(2rem,5vw,4rem);align-items:center}
  /* Pull the magic-square plate up (top-aligned instead of row-centred)
     and a touch further right, into the hero's own side padding — per the
     artifact comment asking for exactly this on the hero row. (The auto
     grid column already sits flush against the text column's edge, so
     the extra gap above alone doesn't move it — this negative margin is
     what actually shifts it.) */
  .hero-grid{align-self:start;margin-top:-.5rem;margin-right:clamp(-1.6rem,-2.2vw,-.6rem)}
}
/* ---- the brand lockup, drawn as outlines so it needs no webfont and stays
   crisp at any size. Every element is painted through a --logo-* token, which
   is what lets one artwork serve both themes: the light values are the brand's
   own, the dark set keeps each element's contrast relationship rather than
   inverting it. ---- */
.hero-logo{margin:0;line-height:0}
/* Placed after the base rule above so it wins the cascade: nudges the
   lockup (mark + wordmark) a touch further left within its own column,
   on the two-column desktop layout only — the other half of the same
   artifact-comment request handled by .hero-grid above. */
@media(min-width:900px){ .hero-logo{margin-left:clamp(-1.3rem,-1.6vw,-.5rem)} }
.hero-logo .lockup{display:block;width:100%;max-width:600px;height:auto}
.lockup .lk-box{stroke:var(--logo-rule)}
.lockup .lk-ink{stroke:var(--logo-ink)}
.lockup .lk-gold{stroke:var(--logo-gold)}
.lockup .lk-soft{stroke:var(--logo-soft)}
.lockup .lk-soft2{stroke:var(--logo-soft2)}
.lockup .lk-word{fill:var(--logo-ink)}
.lockup .lk-sub{fill:var(--logo-desc)}
/* Below ~640px the whole lockup is scaled down by the viewport, and the
   descriptor — the smallest thing in the artwork — falls under 7px and turns
   to mush. Dropping it there leaves the mark and wordmark carrying the
   identity, which is what a small lockup should do anyway. */
@media(max-width:640px){
  .lockup .lk-sub,.lockup .lk-soft{display:none}
}
.hero-gloss{
  font-family:var(--f-display);font-size:clamp(.84rem,.78rem + .3vw,.98rem);
  font-weight:300;font-style:italic;color:var(--ink-2);line-height:1.42;
}
.hero-gloss .deva{
  font-family:var(--f-deva);font-style:normal;font-weight:400;
  font-size:1.32em;         /* Devanagari sits optically smaller than Latin at the same px */
  letter-spacing:0;         /* negative tracking breaks matras and conjuncts — never apply it here */
  color:var(--ink);
}
.hero-copy{display:flex;flex-direction:column;gap:.85rem}
.hero-meta{
  display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.3rem;
}
.tag{
  font-family:var(--f-mono);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;
  border:1px solid var(--rule-strong);color:var(--ink-2);padding:.3rem .6rem;border-radius:2px;
}

/* ============ THE MAGIC SQUARE PLATE ============ */
.square-plate{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(2px,.5vw,4px);width:min(250px,100%);margin-inline:auto;aspect-ratio:1}
.sq-cell{
  display:grid;place-items:center;border-radius:2px;
  font-family:var(--f-display);font-weight:600;
  font-size:clamp(1rem,3.2vw,1.4rem);
  background:var(--surface);border:1px solid var(--rule-strong);
  color:var(--ink);
  font-variant-numeric:lining-nums;
}
.sq-cell.centre{background:var(--gold-wash);border-color:var(--gold);color:var(--gold)}
.sq-sum{
  display:grid;place-items:center;
  font-family:var(--f-mono);font-size:clamp(.62rem,1.9vw,.78rem);
  color:var(--gold);letter-spacing:.06em;font-weight:500;
}
.sq-blank{}

/* ---- the eight lines, shown one at a time on the hero square ----
   A gold ray runs through the three cells of a line, its 15 lights up, and the caption names it.
   It cycles by itself; hovering, tapping a dot or a 15 holds a line. */
.loshu-wrap{position:relative;width:min(250px,100%);margin-inline:auto;display:flex;flex-direction:column;align-items:center;gap:.6rem}
.loshu-wrap .square-plate{width:100%}
.loshu-ray{position:absolute;left:0;top:0;width:100%;aspect-ratio:1;pointer-events:none;overflow:visible}
.loshu-ray line{stroke:var(--gold);stroke-width:.06;stroke-linecap:round;opacity:.9;stroke-dasharray:1;stroke-dashoffset:0;filter:drop-shadow(0 0 .06px var(--gold))}
.loshu-ray line.draw{animation:loshuDraw .7s ease-out both}
@keyframes loshuDraw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
.sq-cell{transition:background .35s,border-color .35s,color .35s,transform .35s}
.sq-cell.on{background:var(--gold-wash);border-color:var(--gold);color:var(--gold);transform:scale(1.04)}
.sq-sum[data-ln]{cursor:pointer;transition:color .3s,opacity .3s;opacity:.55}
.sq-sum[data-ln].on{opacity:1;color:var(--gold-bright);font-weight:700}
.loshu-cap{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.12rem;min-height:7.8rem;width:100%}
.loshu-cap .lc-kind{font-family:var(--f-mono);font-size:.62rem;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-3)}
.loshu-cap .lc-name{font-family:var(--f-display);font-size:1.12rem;font-weight:600;color:var(--gold);line-height:1.25;text-wrap:balance}
.loshu-cap .lc-en{color:var(--ink);font-weight:500}
.loshu-cap .lc-arrow{font-size:.8rem;color:var(--ink-2)}
.loshu-cap .lc-what{font-size:.78rem;color:var(--ink-3);line-height:1.4}
.loshu-cap.fade{animation:loshuFade .5s ease-out both}
@keyframes loshuFade{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
.loshu-dots{display:flex;gap:.1rem}
.loshu-dots button{width:22px;height:22px;padding:0;border:0;background:none;cursor:pointer;display:grid;place-items:center}
.loshu-dots button::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--rule-strong);transition:background .3s,transform .3s}
.loshu-dots button[aria-pressed="true"]::before{background:var(--gold);transform:scale(1.35)}
.loshu-dots button:focus-visible{outline:2px solid var(--gold);outline-offset:1px;border-radius:50%}

/* ============ GENERIC CARD ============ */
.card{
  background:var(--surface);border:1px solid var(--rule);border-radius:3px;
  padding:clamp(1.05rem,2.4vw,1.5rem);display:flex;flex-direction:column;gap:.7rem;
}
.card.gold{border-left:2px solid var(--gold);background:var(--gold-wash)}
.card.warn{border-left:2px solid var(--madder);background:var(--madder-wash)}
.card h4{margin:0}

.note{
  border:1px solid var(--rule);border-left:2px solid var(--indigo);
  background:var(--surface);border-radius:3px;
  padding:clamp(1rem,2.2vw,1.35rem);display:flex;flex-direction:column;gap:.6rem;
}
.note .eyebrow{color:var(--indigo)}

/* ============ TABLES ============ */
.tbl-scroll{width:100%;overflow-x:auto;border:1px solid var(--rule);border-radius:3px;background:var(--surface)}
table{border-collapse:collapse;width:100%;font-size:.9rem;min-width:520px}
th,td{text-align:left;padding:.62rem .8rem;border-bottom:1px solid var(--rule);vertical-align:top;line-height:1.48}
thead th{
  font-family:var(--f-mono);font-size:.66rem;letter-spacing:.13em;text-transform:uppercase;
  color:var(--ink-3);font-weight:500;background:var(--surface-2);white-space:nowrap;
  /* no position:sticky here — on a border-collapse table Chromium mispositions a
     sticky <th>, letting the first body row render ABOVE the header. The header
     bought little (these tables scroll horizontally, not vertically) and cost a
     visibly broken first row, which on some tables is the most important one. */
}
tbody tr:last-child td{border-bottom:none}
td.num{
  font-family:var(--f-display);font-size:1.35rem;font-weight:600;color:var(--gold);
  width:1%;padding-right:.2rem;line-height:1.2;
}
.tbl-scroll table.compact{font-size:.85rem;min-width:440px}
.nowrap{white-space:nowrap}

/* ============ LINE CARDS (the eight lines) ============ */
.lines{display:grid;grid-template-columns:1fr;gap:.85rem;width:100%}
@media(min-width:660px){.lines{grid-template-columns:1fr 1fr}}
.line-card{
  background:var(--surface);border:1px solid var(--rule);border-radius:3px;
  padding:1.05rem 1.15rem;display:grid;grid-template-columns:auto 1fr;gap:.95rem;align-items:start;
}
.line-card.raja{border-color:var(--gold);background:var(--gold-wash)}
.minigrid{display:grid;grid-template-columns:repeat(3,14px);grid-template-rows:repeat(3,14px);gap:2px;flex:none;margin-top:.15rem}
.minigrid span{
  border:1px solid var(--rule-strong);border-radius:1px;background:transparent;
  font-family:var(--f-mono);font-size:8px;display:grid;place-items:center;color:transparent;
}
.minigrid span.on{background:var(--gold);border-color:var(--gold)}
.line-body{display:flex;flex-direction:column;gap:.4rem;min-width:0}
.line-name{font-family:var(--f-display);font-size:1.06rem;font-weight:600;line-height:1.25}
.line-cells{font-family:var(--f-mono);font-size:.7rem;letter-spacing:.14em;color:var(--gold);text-transform:uppercase}
.line-body p{font-size:.9rem;line-height:1.55;color:var(--ink-2)}
.line-body p b{color:var(--ink);font-weight:620}
.empty-read{color:var(--madder)!important}

/* ============ RANK LIST ============ */
.rank{display:flex;flex-direction:column;gap:.5rem;width:100%;counter-reset:r}
.rank-item{
  display:grid;grid-template-columns:auto auto 1fr;gap:.9rem;align-items:center;
  padding:.72rem .95rem;background:var(--surface);border:1px solid var(--rule);border-radius:3px;
}
.rank-item .pos{
  font-family:var(--f-mono);font-size:.72rem;color:var(--ink-3);width:1.4rem;letter-spacing:.05em;
}
.rank-item.top{border-color:var(--gold);background:var(--gold-wash)}
.rank-item.top .pos{color:var(--gold)}
.rank-txt{font-size:.9rem;line-height:1.5;color:var(--ink-2)}
.rank-txt b{color:var(--ink);font-weight:640}

/* ============ CONNECTIVITY DIAGRAM ============ */
.conn{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(4px,1vw,7px);width:min(330px,100%);margin-inline:auto}
.conn-cell{
  aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.1rem;
  border:1px solid var(--rule-strong);border-radius:2px;background:var(--surface);
}
.conn-cell .n{font-family:var(--f-display);font-size:clamp(1.25rem,4.5vw,1.7rem);font-weight:600;line-height:1}
.conn-cell .c{font-family:var(--f-mono);font-size:.6rem;letter-spacing:.08em;color:var(--ink-3);text-transform:uppercase}
.conn-cell.t4{background:var(--gold);border-color:var(--gold)}
.conn-cell.t4 .n{color:var(--paper)}
.conn-cell.t4 .c{color:var(--paper);opacity:.85}
.conn-cell.t3{background:var(--gold-wash);border-color:var(--gold)}
.conn-cell.t3 .n{color:var(--gold)}
.conn-cell.t3 .c{color:var(--gold)}

/* ============ CHALDEAN KEY ============ */
.chal{display:grid;grid-template-columns:repeat(auto-fit,minmax(122px,1fr));gap:.5rem;width:100%}
.chal-row{
  background:var(--surface);border:1px solid var(--rule);border-radius:3px;
  padding:.7rem .85rem;display:flex;align-items:baseline;gap:.7rem;
}
.chal-row .v{font-family:var(--f-display);font-size:1.5rem;font-weight:600;color:var(--gold);line-height:1}
.chal-row .l{font-family:var(--f-mono);font-size:.92rem;letter-spacing:.14em;color:var(--ink)}
.chal-row.nine{border-style:dashed;border-color:var(--rule-strong);background:transparent}
.chal-row.nine .v{color:var(--ink-3)}
.chal-row.nine .l{color:var(--ink-3);font-size:.7rem;letter-spacing:.06em;font-style:normal}

/* ============ PROTOCOL LIST ============ */
.protocols{display:flex;flex-direction:column;gap:.6rem;width:100%}
.proto{
  background:var(--surface);border:1px solid var(--rule);border-radius:3px;
  padding:.95rem 1.1rem;display:grid;grid-template-columns:auto 1fr;gap:.9rem;align-items:start;
}
.proto .k{
  font-family:var(--f-mono);font-size:.7rem;color:var(--gold);letter-spacing:.06em;
  padding-top:.25rem;width:1.7rem;flex:none;
}
.proto-body{display:flex;flex-direction:column;gap:.32rem;min-width:0}
.proto-q{font-weight:640;font-size:.96rem;line-height:1.4}
.proto-a{font-size:.9rem;line-height:1.58;color:var(--ink-2)}
.proto-a b{color:var(--ink);font-weight:620}

/* ============ ADMIN DASHBOARD ============ */
#view-dashboard{--col:min(1040px,100%)}
.dash{max-width:1040px;margin:0 auto;padding:1.4rem 16px 3rem}
.dash h2{margin:.2rem 0 .35rem}
.dash-bar{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:center;margin:.9rem 0 1.1rem}
.dash-seg{display:inline-flex;border:1px solid var(--rule-strong);border-radius:2px;overflow:hidden}
.dash-seg button{font:inherit;font-family:var(--f-mono);font-size:.7rem;letter-spacing:.06em;padding:.4rem .75rem;background:transparent;color:var(--ink-2);border:0;border-right:1px solid var(--rule-strong);cursor:pointer}
.dash-seg button:last-child{border-right:0}
.dash-seg button[aria-pressed="true"]{background:var(--gold-wash);color:var(--gold);font-weight:700}
.dash-banner{border:1px dashed var(--gold);background:var(--gold-wash);padding:.55rem .8rem;font-size:.84rem;line-height:1.5;color:var(--ink-2);margin-bottom:1rem}
.dash-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.55rem;margin-bottom:1.3rem}
.dash-tile{background:var(--paper);border:1px solid var(--rule);border-radius:2px;padding:.65rem .8rem}
.dash-tile .k{font-family:var(--f-mono);font-size:.6rem;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3)}
.dash-tile .v{font-family:var(--f-display);font-size:1.6rem;font-weight:600;color:var(--gold);line-height:1.2}
.dash-tile .s{font-size:.72rem;color:var(--ink-3)}
.dash-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr));gap:1.1rem 1.4rem;margin-bottom:1.3rem}
.dash-card{border:1px solid var(--rule);background:var(--paper);padding:.9rem 1rem;border-radius:2px;min-width:0}
.dash-card h3{margin:0 0 .6rem;font-size:1.02rem}
.dash-card .tbl-scroll{margin:0}
.dash table.compact td,.dash table.compact th{padding:.35rem .5rem}
.dash td.num,.dash th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.dash .bar{display:block;height:6px;background:var(--gold);opacity:.75;border-radius:1px;min-width:2px}
.dash .barcell{width:34%}
.dash svg.chart{width:100%;height:auto;display:block}
.dash .muted{color:var(--ink-3);font-size:.8rem}
.fun-row{display:grid;grid-template-columns:150px 1fr 76px;gap:.6rem;align-items:center;margin:.3rem 0;font-size:.84rem}
.fun-row .bar{height:14px}
@media (max-width:560px){.fun-row{grid-template-columns:110px 1fr 60px}}

.wblock.gate-teaser{border-style:dashed;border-color:var(--gold);background:var(--gold-wash)}
.gate-teaser-row{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:center;margin-top:.6rem}
.gate-teaser-msg{font-size:.85rem;color:var(--ink-2)}
/* ============ THE NINE-CELL GRID ============ */
.g3{display:grid;grid-template-columns:repeat(3,clamp(56px,15vw,70px));grid-template-rows:repeat(3,clamp(56px,15vw,70px));gap:3px;flex:none}
.g3 .cell{
  border:1px solid var(--rule-strong);border-radius:2px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  font-family:var(--f-display);font-weight:600;font-size:clamp(.95rem,3vw,1.15rem);
  background:var(--surface-2);color:var(--ink);letter-spacing:.02em;line-height:1;
}
.g3 .cell.filled{background:var(--gold-wash);border-color:var(--gold);color:var(--gold)}
.g3 .cell.blank{background:transparent;border-style:dashed;color:var(--ink-3)}
.g3 .cell.blank .dig{font-family:var(--f-mono);font-size:.72rem}
.g3 .cell .dig{line-height:1}
/* a cell you were not born with, but which Mulank, Bhagyank or the name number
   activates: filled gold like the rest, dashed border to keep the innate layer
   distinguishable from the derived one */
.g3 .cell.blank.active{background:var(--gold-wash);border-color:var(--gold);color:var(--gold)}

/* layer markers: M = Mulank, B = Bhagyank, N = name number */
.marks{display:flex;gap:2px;height:13px}
.mk{
  width:13px;height:13px;border-radius:2px;display:grid;place-items:center;
  font-family:var(--f-mono);font-size:8px;font-weight:700;line-height:1;
  color:var(--mark-fg);letter-spacing:0;
}
.mk.m{background:var(--verdigris)}
.mk.b{background:var(--violet)}
.mk.n{background:var(--lac)}
.mk.k{background:var(--porcelain)}

.legend{display:flex;flex-wrap:wrap;gap:.45rem .9rem;margin-top:.7rem;max-width:230px}
.kline{font-family:var(--f-mono);font-size:.7rem;color:var(--ink-3);line-height:1.55;letter-spacing:.02em}
.kline b{color:var(--porcelain);font-weight:700}
.lg{display:flex;align-items:center;gap:.35rem;font-family:var(--f-mono);font-size:.62rem;letter-spacing:.04em;color:var(--ink-3);white-space:nowrap}
.lg .sw{width:11px;height:11px;border-radius:2px;flex:none}
.lg .sw.m{background:var(--verdigris)}
.lg .sw.b{background:var(--violet)}
.lg .sw.n{background:var(--lac)}
.lg .sw.k{background:var(--porcelain)}
.lg .sw.g{background:var(--gold-wash);border:1px solid var(--gold)}
.lg .sw.d{background:var(--gold-wash);border:1px dashed var(--gold)}
.lg .sw.x{border:1px dashed var(--rule-strong)}

.badge{
  font-family:var(--f-mono);font-size:.68rem;letter-spacing:.07em;padding:.28rem .55rem;border-radius:2px;
  border:1px solid var(--rule-strong);color:var(--ink-2);white-space:nowrap;
}
.badge.good{border-color:var(--gold);color:var(--gold);background:var(--gold-wash)}
.badge.bad{border-color:var(--madder);color:var(--madder);background:var(--madder-wash)}

/* ============ CALCULATOR ============ */
.calc{
  width:100%;background:var(--surface);border:1px solid var(--rule-strong);border-radius:3px;
  padding:clamp(1.2rem,3vw,2rem);display:flex;flex-direction:column;gap:1.4rem;
}
#view-brand .calc-in{grid-template-columns:1fr 1fr !important;align-items:start;gap:.9rem 1.2rem}
#view-brand .calc-in .field label{display:block;min-height:1.6em}
#view-brand .calc-in .field input,#view-brand .calc-in .field select{height:2.9rem;box-sizing:border-box;width:100%}
@media(max-width:640px){#view-brand .calc-in{grid-template-columns:1fr !important}}
.calc-in{display:grid;grid-template-columns:1fr;gap:.9rem}
@media(min-width:640px){.calc-in{grid-template-columns:1fr 1fr}}
@media(min-width:940px){.calc-in{grid-template-columns:1fr .85fr 1.4fr}}
.field{display:flex;flex-direction:column;gap:.35rem}
.calc-in{align-items:start}
.calc-in > .field > label{min-height:1.6em;display:block}
.calc-in > .field > input,.calc-in > .field > select{height:2.9rem;box-sizing:border-box}
.field label{font-family:var(--f-mono);font-size:.68rem;letter-spacing:.13em;text-transform:uppercase;color:var(--ink-3)}
.field input{
  font-family:var(--f-mono);font-size:.98rem;padding:.68rem .8rem;
  background:var(--paper);color:var(--ink);
  border:1px solid var(--rule-strong);border-radius:2px;width:100%;
}
.field select{
  font-family:var(--f-mono);font-size:.98rem;padding:.68rem .8rem;
  background:var(--paper);color:var(--ink);
  border:1px solid var(--rule-strong);border-radius:2px;width:100%;
}
.field input:focus,.field select:focus{outline:2px solid var(--gold);outline-offset:1px;border-color:var(--gold)}
.field input::placeholder{color:var(--ink-3);opacity:.62}
.field .hint{font-size:.74rem;color:var(--ink-3);font-family:var(--f-body)}

.name-in{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.9rem}
.working{
  display:flex;flex-wrap:wrap;gap:.4rem;align-items:baseline;
  border-top:1px solid var(--rule);padding-top:.9rem;
}
.working .wlabel{font-family:var(--f-mono);font-size:.66rem;letter-spacing:.13em;text-transform:uppercase;color:var(--ink-3)}
.working .wname{font-family:var(--f-display);font-size:1.15rem;font-weight:600;color:var(--gold)}
.working .whint{font-size:.82rem;color:var(--ink-3)}

.calc-out{display:grid;grid-template-columns:1fr;gap:1.4rem}
@media(min-width:780px){.calc-out{grid-template-columns:auto 1fr;gap:1.8rem;align-items:start}}
.calc-panel{display:flex;flex-direction:column;gap:.75rem;min-width:0}
.stat-row{display:flex;flex-wrap:wrap;gap:.5rem}
.stat{
  background:var(--paper);border:1px solid var(--rule);border-radius:2px;
  padding:.5rem .75rem;display:flex;flex-direction:column;gap:.1rem;min-width:88px;
}
.stat .k{font-family:var(--f-mono);font-size:.62rem;letter-spacing:.11em;text-transform:uppercase;color:var(--ink-3)}
.stat .v{font-family:var(--f-display);font-size:1.35rem;font-weight:600;color:var(--gold);line-height:1.15}
.stat .v small{font-size:.55em;font-weight:400;color:var(--ink-2);font-family:var(--f-body);display:block;letter-spacing:.01em}

.readout{display:flex;flex-direction:column;gap:.42rem;font-size:.88rem;line-height:1.55}
.readout .r{display:flex;gap:.55rem;align-items:baseline}
.readout .r .dot{width:6px;height:6px;border-radius:50%;flex:none;margin-top:.45rem;background:var(--rule-strong)}
.readout .r.good .dot{background:var(--gold)}
.readout .r.bad .dot{background:var(--madder)}
.readout .r.good span{color:var(--ink)}
.readout .r.bad span{color:var(--madder)}
.readout .r span{color:var(--ink-2)}
.readout .r b{color:var(--ink);font-weight:640}

.letters{display:flex;flex-wrap:wrap;gap:3px;align-items:flex-end}
.lt{
  display:flex;flex-direction:column;align-items:center;gap:1px;
  border:1px solid var(--rule);border-radius:2px;padding:.25rem .3rem;min-width:24px;background:var(--paper);
}
.lt .a{font-family:var(--f-mono);font-size:.78rem;color:var(--ink);font-weight:500}
.lt .b{font-family:var(--f-mono);font-size:.62rem;color:var(--gold)}
.lt.gap{border:none;background:none;min-width:8px}
.part-sum{font-family:var(--f-mono);font-size:.78rem;color:var(--ink-3);padding-left:.15rem}

.compound-box{
  border:1px solid var(--rule);border-left:2px solid var(--gold);background:var(--paper);
  border-radius:2px;padding:.7rem .9rem;font-size:.87rem;line-height:1.75;color:var(--ink-2);
}
.compound-box b{color:var(--ink);font-weight:640}
.compound-box.bad{border-left-color:var(--madder)}

/* Cheiro's verdict, rendered identically everywhere a compound is named */
.rbadge{
  display:inline-block;font-family:var(--f-mono);font-size:.6rem;font-weight:700;
  letter-spacing:.09em;text-transform:uppercase;padding:.13rem .4rem;border-radius:2px;
  border:1px solid var(--rule-strong);color:var(--ink-3);
  vertical-align:.08em;margin-right:.4rem;white-space:nowrap;
}
.rbadge.excellent{background:var(--gold);border-color:var(--gold);color:var(--mark-fg)}
.rbadge.strong{background:var(--gold-wash);border-color:var(--gold);color:var(--gold)}
.rbadge.neutral{background:transparent;border-color:var(--rule-strong);color:var(--ink-3)}
.rbadge.warning{background:var(--madder-wash);border-color:var(--madder);color:var(--madder)}
.rbadge.severe{background:var(--madder);border-color:var(--madder);color:var(--mark-fg)}
.rbadge.none{border-style:dashed}
.vmeta .rbadge{font-size:.55rem;margin-left:.15rem}
.rootrow .rmeta .rbadge{font-size:.55rem}

/* ============ FOOTER ============ */
.foot{
  width:var(--col);border-top:1px solid var(--rule);padding-top:1.5rem;margin-top:4rem;
  display:flex;flex-direction:column;gap:.7rem;color:var(--ink-3);font-size:.85rem;line-height:1.6;
}

ul.tight{margin:.1rem 0 0;padding-left:1.15rem;display:flex;flex-direction:column;gap:.32rem}
ul.tight li{line-height:1.58}
ol.tight{margin:.1rem 0 0;padding-left:1.3rem;display:flex;flex-direction:column;gap:.42rem}
ol.tight li{line-height:1.58;padding-left:.15rem}

/* ============ NAME VARIANT EXPLORER ============ */
.explorer{
  width:100%;background:var(--surface);border:1px solid var(--rule-strong);border-radius:3px;
  padding:clamp(1.2rem,3vw,2rem);display:flex;flex-direction:column;gap:1.2rem;
}
.exp-controls{display:flex;flex-wrap:wrap;gap:.9rem 1.4rem;align-items:center;justify-content:space-between}
.toggle{display:flex;align-items:center;gap:.5rem;font-family:var(--f-mono);font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);cursor:pointer}
.toggle input{accent-color:var(--gold);width:14px;height:14px;cursor:pointer}
.exp-count{font-family:var(--f-mono);font-size:.7rem;color:var(--ink-3);letter-spacing:.06em}

.hero-pick{
  border:1px solid var(--gold);background:var(--gold-wash);border-radius:3px;
  padding:clamp(1rem,2.4vw,1.45rem);display:flex;flex-direction:column;gap:.6rem;
}
.hero-pick .plabel{font-family:var(--f-mono);font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;color:var(--gold)}
.hero-pick .big{font-family:var(--f-display);font-size:clamp(1.45rem,1.05rem + 1.7vw,2.15rem);font-weight:600;color:var(--ink);line-height:1.15;letter-spacing:-.01em}
.hero-pick .why{font-size:.9rem;line-height:1.6;color:var(--ink-2)}
.hero-pick .why b{color:var(--ink);font-weight:640}
.hero-pick.hold{border-color:var(--rule-strong);background:var(--surface-2)}
.hero-pick.hold .plabel{color:var(--ink-3)}

.tabs{display:flex;flex-wrap:wrap;gap:.3rem;border-bottom:1px solid var(--rule)}
.tab{
  font-family:var(--f-mono);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;
  background:none;border:1px solid transparent;border-bottom:none;color:var(--ink-3);
  padding:.55rem .8rem;cursor:pointer;border-radius:2px 2px 0 0;margin-bottom:-1px;
}
.tab[aria-selected="true"]{color:var(--gold);border-color:var(--rule);background:var(--paper)}
.tab:hover{color:var(--ink)}

.vlist{display:flex;flex-direction:column;gap:.4rem}
.vrow{
  display:grid;grid-template-columns:1.7rem 1fr auto;gap:.8rem;align-items:center;
  padding:.6rem .8rem;border:1px solid var(--rule);border-radius:2px;background:var(--paper);
}
.vrow.best{border-color:var(--gold);background:var(--gold-wash)}
.vrow.cur{border-style:dashed;border-color:var(--rule-strong)}
.vrow .rk{font-family:var(--f-mono);font-size:.68rem;color:var(--ink-3);letter-spacing:.04em}
.vmain{min-width:0}
.vname{font-family:var(--f-display);font-size:1.02rem;font-weight:600;line-height:1.25;word-break:break-word}
.vmeta{font-family:var(--f-mono);font-size:.68rem;color:var(--ink-3);margin-top:.15rem;line-height:1.5}
.vmeta em{color:var(--gold);font-style:normal}
.vchips{display:flex;flex-wrap:wrap;gap:.25rem;margin-top:.3rem}
/* Chips carry short sentences, not labels, so they must always be free to wrap.
   Pinning them to nowrap above 640px let a long chip push its grid column past
   the viewport — visible as horizontal scroll on the vehicle view at tablet
   widths, where .byroot is two columns but each column is still narrow. */
.chip{font-family:var(--f-mono);font-size:.6rem;letter-spacing:.05em;padding:.16rem .38rem;border-radius:2px;border:1px solid var(--rule);color:var(--ink-3);white-space:normal;line-height:1.4;max-width:100%;overflow-wrap:anywhere}
.chip.pos{border-color:var(--gold);color:var(--gold);background:var(--gold-wash)}
.chip.neg{border-color:var(--madder);color:var(--madder);background:var(--madder-wash)}
/* rule verdicts read louder than the point chips — they gate the ranking */
.chip.rule{font-weight:700;letter-spacing:.04em}
.chip.rule.ok{border-color:var(--gold);color:var(--mark-fg);background:var(--gold)}
.chip.rule.bad{border-color:var(--madder);color:var(--mark-fg);background:var(--madder)}
.chip.rule.warn{border-color:var(--madder);color:var(--madder);background:var(--madder-wash)}
.hero-pick.warn{border-color:var(--madder);border-left-width:3px;background:var(--madder-wash)}
.hero-pick.warn .plabel{color:var(--madder)}
.vscore{display:flex;flex-direction:column;align-items:flex-end;gap:.25rem}
.vscore .sv{font-family:var(--f-mono);font-size:.88rem;font-weight:700;color:var(--gold);font-variant-numeric:tabular-nums}
.vscore .sv.neg{color:var(--madder)}
.bar{height:3px;width:64px;background:var(--surface-2);border-radius:2px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--gold)}
.bar i.neg{background:var(--madder)}

.byroot{display:grid;grid-template-columns:1fr;gap:.4rem}
@media(min-width:700px){.byroot{grid-template-columns:1fr 1fr}}
.rootrow{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.7rem;align-items:center;
  padding:.55rem .75rem;border:1px solid var(--rule);border-radius:2px;background:var(--paper);
}
.rootrow > div{min-width:0}
.rootrow.fills{border-color:var(--gold);background:var(--gold-wash)}
.rootrow .rn{font-family:var(--f-display);font-size:1.5rem;font-weight:600;color:var(--gold);line-height:1;width:1.3rem;text-align:center}
.rootrow .rn.dim{color:var(--ink-3)}
.rootrow .rname{font-family:var(--f-display);font-size:.98rem;font-weight:600;line-height:1.25;word-break:break-word}
.rootrow .rmeta{font-family:var(--f-mono);font-size:.66rem;color:var(--ink-3);margin-top:.12rem}
.rootrow .rs{font-family:var(--f-mono);font-size:.78rem;font-weight:700;color:var(--gold);font-variant-numeric:tabular-nums}
.rootrow .rs.neg{color:var(--madder)}

/* ============ WORK & FORTUNATE SIGNS ============ */
.worklist{display:flex;flex-direction:column;gap:.75rem;width:100%}
.wblock{
  background:var(--surface);border:1px solid var(--rule);border-radius:3px;
  padding:1rem 1.15rem;display:flex;flex-direction:column;gap:.35rem;
}
.wblock.lead{border-color:var(--gold);border-left-width:3px;background:var(--gold-wash)}
.wblock.warn{border-color:var(--madder);border-left-width:3px;background:var(--madder-wash)}
.wblock .wlab{
  font-family:var(--f-mono);font-size:.6rem;letter-spacing:.13em;text-transform:uppercase;color:var(--ink-3);
}
.wblock.lead .wlab{color:var(--gold)}
.wblock.warn .wlab{color:var(--madder)}
.wblock h4{font-family:var(--f-display);font-size:1.1rem;font-weight:600;margin:0;line-height:1.2}
.wblock p{font-size:.9rem;line-height:1.6;color:var(--ink-2);margin-top:.15rem}
.wblock p b{color:var(--ink);font-weight:640}
.wblock p .muted{display:block;margin-top:.4rem;font-size:.85rem}

.signs{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.6rem;width:100%;margin-top:.3rem}
.sign{
  background:var(--surface);border:1px solid var(--rule);border-left:2px solid var(--gold);
  border-radius:3px;padding:.8rem .9rem;display:flex;flex-direction:column;gap:.25rem;
}
.sign.bad{border-left-color:var(--madder)}
.sign .sk{font-family:var(--f-mono);font-size:.6rem;letter-spacing:.13em;text-transform:uppercase;color:var(--ink-3)}
.sign .sv{
  font-family:var(--f-display);font-size:1.15rem;font-weight:600;color:var(--gold);
  line-height:1.3;font-variant-numeric:tabular-nums;
}
.sign.bad .sv{color:var(--madder);font-size:.95rem}
.sign .sn{font-size:.74rem;line-height:1.45;color:var(--ink-3)}

/* ============ STRONG DATES ============ */
.datebox{
  width:100%;background:var(--surface);border:1px solid var(--rule-strong);border-radius:3px;
  padding:clamp(1.1rem,2.6vw,1.6rem);display:flex;flex-direction:column;gap:1rem;
}
.datebox select:not(.field select){
  font-family:var(--f-mono);font-size:.72rem;padding:.3rem .45rem;margin-left:.4rem;
  background:var(--paper);color:var(--ink);border:1px solid var(--rule-strong);border-radius:2px;
}
.orgnum{font-size:.9rem;line-height:1.6;color:var(--ink-2)}
.datecheck{border-top:1px solid var(--rule);padding-top:1rem;display:flex;flex-direction:column;gap:.8rem}
.avail{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center;
  border:1px solid var(--rule);border-radius:2px;background:var(--paper);padding:.6rem .7rem}
.av-lab{font-family:var(--f-mono);font-size:.6rem;letter-spacing:.13em;text-transform:uppercase;color:var(--ink-3);margin-right:.3rem}
.av{font-family:var(--f-mono);font-size:.62rem;letter-spacing:.03em;padding:.2rem .45rem;border-radius:2px;
  border:1px solid var(--rule-strong);color:var(--ink-3);white-space:nowrap;max-width:100%;overflow-wrap:anywhere}
@media(max-width:640px){.av{white-space:normal;line-height:1.45}}
.av.on{border-color:var(--gold);color:var(--gold);background:var(--gold-wash)}
.av.hi{border-color:var(--gold);background:var(--gold);color:var(--mark-fg);font-weight:700}
.av.off{border-style:dashed;color:var(--ink-3);opacity:.85}
.orgnum b{color:var(--ink);font-weight:640}
.drow{
  display:grid;grid-template-columns:1.7rem 1fr auto;gap:.8rem;align-items:center;
  padding:.6rem .8rem;border:1px solid var(--rule);border-radius:2px;background:var(--paper);
}
.drow.best{border-color:var(--gold);background:var(--gold-wash)}
.drow .rk{font-family:var(--f-mono);font-size:.68rem;color:var(--ink-3)}
.dmain{min-width:0;display:flex;flex-direction:column;gap:.18rem}
.ddate{font-family:var(--f-display);font-size:1.05rem;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums}
.dmeta{font-family:var(--f-mono);font-size:.68rem;color:var(--ink-3)}
/* a line the name completes is the whole point of pairing them — mark it loudest */
.chip.unlock{
  border-color:var(--gold);background:var(--gold);color:var(--mark-fg);
  font-weight:700;letter-spacing:.04em;
}

/* ============ REMEDY CARDS ============ */
.remedies{display:grid;grid-template-columns:1fr;gap:.9rem;width:100%}
@media(min-width:820px){.remedies{grid-template-columns:1fr 1fr}}
.rem{
  background:var(--surface);border:1px solid var(--rule);border-radius:3px;
  padding:1.05rem 1.15rem;display:flex;flex-direction:column;gap:.75rem;
}
.rem.key{border-color:var(--gold);border-width:1px 1px 1px 2px}
.rem-head{display:flex;align-items:baseline;gap:.65rem;flex-wrap:wrap;border-bottom:1px solid var(--rule);padding-bottom:.6rem}
.rem-head .n{font-family:var(--f-display);font-size:2rem;font-weight:600;color:var(--gold);line-height:1}
.rem-head .g{font-family:var(--f-display);font-size:1.05rem;font-weight:600;line-height:1.2}
.rem-head .g small{display:block;font-family:var(--f-body);font-size:.72rem;font-weight:400;color:var(--ink-3);letter-spacing:.02em;margin-top:.12rem}
.rem-head .lines{margin-left:auto;font-family:var(--f-mono);font-size:.62rem;letter-spacing:.06em;color:var(--ink-3);white-space:nowrap}
.rem-rows{display:flex;flex-direction:column;gap:.45rem}
.rr{display:grid;grid-template-columns:5.4rem 1fr;gap:.7rem;align-items:baseline}
.rr dt{
  font-family:var(--f-mono);font-size:.6rem;letter-spacing:.11em;text-transform:uppercase;
  color:var(--ink-3);margin:0;
}
.rr dd{margin:0;font-size:.855rem;line-height:1.52;color:var(--ink-2)}
.rr dd .sk{font-style:italic;color:var(--ink)}
.rem-conduct{
  border:1px solid var(--gold);background:var(--gold-wash);border-radius:2px;
  padding:.65rem .8rem;display:flex;flex-direction:column;gap:.3rem;
}
.rem-conduct .lbl{font-family:var(--f-mono);font-size:.6rem;letter-spacing:.13em;text-transform:uppercase;color:var(--gold)}
.rem-conduct p{font-size:.87rem;line-height:1.55;color:var(--ink)}
.rem-none{
  border:1px dashed var(--rule-strong);border-radius:3px;padding:1.2rem;
  text-align:center;color:var(--ink-3);font-size:.92rem;
}

/* the ornament block inside each remedy card */
.orn{
  border:1px solid var(--rule-strong);border-radius:2px;background:var(--paper);
  padding:.8rem .9rem;display:flex;flex-direction:column;gap:.55rem;
}
.orn-label{
  font-family:var(--f-mono);font-size:.6rem;letter-spacing:.13em;text-transform:uppercase;color:var(--ink-3);
}

/* the single focus recommendation */
.focus-card{
  border:1px solid var(--gold);border-left-width:3px;background:var(--gold-wash);border-radius:3px;
  padding:clamp(1.1rem,2.6vw,1.6rem);display:flex;flex-direction:column;gap:.9rem;
}
.focus-head{display:flex;align-items:center;gap:1rem}
.focus-head .fn{
  font-family:var(--f-display);font-size:clamp(2.6rem,2rem + 2.6vw,3.8rem);font-weight:600;
  color:var(--gold);line-height:.9;flex:none;
}
.focus-head .ftitle{display:flex;flex-direction:column;gap:.25rem;min-width:0}
.focus-head .plabel{font-family:var(--f-mono);font-size:.66rem;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);line-height:1.4}
.focus-head .fg{font-family:var(--f-display);font-size:clamp(1.2rem,1rem + .8vw,1.6rem);font-weight:600;color:var(--ink);line-height:1.15}
.fwhy{font-size:.92rem;line-height:1.6;color:var(--ink-2)}
.focus-orn{
  display:grid;grid-template-columns:1fr;gap:.5rem;
  border:1px solid var(--gold);border-radius:2px;background:var(--paper);padding:.85rem .95rem;
}
@media(min-width:620px){.focus-orn{grid-template-columns:4.6rem 1fr;gap:.9rem}}
.fo-label{font-family:var(--f-mono);font-size:.6rem;letter-spacing:.13em;text-transform:uppercase;color:var(--gold);padding-top:.2rem}
.fo-body{display:flex;flex-direction:column;gap:.45rem;min-width:0}
.fo-body p{font-size:.9rem;line-height:1.58;color:var(--ink-2)}
.fo-body p b{color:var(--ink);font-weight:640}
.fo-avoid{font-size:.82rem!important}

/* ============ LOGO & BRAND COLOUR — SWATCHES ============ */
.brand-swatches{display:flex;flex-wrap:wrap;gap:.7rem}
.brand-sw{display:flex;flex-direction:column;align-items:center;gap:.32rem;width:4rem;text-align:center}
.brand-sw .sw-box{width:100%;aspect-ratio:1;border-radius:5px;border:1px solid var(--rule-strong);box-shadow:inset 0 0 0 1px rgba(0,0,0,.04)}
.brand-sw span:last-child{font-family:var(--f-mono);font-size:.6rem;letter-spacing:.03em;color:var(--ink-3);line-height:1.3}
.dot-sw{display:inline-block;width:.7rem;height:.7rem;border-radius:50%;border:1px solid var(--rule-strong);margin-right:.22rem;vertical-align:middle}

/* ============ VEHICLE NUMBER ============ */
.vehbox{
  width:100%;background:var(--surface);border:1px solid var(--rule-strong);border-radius:3px;
  padding:clamp(1.1rem,2.6vw,1.6rem);display:flex;flex-direction:column;gap:1.15rem;
}
.veh-in{display:grid;grid-template-columns:1fr;gap:.9rem}
@media(min-width:700px){.veh-in{grid-template-columns:1fr 1.35fr .62fr}}

.plate-read{
  display:flex;flex-wrap:wrap;gap:.25rem;align-items:flex-end;
  border:1px solid var(--rule);border-radius:2px;background:var(--paper);padding:.6rem .7rem;
}
.pl{
  display:flex;flex-direction:column;align-items:center;gap:1px;min-width:23px;
  border:1px solid var(--rule);border-radius:2px;padding:.22rem .3rem;background:var(--surface);
}
.pl .a{font-family:var(--f-mono);font-size:.82rem;font-weight:600;color:var(--ink);line-height:1.2}
.pl .b{font-family:var(--f-mono);font-size:.6rem;color:var(--ink-3);line-height:1.2}
.pl.live{border-color:var(--gold);background:var(--gold-wash)}
.pl.live .a,.pl.live .b{color:var(--gold)}
.pl.void{border-style:dashed;opacity:.7}
.pl-tot{font-family:var(--f-mono);font-size:.74rem;color:var(--ink-3);padding-left:.4rem;align-self:center}

.target-card{
  border:1px solid var(--gold);border-left-width:3px;background:var(--gold-wash);border-radius:3px;
  padding:clamp(1rem,2.4vw,1.5rem);display:flex;flex-direction:column;gap:.8rem;
}
.target-card .plabel{font-family:var(--f-mono);font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;color:var(--gold)}
.target-card .big{
  font-family:var(--f-display);font-size:clamp(1.3rem,1rem + 1.5vw,1.95rem);font-weight:600;
  color:var(--ink);line-height:1.2;letter-spacing:-.01em;
}
.target-card .why{font-size:.9rem;line-height:1.6;color:var(--ink-2)}
.target-card .why b{color:var(--ink);font-weight:640}
.target-card.warn{border-color:var(--madder);background:var(--madder-wash)}
.target-card.warn .plabel{color:var(--madder)}

.target-sums{display:flex;flex-wrap:wrap;gap:.5rem}
.tsum{
  border:1px solid var(--gold);background:var(--paper);border-radius:2px;
  padding:.5rem .7rem;display:flex;flex-direction:column;gap:.18rem;min-width:112px;
}
.tsum .tv{font-family:var(--f-display);font-size:1.65rem;font-weight:600;color:var(--gold);line-height:1}
.tsum .tn{font-family:var(--f-mono);font-size:.61rem;color:var(--ink-3);line-height:1.45}
.tsum.avoid{border-color:var(--madder);border-style:dashed;background:transparent}
.tsum.avoid .tv{color:var(--madder)}
.tsum.plain{border-color:var(--rule-strong);border-style:dashed}
.tsum.plain .tv{color:var(--ink-3)}

.numgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(116px,1fr));gap:.45rem;width:100%}
.numcell{
  border:1px solid var(--rule);background:var(--paper);border-radius:2px;
  padding:.5rem .62rem;display:flex;flex-direction:column;gap:.14rem;
}
.numcell.top{border-color:var(--gold);background:var(--gold-wash)}
.numcell .nv{
  font-family:var(--f-mono);font-size:1.14rem;font-weight:700;letter-spacing:.09em;
  color:var(--ink);font-variant-numeric:tabular-nums;line-height:1.2;
}
.numcell.top .nv{color:var(--gold)}
.numcell .nn{font-family:var(--f-mono);font-size:.6rem;color:var(--ink-3);line-height:1.45}

/* ============ BUSINESS NAME — DIRECTOR ROWS ============ */
.dirgrid{display:grid;grid-template-columns:1fr;gap:.9rem;width:100%}
@media(min-width:780px){.dirgrid{grid-template-columns:1fr 1fr 1fr}}
.dircard{
  background:var(--paper);border:1px solid var(--rule);border-radius:3px;
  padding:1rem 1.1rem;display:flex;flex-direction:column;gap:.65rem;
}
.majtoggle{display:flex;align-items:center;gap:.45rem;font-family:var(--f-mono);font-size:.64rem;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);cursor:pointer}
.majtoggle input{accent-color:var(--gold);width:13px;height:13px;cursor:pointer}

/* ============ BUSINESS NAME — GENERATOR ============ */
.gen-controls{display:grid;grid-template-columns:1fr 1fr;gap:.9rem 1.2rem;align-items:start;margin:.5rem 0 .2rem}
.gen-controls .field{min-width:0}
.gen-controls .field.full{grid-column:1 / -1}
.gen-controls .field input,.gen-controls .field select{height:2.9rem;box-sizing:border-box}
.gen-controls .field label{display:block;min-height:1.6em}
.gen-controls .gen-go{display:flex;flex-direction:column;gap:.35rem}
.gen-controls .gen-go > span{display:block;min-height:1.6em}
.gen-controls > .cb-toggle{margin-left:0;height:2.9rem;align-self:start}
@media(max-width:640px){.gen-controls{grid-template-columns:1fr}}
.gen-card .gd[data-font]{font-family:var(--f-deva),"Nirmala UI","Noto Sans","Noto Serif",sans-serif}
.gen-card .gd[dir="rtl"]{text-align:left}
.gen-results{display:grid;grid-template-columns:1fr;gap:1.1rem;margin-top:.5rem}
@media(min-width:780px){.gen-results{grid-template-columns:1fr 1fr}.gen-results.single{grid-template-columns:1fr}}
.gen-block h4{margin-bottom:.5rem;color:var(--ink-2)}
.gen-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:.55rem}
.gen-card{
  display:flex;flex-direction:column;gap:.28rem;text-align:left;font:inherit;color:inherit;cursor:pointer;
  background:var(--paper);border:1px solid var(--rule);border-radius:3px;padding:.6rem .65rem;
  transition:border-color .15s,background .15s;
}
.gen-card:hover{border-color:var(--gold);background:var(--gold-wash)}
.gen-card.pref{border-color:var(--gold-wash);box-shadow:inset 0 0 0 1px var(--gold)}
.gen-card .gn{font-family:var(--f-display);font-size:1.02rem;font-weight:600;line-height:1.2;letter-spacing:-.006em}
.gen-card .gd{font-family:var(--f-deva);font-size:.95rem;color:var(--ink-2);line-height:1.2}
.gen-card .gb{font-family:var(--f-mono);font-size:.6rem;letter-spacing:.04em;color:var(--ink-3);line-height:1.4}
.gen-card .gb b{color:var(--ink-2)}
.gen-empty{grid-column:1/-1;font-size:.83rem;color:var(--ink-3);padding:.3rem 0}

/* ============ COMPATIBILITY — FRAMING + TWO-PERSON GRID ============ */
.compatgrid{display:grid;grid-template-columns:1fr;gap:.9rem;width:100%}
@media(min-width:700px){.compatgrid{grid-template-columns:1fr 1fr}}
.frametabs{display:flex;flex-wrap:wrap;gap:.5rem .8rem;margin:.2rem 0 1rem}
.frametabs .toggle{
  border:1px solid var(--rule);border-radius:20px;padding:.42rem .85rem;
  background:var(--paper);text-transform:none;font-family:var(--f-body);
  font-size:.82rem;letter-spacing:.01em;color:var(--ink-2);
}
.frametabs .toggle input{accent-color:var(--gold);width:13px;height:13px;cursor:pointer}
.frametabs .toggle:has(input:checked){border-color:var(--gold);color:var(--ink);background:var(--gold-wash)}

/* on a phone the hero stacks, so shrink it hard to keep the form near the top */
@media(max-width:700px){
  .square-plate{width:min(165px,55%)}
  .hero{padding-top:1.2rem;padding-bottom:1rem}
  .hero-inner{gap:1.1rem}
  .wrap > section:first-of-type{margin-top:1.2rem}
}

@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* ============ SAVE YOUR REPORT — PDF + EMAIL ============ */
.savebox{
  width:100%;background:var(--surface);border:1px solid var(--rule-strong);border-radius:3px;
  padding:clamp(1.1rem,2.6vw,1.6rem);display:flex;flex-direction:column;gap:1rem;
}
.save-row{display:flex;flex-wrap:wrap;gap:.9rem;align-items:flex-end}
.save-row .field{flex:1 1 220px;min-width:200px}
.save-btn{
  font-family:var(--f-mono);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;
  cursor:pointer;background:var(--gold);border:1px solid var(--gold);color:var(--mark-fg);
  padding:.66rem 1.05rem;border-radius:2px;white-space:nowrap;flex:none;
}
.save-btn:hover{background:var(--gold-bright);border-color:var(--gold-bright)}
.save-btn.ghost{background:none;color:var(--gold)}
.save-btn.ghost:hover{background:var(--gold-wash)}
.save-btn:disabled{opacity:.55;cursor:default;background:var(--rule-strong);border-color:var(--rule-strong);color:var(--surface)}
/* filled tags: ink navy with gold lettering (light); gold with navy lettering (dark) */
:root:not([data-theme="dark"]) .rbadge.excellent,:root:not([data-theme="dark"]) .chip.rule.ok,:root:not([data-theme="dark"]) .av.hi,:root:not([data-theme="dark"]) .chip.unlock,:root:not([data-theme="dark"]) .conn-cell.t4{background:#171C28;border-color:#171C28;color:#E3B84A}
:root:not([data-theme="dark"]) .conn-cell.t4 .n,:root:not([data-theme="dark"]) .conn-cell.t4 .c{color:#E3B84A}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .rbadge.excellent,:root:not([data-theme="light"]) .chip.rule.ok,:root:not([data-theme="light"]) .av.hi,:root:not([data-theme="light"]) .chip.unlock,:root:not([data-theme="light"]) .conn-cell.t4{background:#E3B84A;border-color:#E3B84A;color:#171C28}
}
:root[data-theme="dark"] .rbadge.excellent,:root[data-theme="dark"] .chip.rule.ok,:root[data-theme="dark"] .av.hi,:root[data-theme="dark"] .chip.unlock,:root[data-theme="dark"] .conn-cell.t4{background:#E3B84A;border-color:#E3B84A;color:#171C28}
/* nine-cell grid: maroon and gold (colours only; type unchanged) */
.g3{
  padding:.5rem;border-radius:3px;gap:4px;
  background:linear-gradient(160deg,#4A1620 0%,#2E0C14 100%);
  border:1px solid #C9A240;
  box-shadow:0 0 0 3px var(--paper),0 0 0 4px rgba(181,140,36,.55);
}
.g3 .cell{background:rgba(255,255,255,.04);border:1px dashed rgba(217,174,73,.3);color:#B9A0A5}
.g3 .cell.blank .dig{color:#B9A0A5}
.g3 .cell.filled{background:linear-gradient(150deg,#6A2230 0%,#4A1620 100%);border:1px solid #D9AE49;color:#F6D77C}
.g3 .cell.blank.active{background:#3C121B;border:1px dashed #D9AE49;color:#F0CB62}
.g3 .cell.blank.active .dig{color:#F0CB62}
.lg .sw.g{background:linear-gradient(150deg,#6A2230,#4A1620);border:1px solid #D9AE49}
.lg .sw.d{background:#3C121B;border:1px dashed #D9AE49}

/* ============ LO SHU GRID IN EVERY NAME MODULE (4 Nov 2026) ============ */
.lsg-host{width:100%;scroll-margin-top:calc(var(--navh) + 14px)}
.lsg-host:empty{display:none}
.lsg-panel{background:var(--surface);border:1px solid var(--rule);border-left:2px solid var(--gold);border-radius:3px;
  padding:clamp(1rem,2.4vw,1.4rem);display:flex;flex-direction:column;gap:.95rem}
.lsg-eb{font-family:var(--f-mono);font-size:.62rem;letter-spacing:.16em;text-transform:uppercase;color:var(--gold)}
.lsg-title{font-family:var(--f-display);font-size:1.14rem;font-weight:600;line-height:1.25;margin-top:.15rem}
.lsg-lead{font-size:.86rem;line-height:1.55;color:var(--ink-2);margin-top:.3rem}
.lsg-grids{display:flex;flex-wrap:wrap;gap:1.1rem .75rem;align-items:flex-start}
.lsg-fig{margin:0;display:flex;flex-direction:column;gap:.75rem;width:calc(3 * clamp(30px,8.2vw,48px) + 34px)}
.lsg-fig figcaption{font-family:var(--f-mono);font-size:.64rem;line-height:1.5;color:var(--ink-3);overflow-wrap:anywhere}
.lsg-fig figcaption b{color:var(--ink);font-weight:700}
.g3.lsg-sm{grid-template-columns:repeat(3,clamp(30px,8.2vw,48px));grid-template-rows:repeat(3,clamp(30px,8.2vw,48px));margin:4px}
@media(max-width:520px){.g3.lsg-sm{gap:3px}.g3.lsg-sm .cell{font-size:.8rem}}
.g3.lsg-sm .cell{font-size:.92rem;gap:2px}
.g3.lsg-sm .marks{height:11px;gap:1px}
.g3.lsg-sm .mk{width:11px;height:11px;font-size:7px}
@media(max-width:520px){.g3.lsg-sm .mk{width:9px;height:9px;font-size:6px}.g3.lsg-sm .marks{height:9px}}
.g3 .cell.blank.active.lsg-new{border:2px solid #E486AE}
.lsg-legend{display:flex;flex-wrap:wrap;gap:.45rem 1rem}
.lsg-legend .mk{width:12px;height:12px}
.lsg-legend .sw.nw{border:2px solid #E486AE;background:#3C121B}
.lsg-read{gap:.5rem}
.lsg-tip{font-size:.78rem;color:var(--ink-3);margin:0}
.lsg-pickable{cursor:pointer}
.lsg-pickable:hover{border-color:var(--gold)}
.lsg-mini{display:grid;grid-template-columns:repeat(3,14px);grid-template-rows:repeat(3,14px);gap:2px;padding:3px;
  border-radius:2px;background:#2E0C14;border:1px solid #C9A240;flex:none}
.lsg-mini i{font-style:normal;display:grid;place-items:center;font-family:var(--f-mono);font-size:8px;line-height:1;
  border-radius:1px;color:#8C6F75;border:1px dashed rgba(217,174,73,.28)}
.lsg-mini i.b{background:#6A2230;border:1px solid #D9AE49;color:#F6D77C}
.lsg-mini i.a{background:#3C121B;border:1px dashed #D9AE49;color:#F0CB62}
.lsg-mini i.n{background:#9B2F5F;border:1px solid #E486AE;color:#fff}
.lsg-mini i.nx{box-shadow:inset 0 0 0 1px #E486AE}
.numcell .lsg-foot{display:flex;align-items:center;gap:.5rem;margin-top:.4rem}
/* selected nav pill / tab / segment: ink navy in the light theme (gold stays in dark) */
:root:not([data-theme="dark"]) .pill[aria-current="page"],:root:not([data-theme="dark"]) .tab[aria-selected="true"]{color:#171C28;border-color:#171C28;background:rgba(23,28,40,.08)}
:root:not([data-theme="dark"]) .dash-seg button[aria-pressed="true"]{color:#171C28;background:rgba(23,28,40,.1)}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .pill[aria-current="page"],:root:not([data-theme="light"]) .tab[aria-selected="true"]{color:var(--gold);border-color:var(--gold);background:var(--gold-wash)}
  :root:not([data-theme="light"]) .dash-seg button[aria-pressed="true"]{color:var(--gold);background:var(--gold-wash)}
}
.sky-go{background:#E3B84A!important;border-color:#E3B84A!important;color:#171C28!important}
.sky-go:hover{background:#EFC868!important}
/* Button palette E: ink navy with gold lettering (light); gold with navy lettering (dark) */
.save-btn{background:#171C28;border-color:#171C28;color:#E3B84A}
.save-btn:hover{background:#2A3347;border-color:#2A3347}
.save-btn.ghost{background:none;color:#171C28}
.save-btn.ghost:hover{background:rgba(23,28,40,.08)}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .save-btn{background:#E3B84A;border-color:#E3B84A;color:#171C28}
  :root:not([data-theme="light"]) .save-btn:hover{background:#EFC868;border-color:#EFC868}
  :root:not([data-theme="light"]) .save-btn.ghost{background:none;color:#E3B84A}
  :root:not([data-theme="light"]) .save-btn.ghost:hover{background:rgba(227,184,74,.12)}
}
:root[data-theme="dark"] .save-btn{background:#E3B84A;border-color:#E3B84A;color:#171C28}
:root[data-theme="dark"] .save-btn:hover{background:#EFC868;border-color:#EFC868}
:root[data-theme="dark"] .save-btn.ghost{background:none;color:#E3B84A}
:root[data-theme="dark"] .save-btn.ghost:hover{background:rgba(227,184,74,.12)}
.save-btn:disabled,:root .save-btn:disabled{opacity:.55;cursor:default;background:var(--rule-strong)!important;border-color:var(--rule-strong)!important;color:var(--surface)!important}
/* long button labels ("Unlock everything with the All-Access pass") wrap instead of pushing the page wider on phones */
.save-btn{max-width:100%;white-space:normal;text-align:center}
.save-status{font-family:var(--f-mono);font-size:.72rem;color:var(--ink-3);min-height:1.2em;margin:0}
.save-status.err{color:var(--madder)}
.save-status.ok{color:var(--gold)}
.email-fallback{font-family:var(--f-mono);font-size:.72rem;margin:.3rem 0 0}
.email-fallback a{color:var(--gold);text-decoration:underline}

/* the home-page disclaimer: a quotation set across the full width, not a boxed note */
.disclaimer{
  width:100%;margin:0;padding:1.3rem 0 1.1rem;
  border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);
  display:flex;flex-direction:column;gap:.6rem;
}
.disclaimer .eyebrow{color:var(--ink-3)}
.disclaimer p{
  font-family:var(--f-display);font-style:italic;font-weight:300;
  font-size:clamp(.94rem,.89rem + .35vw,1.115rem);line-height:1.62;color:var(--ink-2);
}
.disclaimer p strong{font-weight:500;color:var(--ink)}
.disclaimer p em{font-style:normal}
.disclaimer p a{color:var(--gold)}

/* ===== classier headings + modules use ~75% of the page width ===== */
:root{--col:min(75%,1400px);--wide:min(75%,1400px)}
@media(max-width:1100px){:root{--col:min(92%,100%);--wide:min(92%,100%)}}
@media(max-width:700px){:root{--col:100%;--wide:100%}}
#view-manual{--col:min(68ch,100%)}
h1,h2,h3{font-optical-sizing:auto}
h2{font-size:clamp(1.55rem,1.2rem + .85vw,2.05rem);font-weight:400;letter-spacing:.004em;line-height:1.22}
h3{font-size:clamp(1.12rem,1.04rem + .35vw,1.32rem);font-weight:500;letter-spacing:.003em}
.col > h2::after{content:"";display:block;width:2.8rem;height:1px;background:var(--gold);margin-top:.9rem;opacity:.85}
.col > h2 + p{margin-top:.15rem}
.col > .eyebrow{letter-spacing:.22em;font-size:.68rem}

/* nav: pills sit just after the mark and share the row evenly */
.nav-pills{flex:1 1 auto;margin-left:clamp(.8rem,2.5vw,2rem);justify-content:space-between;gap:.15rem}
.pill{flex:1 0 auto;text-align:center;font-size:.7rem}

/* save-your-report: centred, with field and buttons on one baseline */
.savewrap{width:100%;display:flex;flex-direction:column;align-items:center}
.savewrap .col{align-items:center;text-align:center}
.savewrap .col > h2::after{margin-inline:auto}
.savebox{align-items:center;text-align:center}
.save-row{justify-content:center;align-items:flex-end;gap:1rem;width:100%}
.save-row{padding-bottom:1.6rem}
.savewrap .plate{margin-top:.6rem}
.save-row .field{flex:0 1 340px;position:relative;margin-bottom:0;text-align:left}
.save-row .field .hint{position:absolute;top:100%;left:0;margin-top:.35rem;white-space:nowrap}
.save-row .field input{height:2.55rem;box-sizing:border-box}
.save-row .save-btn{height:2.55rem;box-sizing:border-box;padding-top:0;padding-bottom:0}
.savebox .hint{max-width:62ch;font-size:.8rem;line-height:1.5}
.save-status,.email-fallback{text-align:center}
@media(max-width:700px){.save-row{flex-direction:column;align-items:stretch}.save-row{padding-bottom:0}.save-row .field{flex:none}.save-row .field .hint{white-space:normal;position:static}}

/* merged modules: a segmented switch at the head of each */
.modebar{width:var(--col);display:flex;justify-content:center;gap:0;margin:1.5rem auto 0}
.modebtn{font-family:var(--f-mono);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;cursor:pointer;
  background:none;color:var(--ink-3);border:1px solid var(--rule-strong);padding:.55rem 1.2rem;margin-left:-1px}
.modebtn:first-child{border-radius:2px 0 0 2px;margin-left:0}.modebtn:last-child{border-radius:0 2px 2px 0}
.modebtn:hover{color:var(--ink)}
.modebtn[aria-pressed="true"]{color:var(--gold);border-color:var(--gold);background:var(--gold-wash);position:relative;z-index:1}
#daily-wrap{margin-top:2.4rem}

/* policy pages, footer, placeholders */
.legaldoc{width:var(--col);display:flex;flex-direction:column;gap:1rem;margin:2rem auto 0}
.legaldoc > h3{margin-top:1.6rem}
.legaldoc ul{margin:0;padding-left:1.2rem;display:flex;flex-direction:column;gap:.5rem}
.legaldoc li{line-height:1.6}
.legaldoc th{text-align:left;font-weight:600;white-space:nowrap}
.legal-meta{font-family:var(--f-mono);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3)}
.ph{background:var(--gold-wash);color:var(--gold);padding:0 .25em;border-radius:2px;border-bottom:1px dashed var(--gold)}


.timeline{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:.4rem;margin-top:.8rem}
.timeline .tl{border:1px solid var(--rule);background:var(--paper,transparent);padding:.5rem .55rem;display:flex;flex-direction:column;gap:.1rem;font-size:.8rem;border-radius:2px}
.timeline .tl b{font-family:var(--f-mono);font-size:.82rem;color:var(--ink)}
.timeline .tl i{font-style:normal;color:var(--ink-3)}
.timeline .tl em{font-style:normal;color:var(--ink-2)}
.timeline .tl.good{border-color:var(--gold);background:var(--gold-wash)}
.timeline .tl.bad{border-color:var(--madder);background:var(--madder-wash)}
.rulesbox{margin:.5rem 0 .8rem;font-size:.9rem;color:var(--ink-2)}
.rulesbox summary{cursor:pointer;font-family:var(--f-mono);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--gold)}
.rulesbox ol{margin:.6rem 0 .4rem 1.2rem;padding:0;line-height:1.55}
.rulesbox li{margin:.3rem 0}
.rules-wrap{margin-top:0;margin-bottom:1.6rem}
.rules{display:block;border-left:2px solid var(--gold);padding:.2rem 0 .2rem 1.1rem;margin:1.2rem 0 0;max-width:none;width:100%}
.rules .eyebrow{display:block;margin-bottom:.35rem}
.rules p{margin:0;font-size:.98rem;line-height:1.65;color:var(--ink-2)}
.pill.manual{opacity:.75}
.nav-pills .pill{letter-spacing:.05em;padding:.42rem .42rem;font-size:.66rem}
.sitefoot{width:100%;margin-top:4rem;border-top:1px solid var(--rule);padding:2rem var(--pad) 2.4rem;display:flex;flex-direction:column;align-items:center;gap:.9rem;text-align:center}
.disclaimer + .disclaimer{border-top:0;padding-top:.4rem}
.sitefoot .sf-priv{max-width:78ch;font-family:var(--f-display);font-style:italic;font-weight:300;font-size:.98rem;line-height:1.6;color:var(--ink-2)}
.sitefoot nav{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem 1.4rem;font-family:var(--f-mono);font-size:.72rem;letter-spacing:.08em;text-transform:uppercase}
.sitefoot nav a{color:var(--ink-3);text-decoration:none}
.sitefoot nav a:hover{color:var(--gold)}

/* ============ PRIVACY CHOICES BANNER (4 Nov 2026) ============ */
.nvc-banner{position:fixed;z-index:90;left:50%;transform:translateX(-50%);bottom:max(12px,env(safe-area-inset-bottom,0px));
  width:min(760px,calc(100% - 24px));background:var(--surface);color:var(--ink);border:1px solid var(--gold);border-radius:4px;
  box-shadow:0 10px 40px rgba(0,0,0,.28);padding:1rem 1.15rem 1rem;display:flex;flex-direction:column;gap:.6rem;
  max-height:calc(100vh - 24px);overflow:auto}
.nvc-banner[hidden],.nvc-modal[hidden]{display:none}
.nvc-top{display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap}
.nvc-title{font-family:var(--f-display);font-size:1.12rem;font-weight:600;margin:0;line-height:1.25}
.nvc-text{font-size:.86rem;line-height:1.6;color:var(--ink-2);margin:0}
.nvc-banner[lang="hi"] .nvc-text,.nvc-modal[lang="hi"] .nvc-text,.nvc-modal[lang="hi"] .nvc-cat p{font-family:var(--f-deva),var(--f-body);font-size:.9rem;line-height:1.75}
.nvc-gpc{font-size:.8rem;color:var(--madder);margin:0}
.nvc-actions{display:flex;flex-wrap:wrap;gap:.5rem}
/* the three choices carry equal weight: same size, same colour, same order every time */
.nvc-btn{flex:1 1 150px;font:inherit;font-family:var(--f-mono);font-size:.74rem;letter-spacing:.06em;cursor:pointer;
  padding:.7rem .9rem;border-radius:2px;border:1px solid var(--ink);background:var(--ink);color:var(--paper)}
.nvc-btn:hover{background:var(--gold);border-color:var(--gold);color:#171C28}
.nvc-btn:focus-visible,.nvc-lang button:focus-visible,.nvc-close:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.nvc-lang{display:inline-flex;border:1px solid var(--rule-strong);border-radius:2px;overflow:hidden}
.nvc-lang button{font:inherit;font-size:.74rem;padding:.3rem .65rem;background:transparent;border:0;color:var(--ink-2);cursor:pointer}
.nvc-lang button[aria-pressed="true"]{background:var(--gold-wash);color:var(--ink);font-weight:600}
.nvc-small{font-size:.76rem;color:var(--ink-3);margin:0}
.nvc-modal{position:fixed;inset:0;z-index:95;background:rgba(10,12,18,.55);display:flex;align-items:center;justify-content:center;padding:12px}
.nvc-panel{position:relative;width:min(620px,100%);max-height:calc(100vh - 24px);overflow:auto;background:var(--surface);color:var(--ink);
  border:1px solid var(--gold);border-radius:4px;padding:1.2rem 1.25rem;display:flex;flex-direction:column;gap:.75rem}
.nvc-cat{border:1px solid var(--rule);border-radius:3px;padding:.75rem .85rem;background:var(--paper);display:flex;flex-direction:column;gap:.35rem}
.nvc-cat p{margin:0;font-size:.82rem;line-height:1.55;color:var(--ink-2)}
.nvc-cat-head{display:flex;align-items:center;justify-content:space-between;gap:.8rem;cursor:pointer}
.nvc-cat-name{font-weight:640;font-size:.92rem}
.nvc-always{font-family:var(--f-mono);font-size:.66rem;letter-spacing:.08em;text-transform:uppercase;color:var(--gold)}
.nvc-switch{position:relative;width:42px;height:24px;flex:none}
.nvc-switch input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer}
.nvc-switch span{position:absolute;inset:0;border-radius:12px;background:var(--rule-strong);transition:background .15s}
.nvc-switch span::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s}
.nvc-switch input:checked + span{background:var(--gold)}
.nvc-switch input:checked + span::after{transform:translateX(18px)}
.nvc-switch input:focus-visible + span{outline:2px solid var(--gold);outline-offset:2px}
.nvc-switch input:disabled + span{opacity:.45}
.nvc-panel .nvc-top{padding-right:2.4rem}
.nvc-close{position:absolute;top:.75rem;right:.6rem;width:32px;height:32px;font-size:1.3rem;line-height:1;background:none;border:0;color:var(--ink-3);cursor:pointer}
@media(max-width:520px){.nvc-banner{padding:.85rem .9rem;gap:.5rem}.nvc-banner .nvc-text{font-size:.8rem;line-height:1.5}.nvc-btn{flex:1 1 40%;padding:.62rem .5rem}.nvc-btn[data-act="custom"],.nvc-btn[data-act="save"]{flex-basis:100%}}
.sitefoot nav button.sf-link{font:inherit;background:none;border:0;padding:0;color:var(--ink-3);cursor:pointer;letter-spacing:inherit;text-transform:inherit}
.sitefoot nav button.sf-link:hover{color:var(--gold)}
/* ============ JANMA YANTRA (22 Nov 2026) ============ */
.hcard.wide.jy-home{border-style:solid;border-color:var(--gold);background:var(--gold-wash)}
.sky-go2{margin-top:.5rem;background:transparent!important;color:#E3B84A!important}
.sky-go2:hover{background:rgba(227,184,74,.12)!important}
.jy-stage{position:relative;width:min(560px,100%);margin-inline:auto;border-radius:3px;overflow:hidden;box-shadow:0 14px 44px rgba(0,0,0,.28);
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;background:#0A0E1A;aspect-ratio:2100/2970}
.jy-stage canvas{display:block;width:100%;height:auto;pointer-events:none}
.jy-stage .jy-veil{position:absolute;inset:0}
.jy-stage .jy-wait{position:absolute;inset:0;display:grid;place-items:center;padding:2rem;text-align:center;color:#C9C4B4;font-size:.92rem;line-height:1.6}
.jy-tag{font-family:var(--f-mono);font-size:.66rem;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);text-align:center;margin-top:.6rem}
.jy-dl{display:flex;flex-wrap:wrap;gap:.5rem}
@media(min-width:640px){#jy-form{grid-template-columns:1fr 1fr}}
#jy-read{margin-top:.4rem}
@media print{.jy-stage{display:none}}
.jy-dl-h{font-family:var(--f-mono);font-size:.66rem;letter-spacing:.13em;text-transform:uppercase;color:var(--gold);margin:1rem 0 .1rem}
/* the home-page sky, shown again on the Janma Yantra page (the one canvas is moved in and out) */
.jy-sky{position:relative;width:100%;height:clamp(400px,48vw,540px);border-radius:4px;overflow:hidden;border:1px solid rgba(217,174,73,.28);
  background:radial-gradient(60% 50% at 50% 88%, rgba(14,24,52,.7) 0%, rgba(8,13,30,.4) 45%, transparent 75%), #030509;color:#D3D7DF}
.jy-sky canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:pan-y}
.jy-sky-cap{position:absolute;top:0;left:0;right:0;padding:clamp(.9rem,2.2vw,1.4rem) clamp(.9rem,2.2vw,1.4rem) 2.2rem;display:flex;flex-direction:column;gap:.3rem;pointer-events:none;
  background:linear-gradient(to bottom, rgba(3,5,9,.82) 0%, rgba(3,5,9,.55) 60%, transparent 100%)}
.jy-sky-cap .e{font-family:var(--f-mono);font-size:.66rem;letter-spacing:.18em;text-transform:uppercase;color:#D9AE49}
.jy-sky-cap b{font-family:var(--f-display);font-weight:600;font-size:clamp(1.1rem,1rem + .7vw,1.5rem);line-height:1.2;color:#EDEBE3;text-wrap:balance}
.jy-sky-cap .s{font-size:.8rem;line-height:1.45;color:#9AA3BA;max-width:34rem}
.jy-sky-replay{position:absolute;right:.9rem;bottom:.9rem;font-family:var(--f-mono);font-size:.64rem;letter-spacing:.1em;text-transform:uppercase;cursor:pointer;
  background:rgba(3,5,9,.72);color:#F0D58C;border:1px solid rgba(217,174,73,.55);border-radius:2px;padding:.5rem .75rem}
.jy-sky-replay:hover{background:rgba(217,174,73,.18)}
.jy-sky-replay:focus-visible{outline:2px solid #D9AE49;outline-offset:2px}
.jy-sky-replay[hidden]{display:none}
@media(max-width:640px){.jy-sky{height:380px}.jy-sky-cap .s{display:none}}
@media print{#jy-sky-wrap{display:none}}
#jy-sky-wrap{margin-top:1.4rem}
#jy-print-head{margin-top:1.9rem;margin-bottom:.9rem}
#jy-print-head h3{margin:0}
mark.confirm{background:#FDE68A;color:#171C28;padding:0 .25em;border-radius:2px;font-weight:600}
.sitefoot .sf-fine{max-width:78ch;font-size:.78rem;color:var(--ink-3);line-height:1.55}

/* ============ HOME: THE CHALDEAN SKY ============
   A deliberately night-only band in both themes: it is a window onto the sky,
   so it keeps its own fixed palette rather than following the page tokens. */
.sky-band{
  --sky-bg:#030509; --sky-panel:rgba(3,5,9,.8); --sky-ink:#D3D7DF; --sky-ink-2:#B6BCC9; --sky-ink-3:#9AA3BA;
  --sky-gold:#D9AE49; --sky-gold-hi:#F0D58C; --sky-rule:rgba(217,174,73,.28);
  position:relative;width:var(--wide);margin-top:clamp(1.4rem,3vw,2.2rem);
  height:clamp(500px,50vw,600px);border-radius:4px;overflow:hidden;border:1px solid var(--sky-rule);
  background:radial-gradient(ellipse at 50% 48%,#13224A 0%,#0A1430 45%,var(--sky-bg) 80%);color:var(--sky-ink);
}
.sky-band canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:pan-y}
.sky-nogl{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:2rem;text-align:center;color:var(--sky-ink-3)}
.sky-copy{position:absolute;top:0;left:0;max-width:27rem;padding:clamp(1rem,2.4vw,1.6rem);display:flex;flex-direction:column;gap:.45rem;pointer-events:none}
.sky-eye{font-family:var(--f-mono);font-size:.64rem;letter-spacing:.16em;text-transform:uppercase;color:var(--sky-gold)}
.sky-title{font-family:var(--f-display);font-weight:500;font-size:clamp(1.02rem,.94rem + .4vw,1.25rem);line-height:1.25;color:var(--sky-ink-2);margin:0}
.sky-sub{font-size:.84rem;line-height:1.55;color:var(--sky-ink-2)}
.sky-box{
  position:absolute;top:clamp(.8rem,2vw,1.2rem);right:clamp(.8rem,2vw,1.2rem);width:min(290px,40%);
  max-height:calc(100% - 2*clamp(.8rem,2vw,1.2rem));overflow:auto;
  background:var(--sky-panel);border:1px solid var(--sky-rule);border-radius:3px;
  padding:1rem 1.05rem;display:flex;flex-direction:column;gap:.75rem;backdrop-filter:blur(4px);
}
.sky-box label{font-family:var(--f-mono);font-size:.64rem;letter-spacing:.13em;text-transform:uppercase;color:var(--sky-ink-3)}
.sky-box input{
  font-family:var(--f-mono);font-size:1.05rem;letter-spacing:.08em;padding:.6rem .75rem;width:100%;
  background:var(--sky-bg);color:var(--sky-ink);border:1px solid rgba(217,174,73,.5);border-radius:2px;color-scheme:dark;
}
.sky-box input:focus{outline:2px solid var(--sky-gold);outline-offset:1px}
.sky-field{display:flex;flex-direction:column;gap:.35rem}
.sky-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.5rem}
/* the 12-hour time picker: hour, minutes, am/pm (shared by the home sky and the Janma Yantra page) */
.tp{display:flex;align-items:center;gap:.25rem;min-width:0}
.tp select{min-width:0;flex:1 1 0;font-family:var(--f-mono);letter-spacing:0;cursor:pointer}
.tp select:last-child{flex:1.15 1 0}
.tp .tp-colon{font-family:var(--f-mono);color:var(--ink-3);flex:none}
.tp.tp-need select:last-child{outline:2px solid var(--gold);outline-offset:1px}
.tp select{-webkit-appearance:none;appearance:none;text-align:center;text-align-last:center}
.sky-box .tp select{font-size:.95rem;padding:.6rem .2rem}
/* three boxes do not fit beside the date in the narrow sky panel: the time takes its own row */
.sky-box .sky-row{grid-template-columns:minmax(0,1fr)}
.field .tp select{height:2.9rem;padding:.4rem .3rem}
.sky-box #sky-dob{letter-spacing:.02em;font-size:.98rem;padding:.6rem .55rem;min-width:0}
.sky-opt{text-transform:none;letter-spacing:0;font-family:var(--f-body);color:var(--sky-ink-3);opacity:.85}
.sky-box select{font-family:var(--f-body);font-size:.85rem;padding:.55rem .6rem;width:100%;background:var(--sky-bg);color:var(--sky-ink);border:1px solid rgba(217,174,73,.5);border-radius:2px;color-scheme:dark}
.sky-box select:focus{outline:2px solid var(--sky-gold);outline-offset:1px}
.sky-box #sky-place{font-family:var(--f-body);font-size:.95rem;letter-spacing:0}
.sky-hint{font-size:.7rem;line-height:1.4;color:var(--sky-ink-3)}
.sky-pos li.lagna b{color:var(--sky-gold)}
.sky-pos .dot.ring{background:transparent!important;border:2px solid var(--sky-gold);box-sizing:border-box}
.sky-pos{list-style:none;margin:.45rem 0 0;padding:0;display:grid;grid-template-columns:1fr;gap:.32rem;font-size:.82rem;color:var(--sky-ink-2);font-variant-numeric:tabular-nums}
.sky-pos li{display:flex;align-items:center;gap:.5rem;min-width:0}
.sky-pos .dot{width:8px;height:8px;border-radius:50%;flex:none}
.sky-pos b{color:var(--sky-ink);font-weight:600}
.sky-fine{font-size:.72rem;line-height:1.5;color:var(--sky-ink-3)}
.sky-go{
  font:inherit;font-family:var(--f-mono);font-size:.66rem;letter-spacing:.1em;text-transform:uppercase;cursor:pointer;
  background:var(--sky-gold);color:#12151E;border:1px solid var(--sky-gold);border-radius:2px;padding:.6rem .7rem;font-weight:700;
}
.sky-go:hover{background:var(--sky-gold-hi)}
@media(max-width:760px){
  .sky-band{height:auto;display:flex;flex-direction:column}
  .sky-copy{position:static;max-width:none}
  .sky-band canvas{position:relative;inset:auto;height:360px}
  .sky-box{position:static;width:auto;max-height:none;margin:0 .8rem .8rem}
}

/* ============ ONE NIGHT SKY, WHOLE PAGE ============
   The whole app now takes the Chaldean sky's palette in every theme, so the
   home sky and the tools below read as one piece. The triple :root out-ranks
   both the dark media block and the [data-theme] blocks above. */
:root:root:root{
  color-scheme:dark;
  --paper:#030509;
  --surface:#111A2D;
  --surface-2:#16213A;
  --ink:#D3D7DF;
  --ink-2:#B6BCC9;
  --ink-3:#9AA3BA;
  --rule:#253255;
  --rule-strong:#3A4870;
  --gold:#D9AE49;
  --gold-bright:#F0D58C;
  --gold-wash:rgba(217,174,73,.12);
  --madder:#E0806F;
  --madder-wash:rgba(224,128,111,.13);
  --indigo:#9DB2F2;
  --shadow:rgba(0,0,0,.45);
  --verdigris:#63C3B0;
  --verdigris-wash:rgba(99,195,176,.14);
  --violet:#A294EC;
  --violet-wash:rgba(162,148,236,.14);
  --lac:#E486AE;
  --lac-wash:rgba(228,134,174,.13);
  --porcelain:#5FB6DA;
  --mark-fg:#030509;
  --logo-ink:#D3D7DF;
  --logo-rule:#5B6A92;
  --logo-gold:#D9AE49;
  --logo-soft:#A8843A;
  --logo-soft2:#95773A;
  --logo-desc:#9AA3BA;
}
/* a faint fixed starfield behind everything; cards sit on top of it */
body{
  background-color:var(--paper);
  background-image:
    radial-gradient(1px 1px at 23px 41px, rgba(243,239,230,.55), transparent 60%),
    radial-gradient(1px 1px at 131px 97px, rgba(243,239,230,.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 197px 13px, rgba(240,213,140,.5), transparent 60%),
    radial-gradient(1px 1px at 61px 181px, rgba(220,230,255,.4), transparent 60%),
    radial-gradient(1px 1px at 167px 211px, rgba(243,239,230,.3), transparent 60%),
    radial-gradient(1px 1px at 241px 143px, rgba(243,239,230,.45), transparent 60%);
  background-size:260px 260px;
  background-attachment:fixed;
}
.topnav{background:rgba(3,5,9,.9);backdrop-filter:blur(6px)}
/* the menu bar is black on every page, so the selected tab is always gold, whatever the theme rules below say */
.topnav .pill[aria-current="page"]{color:#D9AE49!important;border-color:#D9AE49!important;background:rgba(217,174,73,.12)!important}
/* Tool pages: one navy field. Page, cards, inner tiles and inputs all share it,
   and panels are told apart by their borders alone; the gold and red washes
   drop to a faint tint so highlighted cards no longer turn brown or maroon.
   The home page keeps its black sky. */
body[data-view]:not([data-view="home"]){
  color-scheme:light;
  --paper:#E8E7E0;
  --surface:#F3F2EC;
  --surface-2:#DEDDD4;
  --ink:#171C28;
  --ink-2:#3D4457;
  --ink-3:#5F6579;
  --rule:#C9C7BC;
  --rule-strong:#A6A497;
  --gold:#8F6F1C;
  --gold-bright:#B58C24;
  --gold-wash:rgba(181,140,36,.14);
  --madder:#8E3E32;
  --madder-wash:rgba(142,62,50,.10);
  --indigo:#2C4272;
  --shadow:rgba(23,28,40,.09);
  --verdigris:#2C6D60;
  --verdigris-wash:rgba(44,109,96,.13);
  --violet:#4E3E93;
  --violet-wash:rgba(78,62,147,.13);
  --lac:#9B2F5F;
  --lac-wash:rgba(155,47,95,.12);
  --porcelain:#16617F;
  --mark-fg:#F3F2EC;
}
/* Home: no navy at all. Cards sit on the same black as the sky, and are lifted
   off it with a gold hairline, a soft drop shadow and a corner arrow, so they
   read as things to press. On hover they rise and the edge warms. */
body[data-view="home"]{
  --surface:#05080F;
  --surface-2:#05080F;
  --rule:#1C2333;
  --rule-strong:#2C3550;
}
body[data-view="home"] .hcard{
  position:relative;
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 40%), #05080F;
  border:1px solid rgba(217,174,73,.38);
  box-shadow:0 1px 0 rgba(255,255,255,.05) inset, 0 10px 28px rgba(0,0,0,.7), 0 0 0 1px rgba(0,0,0,.6);
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body[data-view="home"] .hcard::after{
  content:"\2192";position:absolute;top:.9rem;right:1rem;
  font-family:var(--f-mono);font-size:.95rem;color:var(--gold);opacity:.55;
  transition:transform .18s ease, opacity .18s ease;
}
body[data-view="home"] .hcard:hover,
body[data-view="home"] .hcard:focus-visible{
  transform:translateY(-3px);
  border-color:var(--gold);
  background:linear-gradient(180deg, rgba(217,174,73,.07), rgba(217,174,73,0) 55%), #05080F;
  box-shadow:0 1px 0 rgba(255,255,255,.06) inset, 0 16px 36px rgba(0,0,0,.8), 0 0 22px rgba(217,174,73,.16);
}
body[data-view="home"] .hcard:hover::after,
body[data-view="home"] .hcard:focus-visible::after{opacity:1;transform:translateX(3px)}
@media (prefers-reduced-motion: reduce){
  body[data-view="home"] .hcard, body[data-view="home"] .hcard::after{transition:none}
  body[data-view="home"] .hcard:hover, body[data-view="home"] .hcard:focus-visible{transform:none}
}
/* the menu bar stays black on tool pages, so it keeps the night-sky inks */
body[data-view]:not([data-view="home"]) .topnav{
  color-scheme:dark;
  --paper:#030509; --ink:#D3D7DF; --ink-2:#B6BCC9; --ink-3:#9AA3BA;
  --rule:#19213A; --gold:#D9AE49; --gold-wash:rgba(217,174,73,.12);
}
/* Tool pages: black at the sides, the navy field only behind the content column
   (the 1120px content width plus a little air), edged with a hairline. */
body[data-view]:not([data-view="home"]){
  background-color:#030509;
  background-image:
    radial-gradient(1px 1px at 23px 41px, rgba(243,239,230,.55), transparent 60%),
    radial-gradient(1px 1px at 131px 97px, rgba(243,239,230,.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 197px 13px, rgba(240,213,140,.5), transparent 60%),
    radial-gradient(1px 1px at 61px 181px, rgba(220,230,255,.4), transparent 60%),
    radial-gradient(1px 1px at 167px 211px, rgba(243,239,230,.3), transparent 60%),
    radial-gradient(1px 1px at 241px 143px, rgba(243,239,230,.45), transparent 60%),
    linear-gradient(to right,
      /* the stone panel follows the content width (--wide, up to 75% / 1400px) plus 2rem each side, so text never runs onto the black */
      transparent calc(50% - var(--wide)/2 - 2rem), #E8E7E0 calc(50% - var(--wide)/2 - 2rem), #E8E7E0 calc(50% + var(--wide)/2 + 2rem), transparent calc(50% + var(--wide)/2 + 2rem));
  background-size:260px 260px,260px 260px,260px 260px,260px 260px,260px 260px,260px 260px,100% 100%;
  background-repeat:repeat,repeat,repeat,repeat,repeat,repeat,no-repeat;
  background-attachment:fixed;
}
body[data-view]:not([data-view="home"]) .topnav{background:rgba(3,5,9,.94)}
/* Bold is rationed. Inside running text an emphasised word now gets the
   brighter ink colour at medium weight, which is enough to find it on a scan
   without the page shouting. Full bold is kept for the places where missing a
   word matters: warnings, cautions and the chart's own number summary. */
b, strong{font-weight:500 !important;color:var(--ink)}
.warn b, .warn strong,
.card.warn b, .wblock.warn b, .hero-pick.warn b,
.compound-box.bad b, .readout .r.bad b, .empty-read b,
.chip.rule, .rbadge{font-weight:650 !important}
.proto-q{font-weight:560}
.sky-pos b{font-weight:500 !important}
.hero{
  border-bottom:0;padding-bottom:0;
  background:radial-gradient(60% 50% at 50% 88%, rgba(14,24,52,.7) 0%, rgba(8,13,30,.4) 45%, transparent 75%);
}
/* the sky runs edge to edge and melts into the page instead of sitting in a box */
.sky-band{
  width:calc(100% + 2*var(--pad));max-width:none;margin-inline:calc(-1*var(--pad));
  border:0;border-radius:0;background:transparent;
}
.sky-band::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:90px;pointer-events:none;
  background:linear-gradient(to bottom, transparent, var(--paper));
}
/* the headline block sits at the left edge of the 1120px column. It is moved there with left, not padding:
   on wide screens a large left padding inside a fixed width left the text a few pixels wide, one word per line */
.sky-copy{left:max(0px, calc((100% - var(--wide))/2));padding-left:var(--pad);max-width:none;width:min(24rem,40%)}
.sky-nogl[hidden]{display:none}
.sky-band canvas{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 70px,#000 calc(100% - 70px),transparent);mask-image:linear-gradient(to bottom,transparent 0,#000 70px,#000 calc(100% - 70px),transparent)}
.sky-band{height:clamp(560px,50vw,660px)}
@media(max-width:760px){.sky-band{height:auto}.sky-copy{width:auto;left:auto}}
.sky-box{right:max(var(--pad), calc((100% - var(--wide))/2));z-index:1}
@media(max-width:760px){ .sky-box{margin:0 var(--pad) 1rem} .sky-band::after{display:none} }
