:root {
  color-scheme: dark;
  --bg: #090b10;
  --bg-alt: #10141d;
  --surface: #151a24;
  --surface-strong: #1b2230;
  --text: #f8fafc;
  --muted: #a8b3c7;
  --subtle: #748198;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(248, 200, 74, 0.32);
  --brand: #f8c84a;
  --brand-strong: #ffad1f;
  --run: #38d996;
  --link: #7dd3fc;
  --danger: #fb7185;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --max: 1180px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(248, 200, 74, 0.05), rgba(9, 11, 16, 0) 420px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.04), rgba(9, 11, 16, 0) 48%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

::selection {
  background: rgba(248, 200, 74, 0.28);
  color: var(--text);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(3rem, 8vw, 5.8rem);
  background: linear-gradient(120deg, #fff0ad, var(--brand), var(--brand-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

p {
  color: var(--muted);
}

code,
pre {
  font-family: var(--mono);
}

.container {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  transform: translateY(-140%);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--text);
  padding: 10px 14px;
}

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

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

.site-header {
  position: relative;
  min-height: 100dvh;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 11, 16, 0.86);
  backdrop-filter: blur(18px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(248, 200, 74, 0.42);
  border-radius: var(--radius);
  background: var(--surface);
}

.brand__text {
  display: grid;
  gap: 1px;
}

.brand__name {
  font-weight: 700;
  letter-spacing: 0;
}

.brand__meta {
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.brand--text {
  min-height: 44px;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__panel {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav__panel a {
  color: var(--muted);
  font-weight: 600;
}

.nav__panel a:hover,
.nav__panel a.is-active,
.nav__panel a[aria-current="true"] {
  color: var(--brand);
}

.nav__button,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  line-height: 1;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav__button:hover,
.button:hover {
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.nav__button--ghost,
.button--secondary {
  background: rgba(255, 255, 255, 0.035);
}

.button--primary {
  border-color: rgba(248, 200, 74, 0.6);
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #14100a;
}

.button--primary:hover {
  color: #14100a;
}

.button--small {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--text);
  cursor: pointer;
}

.nav__scrim {
  position: fixed;
  inset: 74px 0 0;
  background: rgba(0, 0, 0, 0.55);
}

.site-header--compact {
  min-height: auto;
}

.hero {
  padding: 124px 0 84px;
}

.hero__identity {
  display: grid;
  justify-items: center;
  margin-bottom: 36px;
  text-align: center;
}

.hero__identity .eyebrow {
  margin-bottom: 18px;
}

.hero__icon-frame {
  display: grid;
  width: clamp(112px, 12vw, 152px);
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: 26px;
  border: 1px solid rgba(248, 200, 74, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(248, 200, 74, 0.14), rgba(125, 211, 252, 0.06)),
    var(--surface);
  box-shadow: 0 22px 58px rgba(248, 200, 74, 0.12);
}

.hero__icon-frame--small {
  width: 88px;
  margin: 0 auto 18px;
}

.hero__icon {
  width: 74%;
  height: 74%;
  object-fit: contain;
}

.hero__grid,
.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 34px;
  align-items: center;
}

.hero__copy,
.section__intro {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--brand);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__lede {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  color: #d9e2f2;
}

.hero__identity .hero__lede {
  margin-right: auto;
  margin-left: auto;
}

.hero__actions,
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__actions {
  justify-content: center;
  margin-bottom: 20px;
}

.proof-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.014)),
    rgba(21, 26, 36, 0.78);
  box-shadow: var(--shadow);
}

.proof-panel h2 {
  margin-bottom: 12px;
  font-size: clamp(1.85rem, 3.5vw, 3rem);
}

.proof-panel > p {
  margin-bottom: 18px;
}

.proof-grid,
.status-grid,
.method-grid,
.docs-grid,
.docs-page-grid {
  display: grid;
  gap: 14px;
}

.proof-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proof-card,
.status-card,
.method-card,
.doc-card,
.evidence-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.proof-card {
  padding: 14px;
}

.proof-card__label,
.method-card__index,
.doc-card span,
.evidence-item span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--run);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.proof-card strong,
.status-card h3,
.method-card h3,
.doc-card strong,
.evidence-item strong {
  display: block;
  color: var(--text);
}

.proof-card p,
.status-card p,
.method-card p,
.doc-card p,
.evidence-item p {
  margin: 8px 0 0;
  font-size: 0.94rem;
}

.chip,
.status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
}

.status--run {
  border-color: rgba(56, 217, 150, 0.32);
  background: rgba(56, 217, 150, 0.1);
  color: var(--run);
}

.status--warn {
  border-color: rgba(248, 200, 74, 0.35);
  background: rgba(248, 200, 74, 0.1);
  color: var(--brand);
}

.status--off {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.1);
  color: var(--danger);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero__panel {
  padding: 18px;
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel__header--tight {
  padding: 18px 18px 0;
}

.panel__eyebrow {
  margin-bottom: 4px;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel__title {
  margin: 0;
  font-size: 1rem;
}

.terminal {
  margin: 0;
  overflow-x: auto;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: var(--radius);
  background: #05070b;
  color: #dce8fb;
  font-size: 0.84rem;
  line-height: 1.75;
}

.terminal code {
  display: block;
  min-width: 0;
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.panel__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.fact {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.fact__label,
.fact__value {
  display: block;
}

.fact__label {
  margin-bottom: 4px;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.fact__value {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.panel__figure,
.diagram {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #07090d;
}

.panel__figure img,
.diagram img {
  width: 100%;
  height: auto;
}

.panel__figure figcaption,
.diagram figcaption {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 96px 0;
}

.section--alt {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 20, 29, 0.72);
}

.section__intro h2 {
  max-width: 780px;
}

.section__intro p {
  max-width: 660px;
  margin-bottom: 0;
}

.section__intro--center {
  max-width: 820px;
  margin: 0 auto 36px;
  text-align: center;
}

.section__intro--center h2,
.section__intro--center p {
  margin-right: auto;
  margin-left: auto;
}

.section__grid--stack {
  grid-template-columns: minmax(0, 0.72fr) minmax(420px, 1.28fr);
}

.status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-card {
  padding: 18px;
}

.status-card .status {
  margin-bottom: 14px;
}

.method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.method-card {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(248, 200, 74, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
}

.method-card__index {
  color: var(--brand);
}

.panel__note {
  border-top: 1px solid var(--line);
  padding: 14px 18px;
}

.panel__note p {
  margin: 0;
  font-size: 0.94rem;
}

.panel__note--strong {
  margin-top: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(248, 200, 74, 0.08);
}

.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow__step {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.flow__index {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--run);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
}

.flow__step h3 {
  color: var(--text);
}

.flow__step p {
  margin-bottom: 0;
  font-size: 0.96rem;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.94rem;
}

.matrix th,
.matrix td {
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.matrix thead th {
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.matrix tbody th {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
}

.matrix tr:last-child th,
.matrix tr:last-child td {
  border-bottom: 0;
}

.matrix th:first-child,
.matrix td:first-child {
  width: 30%;
}

.matrix th:nth-child(2),
.matrix td:nth-child(2) {
  width: 18%;
}

.matrix th:nth-child(3),
.matrix td:nth-child(3) {
  width: 52%;
}

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

.boundary-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 22px 24px 0 42px;
  color: #dce8fb;
}

.boundary-list li::marker {
  color: var(--brand);
}

.evidence-list {
  display: grid;
  gap: 12px;
  padding: 18px 18px 0;
}

.evidence-item {
  padding: 16px;
}

.docs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doc-card {
  display: block;
  min-height: 150px;
  padding: 18px;
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.doc-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.doc-card strong {
  font-size: 1.04rem;
}

.docs-hero {
  padding: 132px 0 56px;
}

.docs-hero__inner {
  max-width: 840px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.docs-hero__inner h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
}

.docs-hero__inner p {
  max-width: 700px;
  margin: 0 auto;
  color: #d9e2f2;
  font-size: clamp(1rem, 2vw, 1.14rem);
}

.docs-page-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  background: #06080c;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer p {
  margin: 0;
  color: var(--subtle);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer__links a {
  color: var(--muted);
  font-weight: 700;
}

.site-footer__links a:hover {
  color: var(--brand);
}

@media (max-width: 980px) {
  .hero__grid,
  .section__grid,
  .section__grid--stack {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 120px;
  }

  .status-grid,
  .docs-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section__intro p,
  .section__intro h2 {
    max-width: none;
  }
}

@media (max-width: 860px) {
  .container {
    width: min(100% - 28px, var(--max));
  }

  .js .nav__toggle {
    display: inline-flex;
  }

  .js .nav__panel {
    position: fixed;
    top: 74px;
    right: 14px;
    left: 14px;
    display: grid;
    gap: 6px;
    transform: translateY(-10px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    padding: 12px;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    box-shadow: var(--shadow);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .js .nav__panel.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .js .nav__panel a {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: var(--radius);
    padding: 8px 10px;
  }

  .js .nav__panel .nav__button {
    justify-content: center;
  }

  .js .nav__scrim.is-open {
    display: block;
  }

  .panel__facts,
  .flow,
  .diagram-grid,
  .method-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .matrix {
    font-size: 0.86rem;
  }

  .matrix th,
  .matrix td {
    padding: 12px 10px;
  }

  .matrix .status {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 0.68rem;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-bottom: 56px;
  }

  .hero__identity {
    margin-bottom: 28px;
  }

  .section {
    padding: 72px 0;
  }

  .hero__actions,
  .hero__actions .button {
    width: 100%;
  }

  .proof-grid,
  .status-grid,
  .docs-page-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .panel__header {
    flex-direction: column;
  }

  .panel__header--tight .button {
    width: auto;
  }

  .boundary-list {
    padding-right: 18px;
    padding-left: 34px;
  }
}

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