/* Abacus Behavioral design tokens.
   The teal ramp is derived from the wordmark icon (#008695 core, #63B3C1 beads)
   so the palette and the logo share one hue. Contrast ratios noted against
   --surface unless stated otherwise. */

:root {
  /* Neutrals, warmed slightly toward the teal hue so they sit with the ramp. */
  --ink-900: #0F262B;      /* headings, body text on light (15.4:1) */
  --ink-800: #1C3B43;      /* dark surfaces, footer base */
  --ink-700: #37545C;      /* secondary body text (8.3:1) */
  --ink-500: #526D73;      /* captions, muted text (4.6:1) */
  --ink-300: #9DB0B6;      /* disabled text, axis labels */

  /* Teal ramp — the brand hue. */
  --teal-900: #06282E;     /* footer background */
  --teal-800: #0A4C55;     /* footer raised surfaces, dark section base */
  --teal-700: #0A6C77;     /* links, body-size teal text, primary button (5.8:1) */
  --teal-600: #008695;     /* brand core: icons, chart line, large text (4.3:1 — 24px+ only) */
  --teal-500: #35A3B0;     /* chart line, fills, decorative accents */
  --teal-300: #8FCED7;     /* bead fills, decorative strokes */
  --teal-200: #C7E6EB;     /* borders, rails, dividers */
  --teal-100: #E4F2F5;     /* tinted surface, chips */

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-2: #F3F7F6;    /* page base behind cards */
  --mist: #EAF4F6;         /* alternating section background */
  --sand: #FBF4EA;         /* at most one warm section per page */

  /* Warm accent — the "one bead". */
  --apricot-600: #D9822B;  /* accent borders, hover (3.4:1 — large text only) */
  --apricot-500: #F2A65A;  /* the one bead, focus ring */
  --apricot-300: #F8CFA1;
  --apricot-200: #FBE0C3;
  --apricot-100: #FDF2E4;

  /* Data tiles. One dark shell for every graph, so charts sit in the layout
     instead of inventing a new card each time. */
  --viz-bg: #06282E;
  --viz-tile: rgba(255, 255, 255, 0.045);
  --viz-cell: #9DB0B6;
  --viz-cell-hi: var(--apricot-500);
  --viz-ink: #E4F2F5;
  --viz-muted: #8FCED7;

  --bead-clip: polygon(16% 8%, 84% 8%, 100% 50%, 84% 92%, 16% 92%, 0% 50%);
  --bead-fill: var(--teal-600);
  --bead-fill-hi: var(--apricot-500);

  --error: #B03A3A;        /* form errors (5.9:1) */
  --error-bg: #FDF3F3;

  /* Wordmark. ABA uses the icon frame; the rest uses the bead color. */
  --logo-dark: var(--teal-600);
  --logo-light: #63B3C1;

  /* Hairlines. Separate from --teal-200 so borders can be quieter than rails. */
  --line: #D5E6EA;
  --line-strong: #B7D3D9;
  --line-dark: rgba(199, 230, 235, 0.16);

  --font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-lockup: 'Montserrat', 'Segoe UI', Arial, sans-serif;

  /* Fluid type scale, ~1.2 ratio at small widths opening to ~1.25 at large. */
  --step--2: 0.75rem;
  --step--1: 0.9375rem;
  --step-0: clamp(1rem, 0.97rem + 0.13vw, 1.0625rem);
  --step-1: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --step-2: clamp(1.1875rem, 1.12rem + 0.3vw, 1.375rem);
  --step-3: clamp(1.375rem, 1.28rem + 0.45vw, 1.625rem);
  --step-4: clamp(1.875rem, 1.45rem + 1.3vw, 2.625rem);
  --step-5: clamp(1.875rem, 1.6rem + 1.3vw, 2.625rem);
  --step-6: clamp(2.25rem, 1.85rem + 1.9vw, 3.25rem);
  --step-7: clamp(2.25rem, 1.8rem + 2.2vw, 3.5rem);

  /* Label type: the small caps-and-tracking pattern used for eyebrows,
     table headers, and column headings. One definition, many places. */
  --label-size: 0.875rem;
  --label-weight: 600;
  --label-track: 0.08em;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-card: 16px;
  --radius-lg: 20px;
  --radius-image: 20px;
  --radius-pill: 999px;

  /* Elevation. Tinted with the ink hue rather than neutral black, and kept
     tight — borders carry structure here, shadows only signal lift. */
  --shadow-xs: 0 1px 2px rgba(15, 38, 43, 0.04);
  --shadow-sm: 0 1px 2px rgba(15, 38, 43, 0.04), 0 6px 16px rgba(15, 38, 43, 0.05);
  --shadow-md: 0 2px 4px rgba(15, 38, 43, 0.05), 0 12px 28px rgba(15, 38, 43, 0.07);
  --shadow-lg: 0 4px 10px rgba(15, 38, 43, 0.07), 0 20px 48px rgba(15, 38, 43, 0.1);
  --shadow-soft: var(--shadow-sm);

  /* Semantic aliases — one place to tune the homepage/system feel. */
  --page-bg: var(--surface);
  --text-primary: var(--ink-900);
  --text-secondary: var(--ink-700);
  --text-muted: var(--ink-500);
  --color-primary: var(--teal-700);
  --color-primary-hover: var(--teal-800);
  --color-accent: var(--apricot-500);
  --color-border: var(--line);
  --page-gutter: clamp(1.25rem, 3.2vw, 3rem);

  --measure: 62ch;
  --measure-tight: 22ch;
  --measure-lead: 46ch;
  --container: 1200px;
  --container-narrow: 760px;

  /* Opening band shared by the homepage hero and every inner page head.
     An exact height, not a minimum, so a longer title cannot stretch one
     page past the others. Tuned per breakpoint in styles.css. */
  --band-height: 54rem;

  /* Vertical rhythm. Sections share one pair of values so bands stack evenly
     however they are combined. */
  --section-y: 64px;
  --section-y-lg: 88px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 72px;
  --space-8: 104px;
  --space-9: 144px;

  --header-utility: 36px;
  --header-primary: 88px;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}
