:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f8faf7;
  --ink-soft: #d7dfda;
  --surface: #07110e;
  --paper: #0e1a16;
  --paper-soft: #14231f;
  --inverse: #07110e;
  --inverse-paper: #ffffff;
  --line: rgba(248, 250, 247, 0.16);
  --line-strong: rgba(248, 250, 247, 0.34);
  --line-dark: rgba(248, 250, 247, 0.20);
  --ember: #d94b2b;
  --gold: #d4a72c;
  --mint: #42d6a4;
  --cyan: #3ab8d4;
  --text-muted: rgba(248, 250, 247, 0.68);
  --text-light: rgba(248, 250, 247, 0.78);
  --header-bg: rgba(7, 17, 14, 0.86);
  --panel-bg: rgba(14, 26, 22, 0.78);
  --panel-bg-strong: rgba(14, 26, 22, 0.92);
  --button-fill: #f8faf7;
  --button-text: #07110e;
  --code-bg: #050907;
  --code-text: #f8faf7;
  --proof-bg: #f8faf7;
  --proof-text: #07110e;
  --proof-muted: rgba(7, 17, 14, 0.68);
  --grid-color: rgba(248, 250, 247, 0.035);
  --visual-bg-a: #091411;
  --visual-bg-b: #172c25;
  --visual-bg-c: #07110e;
  --canvas-grid: rgba(255, 255, 255, 0.10);
  --canvas-label: rgba(255, 255, 255, 0.86);
  --canvas-detail: rgba(255, 255, 255, 0.72);
  --canvas-card: rgba(255, 255, 255, 0.06);
  --mono: "Geist Mono", "SFMono-Regular", "Cascadia Code", monospace;
  --sans: "Geist", "Avenir Next", "Segoe UI", sans-serif;
}

:root[data-theme="white"] {
  color-scheme: light;
  --ink: #07110e;
  --ink-soft: #13231f;
  --surface: #ffffff;
  --paper: #f7f7f2;
  --paper-soft: #eceee7;
  --inverse: #ffffff;
  --inverse-paper: #07110e;
  --line: rgba(7, 17, 14, 0.16);
  --line-strong: rgba(7, 17, 14, 0.34);
  --line-dark: rgba(255, 255, 255, 0.18);
  --text-muted: rgba(7, 17, 14, 0.68);
  --text-light: rgba(255, 255, 255, 0.78);
  --header-bg: rgba(255, 255, 255, 0.88);
  --panel-bg: rgba(247, 247, 242, 0.82);
  --panel-bg-strong: rgba(247, 247, 242, 0.94);
  --button-fill: #07110e;
  --button-text: #ffffff;
  --code-bg: #07110e;
  --code-text: #ffffff;
  --proof-bg: #07110e;
  --proof-text: #ffffff;
  --proof-muted: rgba(255, 255, 255, 0.72);
  --grid-color: rgba(7, 17, 14, 0.035);
  --visual-bg-a: #091411;
  --visual-bg-b: #172c25;
  --visual-bg-c: #07110e;
  --canvas-grid: rgba(255, 255, 255, 0.10);
  --canvas-label: rgba(255, 255, 255, 0.86);
  --canvas-detail: rgba(255, 255, 255, 0.72);
  --canvas-card: rgba(255, 255, 255, 0.06);
  --mono: "Geist Mono", "SFMono-Regular", "Cascadia Code", monospace;
  --sans: "Geist", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    var(--surface);
  background-size: 36px 36px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand-monogram {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--button-fill);
  color: var(--button-text);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.brand-mark strong,
.brand-mark small {
  display: block;
}

.brand-mark strong {
  font-size: 0.98rem;
}

.brand-mark small {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.ecosystem-breadcrumb,
.ecosystem-link {
  display: flex;
  align-items: center;
}

.ecosystem-breadcrumb {
  gap: 0.4rem;
  min-width: 0;
}

.ecosystem-link {
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.ecosystem-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  background: var(--button-fill);
  color: var(--button-text);
  font-size: 0.82rem;
  font-weight: 900;
}

.breadcrumb-divider {
  color: var(--text-muted);
  font-size: 0.82rem;
  opacity: 0.55;
  user-select: none;
}

.product-link {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.header-nav {
  display: flex;
  gap: 0.2rem;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  padding: 0.25rem;
}

.header-nav a,
.header-action,
.theme-toggle {
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.header-nav a:hover,
.header-action:hover,
.theme-toggle:hover {
  background: var(--button-fill);
  color: var(--button-text);
}

.header-action {
  border: 1px solid var(--line-strong);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
}

.theme-toggle-track {
  position: relative;
  width: 2.3rem;
  height: 1.1rem;
  border: 1px solid currentColor;
}

.theme-toggle-thumb {
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 0.6rem;
  height: 0.6rem;
  background: currentColor;
  transition: transform 180ms ease;
}

:root[data-theme="white"] .theme-toggle-thumb {
  transform: translateX(1.15rem);
}

.theme-toggle-text {
  min-width: 2.7rem;
  text-align: left;
}

.hero-section {
  min-height: calc(100vh - 4.1rem);
  padding: clamp(1rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}

.hero-rail,
.foundry-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: var(--panel-bg);
}

.hero-rail span,
.foundry-band div {
  padding: 0.75rem 1rem;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.hero-rail span:last-child,
.foundry-band div:last-child {
  border-right: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(22rem, 1.14fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem) 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.85rem;
  color: var(--ember);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0.65rem;
  font-size: clamp(5rem, 15vw, 13rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.03em;
}

.hero-lede {
  max-width: 44rem;
  color: var(--ink-soft);
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: -0.015em;
}

.command-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 43rem;
  margin-top: 1.7rem;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.command-strip code {
  overflow: auto;
  padding: 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.copy-button,
.tab {
  border: 0;
  border-left: 1px solid var(--line-strong);
  background: var(--gold);
  color: #07110e;
  cursor: pointer;
  font: 800 0.78rem var(--mono);
  padding: 1rem;
}

.copy-button:hover,
.tab:hover,
.tab.is-active {
  background: var(--button-fill);
  color: var(--button-text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  border: 1px solid var(--line-strong);
  padding: 0.75rem 1rem;
  font-weight: 800;
}

.primary-link {
  background: var(--button-fill);
  color: var(--button-text);
}

.secondary-link {
  background: var(--panel-bg);
}

.compiler-visual {
  position: relative;
  overflow: hidden;
  min-height: 30rem;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 28% 28%, rgba(66, 214, 164, 0.18), transparent 32%),
    linear-gradient(135deg, var(--visual-bg-a), var(--visual-bg-b) 55%, var(--visual-bg-c));
}

.compiler-visual canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 30rem;
}

.visual-status {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line-dark);
  background: rgba(7, 17, 14, 0.78);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.75rem;
}

.status-dot {
  width: 0.65rem;
  height: 0.65rem;
  background: var(--mint);
}

.foundry-band {
  grid-template-columns: repeat(4, 1fr);
}

.foundry-band strong,
.foundry-band span {
  display: block;
}

.foundry-band strong {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

.foundry-band span {
  margin-top: 0.35rem;
  color: var(--text-muted);
}

section:not(.hero-section) {
  padding: clamp(3rem, 7vw, 6.5rem) clamp(1rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.section-heading.compact {
  max-width: 72rem;
}

h2 {
  font-size: clamp(2.6rem, 5.5vw, 6.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.section-heading p,
.proof-section p,
.roadmap-list p {
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

.example-shell,
.terminal-panel {
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line-strong);
}

.tab {
  border-left: 0;
  border-right: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.code-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
}

.code-stage pre,
.terminal-panel pre {
  overflow: auto;
  margin: 0;
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 0.86rem;
  line-height: 1.6;
}

.code-stage pre {
  min-height: 33rem;
  padding: 1.25rem;
}

.code-stage aside {
  border-left: 1px solid var(--line-strong);
  padding: 1.4rem;
}

.code-stage aside h3,
.support-matrix h3,
.pipeline-grid h3 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.code-stage ol {
  padding-left: 1.2rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.pipeline-grid,
.support-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.pipeline-grid article,
.support-matrix div {
  background: var(--panel-bg-strong);
  padding: 1.2rem;
  min-height: 12rem;
}

.pipeline-grid span {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--ember);
  font-family: var(--mono);
  font-weight: 900;
}

.pipeline-grid p,
.support-matrix p {
  color: var(--text-muted);
  line-height: 1.55;
}

.proof-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(20rem, 1.2fr);
  gap: 2rem;
  align-items: center;
  background: var(--proof-bg);
  color: var(--proof-text);
}

.proof-section .section-kicker {
  color: var(--ember);
}

.proof-section p {
  color: var(--proof-muted);
}

.terminal-panel {
  border-color: var(--line-dark);
  background: var(--code-bg);
}

.terminal-top {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line-dark);
}

.terminal-top span {
  width: 0.7rem;
  height: 0.7rem;
  background: var(--gold);
}

.terminal-top span:nth-child(2) {
  background: var(--ember);
}

.terminal-top span:nth-child(3) {
  background: var(--mint);
}

.terminal-panel pre {
  padding: 1.25rem;
}

.matrix-section h2 {
  max-width: 76rem;
  margin-bottom: 1.5rem;
}

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

.roadmap-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(20rem, 1.08fr);
  gap: 2rem;
}

.leadership-section {
  background: var(--panel-bg);
}

.leadership-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(22rem, 1.18fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
}

.leadership-layout > div:first-child {
  position: sticky;
  top: 6rem;
}

.leadership-layout > div:first-child p {
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.65;
}

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

.leader-card {
  display: flex;
  min-height: 26rem;
  flex-direction: column;
  justify-content: space-between;
  background: var(--panel-bg-strong);
  padding: clamp(1.1rem, 2vw, 1.5rem);
}

.leader-card-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.leader-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  background: var(--button-fill);
  color: var(--button-text);
  font-family: var(--mono);
  font-weight: 900;
}

.leader-card h3 {
  margin-bottom: 0.1rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.92;
}

.leader-card-top p {
  margin: 0;
  color: var(--ember);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leader-card > p {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.65;
}

.leader-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.leader-tags span {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
}

.roadmap-list {
  border-top: 1px solid var(--line-strong);
}

.roadmap-list p {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.roadmap-list strong {
  color: var(--ink);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem clamp(1rem, 3vw, 2.25rem);
  background: var(--button-fill);
  color: var(--button-text);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.site-footer a {
  color: var(--mint);
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-nav {
    display: none;
  }

  .hero-rail,
  .foundry-band,
  .hero-grid,
  .section-heading,
  .code-stage,
  .pipeline-grid,
  .support-matrix,
  .proof-section,
  .leadership-layout,
  .leadership-grid,
  .roadmap-layout {
    grid-template-columns: 1fr;
  }

  .leadership-layout > div:first-child {
    position: static;
  }

  .leader-card {
    min-height: auto;
  }

  .hero-rail span,
  .foundry-band div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-rail span:last-child,
  .foundry-band div:last-child {
    border-bottom: 0;
  }

  .compiler-visual,
  .compiler-visual canvas {
    min-height: 24rem;
  }

  .code-stage aside {
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }
}

@media (max-width: 560px) {
  .brand-mark small {
    display: none;
  }

  .header-action {
    padding: 0.55rem;
  }

  .header-controls {
    gap: 0.35rem;
  }

  .theme-toggle-text {
    display: none;
  }

  .command-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    flex: 0 0 auto;
  }
}
