/* TONK look for the pages outside the NET/HOST workbench (the landing page, PLAYBOOKS,
   ATTRIB, the scan generator, INTEL, purple, DETECT). Load it AFTER the page's own styles,
   with assets/tonk-theme.js in <head>.

   Warm ink with one signal accent (crimson). It redefines the token names those pages
   already use (--bg..--bg4, --panel, --line/--border, --text/--text2/--text3, --dim,
   --faint, --accent/--accent2, status and nation colors, --mono/--sans), so their own
   rules restyle without being rewritten. --accent is the accent as ink (text, borders);
   --accent2 is the accent as a fill under white text. The workbench keeps the same
   values in net/css/wb.css.

   Type: Atkinson Hyperlegible Next and Mono (SIL OFL, assets/fonts), self-hosted so
   it renders the same offline. Identical copy in every TONK repo. */
@font-face{font-family:"AHN";src:url(fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"AHN";src:url(fonts/atkinson-hyperlegible-next-latin-400-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"AHN";src:url(fonts/atkinson-hyperlegible-next-latin-600-normal.woff2) format("woff2");font-weight:500 600;font-display:swap}
@font-face{font-family:"AHN";src:url(fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format("woff2");font-weight:700 900;font-display:swap}
@font-face{font-family:"AHM";src:url(fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"AHM";src:url(fonts/atkinson-hyperlegible-mono-latin-600-normal.woff2) format("woff2");font-weight:500 900;font-display:swap}

[data-theme]{
  --sans:"AHN",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --mono:"AHM",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --crt:var(--mono);
  --glow-green:none; --glow-amber:none; --glow-red:none;
}
[data-theme=dark]{
  --bg:#0e0e10; --bg2:#151518; --bg3:#1c1c21; --bg4:#24242a;
  --panel:#18181c; --panel2:#1f1f24;
  --line:rgba(255,255,255,.08); --line2:rgba(255,255,255,.16); --border:rgba(255,255,255,.08); --border2:rgba(255,255,255,.16);
  --text:#f0eee9; --text2:#9e9b95; --text3:#8c8981; --dim:#9e9b95; --faint:#8c8981;
  --accent:#ec5a78; --accent2:#c8304f; --on-accent:#fff;
  --cyan:#ec5a78; --blue:#60a5fa; --teal:#34d399; --phosphor:#34d399;
  --green:#34d399; --amber:#e5a038; --orange:#e5a038; --red:#ec5a78; --purple:#c4a1ff; --pink:#f472b6;
  --cn:#e05263; --ru:#5b8def; --ir:#3bb273; --kp:#b48cf0; --mul:#8e8d8a;
  --code-ink:#f0eee9; --tonk-pop:#1c1c21; --tonk-shadow:0 14px 40px rgba(0,0,0,.55);
  color-scheme:dark; accent-color:#c8304f;
}
[data-theme=light]{
  --bg:#f7f6f2; --bg2:#ffffff; --bg3:#f0eee9; --bg4:#e8e5de;
  --panel:#ffffff; --panel2:#f0eee9;
  --line:rgba(18,18,20,.10); --line2:rgba(18,18,20,.20); --border:rgba(18,18,20,.10); --border2:rgba(18,18,20,.20);
  --text:#161618; --text2:#575550; --text3:#6b6861; --dim:#575550; --faint:#6b6861;
  --accent:#b82040; --accent2:#b82040; --on-accent:#fff;
  --cyan:#b82040; --blue:#2563eb; --teal:#047857; --phosphor:#047857;
  --green:#047857; --amber:#b45309; --orange:#b45309; --red:#b82040; --purple:#6d28d9; --pink:#be185d;
  --cn:#c8304f; --ru:#2563eb; --ir:#047857; --kp:#7c3aed; --mul:#85827a;
  --code-ink:#161618; --tonk-pop:#ffffff; --tonk-shadow:0 14px 40px rgba(18,18,20,.16);
  color-scheme:light; accent-color:#b82040;
}
[data-theme=contrast]{
  --bg:#000; --bg2:#0a0a0c; --bg3:#141418; --bg4:#1f1f24;
  --panel:#0a0a0c; --panel2:#141418;
  --line:#444; --line2:#777; --border:#444; --border2:#777;
  --text:#fff; --text2:#d4d4d8; --text3:#a1a1aa; --dim:#d4d4d8; --faint:#a1a1aa;
  --accent:#ff4d73; --accent2:#ff4d73; --on-accent:#000;
  --cyan:#ff4d73; --blue:#93c5fd; --teal:#4ade80; --phosphor:#4ade80;
  --green:#4ade80; --amber:#fbbf24; --orange:#fbbf24; --red:#ff4d73; --purple:#d8b4fe; --pink:#f9a8d4;
  --cn:#ff6b81; --ru:#93c5fd; --ir:#4ade80; --kp:#d8b4fe; --mul:#bdbdbd;
  --code-ink:#fff; --tonk-pop:#0a0a0c; --tonk-shadow:0 0 0 2px #fff;
  color-scheme:dark; accent-color:#ff4d73;
}

/* the wordmark diamond: the one ornament */
.tonk-pip{display:inline-block;width:7px;height:7px;margin-right:8px;background:var(--accent2);transform:rotate(45deg);border-radius:1px;vertical-align:.12em;flex:none}

/* theme picker (TonkTheme.mount) */
.tonk-tp{position:relative;display:inline-block}
.tonk-tp>summary{list-style:none;cursor:pointer;display:grid;place-items:center;width:30px;height:30px;border-radius:4px;color:var(--text2);border:1px solid var(--line)}
.tonk-tp>summary::-webkit-details-marker{display:none}
.tonk-tp>summary:hover,.tonk-tp[open]>summary{color:var(--text);border-color:var(--line2)}
.tonk-tp>summary:focus-visible{outline:1px solid var(--accent);outline-offset:1px}
.tonk-tp-m{position:absolute;right:0;top:calc(100% + 6px);z-index:100;display:grid;gap:4px;width:180px;padding:6px;background:var(--tonk-pop);border:1px solid var(--line2);border-radius:6px;box-shadow:var(--tonk-shadow)}
.tonk-tp-m button{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;gap:9px;width:100%;padding:6px 8px;border-radius:4px;font:12.5px var(--sans);color:var(--text2)}
.tonk-tp-m button:hover,.tonk-tp-m button:focus-visible{background:var(--bg3);color:var(--text);outline:none}
.tonk-tp-m button.on{color:var(--text);box-shadow:inset 2px 0 0 var(--accent)}
.tonk-sw{width:14px;height:14px;border-radius:3px;flex:none;box-shadow:inset 0 0 0 1px rgba(127,127,127,.45)}
.tonk-sw-dark{background:linear-gradient(135deg,#151518 55%,#c8304f 55%)}
.tonk-sw-light{background:linear-gradient(135deg,#f7f6f2 55%,#b82040 55%)}
.tonk-sw-contrast{background:linear-gradient(135deg,#000 55%,#ff4d73 55%)}
.tonk-sw-system{background:linear-gradient(135deg,#f7f6f2 50%,#151518 50%)}
