/* Fonts: self-hosted, OFL-licensed (see fonts/OFL.txt). Never a CDN. */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-vf.87c506d88b9f.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.79936b18df9f.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-600.5a2ce7798732.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* Theme tokens — same names and values as the Slice 0 mocks.
   Default: "Daylight terminal". [data-theme="dusk"]: "Dusk neon".
   With no explicit data-theme, the OS dark preference selects Dusk. */
:root {
  color-scheme: light;
  --screen: #e7ded0;
  --card: #f4efe4;
  --ink: #231e16;
  --muted: #6b6152;
  --faint: #8a7d66;
  --green: #5a7a52;
  --terra: #c06a44;
  --border: #cbbfa8;
  --dash: #c3b79f;
  --warnbg: #f6e9d9;
  --warnink: #6e4a30;
  --warnstrong: #6e4a30;
  --warnborder: transparent;
  --btnink: #f4f0e6;
  --terraink: #ffffff;
  --statusink: #4a4235;
  --bezel: #12100c;
  --glowg: 0 0 0 transparent;
  --glowt: 0 0 0 transparent;
  --track: #c3b79f;
  --field: #f4efe4;
  --danger: #b23b2e;
  --dangerbd: #b23b2e;
  --tgg: none;
  --scan: none;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* KEEP IN SYNC with the prefers-color-scheme block below */
[data-theme="dusk"] {
  color-scheme: dark;
  --screen: #161310;
  --card: #0f0d0a;
  --ink: #f4ecdb;
  --muted: #9a8d76;
  --faint: #8a7d66;
  --green: #7ee08a;
  --terra: #ff9a5c;
  --border: #33291f;
  --dash: #33291f;
  --warnbg: #2a1c12;
  --warnink: #f0c19a;
  --warnstrong: #ff9a5c;
  --warnborder: #ff9a5c40;
  --btnink: #0f1a10;
  --terraink: #1a1712;
  --statusink: #a89a82;
  --bezel: #050403;
  --glowg: 0 0 22px rgba(126, 224, 138, 0.35);
  --glowt: 0 0 22px rgba(255, 154, 92, 0.35);
  --track: #33291f;
  --field: #0f0d0a;
  --danger: #ff7a5c;
  --dangerbd: #ff7a5c;
  --tgg: 0 0 12px rgba(126, 224, 138, 0.45);
  --scan: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
}

/* KEEP IN SYNC with the [data-theme="dusk"] block above */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="daylight"]) {
    color-scheme: dark;
    --screen: #161310;
    --card: #0f0d0a;
    --ink: #f4ecdb;
    --muted: #9a8d76;
    --faint: #8a7d66;
    --green: #7ee08a;
    --terra: #ff9a5c;
    --border: #33291f;
    --dash: #33291f;
    --warnbg: #2a1c12;
    --warnink: #f0c19a;
    --warnstrong: #ff9a5c;
    --warnborder: #ff9a5c40;
    --btnink: #0f1a10;
    --terraink: #1a1712;
    --statusink: #a89a82;
    --bezel: #050403;
    --glowg: 0 0 22px rgba(126, 224, 138, 0.35);
    --glowt: 0 0 22px rgba(255, 154, 92, 0.35);
    --track: #33291f;
    --field: #0f0d0a;
    --danger: #ff7a5c;
    --dangerbd: #ff7a5c;
    --tgg: 0 0 12px rgba(126, 224, 138, 0.45);
    --scan: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--screen);
  color: var(--ink);
  font-family: var(--font-body);
}

/* Visually-hidden utility: rendered for screen readers, removed from the
   visual page. Shared by every template — never redefine it in a per-page
   <style> block. */
.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;
}
