/**
 * Finance Tracker — Calibrated Design Tokens (Gemini Design Handoff v1.1)
 *
 * :root keeps the main (mobile) palette unchanged. Desktop UI Refinement
 * values (off-white #F7F8F6 canvas, #0D2B1D forest, near-black ink, chart
 * ramp) override them only at >=1024px, the desktop layout breakpoint.
 *
 * White / Deep Forest-Green / Lime-Emerald consumer-finance theme.
 * All text/surface pairings verified for WCAG AA (>= 4.5:1) contrast.
 */

:root {
  /* Brand & Surface Colors */
  --bg-canvas: #ffffff;
  --bg-canvas-desktop: #f7f8f6;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f3f5f4;
  --bg-surface-hover: #eaeef0;
  --bg-callout: #eff3f0;
  --bg-sidebar: #f7f9f8;
  --bg-badge-neutral: #ebf0ed;
  --bg-badge-hero: rgba(255, 255, 255, 0.14);

  /* Brand Identity (Deep Forest Hero exclusively on Overview) */
  --brand-forest: #0d2818;
  --brand-forest-hover: #143a24;
  --brand-lime: #8ee868;
  --brand-lime-hover: #7bdd54;
  --brand-lime-active: #6ecf46;

  /* Hairline Borders */
  --border-hairline: #e5eae7;
  --border-row-divider: #eef2ef;
  --border-strong: #c8d2cc;
  --border-on-forest: rgba(255, 255, 255, 0.14);

  /* Text & Semantic Inks (WCAG AA >= 4.5:1) */
  --ink-primary: #0d2818;
  --ink-secondary: #515f57;
  --ink-muted: #5a6860;
  --ink-badge: #24362c;
  --ink-on-forest: #ffffff;
  --ink-on-forest-muted: #c2d4c9;
  --ink-positive: #14532d;
  --ink-positive-bg: #e7f3ec;
  --ink-positive-dark: #14532d;
  --ink-amber: #92400e;
  --ink-amber-bg: #fef3c7;
  --ink-slate: #4b5563;
  --ink-slate-bg: #f1f3f2;
  --ink-refund-deduct: #a94442;
  --ink-danger: #9f2d2b;
  --ink-danger-bg: #fdf2f2;
  --ink-danger-border: #f0c9c8;
  --ink-voided: #6b7670;

  /* Continuous Category Bar Ramp (Forest -> Sage -> Slate; no rainbow) */
  --cat-ramp-0: #0d2818;
  --cat-ramp-1: #234d34;
  --cat-ramp-2: #527d63;
  --cat-ramp-3: #789a85;
  --cat-ramp-4: #96aca0;
  --cat-ramp-5: #bcc7c1;

  /* Typography */
  --font-sans: "Inter", "PingFang HK", "Noto Sans CJK HK", "Noto Sans TC",
    "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  /* Spacing & Layout */
  --page-pad-mobile: 16px;
  --page-pad-compact: 12px;
  --page-pad-desktop: 32px;
  --sidebar-width: 224px;
  --sidebar-width-compact: 220px;
  --bottom-nav-height: 64px;

  /* Radii */
  --radius-hero: 18px;
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-pill: 9999px;

  /* Shadows (ultra-subtle elevation on #F7F8F6 desktop canvas) */
  --shadow-card-desktop: 0 1px 2px rgba(13, 43, 29, 0.03);

  /* Focus Ring */
  --focus-ring: 0 0 0 3px rgba(142, 232, 104, 0.55), 0 0 0 1.5px #0d2818;
}

/* Desktop UI Refinement palette (>=1024px only; mobile keeps :root above) */
@media (min-width: 1024px) {
  :root {
    --bg-sidebar: #ffffff;
    --brand-forest: #0d2b1d;
    --brand-forest-hover: #163f2b;
    --border-row-divider: #eef1ee;
    --ink-primary: #111814;
    --ink-secondary: #526058;
    --ink-muted: #64726a;
    --ink-positive: #157347;
    --ink-positive-bg: #e8f5ee;
    --ink-refund-deduct: #b42318;
    --cat-ramp-0: #0d2b1d;
    --cat-ramp-1: #1c4b34;
    --cat-ramp-2: #2f6e4e;
    --cat-ramp-3: #548e6d;
    --cat-ramp-4: #83ae95;
    --cat-ramp-5: #b4cfc0;
    --sidebar-width: 240px;
    --radius-hero: 20px;
    --focus-ring: 0 0 0 3px rgba(142, 232, 104, 0.55), 0 0 0 1.5px #0d2b1d;
  }
}
