:root {
  --ink: #0b1020;
  --ink-2: #111827;
  --panel: #121826;
  --panel-2: #1f2937;
  --line: #d8dee8;
  --line-dark: #263246;
  --muted: #657083;
  --soft: #f6f7f9;
  --paper: #ffffff;
  --red: #ef4444;
  --red-2: #f87171;
  --green: #10b981;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --code: #0d1220;
  --shadow: 0 18px 44px rgba(11, 16, 32, 0.14);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

body.menu-open {
  overflow: hidden;
}

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

img,
svg {
  max-width: 100%;
  height: auto;
}

code,
pre,
kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  margin: 0;
  overflow-x: auto;
  background: var(--code);
  color: #e5edf7;
  border: 1px solid #243044;
  border-radius: var(--radius);
  padding: 18px;
  font-size: 13px;
  line-height: 1.55;
}

code {
  font-size: 0.92em;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(216, 222, 232, 0.8);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: calc(100% - 62px);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.brand-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.brand-red {
  color: var(--red);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 650;
  color: #344054;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: #eef2f7;
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.menu-button svg {
  width: 20px;
  height: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 760;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.button.primary {
  color: #fff;
  background: var(--red);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
}

.button.primary:hover {
  background: #dc2626;
}

.button.secondary {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: #b7c1cf;
  background: #f8fafc;
}

.button.dark {
  border-color: #2d3a50;
  color: #e5edf7;
  background: rgba(11, 16, 32, 0.86);
}

.hero {
  position: relative;
  min-height: 82vh;
  padding: 88px 0 74px;
  background:
    radial-gradient(circle at 74% 38%, rgba(59, 130, 246, 0.08), transparent 32%),
    radial-gradient(circle at 28% 12%, rgba(239, 68, 68, 0.08), transparent 30%),
    linear-gradient(115deg, #ffffff, #f7f9fc);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, transparent, #000 44%, #000);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px 44px;
  align-items: start;
}

.hero-heading {
  grid-column: 1 / -1;
  min-width: 0;
}

.hero-copy {
  max-width: 650px;
  padding: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #39465a;
  font-weight: 760;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.16);
}

.hero h1,
.page-hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 860;
}

.hero h1 span {
  color: var(--red);
}

.hero h1 {
  font-size: clamp(40px, 7vw, 96px);
  margin-bottom: 0;
  line-height: 1.1;
}

.hero-copy,
.quickstart > *,
.section-head > *,
.docs-layout > * {
  min-width: 0;
}

.hero h1,
.page-hero h1 {
  overflow-wrap: anywhere;
}

p,
h2,
h3 {
  overflow-wrap: anywhere;
}

.hero-lead,
.page-hero p {
  max-width: 620px;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
  color: #384456;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 28px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 590px;
}

.proof-item {
  border-left: 2px solid var(--red);
  padding: 4px 0 4px 14px;
}

.proof-item b {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.proof-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.hero-interface {
  margin: 0;
  min-width: 0;
}

.interface-frame {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.interface-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.interface-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  padding-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.interface-caption strong,
.interface-caption span {
  display: block;
}

.interface-caption strong {
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 2px;
}

.interface-caption a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section {
  padding: 82px 0;
}

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

.section.dark-section {
  color: #e5edf7;
  background: var(--ink);
}

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

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 34px;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section h2,
.page-section h2 {
  margin: 0;
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-head p,
.section-copy {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.dark-section .section-head p,
.dark-section .section-copy {
  color: #b8c3d6;
}

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

.feature-card,
.doc-card,
.example-card,
.note-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 22px;
  box-shadow: 0 1px 0 rgba(11, 16, 32, 0.03);
}

.feature-card h3,
.doc-card h3,
.example-card h3,
.note-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.feature-card p,
.doc-card p,
.example-card p,
.note-card p {
  margin: 0;
  color: var(--muted);
}

.icon-box {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
  margin-bottom: 18px;
}

.icon-box svg {
  width: 23px;
  height: 23px;
}

.quickstart {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 28px;
  align-items: start;
}

.step-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
}

.step-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-weight: 820;
}

.step h3 {
  margin: 0 0 3px;
  font-size: 17px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.code-window {
  border: 1px solid #263246;
  border-radius: var(--radius);
  background: #0d1220;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  color: #cbd5e1;
  background: #121a2b;
  border-bottom: 1px solid #263246;
  font-size: 13px;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}

.code-title > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.copy-button {
  border: 1px solid #334155;
  border-radius: var(--radius);
  background: #0f172a;
  color: #dce6f5;
  font: 700 12px Inter, Arial, sans-serif;
  padding: 7px 9px;
  cursor: pointer;
}

.copy-button:hover {
  border-color: #64748b;
}

.architecture {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: 34px;
  align-items: center;
}

.architecture-visual {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.architecture-list {
  display: grid;
  gap: 14px;
}

.architecture-item {
  border-bottom: 1px solid rgba(216, 222, 232, 0.85);
  padding-bottom: 14px;
}

.architecture-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.architecture-item h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.architecture-item p {
  margin: 0;
  color: var(--muted);
}

.doc-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
}

.doc-card .doc-meta {
  margin-top: auto;
  padding-top: 18px;
  color: var(--red);
  font-weight: 800;
  font-size: 13px;
}

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

.truth-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(184, 195, 214, 0.18);
  background: rgba(255, 255, 255, 0.045);
}

.truth-card h3 {
  margin: 0 0 8px;
  color: #fff;
}

.truth-card p {
  margin: 0;
  color: #b8c3d6;
}

.page-hero {
  padding: 78px 0 60px;
  color: #e5edf7;
  background:
    radial-gradient(circle at 80% 10%, rgba(239, 68, 68, 0.28), transparent 28%),
    radial-gradient(circle at 22% 20%, rgba(59, 130, 246, 0.22), transparent 28%),
    var(--ink);
}

.page-hero .eyebrow {
  color: #cbd5e1;
}

.page-hero h1 {
  max-width: 900px;
  color: #fff;
  font-size: clamp(42px, 6.2vw, 76px);
}

.page-hero p {
  color: #cbd5e1;
}

.docs-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 14px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #344054;
  font-size: 14px;
  font-weight: 650;
}

.toc a:hover {
  background: #eef2f7;
  color: var(--ink);
}

.page-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.page-section:first-child {
  padding-top: 0;
}

.page-section:last-child {
  border-bottom: 0;
}

.page-section h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  margin-bottom: 16px;
}

.page-section h3 {
  margin: 26px 0 10px;
  font-size: 22px;
}

.page-section p {
  color: #4b5563;
}

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

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}

.spec-table th,
.spec-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.spec-table th {
  background: #f1f4f8;
}

.callout {
  border-left: 4px solid var(--red);
  background: #fff7f7;
  padding: 16px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 18px 0;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
}

.search-row input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  font: 600 15px Inter, Arial, sans-serif;
}

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

.example-card {
  display: grid;
  gap: 16px;
}

.example-card pre {
  max-height: 420px;
}

.recipe-list {
  display: grid;
  gap: 12px;
}

.recipe {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.recipe b {
  display: block;
  margin-bottom: 3px;
}

.recipe p {
  margin: 0;
  color: var(--muted);
}

.recipe span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue);
  font-weight: 820;
}

.footer {
  padding: 44px 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 700;
  color: #344054;
}

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

.red-text {
  color: var(--red);
}

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

@media (max-width: 1120px) {
  .hero {
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  .quickstart,
  .architecture,
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    width: min(100% - 28px, var(--max));
  }

  .menu-button {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    max-height: 75dvh;
    overflow-y: auto;
  }

  .site-nav.open {
    display: flex;
  }

  .header-actions .button {
    display: none;
  }

  .hero,
  .section,
  .page-hero {
    padding-left: 0;
    padding-right: 0;
  }

  .hero-inner,
  .container {
    width: min(100% - 28px, var(--max));
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(32px, 9vw, 70px);
  }

  .hero-proof,
  .section-head,
  .truth-grid,
  .doc-grid,
  .example-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .doc-link-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section {
    padding: 58px 0;
  }

  .section h2 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .page-hero {
    padding: 56px 0 42px;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .spec-table {
    display: block;
    overflow-x: auto;
  }

  .spec-table th,
  .spec-table td {
    min-width: 160px;
    overflow-wrap: normal;
  }

  .spec-table code {
    white-space: nowrap;
  }
}
