:root {
  --bg: #f8f6ff;
  --bg-2: #ece8ff;
  --surface: #ffffff;
  --ink: #24203d;
  --muted: #68627e;
  --line: #d8d0fa;
  --line-strong: #b8ade8;
  --primary: #6657d9;
  --primary-ink: #ffffff;
  --action: #d94f8a;
  --action-ink: #ffffff;
  --warn: #8a3a1a;
  --ok: #2a6b4a;
  --shadow: 0 10px 28px rgba(36, 32, 61, 0.08);
  --radius: 4px;
  --header-h: 64px;
  --sticky-cta: 64px;
  --max: 1180px;
  --font: "Inter", "Noto Sans Devanagari", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.7;
  max-width: 100%;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open [data-support-launcher] {
  visibility: hidden;
  pointer-events: none;
}

img, picture, video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #4d3fc0; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: #f8f6ff;
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled { box-shadow: 0 8px 20px rgba(36, 32, 61, 0.06); }

.header-inner {
  height: var(--header-h);
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
}

.nav {
  justify-self: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-list a[aria-current="page"] { color: var(--primary); }

.header-cta,
.btn,
.btn-play,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

.header-cta,
.btn-play {
  background: var(--action);
  color: var(--action-ink);
}

.header-cta:hover,
.btn-play:hover { filter: brightness(0.96); color: var(--action-ink); }

.btn {
  background: var(--primary);
  color: var(--primary-ink);
}

.btn:hover { color: var(--primary-ink); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.nav-toggle,
.nav-close {
  display: none;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
}

.nav-backdrop { display: none; }

main { padding-bottom: 48px; }

.page-main { padding-top: 8px; }

section { min-width: 0; }

.band { padding: 56px 0; }
.band + .band { border-top: 1px solid var(--line); }

.band-tight { padding: 20px 0; }
.band-lilac { background: var(--bg-2); }
.band-paper { background: var(--surface); }
.band-ink {
  background: var(--ink);
  color: #f4f1ff;
}
.band-ink a { color: #f3c3d7; }

.kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

h1, h2, h3, h4 {
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 12px;
}

h1 { font-size: clamp(32px, 4vw, 52px); }
h2 { font-size: clamp(26px, 3vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0 0 14px; max-width: 68ch; }
.lede { font-size: 18px; color: var(--muted); max-width: 46ch; }

/* Hero utility scoreboard */
.hero {
  padding: 28px 0 40px;
}

.scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: stretch;
  min-width: 0;
}

.scoreboard > * { min-width: 0; }

.meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.meter {
  padding: 18px 16px 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.meter:last-child { border-right: 0; }

.meter-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.meter-value {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 8px 0 6px;
}

.meter-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.hero-action {
  background: var(--ink);
  color: #f7f4ff;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.hero-brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

.hero-action h1 {
  color: #fff;
  margin: 0;
}

.hero-proof {
  margin: 0;
  color: #d8d3ef;
  font-size: 16px;
}

.hero-action .header-cta,
.hero-action .btn-play { align-self: flex-start; }

/* Modular strip */
.score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.score-mod {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.score-mod h3 { margin-bottom: 6px; }
.score-mod p { margin: 0; color: var(--muted); font-size: 15px; }
.score-mod:hover { border-color: var(--primary); }

/* Portrait split */
.portrait-split {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 28px;
  align-items: center;
}

.frame {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 8px;
}

.frame figcaption {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 4px 2px;
}

/* Stepper */
.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.step {
  padding: 20px 18px 8px 0;
  min-width: 0;
  border-right: 1px solid var(--line);
}

.step:last-child { border-right: 0; }

.step-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

/* Bento */
.bento {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
  min-width: 0;
}

.tile-wide { grid-column: 1; grid-row: 1 / span 2; background: var(--bg-2); }
.tile h3 { margin-top: 0; }

/* Filter desk */
.desk-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.desk-tools button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.desk-tools button.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.desk {
  border: 1px solid var(--line);
  background: var(--surface);
}

.desk-row {
  display: grid;
  grid-template-columns: minmax(0, 0.28fr) minmax(0, 0.72fr);
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.desk-row:last-child { border-bottom: 0; }
.desk-row.is-dim { opacity: 0.55; }
.desk-row.is-hit { background: #f3efff; }
.desk-row strong { display: block; }
.desk-row p { margin: 0; }

/* Ledger */
.ledger {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--surface);
}

.ledger th,
.ledger td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ledger th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Ribbon */
.ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow: visible;
  padding-bottom: 6px;
}

.chip {
  flex: 1 1 100%;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 14px 16px;
  min-width: 0;
}

.chip strong { display: block; margin-bottom: 4px; }
.chip p { margin: 0; font-size: 15px; color: var(--muted); }

/* Corridor / toolkit / rails */
.corridor p,
.corridor h2 { color: inherit; }

.toolkit {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tool {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  padding: 16px;
  min-width: 0;
}

.disclosed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 20px;
}

.timeline { display: grid; gap: 0; }
.time-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.feed { display: grid; gap: 12px; }
.feed a {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.map-grid,
.check-grid,
.related,
.glossary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.map-card,
.check,
.related a,
.glossary div {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.protocol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
}

.protocol div {
  padding: 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.protocol div:last-child { border-right: 0; }

.split-unknown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.colophon {
  font-size: 14px;
  color: var(--muted);
}

.final-band {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: var(--ink);
  color: #fff;
  padding: 22px;
}

.final-band p { color: #d9d4ef; margin: 0; }

/* Article / child */
.page-hero {
  padding: 28px 0 20px;
}

.page-hero .hero-media {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.prose h2 { margin-top: 36px; }
.prose section { min-width: 0; }
.prose section + section { margin-top: 8px; }
.prose figure { margin: 28px 0; }
.prose figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }

.support-chat {
  border: 1px solid var(--line);
  background: var(--surface);
  min-width: 0;
}
.support-chat .chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.support-chat .avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.support-chat .messages {
  min-height: 180px;
  max-height: 320px;
  overflow: auto;
  padding: 16px;
}
.support-chat .bubble {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--bg-2);
  max-width: 42ch;
}
.support-chat .bubble.user { background: #f3efff; }
.support-chat .identity,
.support-chat .composer {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}
.support-chat input,
.support-chat textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
}
.support-chat .status { padding: 0 16px 16px; color: var(--muted); font-size: 14px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.inline-cta {
  margin: 28px 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 36px 0 110px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-grid h2 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0 0 8px; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.fineprint { margin-top: 24px; color: var(--muted); font-size: 13px; }

.mobile-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(248, 246, 255, 0.96);
  border-top: 1px solid var(--line);
}

.mobile-cta .btn-play { width: 100%; }

@media (min-width: 1024px) {
  .nav-toggle,
  .nav-close { display: none !important; }
  .nav,
  .nav[hidden] {
    display: block !important;
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    inset: auto;
  }
  .nav-backdrop,
  .nav-backdrop[hidden] { display: none !important; }
}

@media (max-width: 1023px) {
  .site-header { z-index: 70; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 72; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto auto; }
  .nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: auto;
    width: min(86vw, 360px);
    max-width: 100vw;
    height: calc(100dvh - var(--header-h));
    max-height: calc(100vh - var(--header-h));
    background: var(--surface);
    border-left: 1px solid var(--line);
    padding: 18px 18px 24px;
    z-index: 71;
    justify-self: stretch;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav[hidden] { display: none !important; }
  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 2;
    margin-bottom: 16px;
    background: var(--surface);
  }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 16px; }
  .nav-list a { font-size: 18px; }
  .nav-backdrop {
    display: block;
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(36, 32, 61, 0.35);
    z-index: 65;
  }
  .nav-backdrop[hidden] { display: none !important; }
  .header-cta { display: none; }
  .mobile-cta { display: block; }
  .site-footer { padding-bottom: 120px; }
}

@media (max-width: 860px) {
  .scoreboard,
  .portrait-split,
  .stepper,
  .bento,
  .desk-row,
  .toolkit,
  .disclosed,
  .map-grid,
  .check-grid,
  .related,
  .glossary,
  .protocol,
  .split-unknown,
  .footer-grid,
  .final-band {
    grid-template-columns: minmax(0, 1fr);
  }
  .tile-wide { grid-column: auto; grid-row: auto; }
  .meters { grid-template-columns: minmax(0, 1fr); }
  .meter { border-right: 0; border-bottom: 1px solid var(--line); }
  .meter:last-child { border-bottom: 0; }
  .score-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    gap: 10px;
  }
  .score-mod { flex: none; width: 100%; max-width: 100%; }
  .ledger th,
  .ledger td { padding: 10px 6px; }
  .step, .protocol div { border-right: 0; border-bottom: 1px solid var(--line); }
  .time-row { grid-template-columns: minmax(0, 1fr); }
  .feed a { grid-template-columns: minmax(0, 1fr); }
  .final-band { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
