/* BlackhawkHub — design system v2. Engineering handbook meets restrained
   network-intelligence console. Near-black neutral canvas, hairline dividers,
   disciplined accent, typographic hierarchy over boxes. */

:root {
  /* neutral canvas */
  --bg: #070809;
  --bg-2: #0A0B0D;
  --surface: #0D0F12;
  --raised: #14171B;
  --raised-2: #1A1E23;
  /* hairlines (much fainter than boxes) */
  --line: rgba(255, 255, 255, 0.065);
  --line-2: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.16);
  /* text ramp */
  --text: #ECEEF1;
  --text-2: #C2C7CE;
  --muted: #8A929C;
  --muted-2: #5A626C;
  --faint: #3A4048;
  /* single primary accent, used sparingly */
  --accent: #45C4EA;
  --accent-soft: rgba(69, 196, 234, 0.13);
  --accent-line: rgba(69, 196, 234, 0.35);
  /* section identity ticks (small marks only) */
  --c-port: #45C4EA;
  --c-error: #F26D7D;
  --c-command: #5BD4A0;
  --c-process: #E7B15A;
  --c-network: #8C9BF2;
  --c-http: #B79BF0;
  --c-hardware: #F0955A;
  --c-security: #4FD6C4;
  --c-tool: #C6CCD4;
  --c-guide: #8A929C;
  /* status */
  --ok: #5BD4A0;
  --warn: #E7B15A;
  --crit: #F26D7D;

  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;

  --radius: 3px;
  --radius-lg: 5px;
  --wrap: 1120px;
  --gutter: 24px;
  --header-h: 60px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1 0 auto; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; text-decoration-color: var(--accent-line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
code, kbd, pre, samp { font-family: var(--font-mono); }
h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0; color: var(--text); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.35em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(69, 196, 234, 0.28); color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--accent); color: #04070A; padding: 8px 12px; z-index: 100; border-radius: var(--radius); font-weight: 600; }
.skip-link:focus { top: 8px; }

/* mono label helper */
.kicker-label, .entity-kicker, .spec dt, .toc-title, .band-head.small h2, .hero-kicker,
.dir-index, .dir-count, .feat-key, .feat-kind, .q-key, .method-num, .rrow-tick,
.hit-type, .row-key, .badge, .code-lang, .tool-cta-label, .field label, .field .label,
.check-group legend { font-family: var(--font-mono); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 8, 9, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px) saturate(1.1);
}
.header-row { display: flex; align-items: center; gap: 22px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.brand .mark { color: var(--accent); }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.brand-name b { font-weight: 400; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 2px; }
.nav-group { position: relative; }
.nav-link, .nav-trigger {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0; cursor: pointer;
  color: var(--text-2); font-size: 14.5px; font-weight: 450; font-family: var(--font-sans);
  padding: 7px 11px; border-radius: var(--radius); letter-spacing: -0.005em;
}
.nav-link:hover, .nav-trigger:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); text-decoration: none; }
.nav-link[aria-current], .nav-trigger.is-active { color: var(--text); }
.nav-trigger .chev { color: var(--muted-2); transition: transform 160ms; }
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-menu {
  position: absolute; left: 0; top: calc(100% + 8px); min-width: 264px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); padding: 6px; z-index: 60;
}
.nav-menu a { display: block; padding: 9px 11px; border-radius: var(--radius); color: var(--text); }
.nav-menu a:hover { background: var(--raised); text-decoration: none; }
.nav-menu-label { display: block; font-size: 14.5px; font-weight: 500; }
.nav-menu-note { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }

.header-search { position: relative; margin-left: auto; width: 250px; }
.header-search input {
  width: 100%; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line-2);
  color: var(--text); border-radius: var(--radius); padding: 7px 34px 7px 32px; font-size: 13.5px;
  font-family: var(--font-mono); transition: border-color 140ms, background 140ms;
}
.header-search input::placeholder { color: var(--muted-2); font-family: var(--font-sans); }
.header-search input:focus { outline: none; border-color: var(--accent-line); background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-2); display: flex; pointer-events: none; }
.search-kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted-2); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 5px; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--radius); width: 42px; height: 38px; position: relative; cursor: pointer; margin-left: auto; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--text); border-radius: 2px; }
.nav-toggle-bar { top: 18px; }
.nav-toggle-bar::before { top: -6px; left: 0; right: 0; }
.nav-toggle-bar::after { top: 6px; left: 0; right: 0; }
.mobile-nav { display: none; }

/* ---------- search results dropdown ---------- */
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55); z-index: 60; max-height: min(66vh, 500px);
  overflow-y: auto; padding: 6px;
}
.search-hit { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: start; padding: 9px 10px; border-radius: var(--radius); color: var(--text); }
.search-hit:hover, .search-hit.is-active { background: var(--raised); text-decoration: none; }
.hit-type { padding-top: 2px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.hit-main { display: flex; flex-direction: column; min-width: 0; }
.hit-title { font-weight: 500; font-size: 14.5px; }
.hit-name { color: var(--muted); font-weight: 400; }
.hit-desc { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 12px; color: var(--muted); margin: 0; }
/* accent per section on the type label */
.hit-port { color: var(--c-port); } .hit-error { color: var(--c-error); } .hit-command { color: var(--c-command); }
.hit-process { color: var(--c-process); } .hit-network { color: var(--c-network); } .hit-http { color: var(--c-http); }
.hit-hardware { color: var(--c-hardware); } .hit-security { color: var(--c-security); } .hit-tool { color: var(--c-tool); } .hit-guide { color: var(--c-guide); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; background: var(--bg-2); color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-block: 48px 28px; }
.footer-brand p { max-width: 40ch; margin-top: 14px; line-height: 1.6; }
.footer-col h2 { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2); margin-bottom: 14px; font-weight: 500; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--text-2); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 18px; font-size: 12.5px; color: var(--muted-2); }
.footer-bottom p { margin: 0; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { margin: 24px 0 26px; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; color: var(--faint); margin: 0 8px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text-2); }
.breadcrumbs li[aria-current] { color: var(--text-2); }

/* ---------- entity (record) header ---------- */
.entity-head { padding-bottom: 30px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.entity-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; flex-wrap: wrap; }
.tick { width: 9px; height: 9px; border-radius: 2px; background: var(--muted); flex: none; }
.entity-head-port .tick { background: var(--c-port); }
.entity-head-error .tick { background: var(--c-error); }
.entity-head-command .tick { background: var(--c-command); }
.entity-head-process .tick { background: var(--c-process); }
.entity-head-network .tick { background: var(--c-network); }
.entity-head-http .tick { background: var(--c-http); }
.entity-head-hardware .tick { background: var(--c-hardware); }
.entity-head-security .tick { background: var(--c-security); }
.entity-head-tool .tick { background: var(--c-tool); }
.entity-head-guide .tick { background: var(--c-guide); }

.entity-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0 0 20px; }
.entity-id-mono .entity-id-main { font-family: var(--font-mono); font-weight: 600; font-size: clamp(34px, 5.2vw, 52px); letter-spacing: -0.01em; color: var(--text); }
.entity-id-word .entity-id-main { font-family: var(--font-sans); font-weight: 600; font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.02em; color: var(--text); }
.entity-sub { font-family: var(--font-sans); font-weight: 400; font-size: clamp(17px, 2vw, 22px); color: var(--muted); letter-spacing: 0; }
.entity-answer { font-family: var(--font-sans); font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.55; color: var(--text); font-weight: 400; letter-spacing: -0.005em; max-width: 60ch; margin: 0 0 18px; }
.entity-answer code { font-family: var(--font-mono); font-size: 0.84em; background: rgba(255, 255, 255, 0.055); padding: 1px 5px; border-radius: 3px; }
.entity-answer a { color: var(--accent); }
.entity-answer strong { font-weight: 600; }
.entity-meta { color: var(--muted-2); font-size: 12.5px; margin: 0; font-family: var(--font-mono); letter-spacing: 0.02em; }

/* status labels: one emphasised lead chip + quiet dot markers */
.badge-lead { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; padding: 2px 8px; border-radius: 3px; color: var(--muted); background: rgba(255, 255, 255, 0.05); }
.badge-lead.badge-ok { color: var(--ok); background: rgba(91, 212, 160, 0.12); }
.badge-lead.badge-warn { color: var(--warn); background: rgba(231, 177, 90, 0.12); }
.badge-lead.badge-crit { color: var(--crit); background: rgba(242, 109, 125, 0.13); }
.badge-lead.badge-accent { color: var(--accent); background: var(--accent-soft); }
.badge-mark { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.bm-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); flex: none; }
.badge-mark.badge-ok .bm-dot { background: var(--ok); } .badge-mark.badge-warn .bm-dot { background: var(--warn); }
.badge-mark.badge-crit .bm-dot { background: var(--crit); } .badge-mark.badge-accent .bm-dot { background: var(--accent); }

.entity-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
.entity-side { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 28px; }
.entity-body { min-width: 0; max-width: 72ch; }

/* spec list (was fact table) */
.spec { margin: 0; }
.spec-row { padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec-row:first-child { padding-top: 0; }
.spec-row:last-child { border-bottom: 0; }
.spec dt { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; margin-bottom: 4px; }
.spec dd { margin: 0; font-size: 14.5px; color: var(--text); line-height: 1.5; }
.spec dd code { font-family: var(--font-mono); font-size: 12.5px; background: rgba(255, 255, 255, 0.05); padding: 1px 5px; border-radius: 3px; }
.spec dd a { color: var(--accent); }

.toc { font-size: 13.5px; }
.toc-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2); margin: 0 0 10px; font-weight: 500; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin-bottom: 8px; padding-left: 26px; position: relative; }
.toc li::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); position: absolute; left: 0; top: 1px; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--text); text-decoration: none; }

.tool-cta { display: block; padding: 16px 0 0; border-top: 1px solid var(--line); }
.tool-cta:hover { text-decoration: none; }
.tool-cta:hover .tool-cta-title { color: var(--accent); }
.tool-cta-label { display: block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.tool-cta-title { display: block; font-weight: 600; font-size: 15px; color: var(--text); }
.tool-cta-text { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* ---------- prose ---------- */
.prose { font-size: 16.5px; color: var(--text-2); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 22px; margin: 44px 0 14px; color: var(--text); letter-spacing: -0.015em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17.5px; margin: 30px 0 10px; color: var(--text); }
.prose h4 { font-size: 15px; margin: 22px 0 8px; color: var(--text); font-weight: 600; }
.prose p { margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.5em; }
.prose li > ul, .prose li > ol { margin-top: 0.45em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); }
.prose code { background: rgba(255, 255, 255, 0.055); padding: 1px 5px; border-radius: 3px; font-size: 0.86em; color: var(--text); overflow-wrap: anywhere; }
.prose a code { color: var(--accent); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

.code-block { position: relative; margin: 16px 0 22px; background: #04060A; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.code-block pre { margin: 0; padding: 15px 16px; overflow-x: auto; font-size: 13px; line-height: 1.6; -webkit-overflow-scrolling: touch; }
.code-block code { background: none; padding: 0; white-space: pre; font-size: inherit; color: var(--text-2); }
.code-lang { position: absolute; left: 14px; top: -8px; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); background: var(--bg); padding: 0 6px; }
.copy-btn { position: absolute; right: 8px; top: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); color: var(--muted); font-size: 11px; padding: 4px 9px; border-radius: 3px; cursor: pointer; font-family: var(--font-mono); }
.copy-btn:hover { color: var(--text); border-color: var(--accent-line); }
.copy-btn.is-copied { color: var(--ok); border-color: rgba(91, 212, 160, 0.4); }

.table-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 100%; }
.prose th, .prose td { padding: 9px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { background: rgba(255, 255, 255, 0.02); color: var(--muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; font-family: var(--font-mono); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td code { white-space: nowrap; }

/* callouts — quieter, rule instead of filled box */
.callout { margin: 20px 0 22px; padding: 2px 0 2px 18px; border-left: 2px solid var(--line-strong); }
.callout p { margin: 0; }
.callout p + p { margin-top: 0.6em; }
.callout-label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; margin-bottom: 6px; }
.callout-note { border-left-color: var(--accent-line); } .callout-note .callout-label { color: var(--accent); }
.callout-tip { border-left-color: rgba(91, 212, 160, 0.5); } .callout-tip .callout-label { color: var(--ok); }
.callout-warning { border-left-color: rgba(231, 177, 90, 0.55); } .callout-warning .callout-label { color: var(--warn); }
.callout-danger { border-left-color: rgba(242, 109, 125, 0.6); } .callout-danger .callout-label { color: var(--crit); }

.faq { margin-top: 48px; }
.faq h2 { font-size: 22px; margin-bottom: 6px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; padding: 15px 0; font-weight: 500; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 16px; font-size: 15.5px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted-2); font-family: var(--font-mono); flex: none; font-weight: 400; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-a { padding: 0 0 16px; font-size: 15.5px; }
.faq-a p:last-child { margin-bottom: 0; }

.sources { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; }
.sources h2 { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px; font-weight: 500; }
.sources ul { list-style: none; padding: 0; margin: 0; }
.sources li { margin-bottom: 9px; padding-left: 18px; position: relative; }
.sources li::before { content: "\2192"; position: absolute; left: 0; color: var(--faint); }
.sources a { color: var(--text-2); }
.sources a:hover { color: var(--accent); }
.source-note { color: var(--muted-2); }

/* ---------- related (directory rows) ---------- */
.related { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.related > h2 { font-size: 20px; margin-bottom: 22px; }
.related-group { margin-bottom: 30px; }
.related-group h3 { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2); margin-bottom: 6px; font-weight: 500; }
.rrow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.rrow { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.rrow:hover { text-decoration: none; }
.rrow:hover .rrow-title { color: var(--accent); }
.rrow-tick { width: 7px; height: 7px; border-radius: 2px; background: var(--muted-2); margin-top: 7px; flex: none; }
.rrow-port .rrow-tick { background: var(--c-port); } .rrow-error .rrow-tick { background: var(--c-error); }
.rrow-command .rrow-tick { background: var(--c-command); } .rrow-process .rrow-tick { background: var(--c-process); }
.rrow-network .rrow-tick { background: var(--c-network); } .rrow-http .rrow-tick { background: var(--c-http); }
.rrow-hardware .rrow-tick { background: var(--c-hardware); } .rrow-security .rrow-tick { background: var(--c-security); }
.rrow-tool .rrow-tick { background: var(--c-tool); } .rrow-guide .rrow-tick { background: var(--c-guide); }
.rrow-main { min-width: 0; }
.rrow-title { display: block; font-weight: 500; font-size: 15px; color: var(--text); }
.rrow-name { color: var(--muted); font-weight: 400; }
.rrow-desc { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- index pages ---------- */
.index-head { padding-bottom: 26px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.index-head .entity-type, .index-head .count { font-family: var(--font-mono); }
.index-head h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; margin-top: 6px; }
.index-head .entity-type { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.index-head .count { color: var(--muted-2); }
.index-lede { color: var(--muted); font-size: 17px; max-width: 74ch; margin: 14px 0 0; line-height: 1.55; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.jump a { font-family: var(--font-mono); font-size: 12px; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--muted); }
.jump a:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.index-intro { max-width: 74ch; margin-bottom: 32px; }
.index-outro { max-width: 74ch; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.index-group { margin-bottom: 44px; }
.index-group h2 { font-size: 19px; margin-bottom: 6px; letter-spacing: -0.01em; }
.group-blurb { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; max-width: 74ch; }

.row-list { list-style: none; padding: 0; margin: 0; }
.row-list li { border-bottom: 1px solid var(--line); }
.row-list a { display: grid; grid-template-columns: 148px 190px 1fr; gap: 18px; padding: 12px 4px; color: var(--text); align-items: baseline; }
.row-list a:hover { text-decoration: none; }
.row-list a:hover .row-name { color: var(--accent); }
.row-key { font-family: var(--font-mono); font-weight: 500; color: var(--text); font-size: 14px; word-break: break-word; }
.row-name { color: var(--text-2); font-size: 14.5px; }
.row-desc { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-list-compact a { grid-template-columns: minmax(60px, auto) 1fr; }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
/* localized, very faint grid that fades out — almost subconscious */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 90% at 15% 0%, #000 0%, transparent 62%);
  mask-image: radial-gradient(120% 90% at 15% 0%, #000 0%, transparent 62%);
  opacity: 0.5;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(720px 320px at 12% -8%, rgba(69, 196, 234, 0.07), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; padding-block: 76px 64px; max-width: 640px; }
/* restrained technical counterweight on the right — secondary to search */
.hero-motif { position: absolute; right: 0; top: 0; bottom: 0; width: 44%; max-width: 520px; z-index: 0; pointer-events: none; display: flex; align-items: center; justify-content: flex-end; overflow: hidden; }
.hero-motif svg { height: 78%; max-height: 440px; width: auto; color: var(--muted-2); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%); }
.hm-ticks { opacity: 0.5; }
.hm-edge { opacity: 0.32; }
.hm-node { opacity: 0.55; }
.hm-label { fill: var(--muted-2); opacity: 0.6; letter-spacing: 0.04em; }
.hm-active { color: var(--accent); opacity: 0.5; }
.hm-node-active { fill: var(--accent); opacity: 0.85; }
.hm-label-active { fill: var(--accent); opacity: 0.9; }
@media (max-width: 1080px) { .hero-motif { display: none; } }
.hero-kicker { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.hero-title { font-size: clamp(30px, 4.6vw, 50px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; color: var(--text); }
.hero-sub { color: var(--muted); font-size: 17px; max-width: 60ch; margin: 22px 0 30px; line-height: 1.6; }

.cmd-search { position: relative; max-width: 620px; }
.cmd-search input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); color: var(--text);
  border-radius: var(--radius-lg); padding: 16px 92px 16px 46px; font-size: 16px; font-family: var(--font-mono);
  transition: border-color 140ms, box-shadow 140ms;
}
.cmd-search input::placeholder { color: var(--muted-2); font-family: var(--font-sans); }
.cmd-search input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.cmd-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.cmd-hint { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 3px 8px; }
.cmd-search .search-results { top: calc(100% + 10px); }
.hero-examples { margin: 18px 0 0; color: var(--muted-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-examples span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-examples a { color: var(--text-2); }
.hero-examples code { font-family: var(--font-mono); background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); padding: 3px 8px; border-radius: 4px; font-size: 12.5px; }
.hero-examples a:hover { text-decoration: none; }
.hero-examples a:hover code { border-color: var(--accent-line); color: var(--accent); }

.band { margin-top: 72px; }
.band-head { margin-bottom: 22px; }
.band-head h2 { font-size: 22px; letter-spacing: -0.015em; }
.band-head p { color: var(--muted); margin: 5px 0 0; font-size: 14.5px; }
.band-head.small { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.band-head.small h2 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.band-more { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.band-more:hover { color: var(--accent); text-decoration: none; }

/* featured records — identifier-led, quiet type tag, clear scanning rhythm */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 44px; }
.feat { display: grid; grid-template-columns: 14px minmax(0, 140px) 1fr auto; gap: 16px; align-items: baseline; padding: 15px 4px 15px 0; border-bottom: 1px solid var(--line); color: var(--text); border-radius: var(--radius); transition: background 140ms; }
.feat:hover, .feat:focus-visible { text-decoration: none; background: rgba(255, 255, 255, 0.022); }
.feat:hover .feat-key, .feat:focus-visible .feat-key { color: var(--accent); }
.feat-tick { width: 8px; height: 8px; border-radius: 2px; align-self: center; flex: none; }
.feat-port { background: var(--c-port); } .feat-error { background: var(--c-error); } .feat-command { background: var(--c-command); }
.feat-process { background: var(--c-process); } .feat-network { background: var(--c-network); } .feat-http { background: var(--c-http); }
.feat-key { font-family: var(--font-mono); font-weight: 600; font-size: 15.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; transition: color 140ms; }
.feat-name { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feat-kind { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

/* the reference directory — the centrepiece */
.directory { border-top: 1px solid var(--line); }
.dir-row { display: grid; grid-template-columns: 46px 1fr auto 28px; gap: 18px; align-items: baseline; padding: 20px 4px; border-bottom: 1px solid var(--line); color: var(--text); transition: padding-left 160ms; }
.dir-row:hover { text-decoration: none; padding-left: 10px; }
.dir-index { font-family: var(--font-mono); font-size: 13px; color: var(--faint); font-weight: 500; }
.dir-row:hover .dir-index { color: var(--accent); }
.dir-name { font-size: clamp(18px, 2.2vw, 23px); font-weight: 500; color: var(--text); letter-spacing: -0.015em; }
.dir-count { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted-2); }
.dir-arrow { color: var(--faint); text-align: right; transition: transform 160ms, color 160ms; }
.dir-row:hover .dir-arrow { color: var(--accent); transform: translateX(4px); }

/* split quick-reference */
.band-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.qlist { list-style: none; padding: 0; margin: 0; }
.qlist li { border-bottom: 1px solid var(--line); }
.qlist a { display: grid; grid-template-columns: minmax(58px, auto) 1fr; gap: 14px; padding: 9px 0; align-items: baseline; color: var(--text); }
.qlist a:hover { text-decoration: none; }
.qlist a:hover .q-name { color: var(--accent); }
.q-key { font-family: var(--font-mono); font-weight: 500; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-tool { font-size: 13px; }
.q-name { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tools-cols { columns: 2; column-gap: 40px; }
.tools-cols .qlist li { break-inside: avoid; }

/* method / trust band */
.method { padding-top: 40px; border-top: 1px solid var(--line); }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.method-num { font-family: var(--font-mono); font-size: 12px; color: var(--faint); display: block; margin-bottom: 12px; }
.method-item h3 { font-size: 15.5px; margin-bottom: 8px; }
.method-item p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.55; }
.method-link { margin-top: 26px; font-size: 14px; }

/* ---------- search page ---------- */
.page-search { position: relative; max-width: 640px; margin-bottom: 28px; }
.page-search input { width: 100%; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); border-radius: var(--radius-lg); padding: 14px 16px; font-size: 16px; font-family: var(--font-mono); }
.page-search input::placeholder { color: var(--muted-2); font-family: var(--font-sans); }
.page-search input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.page-search button { position: absolute; right: 6px; top: 6px; bottom: 6px; background: var(--raised); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 16px; font-size: 13px; cursor: pointer; }
.page-search button:hover { border-color: var(--accent-line); }
.search-page-results { max-width: 780px; }
.search-page-results .search-hit { border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 4px; }
.search-page-results .hit-desc { white-space: normal; }

/* ---------- static pages ---------- */
.static-page .index-head { margin-bottom: 28px; }
.static-prose { max-width: 72ch; }

/* ---------- tools ---------- */
.entity-tool .entity-head { border-bottom: 0; margin-bottom: 6px; padding-bottom: 6px; }
.tool-lede { font-family: var(--font-sans); color: var(--text); font-size: 18px; font-weight: 400; letter-spacing: -0.005em; max-width: 66ch; margin: 4px 0 12px; line-height: 1.5; }
.tool-privacy { font-size: 13px; color: var(--muted); margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }
.tool-ui { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 24px; margin: 20px 0 44px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px; align-items: end; }
.tool-grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label, .field .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text);
  padding: 10px 12px; font-size: 15px; width: 100%; min-width: 0;
}
.field input.mono, .field textarea, .mono { font-family: var(--font-mono); font-size: 14px; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-line); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--crit); }
.field-hint { font-size: 12.5px; color: var(--muted-2); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.btn { background: var(--accent); color: #04070A; border: 0; border-radius: var(--radius); padding: 10px 18px; min-height: 42px; font-weight: 600; cursor: pointer; font-size: 14px; }
.btn:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--raised); color: var(--text); border: 1px solid var(--line-2); }
.btn-secondary:hover { border-color: var(--accent-line); filter: none; }
.btn-small { padding: 6px 12px; min-height: 34px; font-size: 13px; }
.tool-error { color: var(--crit); font-size: 14px; margin: 12px 0 0; min-height: 1.2em; }
.tool-out { margin-top: 22px; }
.tool-out:empty { display: none; }
.out-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.out-table th, .out-table td { padding: 10px 0; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.out-table tr:last-child th, .out-table tr:last-child td { border-bottom: 0; }
.out-table th { color: var(--muted-2); font-weight: 500; width: 38%; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); padding-right: 16px; }
.out-table td { font-family: var(--font-mono); font-size: 14px; word-break: break-all; color: var(--text); }
.out-table td.plain { font-family: var(--font-sans); word-break: normal; }
.out-table thead th { width: auto; color: var(--muted); }
.out-table.data td { word-break: normal; }
.out-block { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; font-family: var(--font-mono); font-size: 14px; word-break: break-all; white-space: pre-wrap; min-height: 48px; position: relative; color: var(--text); }
.out-block.has-copy { padding-right: 76px; }
.out-block .copy-btn { top: 6px; right: 6px; }
.tool-note { font-size: 13.5px; color: var(--muted); margin: 12px 0 0; }
.tool-ok { color: var(--ok); } .tool-warn { color: var(--warn); } .tool-crit { color: var(--crit); }
.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.check-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--bg); }
.check-group legend, .check-group .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; padding: 0 4px; }
.check-group label { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 15px; cursor: pointer; }
.check-group input { width: 18px; height: 18px; accent-color: var(--accent); }
.big-out { font-family: var(--font-mono); font-size: 30px; font-weight: 600; color: var(--text); letter-spacing: 0.02em; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.seg button { background: var(--bg); color: var(--muted); border: 0; padding: 8px 15px; cursor: pointer; font-size: 13.5px; font-family: var(--font-mono); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #04070A; font-weight: 600; }
.bits { display: flex; flex-wrap: wrap; gap: 3px; font-family: var(--font-mono); font-size: 13px; }
.bits span { padding: 3px 5px; border-radius: 3px; background: var(--raised); color: var(--muted); }
.bits .net { color: var(--accent); background: var(--accent-soft); }
.bits .host { color: var(--muted); }
.live { font-size: 13px; color: var(--muted-2); font-family: var(--font-mono); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .entity-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .row-list a { grid-template-columns: 128px 168px 1fr; }
}
@media (max-width: 900px) {
  .site-nav, .header-search { display: none; }
  .nav-toggle { display: block; }
  .header-row { gap: 12px; }
  .mobile-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line-2); padding: 10px var(--gutter) 18px; max-height: 80vh; overflow-y: auto; }
  body.nav-open .mobile-nav { display: block; }
  .mnav-link, .mnav-group a { display: block; color: var(--text); padding: 9px 0; font-size: 15px; }
  .mnav-heading { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2); margin: 16px 0 4px; }
  .mnav-group a { color: var(--text-2); padding-left: 12px; }
}
@media (max-width: 860px) {
  .entity-grid { grid-template-columns: 1fr; gap: 30px; }
  .entity-side { position: static; flex-direction: column; }
  .toc { display: none; }
  .band-split { grid-template-columns: 1fr; gap: 32px; }
  .feat-grid { grid-template-columns: 1fr; }
  .tools-cols { columns: 1; }
  .row-list a { grid-template-columns: minmax(90px, auto) 1fr; }
  .row-desc { display: none; }
  .rrow-grid { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --gutter: 18px; }
  .hero-inner { padding-block: 48px 40px; }
  .hero-sub { font-size: 16px; }
  .cmd-search input { padding: 14px 16px 14px 44px; font-size: 15px; }
  .cmd-hint { display: none; }
  .method-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .entity-id-mono .entity-id-main { font-size: 34px; }
  .dir-row { grid-template-columns: 34px 1fr auto; padding: 16px 2px; }
  .dir-arrow { display: none; }
  .dir-name { font-size: 18px; }
  .feat { grid-template-columns: auto minmax(0, 118px) 1fr; gap: 12px; }
  .feat-kind { display: none; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 20px; }
  .row-list a { padding: 11px 2px; }
  .band { margin-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .entity-side .tool-cta, .copy-btn, .related, .hero::before, .hero::after { display: none; }
  body { background: #fff; color: #000; }
  .prose, .prose strong, .entity-answer { color: #000; }
}
