/* ============================================================================
   ritual_app — celestial editorial design system (D-22, rev 2).
   Architecture ported from the house-approved Kids Fun Week system (sticky
   blur header · split hero with floating inline-SVG art · eyebrows · bento ·
   CTA band · structured footer · scroll reveal), re-voiced for this brand:
   warm paper, violet ink, restrained gold, serif display. Light by default;
   [data-theme="dark"] is the midnight palette. Strict CSP: no inline styles.
   ========================================================================== */

@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/fonts/DMSerifDisplay-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/DMSans-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/CormorantGaramond-MediumItalic.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg:        #FBF8F1;
  --bg-2:      #F4EEE0;
  --surface:   #FFFFFF;
  --surface-2: #FBF6EA;
  --ink:       #2A2438;
  --ink-soft:  #675F7A;
  --ink-faint: #6E6880;
  --line:      #E8E0CE;

  --gold:       #C9A24B;
  --gold-deep:  #8A6B24;
  --gold-soft:  #F4EAD1;
  --violet:      #7C6BAE;
  --violet-deep: #5A4B8F;
  --violet-soft: #ECE7F5;
  --rose:       #C97B8E;
  --rose-deep:  #A0526A;
  --rose-soft:  #F7E5EA;
  --night:   #14172B;
  --night-2: #1E2340;
  --on-night: #F4F0E8;
  --on-night-strong: #FDF9EE;
  --btn-night-hi: #262C4E;
  --btn-night-lo: #0E1122;
  --btn-night-edge: #090B18;
  --btn-gold-hi: #E3C077;
  --btn-gold-lo: #B08A34;
  --btn-gold-edge: #7A5E1E;
  --btn-gold-ink: #3A2D10;
  --cream: #F4F0E8;

  --shadow-sm: 0 1px 2px rgba(42,36,56,.06), 0 2px 6px rgba(42,36,56,.05);
  --shadow:    0 4px 10px rgba(42,36,56,.06), 0 14px 34px rgba(42,36,56,.10);
  --shadow-lg: 0 10px 24px rgba(42,36,56,.08), 0 30px 70px rgba(42,36,56,.16);
  --ring:      0 0 0 4px var(--violet-soft);

  --radius-sm: 12px;
  --radius:    20px;
  --radius-lg: 28px;

  --wrap:    74rem;
  --measure: 42rem;

  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --italic: "Cormorant Garamond", Georgia, serif;
}

:root[data-theme="dark"] {
  --bg:        #0E0E16;
  --bg-2:      #14172B;
  --surface:   #181B2C;
  --surface-2: #1E2238;
  --ink:       #F4F0E8;
  --ink-soft:  #ABA6BE;
  --ink-faint: #948FA8;
  --line:      #2A2E48;

  --gold:       #C9A24B;
  --gold-deep:  #E0C896;
  --gold-soft:  #2A2536;
  --violet:      #9C8CD0;
  --violet-deep: #B9A8E8;
  --violet-soft: #262242;
  --rose:       #C97B8E;
  --rose-deep:  #DFA0B2;
  --rose-soft:  #33222C;
  --night:   #181B2C;
  --night-2: #232848;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow:    0 6px 16px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.4);
  --shadow-lg: 0 14px 30px rgba(0,0,0,.4), 0 36px 80px rgba(0,0,0,.5);
  --ring:      0 0 0 4px rgba(156,140,208,.25);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.72 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--violet-deep); text-decoration: none; }
a:hover { color: var(--gold-deep); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400; line-height: 1.12; letter-spacing: .003em;
  color: var(--ink); margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 1.5rem + 3.4vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.45rem); }
h3 { font-size: 1.32rem; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
em { font-family: var(--italic); font-style: italic; font-size: 1.06em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.lede { font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem); line-height: 1.65; color: var(--ink-soft); max-width: var(--measure); }
.accent-i { font-family: var(--italic); font-style: italic; color: var(--gold-deep); }
.fineprint { font-size: .85rem; color: var(--ink-faint); }
.gold-rule {
  border: 0; height: 1px; max-width: 24rem; margin: 3rem auto;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: .5;
}

/* ---------- Eyebrow / swoosh / pills ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .78rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--gold-deep); background: var(--gold-soft);
  padding: .5em 1em; border-radius: 999px; margin-bottom: 1.1rem;
  font-family: var(--sans);
}
.eyebrow.violet { color: var(--violet-deep); background: var(--violet-soft); }
.eyebrow.rose { color: var(--rose-deep); background: var(--rose-soft); }

.swoosh { position: relative; white-space: nowrap; color: var(--violet-deep); }
.swoosh::after {
  content: ""; position: absolute; left: -1%; right: -1%; bottom: .02em; height: .3em;
  background: var(--gold); border-radius: 999px; opacity: .38; z-index: -1;
  transform: rotate(-.5deg);
}

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; }
.chip {
  display: inline-block;
  font-size: .84rem; font-weight: 500; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line);
  padding: .42em .95em; border-radius: 999px; box-shadow: var(--shadow-sm);
}

/* ---------- Skip link + focus ---------- */
.skip { position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--violet-deep); color: #fff; padding: .6rem 1rem; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--violet-deep); outline-offset: 2px; border-radius: 6px;
}
:root[data-theme="dark"] a:focus-visible, :root[data-theme="dark"] button:focus-visible,
:root[data-theme="dark"] input:focus-visible { outline-color: var(--violet); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1;
  letter-spacing: .01em;
  padding: .95em 1.7em; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; color: var(--ink); background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease,
              background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.btn:active { transform: translateY(0); }
.btn-primary, .btn.primary {
  color: var(--on-night-strong);
  background: linear-gradient(180deg, var(--btn-night-hi) 0%, var(--night) 60%, var(--btn-night-lo) 100%);
  box-shadow: 0 2px 0 var(--btn-night-edge), var(--shadow);
}
.btn-primary:hover, .btn.primary:hover { color: #fff; box-shadow: 0 2px 0 var(--btn-night-edge), var(--shadow-lg); }
.btn-gold {
  color: var(--btn-gold-ink);
  background: linear-gradient(180deg, var(--btn-gold-hi) 0%, var(--gold) 60%, var(--btn-gold-lo) 100%);
  box-shadow: 0 2px 0 var(--btn-gold-edge), var(--shadow);
}
.btn-gold:hover { color: var(--btn-gold-ink); box-shadow: 0 2px 0 var(--btn-gold-edge), var(--shadow-lg); }
.btn.ghost, .btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); box-shadow: none; }
.btn.ghost:hover, .btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); background: var(--gold-soft); }
.btn-sm { padding: .62em 1.15em; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid transparent;
  transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease; }
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line); box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand .wordmark { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 auto;
  filter: drop-shadow(0 3px 6px rgba(42,36,56,.18));
  transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.nav { display: flex; gap: .1rem; margin-left: auto; }
.nav a { font-weight: 500; font-size: .97rem; color: var(--ink-soft);
  padding: .55rem .8rem; border-radius: 12px; }
.nav a:hover, .nav a.active { color: var(--ink); background: var(--bg-2); }
.header-actions { display: flex; align-items: center; gap: .55rem; margin-left: .4rem; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 13px; cursor: pointer; padding: 0;
  transition: border-color .2s, color .2s, transform .2s; }
.icon-btn:hover { border-color: var(--gold); color: var(--gold-deep); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .tt-moon { display: none; }
.theme-toggle .tt-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .tt-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .tt-sun  { display: none; }
.nav-toggle { display: none; }
.nav-drop { position: relative; display: inline-flex; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: .4em;
  font: inherit; font-weight: 500; font-size: .97rem; color: var(--ink-soft);
  background: none; border: 0; cursor: pointer;
  padding: .55rem .8rem; border-radius: 12px;
}
.nav-drop-btn svg { transition: transform .18s ease; margin-top: 1px; }
.nav-drop-btn:hover, .nav-drop.active .nav-drop-btn { color: var(--ink); background: var(--bg-2); }
.nav-drop.open .nav-drop-btn svg { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute; top: calc(100% + .45rem); left: 0; min-width: 13.5rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: .45rem;
  display: none; z-index: 60;
}
.nav-drop.open .nav-drop-menu { display: grid; gap: .1rem; }
.nav-drop-menu a {
  display: block; padding: .55rem .8rem; border-radius: 10px;
  color: var(--ink-soft); font-size: .95rem; font-weight: 500;
}
.nav-drop-menu a:hover { background: var(--violet-soft); color: var(--ink); }

/* ---------- Hero (homepage split) ---------- */
.hero { position: relative; padding: clamp(1.5rem, 3.5vw, 3rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 44% at 14% 16%, color-mix(in srgb, var(--violet) 20%, transparent), transparent 72%),
    radial-gradient(40% 46% at 86% 10%, color-mix(in srgb, var(--gold) 24%, transparent), transparent 72%),
    radial-gradient(44% 50% at 78% 88%, color-mix(in srgb, var(--rose) 13%, transparent), transparent 70%);
  filter: blur(30px); opacity: .8;
}
.hero-split { display: grid; grid-template-columns: 1.08fr .92fr;
  gap: clamp(1.25rem, 3.5vw, 2.75rem); align-items: center; }
.hero-copy h1 { font-size: clamp(2.3rem, 1.5rem + 2.9vw, 3.6rem); margin-bottom: .35em; }
.hero-copy .lede { margin-bottom: 1.5rem; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .9rem; }
.trust { color: var(--ink-faint); font-size: .88rem; margin: .6rem 0 0; }
.hero-art-wrap { position: relative; display: grid; place-items: center; }
.hero-art-wrap::before {
  content: ""; position: absolute; width: 96%; aspect-ratio: 1;
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background: radial-gradient(circle at 42% 38%,
    color-mix(in srgb, var(--violet-soft) 88%, transparent) 0%,
    color-mix(in srgb, var(--gold-soft) 75%, transparent) 55%, transparent 78%);
  filter: blur(10px); z-index: 0;
}
.hero-art { position: relative; z-index: 1; width: 100%; max-width: 27rem; }

/* interior page headers reuse .hero as a compact centered head */
.page-head { text-align: center; padding: clamp(1.6rem, 3.5vw, 3rem) 0 clamp(.8rem, 2vw, 1.6rem); position: relative; }
.page-head .lede { margin-inline: auto; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.4rem, 5vw, 4.2rem); position: relative; }
.section-head { text-align: center; max-width: 46rem; margin: 0 auto clamp(1.6rem, 3vw, 2.6rem); }
.section-head h2 { margin-bottom: .35em; }
.section-head p { color: var(--ink-soft); font-size: 1.06rem; margin: 0; }
.section-head .head-link { display: inline-block; margin-top: .7rem; font-weight: 600; }

.panel { background: var(--bg-2); border: 1px solid var(--line);
  border-radius: clamp(24px, 3vw, 40px);
  padding: clamp(1.8rem, 4vw, 3.2rem) clamp(1.3rem, 4vw, 2.8rem); }
.panel-gold { border-top: 2px solid var(--gold); background: var(--surface); box-shadow: var(--shadow); }

/* ---------- Anatomy rows (numbered) ---------- */
.anatomy { display: grid; gap: 1rem; max-width: 44rem; margin: 0 auto; }
.anatomy-row { display: flex; gap: 1.1rem; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.35rem;
  box-shadow: var(--shadow-sm); }
.anatomy-row .count { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.35rem; color: #fff; }
.anatomy-row:nth-child(3n+1) .count { background: var(--violet); }
.anatomy-row:nth-child(3n+2) .count { background: var(--gold); }
.anatomy-row:nth-child(3n+3) .count { background: var(--rose); }
.anatomy-row .a-body strong { font-family: var(--serif); font-weight: 400; display: block;
  font-size: 1.12rem; color: var(--ink); }
.anatomy-row .a-body span { color: var(--ink-soft); font-size: .97rem; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.1rem; }
.bento-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease; }
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.icon-tile { width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center;
  font-size: 1.6rem; margin-bottom: 1rem; color: var(--ink); }
.icon-tile.gold { background: var(--gold-soft); color: var(--gold-deep); }
.icon-tile.violet { background: var(--violet-soft); color: var(--violet-deep); }
.icon-tile.rose { background: var(--rose-soft); color: var(--rose-deep); }
.icon-tile.night { background: var(--night); color: var(--gold); }
.bento-card h3 { margin-bottom: .3em; }
.bento-card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ---------- Cards (family grids; colored top threads) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.15rem; }
.card { position: relative; display: flex; flex-direction: column; gap: .4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.3rem; color: var(--ink); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease, border-color .22s ease; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; }
.card:nth-child(3n+1)::before { background: var(--violet); }
.card:nth-child(3n+2)::before { background: var(--gold); }
.card:nth-child(3n+3)::before { background: var(--rose); }
/* family accents override the cycle (one temperature per section) */
.cards.acc-rose .card::before { background: var(--rose); }
.cards.acc-rose .card-icon { background: var(--rose-soft); color: var(--rose-deep); }
.cards.acc-gold .card::before { background: var(--gold); }
.cards.acc-gold .card-icon { background: var(--gold-soft); color: var(--gold-deep); }
.cards.acc-violet .card::before { background: var(--violet); }
.cards.acc-violet .card-icon { background: var(--violet-soft); color: var(--violet-deep); }
.cards.acc-night .card::before { background: var(--night); }
.cards.acc-night .card-icon { background: var(--violet-soft); color: var(--ink); }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card h3 { margin: .2rem 0 0; font-size: 1.24rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.card .thumb { display: block; width: calc(100% + 3rem); margin: -1rem -1.5rem .4rem;
  height: 10rem; object-fit: cover; object-position: center 28%;
  background: var(--surface-2); }

/* ---------- CTA band (midnight sky) ---------- */
.cta-band { position: relative; margin-top: clamp(3rem, 6vw, 5rem); overflow: hidden;
  background:
    radial-gradient(60% 90% at 20% 10%, color-mix(in srgb, var(--btn-night-hi) 88%, var(--violet)) 0%, transparent 60%),
    radial-gradient(50% 80% at 85% 20%, color-mix(in srgb, var(--night-2) 70%, var(--violet)) 0%, transparent 55%),
    linear-gradient(160deg, var(--night-2) 0%, var(--night) 70%);
  color: var(--on-night); }
.cta-band .wrap { padding-block: clamp(2.8rem, 6vw, 4.5rem); text-align: center;
  position: relative; z-index: 1; }
.cta-band h2 { color: var(--on-night-strong); margin-bottom: .3em; }
.cta-band p { color: rgba(244,240,232,.85); font-size: 1.1rem; max-width: 36rem; margin: 0 auto 1.6rem; }
.cta-band .fineprint { color: rgba(244,240,232,.6); margin: 1.1rem 0 0; }
.cta-band .doodle { position: absolute; color: var(--gold); opacity: .7; }
.cta-band .doodle.d1 { top: 16%; left: 8%; width: 34px; }
.cta-band .doodle.d2 { bottom: 18%; right: 9%; width: 52px; }
.cta-band .doodle.d3 { top: 22%; right: 20%; width: 20px; }
.cta-band .doodle.d4 { bottom: 24%; left: 18%; width: 16px; opacity: .45; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); }
:root[data-theme="dark"] .site-footer { background: var(--night); }
.footer-inner { padding-block: 3rem 2rem; display: grid; gap: 1.8rem; }
.footer-top { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; }
.footer-brand { max-width: 23rem; }
.footer-brand .brand { margin-bottom: .8rem; }
.footer-brand p { color: var(--ink-soft); font-size: .95rem; margin: 0;
  font-family: var(--italic); font-style: italic; font-size: 1.05rem; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 2rem 3rem; }
.footer-cols nav { display: grid; gap: .45rem; align-content: start; }
.footer-cols h4 { font-family: var(--sans); margin: 0 0 .3rem; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); font-weight: 600; }
.footer-cols a { color: var(--ink-soft); font-size: .95rem; }
.footer-cols a:hover { color: var(--gold-deep); }
.disclosure { color: var(--ink-faint); font-size: .84rem; max-width: 48rem;
  border-top: 1px solid var(--line); padding-top: 1.4rem; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  color: var(--ink-faint); font-size: .85rem; }
.foot-legal a { color: var(--ink-faint); }
.foot-legal a:hover { color: var(--ink); }

/* ---------- Article / prose pages ---------- */
.prose { max-width: var(--measure); margin-inline: auto; }
.crumbs { font-size: .85rem; color: var(--ink-faint); margin: 1.2rem 0 1.4rem; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--gold-deep); }
.prose .lede { font-size: 1.2rem; }
.prose h2 { font-size: 1.6rem; margin: 1.8em 0 .5em; }
.prose h2::after { content: ""; display: block; width: 3rem; height: .26rem; border-radius: 999px;
  background: var(--gold); margin-top: .5rem; opacity: .65; }
.prose ul { margin: 1.1em 0; padding-left: 0; list-style: none; }
.prose ul li { position: relative; margin: .5em 0; padding-left: 1.7em; }
.prose ul li::before { content: ""; position: absolute; left: .2em; top: .64em;
  width: .45em; height: .45em; border-radius: 50%; background: var(--gold); }
.prose a { text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold) 45%, transparent);
  text-underline-offset: .22em; transition: text-decoration-color .2s, color .2s; }
.prose a:hover { text-decoration-color: var(--gold); }
ul.plain { list-style: none; padding-left: 0; }
ul.plain li::before { display: none; }
ul.plain li { padding-left: 0; }

/* ---------- Data tables ---------- */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 1.2rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; color: var(--gold-deep); background: var(--surface-2); }

/* ---------- Forms ---------- */
input, select {
  font: inherit; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: 14px;
  padding: .78em 1em; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--violet); box-shadow: var(--ring); }
label { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 .4rem; font-weight: 600; }
.field { margin-bottom: 1.2rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .field { flex: 1 1 10rem; }
label.inline { display: flex; align-items: center; color: var(--ink); font-size: .98rem;
  text-transform: none; letter-spacing: 0; font-weight: 400; }
.inline-check { width: auto; margin-right: .55rem; accent-color: var(--violet-deep); }

/* ---------- Calculator ---------- */
.typeahead { list-style: none; margin: .3rem 0 0; padding: .3rem;
  position: absolute; z-index: 5; left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); max-height: 16rem; overflow-y: auto; }
.typeahead:empty { display: none; }
.typeahead li { padding: .55rem .85rem; cursor: pointer; border-radius: 10px; }
.typeahead li:hover { background: var(--violet-soft); color: var(--ink); }
.share-row { display: flex; gap: .6rem; max-width: 34rem; margin: 1.1rem auto; }
.share-row input { flex: 1; font-size: .88rem; color: var(--ink-soft); }

.wheel-holder { max-width: 33rem; margin: 0 auto; }
.wheel-holder svg { display: block; width: 100%; height: auto; border-radius: 50%;
  box-shadow: 0 24px 70px rgba(20,23,43,.38); }
@media (prefers-reduced-motion: no-preference) {
  .wheel-drawin .wheel-rings circle,
  .wheel-drawin .wheel-aspects line { stroke-dasharray: 3000; stroke-dashoffset: 3000;
    animation: drawin 1.6s ease-out forwards; }
  .wheel-drawin .wheel-planets, .wheel-drawin .wheel-zodiac,
  .wheel-drawin .wheel-houses, .wheel-drawin .wheel-angles { opacity: 0;
    animation: fadein .9s ease-out .7s forwards; }
}
@keyframes drawin { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

.placements-list { columns: 2; gap: 2.5rem; max-width: 34rem; margin: 1.8rem auto;
  font-size: .98rem; padding: 0; list-style: none; }
.placements-list li { break-inside: avoid; padding: .45rem 0; border-bottom: 1px solid var(--line); }

.bigthree { display: flex; gap: 1.1rem; justify-content: center; flex-wrap: wrap;
  margin: 2.2rem 0; text-align: left; }
.bigthree .b3 { position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
  padding: 1.6rem 1.6rem 1.4rem; max-width: 21rem; flex: 1 1 16rem; }
.bigthree .b3::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; }
.bigthree .b3:nth-child(1)::before { background: var(--gold); }
.bigthree .b3:nth-child(2)::before { background: var(--violet); }
.bigthree .b3:nth-child(3)::before { background: var(--rose); }
.bigthree h3 { margin-bottom: .15rem; }
.bigthree .muted { font-size: .95rem; font-family: var(--italic); font-style: italic; margin-bottom: .7rem; }

#result { scroll-margin-top: 92px; }
.result-split { display: grid; grid-template-columns: .95fr 1.05fr;
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  margin: 1.5rem 0 2.5rem; }
.result-split .wheel-holder { max-width: 30rem; margin: 0; justify-self: center; }
.result-offer h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: .6rem; }
.result-offer .gets { margin: .7rem 0 1.1rem; }
.offer-form .form-row { align-items: end; }
.offer-form .field { margin-bottom: .6rem; }

/* birth-date entry: typed month/day/year — a calendar picker opening on
   today is hostile to dates decades back (operator, 2026-07-31) */
.dob-row {
  display: grid;
  grid-template-columns: 1fr 5rem 6rem;
  gap: .6rem;
}
.dob-row input { padding-left: .7rem; padding-right: .4rem; }
.hint { font-size: .85rem; color: var(--ink-faint); margin: .4rem 0 0; }

/* funnel links must not rely on color alone (a11y link-in-text-block) */
.funnel p a { text-decoration: underline; text-underline-offset: 2px; }

/* screen-reader-only heading (a11y heading-order on card-grid hubs) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* honeypot (capture bot defense): visually removed, still submittable */
.offer-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.offer-form { position: relative; }
#ts-slot { margin-top: .6rem; }
#ts-slot:empty { margin-top: 0; }
@media (max-width: 900px) {
  .result-split { grid-template-columns: 1fr; }
  .result-split .wheel-holder { order: -1; max-width: 24rem; margin-inline: auto; }
}

/* the funnel / capture */
.funnel { position: relative; border-radius: var(--radius-lg); margin: 3rem auto;
  max-width: 44rem; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); padding: 2.3rem 2.4rem 2.1rem; overflow: hidden; }
.funnel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--violet), var(--gold), var(--rose)); }
.funnel h2 { margin-bottom: .45rem; }
.funnel .eyebrow { margin-bottom: .8rem; }
.funnel-lift { margin-top: 2.2rem; }
.keepit-h { font-size: 1.35rem; margin-bottom: .8rem; }
.preview-blur { position: relative; overflow: hidden; border-radius: 14px; margin: 1.2rem 0 1.4rem;
  background: var(--surface-2); padding: 1.1rem 1.3rem; }
.preview-blur .sample { filter: blur(5px); opacity: .7; user-select: none; pointer-events: none;
  margin: 0; font-family: var(--italic); font-style: italic; font-size: 1.12rem; }
.preview-blur::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 10%, var(--surface) 98%); }
.capture { margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.capture h3 { margin-bottom: .35rem; }
.gets { list-style: none; padding: 0; margin: .9rem 0 1.2rem; }
.gets li { padding: .24rem 0 .24rem 1.6em; position: relative; color: var(--ink-soft); }
.gets li::before { content: "✦"; position: absolute; left: .1rem; top: .24rem;
  color: var(--gold); font-size: .85rem; }

/* ---------- Illustrations (inline SVG only — one palette) ---------- */
.hero-art { position: relative; z-index: 1; width: 100%; max-width: 28rem; height: auto; }
.icon-svg { display: block; }
.card-icon { display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 14px; background: var(--gold-soft); color: var(--gold-deep);
  margin-bottom: .35rem; }
.icon-tile svg { width: 28px; height: 28px; }

/* moon calendar */
.cal-nav { display: flex; align-items: center; justify-content: center;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.cal-nav .chips { margin: 0; }
#moon-full-line { display: block; margin: 0 auto 1.2rem; max-width: 34rem; }
.mooncal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem;
  max-width: 34rem; margin: 0 auto; }
.mooncal-day { display: flex; flex-direction: column; align-items: center; gap: .18rem;
  padding: .45rem .2rem .35rem; border: 1px solid transparent; border-radius: 14px;
  font-size: .82rem; color: var(--ink-soft); }
.mooncal-day.today { border-color: var(--gold); background: var(--surface); box-shadow: var(--shadow-sm); }
.mooncal-day.fullmoon { background: var(--violet-soft); }
.mooncal-day svg { width: 2.4rem; height: 2.4rem; }

/* ---------- Article detail (rev 3) ---------- */
.dropcap::first-letter {
  font-family: var(--serif); float: left; font-size: 3.3rem; line-height: .82;
  padding: .06em .09em 0 0; color: var(--violet-deep);
}
.prose ol { margin: 1.15em 0; padding-left: 0; list-style: none; counter-reset: li; }
.prose ol li { counter-increment: li; position: relative; margin: .6em 0; padding-left: 2em; }
.prose ol li::before { content: counter(li); position: absolute; left: 0; top: .05em;
  width: 1.45em; height: 1.45em; background: var(--gold-soft); color: var(--gold-deep);
  border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-size: .82em; }

.callout { background: var(--gold-soft);
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  border-radius: var(--radius); padding: 1.15rem 1.35rem; margin: 1.5em 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.violet { background: var(--violet-soft);
  border-color: color-mix(in srgb, var(--violet) 30%, transparent); }
.callout.rose { background: var(--rose-soft);
  border-color: color-mix(in srgb, var(--rose) 30%, transparent); }
.callout .co-title { font-family: var(--serif); font-size: 1.05rem; display: block;
  margin-bottom: .25rem; color: var(--ink); }

.nudge { position: relative; margin: 2.4rem auto; padding: 1.3rem 1.5rem;
  background: var(--violet-soft);
  border: 1px solid color-mix(in srgb, var(--violet) 26%, transparent);
  border-radius: var(--radius-lg);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  justify-content: space-between; max-width: var(--measure); }
.nudge p { margin: 0; font-family: var(--serif); font-size: 1.08rem; color: var(--ink); }
.nudge .btn { white-space: nowrap; }
.nudge.gold { background: var(--gold-soft);
  border-color: color-mix(in srgb, var(--gold) 28%, transparent); }
.nudge.rose { background: var(--rose-soft);
  border-color: color-mix(in srgb, var(--rose) 28%, transparent); }

.edition-nav { display: flex; justify-content: space-between; gap: 1rem;
  max-width: var(--measure); margin: 2.6rem 0 0;
  padding-top: 1.4rem; border-top: 1px solid var(--line); }
.edition-nav a { font-weight: 600; }
.related { margin: 3rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.35rem; margin-bottom: 1rem; }

/* ---------- Blog (Strategy v2: posts, hub, provenance) ---------- */
.eyebrow.night { color: var(--on-night); background: var(--night); }
.post-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: center;
  color: var(--ink-faint); font-size: .88rem; margin: 0 0 1.6rem; }
.post-meta .sep { opacity: .5; }
.provenance { max-width: var(--measure); margin: 2.6rem 0 0;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.provenance h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.provenance h2::after { display: none; }
.provenance ul { margin: .4em 0 .6em; }
.provenance p { margin: .3em 0 0; color: var(--ink-soft); font-size: .92rem; }
.post-feature { position: relative; display: block; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); padding: 2rem 2.2rem 1.8rem; margin-bottom: 2rem;
  color: var(--ink);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease; }
.post-feature::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--violet), var(--gold), var(--rose)); }
.post-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-feature h2 { margin: .5rem 0 .35rem; }
.post-feature p { margin: 0; color: var(--ink-soft); }
.cluster-head { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap;
  margin: 2.8rem 0 1rem; }
.cluster-head h2 { margin: 0; font-size: 1.5rem; }
.cluster-head p { margin: 0; color: var(--ink-faint); font-size: .92rem; }
.draft-ribbon { position: sticky; top: 74px; z-index: 40; text-align: center;
  background: var(--rose-soft); color: var(--rose-deep);
  border-block: 1px solid color-mix(in srgb, var(--rose) 30%, transparent);
  font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: .4rem 1rem; }

/* ---------- Floating SVG bits (.ill) ---------- */
.ill .f-gold { fill: var(--gold); } .ill .f-gold-d { fill: var(--gold-deep); }
.ill .f-gold-s { fill: var(--gold-soft); }
.ill .f-violet { fill: var(--violet); } .ill .f-violet-d { fill: var(--violet-deep); }
.ill .f-violet-s { fill: var(--violet-soft); }
.ill .f-rose { fill: var(--rose); }
.ill .f-night { fill: var(--night); } .ill .f-night2 { fill: var(--night-2); }
.ill .f-cream { fill: var(--cream); } .ill .f-surface { fill: var(--surface); }
.ill .ln { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; }
.ill .ln-ink { fill: none; stroke: var(--ink-soft); stroke-width: 1.4; stroke-linecap: round; }
.ill .dots { fill: none; stroke: var(--ink-faint); stroke-width: 2.6;
  stroke-dasharray: .5 12; stroke-linecap: round; opacity: .4; }
.ill .spark { fill: var(--gold); }
.ill .float { transform-box: fill-box; transform-origin: center; animation: floaty 6s ease-in-out infinite; }
.ill .float.f2 { animation-duration: 7.5s; animation-delay: -1.2s; }
.ill .float.f3 { animation-duration: 5.4s; animation-delay: -.6s; }
.ill .float.f4 { animation-duration: 8s; animation-delay: -2s; }
.ill .float.f5 { animation-duration: 6.6s; animation-delay: -3s; }
.ill .float.f6 { animation-duration: 7s; animation-delay: -.3s; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(2.5deg); } }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,1,.36,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.mt-025 { margin-top: .35rem; } .mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; } .mb-15 { margin-bottom: 1.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-14 { max-width: 14rem; } .w-16 { max-width: 16rem; }
.w-22 { max-width: 22rem; } .w-26 { max-width: 26rem; }
.pos-rel { position: relative; }
.jc-center { justify-content: center; }
.as-end { align-self: end; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lede { margin-inline: auto; }
  .hero-cta-row { justify-content: center; }
  .hero-art-wrap { order: -1; max-width: 21rem; margin-inline: auto; }
  .page-hero-grid { grid-template-columns: 1fr; gap: 1rem; }
  .page-hero-grid .flower-art { order: -1; }
  .flower-art img { max-width: 15rem; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .nav-toggle { display: inline-grid; }
  .nav.open { display: grid; position: absolute; left: 0; right: 0; top: 74px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .75rem 1.5rem 1rem; gap: .1rem; box-shadow: var(--shadow); }
  .nav.open a { padding: .8rem .5rem; }
  .nav.open .nav-drop { display: block; }
  .nav.open .nav-drop-menu { position: static; display: grid; box-shadow: none;
    border: 0; padding: 0 0 0 1rem; }
  .placements-list { columns: 1; }
  .funnel { padding: 1.7rem 1.4rem 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ill .float { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .bento-card:hover, .card:hover { transform: none; }
}
