:root {
  --bg: #0b1220;
  --surface: #131c2e;
  --surface-2: #1f2937;
  --border: #2a3549;
  --accent: #60a5fa;
  --accent-dim: #3b6bb0;
  --text: #e6ecf5;
  --text-dim: #94a3b8;
  --text-faint: #5b6b85;
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(96,165,250,0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(96,165,250,0.06), transparent 55%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  color: var(--text);
  letter-spacing: 0.01em;
}

.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background:  #000000 ;
  border: 0.9px solid #2e2f30;
  align-content: center;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 20px;
  color: #ecedef;
}

.topnav {
  display: flex;
  gap: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.topnav a {
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 8px;
}

.topnav a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.topnav a.current { color: var(--accent); background: rgba(96,165,250,0.1); }

/* Layout */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 100px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; padding: 32px 18px 80px; }
  .toc { display: none; }
}

/* Hero */
.doc-header {
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  display: block;
}

.doc-header h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 48px);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.doc-meta {
  color: var(--text-dim);
  font-size: 14.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.doc-meta strong { color: var(--text); font-weight: 600; }

/* TOC */
.toc {
  position: sticky;
  top: 84px;
}

.toc-label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.toc li { margin: 0; }

.toc a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.35;
}

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

.toc a.active {
  color: var(--accent);
  border-left: 1px solid var(--accent);
  font-weight: 500;
}

/* Content */
.doc-content section {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 88px;
}

.doc-content section:last-child {
  border-bottom: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.section-num {
  font-family: var(--mono);
  color: var(--accent-dim);
  font-size: 14px;
}

.doc-content h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  margin: 0;
  letter-spacing: -0.005em;
}

.doc-content h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin: 22px 0 8px;
}

.doc-content p {
  color: #c7d2e0;
  font-size: 15.5px;
  margin: 0 0 14px;
}

.doc-content ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #c7d2e0;
  font-size: 15.5px;
}

.doc-content li { margin-bottom: 6px; }

.doc-content strong { color: var(--text); font-weight: 600; }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14.5px;
  color: var(--text-dim);
  margin: 16px 0;
}

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

.fill {
  background: rgba(96,165,250,0.12);
  border: 1px dashed var(--accent-dim);
  border-radius: 5px;
  padding: 1px 7px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.92em;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  font-family: var(--mono);
}

footer a { color: var(--text-dim); }
