:root {
  --bg: #0d0f0d;
  --panel: #131513;
  --line: #3a352e;
  --line-bright: #5f594f;
  --text: #ece9df;
  --muted: #a6a195;
  --dim: #6c665b;
  --green: #72d06c;
  --purple: #d06cff;
  --gold: #e1c241;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, "Cascadia Code", "Roboto Mono", monospace;
  font-size: var(--fs-body, 10px);
  line-height: 1.6;
  padding: 16px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
/* body text is green, so inline prose links would vanish into it — gold sets them
   apart without an underline. nav (.top a) and .doc-card keep their own look. */
main a:not(.doc-card) {
  color: var(--gold);
  text-decoration: none;
}
main a:not(.doc-card):hover { color: var(--purple); }
.top {
  max-width: 980px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 0.5px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-nav, 11px);
}
/* minimalist text nav — clean green, no pills (matches lottery/sim/synthCore) */
.top a {
  color: var(--green);
  letter-spacing: 0.04em;
  transition: color 0.12s ease;
}
.top a:hover,
.top a:active { color: var(--purple); }
/* the NateRich.net home link is always first in the bar; match it by position so the
   gold highlight fires whether its href is "/" or a relative "../../" (docs pages). */
.top a:first-child:hover,
.top a:first-child:active { color: var(--gold); }
/* push the theme switcher to the far right of the bar */
.top .nr-theme-switch { margin-left: auto; }

main {
  max-width: 980px;
  margin: 0 auto;
}

h1, h2, h3, p { margin: 0; }
h1 {
  color: var(--gold);
  font-size: var(--fs-h1, 24px);
  font-weight: 500;
  margin-bottom: 16px;
}
h2 {
  color: var(--purple);
  font-size: var(--fs-h2, 11px);
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
h3 {
  color: var(--gold);
  font-size: var(--fs-h3, 11px);
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.lead {
  color: var(--muted);
  font-size: var(--fs-lead, 12px);
  margin-bottom: 20px;
  max-width: 720px;
}
.lead strong {
  color: var(--purple);
  font-weight: 500;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.doc-card {
  min-height: 128px;
  padding: 13px;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.doc-card:hover {
  border-color: var(--line-bright);
}
.doc-card span {
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.12em;
}
.doc-card strong {
  color: var(--purple);
  font-size: 12px;
  font-weight: 500;
}
.doc-card p {
  color: var(--muted);
  font-size: var(--fs-body, 10px);
}
.dormant {
  opacity: 0.62;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.article {
  max-width: 720px;
}
.article h2 .tag {
  display: inline-block;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.12em;
  border: 0.5px solid var(--line-bright);
  border-radius: 5px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: 2px;
}
.article section {
  padding: 14px 0;
  border-top: 0.5px solid var(--line);
}
.article p {
  color: var(--muted);
}
.article p + p {
  margin-top: 9px;
}
/* prose links are gold (no underline) so they never read as code/greentext */
.article a {
  color: var(--gold);
  text-decoration: none;
}
.article a:hover {
  color: var(--purple);
}
code {
  color: var(--green);
}

/* prize-tier emphasis — mirrors the lottery's tier colors */
.t-gp  { color: var(--gold); }
.t-top { color: var(--green); }
.t-sec { color: var(--text); }

/* reference tables (e.g. "by the numbers") */
.article table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: var(--fs-body, 10px);
}
.article th,
.article td {
  text-align: left;
  padding: 6px 10px 6px 0;
  border-bottom: 0.5px solid var(--line);
  vertical-align: top;
}
.article th {
  color: var(--dim);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 9px;
}
.article td {
  color: var(--muted);
}
.article td:first-child {
  color: var(--green);
}
.article td a { color: var(--green); text-decoration: none; }
.article td a:hover { color: var(--gold); }
.article td code {
  color: var(--green);
}

/* worked-example callout */
.example {
  margin-top: 9px;
  padding: 10px 12px;
  border: 0.5px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  background: var(--panel);
}
.example p {
  color: var(--muted);
}
.example strong {
  color: var(--purple);
}

/* ---- bot reference: one entry per strategy, tinted by its kind hue (--kc set
   inline per bot, matching the dot/chip colors on the leaderboard & /bots) ---- */
.bot {
  border-left: 2px solid var(--kc, var(--line-bright));
  padding: 2px 0 4px 12px;
  margin: 13px 0;
}
.bot-name {
  color: var(--kc);
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.bot-name .kdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kc);
  box-shadow: 0 0 7px var(--kc);
  flex: none;
}
.bot-tag {
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.bot p { margin-top: 5px; }       /* color falls through to .article p (green) */
.bot .why { color: var(--muted); }
.bot-links { font-size: var(--fs-body, 10px); }
.classlede { color: var(--muted); margin-bottom: 4px; }
.aside { color: var(--dim); font-size: var(--fs-body, 10px); margin-top: 12px; }
/* legal-stance / disclaimer callout — gold-bordered, dim text, sits clearly
   apart from the body so the "personal opinion, not legal advice" framing
   reads as the load-bearing thing it is. */
.note-strong {
  margin: 14px 0;
  padding: 9px 12px;
  border: 0.5px solid var(--gold);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: var(--fs-body, 10px);
  max-width: 720px;
}
.note-strong strong { color: var(--gold); }
.seealso { color: var(--muted); font-size: var(--fs-body, 10px); margin-top: 8px; }

.tool-block {
  display: grid;
  gap: 9px;
}
/* tool sub-headers are purple (the global h3 is gold) */
.tool-block h3 {
  color: var(--purple);
  margin: 10px 0 4px;
}
.tool-block table { margin-top: 4px; max-width: 460px; }
.tool-block table td:first-child { color: var(--muted); width: 38%; }
.tool-block table td:last-child { color: var(--green); }
.credits { margin-top: 22px; padding-top: 14px; border-top: 0.5px solid var(--line); }
.credits h2 { margin-bottom: 8px; }
.credits > p { color: var(--muted); margin-bottom: 14px; max-width: 720px; }
/* Each cited work gets its own block — same shape as a tool-block, but the h3
   title carries the project link (gold, no underline) since these aren't my
   tools. Project name leads, paragraph honoring the work follows. */
.credit-block { margin: 14px 0 0; }
.credit-block h3 { color: var(--gold); margin-bottom: 5px; }
.credit-block h3 a { color: var(--gold); text-decoration: none; }
.credit-block h3 a:hover { color: var(--purple); }
.credit-block p { color: var(--muted); }
.credit-block p + p { margin-top: 8px; }
.opt { color: var(--dim); }
.tool-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.tool-head h2 {
  margin-bottom: 0;
}
.tool-head span {
  color: var(--dim);
  font-size: var(--fs-body, 10px);
}
.tool-head h2 a {
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;       /* headers never carry the inline-link underline */
}
.tool-head h2 a:hover {
  color: var(--green);
}
.gh-mark {
  display: inline-block;
  vertical-align: -2px;
}

/* "soon" marker — sits beside an h2 in a tool-block heading */
.soon-pill {
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.12em;
  border: 0.5px solid var(--line-bright);
  border-radius: 5px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: 2px;
}

@media (max-width: 780px) {
  body { padding: 12px; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 15px; }
  .tool-head {
    display: grid;
    gap: 4px;
  }
}

/* ── docs sub-index (docs/quintile, docs/synthcore) ──
   We dropped the literal #/##/> markdown glyphs that used to lead each
   row/note (felt too Obsidian-cosplay for a webpage). The .hh class
   stays in markup for now so we don't have to scrub every page; CSS
   just doesn't render it. The typographic colors do the work the glyphs
   used to do — purple for sections, dim for meta, green for links. */
.hh { display: none; }

.md-index { max-width: 760px; }
.md-title { color: var(--gold); font-size: 15px; font-weight: 500; margin-bottom: 5px; }
.md-frame { color: var(--muted); font-size: var(--fs-body, 10px); margin: 0 0 16px; letter-spacing: 0.02em; }

.md-note { color: var(--muted); font-size: 10px; max-width: 700px; margin: 0 0 13px; line-height: 1.62; }

.md-secs { margin: 6px 0 14px; }
.md-index a.md-row {
  display: grid;
  grid-template-columns: minmax(110px, 170px) 1fr;
  gap: 6px 16px;
  align-items: baseline;
  padding: 6px 5px;
  border-top: 0.5px solid var(--line);
  color: var(--green);
  text-decoration: none;
  transition: background 0.1s ease;
}
.md-secs a.md-row:last-child { border-bottom: 0.5px solid var(--line); }
.md-row .k { color: var(--green); }
.md-row .d { color: var(--muted); font-size: var(--fs-body, 10px); }
.md-index a.md-row:hover { background: var(--panel); }
.md-index a.md-row:hover .k { color: var(--gold); }

/* synthCore variant — denser */
.md-index.dense a.md-row { padding: 4px 5px; }
.md-index.dense .md-frame { margin-bottom: 12px; }

@media (max-width: 620px) {
  .md-index a.md-row { grid-template-columns: 1fr; gap: 2px; padding: 6px 4px; }
}
