:root {
  --primary: #1769E8;
  --primary-ink: #0E4BB5;
  --accent: #0EA5A8;
  --accent-deep: #0B7C7F;
  --background: #F4F8FF;
  --paper: #F4F8FF;
  --surface: #FFFFFF;
  --surface-2: #E8F1FF;
  --surface-3: #D7E6FB;
  --text: #13213A;
  --ink: #13213A;
  --muted: #3A4F68;
  --border: #C9D9F2;
  --border-strong: #9BB6DE;
  --danger: #9B2C2C;
  --ok: #0B7C7F;
  --shadow: 0 10px 30px rgba(19, 33, 58, 0.08);
  --radius: 2px;
  --header-h: 72px;
  --font: "DM Sans", "Noto Sans Devanagari", "Segoe UI", sans-serif;
  --max: 1180px;
  --cta: #1769E8;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chapter-still,
  .snap-chapter { scroll-snap-align: none; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  min-width: 0;
}

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

a { color: var(--primary-ink); }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 320;
  background: rgba(244, 248, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 auto;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.brand-name {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 18px;
  white-space: nowrap;
}
.brand-tag {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--primary);
  color: var(--primary-ink);
}
.main-nav a.cta,
.header-cta {
  background: var(--primary);
  color: #fff !important;
  border: 0;
  border-bottom: 0 !important;
  padding: 10px 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
}
.header-cta-ghost {
  color: var(--primary-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  padding: 9px 14px;
  background: var(--surface);
}

.mega {
  position: relative;
}
.mega > button {
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  padding: 6px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.mega > button[aria-expanded="true"],
.mega:focus-within > button { border-bottom-color: var(--primary); }
.mega-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  background: #fff;
  border: 2px solid var(--ink);
  min-width: 280px;
  padding: 12px;
  z-index: 340;
  box-shadow: var(--shadow);
}
.mega:hover .mega-panel,
.mega:focus-within .mega-panel,
.mega-panel.open { display: grid; gap: 6px; }
.mega-panel a {
  display: block;
  padding: 8px 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}
.mega-panel a:hover { background: var(--surface-2); }

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  background: #fff;
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 500;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.hamburger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
html.is-drawer-open,
html.is-drawer-open body {
  overflow: hidden;
}
.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  pointer-events: none;
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(19, 33, 58, 0.35);
}
.mobile-drawer.is-open,
.mobile-drawer.open { display: block; }

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 360px);
  height: 100dvh;
  background: #fff;
  border-left: 2px solid var(--ink);
  padding: 20px 20px 120px;
  overflow: auto;
}
.drawer-close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-size: 22px;
  cursor: pointer;
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
}
.drawer-nav a {
  display: block;
  padding: 12px 4px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.drawer-nav a.drawer-play {
  margin-top: 16px;
  background: var(--primary);
  color: #fff;
  text-align: center;
  border: 0;
  padding: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wrap,
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  min-width: 0;
}
.container-narrow { max-width: 780px; }

section[id] { scroll-margin-top: 88px; }

.band { padding: 56px 0; }
.band-paper { background: var(--paper); }
.band-warm,
.band-ice { background: var(--surface-2); }
.band-ink {
  background: var(--ink);
  color: #F4F8FF;
}
.band-ink h2, .band-ink p, .band-ink a { color: #F4F8FF; }
.band-ink a { text-decoration: underline; }

.eyebrow,
.label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
  margin-bottom: 8px;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 14px;
}
h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 700; }
h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 700; }
p { margin: 0 0 14px; color: var(--ink); }
.lede { font-size: 18px; max-width: 62ch; color: var(--muted); }

/* MOSAIC DESK */
.mosaic-desk {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 18px;
  align-items: stretch;
  padding: 28px 0 40px;
}
.mosaic-copy,
.mosaic-stack,
.mosaic-pane,
.chip,
.tile,
.card,
.ledger,
.instrument,
.note,
.lock-row {
  min-width: 0;
}
.mosaic-copy {
  background: #fff;
  border: 2px solid var(--ink);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
}
.mosaic-copy .hero-cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.mosaic-stack {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-strong);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}
.chip img {
  width: 88px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.chip strong { display: block; font-size: 16px; }
.chip span { display: block; color: var(--muted); font-size: 14px; }

/* CINEMATIC CHAPTER */
.snap-chapter {
  scroll-snap-align: start;
}
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 0;
  background: #fff;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.chapter-index {
  padding: 40px 28px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.chapter-num {
  font-size: clamp(72px, 12vw, 140px);
  line-height: 0.8;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.06em;
}
.chapter-still {
  min-width: 0;
  background: var(--surface-3);
}
.chapter-still img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
  max-height: 520px;
}
.chapter-caption {
  font-size: 14px;
  color: var(--muted);
}

/* MASONRY */
.masonry {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
}
.masonry .tile:nth-child(3) { grid-column: 1; }
.masonry .tile:nth-child(4) { grid-column: 2; }
.tile {
  background: #fff;
  border: 1px solid var(--border-strong);
  padding: 18px;
  box-shadow: var(--shadow);
}
.tile img {
  aspect-ratio: 16/10;
  object-fit: cover;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.glass-card {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(23,105,232,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), var(--shadow);
}

/* INSTRUMENT */
.instrument {
  display: grid;
  grid-template-columns: minmax(0, 72px) minmax(0, 1fr);
  gap: 0 18px;
}
.step-rail { border-left: 2px solid var(--primary); padding-left: 0; }
.step-num,
.step-card .step-num {
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  background: #fff;
  color: var(--primary);
}
.step-card,
.data-card,
.loose-card,
.card {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
}
.step-grid,
.data-grid,
.card-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.inline-image-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: center;
  margin: 22px 0;
}
.inline-image-row img,
.inline-image-row .visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* LOCK */
.lock-board {
  background: var(--surface-2);
  border: 2px solid var(--ink);
  padding: 22px;
}
.lock-row {
  display: grid;
  grid-template-columns: minmax(0, 28px) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.lock-mark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-deep);
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

/* LEDGER */
.data-table-wrap,
.ledger { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 16px;
}
.data-table th,
.data-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  min-width: 0;
}
.data-table th { background: var(--surface-2); }

/* FEED */
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li {
  display: grid;
  grid-template-columns: minmax(0, 110px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.feed-list time {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* FAQ */
.faq details,
.q-item {
  background: #fff;
  border: 1px solid var(--border-strong);
  padding: 4px 14px;
  margin: 0 0 10px;
}
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  list-style: none;
  padding: 16px 20px 0;
  margin: 0 auto;
  max-width: var(--max);
  font-size: 14px;
  color: var(--muted);
}
.crumbs li { white-space: nowrap; }
.crumbs li:not(:last-child)::after { content: "/"; margin: 0 8px; color: var(--border-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-hero {
  padding: 28px 0 10px;
}
.page-hero-img img {
  aspect-ratio: 16/7;
  object-fit: cover;
  border: 2px solid var(--ink);
  max-height: 420px;
}
.hero {
  position: relative;
}
.hero img { object-fit: cover; }

.btn,
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 13px;
  padding: 12px 18px;
  border: 0;
  white-space: nowrap;
}
.btn-ghost {
  background: #fff;
  color: var(--primary-ink);
  border: 1px solid var(--border-strong);
}

.mobile-sticky {
  display: none;
}

.site-footer {
  background: #fff;
  border-top: 2px solid var(--ink);
  padding: 40px 0 120px;
  color: var(--ink);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.site-footer h2 {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.colophon {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

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

.poster-grid,
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* verify-all aliases */
.data-card, .step-card, .step-num, .loose-card, .band, .faq-grid { }

@media (max-width: 899px) {
  .hamburger { display: flex; }
  .main-nav,
  .header-cta,
  .header-cta-ghost,
  .mega { display: none; }
  /* Break the sticky header stacking context so the fixed hamburger
     stays at root z:500 above the drawer, and the in-drawer close
     control is no longer covered by the brand bar. */
  html.is-drawer-open .site-header {
    position: static;
    z-index: auto;
    backdrop-filter: none;
  }
  .mosaic-desk,
  .chapter,
  .masonry,
  .split,
  .inline-image-row,
  .step-grid,
  .data-grid,
  .card-grid,
  .faq-grid,
  .poster-grid,
  .hub-grid,
  .footer-grid,
  .feed-list li {
    grid-template-columns: minmax(0, 1fr);
  }
  .masonry .tile:nth-child(3),
  .masonry .tile:nth-child(4) { grid-column: auto; }
  .mosaic-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }
  .mosaic-stack .chip:last-child { grid-column: 1 / -1; }
  .mosaic-copy { min-height: 0; padding: 20px; }
  .chip { grid-template-columns: minmax(0, 1fr); }
  .chip img { width: 100%; height: 84px; }
  .hero,
  .page-hero-img img {
    min-height: 0;
    max-height: 720px;
  }
  .hero-trust { display: none !important; }
  h1#hero-h, #hero-h { font-size: 32px; line-height: 1.12; }
  .mobile-sticky {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 340;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 2px solid var(--ink);
  }
  .mobile-sticky a {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 10px;
    white-space: nowrap;
  }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .site-footer { padding-bottom: 28px; }
  .chapter-still img { max-height: 280px; }
}

@media (max-width: 430px) {
  body { font-size: 17px; }
  .header-inner { padding: 0 12px; }
  .brand-tag { display: none; }
}
