:root {
  --ink: #111;
  --muted: #666;
  --line: #d8d8d4;
  --soft: #f6f6f3;
  --pink: #ff007a;
  --paper: #fff;
  --sidebar: 218px;
  --content: 660px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body {
  margin: 0;
  zoom: 1.25;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 825px) { body { zoom: 1; } }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--pink); }
::selection { color: #fff; background: var(--pink); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 58px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
}
.header{position:sticky;top:0;z-index:40;background:#fff}
.nav{width:min(660px,100%);height:52px;margin:auto;display:flex;align-items:stretch;border-left:1px solid var(--ink);border-right:1px solid var(--ink);border-bottom:1px solid var(--ink)}
.nav .brand{display:flex;align-items:center;padding:0 16px}
.nav .brand img{width:20px;height:20px;border-radius:3px}
.links{display:flex;flex:1;justify-content:flex-end;align-items:center;gap:7px;padding:0 10px}
.links a{display:flex;flex:0 0 auto;height:30px;align-items:center;justify-content:center;padding:0 10px;border:1px solid var(--ink);border-radius:3px;font-size:9px;font-weight:600;letter-spacing:.1em}
.links a:not(.trade):hover{border-color:var(--pink)}
.links .trade{border-color:var(--pink);background:var(--pink);color:#fff;letter-spacing:.14em}
.x-icon svg{width:13px;height:13px;display:block;fill:currentColor}
.links .x-icon{width:30px;padding:0}
.strip{width:min(660px,100%);height:26px;margin:auto;display:flex;align-items:center;overflow:hidden;white-space:nowrap;border-left:1px solid var(--ink);border-right:1px solid var(--ink);border-bottom:1px solid var(--ink);font-size:9px;font-weight:600;letter-spacing:.14em}
.strip-track{display:flex;width:max-content;animation:docsMarquee 52s linear infinite}
.dot{color:var(--pink)}
@keyframes docsMarquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.topbar-inner {
  width: min(1240px, 100%);
  height: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .16em; }
.brand img { width: 22px; height: 22px; border-radius: 3px; }
.top-links { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-links a { padding: 8px 11px; border: 1px solid var(--ink); border-radius: 3px; font-size: 9px; font-weight: 600; letter-spacing: .1em; }
.top-links .primary { color: #fff; border-color: var(--pink); background: var(--pink); }

.layout {
  width: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--content)) minmax(0, 1fr);
  padding: 0 0 96px;
}
.sidebar {
  grid-column: 1;
  position: sticky;
  top: 82px;
  align-self: start;
  justify-self: end;
  width: min(var(--sidebar), calc(100% - 28px));
  margin-right: 28px;
  max-height: calc(100vh - 102px);
  overflow: auto;
  padding: 28px 18px 28px 0;
  scrollbar-width: thin;
}
.sidebar-label { margin: 0 0 12px; color: var(--pink); font-size: 9px; letter-spacing: .16em; }
.sidebar a { display: block; padding: 6px 8px; border-radius: 3px; color: #555; font-size: 10px; line-height: 1.45; }
.sidebar a:hover { color: var(--pink); background: var(--soft); }
.sidebar a.is-active { color: #fff; background: var(--pink); }
.sidebar .group { margin: 16px 8px 4px; color: #999; font-size: 8px; font-weight: 600; letter-spacing: .13em; }
.mobile-nav { display: none; }

.content { grid-column: 2; min-width: 0; padding-top: 54px; }
.hero { padding-bottom: 48px; border-bottom: 1px solid var(--ink); }
.eyebrow, .section-label { color: var(--pink); font-size: 9px; font-weight: 600; letter-spacing: .16em; }
h1, h2, h3 { font-family: "STIX Two Text", Georgia, serif; font-weight: 400; }
h1 { margin: 18px 0 0; max-width: 680px; font-size: 48px; line-height: 1.08; letter-spacing: -.035em; }
.hero-copy { margin: 20px 0 0; max-width: 690px; color: #333; font-size: 13px; line-height: 1.85; }
.status-card { margin-top: 26px; padding: 16px 18px; border: 1px solid var(--ink); border-left: 5px solid var(--pink); background: var(--soft); }
.status-card strong { display: block; margin-bottom: 7px; font-size: 10px; letter-spacing: .08em; }
.status-card p { margin: 0; color: #444; font-size: 10.5px; line-height: 1.7; }
.hero-facts { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); }
.hero-facts div { min-width: 0; padding: 13px 12px; border-right: 1px solid var(--ink); }
.hero-facts div:last-child { border-right: 0; }
.hero-facts span { display: block; color: #777; font-size: 8px; letter-spacing: .1em; }
.hero-facts strong { display: block; margin-top: 6px; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }

section { padding: 52px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom-color: var(--ink); }
[id] { scroll-margin-top: 78px; }
h2 { margin: 10px 0 0; font-size: 31px; line-height: 1.2; letter-spacing: -.02em; }
h3 { margin: 30px 0 10px; font-size: 21px; line-height: 1.3; }
h4 { margin: 26px 0 8px; font-size: 10px; letter-spacing: .08em; }
p, li { color: #333; font-size: 11.5px; line-height: 1.82; }
p { margin: 12px 0 0; }
ul, ol { margin: 12px 0 0; padding-left: 21px; }
li + li { margin-top: 5px; }
.lead { margin-top: 14px; font-size: 13px; line-height: 1.85; }
.pink { color: var(--pink); }
.muted { color: var(--muted); }

.callout { margin-top: 20px; padding: 15px 17px; border-left: 2px solid var(--pink); background: var(--soft); }
.callout strong { display: block; font-size: 10px; letter-spacing: .06em; }
.callout p { margin-top: 6px; font-size: 10.5px; line-height: 1.7; }
.callout.warning { border-color: var(--ink); }
.callout.warning strong { color: var(--pink); }

pre, .formula {
  margin: 20px 0 0;
  padding: 17px 18px;
  overflow-x: auto;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: #111;
  color: #fff;
  font: 11px/1.75 "IBM Plex Mono", ui-monospace, monospace;
  white-space: pre;
}
.formula.light { color: var(--ink); background: var(--soft); }
.formula .accent, pre .accent { color: #ff56a8; }
code { padding: .08em .3em; border-radius: 2px; background: var(--soft); color: #222; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .94em; }
pre code { padding: 0; background: transparent; color: inherit; }

.table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--ink); border-radius: 3px; }
table { width: 100%; min-width: 620px; border-collapse: collapse; }
th, td { padding: 11px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 9.5px; line-height: 1.6; }
th { color: #777; background: var(--soft); font-size: 8px; font-weight: 600; letter-spacing: .1em; }
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
.number { white-space: nowrap; font-variant-numeric: tabular-nums; }

.cards { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; }
.card { padding: 17px 18px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.card:nth-child(2n) { border-right: 0; }
.card:nth-last-child(-n+2) { border-bottom: 0; }
.card h3 { margin: 0; font-family: "IBM Plex Mono", monospace; color: var(--pink); font-size: 9px; font-weight: 600; letter-spacing: .08em; }
.card p { margin-top: 8px; font-size: 10px; line-height: 1.7; }

.flow { margin-top: 22px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; }
.flow div { position: relative; padding: 15px 14px; border-right: 1px solid var(--ink); font-size: 9px; line-height: 1.55; }
.flow div:last-child { border-right: 0; }
.flow span { display: block; margin-bottom: 6px; color: var(--pink); font-size: 8px; letter-spacing: .1em; }

.example { margin-top: 26px; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; }
.example-head { display: flex; justify-content: space-between; gap: 18px; padding: 11px 14px; border-bottom: 1px solid var(--ink); background: var(--pink); color: #fff; font-size: 9px; font-weight: 600; letter-spacing: .08em; }
.example-body { padding: 17px 18px; }
.example-body p:first-child { margin-top: 0; }
.example-grid { margin-top: 15px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.example-grid div { padding: 11px; border-right: 1px solid var(--line); }
.example-grid div:last-child { border-right: 0; }
.example-grid span { display: block; color: #888; font-size: 8px; letter-spacing: .08em; }
.example-grid strong { display: block; margin-top: 5px; font-size: 10px; line-height: 1.5; }

.definition { margin-top: 16px; display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.definition:last-child { border-bottom: 0; }
.definition dt { color: var(--pink); font-size: 10px; font-weight: 600; }
.definition dd { margin: 0; color: #444; font-size: 10.5px; line-height: 1.7; }

.site-footer{padding:28px 0 8px;display:block;color:#666}
.footer-top{display:flex;justify-content:space-between;align-items:center;gap:24px;flex-wrap:wrap}
.footer-brand{display:flex;align-items:center;gap:10px;color:var(--ink);font-size:11px;font-weight:500;letter-spacing:.18em}
.footer-brand img{width:16px;height:16px;display:block;border-radius:3px}
.footer-links{display:flex;align-items:center;gap:16px;font-size:10px;letter-spacing:.1em}
.footer-links a{display:inline-flex;align-items:center;color:var(--ink);font-weight:500}
.site-footer p{margin:22px 0 0;max-width:680px;font-size:9.5px;line-height:1.8;color:#777}

@media (max-width: 980px) {
  .layout { display: block; width: min(var(--content), 100%); padding: 0 24px 96px; }
  .sidebar { display: none; }
  .mobile-nav { display: block; margin-top: 24px; border: 1px solid var(--ink); border-radius: 3px; }
  .mobile-nav summary { padding: 12px 14px; cursor: pointer; color: var(--pink); font-size: 9px; font-weight: 600; letter-spacing: .1em; }
  .mobile-nav div { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
  .mobile-nav a { padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #555; font-size: 9px; line-height: 1.4; }
  .mobile-nav a.is-active { color: #fff; background: var(--pink); }
}
@media (max-width: 760px) {
  .nav{height:48px}
  .nav .brand{flex:0 0 46px;justify-content:center;padding:0 11px}
  .links{min-width:0;gap:4px;padding:0 6px}
  .links a{min-width:0;height:28px;padding:0 6px;font-size:7.75px;letter-spacing:.025em;white-space:nowrap}
  .links .x-icon{width:28px}
  .strip{height:24px;font-size:8px;letter-spacing:.1em}
  .topbar-inner { padding: 0 16px; }
  .top-links a:not(.primary) { display: none; }
  .layout { display: block; padding: 0 18px 72px; }
  .sidebar { display: none; }
  .mobile-nav { display: block; margin-top: 24px; border: 1px solid var(--ink); border-radius: 3px; }
  .mobile-nav summary { padding: 12px 14px; cursor: pointer; color: var(--pink); font-size: 9px; font-weight: 600; letter-spacing: .1em; }
  .mobile-nav div { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
  .mobile-nav a { padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #555; font-size: 9px; line-height: 1.4; }
  .content { padding-top: 34px; }
  h1 { font-size: 39px; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts div:nth-child(2) { border-right: 0; }
  .hero-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .cards, .flow { grid-template-columns: 1fr; }
  .card, .card:nth-child(2n), .card:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--ink); }
  .card:last-child { border-bottom: 0; }
  .flow div { border-right: 0; border-bottom: 1px solid var(--ink); }
  .flow div:last-child { border-bottom: 0; }
  .site-footer{padding-top:24px}
}
@media (max-width: 480px) {
  .links a{padding:0 4px;font-size:7.25px;letter-spacing:.01em}
  .links a:nth-child(2){display:none}
  .layout { padding-left: 15px; padding-right: 15px; }
  .content { padding-top: 28px; }
  h1 { font-size: 34px; }
  h2 { font-size: 27px; }
  .hero-copy, .lead { font-size: 12px; }
  .mobile-nav div { grid-template-columns: 1fr; }
  .mobile-nav a { border-right: 0; }
  .definition { grid-template-columns: 1fr; gap: 6px; }
  .example-grid { grid-template-columns: 1fr; }
  .example-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .example-grid div:last-child { border-bottom: 0; }
  .footer-top{align-items:flex-start}
  .footer-links{gap:11px;font-size:8.5px;flex-wrap:wrap}
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.strip-track{animation:none} }
