:root {
  color-scheme: light dark;
  --bg: #fbfaf4;
  --surface: #ffffff;
  --surface-muted: #f4f1e7;
  --text: #1b2522;
  --muted: #65716c;
  --border: #d8d1bd;
  --accent: #f2b400;
  --accent-strong: #9a6a00;
  --green: #2f7d57;
  --link: #1769aa;
  --code-bg: #1f2937;
  --code-text: #e5e7eb;
  --code-muted: #94a3b8;
  --code-keyword: #93c5fd;
  --code-string: #fde68a;
  --code-comment: #9ca3af;
  --code-symbol: #86efac;
  --code-number: #fca5a5;
  --shadow: 0 18px 42px rgb(56 45 14 / 10%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101512;
    --surface: #171d19;
    --surface-muted: #20271f;
    --text: #ece8d8;
    --muted: #a9b2a9;
    --border: #344035;
    --accent: #f2b400;
    --accent-strong: #ffd75c;
    --green: #6fca98;
    --link: #7db7f0;
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
    --code-muted: #94a3b8;
    --code-keyword: #7dd3fc;
    --code-string: #fde68a;
    --code-comment: #94a3b8;
    --code-symbol: #86efac;
    --code-number: #fca5a5;
    --shadow: 0 18px 42px rgb(0 0 0 / 28%);
  }
}
* {
  box-sizing: border-box;
}
html {
  background:
    radial-gradient(circle at 15% -10%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 32rem),
    linear-gradient(180deg, color-mix(in srgb, var(--green) 10%, transparent), transparent 22rem),
    var(--bg);
}
body {
  background: transparent;
  margin: 0;
}
a {
  color: var(--link);
}
.site-header {
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header-inner, main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 20px;
}
.site-header-inner {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 64px;
}
.brand {
  align-items: center;
  color: inherit;
  display: inline-flex;
  font-weight: 700;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  background: #fbfaf4;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgb(56 45 14 / 10%);
  display: block;
  height: 36px;
  padding: 3px 8px;
  width: 144px;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
nav a {
  border-radius: 999px;
  color: inherit;
  font-size: 0.95rem;
  opacity: 0.78;
  padding: 5px 9px;
  text-decoration: none;
}
nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  opacity: 1;
  font-weight: 650;
}
nav a:hover {
  background: color-mix(in srgb, var(--surface-muted) 70%, transparent);
  opacity: 1;
}
main {
  padding-bottom: 48px;
  padding-top: 36px;
}
.hero {
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  padding-bottom: 34px;
}
h1, h2, h3 {
  line-height: 1.2;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 12px;
}
h2 {
  margin-top: 34px;
}
.lead {
  font-size: 1.08rem;
  max-width: 780px;
}
.muted {
  color: var(--muted);
}
.actions, .doc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.note {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent-strong) 28%, var(--border));
  border-radius: 8px;
  max-width: 780px;
  padding: 12px 14px;
}
.button, .doc-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: inherit;
  display: inline-flex;
  font-weight: 650;
  box-shadow: var(--shadow);
  padding: 10px 14px;
  text-decoration: none;
}
.button:first-child {
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent-strong) 42%, var(--accent));
  color: #1d1600;
}
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.doc-link {
  align-items: flex-start;
  flex-direction: column;
  min-height: 104px;
}
.doc-link span {
  color: var(--muted);
  font-weight: 400;
  margin-top: 6px;
}
.section-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: 16px;
}
.info-card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.info-card p,
.info-card ul {
  margin-bottom: 0;
}
.info-card ul {
  padding-left: 20px;
}
.markdown {
  overflow-wrap: anywhere;
}
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 16px 0 24px;
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  min-width: 100%;
  width: max-content;
}
th, td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
th {
  background: var(--surface-muted);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--surface-muted) 52%, transparent);
}
code {
  background: var(--surface-muted);
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.12em 0.34em;
}
pre {
  background: var(--code-bg);
  border: 1px solid color-mix(in srgb, var(--code-muted) 22%, transparent);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgb(15 23 42 / 14%);
  color: var(--code-text);
  line-height: 1.55;
  margin: 14px 0;
  overflow: auto;
  padding: 18px 20px;
  position: relative;
}
pre code {
  background: transparent;
  border-radius: 0;
  color: inherit;
  display: block;
  font-size: 0.9rem;
  padding: 0;
}
pre[data-language]::before {
  color: var(--code-muted);
  content: attr(data-language);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  position: absolute;
  right: 14px;
  text-transform: uppercase;
  top: 10px;
}
.tok-keyword {
  color: var(--code-keyword);
  font-weight: 650;
}
.tok-string {
  color: var(--code-string);
}
.tok-comment {
  color: var(--code-comment);
  font-style: italic;
}
.tok-symbol {
  color: var(--code-symbol);
}
.tok-number {
  color: var(--code-number);
}
.chart-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin: 16px 0 24px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: 16px;
}
.chart-card h3 {
  font-size: 1rem;
  margin: 0 0 4px;
}
.chart-card p {
  margin: 0 0 14px;
}
.chart-svg {
  display: block;
  height: auto;
  max-width: 100%;
  overflow: visible;
  width: 100%;
}
.chart-label {
  fill: var(--text);
  font-size: 16px;
  font-weight: 600;
}
.chart-muted {
  fill: var(--muted);
  font-size: 14px;
}
.chart-axis {
  stroke: var(--border);
  stroke-width: 1;
}
.chart-bar-http {
  background: var(--link);
  fill: var(--link);
}
.chart-bar-p2p-only {
  background: var(--green);
  fill: var(--green);
}
.chart-bar-p2p-first {
  background: var(--accent);
  fill: var(--accent);
}
.chart-bar-http-first {
  background: #0ea5e9;
  fill: #0ea5e9;
}
.chart-phase-seed {
  background: #6f8fc7;
  fill: #6f8fc7;
}
.chart-phase-prepare {
  background: #c77d50;
  fill: #c77d50;
}
.chart-phase-p2p {
  background: var(--green);
  fill: var(--green);
}
.chart-phase-provider {
  background: #8b75c9;
  fill: #8b75c9;
}
.chart-phase-daemon {
  background: #d4a51c;
  fill: #d4a51c;
}
.chart-phase-import {
  background: #5aa6a6;
  fill: #5aa6a6;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
}
.chart-legend span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.9rem;
  gap: 6px;
}
.chart-swatch {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}
@media (max-width: 640px) {
  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 14px;
    padding-top: 14px;
  }
}
