/* Ballotician — design tokens.
   Every visual value used by styles.css is defined here and only here.
   Party colors are supplied by the map pack and written onto :root at load
   as --party-first-strong, --party-first-lean, --party-second-strong and
   --party-second-lean. check_contrast.py verifies every text/background pair. */

:root {
  /* Type: one family, few sizes. 16px is the smallest text anywhere. */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-news: Georgia, "Times New Roman", Times, serif;  /* the debate's name and the debate page's headings (owner, 2026-10-10) */
  --size-base: 1rem;        /* 16px */
  --size-md: 1.125rem;      /* 18px */
  --size-lg: 1.375rem;      /* 22px */
  --size-xl: 1.75rem;       /* 28px */
  --size-xxl: 2.75rem;      /* 44px */
  --weight-normal: 400;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading: 1.5;
  --leading-tight: 1.2;

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --ticket-gap: 2.625rem;  /* between the President's and the VP's cards, a little over --space-6 (owner, 2026-10-10) */

  /* Lines and corners (square by default; buttons and inputs slightly rounded) */
  --line: 1px;
  --line-heavy: 2px;
  --line-mark: 4px;
  --tick: 0.5rem;
  --control-height: 3rem;
  --control-height-large: 4rem;
  --radio: 1.375rem;
  --radius-control: 4px;
  --focus-width: 3px;

  /* Layout (desktop only) */
  --page-max: 90rem;
  --form-max: 56rem;
  --gutter: 2.5rem;
  --header-height: 4.5rem;
  --footer-height: 5rem;
  --column-side: 24rem;
  --column-advisors: 22rem;
  --label-column: 15rem;
  --tile: 3.5rem;
  --tile-small: 2.5rem;
  --map-column: 34rem;
  --label-narrow: 10rem;
  --tile-gap: 0.375rem;
  --region-line: 3px;      /* region outlines on the block map, in the tile gap */
  --bar-height: 3.5rem;
  --input-number: 8rem;
  --input-count: 6rem;
  --field-width: 20rem;
  --mini-bar: 14rem;
  --mini-bar-height: 0.875rem;
  --chart-track: 30rem;     /* the longest bar in the owner dashboard's time charts */
  --chart-bar-height: 1.25rem;
  --logo-header: 3.25rem;
  --drawer-width: 22rem;
  --input-find: 16rem;
  --input-link: 28rem;
  --pane-min: 20rem;
  --measure: 46rem;
  --viewport: 100vh;
  --tip-size: 1.5rem;
  --help-size: 2rem;
  --tip-width: 20rem;
  --logo-start: 12rem;
  --band-height: 0.625rem;
  --step-button: 3rem;      /* the − and + buttons on the debate page */
  --article-measure: 40rem; /* the debate news report */
  /* The front page (owner, 27 November 2026) is the one page also read on phones: these sizes shrink with the window. */
  --site-gutter: clamp(1rem, 4vw, 2.5rem);
  --size-site-title: clamp(1.75rem, 5vw, 2.75rem);
  --site-art: 34rem;        /* the splash beside the opening words */
  --site-shot: 72rem;       /* a screenshot in the gallery */
  /* The front page's look (owner, 28 November 2026): the logo's red-to-blue gradation, its circle of stars, and the
     splash's two typefaces, served from the game itself (app/web/static/fonts, SIL Open Font License). */
  --font-display: "Oswald", "Arial Narrow", system-ui, sans-serif;   /* headings, as "Ballotician" on the splash */
  --font-wordmark: "Playfair Display", Georgia, serif;               /* the tagline, as on the splash */
  --size-site-hero: clamp(2.25rem, 5.5vw, 4rem);
  --size-site-heading: clamp(1.75rem, 3.6vw, 2.5rem);
  --site-mark-hero: clamp(10rem, 28vw, 24rem);  /* the circle of stars beside the opening words */
  --site-mark-small: 2.75rem;                   /* the circle of stars beside each section heading */
  --site-column: 34rem;                         /* the narrowest a section's words or picture may be before they stack */
  --site-shot-small: 46rem;                     /* a close-up screenshot */
  --site-shadow: 0 1.25rem 3rem rgba(13, 27, 51, 0.28);
  --hero-red: #4a1408;                          /* the logo's red, darkened so white text reads on it */
  --hero-mid: #2b1a2c;
  --hero-gradient: linear-gradient(100deg, #4a1408 0%, #2b1a2c 48%, #0d1b33 100%);

  /* Surfaces and text */
  --paper: #ffffff;
  --paper-quiet: #f2f3f5;
  --ink: #111418;
  --ink-quiet: #3a4150;
  --rule: #c4c9d2;
  --rule-strong: #111418;
  --danger-ink: #8a0f0f;
  /* Impact tab arrows (owner, 2026-10-04): green up, stop-sign red down. Arrow glyphs only, at --size-lg
     (large text, 4.5:1); the figures beside them stay in --ink. */
  --gain-ink: #17752d;
  --loss-ink: #c8102e;
  --focus: #e8a100;

  /* Brand */
  --brand-navy: #0d1b33;
  --brand-rust: #8a2410;
  --brand-gold: #f2c84b;
  --help: #b7dcc1;          /* the How to Play button in the header: a soft, party-neutral sage (owner, 2026-10-05) */
  --brand-band: linear-gradient(90deg, #8a2410 0%, #b5654c 35%, #8a9bb5 65%, #0d2f66 100%);
  --star-blue: #7fa6e6;
  --star-red: #e2806a;
  --on-dark: #ffffff;
  --overlay: rgba(13, 27, 51, 0.72);
  --disabled-paper: #e4e6ea;
  --disabled-ink: #2f3540;

  /* Actions: one color per kind of action, everywhere */
  --action-next: #262b33;       /* Next, Continue, Create */
  --action-commit: #14532d;     /* Submit, lock decisions */
  --on-action: #ffffff;

  /* Electoral College: toss-up is not party-specific */
  --tossup: #d6d9df;
  --on-strong: #ffffff;
  --on-lean: #111418;

  /* Departments: fills behind black text, always with the department's name */
  --dept-advance: #f2c464;
  --dept-communications: #cdbaf0;
  --dept-fundraising: #a8d9b0;
  --dept-field: #9fd6e2;
  --dept-opposition: #d9dce3;
  --on-dept: #111418;

  /* Mock controls (not part of the game) */
  --mock-paper: #1d2129;
  --mock-ink: #ffffff;

  --z-footer: 10;
  --z-drawer: 40;
  --z-toast: 50;
}
