/**
 * ARR design tokens — one source for the web app (copy kept in extension/arr-tokens.css).
 *
 * Light theme only (no dark mode).
 *
 * Layers: type + spacing scale | surfaces + text | accent | lifecycle | collaboration | quality
 */

/* Inter (self-hosted variable font, OFL — see fonts/Inter-LICENSE.txt) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  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 {
  /* ---- Typography ---- */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --fs-xs: 0.75rem; /* 12px — badges only */
  --fs-sm: 0.8125rem; /* 13px — labels, secondary text */
  --fs-base: 0.9375rem; /* 15px — body, tables, inputs */
  --fs-md: 1rem; /* 16px */
  --fs-lg: 1.125rem; /* 18px — panel titles */
  --fs-xl: 1.375rem; /* 22px — page titles */
  --fs-2xl: 1.75rem; /* 28px */
  --lh-tight: 1.25;
  --lh-base: 1.5;

  /* ---- Spacing / shape ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;

  /* ---- Layout (sticky offsets read from these) ---- */
  --arr-nav-h: 56px;
  --arr-scope-h: 40px;

  color-scheme: only light;

  /* ---- Surfaces (light) ---- */
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --surface-3: #e3e8f0;
  --surface-sunken: #f1f3f8;
  --surface-raised: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.88);
  --overlay-scrim: rgba(15, 23, 42, 0.45);

  /* ---- Text (light) — all pairs >= 4.5:1 on --surface ---- */
  --text: #131824;
  --text-secondary: #384252;
  --text-muted: #566274;
  --text-faint: #6b7686;
  --on-accent: #ffffff;

  /* ---- Lines (used sparingly) ---- */
  --border-subtle: rgba(19, 24, 36, 0.07);
  --border: rgba(19, 24, 36, 0.14);
  --border-strong: rgba(19, 24, 36, 0.3);

  /* ---- Elevation ---- */
  --shadow-sm: 0 1px 2px rgba(19, 24, 36, 0.06), 0 1px 1px rgba(19, 24, 36, 0.04);
  --shadow-md: 0 4px 14px rgba(19, 24, 36, 0.08), 0 1px 3px rgba(19, 24, 36, 0.06);
  --shadow-lg: 0 18px 48px rgba(19, 24, 36, 0.18);

  /* ---- Accent ---- */
  --accent: #2456d6;
  --accent-solid: #2563eb;
  --accent-hover: #1d4fc7;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --focus-ring: rgba(37, 99, 235, 0.45);
  --arr-ui-link: #1d4fc7;
  --arr-ui-surface: var(--surface);
  --arr-ui-muted: var(--text-muted);

  /* ---- Banners that stay colored in both themes ---- */
  --banner-blue: #1e56a8;
  --banner-orange-from: #b4410d;
  --banner-orange-to: #d1500f;

  /* ---- Scope / case context strip (workspace + case header) ---- */
  --arr-scope-bar-bg: #eef1f8;
  --arr-scope-bar-fg: #1a2030;
  --arr-scope-bar-muted: #4a5568;
  --arr-scope-bar-accent: var(--accent-solid);
  --arr-scope-bar-divider: rgba(19, 24, 36, 0.12);

  /* ---- Case lifecycle (workspace pills + court highlights) ---- */
  --arr-status-done: #1e8e3e;
  --arr-status-done-bg: rgba(30, 142, 62, 0.12);
  --arr-status-done-ring: rgba(30, 142, 62, 0.45);
  --arr-status-done-fg: #0b6b2d;

  --arr-status-active: #0284c7;
  --arr-status-active-bg: rgba(2, 132, 199, 0.12);
  --arr-status-active-ring: rgba(2, 132, 199, 0.45);
  --arr-status-active-fg: #075985;

  --arr-status-waiting: #d9730d;
  --arr-status-waiting-bg: rgba(217, 115, 13, 0.14);
  --arr-status-waiting-ring: rgba(217, 115, 13, 0.5);
  --arr-status-waiting-fg: #8a3f00;

  --arr-status-dead: #c5221f;
  --arr-status-dead-bg: rgba(197, 34, 31, 0.1);
  --arr-status-dead-fg: #a31515;

  --arr-status-muted: #6b7686;
  --arr-status-muted-bg: rgba(107, 118, 134, 0.14);
  --arr-status-muted-fg: #455062;

  /* ---- Collaboration (who opened the case — not lifecycle) ---- */
  --arr-claim-mine: #14b8a6;
  --arr-claim-mine-bg: rgba(20, 184, 166, 0.12);
  --arr-claim-mine-ring: #0d9488;

  --arr-claim-other: #8b5cf6;
  --arr-claim-other-bg: rgba(139, 92, 246, 0.12);
  --arr-claim-other-ring: #7c3aed;

  /* ---- Quality / scope / QA ---- */
  --arr-quality-fail: #c62828;
  --arr-quality-fail-bg: rgba(220, 38, 38, 0.1);

  --arr-quality-review: #a21caf;
  --arr-quality-review-bg: rgba(192, 38, 211, 0.1);

  --arr-quality-warn: #b45309;
  --arr-quality-warn-bg: rgba(245, 158, 11, 0.18);

  /* ---- Order-level readiness ---- */
  --arr-order-ready: var(--arr-status-done);
  --arr-order-progress: var(--arr-quality-warn);

  /* ---- Soft feedback (alerts / toasts) ---- */
  --ok-bg: #e6f4ea;
  --ok-fg: #0b5d27;
  --warn-bg: #fff4d6;
  --warn-fg: #7a4a00;
  --danger-bg: #fde8e8;
  --danger-fg: #9b1c1c;
  --info-bg: #e5efff;
  --info-fg: #0c3b91;
}

