@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&display=swap');

:root {
  --ink: #111113;
  --ink-soft: #3F3F46;
  --muted: #71717A;
  --faint: #A1A1AA;
  --bg: #FFFFFF;
  --surface: #F4F4F5;
  --border: #ECECEE;
  --orange: #ED601B;
  --orange-pressed: #CE5015;
  --orange-tint: #FCE9DD;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --space-section: 96px;
  --space-group: 48px;
  --space-element: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand-mark img {
  width: 26px;
  height: 26px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-nav a:hover { color: var(--ink); text-decoration: none; }

.site-nav a.active { color: var(--orange); }

/* ---------- Layout ---------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 56px) 120px;
}

.hero {
  max-width: 760px;
  margin-bottom: var(--space-section);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--orange-tint);
  color: var(--orange-pressed);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  font-weight: 800;
}

.hero .lede {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 62ch;
}

.hero .lede a { font-weight: 600; }

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

/* ---------- TOC ---------- */

.toc {
  position: sticky;
  top: 96px;
}

.toc-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc li a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 7px 10px;
  margin: 0 -10px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
}

.toc li a:hover { background: var(--surface); text-decoration: none; color: var(--ink); }

.toc li a .num {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 12px;
}

/* ---------- Content ---------- */

.content { max-width: 680px; }

.callout {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  background: var(--orange-tint);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-section);
}

.callout .glyph {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--orange-pressed);
}

.callout p {
  margin: 0;
  font-size: 14.5px;
  color: #7A3717;
  font-weight: 500;
}

.callout strong { color: var(--orange-pressed); }

section.doc-section {
  padding-top: var(--space-group);
  margin-top: var(--space-group);
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}

section.doc-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.doc-section h2 {
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.doc-section h2 .num {
  color: var(--faint);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.doc-section h3 {
  font-size: 15.5px;
  margin: 28px 0 10px;
  color: var(--ink);
}

.doc-section p {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.doc-section ul, .doc-section ol.plain {
  margin: 0 0 14px;
  padding-left: 20px;
}

.doc-section li {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.doc-section strong { color: var(--ink); font-weight: 600; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 14.5px;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table th {
  color: var(--ink);
  font-weight: 600;
  width: 34%;
  font-size: 13.5px;
}

.data-table td { color: var(--ink-soft); }

.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px clamp(20px, 5vw, 56px) 56px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
}

.footer-brand img { width: 18px; height: 18px; opacity: 0.6; }

.footer-links { display: flex; gap: 20px; }

.footer-links a { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .toc {
    position: static;
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
  }
  .toc ol { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .toc li a { margin: 0; background: var(--surface); }
  .toc li a .num { display: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #FAFAFA;
    --ink-soft: #C9C9CE;
    --muted: #A1A1AA;
    --faint: #6B6B70;
    --bg: #0B0B0C;
    --surface: #1A1A1D;
    --border: #26262A;
    --orange-tint: #3A2416;
  }
  .site-header { background: rgba(11, 11, 12, 0.86); }
  .callout p { color: #FBD9BF; }
  .callout strong { color: #FBD9BF; }
  .brand-mark img, .footer-brand img { filter: invert(1); }
}
