:root {
  --ink: #111318;
  --muted: #5c6470;
  --line: #d8dde6;
  --paper: #ffffff;
  --soft: #f4f7fb;
  --blue: #0b62d6;
  --green: #0d7a5f;
  --yellow: #f0c74f;
  --code: #0b1220;
  --code-fg: #f4f7fb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

a {
  color: inherit;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  overflow-wrap: anywhere;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

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

.brand-link img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a {
  text-decoration: none;
}

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 48px;
  align-items: center;
  overflow: hidden;
  min-height: 580px;
  padding: 72px 48px 64px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.hero-copy {
  width: min(760px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(68px, 13vw, 150px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  letter-spacing: 0;
}

.hero-lede,
.page-title p,
.content-grid p,
.docs-content p {
  color: var(--muted);
  font-size: 18px;
}

.hero-lede {
  max-width: 720px;
  margin-bottom: 28px;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.25;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button.ghost {
  border-color: var(--line);
}

.button:hover,
button:hover,
.button.copied,
button.copied {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual::before {
  position: absolute;
  inset: 12% 5% auto auto;
  width: 120px;
  height: 120px;
  border: 1px solid var(--line);
  background: var(--yellow);
  content: "";
}

.hero-visual img {
  position: relative;
  width: min(380px, 80vw);
  filter: drop-shadow(0 22px 36px rgba(11, 19, 32, 0.18));
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.stat {
  min-height: 128px;
  padding: 24px 32px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat span {
  display: block;
  color: var(--blue);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.stat p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.content-grid,
.panel-grid,
.page-shell,
.docs-layout {
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 0 auto;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 42px;
  align-items: start;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.content-grid > *,
.panel-grid > *,
.docs-content,
.page-title {
  min-width: 0;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.panel {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--soft);
}

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

.code-block {
  overflow: auto;
  overflow-wrap: anywhere;
  max-width: 100%;
  margin: 0;
  border-radius: 8px;
  padding: 20px;
  background: var(--code);
  color: var(--code-fg);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.code-block code {
  display: block;
  min-width: 0;
  word-break: break-word;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

.page-shell {
  padding: 56px 0 88px;
}

.page-title {
  max-width: 900px;
  margin-bottom: 28px;
}

.page-title h1 {
  font-size: clamp(42px, 8vw, 88px);
}

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

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 28px 0 40px;
}

.subnav a {
  color: var(--blue);
  font-weight: 800;
}

section {
  margin-top: 44px;
}

section > p {
  max-width: 760px;
  color: var(--muted);
}

.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 980px;
}

.source-strip.large {
  align-content: start;
  max-height: 380px;
  overflow: auto;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.source-chip:hover {
  border-color: var(--blue);
}

.source-favicon,
.source-chip img {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap.compact {
  max-width: 620px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
}

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

th:last-child,
td:last-child {
  border-right: 0;
}

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

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stats-table th {
  width: 65%;
}

.stats-table td {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: right;
}

.source-table,
.capability-table {
  min-width: 920px;
}

.source-table th:nth-child(1),
.source-table td:nth-child(1) {
  width: 22%;
}

.source-table th:nth-child(2),
.source-table td:nth-child(2) {
  width: 34%;
}

.source-table th:nth-child(3),
.source-table td:nth-child(3) {
  width: 26%;
}

.source-table th:nth-child(4),
.source-table td:nth-child(4) {
  width: 18%;
}

.source-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
}

.source-id,
.count-line,
.link-list a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.source-id {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.source-kind {
  display: inline-block;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.coverage-list,
.route-list,
.link-list {
  margin: 0;
  padding-left: 18px;
}

.coverage-list li,
.route-list li,
.link-list li {
  margin-bottom: 5px;
}

.coverage-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.count-line {
  display: block;
  margin-bottom: 8px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding: 56px 0 88px;
}

.docs-rail {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  border-left: 2px solid var(--line);
  padding-left: 14px;
}

.docs-rail a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.docs-rail a:hover {
  color: var(--ink);
}

.docs-content {
  width: 100%;
  max-width: 920px;
}

.docs-content section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.docs-content h2 {
  font-size: 34px;
}

.doc-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.doc-table > div {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.doc-table > div:last-child {
  border-bottom: 0;
}

.doc-table strong {
  color: var(--muted);
}

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

.route-listing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-listing code {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--soft);
}

@media (max-width: 960px) {
  .hero,
  .content-grid,
  .panel-grid,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .panel-grid {
    gap: 14px;
  }

  .docs-rail {
    position: static;
    display: flex;
    flex-wrap: wrap;
    border-left: 0;
    padding-left: 0;
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 18px;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero {
    min-height: auto;
    padding: 44px 20px 36px;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .hero-visual img {
    width: min(240px, 70vw);
  }

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

  .stat {
    border-bottom: 1px solid var(--line);
    padding: 18px;
  }

  .stat:nth-child(2n) {
    border-right: 0;
  }

  .content-grid,
  .panel-grid,
  .page-shell,
  .docs-layout {
    width: calc(100% - 32px);
    max-width: calc(100vw - 32px);
  }

  .docs-content,
  .docs-content p,
  .code-block {
    max-width: calc(100vw - 32px);
  }

  .code-block {
    font-size: 12px;
  }

  .code-block code {
    word-break: break-all;
  }

  .content-grid,
  .panel-grid {
    padding: 48px 0;
  }

  .doc-table > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
