/*
  PrepRedact design tokens, version 1.0.0 (2026-11-17).
  The one source of color, type, space, shape, depth and motion for the site, the portal and the deck.
  Docs: docs/design-system/README.md. Contrast is checked by docs/design-system/tools/contrast.mjs.
  Change a value only through the process in docs/design-system/governance.md.

  Import it before any other stylesheet:
    <link rel="stylesheet" href="tokens.css">
  and serve the fonts/ folder beside it (the @font-face rules below use relative paths).

  Naming: --pr-<group>-<role>. Components use the semantic names (ground, surface, ink, action...),
  never the raw palette, so dark mode only has to remap the semantic layer.
*/

@font-face {
  font-family: "Overpass";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/overpass-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Overpass";
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/overpass-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;

  /* ---- Palette (raw values; components do not use these directly) ---- */
  --pr-palette-sound-900: #0a3f2e;   /* pressed sign green */
  --pr-palette-sound-800: #0d4f3a;   /* sign green: the brand field */
  --pr-palette-sound-700: #145c44;   /* sign green on dark ground */
  --pr-palette-sound-300: #6fcfa5;   /* action on dark ground */
  --pr-palette-sound-100: #dcebe4;   /* selected row, success wash */
  --pr-palette-stone-950: #0f1714;
  --pr-palette-stone-900: #13201b;
  --pr-palette-stone-850: #16211c;
  --pr-palette-stone-700: #46544e;
  --pr-palette-stone-500: #6b7a73;
  --pr-palette-stone-300: #c9d2cd;
  --pr-palette-stone-150: #e8ecea;
  --pr-palette-stone-100: #f3f5f4;
  --pr-palette-white: #ffffff;
  --pr-palette-amber-500: #f2b21b;   /* warning-sign yellow: waiting fill accents on dark grounds */
  --pr-palette-amber-700: #9a6400;   /* waiting outline on light grounds (3:1 on white) */
  --pr-palette-amber-100: #fff4d6;
  --pr-palette-amber-900: #5a4100;
  --pr-palette-blackout: #141414;    /* the redaction bar */
  --pr-palette-signal-700: #a32a1c;  /* errors */
  --pr-palette-signal-100: #fbe9e6;
  --pr-palette-service-600: #1a5fb4; /* focus ring: the blue of service signs */

  /* ---- Semantic color, light ---- */
  --pr-color-ground: var(--pr-palette-stone-100);        /* page background */
  --pr-color-surface: var(--pr-palette-white);           /* cards, document pages, inputs */
  --pr-color-sunk: var(--pr-palette-stone-150);          /* wells: file drop, code, table stripes */
  --pr-color-ink: var(--pr-palette-stone-900);           /* body text */
  --pr-color-ink-muted: var(--pr-palette-stone-700);     /* secondary text, still 4.5:1 or better */
  --pr-color-line: var(--pr-palette-stone-300);          /* dividers, decorative borders */
  --pr-color-line-strong: var(--pr-palette-stone-500);   /* input and control borders, 3:1 or better */
  --pr-color-panel: var(--pr-palette-sound-800);         /* sign panels: hero, price plate, plate headers */
  --pr-color-panel-ink: var(--pr-palette-white);
  --pr-color-panel-ink-muted: #d3e6dd;                   /* secondary text on a panel */
  --pr-color-panel-hover: var(--pr-palette-sound-100);   /* white button on a panel, hover (same in both themes) */
  --pr-color-route: var(--pr-palette-sound-800);         /* route rails and stop plates on the page ground */
  --pr-color-route-ink: var(--pr-palette-white);         /* stop numbers */
  --pr-color-action: var(--pr-palette-sound-800);        /* primary button fill */
  --pr-color-action-hover: var(--pr-palette-sound-900);
  --pr-color-action-ink: var(--pr-palette-white);
  --pr-color-action-soft: var(--pr-palette-sound-100);   /* selected, success wash */
  --pr-color-link: var(--pr-palette-sound-800);
  --pr-color-waiting: var(--pr-palette-amber-700);       /* dashed outline of a suggestion not yet decided */
  --pr-color-waiting-soft: var(--pr-palette-amber-100);
  --pr-color-waiting-ink: var(--pr-palette-amber-900);   /* text on waiting-soft */
  --pr-color-redact: var(--pr-palette-blackout);         /* accepted redaction bar */
  --pr-color-redact-ink: var(--pr-palette-white);        /* exemption code printed on the bar */
  --pr-color-redact-edge: var(--pr-palette-blackout);    /* outline that keeps the bar visible on dark grounds */
  --pr-color-danger: var(--pr-palette-signal-700);
  --pr-color-danger-soft: var(--pr-palette-signal-100);
  --pr-color-focus: var(--pr-palette-service-600);
  --pr-color-selection: #cfe3d9;

  /* ---- Type ---- */
  --pr-font: "Overpass", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --pr-weight-body: 400;
  --pr-weight-ui: 600;       /* labels, buttons, nav */
  --pr-weight-sign: 800;     /* headings and sign lettering */
  --pr-text-xs: 0.8125rem;   /* 13px: badges and captions only */
  --pr-text-sm: 0.9375rem;   /* 15px: secondary text, table cells */
  --pr-text-md: 1.0625rem;   /* 17px: body */
  --pr-text-lg: 1.25rem;     /* 20px: lede */
  --pr-text-h3: 1.375rem;    /* 22px: h3, 1.29x body */
  --pr-text-xl: 1.5625rem;   /* 25px: h2 in the portal, plate titles */
  --pr-text-2xl: clamp(1.75rem, 1.35rem + 1.5vw, 2.25rem);  /* 28 to 36px: section headings */
  --pr-text-3xl: clamp(2.125rem, 1.4rem + 3vw, 3.5rem);     /* 34 to 56px: a short sign message */
  --pr-text-hero: clamp(2rem, 1.25rem + 2.6vw, 3rem);       /* 32 to 48px: a full-sentence hero sign beside a sample */
  --pr-text-price: clamp(3.5rem, 2.4rem + 4.5vw, 6rem);     /* the posted rate */
  --pr-leading-body: 1.55;
  --pr-leading-tight: 1.1;
  --pr-leading-snug: 1.3;
  --pr-measure: 58ch;         /* about 75 characters of Overpass at body size */

  /* ---- Space (4px base) ---- */
  --pr-space-1: 0.25rem;  /* 4 */
  --pr-space-2: 0.5rem;   /* 8 */
  --pr-space-3: 0.75rem;  /* 12 */
  --pr-space-4: 1rem;     /* 16 */
  --pr-space-5: 1.5rem;   /* 24 */
  --pr-space-6: 2rem;     /* 32 */
  --pr-space-7: 3rem;     /* 48 */
  --pr-space-8: 4rem;     /* 64 */
  --pr-space-9: 6rem;     /* 96 */

  /* ---- Layout ---- */
  --pr-content-max: 70rem;     /* 1120px */
  --pr-gutter: clamp(1rem, 0.6rem + 1.8vw, 2rem);  /* 16px phone to 32px desktop */
  --pr-target-min: 2.75rem;    /* 44px: every control a finger presses */
  --pr-target-floor: 1.5rem;   /* 24px: WCAG 2.5.8, inline links and dense tables only */

  /* ---- Shape ---- */
  --pr-radius-sign: 1.125rem;  /* 18px outer corner of a sign panel */
  --pr-radius-keyline: 0.75rem;/* 12px inner keyline of a sign panel */
  --pr-radius-plate: 0.625rem; /* 10px suggestion plates, alerts */
  --pr-radius-control: 0.5rem; /* 8px buttons, inputs */
  --pr-radius-page: 0.25rem;   /* 4px a document page */
  --pr-radius-mark: 0.125rem;  /* 2px a redaction bar */
  --pr-keyline: 3px;           /* the white rule inset in a sign panel */
  --pr-border: 1px;
  --pr-border-control: 2px;

  /* ---- Elevation: signs are flat; only paper lifts ---- */
  --pr-shadow-page: 0 1px 2px rgb(19 32 27 / 0.06), 0 10px 24px rgb(19 32 27 / 0.08);
  --pr-shadow-overlay: 0 4px 8px rgb(19 32 27 / 0.08), 0 24px 48px rgb(19 32 27 / 0.16);

  /* ---- Motion ---- */
  --pr-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pr-dur-press: 120ms;
  --pr-dur-state: 200ms;
  --pr-dur-blackout: 320ms;   /* the bar sweeping across an accepted redaction */

  /* ---- Focus ---- */
  --pr-focus-ring: 0 0 0 2px var(--pr-color-surface), 0 0 0 5px var(--pr-color-focus);
}

/* ---- Semantic color, dark ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pr-color-ground: var(--pr-palette-stone-950);
    --pr-color-surface: var(--pr-palette-stone-850);
    --pr-color-sunk: #0b120f;
    --pr-color-ink: #e6ece9;
    --pr-color-ink-muted: #a8b5af;
    --pr-color-line: #2c3a33;
    --pr-color-line-strong: #74857c;
    --pr-color-panel: var(--pr-palette-sound-700);
    --pr-color-panel-ink: var(--pr-palette-white);
    --pr-color-panel-ink-muted: #cfe5da;
    --pr-color-route: #3e9b77;
    --pr-color-route-ink: #062a1c;
    --pr-color-action: var(--pr-palette-sound-300);
    --pr-color-action-hover: #8fe0bb;
    --pr-color-action-ink: #062a1c;
    --pr-color-action-soft: #183a2c;
    --pr-color-link: #7fd9b0;
    --pr-color-waiting: var(--pr-palette-amber-500);
    --pr-color-waiting-soft: #3a2e0c;
    --pr-color-waiting-ink: #ffd76a;
    --pr-color-redact: #000000;
    --pr-color-redact-ink: #ffffff;
    --pr-color-redact-edge: #5b6862;
    --pr-color-danger: #ff9c8c;
    --pr-color-danger-soft: #3b1712;
    --pr-color-focus: #7fb2ff;
    --pr-color-selection: #24493a;
    --pr-shadow-page: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 24px rgb(0 0 0 / 0.35);
    --pr-shadow-overlay: 0 4px 8px rgb(0 0 0 / 0.3), 0 24px 48px rgb(0 0 0 / 0.5);
  }
}
:root[data-theme="dark"] {
  --pr-color-ground: var(--pr-palette-stone-950);
  --pr-color-surface: var(--pr-palette-stone-850);
  --pr-color-sunk: #0b120f;
  --pr-color-ink: #e6ece9;
  --pr-color-ink-muted: #a8b5af;
  --pr-color-line: #2c3a33;
  --pr-color-line-strong: #74857c;
  --pr-color-panel: var(--pr-palette-sound-700);
  --pr-color-panel-ink: var(--pr-palette-white);
  --pr-color-panel-ink-muted: #cfe5da;
  --pr-color-route: #3e9b77;
  --pr-color-route-ink: #062a1c;
  --pr-color-action: var(--pr-palette-sound-300);
  --pr-color-action-hover: #8fe0bb;
  --pr-color-action-ink: #062a1c;
  --pr-color-action-soft: #183a2c;
  --pr-color-link: #7fd9b0;
  --pr-color-waiting: var(--pr-palette-amber-500);
  --pr-color-waiting-soft: #3a2e0c;
  --pr-color-waiting-ink: #ffd76a;
  --pr-color-redact: #000000;
  --pr-color-redact-ink: #ffffff;
  --pr-color-redact-edge: #5b6862;
  --pr-color-danger: #ff9c8c;
  --pr-color-danger-soft: #3b1712;
  --pr-color-focus: #7fb2ff;
  --pr-color-selection: #24493a;
  --pr-shadow-page: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 24px rgb(0 0 0 / 0.35);
  --pr-shadow-overlay: 0 4px 8px rgb(0 0 0 / 0.3), 0 24px 48px rgb(0 0 0 / 0.5);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --pr-dur-press: 0ms;
    --pr-dur-state: 0ms;
    --pr-dur-blackout: 0ms;
  }
}
