/* ============================================================
   Aṅka — Midnight Observatory design system
   Tokens are law: no hex values below the :root block.
   ============================================================ */

:root {
  /* Ground */
  --ink-900: #0B1120;
  --ink-800: #111A2E;
  --ink-700: #1A2540;
  /* Light */
  --moon-100: #F3EFE6;
  --moon-300: #C9C3B4;
  --moon-500: #8B8878;
  /* Metal */
  --gold-400: #D4B36A;
  --gold-600: #A8894B;
  /* Counterpoint */
  --slate-400: #7E93B8;
  /* Utility */
  --line: rgba(212, 179, 106, 0.18);
  --line-strong: rgba(212, 179, 106, 0.4);
  --focus: #D4B36A;
  --error: #C97B6B;
  --success: #8FAE8B;
  --overlay-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  --hero-pool: radial-gradient(ellipse 80% 60% at 60% 40%, #131C33 0%, #0B1120 70%);

  /* Type */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Jost', 'Avenir Next', sans-serif;
  --font-numeric: 'Spectral', 'Georgia', serif;

  /* Motion */
  --ease-drift: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-orbit: cubic-bezier(0.45, 0, 0.55, 1);
  --dur-fast: 200ms;
  --dur-slow: 700ms;
  --dur-drift: 1200ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink-900);
  color: var(--moon-300);
  font: 300 1.0625rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
input, button { font: inherit; color: inherit; }
::selection { background: var(--gold-600); color: var(--ink-900); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Type roles ---------- */
h1, h2, h3 { font-family: var(--font-display); color: var(--moon-100); font-weight: 500; }
h1 { font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: 1.08; letter-spacing: -0.01em; }
h1 em { font-style: italic; color: var(--gold-400); }
h2 { font-size: clamp(1.625rem, 4vw, 3.25rem); line-height: 1.12; letter-spacing: -0.01em; margin-bottom: 24px; }
h3 { font-size: 1.625rem; font-weight: 600; line-height: 1.2; }

.eyebrow {
  font: 500 0.75rem/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moon-500);
  margin-bottom: 20px;
}

.section-lede { max-width: 65ch; margin-bottom: 48px; }
.section-lede, .correction-copy p { color: var(--moon-300); }

/* ---------- Layout ---------- */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 24px;
}
.section-narrow { max-width: 820px; }

/* ---------- Constellation divider (signature) ---------- */
.divider {
  height: 5px;
  max-width: 1120px;
  margin: 0 auto;
  background:
    radial-gradient(circle 2px at var(--d1, 18%) 50%, rgba(212,179,106,0.6) 0 2px, transparent 2.5px),
    radial-gradient(circle 2px at var(--d2, 47%) 50%, rgba(212,179,106,0.6) 0 2px, transparent 2.5px),
    radial-gradient(circle 2px at var(--d3, 81%) 50%, rgba(212,179,106,0.6) 0 2px, transparent 2.5px),
    linear-gradient(var(--line), var(--line)) center / 100% 1px no-repeat;
}
.divider[data-variant="b"] { --d1: 9%; --d2: 38%; --d3: 66%; }
.divider[data-variant="c"] { --d1: 27%; --d2: 58%; --d3: 90%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background var(--dur-fast), border-color var(--dur-fast);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 17, 32, 0.95);
  border-bottom-color: var(--line);
  backdrop-filter: blur(6px);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font: 600 1.625rem/1 var(--font-display);
  color: var(--moon-100);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.wordmark.small { font-size: 1.25rem; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--moon-300);
  text-decoration: none;
  font: 400 0.9375rem/1 var(--font-body);
  padding: 6px 0;
  position: relative;
  transition: color var(--dur-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-drift);
}
.nav-links a:hover { color: var(--moon-100); }
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  background: none; border: none;
  width: 40px; height: 40px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  align-items: center;
}
.nav-toggle span {
  display: block; width: 22px; height: 1px;
  background: var(--moon-100);
  transition: transform var(--dur-fast);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--hero-pool);
  overflow: hidden;
}
.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  animation: fade-in var(--dur-drift) var(--ease-drift) forwards;
}
.hero-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 128px 24px 96px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: center;
}
.hero-sub { max-width: 46ch; margin-top: 28px; font-size: 1.125rem; }
.hero-actions { display: flex; gap: 20px; align-items: center; margin-top: 40px; flex-wrap: wrap; }
.hero-art { position: relative; }
.hero-img { width: 100%; max-width: 460px; margin: 0 auto; }

/* hero load sequence */
@keyframes drift-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in { to { opacity: 1; } }
.load-seq {
  opacity: 0;
  animation: drift-up var(--dur-slow) var(--ease-drift) forwards;
  animation-delay: calc(150ms + var(--seq, 1) * 140ms);
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block;
  background: var(--gold-400);
  color: var(--ink-900);
  font: 500 1rem/1 var(--font-body);
  letter-spacing: 0.02em;
  padding: 14px 32px;
  border-radius: 2px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.btn-primary:hover { background: var(--gold-600); transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--moon-100);
  font: 400 1rem/1 var(--font-body);
  border: 1px solid var(--slate-400);
  border-radius: 2px;
  padding: 13px 32px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.btn-secondary:hover { border-color: var(--gold-400); color: var(--gold-400); transform: translateY(-1px); }

.btn-tertiary {
  color: var(--moon-100);
  text-decoration: none;
  font: 400 1rem/1 var(--font-body);
  padding-bottom: 4px;
  background: linear-gradient(var(--gold-400), var(--gold-400)) left bottom / 0% 1px no-repeat;
  transition: background-size var(--dur-fast) var(--ease-drift), color var(--dur-fast);
}
.btn-tertiary:hover { background-size: 100% 1px; color: var(--gold-400); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
  overflow-x: auto;
}
.tab {
  background: none;
  border: none;
  color: var(--moon-500);
  font: 400 1rem/1 var(--font-body);
  padding: 16px 24px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color var(--dur-fast);
}
.tab::after {
  content: '';
  position: absolute;
  left: 24px; right: 24px; bottom: -1px;
  height: 1px;
  background: var(--gold-400);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-drift);
}
.tab:hover { color: var(--moon-300); }
.tab.is-active { color: var(--moon-100); }
.tab.is-active::after { transform: scaleX(1); }

.tab-panel[hidden] { display: none; }

/* ---------- Forms ---------- */
.calc-form { margin-bottom: 48px; }
.field-group {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.field { display: flex; flex-direction: column; gap: 10px; }
.field.grow { flex: 1 1 280px; }
.field label {
  font: 500 0.75rem/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moon-500);
}
.field input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--moon-100);
  font: 400 1.125rem/1.4 var(--font-body);
  padding: 8px 2px;
  min-width: 220px;
  border-radius: 0;
  color-scheme: dark;
  transition: border-color var(--dur-fast);
}
.field input::placeholder { color: var(--moon-500); opacity: 0.7; }
.field input:focus { border-bottom-color: var(--gold-400); }
.field-note { margin-top: 20px; font-size: 0.9375rem; color: var(--moon-500); max-width: 65ch; }
.field-error { color: var(--error); font-size: 0.9375rem; margin-top: 12px; }

/* ---------- Results ---------- */
.calc-result:empty { display: none; }
.calc-result { margin-top: 8px; }

.medallion-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-bottom: 48px;
}
.medallion { text-align: center; width: 160px; }
.medallion svg { width: 128px; height: 128px; margin: 0 auto 16px; display: block; }
.medallion .ring {
  fill: none;
  stroke: var(--gold-400);
  stroke-width: 1.5;
}
.medallion .digit {
  font: 200 3.9rem var(--font-numeric);
  font-variant-numeric: tabular-nums;
  fill: var(--gold-400);
  opacity: 0;
}
.medallion .m-label {
  font: 500 0.75rem/1.5 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moon-500);
  display: block;
}
.medallion .m-sub {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--moon-100);
  display: block;
  margin-top: 4px;
}

/* medallion ceremony */
.medallion .ring.draw {
  stroke-dasharray: 402;
  stroke-dashoffset: 402;
  animation: ring-draw 900ms var(--ease-drift) forwards;
}
.medallion .digit.appear {
  animation: digit-in 500ms var(--ease-drift) 400ms forwards;
  transform-origin: center;
}
@keyframes ring-draw { to { stroke-dashoffset: 0; } }
@keyframes digit-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.result-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.detail-card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.detail-card:hover { border-color: var(--line-strong); background: var(--ink-700); }
.detail-card .eyebrow { margin-bottom: 12px; }
.detail-card h4 {
  font: 600 1.375rem/1.3 var(--font-display);
  color: var(--moon-100);
  margin-bottom: 12px;
}
.detail-card p { font-size: 0.9875rem; }
.detail-meta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  font-size: 0.9375rem;
}
.detail-meta span { color: var(--moon-500); }
.detail-meta strong { color: var(--moon-300); font-weight: 400; }
.detail-meta .gold { color: var(--gold-400); }

.result-note {
  margin-top: 32px;
  font-size: 0.9375rem;
  color: var(--moon-500);
  max-width: 70ch;
}
.result-note strong { color: var(--gold-400); font-weight: 400; }

/* ---------- Name result: systems side by side ---------- */
.compound {
  font-family: var(--font-numeric);
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  color: var(--gold-400);
}

/* ---------- Lo Shu ---------- */
.loshu-classic { max-width: 380px; margin: 16px 0 0; }
.loshu-classic img { width: 100%; }
.loshu-classic figcaption {
  font-size: 0.875rem;
  color: var(--moon-500);
  margin-top: 16px;
  max-width: 42ch;
}
.loshu-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 380px) 1fr;
  gap: 48px;
  align-items: start;
}
.loshu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 1;
}
.loshu-cell {
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  font: 200 1.9rem var(--font-numeric);
  font-variant-numeric: tabular-nums;
  color: var(--gold-400);
  background: var(--ink-800);
  position: relative;
}
.loshu-cell .ghost {
  color: var(--moon-500);
  opacity: 0.35;
  font-size: 1.1rem;
}
.loshu-cell.is-empty { background: var(--ink-900); }
.loshu-legend { font-size: 0.875rem; color: var(--moon-500); margin-top: 16px; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 24px; }
.chip {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 6px 14px;
  font-size: 0.9375rem;
  color: var(--moon-300);
}
.chip.missing { border-color: var(--slate-400); color: var(--slate-400); }
.chip.arrow { border-color: var(--line-strong); color: var(--gold-400); }

/* ---------- Nine numbers (Lo Shu arrangement) ---------- */
.loshu-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.number-card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px;
  position: relative;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.number-card:hover { border-color: var(--line-strong); background: var(--ink-700); }
.number-card .num {
  font: 200 3.25rem/1 var(--font-numeric);
  color: var(--gold-400);
}
.number-card .planet {
  font: 600 1.25rem/1.3 var(--font-display);
  color: var(--moon-100);
  margin-top: 12px;
}
.number-card .sanskrit { color: var(--moon-500); font-size: 0.875rem; letter-spacing: 0.06em; }
.number-card .keywords { margin-top: 14px; font-size: 0.9375rem; color: var(--moon-300); }
.number-card .glyph {
  position: absolute;
  top: 24px; right: 24px;
  font: 300 1.75rem/1 var(--font-numeric);
  color: var(--slate-400);
  opacity: 0.8;
}
.grid-caption {
  text-align: center;
  margin-top: 32px;
  font-family: var(--font-numeric);
  font-weight: 300;
  color: var(--moon-500);
  font-variant-numeric: tabular-nums;
}

/* ---------- Systems ---------- */
.systems-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.system-card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 48px;
}
.system-card h3 { margin-bottom: 16px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.system-tag {
  font: 500 0.6875rem/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-400);
}
.system-card > p { font-size: 0.9875rem; margin-bottom: 24px; }

.value-table { width: 100%; border-collapse: collapse; }
.value-table th {
  font: 500 0.75rem/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moon-500);
  text-align: left;
  padding: 0 16px 12px 0;
  border-bottom: 1px solid var(--line);
}
.value-table td {
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9875rem;
}
.value-table tr:last-child td { border-bottom: none; }
.value-table td:first-child {
  font: 300 1.25rem var(--font-numeric);
  font-variant-numeric: tabular-nums;
  color: var(--gold-400);
  width: 64px;
}

/* ---------- Name correction ---------- */
.correction-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 64px;
  align-items: center;
}
.correction-copy p { margin-bottom: 24px; max-width: 60ch; }
.correction-list { list-style: none; margin: 8px 0 32px; }
.correction-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.correction-list li:first-child { border-top: 1px solid var(--line); }
.correction-list .was { color: var(--moon-500); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.correction-list .now { color: var(--gold-400); }
.correction-art img { width: 100%; max-width: 440px; margin: 0 auto; }

/* ---------- Masters ---------- */
.masters-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.master-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 48px 32px;
  background: var(--ink-800);
  transition: border-color var(--dur-fast);
}
.master-card:hover { border-color: var(--line-strong); }
.master-num {
  font: 200 4.5rem/1 var(--font-numeric);
  font-variant-numeric: tabular-nums;
  color: var(--gold-400);
  display: block;
  margin-bottom: 16px;
}
.master-card h3 { font-size: 1.375rem; margin-bottom: 12px; }
.master-card p { font-size: 0.9875rem; }

/* ---------- FAQ ---------- */
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 24px 40px 24px 0;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--moon-100);
  position: relative;
  transition: color var(--dur-fast);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-numeric);
  font-weight: 200;
  font-size: 1.75rem;
  color: var(--gold-400);
  transition: transform var(--dur-fast) var(--ease-drift);
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list summary:hover { color: var(--gold-400); }
.faq-list details p {
  padding: 0 0 28px;
  max-width: 65ch;
  font-size: 0.9875rem;
}

/* ---------- Footer ---------- */
.footer { margin-top: 48px; }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  text-align: center;
}
.footer-inner .wordmark { display: inline-block; margin-bottom: 24px; }
.footer-inner p {
  color: var(--moon-500);
  font-size: 0.9375rem;
  max-width: 60ch;
  margin: 0 auto 12px;
}
.footer-fine { font-size: 0.8125rem; opacity: 0.8; }
.footer a { color: var(--moon-300); }
.footer a:hover { color: var(--gold-400); }

/* ---------- Hindi / Devanagari accents ---------- */
.dev {
  font-family: 'Tiro Devanagari Hindi', 'Noto Serif Devanagari', var(--font-display);
  font-weight: 400;
}
.hi-line { color: var(--gold-400); }

/* ---------- Aaj ka Ank (daily strip) ---------- */
.daily-strip {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--ink-800);
}
.daily-strip .today-date {
  font: 500 0.75rem/1.5 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moon-500);
}
.daily-strip .universal {
  font: 200 2.6rem/1 var(--font-numeric);
  color: var(--gold-400);
}
.daily-strip .daily-note { flex: 1 1 260px; font-size: 0.9375rem; color: var(--moon-300); }
.daily-strip form { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }

/* ---------- Deep dive (number picker) ---------- */
.num-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.num-pick {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--moon-300);
  font: 300 1.5rem var(--font-numeric);
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
}
.num-pick:hover { border-color: var(--gold-400); color: var(--gold-400); }
.num-pick.is-active { background: var(--gold-400); border-color: var(--gold-400); color: var(--ink-900); }
.deep-panel { min-height: 200px; }
.deep-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px 64px;
  align-items: start;
}
.deep-side {
  position: sticky;
  top: 96px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px;
  text-align: center;
}
.deep-side .medallion { width: auto; margin-bottom: 8px; }
.deep-side .detail-meta { text-align: left; margin-top: 24px; }
.deep-cards { grid-template-columns: repeat(2, 1fr); }
.deep-essay {
  font-size: 1.125rem;
  line-height: 1.85;
  max-width: 70ch;
  color: var(--moon-100);
  margin-bottom: 32px;
}
.deep-essay::first-letter {
  font-family: var(--font-display);
  font-size: 3.2em;
  float: left;
  line-height: 0.85;
  padding-right: 12px;
  color: var(--gold-400);
}
.combo-select { margin-top: 48px; }
.num-picker { margin-bottom: 40px; }
.combo-line {
  border-left: 2px solid var(--line-strong);
  padding: 12px 0 12px 24px;
  margin-top: 24px;
  font-size: 1.0625rem;
  color: var(--moon-100);
}

/* ---------- Compound numbers grid ---------- */
.compound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.compound-card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 4px;
  padding: 20px 24px;
}
.compound-card.shubh { border-left-color: var(--gold-400); }
.compound-card.ashubh { border-left-color: var(--error); }
.compound-card.mishrit { border-left-color: var(--slate-400); }
.compound-card .c-num {
  font: 200 1.9rem/1 var(--font-numeric);
  color: var(--gold-400);
}
.compound-card .c-name {
  font: 600 1.0625rem/1.3 var(--font-display);
  color: var(--moon-100);
  margin: 8px 0 2px;
}
.compound-card .c-hi { font-size: 0.8125rem; color: var(--moon-500); margin-bottom: 8px; }
.compound-card .c-text { font-size: 0.875rem; color: var(--moon-300); }
.compound-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--moon-300);
  border-radius: 2px;
  padding: 8px 18px;
  font: 400 0.9375rem/1 var(--font-body);
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.filter-chip:hover { border-color: var(--gold-400); }
.filter-chip.is-active { border-color: var(--gold-400); color: var(--gold-400); }

/* ---------- Maitri chart ---------- */
.maitri-table { width: 100%; border-collapse: collapse; }
.maitri-table th, .maitri-table td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.9875rem;
  vertical-align: top;
}
.maitri-table th {
  font: 500 0.75rem/1 var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moon-500);
}
.maitri-table td:first-child {
  font: 300 1.5rem var(--font-numeric);
  color: var(--gold-400);
  width: 72px;
}
.rel-chip {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  padding: 3px 8px;
  margin: 0 6px 6px 0;
  border-radius: 2px;
  font: 400 0.9375rem/1.4 var(--font-numeric);
}
.rel-chip.mitra { border: 1px solid var(--gold-400); color: var(--gold-400); }
.rel-chip.sam { border: 1px solid var(--line); color: var(--moon-500); }
.rel-chip.shatru { border: 1px solid rgba(201,123,107,0.55); color: var(--error); }

/* ---------- Compatibility result ---------- */
.compat-score {
  font: 200 4.5rem/1 var(--font-numeric);
  color: var(--gold-400);
}
.compat-verdict { font-family: var(--font-display); font-size: 1.625rem; color: var(--moon-100); }
.compat-pairs { margin-top: 32px; }
.compat-pairs .pair-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9875rem;
  flex-wrap: wrap;
}

/* ---------- Forecast timeline ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 40px;
}
.timeline .t-cell {
  padding: 18px 8px;
  text-align: center;
  border-right: 1px solid var(--line);
  background: var(--ink-800);
}
.timeline .t-cell:last-child { border-right: none; }
.timeline .t-cell.is-now { background: var(--ink-700); box-shadow: inset 0 2px 0 var(--gold-400); }
.timeline .t-year { font: 500 0.6875rem/1.6 var(--font-body); letter-spacing: 0.1em; color: var(--moon-500); }
.timeline .t-py { font: 200 1.9rem/1.2 var(--font-numeric); color: var(--gold-400); }

/* ---------- Celebrity gallery ---------- */
.celeb-list { list-style: none; }
.celeb-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.celeb-list li:first-child { border-top: 1px solid var(--line); }
.celeb-num { font: 200 2.25rem/1 var(--font-numeric); color: var(--gold-400); }
.celeb-list h4 { font: 600 1.25rem/1.4 var(--font-display); color: var(--moon-100); margin-bottom: 4px; }
.celeb-list p { font-size: 0.9375rem; color: var(--moon-300); }

/* ---------- Suggestions (name correction) ---------- */
.suggest-list { list-style: none; margin-top: 8px; }
.suggest-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.0625rem;
  flex-wrap: wrap;
}
.suggest-list .s-name { color: var(--moon-100); font-weight: 400; }
.suggest-list .s-meta { color: var(--moon-500); font-size: 0.9375rem; }
.suggest-list .s-num { color: var(--gold-400); font-family: var(--font-numeric); }

/* ---------- Remedies ---------- */
.remedy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

@media (max-width: 900px) {
  .timeline { grid-template-columns: repeat(3, 1fr); }
  .timeline .t-cell { border-bottom: 1px solid var(--line); }
}

/* ---------- Generated artwork blending ---------- */
/* Raster art sits on near-black grounds that never match the ink tokens exactly:
   lighten-blend drops the mismatched dark ground, the mask feathers the edges. */
.art-blend {
  mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 55%, transparent 98%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 55%, transparent 98%);
}

/* ---------- Scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-slow) var(--ease-drift), transform var(--dur-slow) var(--ease-drift);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .section { padding: 64px 20px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 112px; }
  .hero-art { order: -1; }
  .hero-img { max-width: 240px; }
  .systems-grid, .masters-row { grid-template-columns: 1fr; }
  .correction-grid { grid-template-columns: 1fr; gap: 48px; }
  .correction-art { order: -1; }
  .correction-art img { max-width: 280px; }
  .loshu-wrap { grid-template-columns: 1fr; }
  .system-card { padding: 32px; }
  .deep-grid { grid-template-columns: 1fr; }
  .deep-side { position: static; max-width: 380px; }
  .deep-cards { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    height: 100dvh;
    background: var(--ink-900);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateY(-102%);
    visibility: hidden;
    transition: transform var(--dur-slow) var(--ease-drift),
                visibility 0s linear var(--dur-slow);
    z-index: -1;
  }
  .nav-links.is-open {
    transform: none;
    visibility: visible;
    transition: transform var(--dur-slow) var(--ease-drift);
  }
  .nav-links a { font-family: var(--font-display); font-size: 2.25rem; color: var(--moon-100); }
}

@media (max-width: 600px) {
  .loshu-cards { grid-template-columns: 1fr; }
  .medallion-row { gap: 24px; justify-content: center; }
  .field input { min-width: 0; width: 100%; }
  .field { width: 100%; }
  .field-group .btn-primary { width: 100%; text-align: center; }
  .number-card .glyph { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
  .load-seq, .reveal, .starfield { opacity: 1; transform: none; }
  .medallion .digit { opacity: 1; }
  .medallion .ring.draw { stroke-dasharray: none; stroke-dashoffset: 0; }
}
