@font-face {
  font-family: 'Inter Tight Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/inter-tight-latin-ext-wght-normal.fd9beddaaec6.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Tight Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/assets/fonts/inter-tight-latin-wght-normal.77fefe8ca19b.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/assets/fonts/jetbrains-mono-latin-ext-wght-normal.79bfdab9ba46.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/assets/fonts/jetbrains-mono-latin-wght-normal.18be452724bf.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* NashHQ docs (docs.nashai.tech): the dApp's HUD look (web/src/style.css) for long reading. Light is the default
   (the user, 2026-11-30: "lighter mode as default"); dark is the reader's choice (the theme button sets
   data-theme="dark" on <html>, theme.js applies a saved choice before the page paints). Every colour is a token below,
   one set per theme; test/docsite.test.ts checks the contrast of each text / background pair in both. Token fills from
   Brand/STYLE.md "Decided"; text in a token colour uses its darker -text shade on light. No request leaves the site:
   the fonts are self-hosted (build.ts writes their @font-face rules above this file). */
:root {
  /* light (default): near-white cool page, dark navy text, cyan darkened for text */
  --bg: #f4f7fa;              /* page */
  --bg-raised: #ffffff;       /* search box, code */
  --bar: rgba(255, 255, 255, 0.92);
  --menu: #f4f7fa;            /* the phone menu over the page */
  --text: #0b1a2b;
  --text-dim: #3a4e62;
  --strong: #04101f;          /* headings, bold, the current page */
  --link: #005a73;
  --link-hover: #003f52;
  --chrome: #00607a;          /* mono labels, table heads, the brand chip */
  --glow: #0091b3;            /* edges, focus ring, marks (not text) */
  --line: rgba(0, 145, 179, 0.38);
  --line-faint: rgba(0, 145, 179, 0.18);
  --hover: rgba(0, 145, 179, 0.07);
  --active: rgba(0, 145, 179, 0.12);
  --code-bg: #ffffff;
  --code-inline: rgba(0, 145, 179, 0.08);
  --th-bg: rgba(0, 145, 179, 0.07);
  --anchor: #00607a;
  --accent: #00d4ff;          /* "Open the app": the HUD cyan button in both themes */
  --accent-hover: #4fe0ff;
  --on-accent: #03050a;
  --info: #0091b3;   --info-text: #005a73;
  --warn: #e8960c;   --warn-text: #8a4b00;
  --bad: #e0234a;    --bad-text: #b0002a;
  --ok: #0cc996;     --ok-text: #006b4b;
  --a: #fbd552;      --a-text: #7a5a00;    /* $NASH · Nash Flux gold */
  --b: #3b94be;      --b-text: #1f5f80;    /* $NASHAI · NashAI Core blue */
  --x: #0cc996;      --x-text: #006b4f;    /* $NASHX · Nash Equilibrium green */
  --twin: #6beed4;   --twin-text: #00695a; /* Twin Equilibrium */
  --logo-blend: multiply;     /* the flat logo's white square melts into the page */
  --font: "Inter Tight Variable", "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --top: 56px;
  --side: 280px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  /* dark: the dApp's HUD (#03050a, cyan chrome) */
  --bg: #03050a;
  --bg-raised: #070c16;
  --bar: rgba(3, 6, 12, 0.9);
  --menu: #03050a;
  --text: #f2f8fc;
  --text-dim: #a9bccb;
  --strong: #ffffff;
  --link: #00d4ff;
  --link-hover: #7fe9ff;
  --chrome: #00d4ff;
  --glow: #00d4ff;
  --line: rgba(0, 212, 255, 0.28);
  --line-faint: rgba(0, 212, 255, 0.12);
  --hover: rgba(0, 212, 255, 0.05);
  --active: rgba(0, 212, 255, 0.09);
  --code-bg: rgba(2, 8, 13, 0.85);
  --code-inline: rgba(0, 212, 255, 0.07);
  --th-bg: rgba(0, 212, 255, 0.05);
  --anchor: #3fb8d9;
  --accent: #00d4ff;
  --accent-hover: #7fe9ff;
  --on-accent: #03050a;
  --info: #00d4ff;   --info-text: #00d4ff;
  --warn: #ffb547;   --warn-text: #ffb547;
  --bad: #ff4d6d;    --bad-text: #ff4d6d;
  --ok: #19f5b8;     --ok-text: #19f5b8;
  --a: #fbd552;      --a-text: #fbd552;
  --b: #3b94be;      --b-text: #5fb0d6;
  --x: #0cc996;      --x-text: #0cc996;
  --twin: #6beed4;   --twin-text: #6beed4;
  --logo-blend: normal;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
/* a picture with a version per theme (the header logo, the welcome page's logo): only one shows */
:root:not([data-theme="dark"]) .on-dark, :root[data-theme="dark"] .on-light { display: none !important; }
.on-light { mix-blend-mode: var(--logo-blend); }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
body {
  /* a plain page, no grid or glow (the user, 2026-11-30: "just make the background plain no line") */
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--bg-raised);
  border: 1px solid var(--glow); color: var(--text); font: 13px var(--mono); text-decoration: none;
}
.skip:focus { top: 12px; }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 16px;
  border-bottom: 1px solid var(--line-faint); background: var(--bar);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { width: 28px; height: 28px; flex: none; }
.brand b { font: 700 19px/1 var(--font); letter-spacing: 0.1em; color: var(--strong); white-space: nowrap; }
.brand span {
  font: 600 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--chrome);
  border: 1px solid var(--line); padding: 4px 6px;
}
.app-link, .menu-btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; white-space: nowrap; text-decoration: none;
  font: 600 13px/1 var(--font); letter-spacing: 0.04em; color: var(--on-accent); background: var(--accent);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.app-link:hover { background: var(--accent-hover); color: var(--on-accent); }
.menu-btn { display: none; color: var(--chrome); background: transparent; border: 1px solid var(--line); clip-path: none; padding: 0 12px; }
.menu-btn:hover { color: var(--chrome); background: var(--hover); }
/* the theme button: a moon in light (press for dark), a sun in dark */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; padding: 0;
  color: var(--chrome); background: transparent; border: 1px solid var(--line); border-radius: 0; cursor: pointer;
}
.theme-btn:hover { background: var(--hover); border-color: var(--glow); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }

/* page: sidebar, text, "On this page" */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) 220px; max-width: 1360px; margin: 0 auto; }
.side {
  position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 16px 32px; border-right: 1px solid var(--line-faint); scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.nav-grp + .nav-grp { margin-top: 18px; }
.nav-g { margin: 0 0 6px; font: 600 11px/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--chrome); }
.side ul { list-style: none; margin: 0; padding: 0; }
.side ul ul { margin: 2px 0 4px 12px; padding-left: 10px; border-left: 1px solid var(--line-faint); }
.side li a {
  display: block; padding: 6px 10px; color: var(--text-dim); text-decoration: none; font-size: 14.5px; line-height: 1.35;
  border-left: 2px solid transparent;
}
.side li a:hover { color: var(--strong); background: var(--hover); }
.side li a[aria-current="page"] { color: var(--strong); font-weight: 600; border-left-color: var(--glow); background: var(--active); }
.nav-close { display: none; }

.search { margin: 0 0 20px; position: relative; }
.search input {
  width: 100%; min-height: 40px; padding: 8px 12px; font: 14px var(--font); color: var(--text);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 0;
}
.search input::placeholder { color: var(--text-dim); opacity: 1; }
.search input:focus { outline: 1px solid var(--glow); border-color: var(--glow); }
.search-n { margin: 6px 0 0; font: 12px var(--mono); color: var(--text-dim); }
.search-n:empty { display: none; }
.search-r { margin: 6px 0 0 !important; }
.search-r a { display: block; padding: 7px 10px; text-decoration: none; color: var(--text); border-left: 2px solid var(--line); }
.search-r a:hover, .search-r a:focus-visible { color: var(--strong); background: var(--active); }
.search-r small { display: block; color: var(--text-dim); font-size: 12px; }
.search-r li + li { margin-top: 4px; }

.doc { min-width: 0; padding: 32px 40px 48px; }
.doc:focus { outline: none; }
.toc { position: sticky; top: var(--top); align-self: start; max-height: calc(100vh - var(--top)); overflow-y: auto; padding: 32px 16px 24px 0; }
.toc-t { margin: 0 0 8px; font: 600 11px/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--chrome); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-faint); }
.toc a { display: block; padding: 4px 0 4px 12px; font-size: 13px; line-height: 1.35; color: var(--text-dim); text-decoration: none; }
.toc a:hover { color: var(--strong); }
.toc .l3 a { padding-left: 24px; font-size: 12.5px; }

/* long-form text */
.prose { max-width: 76ch; font-size: 16.5px; line-height: 1.68; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { position: relative; color: var(--strong); letter-spacing: -0.015em; text-wrap: balance; }
.prose h1 { margin: 0 0 20px; font-size: clamp(30px, 5vw, 40px); line-height: 1.1; }
.prose h2 {
  margin: 44px 0 14px; padding-top: 18px; font-size: 25px; line-height: 1.2;
  border-top: 1px solid var(--line-faint);
}
.prose h3 { margin: 30px 0 10px; font-size: 19.5px; line-height: 1.3; }
.prose h4 { margin: 24px 0 8px; font-size: 16.5px; }
.anchor { margin-left: 8px; color: var(--anchor); text-decoration: none; font-weight: 400; opacity: 0; }
.prose :is(h2, h3, h4):hover .anchor, .anchor:focus-visible { opacity: 1; }
.prose p, .prose ul, .prose ol, .prose .tw, .prose pre, .prose blockquote, .prose .hint { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 4px; }
.prose li > ul, .prose li > ol { margin: 6px 0 0; }
.prose strong { color: var(--strong); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.prose img { max-width: 100%; height: auto; }
.img-line img { display: block; }
.prose code {
  font: 0.88em/1.4 var(--mono); padding: 1px 5px; color: var(--strong); background: var(--code-inline); border: 1px solid var(--line-faint);
  overflow-wrap: anywhere;
}
.prose pre {
  padding: 14px 16px; overflow-x: auto; color: var(--text); background: var(--code-bg); border: 1px solid var(--line-faint);
  border-left: 2px solid var(--line); font-size: 14px; line-height: 1.55;
}
.prose pre code { padding: 0; color: inherit; background: none; border: 0; font-size: 1em; overflow-wrap: normal; white-space: pre; }
.prose blockquote { margin-left: 0; padding: 2px 16px; border-left: 2px solid var(--line); color: var(--text-dim); }
.tw { overflow-x: auto; border: 1px solid var(--line-faint); background: var(--bg-raised); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.prose th, .prose td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-faint); }
.prose th { font: 600 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--chrome); background: var(--th-bg); }
.prose tr:last-child td { border-bottom: 0; }
.prose sup { font-size: 0.72em; line-height: 0; }

/* hint boxes ({% hint style="…" %}): the fill colour for the edge and the tint, its -text shade for the label */
.hint {
  --c: var(--info); --ct: var(--info-text);
  padding: 12px 16px 2px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 7%, var(--bg));
}
.hint-warning { --c: var(--warn); --ct: var(--warn-text); }
.hint-danger { --c: var(--bad); --ct: var(--bad-text); }
.hint-success { --c: var(--ok); --ct: var(--ok-text); }
.hint-t { margin: 0 0 6px !important; font: 700 11px/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ct); }
.hint > :last-child { margin-bottom: 12px; }

/* previous / next: HUD panes as in the dApp: two cut corners edged on the diagonal, two corner ticks */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 76ch; margin-top: 48px; }
.pn a {
  --cut: 10px;
  position: relative; display: block; padding: 12px 16px; text-decoration: none; color: var(--text); min-width: 0;
  border: 1px solid var(--line); background-color: var(--bg-raised); background-origin: border-box;
  background-image:
    linear-gradient(135deg, transparent calc(50% - 0.75px), var(--glow) calc(50% - 0.75px), var(--glow) calc(50% + 0.75px), transparent calc(50% + 0.75px)),
    linear-gradient(135deg, transparent calc(50% - 0.75px), var(--glow) calc(50% - 0.75px), var(--glow) calc(50% + 0.75px), transparent calc(50% + 0.75px));
  background-position: top left, bottom right;
  background-size: var(--cut) var(--cut);
  background-repeat: no-repeat;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.pn a::before, .pn a::after { content: ""; position: absolute; width: 10px; height: 10px; pointer-events: none; border: 0 solid var(--glow); }
.pn a::before { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.pn a::after { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.pn a:hover { border-color: var(--glow); background-color: var(--active); }
.pn a span { color: var(--strong); }
.pn small { display: block; font: 600 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--chrome); }
.pn .next { text-align: right; grid-column: 2; }
.foot { padding: 20px 16px 28px; border-top: 1px solid var(--line-faint); text-align: center; font-size: 13px; color: var(--text-dim); }
.foot p { margin: 0; }

@media (max-width: 1199px) {
  .layout { grid-template-columns: var(--side) minmax(0, 1fr); }
  .toc { display: none; }
}
/* phones and small tablets: the sidebar becomes a menu over the page (the Menu link opens it; without JavaScript it
   opens as the #nav target) */
@media (max-width: 899px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; }
  .side {
    display: none; position: fixed; inset: var(--top) 0 0 0; z-index: 35; height: auto; width: auto;
    /* stretch, not the desktop's start: on a fixed grid child, start sizes the box to its content and moves it up
       over the top bar, so the menu would not scroll */
    align-self: stretch;
    background: var(--menu); border-right: 0; padding: 16px 16px 40px;
  }
  .side:target, body.nav-open .side { display: block; }
  body.nav-open { overflow: hidden; }
  .nav-close {
    display: block; margin-top: 24px; padding: 10px 12px; text-align: center; border: 1px solid var(--line);
    color: var(--chrome); text-decoration: none; font: 600 13px var(--font);
  }
  .doc { padding: 24px 16px 40px; }
  .prose { font-size: 16px; }
  .prose h2 { margin-top: 36px; font-size: 22px; }
  .prose h3 { font-size: 18px; }
}
/* the "Docs" chip goes first when the top bar gets tight (Menu, logo, name, theme button, "Open the app") */
@media (max-width: 520px) { .brand span { display: none; } }
@media (max-width: 420px) {
  .top { gap: 8px; padding: 0 12px; }
  .brand { gap: 8px; }
  .brand b { font-size: 17px; letter-spacing: 0.06em; }
  .app-link { padding: 0 10px; font-size: 12px; }
  .pn { grid-template-columns: 1fr; }
  .pn .next { grid-column: 1; }
}
@media (max-width: 359px) {
  /* Menu, logo, name, theme button and "Open the app" in 320 px */
  .top { gap: 6px; padding: 0 8px; }
  .brand { gap: 6px; }
  .brand b { font-size: 15px; letter-spacing: 0.02em; }
  .menu-btn { padding: 0 8px; }
  .app-link { padding: 0 8px; }
  .theme-btn { width: 36px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
