/* Shared "Public Record" tokens for the console and the candidate pages.
   One naming scheme, light and dark. Brand values match accrivon.com's
   global.css; /brand.css may override the light palette (BRAND_* settings,
   contrast-checked on the server). Measured contrast: docs/DESIGN-NOTES.md. */

@font-face {
  font-family: "Redaction";
  src: url("../fonts/redaction-400.v1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-var.v1.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Local faces resized to the web fonts' measured metrics, so the swap
   doesn't move the layout. */
@font-face {
  font-family: "Redaction Fallback";
  src: local("Times New Roman"), local("Times"), local("Liberation Serif");
  size-adjust: 106.9%;
  ascent-override: 84.2%;
  descent-override: 28.1%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Public Sans Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 104.3%;
  ascent-override: 91.1%;
  descent-override: 22.1%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  /* surfaces */
  --bg: oklch(96.1% 0.008 91.5);          /* brand paper */
  --surface: oklch(98.5% 0.005 95.1);     /* brand porcelain */
  --panel: oklch(91.6% 0.015 90.2);       /* brand panel: second neutral layer */
  --bar: oklch(18.9% 0.009 75.1);
  --on-bar: oklch(96.1% 0.008 91.5);
  --on-bar-muted: oklch(80% 0.06 40);
  --on-bar-quiet: oklch(76% 0.012 80);   /* group labels on the bar: quiet, not link-coloured */
  --bar-hover: oklch(96.1% 0.008 91.5 / 0.12);
  /* text */
  --text: oklch(18.9% 0.009 75.1);        /* brand ink */
  --text-2: oklch(35.1% 0.014 76.4);
  --muted: oklch(44.7% 0.024 77.1);
  /* lines */
  --rule: oklch(87% 0.018 89.4);
  --rule-strong: oklch(18.9% 0.009 75.1);
  --control: oklch(58% 0.02 80);
  /* accent, actions, states */
  --accent: oklch(40.4% 0.115 29.9);      /* oxblood */
  --on-accent: oklch(98.5% 0.005 95.1);
  --btn: oklch(18.9% 0.009 75.1);
  --on-btn: oklch(96.1% 0.008 91.5);
  --btn-hover: oklch(40.4% 0.115 29.9);
  --on-btn-hover: oklch(98.5% 0.005 95.1);
  --ok: oklch(38.8% 0.048 131.9);   --ok-bg: oklch(93% 0.03 131);
  --warn: oklch(45% 0.09 75);       --warn-bg: oklch(94% 0.04 85);
  --err: oklch(42% 0.13 29);        --err-bg: oklch(93% 0.03 30);
  --on-err: var(--bg);              /* text on a filled --err surface */
  --info: oklch(35.1% 0.014 76.4);  --info-bg: oklch(91.6% 0.015 90.2);
  --focus: oklch(40.4% 0.115 29.9);
  --focus-on-bar: oklch(96.1% 0.008 91.5);
  --hover-tint: oklch(18.9% 0.009 75.1 / 0.06);

  --radius: 2px;
  --serif: "Redaction", "Redaction Fallback", Georgia, serif;
  --sans: "Public Sans", "Public Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --target: 2.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint */
}

/* Candidate pages are pinned to the light paper of accrivon.com (class "light-only"). */
@media (prefers-color-scheme: dark) {
  :root:not(.light-only) {
    color-scheme: dark;
    --bg: oklch(17% 0.008 75);
    --surface: oklch(20.5% 0.009 75);
    --panel: oklch(24% 0.01 75);
    --bar: oklch(13% 0.008 75);
    --on-bar: oklch(93% 0.008 91.5);
    --text: oklch(93% 0.008 91.5);
    --text-2: oklch(84% 0.01 85);
    --muted: oklch(72% 0.015 80);
    --rule: oklch(32% 0.01 75);
    --rule-strong: oklch(72% 0.015 80);
    --control: oklch(55% 0.012 80);
    --accent: oklch(74% 0.11 33);           /* brand coral: accent on dark */
    --on-accent: oklch(17% 0.008 75);
    --btn: oklch(93% 0.008 91.5);
    --on-btn: oklch(17% 0.008 75);
    --btn-hover: oklch(74% 0.11 33);
    --on-btn-hover: oklch(17% 0.008 75);
    --ok: oklch(80% 0.08 132);   --ok-bg: oklch(27% 0.035 132);
    --warn: oklch(84% 0.1 85);   --warn-bg: oklch(28% 0.04 80);
    --err: oklch(78% 0.12 30);   --err-bg: oklch(27% 0.05 30);
    --on-err: var(--bg);
    --info: oklch(84% 0.01 85);  --info-bg: oklch(24% 0.01 75);
    --focus: oklch(74% 0.11 33);
    --hover-tint: oklch(93% 0.008 91.5 / 0.07);
  }
}
