:root {
  --primary: #B72F55;
  --primary-ink: #8E1F3F;
  --accent: #275FC7;
  --accent-soft: #E8F0FF;
  --background: #FFF6F8;
  --surface: #FFFFFF;
  --surface-2: #FCE4EA;
  --surface-3: #F7D6E0;
  --text: #351923;
  --muted: #765765;
  --border: #F0C7D2;
  --border-strong: #E3A4B6;
  --success: #0F7A4B;
  --warning: #9A5B00;
  --chip: #FFF0F4;
  --shadow: 0 10px 30px rgba(53, 25, 35, 0.08);
  --shadow-soft: 0 4px 14px rgba(53, 25, 35, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --header-h: 72px;
  --sticky-cta-h: 68px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1180px;
  --rule: 1px solid var(--border);
  --rule-strong: 2px solid var(--border-strong);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--background);
  font-size: 17.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary); }
p { margin: 0 0 1rem; }
h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 0.35rem; }
table { width: 100%; border-collapse: collapse; }
th, td {
  border-bottom: var(--rule);
  text-align: left;
  padding: 0.75rem 0.65rem;
  vertical-align: top;
}
th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--surface-2);
}
.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header / mega menu */
.site-header {
  position: sticky;
  top: 0;
  z-index: 320;
  background: rgba(255, 246, 248, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: var(--rule-strong);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--primary), #7A1735);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
  flex: 0 0 auto;
}
.brand-copy { display: grid; gap: 0.05rem; min-width: 0; }
.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand-tag {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.main-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
}
.main-nav > li { list-style: none; position: relative; }
.main-nav, .main-nav ul { margin: 0; padding: 0; list-style: none; }
.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--primary-ink);
}
.nav-item.has-mega > button,
.nav-item.has-mega > a.nav-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.mega {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 80vw);
  background: var(--surface);
  border: var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: none;
  grid-template-columns: 1.1fr 1fr;
  gap: 0.85rem;
  z-index: 300;
}
.nav-item.has-mega:focus-within .mega:not([hidden]),
.nav-item.has-mega:hover .mega:not([hidden]),
.nav-item.has-mega.open .mega {
  display: grid;
}
.mega[hidden] { display: none !important; }
.mega h3 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.mega a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: normal;
}
.mega a span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.1rem;
}
.mega a:hover { background: var(--surface-2); }
.verify-stamp {
  display: none;
  align-items: center;
  gap: 0.4rem;
  border: 1px dashed var(--border-strong);
  background: var(--chip);
  color: var(--primary-ink);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.header-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font-weight: 750;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.1;
}
.btn-primary,
.header-cta {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary-ink);
  box-shadow: 0 8px 18px rgba(183, 47, 85, 0.22);
}
.btn-primary:hover,
.header-cta:hover { filter: brightness(0.96); color: #fff !important; }
.btn-secondary,
.header-cta-ghost {
  background: var(--surface);
  color: var(--text) !important;
  border-color: var(--border-strong);
}
.btn-secondary:hover,
.header-cta-ghost:hover { background: var(--surface-2); }
.btn-accent {
  background: var(--accent);
  color: #fff !important;
  border-color: #1d4a9c;
}
.hamburger {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: var(--rule-strong);
  background: var(--surface);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
  z-index: 360;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  min-height: 2px;
  background: var(--text);
  border-radius: 2px;
  flex-shrink: 0;
  line-height: 0;
  font-size: 0;
}
.mobile-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(88vw, 360px);
  background: var(--surface);
  border-left: var(--rule-strong);
  box-shadow: var(--shadow);
  z-index: 280;
  padding: calc(var(--header-h) + 1rem) 1rem 6rem;
  transform: translateX(105%);
  transition: transform 0.22s ease, visibility 0.22s ease;
  overflow-y: auto;
  height: 100dvh;
  pointer-events: none;
}
.mobile-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-drawer[aria-hidden="true"] { visibility: hidden; }
.mobile-drawer.open[aria-hidden="false"] { visibility: visible; }
.drawer-nav, .drawer-nav ul { list-style: none; margin: 0; padding: 0; }
.drawer-nav a, .drawer-nav summary {
  display: block;
  padding: 0.85rem 0.4rem;
  border-bottom: var(--rule);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.drawer-nav details ul a {
  font-weight: 600;
  color: var(--muted);
  padding-left: 0.9rem;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(53, 25, 35, 0.35);
  z-index: 270;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Sections / surfaces */
main { padding-bottom: 2rem; }
section[id], .section[id] { scroll-margin-top: 90px; }
.section {
  padding: 2.6rem 0;
  border-bottom: var(--rule);
}
.section-alt { background: linear-gradient(180deg, var(--surface-2), transparent 70%); }
.section-paper { background: var(--surface); border-block: var(--rule); }
.section-ink {
  background: linear-gradient(160deg, #2A1220, #3C1830 55%, #1C0E18);
  color: #FFE8EF;
  border-bottom: 0;
}
.section-ink .muted,
.section-ink .eyebrow,
.section-ink p { color: rgba(255, 232, 239, 0.82); }
.section-ink h2, .section-ink h3 { color: #fff; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.55rem;
}
.section-head {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
  max-width: 46rem;
}
.section-head.wide { max-width: none; }
.muted { color: var(--muted); }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 48rem; }

/* Cards / ruled surfaces */
.card,
.data-card,
.step-card,
.loose-card,
.hub-card,
.team-card,
.note-card,
.faq-item,
.matrix-card,
.film-card {
  background: var(--surface);
  border: var(--rule-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.card, .data-card, .loose-card, .hub-card, .team-card, .note-card, .matrix-card, .film-card {
  padding: 1.15rem 1.2rem;
}
.card-grid,
.band,
.faq-grid {
  display: grid;
  gap: 1rem;
}
.ruled {
  border: var(--rule-strong);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.ruled-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.8fr) auto;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-bottom: var(--rule);
  align-items: start;
}
.ruled-row:last-child { border-bottom: 0; }
.ruled-row strong { display: block; }
.chip,
.source-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  background: var(--chip);
  color: var(--primary-ink);
  white-space: nowrap;
}
.status-chip.ok { background: #E8F8F0; color: var(--success); border-color: #B7E5CB; }
.status-chip.warn { background: #FFF4E5; color: var(--warning); border-color: #F0D2A0; }
.status-chip.info { background: var(--accent-soft); color: var(--accent); border-color: #B9CFF5; }

/* Hero editorial-lead */
.hero {
  position: relative;
  padding: 2.2rem 0 2.6rem;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.5rem;
  align-items: stretch;
}
.hero-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  min-width: 0;
}
.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.hero h1 { margin: 0; max-width: 14ch; }
.hero-lede { font-size: 1.08rem; color: var(--muted); max-width: 38rem; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.hero-meta .stat {
  border: var(--rule);
  background: rgba(255,255,255,0.78);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.8rem;
}
.hero-meta .stat b {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.hero-meta .stat span {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.layered-notes {
  position: relative;
  min-height: 360px;
  min-width: 0;
}
.layered-notes .frame {
  position: absolute;
  border: var(--rule-strong);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.layered-notes .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.layered-notes .frame-a {
  inset: 0 12% 18% 0;
  z-index: 1;
}
.layered-notes .frame-b {
  width: 48%;
  height: 46%;
  right: 0;
  bottom: 0;
  z-index: 2;
  border-width: 3px;
  border-color: var(--primary);
}
.note-chip {
  position: absolute;
  z-index: 3;
  background: var(--surface);
  border: var(--rule-strong);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  box-shadow: var(--shadow-soft);
  max-width: 180px;
  font-size: 0.78rem;
  font-weight: 650;
}
.note-chip small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 0.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.note-chip.n1 { top: 8%; left: -2%; }
.note-chip.n2 { right: 4%; top: 42%; }

/* Masonry competition desk */
.masonry {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.9rem;
}
.masonry > * { min-width: 0; }
.tile-lg { grid-column: span 7; }
.tile-md { grid-column: span 5; }
.tile-sm { grid-column: span 4; }
.tile-wide { grid-column: span 8; }
.tile {
  background: var(--surface);
  border: var(--rule-strong);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 0.55rem;
  align-content: start;
}
.tile h3 { margin: 0; }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tile-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: start;
}

/* Split ledger */
.ledger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}
.ledger-col {
  border: var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.ledger-col header {
  padding: 0.85rem 1rem;
  border-bottom: var(--rule);
  background: var(--surface-2);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.ledger-col ul { list-style: none; margin: 0; padding: 0; }
.ledger-col li {
  padding: 0.85rem 1rem;
  border-bottom: var(--rule);
  margin: 0;
}
.ledger-col li:last-child { border-bottom: 0; }

/* Team framed panels */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.team-card {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  overflow: hidden;
}
.team-card .media {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: var(--rule);
}
.team-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-card .body { padding: 1rem 1.05rem 1.15rem; display: grid; gap: 0.45rem; }
.team-card h3 { margin: 0; }

/* Role atlas */
.role-atlas {
  display: grid;
  gap: 0.75rem;
}
.role-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.role-badge {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #163F8F);
  text-transform: uppercase;
  font-size: 0.78rem;
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.tab-btn {
  appearance: none;
  border: var(--rule-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 750;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
}
.tab-btn[aria-selected="true"] {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.tab-panel {
  display: none;
  border: var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
}
.tab-panel.active { display: grid; gap: 0.8rem; }
.tab-panel .split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1rem;
  align-items: start;
}

/* Notebook / board / matrix */
.notebook {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
}
.note-stack { display: grid; gap: 0.75rem; }
.callout {
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border: var(--rule);
  border-left-width: 4px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1rem;
}
.matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.matrix-card h3 { margin: 0 0 0.35rem; }
.timeline {
  display: grid;
  gap: 0.8rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: var(--border-strong);
}
.film-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0.85rem;
  position: relative;
}
.film-card .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary);
  margin-top: 0.35rem;
  margin-left: 5px;
}

/* Inline images */
.inline-image-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1rem;
  align-items: center;
  margin: 1.4rem 0;
}
.inline-image-row.reverse { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.inline-image-row.reverse .visual { order: 2; }
.inline-image-row .visual,
.figure-frame {
  border: var(--rule-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
}
.inline-image-row img,
.figure-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.figure-frame figcaption,
.caption {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: var(--rule);
  background: var(--surface);
}
.page-hero {
  position: relative;
  border-bottom: var(--rule-strong);
  background: var(--surface);
}
.page-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.4rem;
  padding: 2rem 0;
  align-items: center;
}
.page-hero .banner {
  border: var(--rule-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.page-hero .banner img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.prose { max-width: 46rem; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.4rem; }
.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
  padding: 2rem 0 3rem;
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  border: var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem;
}
.toc h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}
.toc ol { margin: 0; padding-left: 1.1rem; }
.toc a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.9rem; }
.steps {
  display: grid;
  gap: 0.8rem;
  counter-reset: step;
}
.step-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 1rem;
}
.step-num {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: var(--rule-strong);
  font-weight: 800;
  color: var(--primary-ink);
}
.faq-grid { gap: 0.75rem; }
.faq-item { padding: 0; overflow: hidden; }
.faq-item details { padding: 0; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.1rem;
  font-weight: 750;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .answer {
  padding: 0 1.1rem 1.05rem;
  color: var(--muted);
}
.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.3rem 1.4rem;
  border: var(--rule-strong);
  border-radius: var(--radius);
  background: linear-gradient(120deg, #fff, var(--surface-2));
  box-shadow: var(--shadow-soft);
}
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scroll-snap-type: x mandatory;
}
.rail .hub-card { scroll-snap-align: start; }
.feed { display: grid; gap: 0.75rem; }
.feed-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.85rem;
  border: var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.feed-item img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: var(--rule);
}
.feed-item h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.feed-item p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Footer */
.site-footer {
  background: #2A1220;
  color: #F8E7ED;
  padding: 3rem 0 6.5rem;
  border-top: 4px solid var(--primary);
}
.site-footer a { color: #FFD5E1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}
.footer-grid h2 {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 0 0 0.45rem; }
.footer-brand p { color: rgba(248, 231, 237, 0.78); }
.footer-meta {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  justify-content: space-between;
  color: rgba(248, 231, 237, 0.7);
  font-size: 0.9rem;
}

/* Mobile sticky CTA */
.mobile-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 260;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(255, 246, 248, 0.96);
  border-top: var(--rule-strong);
  backdrop-filter: blur(10px);
  display: none;
}
.mobile-sticky-cta .btn {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

/* Utilities */
.stack-sm { display: grid; gap: 0.55rem; }
.stack { display: grid; gap: 0.9rem; }
.stack-lg { display: grid; gap: 1.25rem; }
.cluster { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.table-wrap {
  overflow-x: auto;
  border: var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.table-wrap table { min-width: 640px; }
.compliance-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.kpi {
  background: var(--surface);
  border: var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}
.kpi b { display: block; font-size: 1.25rem; letter-spacing: -0.02em; }
.kpi span { color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .verify-stamp { display: inline-flex; }
  .hamburger { display: none; }
  .header-cta-ghost { display: inline-flex; }
}
@media (max-width: 899px) {
  .hero-grid,
  .page-hero-inner,
  .ledger,
  .notebook,
  .tab-panel .split,
  .inline-image-row,
  .inline-image-row.reverse,
  .content-wrap,
  .cta-band,
  .two-col,
  .three-col,
  .team-grid,
  .matrix,
  .footer-grid,
  .kpi-row,
  .role-row {
    grid-template-columns: 1fr;
  }
  .inline-image-row.reverse .visual { order: 0; }
  .masonry { grid-template-columns: 1fr; }
  .tile-lg, .tile-md, .tile-sm, .tile-wide { grid-column: auto; }
  .hero-meta { grid-template-columns: 1fr; }
  .layered-notes { min-height: 300px; margin-top: 0.5rem; }
  .layered-notes .frame-a { inset: 0 0 22% 0; }
  .layered-notes .frame-b { width: 44%; height: 42%; }
  .note-chip.n1 { left: 4%; top: 6%; }
  .hero { padding: 1.4rem 0 1.8rem; }
  .hero h1 { max-width: none; font-size: 2rem; }
  .header-cta, .header-cta-ghost { display: none; }
  .toc { position: static; }
  .mobile-sticky-cta { display: block; }
  body { padding-bottom: var(--sticky-cta-h); }
  .site-footer { padding-bottom: 7.5rem; }
  .ruled-row { grid-template-columns: 1fr; }
  .feed-item { grid-template-columns: 84px minmax(0, 1fr); }
}
@media (max-width: 430px) {
  .container { width: min(100% - 1.25rem, var(--max)); }
  .btn { padding: 0.7rem 1rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .brand-tag { display: none; }
}

/* Required class aliases for visual structure audits */
.band { display: block; }
.data-card, .step-card, .step-num, .loose-card, .faq-grid, .card {
  /* structural presence for card visual systems */
}

ul.main-nav { display: none; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) {
  ul.main-nav { display: flex; }
  nav[aria-label="Primary"] { margin-left: 0.5rem; }
}



/* final layout guards v7 */
.site-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 320 !important;
  background: rgba(255, 246, 248, 0.96) !important;
}
.hamburger {
  z-index: 360 !important;
  position: relative !important;
  pointer-events: auto !important;
}
body { overflow-x: visible; }
.layered-notes { overflow: hidden; max-width: 100%; }
.note-chip.n1 { left: 0.5rem; }
.hero-grid, .page-hero-inner, .masonry, .notebook, .ledger, .container { max-width: 100%; }
@media (max-width: 899px) {
  .mobile-sticky-cta { display: block !important; }
  .hamburger { display: inline-flex !important; }
  ul.main-nav { display: none !important; }
  .header-cta, .header-cta-ghost, .verify-stamp { display: none !important; }
  .layered-notes { min-height: 240px; max-height: 300px; }
  .hero { padding: 1.1rem 0 1.4rem !important; }
}


@media (max-width: 899px) {
  .hero {
    min-height: 480px !important;
    max-height: 720px !important;
    overflow: hidden !important;
    padding: 80px 0 48px !important;
  }
  .hero-grid { gap: 0.75rem !important; }
  .hero-meta { display: none !important; }
  .hero-lede { font-size: 15px !important; line-height: 1.45 !important; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .hero h1, .hero #hero-h { font-size: 28px !important; line-height: 1.12 !important; }
  .layered-notes { min-height: 200px !important; max-height: 220px !important; }
  .note-chip { display: none !important; }
  .page-hero .banner img { max-height: 220px; object-fit: cover; }
  .page-hero-inner { padding: 1.2rem 0 !important; }
}

/* pagespeed mobile hardener: layout stability */
.layered-notes .frame-a { aspect-ratio: 14 / 9; }
.layered-notes .frame-b { aspect-ratio: 9 / 7; }
.figure-frame, .media-frame { overflow: hidden; }
.figure-frame img, .media-frame img { width: 100%; height: auto; display: block; }
img[width][height] { height: auto; }

