/* =============================================================
   Echo Check+ tokens: colour, type, space, motion.
   Colour trio from the room: ceiling tile, slate board, pencil.
   Contract names (--c-*) come from DESIGN.md section 3. The tool's
   older names (--bg, --fg ...) are re-pointed below, so markup
   built by app.js keeps working. Nothing here loads from another site.
   ============================================================= */

/* Archivo, variable (weight 100-900, width 62-125 %). SIL Open Font License 1.1: see fonts/OFL.txt */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/Archivo-100_900.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;

  /* ---------- colour roles (light) ---------- */
  --c-ground: #F4F6F1;        /* acoustic ceiling tile: page ground */
  --c-ink: #0E211F;           /* slate, darkest: text */
  --c-base: #112F2C;          /* slate board: hero, filled buttons. Same in both schemes */
  --c-on-base: #F4F6F1;       /* text on the slate board. Same in both schemes */
  --c-accent: #F48067;        /* pencil yellow: the sound front and one highlight per view. Never text on light ground */
  --c-on-accent: #0E211F;     /* text on a pencil-yellow fill */
  --c-muted: #55635F;         /* secondary text */
  --c-line: #D5DBD3;          /* hairlines */
  --c-line-strong: #7a828c;   /* field and button outlines (3:1 on ground) */
  --c-card: #FBFCF9;          /* raised surface: fields, the report sentence */
  --c-board-muted: #c5c9cc;   /* secondary text on the slate board */
  --c-base-hover: #1B4440;    /* filled button, hover and focus */
  --c-base-press: #0A1F1D;    /* filled button, pressed */
  --c-bar: #112F2C;
  --c-chalk: #FBE6A0;          /* chalk yellow: drawn marks on dark surfaces */           /* echo-time bar fill */

  /* ---------- the tool's names, re-pointed ---------- */
  --bg: var(--c-ground);
  --fg: var(--c-ink);
  --muted: var(--c-muted);
  --line: var(--c-line);
  --line-strong: var(--c-line-strong);
  --card: var(--c-card);
  --accent: var(--c-base);
  --on-accent: var(--c-on-base);
  --accent-hover: var(--c-base-hover);
  --accent-press: var(--c-base-press);
  --focus: var(--c-ink);
  --bar-fill: var(--c-bar);

  /* Verdict colours stay semantic (values unchanged from the audited tool) */
  --ok: #137333;   --ok-bg: #e6f4ea;
  --warn: #8a4b00; --warn-bg: #fef7e0;
  --bad: #b3261e;  --bad-bg: #fce8e6;

  /* ---------- type: one family, fixed rem scale (ratio 1.2) ---------- */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-small: 0.875rem;
  --fs-1: 1rem;
  --fs-2: 1.2rem;
  --fs-3: 1.44rem;
  --fs-4: 1.728rem;
  --fs-5: 2.074rem;
  --fs-6: 2.488rem;
  --fs-display: clamp(2.6rem, 7.2vw, 6.5rem); /* the stage's display line only */
  --fs-body: 1.0625rem;                       /* running text in the tool */
  --fs-lead: 1.35rem;                         /* the lead paragraph of a view */
  --fs-h2: clamp(1.9rem, 3.4vw, 2.9rem);      /* section headings */
  --measure: 62ch;                            /* longest line of running text */
  --space-sec: clamp(48px, 8vw, 104px);       /* space above and below a section */

  /* ---------- space, shape ---------- */
  --space-xs: 8px;
  --space-s: 16px;
  --space-m: 24px;
  --space-l: 40px;
  --space-xl: 64px;
  --radius: 8px;

  /* ---------- motion: ease-out only, never linear ---------- */
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --dur-ui: 0.25s;
  --dur-reveal: 0.6s;
}

/* Dark scheme: derived, not inverted. Screen only, so a printed result always uses the light values. */
@media screen and (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --c-ground: #0C1A18;
    --c-ink: #EEF2EC;
    --c-muted: #A3B0AA;
    --c-line: #25403B;
    --c-line-strong: #6f7e8e;
    --c-card: #132623;
    --c-base: #FBE6A0;
    --c-on-base: #0E211F;
    --c-base-hover: #FFF0BF;
    --c-base-press: #F0D77E;
    --c-board-muted: #55635F;   /* secondary text on the chalk-yellow recording screen (5.0:1) */
    --c-bar: #9db3cb;

    --accent: var(--c-base);
    --on-accent: var(--c-on-base);
    --accent-hover: var(--c-base-hover);
    --accent-press: var(--c-base-press);
    --focus: var(--c-ink);

    --ok: #81c995;   --ok-bg: #16301f;
    --warn: #fdd663; --warn-bg: #3a3012;
    --bad: #f28b82;  --bad-bg: #3c1a18;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-ui: 0.01s; --dur-reveal: 0.01s; }
}
