:root {
  --ink: #05070c;
  --panel: #0c1018;
  --panel-2: #111722;
  --line: #222b39;
  --text: #f5f8fc;
  --text-2: #c9d4e3;
  --label: #9aa6ba;
  --lime: #d2eb2b;
  --mint: #00e5b0;
  --amber: #facc15;
  --code-bg: #0a0e15;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-2);
  font: 16px/1.65 Lato, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .brand, .nav a, th { font-family: Montserrat, system-ui, sans-serif; }
h1, h2, h3 { color: var(--text); line-height: 1.25; }
h2 { font-size: 26px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 28px 0 8px; }
p { margin: 0 0 14px; }
strong { color: var(--text); }
code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
code { font-size: 0.86em; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre { position: relative; margin: 0 0 18px; padding: 16px 18px; background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; color: var(--text); }
pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.copy { position: absolute; top: 8px; right: 8px; font: 600 12px Montserrat, sans-serif; color: var(--ink); background: var(--lime); border: 0; border-radius: 8px; padding: 5px 10px; cursor: pointer; opacity: 0; transition: opacity .15s; }
pre:hover .copy, .copy:focus { opacity: 1; }
header.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px; background: rgba(5, 7, 12, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 17px; }
.brand:hover { text-decoration: none; }
.logo { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 0 18px rgba(210, 235, 43, .18); }
.brand small { color: var(--label); font-weight: 600; font-size: 13px; }
.top-links { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-block; font: 700 14px Montserrat, sans-serif; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); }
.btn:hover { text-decoration: none; border-color: var(--label); }
.btn.primary { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; max-width: 1400px; margin: 0; padding: 0 32px; }
.nav { position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; padding: 32px 0; }
.nav a { display: block; color: var(--label); font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
main { padding: 40px 0 80px; min-width: 0; max-width: 1040px; }
.hero { padding: 24px 0 36px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.eyebrow { font: 700 13px Montserrat, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: 10px; }
.hero h1 { font-size: 44px; font-weight: 800; margin: 0 0 14px; }
.hero p.lead { font-size: 19px; color: var(--text-2); max-width: 720px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.card b { display: block; font-family: Montserrat, sans-serif; color: var(--text); margin-bottom: 4px; }
.card span { font-size: 14.5px; color: var(--label); }
section { padding: 8px 0 36px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
section:last-of-type { border-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; color: var(--text); font-size: 13px; font-weight: 700; background: var(--panel); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
ol, ul { padding-left: 22px; margin: 0 0 16px; }
li { margin-bottom: 7px; }
.note { background: rgba(0, 229, 176, .07); border: 1px solid rgba(0, 229, 176, .35); border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; }
.warn { background: rgba(250, 204, 21, .07); border: 1px solid rgba(250, 204, 21, .35); border-radius: 12px; padding: 14px 16px; margin: 0 0 18px; }
.diagram { overflow-x: auto; margin: 6px 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.diagram svg { display: block; min-width: 640px; width: 100%; height: auto; }
footer { border-top: 1px solid var(--line); padding: 28px 24px 40px; text-align: center; color: var(--label); font-size: 14px; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px; }
  .nav { position: static; max-height: none; padding: 16px 0 0; display: flex; gap: 6px; overflow-x: auto; white-space: nowrap; border-bottom: 1px solid var(--line); }
  .nav a { padding: 8px 10px; }
  header.top { padding: 12px 16px; }
  .top-links .btn:not(.primary) { display: none; }
  .hero h1 { font-size: 32px; }
  .hero p.lead { font-size: 17px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  main { padding-top: 24px; }
  .copy { opacity: 1; }
}
