/* Hodlcue design tokens (token contract v3, redesign wave R1: unified
   template - docs/design/UNIFIED-TEMPLATE-SPEC.md section 2/3). Chassis-owned
   contract: every theme defines exactly this variable set, tailwind.config.js
   maps utilities onto the variables, scripts/build_css.sh compiles one bundle
   per theme. Semantic var() colors trade away Tailwind opacity modifiers
   (bg-brand/50) by design; --rgb-* triplets carry the opacity-modifier path
   instead (decision 117), --color-* hex stays the single source of truth the
   contrast invariant parses.
   Redesign wave R2 (knowledge-base/platforms/hodlcue.md, "Indigo Almanac"):
   flips this theme from the R1 dark periwinkle scheme to the kb-ratified
   warm-paper LIGHT scheme - a patient financial almanac printed in indigo
   ink on warm limestone, the inverse of degen neon. The brand/neutral
   50..950 ramps are untouched: they already carry this same indigo hue
   family (the R1 dark brand sat around ramp-300/400; this pass re-anchors
   --color-brand at ramp-600/700, matching this codebase's convention of
   brand == ramp-600 and brand-strong == ramp-700, see brokercue/vaultcue).
   AA fix (decision-117-style token nudge, same hue, minimal delta so the
   WCAG contrast invariant clears):
     * ink-muted #6c6656 (kb table literal) -> #635e4f (ink-muted/brand-soft
       measured 4.43:1, under the 4.5:1 AA floor; darkened to 5.01:1)
*/
:root {
  /* Declare the theme's rendering scheme so native form controls,
     scrollbars, and the browser's own surfaces match the palette
     instead of falling back to a dark default under a light ground. */
  color-scheme: light;
  /* Brand (spec section 3 per-site expression table; ramp stops sourced from
     the live site's own tailwind.config.js brand ramp, see the ramp block
     below). Indigo ink primary, hover one ramp stop darker (kb table). */
  --color-brand: #37489f;
  --color-brand-strong: #2d3a80;
  --color-brand-soft: #dce2f6;
  --color-brand-ink: #ffffff;
  /* Authority / Editor's-Pick accent (kb table): Bordeaux, the wax-seal
     color that drives the sponsor/featured tokens - never the brand hue,
     so a featured badge reads distinct from ordinary brand chrome. */
  --color-accent: #7c2e3c;
  --color-accent-ink: #ffffff;

  /* Clickout CTA (token contract v3.1, craft round R3, owner review; kept
     under the redesign): this site's Visit CTA reads --color-cta/
     --color-cta-strong instead of --color-brand, one register deeper
     (darker, more saturated - light-theme convention) than the indigo
     brand so the money action reads as distinct from the brand chrome
     elsewhere on the page. */
  --color-cta: #283266;
  --color-cta-strong: #242c53;
  --color-cta-ink: #ffffff;

  /* Surfaces (kb table: warm limestone page, ivory/white elevated). */
  --color-page: #f4f1e9;
  --color-surface: #fbf9f3;
  --color-border: #e5dfd0;
  --control-border: #a89c82;

  /* Text (kb table). */
  --color-ink: #1c1a15;
  --color-ink-muted: #635e4f;

  /* Danger (calc-error / invalid-state text; decision R2.1-A).
     AA-checked against this theme's own --color-page ground, not
     copied from the light/dark default. */
  --color-danger: #b91c1c;

  /* Canonical semantic roles. The shared logo tile stays explicitly light. */
  --page-ground: var(--color-page);
  --surface: var(--color-surface);
  --surface-raised: #ffffff;
  --border: var(--color-border);
  --ink: var(--color-ink);
  --ink-muted: var(--color-ink-muted);
  --brand: var(--color-brand);
  --brand-strong: var(--color-brand-strong);
  --brand-soft: var(--color-brand-soft);
  --accent: var(--color-accent);
  --focus-ring: #2d3a80;
  --cta-primary: var(--color-cta);
  --cta-primary-hover: var(--color-cta-strong);
  --cta-secondary: var(--color-brand-soft);
  --success: #147a47;
  --warning: #754000;
  --danger: var(--color-danger);
  --shadow-card: 0 1px 2px rgb(24 24 27 / 0.05), 0 10px 28px -14px rgb(24 24 27 / 0.16);
  --shadow-overlay: 0 20px 40px -18px rgb(24 24 27 / 0.32);

  --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-card: 0.625rem;
  --radius-control: 0.5rem;
  --radius-pill: 9999px;

  --texture: none;

  /* --- Token contract v2 (decision 117): RGB-triplet mirrors of the
     semantic hex tokens above, for Tailwind's rgb(var(--x) / <alpha-value>)
     opacity-modifier classes (bg-brand/50, border-ink/10, etc). Named
     --rgb-* (not --color-*) so tests/invariants/test_theme_contrast.py's
     hex-only parser over every --color-* declaration keeps passing
     unedited; the --color-* hex tokens above remain the single source
     of truth the contrast gate checks, resolved colors are identical. */
  --rgb-brand: 55 72 159; /* #37489f */
  --rgb-brand-strong: 45 58 128; /* #2d3a80 */
  --rgb-brand-soft: 220 226 246; /* #dce2f6 */
  --rgb-brand-ink: 255 255 255; /* #ffffff */
  --rgb-accent: 124 46 60; /* #7c2e3c */
  --rgb-accent-ink: 255 255 255; /* #ffffff */
  --rgb-cta: 40 50 102; /* #283266 */
  --rgb-cta-strong: 36 44 83; /* #242c53 */
  --rgb-cta-ink: 255 255 255; /* #ffffff */
  --rgb-page: 244 241 233; /* #f4f1e9 */
  --rgb-surface: 251 249 243; /* #fbf9f3 */
  --rgb-border: 229 223 208; /* #e5dfd0 */
  --rgb-control-border: 168 156 130; /* #a89c82 */
  --rgb-ink: 28 26 21; /* #1c1a15 */
  --rgb-ink-muted: 99 94 79; /* #635e4f */
  --rgb-danger: 185 28 28; /* #b91c1c */
  --rgb-page-ground: 244 241 233;
  --rgb-surface-raised: 255 255 255;
  --rgb-focus-ring: 45 58 128;
  --rgb-cta-primary: 40 50 102;
  --rgb-cta-primary-hover: 36 44 83;
  --rgb-cta-secondary: 220 226 246;
  --rgb-success: 20 122 71;
  --rgb-warning: 117 64 0;

  /* Generic brand ramp (decision 117), unchanged by the R2 redesign - the
     dark R1 scheme already lived in this same indigo hue family (its brand
     sat around ramp-300/400), so R2 just re-anchors --color-brand/
     --color-brand-strong at ramp-600/700 (this codebase's convention, see
     brokercue/vaultcue) instead of regenerating the ramp. Read by
     tailwind.config.js as brand.50..950 utility colors. */
  --rgb-brand-50: 238 241 251;
  --rgb-brand-100: 220 226 246;
  --rgb-brand-200: 188 200 236;
  --rgb-brand-300: 147 165 223;
  --rgb-brand-400: 106 128 208;
  --rgb-brand-500: 74 97 189;
  --rgb-brand-600: 55 72 159;
  --rgb-brand-700: 45 58 128;
  --rgb-brand-800: 40 50 102;
  --rgb-brand-900: 36 44 83;
  --rgb-brand-950: 21 25 53;
  /* Generic neutral ramp: same lightness stops as the shared zinc scale,
     hue-biased toward this theme's brand hue (spec section 3: "neutrals get
     a slight hue bias toward the brand"). Unchanged by the R2 redesign: the
     indigo brand hue barely moved (~227deg periwinkle -> ~230deg ink), so
     the existing blue-biased neutral ramp is already hue-consistent with
     the new brand. */
  --rgb-neutral-50: 250 250 250;
  --rgb-neutral-100: 244 244 245;
  --rgb-neutral-200: 228 229 231;
  --rgb-neutral-300: 212 213 216;
  --rgb-neutral-400: 161 163 170;
  --rgb-neutral-500: 112 114 123;
  --rgb-neutral-600: 83 84 90;
  --rgb-neutral-700: 64 65 69;
  --rgb-neutral-800: 39 39 42;
  --rgb-neutral-900: 24 25 27;
  --rgb-neutral-950: 10 10 10;
  --font-display: 'Space Grotesk', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
}
