/* Site-owned palette. Never edit the pinned brand or Garden stylesheets.
   Without JavaScript the explicit light palette remains readable. */
html:root {
  color-scheme:light only;
  --theme-paper:#fff; --theme-ink:#192421; --theme-heading:#000;
  --theme-raised:#f2f5f3; --theme-muted:#53645e; --theme-line:#b8c8c0;
  --theme-link:#236673; --theme-accent:#425f57; --theme-focus:#916600;
  --theme-node:#fff;
}
html:root[data-theme="dark"] {
  color-scheme:dark only;
  --theme-paper:#141c19; --theme-ink:#edf3ef; --theme-heading:#fff;
  --theme-raised:#222f29; --theme-muted:#b6c8be; --theme-line:#63796d;
  --theme-link:#9cd8e2; --theme-accent:#a9d1bc; --theme-focus:#ffd83a;
  --theme-node:#e7eeea;
}
/* The selector outranks Garden's dynamically adopted color-scheme rules. */
html:root:not([data-theme="dark"]) { color-scheme:light only; }
:root {
  --paper:var(--theme-paper); --ink:var(--theme-ink);
  --muted:var(--theme-muted); --line:var(--theme-line); --forest:var(--theme-accent);
}
body { background:var(--theme-paper); color:var(--theme-ink); }
h1,h2,h3,h4,h5,h6 { color:var(--theme-heading); }
a { color:var(--theme-link); }
pre,.mini-story,.connected-section,.authority-note { background:var(--theme-raised); color:var(--theme-ink); }
.connection span { background:var(--theme-paper); border-color:var(--theme-line); }
.button.secondary { color:var(--theme-ink); border-color:var(--theme-line); }
.secondary:hover { background:var(--theme-raised); }
.site-search button { background:var(--theme-raised); }
.site-search button[type="submit"],[data-quickstart-copy],[data-prompt-copy],[data-analytics-choice] { color:#192421; }
.video-stage button:hover { color:var(--theme-ink); }
.guide-toc nav { scrollbar-color:var(--theme-muted) var(--theme-raised); }
:focus-visible { outline-color:var(--theme-focus); }
.header-inner { flex-wrap:wrap; }
.theme-control { display:flex; flex-wrap:wrap; align-items:center; gap:8px; font:400 14px/1.5 Roboto,system-ui,sans-serif; }
.theme-control[hidden] { display:none; }
.theme-control select { min-height:44px; max-width:100%; padding:8px; border:1px solid var(--theme-line); border-radius:4px; font:inherit; background:var(--theme-paper); color:var(--theme-ink); }
.theme-control select:focus-visible { outline:3px solid var(--theme-focus); outline-offset:3px; }
.site-header .theme-control { margin-left:auto; }
@media(max-width:760px) { .site-header .theme-control { margin-left:0; } }
/* Scoped brand tokens remain byte-for-byte deterministic; semantic overrides
   pair text and backgrounds, including when editorial-tokens.css is unavailable. */
html .field-guide,html .journey-teaser {
  --surface:var(--theme-paper); --surface-raised:var(--theme-raised);
  --ink:var(--theme-ink); --dark-gray:var(--theme-line);
  --white:var(--theme-node); --black:#000; --gold:#ffd83a;
  --forest:var(--theme-accent);
}
.field-guide a,.journey-teaser a { color:var(--theme-link); }
.field-guide a:hover,.journey-teaser a:hover { color:var(--theme-heading); }
.field-guide a.fg-primary,.journey-teaser a.fg-primary,
.field-guide a.fg-primary:hover,.journey-teaser a.fg-primary:hover { color:#000; }
.field-guide .fg-map,.field-guide .fg-map figcaption,
.field-guide [data-story="exchange"] figcaption { border-color:var(--theme-line); }
.field-guide .fg-svg-label,.field-guide .fg-svg-title,
.field-guide .fg-svg-body,.field-guide .fg-svg-code { fill:var(--theme-ink); }
/* Node labels stay black through white→gold→white highlight interpolation.
   Do not invert every SVG text: captions outside nodes sit on the page palette. */
.field-guide [data-story-step] text { fill:#000; }
.field-guide .story-node { fill:var(--theme-node); stroke:var(--theme-accent); }
.field-guide .fg-concept-line { stroke:var(--theme-accent); }
.field-guide .fg-console pre,.field-guide .fg-console pre code { color:var(--theme-ink); background:var(--theme-raised); }
/* Garden's public configuration disables its competing mode buttons. These
   higher-specificity variables adapt its UI without touching vendor bytes. */
html:root {
  --bg:var(--theme-paper); --bg-2:var(--theme-raised); --bg-3:var(--theme-raised);
  --tx:var(--theme-ink); --tx-1:var(--theme-heading); --tx-2:var(--theme-muted);
  --ui:var(--theme-line); --ui-2:var(--theme-muted); --link-color:var(--theme-link);
  --header-color:var(--theme-paper);
}
#explorer-orientation { background:var(--theme-paper); color:var(--theme-ink); border-color:var(--theme-line); }
#explorer-orientation a { color:var(--theme-link); }
