:root {
  color-scheme: dark;
  --bg: #0f1115;
  --bg-2: #171a21;
  --surface: #20242d;
  --surface-2: #2a2f3a;
  --text: #f4f1ea;
  --muted: #b8b4aa;
  --line: rgba(244, 241, 234, 0.14);
  --blue: #4da3ff;
  --green: #5ec98b;
  --amber: #d9a441;
  --rose: #de6b7b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(77, 163, 255, 0.5);
  background: #12161d;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.9rem;
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.08);
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navlinks a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
}

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

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid rgba(77, 163, 255, 0.54);
  background: var(--blue);
  color: #06111f;
  font-weight: 800;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 17, 21, 0.98) 0%, rgba(15, 17, 21, 0.84) 42%, rgba(15, 17, 21, 0.54) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 86px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 72px);
  z-index: 1;
}

.syntax-wall {
  position: absolute;
  inset: -6% -4% auto auto;
  width: min(820px, 78vw);
  transform: rotate(-4deg);
  opacity: 1;
  z-index: 0;
}

.syntax-wall pre {
  margin: 0;
  padding: 28px;
  border: 1px solid rgba(77, 163, 255, 0.36);
  background: #1e1e1e;
  color: #d7e8ff;
  font-family: var(--mono);
  font-size: clamp(0.78rem, 1.22vw, 1.04rem);
  line-height: 1.72;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48), 0 0 46px rgba(77, 163, 255, 0.16);
  white-space: pre-wrap;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 76px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--green);
}

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

h1 {
  max-width: 820px;
  margin-top: 24px;
  font-size: clamp(3rem, 7vw, 6.8rem);
}

.lead {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(920px, 100%);
  margin-top: 62px;
  border: 1px solid var(--line);
  background: var(--line);
}

.stat {
  min-height: 118px;
  padding: 22px;
  background: rgba(23, 26, 33, 0.92);
}

.stat strong {
  display: block;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: 82px 0;
}

.section.alt {
  background: var(--bg-2);
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.section-head p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.principle,
.adopter,
.law {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px;
}

.principle h3,
.adopter h3,
.law h3 {
  font-size: 1.2rem;
}

.principle p,
.adopter p,
.law p {
  margin: 12px 0 0;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.code-block {
  overflow: auto;
  border: 1px solid var(--line);
  background: #11151d;
  box-shadow: var(--shadow);
}

.code-block header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.86rem;
}

pre {
  margin: 0;
  padding: 22px;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.blue { color: var(--blue); }
.green { color: var(--green); }
.amber { color: var(--amber); }
.rose { color: var(--rose); }

.vscode-code {
  background: #1e1e1e;
  color: #d4d4d4;
}

.vscode-code pre {
  color: #d4d4d4;
}

.tok-comment,
.syntax-wall .tok-comment,
.code-block .tok-comment { color: #6a9955 !important; }

.tok-step,
.syntax-wall .tok-step,
.code-block .tok-step { color: #569cd6 !important; }

.tok-string,
.syntax-wall .tok-string,
.code-block .tok-string { color: #ce9178 !important; }

.tok-field,
.syntax-wall .tok-field,
.code-block .tok-field { color: #9cdcfe !important; }

.tok-function,
.syntax-wall .tok-function,
.code-block .tok-function { color: #dcdcaa !important; }

.tok-variable,
.syntax-wall .tok-variable,
.code-block .tok-variable { color: #4fc1ff !important; }

.tok-param,
.syntax-wall .tok-param,
.code-block .tok-param { color: #c586c0 !important; }

.tok-operator,
.syntax-wall .tok-operator,
.code-block .tok-operator { color: #d4d4d4 !important; }

.adopter {
  min-height: 210px;
}

.logo-slot {
  min-height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px dashed rgba(244, 241, 234, 0.22);
  color: var(--muted);
  font-family: var(--mono);
}

.logo-slot-image {
  min-height: 96px;
  border-style: solid;
  background: rgba(255, 255, 255, 0.03);
}

.logo-slot-image img {
  width: 74px;
  height: 74px;
  display: block;
  object-fit: contain;
}

.standard-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.standard-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  color: var(--muted);
}

.standard-list li::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: 0.55rem;
  background: var(--green);
}

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.spec-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 18px;
}

.toc a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
}

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

.spec-content {
  display: grid;
  gap: 22px;
}

.spec-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 26px;
}

.spec-card h2 {
  font-size: 1.7rem;
}

.spec-card p {
  color: var(--muted);
}

@media (max-width: 860px) {
  .nav {
    height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .navlinks {
    width: 100%;
    overflow-x: auto;
  }

  .hero {
    min-height: auto;
  }

  .syntax-wall {
    width: 100%;
    inset: 80px -28% auto auto;
    opacity: 0.32;
  }

  .hero-inner {
    padding-top: 74px;
  }

  .stats,
  .grid-3,
  .split,
  .spec-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 560px) {
  .hero-actions .button,
  .button {
    width: 100%;
  }

  .stat {
    min-height: auto;
  }
}
