/*
 * Pressroom design tokens -- "Quiet Instrument".
 *
 * Full spec: docs/design/design-system.md. Every hex literal below is one of
 * the spec's 21 values (11 light + 10 more for dark; --focus is shared) --
 * DesignTokenTest audits that literally, so a color a later screen needs
 * belongs in the spec first, this file second.
 *
 * Fonts are IBM Plex Sans (UI/headings) and IBM Plex Mono (data), self-hosted
 * via the org.webjars.npm:ibm__plex-sans / ibm__plex-mono dependencies in
 * app/pom.xml -- see the comment there for why that coordinate and not the
 * unscoped org.webjars.npm:ibm-plex (which does not exist). The url()s below
 * are relative to this file's own location (pressroom-ui/styles/) rather than
 * absolute, so they resolve under whatever context path the app is deployed
 * at -- the same webjars resource tree that head.jsp's <c:url> tags reach,
 * just addressed relatively instead of through that JSP helper. Only the
 * weights the spec actually uses are declared -- Sans 450 (body) and 600
 * (headings/labels), Mono 400 (data) -- the webjar ships far more (100-700,
 * italics, per-script subsets) that nothing here needs. WebjarReferenceTest
 * verifies these url()s resolve on the classpath the same way it verifies
 * JSP references.
 */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 450;
  src: url("../../webjars/ibm__plex-sans/1.1.0/fonts/complete/woff2/IBMPlexSans-Text.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  src: url("../../webjars/ibm__plex-sans/1.1.0/fonts/complete/woff2/IBMPlexSans-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  src: url("../../webjars/ibm__plex-mono/2.5.0/fonts/complete/woff2/IBMPlexMono-Regular.woff2") format("woff2");
}

:root {
  /* Quiet Instrument -- light palette (default) */
  --paper: #F7F9F9;
  --surface: #FFFFFF;
  --ink: #17262A;
  --ink-soft: #5A6E72;
  --line: #DCE4E4;
  --accent: #0F6E68;
  --accent-quiet: #E3F0EE;
  --good: #2F7D4F;
  --warn: #9A6A1F;
  --bad: #A33B2E;
  --focus: #2AA198;

  --radius: 6px;

  --font-ui: "IBM Plex Sans", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Quiet Instrument -- dark palette */
    --paper: #131C1C;
    --surface: #1A2626;
    --ink: #DCE7E5;
    --ink-soft: #8FA5A2;
    --line: #2A3838;
    --accent: #4FB3AA;
    --accent-quiet: #1E3230;
    --good: #6FBF8F;
    --warn: #D0A45C;
    --bad: #D0705F;
    --focus: #2AA198;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
}

/* Dark-mode <select> caret. Bootstrap re-strokes its stock chevron per
   color-scheme (dark grey by default, a light grey under its own
   data-bs-theme="dark" attribute) via the --bs-form-select-bg-img custom
   property; pressroom.css can't do the equivalent itself and stay hex-free
   (`url()` doesn't resolve CSS custom properties, so a var(--ink) reference
   inside the SVG string is just literal text, not a color) -- this file
   already carries the dark palette's hex by design (DesignTokenTest audits
   it against the spec), so the literal belongs here instead. Re-stroked to
   this file's dark --ink value so the caret reads at the same weight as
   dark-mode body text, same idea as Bootstrap's own light-grey caret. A
   second, sibling `dark)` media block (selector .form-select, not :root) on
   purpose -- keeps this out of DesignTokenTest's :root-anchored dark-block
   regex and its light/dark
   token-name parity check, neither of which apply to a non-color
   custom property. */
@media (prefers-color-scheme: dark) {
  /* The navbar hamburger: Bootstrap's icon is a dark-stroked SVG, invisible
     on the dark top bar. Same reasoning and the same dark --ink stroke as the
     select caret below. */
  .navbar {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23DCE7E5' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }
  .form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23DCE7E5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  }
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
