/*
 * Quiver · design tokens
 * ----------------------------------------------------------
 * Single source of truth for the focus-first redesign.
 * Extracted from the six approved mockups in /mockups/.
 * If you change a value here, it changes everywhere.
 */

:root {
  /* ── Color: warm studio palette in OKLCH ───────────────── */
  --bg: oklch(0.965 0.018 82);
  --studio: oklch(0.45 0.12 145); /* Aligned with DESIGN.json */
  --studio-soft: oklch(0.93 0.055 145);

  --surface: oklch(0.992 0.006 82);
  /* Warm tint for hover strips, tabs, queue rows (was referenced across screens after a rename). */
  --surface-warm: oklch(0.97 0.014 82);
  /* Soft highlight wash for flagged doc lines (replaces legacy --highlight). */
  --surface-weak: oklch(0.945 0.045 95);
  --surface-strong: oklch(0.925 0.03 82);

  --text: oklch(0.19 0.018 72);
  --muted: oklch(0.46 0.025 72);
  --muted-soft: oklch(0.62 0.022 72);

  --border: oklch(0.84 0.028 82);
  --border-soft: oklch(0.9 0.022 82);

  --primary: oklch(0.45 0.12 145); /* Aligned with DESIGN.json #2f6f57 */
  --primary-strong: oklch(0.38 0.11 145);
  --primary-soft: oklch(0.93 0.055 145);

  --success: oklch(0.55 0.12 145);
  --success-soft: oklch(0.93 0.055 145);
  --warning: oklch(0.64 0.13 78);
  --warning-soft: oklch(0.94 0.07 82);
  --danger: oklch(0.55 0.16 28);
  --danger-soft: oklch(0.93 0.055 28);

  /* Subtler tints used in deep states (active rows, glow) */
  /* --highlight removed - use --surface-weak */
    --studio-deep: oklch(0.38 0.11 145);
  --studio-mid: oklch(0.42 0.115 145);
  --studio-tone: oklch(0.78 0.08 145);

  /* Extended state colors (for borders and muted states) */
  --success-muted: oklch(0.7 0.09 145);
  --success-border: oklch(0.85 0.06 145);
  --warning-border: oklch(0.85 0.07 82);
  --danger-border: oklch(0.85 0.08 28);

  /* Focus rings */
  --studio-focus-ring: oklch(0.235 0.045 72 / 0.08);
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;

  /* ── Typography ────────────────────────────────────────── */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fz-display: clamp(2.4rem, 5vw, 5.4rem);
  --fz-hero:    clamp(2rem, 4.5vw, 3.6rem);
  --fz-section: 24px;
  --fz-title:   18px;
  --fz-body:    15px;
  --fz-small:   13px;
  --fz-eyebrow: 11px;

  /* --fw-display consolidated into --fw-bold */
  --fw-bold:    760;
  --fw-strong:  720;
  --fw-medium:  600;
  --fw-regular: 450;

  --lh-tight:   1.05;
  --lh-snug:    1.32;
  --lh-base:    1.55;
  --lh-relaxed: 1.65;

  --ls-display: -0.045em;
  --ls-tight:   -0.025em;
  --ls-snug:    -0.015em;
  --ls-eyebrow: 0.12em;

  /* ── Radius ────────────────────────────────────────────── */
  --rad-xs:   6px;
  --rad-sm:   10px;
  --rad-md:   14px;
  --rad-lg:   18px;
  --rad-xl:   22px;
  --rad-pill: 999px;

  /* ── Spacing ───────────────────────────────────────────── */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  22px;
  --sp-6:  28px;
  --sp-7:  36px;
  --sp-8:  48px;
  --sp-9:  64px;
  --sp-10: 96px;

  /* ── Shadow ────────────────────────────────────────────── */
  --shadow-xs:  0 1px 2px oklch(0.19 0.018 72 / 0.06);
  --shadow-sm:  0 4px 12px oklch(0.19 0.018 72 / 0.04);
  --shadow-md:  0 8px 24px oklch(0.19 0.018 72 / 0.06);
  --shadow-lg:  0 24px 60px oklch(0.19 0.018 72 / 0.10), 0 4px 12px oklch(0.19 0.018 72 / 0.04);
  --shadow-cta: 0 8px 24px oklch(0.235 0.045 72 / 0.18);

  /* ── Motion ────────────────────────────────────────────── */
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  /* Alias for animations that expect a named transition curve (e.g. toast.css). */
  --transition-base: var(--ease-out);
  --t-fast:    120ms;
  --t-normal:  180ms;
  --t-slow:    250ms;

  /* ── Layout limits ─────────────────────────────────────── */
  --max-app:       1200px;
  --max-content:   760px;
  --max-card:      620px;
  --max-doc:       640px;
  --topbar-height: 60px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast: 0ms;
    --t-normal: 0ms;
    --t-slow: 0ms;
  }
}


/* ===== Consolidation Notes =====
 * Legacy renames (historical; current tokens above are authoritative):
 * --highlight → --surface-weak (flagged doc lines)
 * --fw-display → --fw-bold
 */
