/* Drainscope console tokens. Token names are the contract for both apps. */

@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/jetbrains-mono-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }

/* Light: default and explicit. */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F4F1;
  --panel: #FFFFFF;
  --line: #D5D9D4;
  --fg: #0B0D0C;
  --muted: #4F5A54;
  --dim: #8B958F;
  --acc: #FFD60A;
  --acc-ink: #111111;
  --focus: #0B0D0C;
  --ok: #0B7A3B;
  --v-compromised: #C2271B;
  --v-suspicious: #B83B00;
  --v-at-risk: #A04A00;
  --v-clean: #0B7A3B;
  --v-none: #4F5A54;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Dark: explicit. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0D0C;
  --panel: #111513;
  --line: #232B27;
  --fg: #E6EEE9;
  --muted: #8A978F;
  --dim: #56635C;
  --acc: #FFE14D;
  --acc-ink: #111111;
  --focus: #FFE14D;
  --ok: #3DF58A;
  --v-compromised: #FF5A4E;
  --v-suspicious: #FF6F3A;
  --v-at-risk: #FF9A3D;
  --v-clean: #3DF58A;
  --v-none: #8A978F;
}

/* Dark: system preference when no explicit choice. Keep in sync with the block above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0B0D0C;
    --panel: #111513;
    --line: #232B27;
    --fg: #E6EEE9;
    --muted: #8A978F;
    --dim: #56635C;
    --acc: #FFE14D;
    --acc-ink: #111111;
    --focus: #FFE14D;
    --ok: #3DF58A;
    --v-compromised: #FF5A4E;
    --v-suspicious: #FF6F3A;
    --v-at-risk: #FF9A3D;
    --v-clean: #3DF58A;
    --v-none: #8A978F;
  }
}

/* Components set display (for example .ds-toggle is inline-flex); the hidden attribute must still win. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
}

@media (min-width: 640px) {
  body { font-size: 17px; }
}

a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
a:hover { background: var(--acc); color: var(--acc-ink); text-decoration-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--acc); color: var(--acc-ink); }

/* Page gutter shared by the landing and the app (see .ds-page). */
:root { --gutter: 16px; }
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 900px) { :root { --gutter: 40px; } }
