/*
 * OSANTISMETER design tokens — research demo v3 (original values).
 * Derived from measured roles and ratios of the reference product, not copied values.
 * Every component reads these custom properties; a theme overrides only this file's :root block.
 */
/* Lato (SIL OFL 1.1, fonts/LICENSE-Lato.txt) is the face of the slides measured on the reference product. */
@font-face { font-family: "Lato"; font-weight: 400; src: url("/static/fonts/Lato-Regular.ttf") format("truetype"); font-display: block; }
@font-face { font-family: "Lato"; font-weight: 500; src: url("/static/fonts/Lato-Medium.ttf") format("truetype"); font-display: block; }
@font-face { font-family: "Lato"; font-weight: 600; src: url("/static/fonts/Lato-Semibold.ttf") format("truetype"); font-display: block; }
@font-face { font-family: "Lato"; font-weight: 700; src: url("/static/fonts/Lato-Bold.ttf") format("truetype"); font-display: block; }

:root {
  /* Type families: one OFL family, two weights only (400 and 600). */
  --font-text: "Lato", "Segoe UI", system-ui, sans-serif;
  --font-display: var(--font-text);
  --weight-regular: 400;
  --weight-strong: 600;

  /* UI type scale (CSS px). */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 28px;
  --text-4xl: 32px;
  --text-5xl: 40px;
  --text-6xl: 48px;
  --leading-text: 1.4;
  --leading-tight: 1.2;

  /* Slide (projection) scale, in container-width units of the 16:9 canvas. */
  --slide-title: 3cqw;          /* default question title; auto-fit range below */
  --slide-title-min: 2.1cqw;
  --slide-title-max: 3.6cqw;
  --slide-heading: 5.4cqw;      /* heading / content slide, weight 600 */
  --slide-body: 2.25cqw;
  --slide-option: 2.5cqw;
  --slide-value: 3cqw;          /* numbers next to bars, weight 600 */
  --slide-card: 1.75cqw;        /* open-text cards */
  --slide-chrome: 1.25cqw;      /* join instructions bar */
  --slide-meta: 1cqw;           /* counters, small labels (min 14px) */
  --cloud-min: 1.6cqw;
  --cloud-max: 8cqw;
  --slide-pad-x: 4.6cqw;
  --slide-pad-top: 6.4cqw;

  /* Neutrals: warm greys around a pure white canvas. */
  --n-0: #ffffff;
  --n-50: #f8f7f5;
  --n-100: #f2f0ed;
  --n-150: #ebe8e4;
  --n-200: #e2ded9;
  --n-300: #cfc9c2;
  --n-500: #a39c95;
  --n-700: #5c5853;
  --n-800: #3b3733;
  --n-900: #262321;
  --ink: #1d1f2b;
  --ink-2: #5c5853;            /* secondary text, >= 5.7:1 on every neutral */
  --ink-3: #77716b;            /* tertiary text, only on --n-0 / --n-50 */

  /* Sala verde forest-green accent. Light tints carry chips, counters and timers. */
  --accent-700: #2a3470;
  --accent-600: #3d4fd6;
  --accent-500: #4b5ee0;
  --accent-300: #b4baf2;
  --accent-200: #dcdffa;
  --accent-100: #ebedfc;
  --accent-50: #f5f6fe;
  --on-accent: #ffffff;

  /* Data palette: six hues, each >= 4.5:1 on white; order is the assignment order. */
  --data-1: #3d4fd6;
  --data-2: #2a3470;
  --data-3: #b2512c;
  --data-4: #6d3b61;
  --data-5: #86630f;
  --data-6: #4559ad;

  /* Stage palette measured on the reference product: series order blue, coral, navy, lavender, maroon, sky.
     Fills only (bars, dots, cloud words): the text-safe series above carry any text. */
  --stage-1: #4b5ee0;
  --stage-2: #f2696b;
  --stage-3: #2a3470;
  --stage-4: #8c8fe6;
  --stage-5: #b3383f;
  --stage-6: #6fa8dc;

  --danger: #b42318;
  --danger-bg: #fdecea;
  --success: #1d7a4a;

  /* Semantic roles. */
  --bg-page: var(--n-0);
  --bg-workspace: var(--n-100);
  --bg-sunken: var(--n-100);
  --bg-card-warm: #efe9e1;
  --bg-response: var(--n-150);
  --bg-group: var(--n-50);
  --border: var(--n-200);
  --btn-primary-bg: var(--n-900);
  --btn-primary-fg: #ffffff;
  --btn-accent-bg: var(--accent-600);
  --btn-quiet-bg: var(--n-100);
  --chip-bg: var(--accent-200);
  --chip-soft-bg: var(--accent-100);

  /* Spacing: 4 px base. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  /* Radii. */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;
  --r-3xl: 32px;
  --r-pill: 9999px;

  /* Elevation: flat by default; shadows only for floating layers. */
  --shadow-1: 0 1px 2px rgb(24 24 27 / 0.06);
  --shadow-2: 0 2px 6px rgb(24 24 27 / 0.06), 0 8px 24px rgb(24 24 27 / 0.08);
  --shadow-3: 0 12px 40px rgb(24 24 27 / 0.18);
  --scrim: rgb(24 24 27 / 0.45);

  /* Focus: 2 px inset ring plus a soft 4 px halo. */
  --focus-ring: inset 0 0 0 2px var(--accent-700);
  --focus-halo: 0 0 0 4px rgb(61 79 214 / 0.35);

  /* Motion. */
  --dur-instant: 100ms;
  --dur-fast: 150ms;
  --dur-moderate: 250ms;
  --dur-slow: 400ms;
  --dur-chart: 750ms;
  --ease-snap: cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --stagger-step: 80ms;
  --stagger-cap: 640ms;

  /* Control sizes. */
  --control-h: 44px;
  --control-h-lg: 52px;
  --icon-btn: 44px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-moderate: 1ms;
    --dur-slow: 1ms;
    --dur-chart: 1ms;
    --stagger-step: 0ms;
    --stagger-cap: 0ms;
  }
}

/* Compatibility roles for B1–B3. The measured vocabulary layers onto Sala verde,
   so every existing component keeps its semantic role and data colours. */
:root {
  --font-body: var(--font-text);
  --weight-display: 600;
  --weight-heading: 600;
  --eyebrow-weight: 600;
  --bg: var(--bg-page);
  --surface: var(--n-0);
  --surface-sunken: var(--bg-workspace);
  --ink-soft: var(--n-800);
  --muted: var(--ink-2);
  --line: var(--border);
  --line-strong: var(--n-300);
  --accent: var(--accent-600);
  --accent-hover: var(--accent-700);
  --accent-soft: var(--accent-100);
  --accent-text: var(--accent-700);
  --focus: var(--accent-700);
  --danger-soft: var(--danger-bg);
  --radius-card: var(--r-2xl);
  --radius-control: var(--r-lg);
  --radius-xl: var(--r-3xl);
  --card-tint: var(--bg-card-warm);
  --series-1: var(--data-1);
  --series-2: var(--data-2);
  --series-3: var(--data-3);
  --series-4: var(--data-4);
  --series-5: var(--data-5);
  --series-6: var(--data-6);
  --note-1: #ffe58a;
  --note-2: #ccefc6;
  --note-3: #c3e4ff;
  --note-4: #ffcb8f;
  --board-dot: #d6d7d1;
  --letterbox: #0e0e0f;
  --brand-mark: var(--accent-600);
  --brand-accent: var(--accent-600);
  --proj-accent: var(--accent-600);
  --proj-count-ink: var(--accent-700);
  --proj-join-bg: var(--n-100);
}
