/* PRJ-029 CR-181: design tokens copied from the approved PRJ-030 CR-176 prototype (/onboarding-proto/tokens.css),
   plus the marketing-site palette (PRJ-026 site.css), light by default since CR-208.
   This is the ONLY file in this prototype allowed to hold literal colour values. */

/* ── brand ── */
:root {
  --brand-gold: #D4A574;
  --brand-gold-dark: #A07040;
}

/* ── panel ── */
:root {
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --accent: #d4a574;
  --radius-sm: 6px;
  --radius-md: 8px;
  --sidebar-w: 220px;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace;
  --radius-btn: 10px;
  --radius-lg: 12px;
  --radius-pill: 9999px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 13.5px;
  --text-body: 14px;
  --text-title: 24px;
  --text-stat: 36px;
}

[data-theme="dark"] {   /* panel dark tokens (unused by the app except as named; kept for the design system) */
  --bg: #0a0a0b;
  --bg-sidebar: #0a0a0b;
  --bg-card: #111214;
  --bg-input: #1a1a1c;
  --bg-hover: rgba(255,255,255,0.04);
  --bg-active: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.07);
  --text: #fafafa;
  --text-muted: #888888;
  --text-tab: #666666;
  --btn-primary-bg: #fafafa;
  --btn-primary-text: #0a0a0b;
  --tab-active-bg: rgba(255,255,255,0.12);
  --tab-active-text: #fafafa;
}

/* ── app surfaces (the --site-* names come from the marketing site, PRJ-026) ──
   CR-208: LIGHT is the default (Drew 2026-10-18: many users aren't used to dark mode). The light values are the
   ratified light theme (design/reference/marketing/app-access.css, CR-A027-4): Giza Grid paper #FAF7F2, white cards,
   slate ink, gold-ink #8A5F2E for gold text (WCAG AA); gold fills (#D4A574) stay the same in both themes.
   Dark stays a choice (Account > Appearance): data-theme="dark" on <html>.
   Contrast (WCAG 2.1, checked by tests/auth/test_light_mode_cr208.py): body text ≥ 4.5:1 on paper and on cards in
   both themes; gold text ≥ 4.5:1; status colours used as text ≥ 4.5:1 in light. */
:root, [data-theme="light"] {
  color-scheme: light;
  --site-paper: #FAF7F2;          /* page ground (paper) */
  --site-paper-deep: #FFFFFF;     /* cards, lists, menus (bg-card) */
  --site-border: #E2E5E8;         /* slate-100 hairline */
  --site-line-faint: #CBD0D6;     /* slate-200 */
  --site-line-ink: #3A4354;       /* slate-700, secondary text */
  --site-ink: #1A1F26;            /* slate-900, text */
  --site-muted: #5F6773;          /* muted text; slate-500 #6B7380 is 4.4:1 on paper, so one step darker for AA */
  --site-gold-ink: #8A5F2E;       /* gold text and links */
  --gold-text: #8A5F2E;
  --gold-fill-hover: #C89660;     /* gold-fill-deep */
  --site-on-gold: #1A1F26;
  --site-grid: rgba(45, 62, 80, 0.055);
  --input-border: #A8AFB8;        /* slate-300: input outlines need 3:1 against white/paper (WCAG 1.4.11) */
  --bg-hover: rgba(45, 62, 80, 0.04);
  --bg-active: rgba(45, 62, 80, 0.07);
  --status-ok: #15803d;           /* light status: AA as text on white and paper */
  --status-warn: #B45309;
  --status-err: #B91C1C;
  --status-proc: #1D4ED8;
  --sheet: #FFFFFF;               /* the plan sheets in the scan and the estimating strip */
  --sheet-line: #2D3E50;
  --sheet-border: #E2E5E8;
  --shadow-card: 0 18px 48px rgba(26, 31, 38, 0.08);
  --shadow-pop: 0 12px 32px rgba(26, 31, 38, 0.14);
  --shadow-sheet: 0 10px 26px rgba(26, 31, 38, 0.12);
  --scrim: rgba(26, 31, 38, 0.35);
  --feedback-pin: var(--site-gold-ink);       /* CR-229: open feedback pin (role, not decoration) */
  --feedback-pin-ink: var(--site-paper-deep); /* number on the pin */
  --feedback-done: var(--site-muted);         /* resolved / withdrawn pin */
  --feedback-recording: var(--status-err);    /* CR-230: recording in progress (live state, not decoration) */
}
[data-theme="dark"] {
  color-scheme: dark;
  --site-paper: #12161B;
  --site-paper-deep: #1A2028;
  --site-border: #29313B;
  --site-line-faint: #3A4452;
  --site-line-ink: #C6CBD2;
  --site-ink: #F2EDE4;
  --site-muted: #7F8792;
  --site-gold-ink: #E8C9A4;
  --gold-text: #D4A574;
  --gold-fill-hover: #E8C9A4;
  --site-on-gold: #1A1F26;
  --site-grid: rgba(198, 203, 210, 0.045);
  --input-border: #29313B;
  --bg-hover: rgba(255,255,255,0.04);
  --bg-active: rgba(255,255,255,0.07);
  --status-ok: #22c55e;
  --status-warn: #f59e0b;
  --status-err: #ef4444;
  --status-proc: #3b82f6;
  --sheet: #F2EDE4;
  --sheet-line: #12161B;
  --sheet-border: transparent;
  --shadow-card: 0 24px 60px rgba(0,0,0,.35);
  --shadow-pop: 0 16px 40px rgba(0,0,0,.45);
  --shadow-sheet: 0 14px 34px rgba(0,0,0,.4);
  --scrim: rgba(0,0,0,.55);
  --feedback-pin: var(--site-gold-ink);
  --feedback-pin-ink: var(--site-paper-deep);
  --feedback-done: var(--site-muted);
  --feedback-recording: var(--status-err);
}

/* ── plan colours (viewer v2 tokens.css, CR-146), used by the project thumbnail ── */
:root {
  --what-space: #0077BB;
  --what-closet: #EE3377;
}
