:root {
  --void: #07080b;
  --void-soft: #0b0d12;
  --panel: #10131a;
  --panel-raised: #151923;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(214, 174, 92, 0.38);
  --text: #f4f2ed;
  --muted: #aaa9a5;
  --dim: #777a82;
  --gold: #d6ae5c;
  --gold-bright: #f2cd79;
  --cyan: #50d7e8;
  --cyan-soft: rgba(80, 215, 232, 0.14);
  --ember: #ff7043;
  --green: #69dda1;
  --red: #ff6868;
  --violet: #a88cff;
  --blue: #71a7ff;
  --orange: #f2a66f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --font-display: "Arial Narrow", "Roboto Condensed", "Aptos Narrow", sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --header-height: 72px;
  --content: min(1180px, calc(100vw - 40px));
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; background: var(--void); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 4%, rgba(214, 174, 92, 0.08), transparent 28rem),
    radial-gradient(circle at 84% 14%, rgba(80, 215, 232, 0.06), transparent 30rem),
    var(--void);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

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

::selection { color: var(--void); background: var(--gold-bright); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--void);
  background: var(--cyan);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus { transform: translateY(0); }

.system-ribbon {
  display: flex;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 6px 20px;
  border-bottom: 1px solid rgba(214, 174, 92, 0.22);
  color: #d3d2cd;
  background: #090a0e;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-ribbon span { display: inline-flex; align-items: center; gap: 8px; }
.system-ribbon a { color: var(--cyan); text-underline-offset: 3px; }
.system-ribbon__mode { color: var(--gold-bright); }
.status-pip { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(105, 221, 161, 0.7); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  width: 100%;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 11, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.11em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand__mark { width: 29px; color: var(--gold); filter: drop-shadow(0 0 10px rgba(214, 174, 92, 0.25)); }
.brand small { padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 0.58rem; font-weight: 500; letter-spacing: 0.15em; }

.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav a {
  padding: 10px 11px;
  border-radius: 3px;
  color: #c8c7c2;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 140ms ease, background 140ms ease;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.primary-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--gold); }
.primary-nav .nav-utility { margin-left: 7px; border: 1px solid var(--line-strong); color: var(--gold-bright); }

.nav-toggle { display: none; width: 44px; height: 44px; place-items: center; gap: 4px; padding: 10px; border: 1px solid var(--line); color: var(--text); background: var(--panel); cursor: pointer; }
.nav-toggle > span:not(.sr-only) { display: block; width: 20px; height: 2px; background: currentColor; transition: transform 140ms ease, opacity 140ms ease; }

main { min-height: 64vh; overflow: clip; }
.shell { width: var(--content); margin-inline: auto; }
.section { width: var(--content); margin-inline: auto; padding-block: clamp(72px, 9vw, 124px); }
.section + .section { border-top: 1px solid var(--line); }
.section--tight { padding-block: clamp(50px, 6vw, 82px); }
.section--flush-top { padding-top: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before { width: 30px; height: 1px; content: ""; background: currentColor; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 0.98; letter-spacing: -0.025em; text-transform: uppercase; text-wrap: balance; }
h1 { max-width: 980px; font-size: clamp(3.4rem, 9vw, 8.4rem); }
h2 { font-size: clamp(2.2rem, 5vw, 4.7rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.85rem); }
h1 span, h2 span { color: var(--gold); }
p { margin: 0; }

.lede { max-width: 740px; color: #c7c5bf; font-size: clamp(1.05rem, 1.8vw, 1.28rem); line-height: 1.7; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 520px); align-items: end; gap: 50px; margin-bottom: 44px; }
.section-heading p { color: var(--muted); }

.page-hero {
  position: relative;
  display: grid;
  width: var(--content);
  min-height: clamp(610px, 78vh, 840px);
  margin-inline: auto;
  align-content: center;
  padding-block: 90px;
}

.page-hero::after {
  position: absolute;
  right: -12%;
  bottom: 10%;
  z-index: -1;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  border: 1px solid rgba(214, 174, 92, 0.15);
  border-radius: 50%;
  content: "";
  box-shadow: inset 0 0 100px rgba(214, 174, 92, 0.04), 0 0 160px rgba(80, 215, 232, 0.04);
}

.page-hero--compact { min-height: 520px; max-width: 900px; }
.page-hero .lede { margin-top: 30px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 28px; color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof i { width: 6px; height: 6px; background: var(--cyan); }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.button:hover { border-color: var(--gold); background: rgba(214, 174, 92, 0.08); transform: translateY(-2px); }
.button--primary { border-color: var(--gold); color: #090a0d; background: var(--gold-bright); }
.button--primary:hover { color: #050608; background: #ffe19d; }
.button--cyan { border-color: var(--cyan); color: #041013; background: var(--cyan); }
.button--danger { border-color: rgba(255, 104, 104, 0.7); color: #ffeaea; background: rgba(255, 104, 104, 0.1); }
.button[disabled] { opacity: 0.48; cursor: not-allowed; transform: none; }
.button--small { min-height: 38px; padding: 8px 13px; font-size: 0.67rem; }

.status-chip, .tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.status-chip::before { width: 6px; height: 6px; border-radius: 50%; content: ""; background: currentColor; }
.status-chip--live { color: var(--green); }
.status-chip--local { color: var(--cyan); }
.status-chip--demo { color: var(--violet); }
.status-chip--optional { color: var(--gold-bright); }
.status-chip--offline { color: var(--red); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  position: relative;
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.012));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}
.card::before { position: absolute; top: -1px; left: 24px; width: 42px; height: 2px; content: ""; background: var(--gold); }
.card h3 { margin-top: 18px; }
.card p { margin-top: 14px; color: var(--muted); }
.card__index { color: var(--cyan); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; }
.card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.card__link { color: var(--gold-bright); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-decoration: none; text-transform: uppercase; }
.card__link:hover { text-decoration: underline; text-underline-offset: 4px; }

.truth-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.truth-item { min-height: 180px; padding: 24px; background: var(--panel); }
.truth-item h3 { margin-top: 20px; font-size: 1.25rem; }
.truth-item p { margin-top: 12px; color: var(--muted); font-size: 0.9rem; }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.metric { padding: 28px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric strong { display: block; color: var(--gold-bright); font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1; }
.metric span { color: var(--muted); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }

.panel {
  padding: clamp(22px, 3.5vw, 38px);
  border: 1px solid var(--line);
  background: rgba(13, 15, 21, 0.88);
  box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.panel-head p { max-width: 600px; margin-top: 9px; color: var(--muted); }
.stack-top { margin-top: 16px; }
.stack-top-lg { margin-top: 28px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label, .field-label { color: #d9d7d0; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.field small { color: var(--dim); }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  background: #0a0c11;
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: rgba(214, 174, 92, 0.45); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--cyan); outline: 1px solid var(--cyan); outline-offset: 0; }
.field-error { min-height: 1.2em; color: var(--red); font-size: 0.8rem; }

.notice { display: flex; gap: 14px; padding: 18px; border-left: 3px solid var(--cyan); color: #d4d4d1; background: var(--cyan-soft); }
.notice strong { color: var(--cyan); }
.notice--gold { border-color: var(--gold); background: rgba(214, 174, 92, 0.08); }
.notice--gold strong { color: var(--gold-bright); }
.notice--warning { border-color: var(--ember); background: rgba(255, 112, 67, 0.08); }
.notice--warning strong { color: var(--orange); }

.terminal { overflow: hidden; border: 1px solid var(--line); background: #07090d; box-shadow: var(--shadow); }
.terminal__bar { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--dim); font-family: var(--font-mono); font-size: 0.67rem; letter-spacing: 0.08em; text-transform: uppercase; }
.terminal__dots { display: flex; gap: 6px; }
.terminal__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.terminal__dots i:nth-child(1) { background: var(--red); }
.terminal__dots i:nth-child(2) { background: var(--gold); }
.terminal__dots i:nth-child(3) { background: var(--green); }
.terminal__body { min-height: 180px; padding: 20px; color: #c6d4d5; font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.75; white-space: pre-wrap; }

.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.data-table th, .data-table td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--gold-bright); background: rgba(214, 174, 92, 0.05); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.09em; text-transform: uppercase; }
.data-table td { color: #c5c4bf; font-size: 0.92rem; }
.data-table tr:last-child td { border-bottom: 0; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filter-button { padding: 8px 12px; border: 1px solid var(--line); color: var(--muted); background: transparent; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.filter-button:hover, .filter-button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-bright); background: rgba(214, 174, 92, 0.07); }
[data-filter-item][hidden] { display: none; }

.roster-card { display: grid; min-height: 280px; align-content: space-between; }
.roster-card__provider { color: var(--cyan); font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; }
.roster-card__meta { display: grid; gap: 8px; margin-top: 22px; color: var(--muted); font-size: 0.86rem; }
.roster-card__meta span { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.roster-card__meta b { color: #ddd; font-weight: 600; }

.feed-list { display: grid; gap: 12px; }
.feed-item { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; padding: 22px; border: 1px solid var(--line); background: var(--panel); }
.feed-item__id { color: var(--cyan); font-family: var(--font-mono); font-size: 0.7rem; }
.feed-item h3 { font-size: 1.25rem; }
.feed-item p { margin-top: 8px; color: var(--muted); }
.feed-item time { color: var(--dim); font-family: var(--font-mono); font-size: 0.68rem; }

.product-card { display: grid; min-height: 310px; align-content: space-between; }
.product-card__price { color: var(--green); font-family: var(--font-mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.product-card ul { display: grid; gap: 6px; margin: 16px 0 0; padding: 0; color: var(--muted); list-style: none; }
.product-card li::before { margin-right: 8px; color: var(--cyan); content: "↳"; }

.command-layout { display: grid; grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.5fr); gap: 16px; }
.system-list { display: grid; gap: 8px; }
.system-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.system-row span:first-child { font-family: var(--font-mono); font-size: 0.76rem; }
.audit-score { display: grid; width: 132px; height: 132px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold-bright); font-family: var(--font-display); font-size: 3rem; box-shadow: inset 0 0 30px rgba(214, 174, 92, 0.08); }
.audit-results { display: grid; gap: 10px; margin-top: 20px; }
.audit-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px; border: 1px solid var(--line); color: var(--muted); }
.audit-item strong { color: var(--text); }

.id-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr); gap: 18px; align-items: start; }
.id-card { position: sticky; top: 118px; min-height: 420px; overflow: hidden; padding: 34px; border: 1px solid var(--line-strong); background: radial-gradient(circle at 80% 12%, rgba(80, 215, 232, 0.13), transparent 40%), #0c0f15; box-shadow: var(--shadow); }
.id-card::before { position: absolute; inset: 0; pointer-events: none; content: ""; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(255, 255, 255, 0.018) 6px); }
.id-card__sigil { display: grid; width: 84px; height: 84px; place-items: center; border: 1px solid var(--gold); color: var(--gold-bright); font-family: var(--font-display); font-size: 2rem; transform: rotate(45deg); }
.id-card__sigil span { transform: rotate(-45deg); }
.id-card h2 { margin-top: 48px; font-size: clamp(2.2rem, 5vw, 4rem); }
.id-card__role { margin-top: 10px; color: var(--cyan); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }
.id-card__bio { margin-top: 24px; color: #c0c0bc; }
.id-card__code { position: absolute; right: 24px; bottom: 20px; color: var(--dim); font-family: var(--font-mono); font-size: 0.64rem; }
.id-card { --id-accent: var(--gold-bright); }
.id-card[data-accent="cyan"] { --id-accent: var(--cyan); }
.id-card[data-accent="violet"] { --id-accent: var(--violet); }
.id-card[data-accent="ember"] { --id-accent: var(--ember); }
.id-card[data-accent="green"] { --id-accent: var(--green); }
.id-card .id-card__sigil, .id-card .id-card__role { border-color: var(--id-accent); color: var(--id-accent); }

.prose { max-width: 820px; }
.prose h2 { margin-top: 64px; font-size: clamp(1.8rem, 4vw, 3rem); }
.prose h3 { margin-top: 38px; font-size: 1.35rem; }
.prose p, .prose li { color: #c3c2bd; }
.prose p { margin-top: 18px; }
.prose ul, .prose ol { display: grid; gap: 10px; padding-left: 22px; }
.prose a { color: var(--cyan); text-underline-offset: 3px; }
.prose strong { color: var(--text); }

.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); background: var(--panel); }
.faq-list summary { padding: 20px 22px; color: var(--text); font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; letter-spacing: 0.01em; text-transform: uppercase; cursor: pointer; }
.faq-list details div { padding: 0 22px 22px; color: var(--muted); }
.faq-list details[open] { border-color: var(--line-strong); }

.site-footer { width: var(--content); margin: 80px auto 0; padding: 54px 0 24px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 44px; }
.footer-grid p { max-width: 440px; margin-top: 16px; color: var(--muted); font-size: 0.9rem; }
.footer-grid h2 { margin-bottom: 16px; color: var(--gold-bright); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; }
.footer-grid > div:not(:first-child) { display: flex; flex-direction: column; align-items: flex-start; }
.footer-grid > div:not(:first-child) a { padding-block: 5px; color: var(--muted); font-size: 0.86rem; text-decoration: none; }
.footer-grid > div:not(:first-child) a:hover { color: var(--cyan); }
.brand--footer { font-size: 1.05rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.04em; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 500; max-width: min(380px, calc(100vw - 40px)); padding: 13px 16px; border: 1px solid var(--line-strong); color: var(--text); background: #12151c; box-shadow: var(--shadow); font-size: 0.86rem; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity 160ms ease, transform 160ms ease; }
.toast-region[data-visible="true"] { opacity: 1; transform: translateY(0); }

.error-page .page-hero { text-align: left; }

@media (max-width: 980px) {
  .nav-toggle { display: grid; }
  .primary-nav { position: absolute; top: 100%; right: 20px; left: 20px; display: none; padding: 12px; border: 1px solid var(--line); background: #0c0e13; box-shadow: var(--shadow); }
  .primary-nav[data-open="true"] { display: grid; }
  .primary-nav a { padding: 13px; }
  .primary-nav .nav-utility { margin: 4px 0 0; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .card-grid, .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .truth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-layout, .id-builder { grid-template-columns: 1fr; }
  .id-card { position: relative; top: auto; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --content: min(100% - 28px, 1180px); }
  .system-ribbon { justify-content: space-between; gap: 8px; padding-inline: 14px; font-size: 0.58rem; }
  .system-ribbon__mode { display: none !important; }
  .site-header { padding-inline: 14px; }
  .brand small { display: none; }
  h1 { font-size: clamp(3rem, 18vw, 5rem); }
  .page-hero { min-height: 590px; padding-block: 70px; }
  .page-hero::after { right: -38%; width: 90vw; }
  .section { padding-block: 68px; }
  .card-grid, .card-grid--2, .card-grid--4, .form-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .truth-grid { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .feed-item { grid-template-columns: auto 1fr; }
  .feed-item time { grid-column: 2; }
  .panel-head { display: grid; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 24px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* OMEGA CINEMATIC FIELD --------------------------------------------------- */

body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% -4%, rgba(214, 174, 92, 0.12), transparent 31rem),
    radial-gradient(circle at 92% 16%, rgba(80, 215, 232, 0.09), transparent 34rem),
    linear-gradient(180deg, #06070a 0%, #08090d 46%, #050609 100%);
}

.cinema-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.cinema-particles,
.cinema-pointer,
.cinema-vignette,
.cinema-grain { position: absolute; inset: 0; width: 100%; height: 100%; }

.cinema-particles { opacity: 0.72; }

.cinema-pointer {
  top: var(--pointer-y, 35vh);
  left: var(--pointer-x, 70vw);
  width: min(720px, 80vw);
  height: min(720px, 80vw);
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(80, 215, 232, 0.085), rgba(214, 174, 92, 0.025) 34%, transparent 68%);
  transform: translate(-50%, -50%);
  transition: opacity 600ms ease;
}

.motion-ready .cinema-pointer { opacity: 1; }

.cinema-vignette {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.38)),
    radial-gradient(ellipse at center, transparent 38%, rgba(0, 0, 0, 0.42) 100%);
}

.cinema-grain {
  inset: -80%;
  width: 260%;
  height: 260%;
  opacity: 0.09;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.42) 0 0.55px, transparent 0.7px 3px),
    repeating-radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.28) 0 0.5px, transparent 0.8px 4px);
  background-size: 7px 9px, 11px 13px;
  mix-blend-mode: soft-light;
  animation: grainShift 0.24s steps(2) infinite;
}

.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 300;
  height: 2px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.025);
}

.scroll-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--gold-bright), var(--ember));
  box-shadow: 0 0 16px rgba(80, 215, 232, 0.6);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
}

@supports (animation-timeline: scroll()) {
  .scroll-progress i {
    animation: scrollMeter linear both;
    animation-timeline: scroll(root block);
  }
}

.system-ribbon,
.site-header,
main,
.site-footer,
.toast-region { position: relative; }

.system-ribbon { z-index: 110; }
main, .site-footer { z-index: 2; }
.toast-region { position: fixed; }

.site-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(214, 174, 92, 0.54) 28%, rgba(80, 215, 232, 0.42) 72%, transparent);
  transform: scaleX(0.34);
  opacity: 0.7;
}

.brand__mark { animation: brandBreathe 5s ease-in-out infinite; }
.status-pip { animation: statusPulse 2.4s ease-in-out infinite; }

.primary-nav a { position: relative; overflow: hidden; }
.primary-nav a::before {
  position: absolute;
  inset: auto 12px 4px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: scaleX(0);
  transition: transform 240ms ease;
}
.primary-nav a:hover::before { transform: scaleX(1); }

.button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 0 0 rgba(214, 174, 92, 0);
  transition: transform 220ms cubic-bezier(.2,.75,.25,1), border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.button::before {
  position: absolute;
  top: -180%;
  bottom: -180%;
  left: -40%;
  z-index: -1;
  width: 22%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: rotate(18deg) translateX(-520%);
  transition: transform 640ms cubic-bezier(.2,.8,.2,1);
}

.button:hover { box-shadow: 0 12px 38px rgba(214, 174, 92, 0.1); }
.button:hover::before { transform: rotate(18deg) translateX(920%); }
.button--primary { box-shadow: 0 8px 34px rgba(214, 174, 92, 0.18); }
.button--primary:hover { box-shadow: 0 14px 46px rgba(214, 174, 92, 0.3); }

.card,
.panel,
.truth-item,
.metric,
.terminal,
.data-table-wrap {
  backdrop-filter: blur(14px);
}

.card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --glow-x: 50%;
  --glow-y: 50%;
  overflow: hidden;
  transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), border-color 220ms ease, box-shadow 220ms ease;
}

.card::after {
  position: absolute;
  inset: -1px;
  z-index: -1;
  content: "";
  opacity: 0;
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(80, 215, 232, 0.13), transparent 38%);
  transition: opacity 240ms ease;
}

.card:hover {
  border-color: rgba(214, 174, 92, 0.32);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34), 0 0 35px rgba(80, 215, 232, 0.045);
}
.card:hover::after { opacity: 1; }
.card > * { transform: translateZ(14px); }

.motion-ready [data-reveal] {
  opacity: 0;
  translate: 0 28px;
  filter: blur(5px);
  transition: opacity 760ms cubic-bezier(.16,1,.3,1), translate 760ms cubic-bezier(.16,1,.3,1), filter 760ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.motion-ready [data-reveal][data-reveal-order="1"] { transition-delay: 65ms; }
.motion-ready [data-reveal][data-reveal-order="2"] { transition-delay: 130ms; }
.motion-ready [data-reveal][data-reveal-order="3"] { transition-delay: 195ms; }

.motion-ready [data-reveal][data-revealed="true"] {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
}

[data-depth-scene] { --scene-x: 0; --scene-y: 0; }
[data-depth] { transition: translate 180ms cubic-bezier(.2,.8,.2,1); }

/* Home / signal core ----------------------------------------------------- */

.home-hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(370px, 0.92fr);
  align-items: center;
  gap: clamp(34px, 6vw, 92px);
  min-height: min(900px, calc(100svh - 103px));
  padding-block: clamp(80px, 10vh, 120px);
}

.home-hero::before {
  position: absolute;
  inset: 8% 40% 8% -24%;
  z-index: -1;
  content: "";
  background: radial-gradient(ellipse at center, rgba(214, 174, 92, 0.1), transparent 67%);
  filter: blur(22px);
}

.home-hero::after { display: none; }
.home-hero__copy { position: relative; z-index: 3; }

.home-title {
  display: grid;
  max-width: 830px;
  font-size: clamp(4.2rem, 8.1vw, 8.5rem);
  line-height: 0.84;
  letter-spacing: -0.055em;
}

.home-title__line { display: block; overflow: hidden; padding: 0.05em 0.06em 0.1em 0; color: var(--text); }
.home-title__line b { display: block; font: inherit; animation: heroLineIn 1.15s cubic-bezier(.16,1,.3,1) both; }
.home-title__line:nth-child(2) { color: transparent; -webkit-text-stroke: 1px rgba(242, 205, 121, 0.72); }
.home-title__line:nth-child(2) b { animation-delay: 120ms; background: linear-gradient(105deg, rgba(242, 205, 121, 0.96), rgba(255, 255, 255, 0.88) 44%, rgba(80, 215, 232, 0.84)); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.home-hero .lede { max-width: 680px; }
.home-hero .hero-entrance { animation: heroFadeIn 900ms cubic-bezier(.16,1,.3,1) both; }
.home-hero .eyebrow { animation-delay: 80ms; }
.home-hero .lede { animation-delay: 260ms; }
.home-hero .button-row { animation-delay: 360ms; }
.home-hero .hero-proof { animation-delay: 460ms; }

.home-hero__visual {
  position: relative;
  z-index: 1;
  width: min(44vw, 560px);
  aspect-ratio: 1;
  justify-self: end;
  border-radius: 50%;
  filter: drop-shadow(0 50px 80px rgba(0, 0, 0, 0.42));
  animation: coreEntrance 1.25s cubic-bezier(.16,1,.3,1) both 180ms;
}

.home-hero__visual::before,
.home-hero__visual::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.home-hero__visual::before {
  inset: -12%;
  background: conic-gradient(from 90deg, transparent, rgba(80, 215, 232, 0.12), transparent 30%, rgba(214, 174, 92, 0.15), transparent 62%);
  filter: blur(32px);
  animation: coreAura 7s ease-in-out infinite;
}

.home-hero__visual::after {
  inset: 3%;
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 110px rgba(80, 215, 232, 0.045), 0 0 100px rgba(214, 174, 92, 0.04);
}

.atlas-orbit {
  position: absolute;
  border: 1px solid rgba(214, 174, 92, 0.22);
  border-radius: 50%;
  animation: atlasSpin 22s linear infinite;
}

.atlas-orbit::before,
.atlas-orbit::after { position: absolute; content: ""; }
.atlas-orbit::before { inset: -5px; border: 1px dashed rgba(80, 215, 232, 0.11); border-radius: inherit; }
.atlas-orbit::after { top: 50%; left: -6px; width: 11px; height: 11px; border: 1px solid var(--cyan); background: var(--void); transform: rotate(45deg); box-shadow: 0 0 18px rgba(80, 215, 232, 0.6); }
.atlas-orbit i { position: absolute; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 14px currentColor; }
.atlas-orbit i:nth-child(1) { top: 11%; left: 24%; }
.atlas-orbit i:nth-child(2) { right: 8%; bottom: 34%; color: var(--cyan); }
.atlas-orbit i:nth-child(3) { bottom: 2%; left: 42%; color: var(--ember); }
.atlas-orbit--outer { inset: 4%; }
.atlas-orbit--mid { inset: 17%; border-style: dashed; animation-duration: 15s; animation-direction: reverse; }
.atlas-orbit--inner { inset: 30%; animation-duration: 10s; }

.atlas-axis { position: absolute; top: 50%; left: 50%; z-index: -1; background: linear-gradient(90deg, transparent, rgba(80, 215, 232, 0.24), transparent); }
.atlas-axis--x { width: 116%; height: 1px; transform: translate(-50%, -50%); }
.atlas-axis--y { width: 1px; height: 116%; background: linear-gradient(transparent, rgba(214, 174, 92, 0.25), transparent); transform: translate(-50%, -50%); }

.atlas-core {
  position: absolute;
  inset: 36%;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 205, 121, 0.72);
  color: var(--gold-bright);
  background: radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.12), transparent 22%), rgba(8, 10, 14, 0.92);
  box-shadow: inset 0 0 32px rgba(214, 174, 92, 0.12), 0 0 60px rgba(214, 174, 92, 0.16);
  transform: rotate(45deg);
  animation: atlasCorePulse 4s ease-in-out infinite;
}

.atlas-core svg { width: 46%; transform: rotate(-45deg); filter: drop-shadow(0 0 12px rgba(214, 174, 92, 0.45)); }
.atlas-core > span { position: absolute; right: -33%; bottom: -20%; color: var(--muted); font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.18em; transform: rotate(-45deg); }
.atlas-core__halo { position: absolute; inset: -26%; border: 1px solid rgba(80, 215, 232, 0.14); animation: atlasSpin 12s linear infinite reverse; }

.atlas-scan {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  z-index: 5;
  width: 28%;
  opacity: 0.4;
  background: linear-gradient(90deg, transparent, rgba(80, 215, 232, 0.16), transparent);
  transform: translateX(-50%);
  animation: atlasScan 4.6s ease-in-out infinite;
}

.atlas-readout {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(7, 8, 11, 0.78);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  letter-spacing: 0.12em;
  backdrop-filter: blur(10px);
}
.atlas-readout i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.atlas-readout--top { top: 11%; right: -2%; }
.atlas-readout--bottom { bottom: 12%; left: -2%; }

.home-hero__edge {
  position: absolute;
  top: 50%;
  color: rgba(255, 255, 255, 0.2);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.25em;
  writing-mode: vertical-rl;
}
.home-hero__edge--left { left: -34px; }
.home-hero__edge--right { right: -34px; transform: rotate(180deg); }

.metric-strip {
  position: relative;
  z-index: 3;
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(16px);
}
.metric { position: relative; overflow: hidden; }
.metric::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; content: ""; background: linear-gradient(90deg, transparent, var(--gold), transparent); transform: translateX(-100%); transition: transform 500ms ease; }
.metric:hover::after { transform: translateX(100%); }

.page-hero:not(.home-hero) {
  isolation: isolate;
}
.page-hero:not(.home-hero)::before {
  position: absolute;
  right: -8%;
  bottom: 5%;
  z-index: -2;
  width: min(48vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  opacity: 0.58;
  background: conic-gradient(from 20deg, transparent, rgba(214, 174, 92, 0.13), transparent 25%, rgba(80, 215, 232, 0.11), transparent 57%);
  filter: blur(22px);
  animation: genericHeroAura 9s ease-in-out infinite;
}
.page-hero:not(.home-hero)::after {
  animation: genericHeroRing 24s linear infinite;
}
.section { position: relative; }
.section::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: min(160px, 22vw);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0.48;
}
.panel { position: relative; overflow: hidden; }
.panel::before {
  position: absolute;
  top: -1px;
  right: 18%;
  width: 28%;
  height: 1px;
  content: "";
  opacity: 0.58;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: 0 0 0 3px rgba(80, 215, 232, 0.07), 0 0 24px rgba(80, 215, 232, 0.06); }
.nav-toggle[aria-expanded="true"] > span:nth-child(2) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] > span:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] > span:nth-child(4) { transform: translateY(-6px) rotate(-45deg); }
.card[data-tilt]:hover { translate: 0 -5px; }

@keyframes grainShift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(2%, -1%, 0); }
  50% { transform: translate3d(-1%, 2%, 0); }
  75% { transform: translate3d(1%, 1%, 0); }
  100% { transform: translate3d(-2%, -1%, 0); }
}
@keyframes brandBreathe { 50% { filter: drop-shadow(0 0 18px rgba(214, 174, 92, 0.55)); } }
@keyframes statusPulse { 50% { opacity: 0.55; box-shadow: 0 0 22px rgba(105, 221, 161, 0.9); } }
@keyframes heroLineIn { from { opacity: 0; transform: translateY(108%) skewY(4deg); } to { opacity: 1; transform: translateY(0) skewY(0); } }
@keyframes heroFadeIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes coreEntrance { from { opacity: 0; transform: scale(0.72) rotate(-8deg); filter: blur(16px); } to { opacity: 1; transform: scale(1) rotate(0); filter: blur(0) drop-shadow(0 50px 80px rgba(0, 0, 0, 0.42)); } }
@keyframes coreAura { 50% { opacity: 0.58; transform: scale(1.08) rotate(16deg); } }
@keyframes atlasSpin { to { transform: rotate(360deg); } }
@keyframes atlasCorePulse { 50% { box-shadow: inset 0 0 44px rgba(214, 174, 92, 0.19), 0 0 78px rgba(80, 215, 232, 0.16); } }
@keyframes atlasScan { 0%, 100% { transform: translateX(-120%); opacity: 0; } 20%, 80% { opacity: 0.5; } 50% { transform: translateX(20%); } }
@keyframes scrollMeter { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes genericHeroAura { 50% { opacity: 0.9; transform: scale(1.08) rotate(18deg); } }
@keyframes genericHeroRing { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .home-hero { grid-template-columns: 1fr; gap: 30px; padding-top: 90px; }
  .home-hero__copy { max-width: 850px; }
  .home-hero__visual { width: min(580px, 82vw); justify-self: center; margin: -20px 0 24px; }
  .home-hero__edge { display: none; }
}

@media (max-width: 680px) {
  .cinema-pointer { display: none; }
  .cinema-grain { opacity: 0.055; }
  .home-hero { min-height: auto; padding-block: 84px 48px; }
  .home-title { font-size: clamp(3.55rem, 17.5vw, 5.9rem); }
  .home-hero__visual { width: min(92vw, 470px); margin-top: 2px; }
  .atlas-readout { font-size: 0.47rem; }
  .atlas-readout--top { right: 0; }
  .atlas-readout--bottom { left: 0; }
  .home-hero .hero-proof { display: grid; gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-particles, .cinema-grain { display: none; }
  .motion-ready [data-reveal] { opacity: 1 !important; translate: none !important; filter: none !important; }
  .home-title__line b, .home-hero .hero-entrance, .home-hero__visual { opacity: 1 !important; transform: none !important; filter: none !important; }
  [data-depth] { translate: none !important; }
}
