/* Type. IBM Plex, self-hosted under the OFL (site/fonts/LICENSE-OFL.txt); the CSP
   allows fonts from 'self' only, so nothing here reaches a third party. Serif is
   the reading face for prose; mono is the instrument face for labels, chrome,
   headings and anything that is a control rather than a sentence. */
@font-face{font-family:"IBM Plex Mono";src:url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Serif";src:url("/fonts/ibm-plex-serif-latin-400-normal.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Serif";src:url("/fonts/ibm-plex-serif-latin-600-normal.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Serif";src:url("/fonts/ibm-plex-serif-latin-400-italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
:root{
  --mono:"IBM Plex Mono",ui-monospace,"SF Mono",Menlo,Consolas,"Courier New",monospace;
  --serif:"IBM Plex Serif",Georgia,"Times New Roman",serif;
  --b0b-signal-h:46px;
}

/* b0b.dev theme tokens. Dark is the default and reproduces the original palette
   exactly, so a visitor who never touches the toggle sees no change. */
:root{
  --bg:#0a0a0a;
  --surface:#0d0d0d;
  --surface-2:#111;
  --surface-3:#1a1a1a;
  --surface-4:#222;
  --surface-5:#2a2a2a;
  --border:#333;
  --text:#d4d4d4;
  --text-hi:#ffffff;
  --text-bright:#e0e0e0;
  --text-bright2:#d8d8d8;
  --text-soft:#ccc;
  --text-dim:#aaaaaa;
  --muted:#888;
  --muted-2:#777;
  --muted-3:#666;
  --muted-4:#555;
  --muted-5:#8a8a8a;
  --muted-6:#7a7a7a;
  --muted-7:#6a6a6a;
  --muted-blue:#9aa0a6;
  --green:#00ff41;
  --green-60:rgba(0,255,65,0.6);
  --green-dim:#5a7a68;
  --green-mid:#3f5a4c;
  --green-line:#16321f;
  --cyan:#00ccff;
  --red:#ff4444;
  --amber:#ffcc00;
  --amber-2:#ffb300;
  --amber-3:#ffcc66;
  --amber-5:#ffdd33;
  --amber-6:#ffe0a0;
  --orange:#ff6600;
  --orange-3:#ffaa50;
  --purple:#cc88ff;
  --tint-green:#1a2e1a;
  --tint-red:#2e1a1a;
  --tint-blue:#1a1a2e;
  --tint-red-2:#1a0a0a;
  --tint-navy:#0a0a14;
  --on-accent:#000;
  --panel-a:rgba(10,10,10,0.98);
  --panel-b:rgba(10,10,10,0.96);
  --panel-c:rgba(10,10,10,0.95);
  --panel-d:rgba(10,10,10,0.92);
  --panel-warm:rgba(20,10,5,0.92);
  --fill-hi:rgba(0,0,0,0.5);
  --fill-mid:rgba(0,0,0,0.4);
  --fill-lo:rgba(0,0,0,0.3);
  --hairline:rgba(255,255,255,0.3);
  color-scheme:dark;
}
[data-theme="light"]{
  --bg:#f5f4f0;
  --surface:#ffffff;
  --surface-2:#f0efe9;
  --surface-3:#e7e5dd;
  --surface-4:#dedcd2;
  --surface-5:#d5d3c8;
  --border:#c1beb2;
  --text:#1c1c19;
  --text-hi:#000000;
  --text-bright:#14140f;
  --text-bright2:#1a1a15;
  --text-soft:#35352e;
  --text-dim:#45453e;
  --muted:#4f4f47;
  --muted-2:#4a4a42;
  --muted-3:#454540;
  --muted-4:#3e3e38;
  --muted-5:#4d4d45;
  --muted-6:#48483f;
  --muted-7:#434339;
  --muted-blue:#4c5258;
  --green:#05631f;
  --green-60:#05631f;
  --green-dim:#336043;
  --green-mid:#3d6b50;
  --green-line:#bcdcc6;
  --cyan:#095268;
  --red:#b02318;
  --amber:#6d4c00;
  --amber-2:#6f4500;
  --amber-3:#63470c;
  --amber-5:#6b4f00;
  --amber-6:#5e4718;
  --orange:#8a3500;
  --orange-3:#7d420f;
  --purple:#5e3690;
  --tint-green:#e8f4e8;
  --tint-red:#fbebe9;
  --tint-blue:#eaedf8;
  --tint-red-2:#fdf1ef;
  --tint-navy:#eef0f8;
  --on-accent:#ffffff;
  --panel-a:rgba(255,255,255,0.98);
  --panel-b:rgba(255,255,255,0.97);
  --panel-c:rgba(255,255,255,0.96);
  --panel-d:rgba(255,255,255,0.95);
  --panel-warm:rgba(255,250,240,0.96);
  --fill-hi:rgba(0,0,0,0.05);
  --fill-mid:rgba(0,0,0,0.045);
  --fill-lo:rgba(0,0,0,0.035);
  --hairline:rgba(0,0,0,0.25);
  color-scheme:light;
}

/* Inline style="" cannot read variables, so light mode remaps the literals.
   Both spacings are matched because the markup uses each. Matching ";color:"
   or a leading "color:" keeps these off border-color, remapped separately. */
[data-theme="light"] [style*=";color:#00ccff"],
[data-theme="light"] [style^="color:#00ccff"],
[data-theme="light"] [style*=";color: #00ccff"],
[data-theme="light"] [style^="color: #00ccff"]{color:var(--cyan)!important}
[data-theme="light"] [style*="border-color:#00ccff"],[data-theme="light"] [style*="border-color: #00ccff"],[data-theme="light"] [style*="solid #00ccff"]{border-color:var(--cyan)!important}
[data-theme="light"] [style*=";color:#00ff41"],
[data-theme="light"] [style^="color:#00ff41"],
[data-theme="light"] [style*=";color: #00ff41"],
[data-theme="light"] [style^="color: #00ff41"]{color:var(--green)!important}
[data-theme="light"] [style*="border-color:#00ff41"],[data-theme="light"] [style*="border-color: #00ff41"],[data-theme="light"] [style*="solid #00ff41"]{border-color:var(--green)!important}
[data-theme="light"] [style*=";color:#111"],
[data-theme="light"] [style^="color:#111"],
[data-theme="light"] [style*=";color: #111"],
[data-theme="light"] [style^="color: #111"]{color:var(--surface-2)!important}
[data-theme="light"] [style*="border-color:#111"],[data-theme="light"] [style*="border-color: #111"],[data-theme="light"] [style*="solid #111"]{border-color:var(--surface-2)!important}
[data-theme="light"] [style*=";color:#333"],
[data-theme="light"] [style^="color:#333"],
[data-theme="light"] [style*=";color: #333"],
[data-theme="light"] [style^="color: #333"]{color:var(--border)!important}
[data-theme="light"] [style*="border-color:#333"],[data-theme="light"] [style*="border-color: #333"],[data-theme="light"] [style*="solid #333"]{border-color:var(--border)!important}
[data-theme="light"] [style*=";color:#3f5a4c"],
[data-theme="light"] [style^="color:#3f5a4c"],
[data-theme="light"] [style*=";color: #3f5a4c"],
[data-theme="light"] [style^="color: #3f5a4c"]{color:var(--green-mid)!important}
[data-theme="light"] [style*="border-color:#3f5a4c"],[data-theme="light"] [style*="border-color: #3f5a4c"],[data-theme="light"] [style*="solid #3f5a4c"]{border-color:var(--green-mid)!important}
[data-theme="light"] [style*=";color:#555"],
[data-theme="light"] [style^="color:#555"],
[data-theme="light"] [style*=";color: #555"],
[data-theme="light"] [style^="color: #555"]{color:var(--muted-4)!important}
[data-theme="light"] [style*="border-color:#555"],[data-theme="light"] [style*="border-color: #555"],[data-theme="light"] [style*="solid #555"]{border-color:var(--muted-4)!important}
[data-theme="light"] [style*=";color:#5a7a68"],
[data-theme="light"] [style^="color:#5a7a68"],
[data-theme="light"] [style*=";color: #5a7a68"],
[data-theme="light"] [style^="color: #5a7a68"]{color:var(--green-dim)!important}
[data-theme="light"] [style*="border-color:#5a7a68"],[data-theme="light"] [style*="border-color: #5a7a68"],[data-theme="light"] [style*="solid #5a7a68"]{border-color:var(--green-dim)!important}
[data-theme="light"] [style*=";color:#666"],
[data-theme="light"] [style^="color:#666"],
[data-theme="light"] [style*=";color: #666"],
[data-theme="light"] [style^="color: #666"]{color:var(--muted-3)!important}
[data-theme="light"] [style*="border-color:#666"],[data-theme="light"] [style*="border-color: #666"],[data-theme="light"] [style*="solid #666"]{border-color:var(--muted-3)!important}
[data-theme="light"] [style*=";color:#888"],
[data-theme="light"] [style^="color:#888"],
[data-theme="light"] [style*=";color: #888"],
[data-theme="light"] [style^="color: #888"]{color:var(--muted)!important}
[data-theme="light"] [style*="border-color:#888"],[data-theme="light"] [style*="border-color: #888"],[data-theme="light"] [style*="solid #888"]{border-color:var(--muted)!important}
[data-theme="light"] [style*=";color:#8a8a8a"],
[data-theme="light"] [style^="color:#8a8a8a"],
[data-theme="light"] [style*=";color: #8a8a8a"],
[data-theme="light"] [style^="color: #8a8a8a"]{color:var(--muted-5)!important}
[data-theme="light"] [style*="border-color:#8a8a8a"],[data-theme="light"] [style*="border-color: #8a8a8a"],[data-theme="light"] [style*="solid #8a8a8a"]{border-color:var(--muted-5)!important}
[data-theme="light"] [style*=";color:#9aa0a6"],
[data-theme="light"] [style^="color:#9aa0a6"],
[data-theme="light"] [style*=";color: #9aa0a6"],
[data-theme="light"] [style^="color: #9aa0a6"]{color:var(--muted-blue)!important}
[data-theme="light"] [style*="border-color:#9aa0a6"],[data-theme="light"] [style*="border-color: #9aa0a6"],[data-theme="light"] [style*="solid #9aa0a6"]{border-color:var(--muted-blue)!important}
[data-theme="light"] [style*=";color:#aaa"],
[data-theme="light"] [style^="color:#aaa"],
[data-theme="light"] [style*=";color: #aaa"],
[data-theme="light"] [style^="color: #aaa"]{color:var(--text-dim)!important}
[data-theme="light"] [style*="border-color:#aaa"],[data-theme="light"] [style*="border-color: #aaa"],[data-theme="light"] [style*="solid #aaa"]{border-color:var(--text-dim)!important}
[data-theme="light"] [style*=";color:#b0b0b0"],
[data-theme="light"] [style^="color:#b0b0b0"],
[data-theme="light"] [style*=";color: #b0b0b0"],
[data-theme="light"] [style^="color: #b0b0b0"]{color:var(--text-dim)!important}
[data-theme="light"] [style*="border-color:#b0b0b0"],[data-theme="light"] [style*="border-color: #b0b0b0"],[data-theme="light"] [style*="solid #b0b0b0"]{border-color:var(--text-dim)!important}
[data-theme="light"] [style*=";color:#cc88ff"],
[data-theme="light"] [style^="color:#cc88ff"],
[data-theme="light"] [style*=";color: #cc88ff"],
[data-theme="light"] [style^="color: #cc88ff"]{color:var(--purple)!important}
[data-theme="light"] [style*="border-color:#cc88ff"],[data-theme="light"] [style*="border-color: #cc88ff"],[data-theme="light"] [style*="solid #cc88ff"]{border-color:var(--purple)!important}
[data-theme="light"] [style*=";color:#ccc"],
[data-theme="light"] [style^="color:#ccc"],
[data-theme="light"] [style*=";color: #ccc"],
[data-theme="light"] [style^="color: #ccc"]{color:var(--text-soft)!important}
[data-theme="light"] [style*="border-color:#ccc"],[data-theme="light"] [style*="border-color: #ccc"],[data-theme="light"] [style*="solid #ccc"]{border-color:var(--text-soft)!important}
[data-theme="light"] [style*=";color:#ddd"],
[data-theme="light"] [style^="color:#ddd"],
[data-theme="light"] [style*=";color: #ddd"],
[data-theme="light"] [style^="color: #ddd"]{color:var(--text-soft)!important}
[data-theme="light"] [style*="border-color:#ddd"],[data-theme="light"] [style*="border-color: #ddd"],[data-theme="light"] [style*="solid #ddd"]{border-color:var(--text-soft)!important}
[data-theme="light"] [style*=";color:#e6c200"],
[data-theme="light"] [style^="color:#e6c200"],
[data-theme="light"] [style*=";color: #e6c200"],
[data-theme="light"] [style^="color: #e6c200"]{color:var(--amber-2)!important}
[data-theme="light"] [style*="border-color:#e6c200"],[data-theme="light"] [style*="border-color: #e6c200"],[data-theme="light"] [style*="solid #e6c200"]{border-color:var(--amber-2)!important}
[data-theme="light"] [style*=";color:#ff4444"],
[data-theme="light"] [style^="color:#ff4444"],
[data-theme="light"] [style*=";color: #ff4444"],
[data-theme="light"] [style^="color: #ff4444"]{color:var(--red)!important}
[data-theme="light"] [style*="border-color:#ff4444"],[data-theme="light"] [style*="border-color: #ff4444"],[data-theme="light"] [style*="solid #ff4444"]{border-color:var(--red)!important}
[data-theme="light"] [style*=";color:#ff6600"],
[data-theme="light"] [style^="color:#ff6600"],
[data-theme="light"] [style*=";color: #ff6600"],
[data-theme="light"] [style^="color: #ff6600"]{color:var(--orange)!important}
[data-theme="light"] [style*="border-color:#ff6600"],[data-theme="light"] [style*="border-color: #ff6600"],[data-theme="light"] [style*="solid #ff6600"]{border-color:var(--orange)!important}
[data-theme="light"] [style*=";color:#ff6b6b"],
[data-theme="light"] [style^="color:#ff6b6b"],
[data-theme="light"] [style*=";color: #ff6b6b"],
[data-theme="light"] [style^="color: #ff6b6b"]{color:var(--red)!important}
[data-theme="light"] [style*="border-color:#ff6b6b"],[data-theme="light"] [style*="border-color: #ff6b6b"],[data-theme="light"] [style*="solid #ff6b6b"]{border-color:var(--red)!important}
[data-theme="light"] [style*=";color:#ff9100"],
[data-theme="light"] [style^="color:#ff9100"],
[data-theme="light"] [style*=";color: #ff9100"],
[data-theme="light"] [style^="color: #ff9100"]{color:var(--orange-3)!important}
[data-theme="light"] [style*="border-color:#ff9100"],[data-theme="light"] [style*="border-color: #ff9100"],[data-theme="light"] [style*="solid #ff9100"]{border-color:var(--orange-3)!important}
[data-theme="light"] [style*=";color:#ffcc00"],
[data-theme="light"] [style^="color:#ffcc00"],
[data-theme="light"] [style*=";color: #ffcc00"],
[data-theme="light"] [style^="color: #ffcc00"]{color:var(--amber)!important}
[data-theme="light"] [style*="border-color:#ffcc00"],[data-theme="light"] [style*="border-color: #ffcc00"],[data-theme="light"] [style*="solid #ffcc00"]{border-color:var(--amber)!important}
[data-theme="light"] [style*=";color:#ffcc66"],
[data-theme="light"] [style^="color:#ffcc66"],
[data-theme="light"] [style*=";color: #ffcc66"],
[data-theme="light"] [style^="color: #ffcc66"]{color:var(--amber-3)!important}
[data-theme="light"] [style*="border-color:#ffcc66"],[data-theme="light"] [style*="border-color: #ffcc66"],[data-theme="light"] [style*="solid #ffcc66"]{border-color:var(--amber-3)!important}
[data-theme="light"] [style*=";color:#ffffff"],
[data-theme="light"] [style^="color:#ffffff"],
[data-theme="light"] [style*=";color: #ffffff"],
[data-theme="light"] [style^="color: #ffffff"]{color:var(--text-hi)!important}
[data-theme="light"] [style*="border-color:#ffffff"],[data-theme="light"] [style*="border-color: #ffffff"],[data-theme="light"] [style*="solid #ffffff"]{border-color:var(--text-hi)!important}
[data-theme="light"] [style*="color: rgb(0, 204, 255)"]{color:var(--cyan)!important}
[data-theme="light"] [style*="color: rgb(0, 255, 65)"]{color:var(--green)!important}
[data-theme="light"] [style*="color: rgb(136, 136, 136)"]{color:var(--muted)!important}
[data-theme="light"] [style*="color: rgb(255, 204, 0)"]{color:var(--amber)!important}
[data-theme="light"] [style*="color: rgb(255, 68, 68)"]{color:var(--red)!important}

/* Inline SVG figures carry their own hardcoded dark-scheme fills, so they stay
   dark in light mode and are excluded here - recolouring only the backdrop would
   make their labels unreadable. They read as dark plates on a light page. */
[data-theme="light"] :not(svg):not(svg *)[style*="background:#000"],[data-theme="light"] :not(svg):not(svg *)[style*="background: #000"]{background:#ffffff!important}
[data-theme="light"] :not(svg):not(svg *)[style*="background:#0a0a0a"],[data-theme="light"] :not(svg):not(svg *)[style*="background: #0a0a0a"]{background:#f5f4f0!important}
[data-theme="light"] :not(svg):not(svg *)[style*="background:#0a140c"],[data-theme="light"] :not(svg):not(svg *)[style*="background: #0a140c"]{background:#eef7ef!important}
[data-theme="light"] :not(svg):not(svg *)[style*="background:#0d0d0d"],[data-theme="light"] :not(svg):not(svg *)[style*="background: #0d0d0d"]{background:#ffffff!important}
[data-theme="light"] :not(svg):not(svg *)[style*="background:#111"],[data-theme="light"] :not(svg):not(svg *)[style*="background: #111"]{background:#f0efe9!important}
[data-theme="light"] :not(svg):not(svg *)[style*="background:#12100a"],[data-theme="light"] :not(svg):not(svg *)[style*="background: #12100a"]{background:#fbf5e8!important}
[data-theme="light"] :not(svg):not(svg *)[style*="background:#161009"],[data-theme="light"] :not(svg):not(svg *)[style*="background: #161009"]{background:#fdf6e6!important}
[data-theme="light"] :not(svg):not(svg *)[style*="background:#1a0a0a"],[data-theme="light"] :not(svg):not(svg *)[style*="background: #1a0a0a"]{background:#fdf1ef!important}

/* toggle control */
.b0b-theme-btn{background:transparent;border:1px solid var(--border);color:var(--muted);
  font-family:inherit;font-size:0.65rem;padding:0.25rem 0.5rem;cursor:pointer;letter-spacing:0.5px;
  display:inline-block;text-decoration:none;border-radius:2px;line-height:1.4}
.b0b-theme-btn:hover{border-color:var(--green);color:var(--green)}
[data-theme="light"] .leaflet-container{background:#e8e6df}
[data-theme="light"] .goes-live,[data-theme="light"] [style*="rgba(0,255,65,0.6)"]{color:var(--green)!important}
