/* =========================================================
   AstroCapitalX - Financial Astrology Portal
   Design System + Component Library
   ========================================================= */

/* ---------- 1. Design tokens --------------------------------- */
:root {
  /* Cosmic palette - warmer dawn tones with sun-lit centre */
  --void:         #0F1036;
  --midnight:     #1A1A50;
  --deep:         #23235E;
  --panel:        #1E1E5B;
  --panel-2:      #28286E;
  --elev:         #303085;
  --hairline:     rgba(255, 255, 255, 0.10);
  --hairline-2:   rgba(255, 255, 255, 0.18);

  /* Brand accents */
  --gold:         #E5B437;
  --gold-soft:    #F4D06F;
  --gold-deep:    #B8860B;
  --saffron:      #FF8C42;
  --violet:       #8B5CF6;
  --violet-soft:  #A78BFA;
  --starlight:    #E7E7FF;

  /* AI accent - gold (brand) */
  --ai:           #E5B437;
  --ai-soft:      #F4D06F;
  --ai-glow:      rgba(229, 180, 55, 0.15);
  --ai-border:    rgba(229, 180, 55, 0.35);

  /* Market semantics */
  --bull:         #22C55E;
  --bull-soft:    #86EFAC;
  --bear:         #EF4444;
  --bear-soft:    #FCA5A5;
  --neutral:      #94A3B8;

  /* Info / blue accents - for non-financial signals (links, info banners) */
  --info:         #60A5FA;
  --info-soft:    #93C5FD;

  /* Extended accents - for planet/zodiac colour maps that have no semantic token.
     Dark = the saturated value used across the JS colour maps (so dark is unchanged). */
  --orange:       #F97316;  /* Ketu, Scorpio, Udveg */
  --pink:         #F472B6;  /* Libra */
  --yellow:       #FACC15;  /* Sagittarius, Labh */
  --sky:          #38BDF8;  /* Aquarius */
  --lilac:        #C084FC;  /* Pisces */
  /* "ink" variants - coloured TEXT that can sit on a faint tint of its OWN hue
     (Navtara cells, choghadiya cards, red-zone banners). Dark = bright (reads on the
     dark tint); the light override deepens them for AA on the pale tint. */
  --bull-ink:     #22C55E;
  --bear-ink:     #EF4444;
  --gold-ink:     #E5B437;
  --violet-ink:   #A78BFA;

  /* Text - raised contrast floor for readability */
  --text:         #F9F3E8;
  --text-muted:   #D4CBB6;  /* was #C8BFA8 - raised for AAA contrast */
  --text-dim:     #BEB2A6;  /* was #A39487 - raised for AAA contrast (~7:1 on --void) */

  /* Radius & shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-gold: 0 10px 40px rgba(229, 180, 55, 0.25);

  /* Gradients - lit from above AND below, mid-tone belly */
  /* --grad-cosmic was DELETED 2026-09-25: it had zero consumers after the 2026-09-19 background
     rewrite and still carried rgba(139,92,246) - violet, which the founder ruled out of the page
     background (the old AstroWealth prototype look). Never reintroduce it; test/background-palette
     .test.js fails if it returns. The real background lives in section 3 below. */
  --grad-gold:   linear-gradient(135deg, #FFE49A 0%, #F4D06F 40%, #E5B437 70%, #B8860B 100%);
  --grad-violet: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%);
  --grad-panel:  linear-gradient(180deg, rgba(50,46,110,0.75) 0%, rgba(30,26,80,0.88) 100%);

  /* Typography.
     ⚠️ Devanagari is NOT handled here - see the [lang="hi"] block at the end of this
     file. Appending 'Noto Sans Devanagari' to these stacks was tried on 2026-09-04 and
     MEASURED NOT TO WORK: canvas measureText at 200px gives Devanagari 2363.4 in Noto
     alone, but 2414.8 in "Inter" alone and 2404.4 in "Inter, Noto" - i.e. the browser
     treats Inter as covering Devanagari, so a Noto listed after it is never reached.
     ("ZZNope, Noto" DOES give 2363.4, proving per-glyph fallback itself is fine.) */
  --ff-display: 'Cormorant Garamond', 'Cormorant Fallback', 'Cormorant Fallback Android', Georgia, serif;
  --ff-body:    'Inter', 'Inter Fallback', 'Inter Fallback Android', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ff-mono:    'JetBrains Mono', 'JetBrains Mono Fallback', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ─── Editorial-Sanctum scoped tokens (Phase 2 redesign) ───────
   Pages opt-in via body class="editorial". Untouched pages
   keep cosmic-indigo defaults above. ─────────────────────────── */
body.editorial,
body.admin-editorial {  /* 2026-07-30: sadmin gets the same warm espresso tokens as the site (was cosmic-indigo) */
  --grad-panel:  linear-gradient(180deg, rgba(58, 36, 25, 0.75) 0%, rgba(33, 19, 12, 0.88) 100%);
  --void:        #1a0e08;
  --midnight:    #14080a;
  --deep:        #21130c;
  --panel:       #2a1b12;
  --panel-2:     #3a2419;
  --elev:        #4a2e1f;
  --hairline:    rgba(229, 180, 55, 0.18);
  --hairline-2:  rgba(229, 180, 55, 0.35);

}
/* ⚠️ `admin-editorial` must be listed alongside `editorial` here. It was missing, so the
   admin console alone rendered the background at FULL strength while every other app-shell
   page got 0.4 - which is why the graduation looked wrong on /sadmin first. */
body.editorial .cosmic-bg::before,
body.admin-editorial .cosmic-bg::before,
body.editorial .cosmic-bg::after,
body.admin-editorial .cosmic-bg::after { opacity: 0.4; }
body.editorial .cosmic-bg .stars,
body.admin-editorial .cosmic-bg .stars { opacity: 0.2; }

/* Editorial-scoped nav + footer retints (Phase 2) - only apply
   on pages that opted in via body.editorial. Untouched pages
   keep the original cosmic-indigo header/footer. */
body.editorial .nav,
body.shop-page .nav {
  background: rgba(26, 14, 8, 0.82);
  border-bottom-color: rgba(229, 180, 55, 0.18);
}
body.editorial .brand-mark,
body.shop-page .brand-mark {
  background: rgba(20, 8, 10, 0.95);
  border-color: rgba(229, 180, 55, 0.4);
}
body.editorial #acx-footer,
body.shop-page #acx-footer {
  background: rgba(20, 8, 10, 0.98);
  border-top-color: rgba(229, 180, 55, 0.22);
}
body.editorial #acx-footer .acx-sec,
body.editorial #acx-footer .acx-social a,
body.shop-page #acx-footer .acx-sec,
body.shop-page #acx-footer .acx-social a {
  border-color: rgba(229, 180, 55, 0.10);
  background: rgba(229, 180, 55, 0.05);
}
body.editorial #acx-footer .acx-social a:hover,
body.shop-page #acx-footer .acx-social a:hover {
  background: rgba(229, 180, 55, 0.12);
  border-color: rgba(229, 180, 55, 0.28);
}
body.editorial #acx-footer .acx-fp,
body.shop-page #acx-footer .acx-fp {
  border-color: rgba(229, 180, 55, 0.18);
}
body.editorial #acx-footer .acx-fp:hover,
body.shop-page #acx-footer .acx-fp:hover {
  border-color: rgba(229, 180, 55, 0.40);
}
/* Editorial footer typography - gold-tinted links match the umber palette.
   Selector specificity (body.X + #acx-footer + .acx-fc + a) beats the inline
   default rule in footer.ejs without needing !important. Geo-pills (.acx-fp)
   keep their own colour treatment above. */
body.editorial #acx-footer .acx-fc a,
body.shop-page #acx-footer .acx-fc a {
  color: var(--gold-soft);
}
body.editorial #acx-footer .acx-fc a:hover,
body.shop-page #acx-footer .acx-fc a:hover {
  color: var(--gold);
}
body.editorial #acx-footer .acx-fh,
body.shop-page #acx-footer .acx-fh {
  color: rgba(244, 208, 111, 0.6);
}
/* Regulatory disclaimer: gold-emphasis on the bold callouts.
   !important is required because the <strong> tags have inline
   color:rgba(255,255,255,.42) attributes set in footer.ejs. */
body.editorial #acx-footer .acx-sec p strong,
body.shop-page #acx-footer .acx-sec p strong {
  color: var(--gold) !important;
}

/* ---------- 2. Reset ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }

body {
  font-family: var(--ff-body);
  background: var(--void);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- 3. Cosmic background: dawn over a planet's limb --------------
   THIRD iteration, and the reasoning matters because two have already failed.
   (1) A repeating-conic SUNBURST was retired 2026-09-16: a generic point-source
       burst says nothing about what this product computes.
   (2) A graduated SIDEREAL BEZEL replaced it and failed for a different reason -
       radial ticks on a full-viewport arc read as bunting, and once the ticks were
       removed what remained was a lone hairline that read as a scratch on a flat
       field. Founder rejected it 2026-09-19.
   The lesson from (2): hairlines drawn on a FLAT field will always look wispy. So
   this iteration replaces the field itself. Three layers, all warm:
     .cosmic-bg          - a layered amber/espresso atmosphere with real depth
     .cosmic-bg::before  - the LIMB: a planet edge below the fold, lit along its rim
     .cosmic-bg::after   - the SKY WHEEL: 12 rashi spokes + 27 nakshatra ticks
   ⚠️ NO VIOLET ANYWHERE IN THIS BACKGROUND (founder, 2026-09-19): purple reads as
   the old AstroWealth prototype. `--violet` stays a UI token; it must not appear
   here. Keep every stop in the gold/amber/espresso family. */
.cosmic-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 66% 50% at 16% 0%,   rgba(229, 180, 55, 0.15) 0%, transparent 62%),
    radial-gradient(ellipse 56% 44% at 86% 0%,   rgba(244, 208, 111, 0.11) 0%, transparent 64%),
    radial-gradient(ellipse 90% 58% at 50% 110%, rgba(6, 4, 2, 0.82) 0%, transparent 74%),
    linear-gradient(168deg, #1e1209 0%, #18100a 46%, #0d0806 100%);
}

/* ── THE LIMB ─────────────────────────────────────────────────────────────────
   A planet's edge, mostly below the fold, lit along its rim with atmosphere
   falling off above it. This is what gives the page mass; the previous two
   iterations had none, which is why hairlines on them read as scratches.

   Geometry: a 240vmax square whose centre sits BELOW the viewport, so only the
   top of the circle arcs into view. `closest-side` makes the gradient radius
   exactly half the box (120vmax), so the stop percentages resolve predictably
   at any viewport - at 1440x900 the rim lands ~705px down, below the CTA row.
   ⚠️ THE STOPS ARE % OF THE GRADIENT RADIUS, NOT OF THE ELEMENT. Getting that
   wrong once put the rim ~400px below the fold and the layer looked "broken"
   while being perfectly correct. If you move `bottom`, recompute the stops.
   Order of the four stops, outward from the centre: body, rim, near
   atmosphere, far atmosphere. */
.cosmic-bg::before {
  content: '';
  position: absolute;
  bottom: -193vmax;
  left: 50%;
  transform: translateX(-50%);
  width: 240vmax;
  height: 240vmax;
  pointer-events: none;
  background-image: radial-gradient(circle closest-side at 50% 50%,
    rgba(8, 5, 3, 0.50)      0      71.80%,   /* planet body, deepens the lower page */
    rgba(255, 228, 154, 0.36) 72.00% 72.22%,  /* the lit rim */
    rgba(229, 180, 55, 0.15)  72.45% 73.90%,  /* near atmosphere */
    rgba(229, 180, 55, 0.05)  74.40% 77.00%,  /* far atmosphere */
    transparent 79.50%);
}

/* ── THE SKY WHEEL ───────────────────────────────────────────────────────────
   A chart wheel bleeding off the left edge, balancing the transit dial that
   sits on the right of the home hero. Divisions are REAL - 12 rashi spokes and
   27 nakshatra ticks, the same divisions the engine works in - so the structure
   encodes a quantity rather than decorating (the one principle worth keeping
   from the retired bezel).

   ⚠️ IT IS A MASK, NOT AN IMAGE, AND THAT IS LOAD-BEARING. The SVG's strokes are
   white; the INK comes from `background-color`, so the light theme is a one-line
   colour swap instead of a second asset. `stroke-opacity` inside the SVG carries
   the visual hierarchy into the mask alpha. Never change it to background-image
   or the light partner has to fork the file.
   ⚠️ Versioned filename: `public/` is served immutable for a year, so editing the
   wheel means shipping `sky-wheel-v2.svg`, not overwriting v1. */
.cosmic-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: rgba(255, 228, 154, 0.22);
  -webkit-mask: url("/img/sky-wheel-v1.svg") no-repeat -215px 150px / 800px 800px;
          mask: url("/img/sky-wheel-v1.svg") no-repeat -215px 150px / 800px 800px;
}

/* ⚠️ THE WHEEL MUST SHRINK ON NARROW VIEWPORTS. At 800px it is wider than a phone
   screen, so it stops reading as a watermark and collides with the transit dial -
   seen at 504px, not predicted. Scaled and pulled further off-canvas here, and
   quietened, since a large form on a small screen reads much louder.
   ⚠️ THE VERTICAL OFFSET IS IN PIXELS, NOT PER CENT, AND THAT IS DELIBERATE. A `%`
   position resolves against the viewport HEIGHT, so the wheel slid up behind the
   page eyebrow on short viewports - where a stroke crossing that small text drops
   its light-theme contrast to 3.51:1, under the 4.5 AA floor (measured 2026-09-19,
   not eyeballed). A fixed offset keeps it below the eyebrow at every height. */
@media (max-width: 900px) {
  .cosmic-bg::after {
    background-color: rgba(255, 228, 154, 0.16);
    -webkit-mask-size: 480px 480px;
            mask-size: 480px 480px;
    -webkit-mask-position: -150px 200px;
            mask-position: -150px 200px;
  }
}

/* ⚠️ THE STAR FIELD MOVES BY TRANSFORM, NEVER BY background-position (2026-10-24).
   Animating background-position repainted this full-screen, ten-gradient layer on
   EVERY frame, forever, on every dark-theme page: measured at 375px, scrolling ran
   at ~30 fps (median frame 33 ms) and at a steady 60 fps with the layer hidden. A
   transform only moves an already-painted layer on the compositor. The layer starts
   one tile (800px) up and left and slides one tile, so the pattern is in exactly the
   phase it was before and the loop is seamless; both parents clip it (overflow:hidden). */
.cosmic-bg .stars, .cosmic .stars {
  position: absolute; top: -800px; left: -800px; right: 0; bottom: 0;
  max-width: none; /* utilities.css caps every div at 100% under 480px, which would squeeze the layer back to the viewport */
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 80% 20%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 10% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 35% 15%, rgba(255,228,154,0.8), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 85% 90%, rgba(255,255,255,0.7), transparent);
  background-size: 800px 800px;
  opacity: 0.35;
  will-change: transform;
  animation: drift 240s linear infinite;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(800px, 800px, 0); }
}

/* ---------- 4. Layout ---------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

/* ---------- 5. Typography ------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.h-display { font-size: clamp(40px, 6vw, 72px); font-weight: 500; }
.h-xl      { font-size: clamp(32px, 4vw, 48px); }
.h-lg      { font-size: clamp(26px, 3vw, 36px); }
.h-md      { font-size: 22px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--gold);
}
.text-muted { color: var(--text-muted); }
.text-dim   { color: var(--text-dim); }
.text-gold  { color: var(--gold); }
.text-bull  { color: var(--bull); }
.text-bear  { color: var(--bear); }
.text-mono  { font-family: var(--ff-mono); }

.gradient-text {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { font-size: 18px; color: var(--text-muted); max-width: 60ch; }

/* ---------- 6. Buttons --------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: all .2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-gold {
  background: var(--grad-gold);
  color: #1A1200;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 46px rgba(229,180,55,.38); }
.btn-ghost {
  border: 1px solid var(--hairline-2);
  color: var(--text);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--gold); }
.btn-violet {
  background: var(--grad-violet);
  color: #fff;
}
.btn-lg { padding: 16px 32px; font-size: 15px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- 7. Cards ----------------------------------------- */
.card {
  background: var(--grad-panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
  backdrop-filter: blur(20px);
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: var(--hairline-2); }
.card-accent {
  background: linear-gradient(180deg, rgba(229,180,55,0.08) 0%, rgba(16,16,58,0.9) 100%);
  border-color: rgba(229,180,55,0.25);
}
.card-tight { padding: 20px; }
.card-title { font-family: var(--ff-display); font-size: 24px; margin-bottom: 8px; }

/* ---------- 8. Top ticker ------------------------------------ */
.ticker-bar {
  background: rgba(13, 11, 46, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  height: 38px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}
.ticker-track {
  display: flex;
  gap: 48px;
  animation: ticker 28s linear infinite;
  white-space: nowrap;
  padding-left: 48px;
}
.ticker-item { /* raised from 12.5px → 14px for financial readability */
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono);
  font-size: 13.5px;
  color: var(--text-muted);
}
.ticker-item strong { color: var(--text); font-weight: 600; }
.ticker-item .up   { color: var(--bull); }
.ticker-item .down { color: var(--bear); }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- 9. Navigation ------------------------------------ */
.nav {
  position: sticky; top: 0;
  z-index: 1000;
  overflow: visible;
  background: rgba(23, 20, 69, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
  overflow: visible;
  padding: 0 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand > span:not(.brand-mark) {
  background: linear-gradient(135deg, #F5CF6B, #E5B437);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(10,11,46,0.9);
  border: 1px solid rgba(229,180,55,0.4);
  box-shadow: 0 0 0 1px rgba(229,180,55,0.12), 0 0 18px rgba(229,180,55,0.25);
  flex-shrink: 0;
  overflow: hidden;
}
.brand-mark svg { display: block; }
.nav-menu {
  display: flex; align-items: center; gap: 2px;
}
/* white-space:nowrap (2026-07-09): with 9 top-level items + the Free Tools trigger, the row
   is wider than its flex container at any real desktop width once .nav-inner hits its
   1280px max-width. Without nowrap, flex shrinks each <a> below its content width and the
   browser wraps multi-word labels ("Free Tools", "Talk to Astrologer") onto a second line -
   they stay vertically centered by align-items:center, so they render several px lower/
   taller than the single-line items beside them (the reported "menu not aligned" bug).
   Trimmed horizontal padding + gap buys back enough width that the row fits on one line
   down to the raised 1300px breakpoint below; nowrap makes any future overflow spill
   past the row instead of silently wrapping into this same misaligned state. */
.nav-menu a, .nav-ft-trigger {
  padding: 10px 9px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  transition: color .2s ease;
  position: relative;
  white-space: nowrap;
}
.nav-menu a:hover { color: var(--text); }
.nav-menu a.active { color: var(--gold); }
.dd-arrow { display:inline-flex;align-items:center;margin-left:3px;transition:transform .25s ease; }
.has-dropdown:hover .dd-arrow { transform:rotate(180deg); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* Nav breakpoint raised 960→1300 (2026-07-09): at the old 960px cutoff, the desktop nav
   showed from 960px all the way up - but even at full HD (1920px) width .nav-inner's
   1280px max-width plus the 60px theme-toggle gutter (below) left only ~1196px for
   brand+menu+cta, ~90-140px short of what 9 items + Free Tools + the CTA pill need on
   one line. Verified live (Playwright, logged-in + simulated logged-out) that the
   trimmed padding above fits with margin to spare starting at 1301px; below that the
   existing, already-working mobile hamburger drawer takes over instead of a half-wrapped
   desktop row. This is scoped to the nav only - do NOT change the sitewide 960px
   breakpoint used by unrelated components (hero-grid, tiers, footer-grid, etc.). */
@media (max-width: 1300px) {
  .nav-menu { display: none; }
}

/* ---------- 10. Hero ----------------------------------------- */
.hero {
  padding: 96px 0 64px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}
.hero h1 { margin: 20px 0 24px; }
.hero .lead { margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust {
  display: flex; gap: 32px; margin-top: 48px;
  padding-top: 32px; border-top: 1px solid var(--hairline);
}
.hero-trust .stat strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 32px;
  color: var(--gold);
}
.hero-trust .stat span {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* ---------- 11. Zodiac wheel --------------------------------- */
.zodiac-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin: 0 auto;
}
.zodiac-wheel {
  width: 100%; height: 100%;
  animation: spin 120s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.zodiac-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 52%; aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(22,22,70,0.95), rgba(11,11,46,0.95));
  border: 1px solid rgba(229,180,55,0.3);
  display: grid; place-items: center;
  text-align: center;
  padding: 24px;
  box-shadow: 0 0 80px rgba(229,180,55,0.12), inset 0 0 40px rgba(139,92,246,0.12);
}
.zodiac-center .label {
  font-size: 12px; letter-spacing: 0.2em;
  color: var(--gold); text-transform: uppercase;
}
.zodiac-center .value {
  font-family: var(--ff-display);
  font-size: 36px; color: var(--text);
  margin: 8px 0 4px;
}
.zodiac-center .sub {
  font-size: 12px; color: var(--text-muted);
}

/* ---------- 12. Forecast preview card ------------------------ */
.forecast-card {
  background: var(--grad-panel);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-xl);
  padding: 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
}
.forecast-head {
  display: flex; justify-content: space-between; align-items: start;
  margin-bottom: 20px;
}
.forecast-head .tag {
  font-size: 12px; padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(34,197,94,0.12);
  color: var(--bull);
  border: 1px solid rgba(34,197,94,0.3);
  font-weight: 600; letter-spacing: 0.08em;
}
.forecast-price {
  font-family: var(--ff-mono);
  font-size: 32px; font-weight: 600;
}
.forecast-change { color: var(--bull); font-size: 14px; margin-top: 4px; }
.forecast-chart { height: 140px; margin: 20px 0; }
.forecast-planets {
  display: flex; justify-content: space-between;
  padding-top: 20px; border-top: 1px solid var(--hairline);
}
.forecast-planets .p {
  text-align: center; font-size: 12px; color: var(--text-muted);
}
.forecast-planets .p .glyph {
  font-size: 22px; color: var(--gold); display: block; margin-bottom: 4px;
}

/* ---------- 13. Feature tiles -------------------------------- */
.feature {
  background: var(--grad-panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
}
.feature:hover { border-color: rgba(229,180,55,0.35); transform: translateY(-4px); }
.feature::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(400px at 100% 0, rgba(229,180,55,0.08), transparent 50%);
  pointer-events: none;
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(229,180,55,0.15), rgba(139,92,246,0.12));
  border: 1px solid rgba(229,180,55,0.25);
  margin-bottom: 20px;
}
.feature h3 {
  font-family: var(--ff-display);
  font-size: 24px;
  margin-bottom: 8px;
}
.feature p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- 14. Process steps -------------------------------- */
.process {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  position: relative;
}
.process::before {
  content: ''; position: absolute;
  top: 40px; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}
.step { text-align: center; padding: 0 16px; }
.step-num {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--ff-display);
  font-size: 28px;
  margin: 0 auto 20px;
  background: var(--midnight);
  border: 1px solid var(--hairline-2);
  color: var(--gold);
  position: relative; z-index: 1;
}
.step h4 { font-size: 22px; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 14.5px; }

@media (max-width: 960px) {
  .process { grid-template-columns: 1fr; }
  .process::before { display: none; }
}

/* ---------- 15. Pricing tiers -------------------------------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .tiers { grid-template-columns: 1fr; } }

.tier {
  background: var(--grad-panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 36px 28px;
  position: relative;
  display: flex; flex-direction: column;
}
.tier-popular {
  border-color: rgba(229,180,55,0.5);
  background: linear-gradient(180deg, rgba(229,180,55,0.08), rgba(22,22,70,0.95));
  box-shadow: 0 20px 60px rgba(229,180,55,0.1);
  transform: scale(1.02);
}
.tier-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  padding: 6px 16px;
  background: var(--grad-gold);
  color: #1A1200;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; letter-spacing: 0.15em;
}
.tier h3 {
  font-family: var(--ff-display);
  font-size: 28px; margin-bottom: 8px;
}
.tier .tier-desc { color: var(--text-muted); font-size: 14px; min-height: 44px; }
.tier-price {
  margin: 24px 0; padding: 24px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.tier-price .amount {
  font-family: var(--ff-display);
  font-size: 48px; font-weight: 500;
}
.tier-price .unit { color: var(--text-muted); font-size: 14px; }
.tier-features { margin-bottom: 28px; flex: 1; }
.tier-features li {
  padding: 10px 0;
  display: flex; gap: 10px;
  font-size: 14px; color: var(--text);
  border-bottom: 1px dashed var(--hairline);
}
.tier-features li:last-child { border: 0; }
.tier-features .check {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(34,197,94,0.15); color: var(--bull);
  display: grid; place-items: center;
  font-size: 12px;
}
.tier-features .cross {
  width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.05); color: var(--text-dim);
  display: grid; place-items: center;
  font-size: 12px;
}
.tier-features li.off { color: var(--text-dim); }

/* ---------- 16. Testimonials --------------------------------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .testimonials { grid-template-columns: 1fr; } }
.quote {
  background: var(--grad-panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  position: relative;
}
.quote-mark {
  font-family: var(--ff-display); font-size: 80px; line-height: 0.6;
  color: var(--gold); opacity: 0.35;
  position: absolute; top: 20px; right: 20px;
}
.quote p {
  font-size: 15.5px; line-height: 1.65;
  margin-bottom: 20px;
  color: var(--text);
}
.quote-who {
  display: flex; align-items: center; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--hairline);
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad-violet);
  display: grid; place-items: center;
  font-weight: 600; color: #fff;
}
.quote-who strong { display: block; font-size: 14px; }
.quote-who span { font-size: 12px; color: var(--text-muted); }

/* ---------- 17. FAQ ------------------------------------------ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--hairline);
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: 22px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
}
.faq-q .plus {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--hairline-2);
  display: grid; place-items: center;
  transition: all .3s ease;
  color: var(--gold);
  flex-shrink: 0;
}
.faq-item.open .plus { transform: rotate(45deg); background: rgba(229,180,55,0.1); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
  color: var(--text-muted);
  font-size: 15px;
  padding: 0 0;
}
.faq-item.open .faq-a { max-height: 300px; padding: 0 0 22px; }

/* ---------- 18. Contact form --------------------------------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px;
  align-items: start;
}
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info .contact-row {
  display: flex; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.contact-info .contact-row:last-child { border: 0; }
.contact-info .icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: rgba(229,180,55,0.1);
  color: var(--gold);
}
.contact-info strong { display: block; font-size: 13px; color: var(--text-muted); }
.contact-info p { font-size: 15px; }

.contact-form {
  background: var(--grad-panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 32px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(5,6,28,0.6);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-md);
  color: var(--text);
  transition: border-color .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 110px; }

/* ---------- 19. Footer --------------------------------------- */
footer {
  padding: 72px 0 32px;
  margin-top: 48px;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, transparent 0%, rgba(43,36,94,0.4) 40%, rgba(51,43,108,0.6) 100%);
  position: relative;
}
footer::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 900px 400px at 50% 100%, rgba(229,180,55,0.12) 0%, transparent 70%);
  pointer-events: none;
}
footer > * { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.footer-col h5 {
  font-family: var(--ff-body);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--gold); margin-bottom: 20px;
}
.footer-col li { padding: 6px 0; }
.footer-col a { color: var(--text-muted); font-size: 14px; }
.footer-col a:hover { color: var(--text); }

.footer-about p { color: var(--text-muted); font-size: 14px; margin: 16px 0 20px; }
.social { display: flex; gap: 10px; }
.social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--hairline-2);
  color: var(--text-muted);
  transition: all .2s ease;
}
.social a:hover { color: var(--gold); border-color: var(--gold); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 13px; color: var(--text-dim);
}
.footer-bottom .links { display: flex; gap: 20px; }


/* ─── Editorial enhancements (gold/serif treatment, global) ─────
   Applied site-wide so internal pages match the homepage's
   editorial sanctum styling. Use the utility classes below. */

/* Italic gold-soft accent inside any heading: <h2>Yours <em>truly</em></h2> */
h1 em, h2 em, h3 em, .h-italic-em {
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--gold-soft);
  font-weight: 500;
}

/* Gold eyebrow strip - small uppercase letterspaced gold above a section */
.editorial-eyebrow {
  font-family: var(--ff-body);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.editorial-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.editorial-eyebrow.center {
  display: flex;
  justify-content: center;
}
.editorial-eyebrow.center::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

/* Editorial display headline - Cormorant italic, larger */
.editorial-h {
  font-family: var(--ff-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 12px;
}

/* Widget head - promote h3 title to serif when card has .editorial-card */
.editorial-card .widget-head h3,
.widget.editorial-card h3 {
  font-family: var(--ff-display);
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
  color: var(--gold-soft);
  letter-spacing: 0.01em;
}

/* Gold-bordered glow card variant for highlighted CTAs */
.editorial-card {
  border: 1px solid var(--hairline-2);
  background: linear-gradient(180deg, rgba(229,180,55,0.04), var(--panel));
  box-shadow: 0 10px 40px rgba(229, 180, 55, 0.08);
}

/* Quote block (editorial pull-quote) */
.editorial-quote {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--text);
  padding: 24px 28px;
  border-left: 2px solid var(--gold);
  background: rgba(229,180,55,0.04);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.editorial-quote::before {
  content: '“';
  font-family: var(--ff-display);
  font-size: 56px;
  line-height: 0;
  color: var(--gold-soft);
  opacity: 0.5;
  margin-right: 6px;
  vertical-align: -16px;
}

/* Page hero pattern - eyebrow + display headline + lead */
.page-hero {
  padding: 28px 0 36px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 28px;
}
.page-hero .lead {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 64ch;
  line-height: 1.6;
  margin: 4px 0 0;
}

/* ─── Editorial app shell - when body has .editorial class, the
   dashboard sidebar/search/icons/cards swap to warm gold-on-brown
   so internal pages match the homepage palette. ─────────────── */
body.editorial .sidebar {
  background: rgba(42, 27, 18, 0.75);
  border-right-color: rgba(229, 180, 55, 0.22);
}
body.editorial .search-box,
body.editorial .icon-btn {
  background: rgba(42, 27, 18, 0.5);
  border-color: rgba(229, 180, 55, 0.22);
}
body.editorial .widget,
body.editorial .card {
  background: linear-gradient(180deg, rgba(229, 180, 55, 0.05), rgba(26, 14, 8, 0.7));
  border-color: rgba(229, 180, 55, 0.18);
}
body.editorial .welcome-card {
  background: linear-gradient(135deg, rgba(229,180,55,0.10), rgba(26,14,8,0.85));
  border-color: rgba(229, 180, 55, 0.28);
}
body.editorial .natal-chip {
  background: rgba(229, 180, 55, 0.06);
  border: 1px solid rgba(229, 180, 55, 0.18);
  color: var(--gold-soft);
}
body.editorial .natal-chip strong { color: var(--gold); }
/* Sidebar menu hover/active under editorial */
body.editorial .sidebar-menu a:hover {
  background: rgba(229, 180, 55, 0.08);
  color: var(--gold-soft);
}
body.editorial .sidebar-menu a.active {
  background: linear-gradient(90deg, rgba(229,180,55,0.20), transparent);
}
/* Section labels (sidebar) - gold under editorial */
body.editorial .sidebar-menu .section-label {
  color: rgba(244, 208, 111, 0.55);
}
/* Brand mark in dashboard sidebar */
body.editorial .sidebar .brand {
  border-bottom: 1px solid rgba(229, 180, 55, 0.15);
}
/* Top app-header tweaks */
body.editorial .app-header {
  border-bottom: 1px solid rgba(229, 180, 55, 0.12);
}

/* ─── AI Analyst shared widget - highlighted with green outline ──
   The shared partial (dashboard + birth-chart) gets a vivid bull-green
   border + soft green glow so the AI feature stands out as a hero.
   Targeted by .widget.ai-card.editorial-card to avoid bleeding onto
   the persona Mercury/Jupiter cards which also use .ai-card. ────── */
.widget.ai-card.editorial-card {
  border: 1.5px solid var(--bull) !important;
  background: linear-gradient(180deg, rgba(34,197,94,0.06), rgba(229,180,55,0.03)) !important;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.10), 0 12px 40px rgba(34,197,94,0.10);
  border-radius: var(--r-lg);
  position: relative;
}
.widget.ai-card.editorial-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(ellipse 600px 200px at 50% 0%, rgba(34,197,94,0.10), transparent 60%);
}
.widget.ai-card.editorial-card > * { position: relative; z-index: 1; }
/* Green Ask AI button (inside the AI Analyst widget only) */
.widget.ai-card.editorial-card .btn-ai {
  background: linear-gradient(135deg, #34D399, #22C55E) !important;
  border: 1px solid rgba(34,197,94,0.5) !important;
  color: var(--void) !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  box-shadow: 0 6px 20px rgba(34,197,94,0.25);
}
.widget.ai-card.editorial-card .btn-ai:hover {
  background: linear-gradient(135deg, #4ADE80, #22C55E) !important;
  box-shadow: 0 8px 28px rgba(34,197,94,0.40);
}

/* ─── Mercury / Jupiter persona cards - distinct accent colours ──
   Mercury (markets) → bull green outline + glow.
   Jupiter (personal/family/life) → violet outline + glow.
   Applied on both /chat-with-astrologer and /talk-to-astrologer
   where the cards carry data-persona. ─────────────────────────── */
.ai-card[data-persona="mercury"] {
  border: 1.5px solid var(--bull) !important;
  background: linear-gradient(180deg, rgba(34,197,94,0.08), rgba(22,22,70,0.85)) !important;
  box-shadow: 0 8px 32px rgba(34,197,94,0.18);
}
.ai-card[data-persona="mercury"]::before {
  background: radial-gradient(circle, rgba(34,197,94,0.18), transparent 60%) !important;
}
.ai-card[data-persona="mercury"]:hover {
  border-color: #4ADE80 !important;
  box-shadow: 0 14px 44px rgba(34,197,94,0.30);
}
.ai-card[data-persona="mercury"] .btn-gold {
  background: linear-gradient(135deg, #34D399, #22C55E) !important;
  color: var(--void) !important;
}
.ai-card[data-persona="mercury"] .btn-gold:hover {
  background: linear-gradient(135deg, #4ADE80, #22C55E) !important;
}

.ai-card[data-persona="jupiter"] {
  border: 1.5px solid var(--violet) !important;
  background: linear-gradient(180deg, rgba(139,92,246,0.10), rgba(22,22,70,0.85)) !important;
  box-shadow: 0 8px 32px rgba(139,92,246,0.20);
}
.ai-card[data-persona="jupiter"]::before {
  background: radial-gradient(circle, rgba(139,92,246,0.18), transparent 60%) !important;
}
.ai-card[data-persona="jupiter"]:hover {
  border-color: var(--violet-soft) !important;
  box-shadow: 0 14px 44px rgba(139,92,246,0.32);
}
.ai-card[data-persona="jupiter"] .btn-gold {
  background: linear-gradient(135deg, var(--violet-soft), var(--violet)) !important;
  color: var(--text) !important;
}
.ai-card[data-persona="jupiter"] .btn-gold:hover {
  background: linear-gradient(135deg, #C4B5FD, var(--violet)) !important;
}

/* ── Mobile: prevent iOS Safari auto-zoom on input focus - form controls must be ≥16px (added 2026-05-27) ── */
@media (max-width: 960px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,
  textarea { font-size: 16px !important; }
}

/* ============================================================
   LIGHT MODE - html[data-theme="light"]; mirrors mobile "Almanac".
   Scoped to body: beats body.editorial (0,2,2 > 0,1,1)
   AND leaves sadmin dark. Auto-detect + remembered toggle. (2026-06-07)
   ============================================================ */
/* Light mode applies to EVERY page including sadmin (founder call 2026-08-26).
   Previously scoped `body:not(.admin-editorial)` so admin was dark-only; briefly split
   via a `.themable` opt-in, which left two pages behaving unlike the other 43 - the
   inconsistency was the reason to finish the job rather than keep opting pages in. */
html[data-theme="light"] body {
  --void:        #FBF6EA;
  --midnight:    #F1E7D2;
  --deep:        #EFE3C6;
  --panel:       #FFFFFF;
  --panel-2:     #FBF3DF;
  --elev:        #F4ECD8;
  --hairline:    #E7D9B5;
  --hairline-2:  #D9C79A;

  --gold:        #7A5C12;   /* text/links - 5.8:1 on parchment */
  --gold-soft:   #7A5C12;   /* used as TEXT across the site → must be readable */
  --gold-deep:   #5E4710;
  --saffron:     #B5530F;
  --violet:      #5D4BC0;
  --violet-soft: #5D4BC0;  /* used as TEXT site-wide (tag-pro, PRO chips, order tracking) → AA on parchment AND faint violet tints (deepened 2026-06-26) */
  --starlight:   #5A4410;

  --ai:          #7A5C12;
  --ai-soft:     #C9A227;
  --ai-glow:     rgba(201,162,39,0.12);
  --ai-border:   rgba(122,92,18,0.30);

  --bull:        #176B30;
  --bull-soft:   #176B30;  /* used as TEXT site-wide → AA on parchment AND faint green tints (deepened 2026-06-26) */
  --bear:        #A8380A;
  --bear-soft:   #A8380A;
  --neutral:     #6E5C28;
  --info:        #1E54C9;
  --info-soft:   #1E54C9;  /* used as TEXT (connecting banner, moon labels) → AA on parchment + faint blue tints (deepened 2026-06-26) */

  /* Extended accents - deepened so planet/zodiac symbols stay AA on white/cream cards */
  --orange:      #AB4E0C;  /* 5.5:1 on white, 4.8:1 on a faint red/orange tint */
  --pink:        #A8174E;  /* 7.3:1 on white */
  --yellow:      #8A6800;  /* 5.2:1 on white, 4.7:1 on gold tint */
  --sky:         #1F6FB2;  /* 5.3:1 on white */
  --lilac:       #7A3FB0;  /* 6.6:1 on white */
  /* "ink" variants - aliases of the (deepened) base accents; coloured TEXT on a faint tint of its own hue */
  --bull-ink:    #176B30;
  --bear-ink:    #A8380A;
  --gold-ink:    #7A5C12;
  --violet-ink:  #5D4BC0;

  --text:        #2A2417;   /* 14.3:1 */
  --text-muted:  #5A4410;   /* 8.6:1 */
  --text-dim:    #6E5C28;   /* verified >=4.5:1 */

  --shadow-sm:   0 4px 16px rgba(150,120,40,0.10);
  --shadow-md:   0 10px 40px rgba(150,120,40,0.14);
  --shadow-gold: 0 10px 40px rgba(229,180,55,0.22);

  --grad-gold:   linear-gradient(135deg, #E7C66A 0%, #C9A227 55%, #7A5C12 100%);
  --grad-violet: linear-gradient(135deg, #8B7BE0 0%, #6D5BD0 100%);
  --grad-panel:  linear-gradient(180deg, #FFFFFF 0%, #FBF3DF 100%);

  background: var(--void);
  color: var(--text);
}

/* Light-mode "daytime sky": the dark theme gets warmth + depth from the global
   background, and light mode must not flatten to plain parchment. Same three layers
   as dark (atmosphere / limb / sky wheel), re-inked for cream. Stars stay hidden - a
   day sky has none. ⚠️ Every new `.cosmic-bg` rule needs its partner HERE or light
   mode silently breaks: a pale gold vanishes on parchment. Kept faint so the
   worst-case eyebrow/ticker contrast in §2 still holds (measured, not assumed). */
/* 🚨 IN LIGHT MODE THE MARKS ARE *LIGHTER* THAN THE FIELD, NOT DARKER. THIS IS THE WHOLE
   TRICK, AND GETTING IT WRONG IS WHY LIGHT MODE FIRST SHIPPED INVISIBLE (2026-09-19).
   A dark mark on parchment competes with dark text: every stroke it draws UNDER text
   lowers that text's contrast, so AA forces the ink down until the mark disappears -
   the first attempt bottomed out at ink 0.10 and the founder reported, correctly, that
   "no background effects are visible". Inverting it fixes both halves at once: a cream
   stroke RAISES local luminance, so text crossing it gains contrast instead of losing
   it, which means the mark can be bold. Measured 2026-09-19 at the shipped values -
   worst case (limb body over the deepest field): eyebrow 4.66:1, nakshatra-label 4.87:1,
   body 6.91:1; and ON the cream marks the eyebrow rises to 6.09:1 (rim) / 5.97:1 (wheel).
   ⚠️ The binding constraint is therefore the FIELD alone, never the marks. Keep the
   100% stop no darker than #F0E6CC and keep the limb BODY stop under ~0.15, or the
   11px eyebrow drops through 4.5:1. The rim, atmosphere and wheel may be as bright as
   taste allows - they only ever help. */
html[data-theme="light"] body .cosmic-bg {
  background:
    radial-gradient(ellipse 1200px 780px at 50% -6%, rgba(201,162,39,0.26) 0%, rgba(229,180,55,0.12) 26%, transparent 64%),
    radial-gradient(ellipse 1500px 640px at 50% 112%, rgba(201,162,39,0.13) 0%, transparent 62%),
    linear-gradient(180deg, #FDF9F0 0%, #F5EEDA 52%, #F0E6CC 100%);
}
/* Light partner for the LIMB. Geometry is inherited; only the ink changes. The body is a
   faint warm tint (a dark planet on parchment reads as a hole), and the rim + atmosphere
   invert to CREAM so the horizon reads as light breaking over the edge - brighter than
   the sky behind it, which is also what makes it safe to draw boldly (§ above). */
html[data-theme="light"] body .cosmic-bg::before {
  background-image: radial-gradient(circle closest-side at 50% 50%,
    rgba(205, 175, 110, 0.15)  0      71.80%,   /* body - the ONLY contrast-bound stop */
    rgba(255, 254, 249, 0.95)  71.95% 72.38%,   /* rim, cream */
    rgba(255, 252, 242, 0.40)  72.60% 74.00%,
    rgba(255, 250, 236, 0.16)  74.50% 77.50%,
    transparent 80.00%);
}
/* Light partner for the SKY WHEEL - one line, because the wheel is a mask and the
   ink lives in background-color. This is the whole reason it is a mask (§ above).
   ⚠️ CREAM, NOT GOLD - see the light-on-warm note above. A DARK wheel here is what made
   light mode invisible: AA against the 11px eyebrow drove the ink to 0.30 -> 3.51:1,
   0.20 -> 3.95:1, 0.12 -> 4.32:1, 0.10 -> 4.57:1, i.e. the only passing value was one
   nobody could see. Cream inverts the problem - it lifts the background under the text
   (eyebrow 5.97:1 ON a stroke, against 4.66:1 off it), so it can be nearly opaque. */
html[data-theme="light"] body .cosmic-bg::after { background-color: rgba(255, 253, 247, 0.90); }
@media (max-width: 900px) {
  html[data-theme="light"] body .cosmic-bg::after { background-color: rgba(255, 253, 247, 0.80); }
}
html[data-theme="light"] body .cosmic-bg .stars { display: none; }

/* The star field is the only ambient motion on the page; honour the OS setting. */
@media (prefers-reduced-motion: reduce) {
  .cosmic-bg .stars, .cosmic .stars { animation: none; }
}

/* ── SIDEREAL RULE ────────────────────────────────────────────────────────────
   The page background's bezel motif, flattened into a horizontal graduation for
   use under a console page header. Same divisions as `.cosmic-bg::before`:
   27 major ticks (nakshatras) and 108 minor (27 x 4 padas), so the two devices
   are the same instrument seen from different angles rather than two decorations.
   Percentages in the gradient resolve against the element, so it regraduates
   itself at any width - no media queries, no fixed tick count.
   Purely additive: fixed height, no effect on surrounding layout. */
.sidereal-rule {
  height: 12px;
  margin: 18px 0 2px;
  border-bottom: 1px solid var(--hairline-2);
  background-image:
    linear-gradient(90deg, var(--gold) 0 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-2) 0 1px, transparent 1px);
  background-size: calc(100% / 27) 11px, calc(100% / 108) 6px;
  background-position: 0 bottom, 0 bottom;
  background-repeat: repeat-x, repeat-x;
  opacity: 0.55;
  pointer-events: none;
}
html[data-theme="light"] body .sidereal-rule { opacity: 0.7; }
html[data-theme="light"] body .sun-ray { opacity: 0.25; }

/* Theme toggle button (injected by the head script) */
.theme-toggle {
  position: fixed; top: 14px; right: 14px; z-index: 1200;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--gold);
  border: 1px solid var(--hairline-2); cursor: pointer;
  box-shadow: var(--shadow-sm); font-size: 18px; line-height: 1;
  transition: transform .15s, background .2s;
}
.theme-toggle:hover { transform: scale(1.06); }
@media (max-width: 640px) { .theme-toggle { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 16px; } }

/* Light-mode: relight dark-hardcoded chrome so foreground stays readable (2026-06-07) */
/* Market ticker ribbon (2026-07-08): the old flat --panel-2 fill was within ~3 values of the
   parchment page, so the scrolling strip vanished into the nav. Give it a warm, slightly
   deeper gradient band + a defined bottom edge so it reads as a distinct data ribbon above
   the nav. Mono text stays dark ink / bull-green / bear-rust - all AA on the deeper cream. */
html[data-theme="light"] body .ticker-bar {
  background: linear-gradient(180deg, #F5ECD5 0%, #EFE3C4 100%);
  border-bottom: 1px solid var(--hairline-2);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.5);
}
html[data-theme="light"] body .ticker-item { color: var(--neutral); }
html[data-theme="light"] body .nav { background: rgba(251,246,234,0.88); border-bottom-color: var(--hairline); }
html[data-theme="light"] body .brand > span:not(.brand-mark) { -webkit-text-fill-color: var(--gold-deep); background: none; }
html[data-theme="light"] body .zodiac-center { background: radial-gradient(ellipse at 50% 35%, #FBF3DF 0%, #EFE3C6 65%); }

/* ── Light-mode contrast fixes (2026-06-10, founder accessibility report) ── */
/* Mobile nav DRAWER: the dark gradient (in styles.css inline block) is the dark-mode default;
   in light mode flip it to a light surface so the (dark) menu text is readable. */
html[data-theme="light"] body .nav-menu.open {
  background: #FFFDF7 !important;
  border-left-color: var(--hairline);
  box-shadow: -16px 0 50px rgba(40,30,10,0.18);
}
/* FOOTER is a designed DARK surface (it never flips its bg). The 2026-06-07 work var-ized its
   text, so in light mode the text went dark → unreadable on the dark footer. Re-point the
   footer's LOCAL vars back to the dark-theme (light) palette so its text is light again. */
html[data-theme="light"] body footer {
  --text: #F9F3E8; --text-muted: #D4CBB6; --text-dim: #BEB2A6;
  --gold: #E5B437; --gold-soft: #F4D06F; --gold-deep: #B8860B;
  --hairline: rgba(255,255,255,0.10);
}
html[data-theme="light"] body footer a { color: #F4D06F; }
html[data-theme="light"] body footer a:hover { color: #FFFFFF; }
/* Homepage red emphasis hardcodes the dark-mode --bear-soft (#FCA5A5) → washed out on the
   light page; use the light-mode --bear (#C2410C, AA) instead. */
html[data-theme="light"] body .h-emotional .h-section-eyebrow,
html[data-theme="light"] body .h-sebi strong { color: var(--bear); }
/* Badge/status chips (2026-06-10 sweep). Class-based, so a base.css light-mode rule outranks the
   page-inline definitions by specificity. The astrologer TIER badge (.dir-card-badge:not(.ai))
   sits on a hardcoded-dark badge over the dark card image → keep its gold LIGHT (var flipped it
   to dark gold #7A5C12 → 3.08:1). The .ai variants already carry their own light green/purple. */
html[data-theme="light"] body .dir-card-badge:not(.ai) { color: #F4D06F; }
/* Homepage astrologer-card tier badge ("Senior") - same dark-image chip; keep its gold LIGHT.
   Deliberately LOW specificity (0,2,1) so the persona variants (.h-astro[data-persona] …, (0,3,0))
   keep their own green/purple. */
html[data-theme="light"] .h-astro-badge { color: #F4D06F; }
/* "Online" count chip + per-card status labels flipped wrong on light surfaces.
   (.card-status.offline already uses var(--text-dim) - theme-aware.) */
html[data-theme="light"] body .online-count { color: var(--bull); }
html[data-theme="light"] body .card-status.online { color: var(--bull); }
html[data-theme="light"] body .card-status.busy { color: var(--gold); }
/* NOTE: the "Ask AI Astrologer / Mercury or Jupiter · 24×7" audit flags are the FAB hover
   tooltip (#acx-ai-fab-tip, chat-widget.js) - its own bubble is intentionally dark with light
   text, and FABs only render for logged-out visitors. Not a bug; do NOT restyle .sub globally. */

/* ── DARK-by-design surfaces that need the LIGHT (dark-theme) palette in light mode (2026-06-26).
   Same footer pattern: the surface bg stays dark (a hardcoded dark gradient), so the variable-
   driven text would flip to dark ink and vanish. Re-point each surface's LOCAL text vars to the
   light palette so gold/coloured text reads on the dark surface. ── */
/* Tool-page hero BANDS render mid-tan in light mode (body.tool-editorial forces a
   gold→#1a0e08 gradient !important), too dark for the dark-gold heading text (2.6:1) yet too
   light for light text. RELIGHT the band bg to light cream so the dark-gold/ink text reads. */
html[data-theme="light"] body .num-hero,
html[data-theme="light"] body .rashi-hero,
html[data-theme="light"] body .rk-hero,
html[data-theme="light"] body .tool-hero {
  background: linear-gradient(135deg, rgba(229,180,55,0.10), var(--panel-2)) !important;
}
/* Avatar circles (chat/consultation) are a dark radial (#4a3526→#2a1b12); keep initials light. */
html[data-theme="light"] body .card-avatar {
  --gold: #E5B437; --gold-soft: #F4D06F;
}

/* ── Light-mode relight for the editorial APP SHELL - sidebar + dashboard cards (2026-06-08).
   The app-shell (sidebar, search, widgets, cards) uses hardcoded DARK surfaces under
   body.editorial / in pages.css, which the variable-based light theme cannot flip. In light
   mode that left a dark sidebar + dark cards while the variable-driven text turned dark too
   => the left menu and dashboard cards rendered invisible (dark-on-dark). These overrides flip
   those surfaces to light; the already-dark text then reads correctly. Same scope as the
   variable block (body), so sadmin (admin-editorial) stays dark. */
html[data-theme="light"] body .sidebar {
  /* !important needed to beat responsive.css's mobile off-canvas `.sidebar{background:#0a0b2e!important}`
 - otherwise the mobile sidebar drawer stays dark navy in light mode (nav text unreadable). */
  background: var(--elev) !important;
  border-right-color: var(--hairline-2);
}
html[data-theme="light"] body .sidebar .brand { border-bottom-color: var(--hairline); }
html[data-theme="light"] body .sidebar-footer { border-top-color: var(--hairline); }
html[data-theme="light"] body .sidebar-menu a:hover {
  background: rgba(201,162,39,0.12);
  color: var(--gold-deep);
}
html[data-theme="light"] body .sidebar-menu a.active {
  background: linear-gradient(90deg, rgba(201,162,39,0.20), transparent);
  color: var(--gold-deep);
}
html[data-theme="light"] body .sidebar-menu .section-label { color: var(--text-dim); }
html[data-theme="light"] body .search-box,
html[data-theme="light"] body .icon-btn {
  background: var(--panel);
  border-color: var(--hairline-2);
}
html[data-theme="light"] body .app-header { border-bottom-color: var(--hairline); }
html[data-theme="light"] body .widget,
html[data-theme="light"] body .card {
  background: var(--grad-panel);
  border-color: var(--hairline);
}
html[data-theme="light"] body .welcome-card {
  background: linear-gradient(135deg, rgba(109,91,208,0.10), rgba(201,162,39,0.12));
  border-color: var(--hairline-2);
}
html[data-theme="light"] body .natal-chip {
  background: rgba(201,162,39,0.10);
  border-color: rgba(122,92,18,0.20);
}
html[data-theme="light"] body .sector {
  background: var(--panel);
  border-color: var(--hairline);
}
/* dashboard inner-surfaces (dark navy literals) → light inset panels */
html[data-theme="light"] body .transit,
html[data-theme="light"] body .alert,
html[data-theme="light"] body .kv,
html[data-theme="light"] body .yoga-row {
  background: var(--panel-2);
  border-color: var(--hairline);
}
/* astrologer online/busy/offline toggle rail (was dark navy) */
html[data-theme="light"] body .status-toggle {
  background: var(--panel-2);
  border-color: var(--hairline-2);
}
/* Dashboard forecast mini-chart SVG had hardcoded fills (#9F9FC5 axis, #E5B437 planets)
   that turn low-contrast once its card goes light → relight them. (2026-06-08) */
html[data-theme="light"] body #forecastChart text { fill: var(--text-dim); }
html[data-theme="light"] body #forecastChart #fc-planets text { fill: var(--gold-deep); }

/* ============================================================
   Round-3 dark-section relights (2026-06-26)
   A few surfaces still carried a hardcoded dark / semi-transparent-over-dark
   background that the variable-driven light theme never relit. In light mode
   that left a DARK or MID-grey surface behind dark text => the text failed WCAG AA
   regardless of its colour. Each rule below relights one such surface to a LIGHT
   value (so the existing dark text reads) or, for genuinely dark-by-design accents
   (white-on-violet avatars/badge), deepens the saturated bg so white text reads.
   All scoped to html[data-theme="light"] body - dark mode
   and sadmin (admin-editorial) are untouched. Each fix measured on the live site
   with a real-pixel sampler (before -> after contrast noted).
   ============================================================ */

/* --- /pricing : billing-toggle pill --------------------------------------
   .billing-toggle .inner had background:rgba(20,8,10,0.6) (dark pill). The
   inactive "Annual"/"Monthly" gold text and the green .save-badge composited
   onto that dark band. Relight the pill to cream so both read.
   save-badge green #176B30: 1.45 -> ~6.0 ; inactive Annual gold: ~1.7 -> ~7.0 */
html[data-theme="light"] body .billing-toggle .inner {
  background: var(--elev) !important;
}

/* --- /pricing : "White Glove" tier badge ---------------------------------
   .tier-badge-elite is white text on linear-gradient(135deg,#A78BFA,#7C3AED);
   the light #A78BFA stop gave white only 4.00. Deepen the gradient so the
   lightest stop has enough contrast. white on #6D5BD0/#5D4BC0 -> ~6.5 */
html[data-theme="light"] body .tier-badge-elite {
  background: linear-gradient(135deg, #6D5BD0, #5D4BC0) !important;
}

/* --- /astrologers : filter bar behind the 35 chips + count ----------------
   .ax-filter-bar had background:rgba(20,8,10,0.4) (dark) over the cream section
   => an ~rgb(159,151,144) mid-grey behind every chip. The chips are transparent,
   so their gold text + the italic .ax-count sampled that grey.
   chip gold #7A5C12: 2.17 -> 5.64 ; .ax-count #6E5C28: 2.27 -> 5.89 (all 35 fixed at once) */
html[data-theme="light"] body .ax-filter-bar {
  background: var(--panel-2) !important;
}

/* --- /chat-with-astrologer : AI persona cards ----------------------------
   .ai-card[data-persona="mercury"|"jupiter"] used a gradient whose BOTTOM stop
   is rgba(22,22,70,0.85) (dark navy). The lower half of each card rendered dark,
   so the green status line / gold desc / violet text there were invisible.
   Relight each card's gradient bottom to --panel, keeping a faint hue tint up top.
   mercury green status "● Always online": 1.64 -> ~6.0 ; jupiter text similar. */
html[data-theme="light"] body .ai-card[data-persona="mercury"] {
  background: linear-gradient(180deg, rgba(34,197,94,0.10), var(--panel)) !important;
}
html[data-theme="light"] body .ai-card[data-persona="jupiter"] {
  background: linear-gradient(180deg, rgba(139,92,246,0.12), var(--panel)) !important;
}

/* --- /birth-chart : #birthDataCard bottom band ---------------------------
   The card's 2nd child carries an inline background:rgba(0,0,0,0.15) overlay that
   darkened the lower rows (Sun Sign/Moon/Mahadasha/Active Yoga) to ~rgb(208,201,192).
   The coloured labels (gold/blue/green/violet) there measured 3.80–4.04. Replace the
   black overlay with a faint violet tint (keeps the card's two-tone, but light).
   labels: 3.80–4.04 -> 5.25–5.59 */
html[data-theme="light"] body #birthDataCard > div:nth-child(2) {
  background: rgba(139,92,246,0.06) !important;
}

/* --- /dashboard : white-text violet avatars ------------------------------
   #hdr-avatar ("AS") and the dash-reports "JUN" square use --grad-violet
   (#8B7BE0 -> #6D5BD0); the "D1+" square uses #8B5CF6 -> #7C3AED. White text on
   the LIGHT stops gave 3.50 / 4.23. Deepen these gradients (scoped to the dashboard
   avatars only - global --grad-violet untouched). white: 3.50 -> ~5.2 ; 4.23 -> ~4.7 */
html[data-theme="light"] body #hdr-avatar {
  background: linear-gradient(135deg, #6D5BD0, #5D4BC0) !important;
}
html[data-theme="light"] body #dash-reports a > div[style*="grad-violet"] {
  background: linear-gradient(135deg, #6D5BD0, #5D4BC0) !important;
}
html[data-theme="light"] body #dash-reports a > div[style*="8B5CF6"] {
  background: linear-gradient(135deg, #6D4BD0, #5D2BB8) !important;
}

/* --- /calendar : "Currently retrograde" pills ----------------------------
   The retro pills (inline background:rgba(239,68,68,.1)) inside #retroBanner
   (inline rgba(239,68,68,.08)) composited to a pink ~rgb(249,216,206) on which the
   orange Ketu glyph ☋ (#AB4E0C) measured 4.08. Lighten the banner + pill red tints
   so every planet glyph clears AA. Ketu orange: 4.08 -> 4.58 */
html[data-theme="light"] body #retroBanner {
  background: rgba(239,68,68,0.05) !important;
}
html[data-theme="light"] body #retroList > span {
  background: rgba(239,68,68,0.04) !important;
}

/* ============================================================
   Round-4 (2026-06-26)
   Close-out pass on cssVer v20260626c. Two residual classes remained:
   (A) saturated CTA buttons whose label was illegible on the button fill, and
   (B) violet/lavender-tinted chip/card surfaces where deepened text sat just under
   AA. Every item below was measured on the LIVE site with a real rendered-pixel
   sampler (median patch, glyphs excluded) - only genuine sub-4.5 cases were changed.
   NOTE: several audited items did NOT reproduce against real pixels and were left
   as-is after verification - pricing .tier-elite checks/unit/Get-Elite (5.5–6.4),
   the dashboard #birthChartWidget .natal-chips (4.95–5.37), #consultWidget eyebrow
   (5.27) / wallet (5.12) and #forecastBadge (5.15) all already clear AA on v...c
   (the audit's 3.86–4.44 figures came from gradient-averaging, not the real pixel).
   Scoped html[data-theme="light"] body; dark mode untouched.
   ============================================================ */

/* --- Class A : /pricing savings-strip CTA --------------------------------
   .pr-savings-strip .btn-gold "Get Pro Trader" has an inline background:#22C55E;
   color:#fff => white on bright green = 2.28. Darken the fill to the light-theme
   --bull green so the white label reads (keeps the green "savings" identity,
   matching the strip's green accent). white on #176B30 = 6.60. */
html[data-theme="light"] body .pr-savings-strip .btn-gold {
  background: #176B30 !important;
  color: #FFFFFF !important;
}

/* --- Class A : /chat-with-astrologer persona CTAs ------------------------
   .ai-card[data-persona] .btn-gold rendered illegible: Mercury cream #FBF6EA on a
   light-green gradient (#34D399 stop) = 1.94; Jupiter dark #2A2417 on #5D4BC0 = 2.37.
   Give both a consistent treatment - solid DEEP persona colour + white text.
   Mercury white on #176B30 = 6.60 ; Jupiter white on #5D4BC0 = 6.50. */
html[data-theme="light"] body .ai-card[data-persona="mercury"] .btn-gold {
  background: #176B30 !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] body .ai-card[data-persona="jupiter"] .btn-gold {
  background: #5D4BC0 !important;
  color: #FFFFFF !important;
}
/* .badge-ai "AI ASTROLOGER": gold #7A5C12 on its own rgba(229,180,55,0.18) gold chip,
   sitting over the green Mercury card tint + the card's gold ::before glow, composited
   to ~rgb(216,210,168) => 4.07. Relight the chip to opaque cream so the gold reads on
   every persona. gold on --panel-2 (real render ~rgb(231,220,192)) = 4.57. */
html[data-theme="light"] body .ai-card .badge-ai {
  background: var(--panel-2) !important;
}

/* --- Class B : /birth-chart #birthDataCard + cnav PRO chip ----------------
   The card's inline 135deg gradient (violet 0.10 -> cream) plus the Round-3 bottom-band
   overlay (0.06) left the left-column labels tight: Sun Sign gold = 4.63, Mahadasha
   green = 4.98. Pale the card down (violet 0.10 -> 0.06, band 0.06 -> 0.04) for margin.
   Sun Sign 4.63 -> 4.94 ; Moon 5.60 ; Mahadasha 5.23 ; Active Yoga 5.53. */
html[data-theme="light"] body #birthDataCard {
  background: linear-gradient(135deg, rgba(139,92,246,0.06), var(--panel-2)) !important;
}
html[data-theme="light"] body #birthDataCard > div:nth-child(2) {
  background: rgba(139,92,246,0.04) !important;
}
/* #cnav-ashtak / .cnav-pro "PRO" chip: violet #5D4BC0 text on its inline
   rgba(139,92,246,0.25) chip = 4.33. Pale the chip so the violet label reads.
   violet on rgba(139,92,246,0.10) over the cream nav button = 5.18. */
html[data-theme="light"] body #cnav-ashtak span,
html[data-theme="light"] body .cnav-pro span {
  background: rgba(139,92,246,0.10) !important;
}

/* --- Class B (cont.): pale the remaining violet-tinted CARDS so the deepened
   gold/green/violet/blue labels clear AA (were 3.87–4.26 on the lavender tint;
   real-pixel verified, not gradient-averaged). Lowering the violet tint 0.08–0.10→0.04. */
html[data-theme="light"] body .tier-elite {
  background: linear-gradient(180deg, rgba(139,92,246,0.04), var(--panel)) !important;
}
html[data-theme="light"] body #consultWidget {
  background: linear-gradient(135deg, rgba(139,92,246,0.04), var(--panel-2)) !important;
}
html[data-theme="light"] body #birthChartWidget .widget {
  background: linear-gradient(135deg, rgba(139,92,246,0.04), var(--panel-2)) !important;
}

/* ============================================================
   SHOP light theme (2026-06-26) - the shop (body.shop-page, css/shop.css) was built
   dark-only on an --umber-* palette with `background:var(--umber-0)!important` and NO
   light rules, so the light toggle never affected it. Flip the umber palette to the
   light "Almanac" surfaces; the shop's var(--text)/var(--gold)/var(--bull) text already
   flips via the global light block (body.shop-page matches :not(.admin-editorial)). The
   product-image showcase areas (.shop-product-img / .shop-pdp-overlay) use RAW umber
   hexes so they stay a deliberate dark backdrop (clean dark-product-on-light-page) and
   their light tags/badges still read.
   ============================================================ */
html[data-theme="light"] body.shop-page:not(.admin-editorial) {
  --umber-0: #FBF6EA;  /* page bg - parchment */
  --umber-1: #F4ECD8;  /* elev / accent */
  --umber-2: #FBF3DF;  /* cream panel */
  --umber-3: #FFFFFF;  /* cards - white */
  background: var(--umber-0) !important;
}
/* Product-image badges/tags sit on their OWN dark glass (rgba(20,8,10,.85)) over the
   dark product showcase - keep their gold/cream text LIGHT (the var flipped it dark). */
html[data-theme="light"] body.shop-page:not(.admin-editorial) .shop-product-badge,
html[data-theme="light"] body.shop-page:not(.admin-editorial) .shop-pdp-overlay .tag {
  --gold-soft: #F4D06F; --gold: #E5B437; --text: #F9F3E8; --text-muted: #D4CBB6;
}

/* Astrologer-profile portrait (.pf-portrait) is a dark radial-gradient showcase; its
   status/tier badges (.pf-port-live online/offline, "Senior", on their own dark glass)
   had their var(--bull)/--gold/--text-muted text flip dark → unreadable. Re-point the
   portrait's text vars to the LIGHT (dark-theme) palette so the badges read. (2026-06-26) */
html[data-theme="light"] body .pf-portrait {
  --bull: #22C55E; --bear: #EF4444; --gold: #E5B437; --gold-soft: #F4D06F;
  --text: #F9F3E8; --text-muted: #D4CBB6; --text-dim: #BEB2A6;
}

/* ── Light-mode fixes for remaining dark-hardcoded chrome (2026-07-08 design audit). ──
   Same failure pattern as footer/portrait/product-badge above: the surface is a hardcoded
   dark background, but the text uses theme vars → in light mode the vars flip dark → text
   goes invisible/muddy on the dark surface. Re-point the LOCAL vars back to the light
   palette so the text stays legible.
   Client complaint 2026-07-08: Free Tools dropdown headers, "Verified" and "Offline"
   pills on the homepage astrologer cards, blog category chips on post cards. */
/* Free Tools mega-menu in LIGHT theme (desktop): a LIGHT panel to match the cream theme
   (was a dark navy that clashed - founder 2026-10-05). Higher specificity than the base
   .nav-ft-menu in styles.css, so it overrides the navy bg + white links. The mobile drawer
   (<=1300px) stays the transparent light variant handled below. */
@media (min-width: 1301px) {
  html[data-theme="light"] body .nav-ft-menu {
    background: #FFFDF6;
    border-color: rgba(201,162,39,0.35);
    box-shadow: 0 24px 60px rgba(90,60,10,0.18);
  }
  html[data-theme="light"] body .nav-ft-menu a { color: #3A3016; }
  html[data-theme="light"] body .nav-ft-menu a:hover { background: rgba(201,162,39,0.12); color: var(--gold-deep); }
}
/* Homepage astrologer/blog card badges: always dark hardcoded backgrounds regardless of
   viewport, so keep the var remap unconditional. */
html[data-theme="light"] body .h-astro-img,
html[data-theme="light"] body .h-post-img,
html[data-theme="light"] body .h-astro-status,
html[data-theme="light"] body .h-astro-badge,
html[data-theme="light"] body .h-post-cat {
  --gold: #E5B437; --gold-soft: #F4D06F; --gold-deep: #B8860B;
  --text: #F9F3E8; --text-muted: #D4CBB6; --text-dim: #BEB2A6;
  --hairline: rgba(255,255,255,0.10); --hairline-2: rgba(255,255,255,0.18);
}
/* Nav dropdown link overrides - .nav-ft-menu a's rules use hardcoded rgba white, which is
   correct for the DESKTOP dark panel but WRONG for the MOBILE drawer variant (which uses
   a transparent light background - white text becomes invisible). Fix both cases.
   Desktop: keep white text on the dark panel, only re-force the gold header/all-link.
   Mobile drawer (≤1300px, transparent bg): flip link text to the dark editorial ink. */
html[data-theme="light"] body .nav-ft-h,
html[data-theme="light"] body .nav-ft-all { color: #8A6209 !important; }
@media (max-width: 1300px) {
  html[data-theme="light"] body .nav-ft-menu {
    background: transparent;
  }
  html[data-theme="light"] body .nav-ft-menu a {
    color: var(--text);
  }
  html[data-theme="light"] body .nav-ft-menu a:hover {
    background: rgba(201,162,39,0.10);
    color: var(--gold-deep);
  }
  html[data-theme="light"] body .nav-ft-h {
    color: var(--gold-deep) !important;
  }
  html[data-theme="light"] body .nav-ft-all {
    color: var(--gold-deep) !important;
  }
}

/* Active nav link - CSS rule already exists in base.css ("nav-menu a.active { color:
   var(--gold) }"), but nav.ejs never added the .active class. It's now injected server-
   side in nav.ejs based on `currentPath`. This rule tightens it in light theme so the
   active link uses the deep gold (5.8:1 on parchment) instead of the too-light gold-soft
   the base rule would apply. */
html[data-theme="light"] body .nav-menu a.active {
  color: var(--gold-deep);
  font-weight: 600;
}
.nav-ft-trigger.active { color: var(--gold); font-weight: 600; }
html[data-theme="light"] body .nav-ft-trigger.active {
  color: var(--gold-deep);
  font-weight: 600;
}

/* /services icon tiles (2026-07-08): all 15 tile icons hardcode stroke="#F4D06F" directly
   in the inline SVG markup (not a CSS var at all - never adapted for theme). On the
   near-white light-theme badge (rgba(229,180,55,0.08) tint) that's 1.36:1 contrast,
   effectively invisible. Force the readable deep-gold in light mode; dark theme is
   untouched since #F4D06F is correct there. */
html[data-theme="light"] body .tile-ic svg {
  stroke: #B8860B !important;
}

/* Homepage testimonials (2026-07-08, client-flagged with screenshot): the decorative 56px
   quote-glyph (.h-test .quote, position:absolute top:24px/left:24px) visually overlaps the
   first line of .h-test .body by design. In dark theme that's a bright gold glyph over
   near-white text - reads as a nice accent. In light theme both the glyph (var(--gold-soft)
   flips to a dark muted #7A5C12) and the body text (var(--text-muted) #5A4410) become
   similarly dark/muted colors, and the 40%-opacity overlap muddies exactly the first few
   words of every quote. Verified live (Playwright): opacity 0.12 still visibly faded the
   overlapped words; opacity 0 fully resolves it with no other visual regression. Dark theme
   untouched. */
html[data-theme="light"] body .h-test .quote {
  opacity: 0;
}

/* Theme-toggle: was fixed top:14px right:14px, floating awkwardly over the ticker OUTSIDE
   the nav row. It's DOM-appended to <body> by head-public.ejs so we can't easily reparent
   it into the nav - but we CAN reposition its fixed placement to visually sit inside the
   nav row's right edge, aligned with the Log In button. On mobile the layout is tighter
   so nudge it up slightly to clear the hamburger toggle. */
/* Sit it in the top-right corner of the nav row, past the Log In button, so it doesn't
   overlap any nav link. Original was top:14px (above the sticky ticker, over ticker text
 - the actual complaint), we just push it down to the nav-row centre-line. */
.theme-toggle {
  top: 60px !important; right: 14px !important;
  width: 36px; height: 36px; font-size: 15px;
  box-shadow: 0 2px 8px rgba(40,30,10,0.10);
  z-index: 1050;
}
/* Desktop-only: add right-padding to the nav-inner container so the fixed toggle at
   right:14px doesn't visually crash into the Log In button. Kept in sync with the
   .nav-cta hide breakpoint in public/styles.css's appended block (raised 960→1300
   2026-07-09 - see base.css §9 nav comment): nav-cta is only visible, and only needs
   this gutter, at the same width the hamburger switches off. */
@media (min-width: 1301px) {
  .nav-inner { padding-right: 60px; }
}
/* Mobile: no Log In button visible (nav-cta hidden), the hamburger sits at right:14px,
   so the toggle needs to move LEFT of the hamburger to stay clickable. */
@media (max-width: 1300px) {
  .theme-toggle { top: 20px !important; right: 68px !important; }
}
@media (max-width: 640px) {
  .theme-toggle { top: 18px !important; right: 62px !important; width: 34px; height: 34px; font-size: 14px; }
}

/* Lead-gate OTP modal (public/lead-gate.js) inputs - replace the browser's default
   blue focus ring with the site's gold accent (2026-07-07). */
.acx-lg-otp:focus,
#acx-lg-name:focus,
#acx-lg-email:focus {
  outline: none;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(229, 180, 55, .18);
}

/* ── 2026-07-30: warm retint of the two hardcoded-indigo chrome elements on ADMIN pages
   (public non-editorial pages keep cosmic-indigo by design; specificity beats file order) ── */
body.admin-editorial .brand-mark { background: rgba(20, 8, 10, 0.95); }
body.admin-editorial .mobile-nav-toggle { background: rgba(26, 14, 8, 0.95); }

/* ── 2026-07-30: admin pages get the SAME app-shell retints as body.editorial
   (sidebar/search/widgets were still cosmic-indigo on /sadmin/*) ── */
/* !important: responsive.css sets .sidebar and has been beating this since the
   2026-07-30 espresso retint, so every sadmin page rendered the OLD cosmic-indigo
   sidebar in dark mode. Found 2026-08-26 by measuring an untouched admin page. */
body.admin-editorial .sidebar { background: rgba(42, 27, 18, 0.95) !important; border-right-color: rgba(229, 180, 55, 0.22) !important; }
body.admin-editorial .search-box,
body.admin-editorial .icon-btn { background: rgba(42, 27, 18, 0.5); border-color: rgba(229, 180, 55, 0.22); }
body.admin-editorial .widget,
body.admin-editorial .card { background: linear-gradient(180deg, rgba(229, 180, 55, 0.05), rgba(26, 14, 8, 0.7)); border-color: rgba(229, 180, 55, 0.18); }
body.admin-editorial .welcome-card { background: linear-gradient(135deg, rgba(229, 180, 55, 0.10), rgba(26, 14, 8, 0.85)); border-color: rgba(229, 180, 55, 0.28); }
body.admin-editorial .natal-chip { background: rgba(229, 180, 55, 0.06); border: 1px solid rgba(229, 180, 55, 0.18); color: var(--gold-soft); }
body.admin-editorial .natal-chip strong { color: var(--gold); }
body.admin-editorial .sidebar-menu a:hover { background: rgba(229, 180, 55, 0.08); color: var(--gold-soft); }
body.admin-editorial .sidebar-menu a.active { background: linear-gradient(90deg, rgba(229, 180, 55, 0.20), transparent); }
body.admin-editorial .sidebar-menu .section-label { color: rgba(244, 208, 111, 0.55); }
body.admin-editorial .sidebar .brand { border-bottom: 1px solid rgba(229, 180, 55, 0.15); }
body.admin-editorial .app-header { border-bottom: 1px solid rgba(229, 180, 55, 0.12); }

/* ── Article artwork: fit, never crop ──────────────────────────────────────
   Featured images arrive in six different aspect ratios (1.50, 1.75, 1.78,
   1.90, 2.00 and 2.50 : 1) because some are uploaded banners and some come out
   of scripts/generate-blog-images.js. The card boxes were 4/3 and 16/10 with
   background-size:cover, so a 2.00:1 banner in the 1.33:1 featured box lost a
   THIRD of its width - and on these banners the left third is the headline.

   Fix: one 16/9 box everywhere, and `contain` so the whole artwork is always
   visible. The gap around an off-ratio image is filled with a blurred, dimmed
   copy of itself (::before) rather than a flat bar, so it reads as a deliberate
   backdrop. `background: inherit` picks up the inline background-image that the
   templates set per post, so nothing has to be threaded through in markup.
   New uploads of any shape are handled automatically - no image is rewritten.  */
.bl-featured-img,
.bl-card-img,
.bp-related-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: var(--panel);
}

.bl-featured-img::before,
.bl-card-img::before,
.bp-related-img::before {
    content: '';
    position: absolute;
    inset: -12%;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(26px) brightness(0.5) saturate(0.85);
    /* Opaque on purpose: it has to hide the element's own un-blurred background,
       which paints underneath this layer. */
    opacity: 1;
}

.bl-featured-img::after,
.bl-card-img::after,
.bp-related-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* The placeholder variants carry their own artwork, so they must not get the
   blurred/contained treatment layered on top of an empty background. */
.bl-card-img-placeholder::before,
.bl-card-img-placeholder::after { content: none; }

/* The featured card is a 2-column grid, so its image cell stretches to whatever
   height the TEXT column needs. That makes its height definite, and a definite
   height plus `aspect-ratio: 16/9` derives the WIDTH from it - a 415px-tall cell
   computed 737px wide and overflowed its 674px column, painting across the
   headline (the cell is positioned, so it wins the paint order over the static
   text). Pinning the width to the column makes BOTH axes definite, which retires
   the aspect-ratio for this one cell. The artwork is unaffected: ::after still
   contains it whole and ::before fills whatever is left over.
   min-width:0 is the usual grid-item guard against a min-content floor. */
.bl-featured-img { align-self: stretch; min-height: 0; width: 100%; min-width: 0; }

/* Homepage journal rail + the article hero use a real <img>, so they get the
   same treatment through object-fit plus a duplicate blurred backdrop layer. */
.h-post-img img,
.bp-featured-img {
    object-fit: contain;
    background-color: var(--panel);
}

.h-post-img { isolation: isolate; }

.h-post-img .h-post-img-bg {
    position: absolute;
    inset: -12%;
    width: auto;
    height: auto;
    min-width: 124%;
    min-height: 124%;
    object-fit: cover;
    filter: blur(24px) brightness(0.5) saturate(0.85);
    z-index: 0;
}

.h-post-img img:not(.h-post-img-bg) {
    position: relative;
    z-index: 1;
}

.bp-featured-img {
    aspect-ratio: 16 / 9;
    max-height: none;
    height: auto;
}

/* ══ THEMABLE SADMIN - light relight for the two chakra pages (2026-08-26) ══════
   §5 says sadmin stays dark, and it still does for the other 23 admin pages. These
   rules exist ONLY for `body.admin-editorial`, which is Kota and SBC.
   ⚠️ They mirror, one for one, the hardcoded dark rgba retints further up this file
   (`body.admin-editorial .sidebar` and friends). If a rule is added there, it needs a
   partner here or the light variant silently keeps a dark patch.
   The .sidebar relight needs !important to beat responsive.css - same as the site-wide
   light pass. */
html[data-theme="light"] body.admin-editorial .sidebar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-right-color: var(--hairline) !important;
}
html[data-theme="light"] body.admin-editorial .brand-mark { background: rgba(255, 255, 255, 0.95); }
html[data-theme="light"] body.admin-editorial .mobile-nav-toggle { background: rgba(255, 255, 255, 0.95); }
html[data-theme="light"] body.admin-editorial .search-box,
html[data-theme="light"] body.admin-editorial .icon-btn {
  background: var(--panel-2); border-color: var(--hairline);
}
html[data-theme="light"] body.admin-editorial .widget,
html[data-theme="light"] body.admin-editorial .card {
  background: linear-gradient(180deg, #FFFFFF, var(--panel-2)); border-color: var(--hairline);
}
html[data-theme="light"] body.admin-editorial .welcome-card {
  background: linear-gradient(135deg, rgba(229, 180, 55, 0.10), #FFFFFF); border-color: var(--hairline-2);
}
html[data-theme="light"] body.admin-editorial .natal-chip {
  background: rgba(229, 180, 55, 0.10); border: 1px solid var(--hairline-2); color: var(--gold-ink);
}
html[data-theme="light"] body.admin-editorial .natal-chip strong { color: var(--gold-deep); }
html[data-theme="light"] body.admin-editorial .sidebar-menu a:hover {
  background: rgba(229, 180, 55, 0.12); color: var(--gold-deep);
}
html[data-theme="light"] body.admin-editorial .sidebar-menu a.active {
  background: linear-gradient(90deg, rgba(229, 180, 55, 0.24), transparent); color: var(--gold-deep);
}
html[data-theme="light"] body.admin-editorial .sidebar-menu .section-label { color: var(--text-dim); }
html[data-theme="light"] body.admin-editorial .sidebar .brand { border-bottom: 1px solid var(--hairline); }
html[data-theme="light"] body.admin-editorial .app-header { border-bottom: 1px solid var(--hairline); }
/* the page-local card/table shells on both chakra pages */
html[data-theme="light"] body.admin-editorial .sbc-card,
html[data-theme="light"] body.admin-editorial .k-card {
  background: linear-gradient(180deg, #FFFFFF, var(--panel-2)); border-color: var(--hairline-2);
}
html[data-theme="light"] body.admin-editorial .sbc-tbl th,
html[data-theme="light"] body.admin-editorial .k-tbl th { border-bottom-color: var(--hairline-2); }
html[data-theme="light"] body.admin-editorial .sbc-tbl td,
html[data-theme="light"] body.admin-editorial .k-tbl td { border-bottom-color: var(--hairline); }
html[data-theme="light"] body.admin-editorial .k-ring { border-color: var(--hairline-2); }

/* ─── Devanagari type (2026-09-04) ──────────────────────────────────────────
   Scoped to lang="hi" rather than appended to --ff-body, because that was
   measured not to work: the browser treats "Inter" as covering Devanagari, so
   a Noto listed after it is never reached (see the note by the font tokens).

   This matches BOTH the explainer cards (<div lang="hi">) and the whole of the
   Devanagari weekly-rashifal pages, which set <html lang="hi"> via htmlLang.

   ⚠️ EXACT attribute match on purpose. The Hinglish pages are lang="hi-Latn" and
   are ROMAN script - they must keep Inter. Do not switch this to :lang(hi) or
   [lang|="hi"], both of which would also capture hi-Latn.

   Latin inside a Hindi block (realised volatility, Method & Limitations) is
   deliberately left to Noto's own Latin: this copy is heavily code-mixed, and one
   face across both scripts keeps x-height and weight consistent within a sentence. */
[lang="hi"],
[lang="hi"] p, [lang="hi"] li, [lang="hi"] span, [lang="hi"] summary,
[lang="hi"] td, [lang="hi"] th, [lang="hi"] b, [lang="hi"] strong {
  font-family: 'Noto Sans Devanagari', 'Inter', 'Inter Fallback', 'Inter Fallback Android', sans-serif;
}
[lang="hi"] h1, [lang="hi"] h2, [lang="hi"] h3, [lang="hi"] h4 {
  font-family: 'Noto Sans Devanagari', 'Cormorant Garamond', 'Cormorant Fallback', 'Cormorant Fallback Android', serif;
}
