/* Colors — mirrors Sources/GBDesign/Tokens/ColorTokens.swift.
   :root is the LIGHT theme; [data-theme="dark"] carries the dark variants.

   REGENERATED 2026-08-19 against the redesigned palette. The app moved off
   forest green (#2D6A4F) onto warm bone and ink, and the score ramp inverted:
   RED is now under par, which is golf's own convention and which this file
   previously had backwards — it shipped a green birdie and a red double to the
   live marketing site while the app said the opposite.
   The marketing site paints itself with the --web-* palette further down, so
   this section is here for parity and for any page that reuses an app tone. */
:root{
  /* Brand */
  --brand-ink-900:#1B1916;
  --brand-ink-700:#1B1916;
  --brand-ink-500:#6B665D;
  --brand-ink-300:#969081;
  --brand-accent:#B24028;

  /* Semantic brand. Two greens, not interchangeable: `primary` is for FILLS
     with white content on top; `primary-text` is the green used AS text or an
     icon on a surface, and lightens in dark mode where the fill green fails
     contrast. */
  --color-primary:#1B1916;
  --color-primary-text:#1B1916;
  --color-secondary:#6B665D;
  --color-accent:#B24028;

  /* Surfaces — a three-step ramp. Light mode used to have none (background and
     elevated were both pure white), which is why a card needed a shadow to have
     an edge at all. */
  --surface-background:#F5F2EA;
  --surface-card:#FFFFFF;
  --surface-elevated:#FFFFFF;

  /* A card carries its own hairline edge rather than a shadow, so it stays
     visible on screens that don't paint --surface-background. */
  --card-border:rgba(0,0,0,0.10);

  /* Tonal containers — one tint strength, so every tinted element agrees. */
  --container-tint:0.12;
  --container-stroke:0.22;
  --color-primary-container:#F1E3DC;
  --color-on-primary-container:#1B1916;
  --surface-container:#EFEBE1;

  /* Text */
  --text-primary:#1B1916;
  --text-secondary:#6B665D;

  /* Scores — a fixed, semantic ladder */
  --score-eagle:#82611D;
  --score-birdie:#B24028;
  --score-par:#1B1916;
  --score-bogey:#5B6470;
  --score-double-plus:#414954;

  /* Status — Apple's system palette verbatim, so alerts read as OS-native */
  --status-success:#34C759;
  --status-warning:#FF9500;
  --status-error:#FF3B30;
  --status-info:#007AFF;

  /* Leaderboard ranks — first three places only */
  --rank-first:#82611D;
  --rank-second:#666666;
  --rank-third:#905923;

  /* Marketing web. A darker, cooler green than the app uses — deliberately its
     own palette, and the one duffersanonymous.com is painted with. */
  /* The site's own palette, now the app's world rather than a green one beside
     it. These have no app token to mirror — which is exactly why they drifted:
     `verify-token-mirror.mjs` checks the tokens that DO have counterparts and
     passed the whole time the site was forest green under an ink-and-ember mark.

     `--web-accent` is a FILL with white on it; `--web-accent-bright` is the
     ember used AS text on the dark ground. They are not interchangeable — white
     on the bright one is 2.2:1. */
  --web-accent-deep:#8E3020;
  --web-accent:#B24028;
  --web-accent-bright:#FF8A5B;

  /* DEPICTIVE, not brand: the lost-ball illustration draws grass. It kept the
     retired greens deliberately — turf that is rust is not turf. Separate
     tokens so nobody "fixes" them the next time the brand moves. */
  --web-turf:#1e5631;
  --web-turf-blade:#2e7d4f;
  --web-bg:#121314;
  --web-card:#1D1F21;
  --web-hairline:#2E2A26;
  --web-text:#EDE9E0;
  --web-muted:#B5AD9C;
  --web-dim:#9A9488;
  --web-link:#CFC9BC;

  /* Score ladder, translated for a dark surface.
     The app's own --score-* tokens above are tuned for its light-first UI and
     four of the five port straight across: measured on --web-bg they run
     13.18, 8.32, 8.41 and 5.21 to 1, all clear of AA, and on --web-card 11.89,
     7.51, 7.59 and 4.70.
     --score-par does NOT port. It is #000000 — 1.14:1 here, invisible — because
     on a light surface the neutral score IS black text. The neutral on this
     surface is the body colour, so par maps to --web-text. Same meaning, other
     end of the surface; that is a translation, not a substitution.
     Keeping these in the --web-* namespace matters: site.css paints from that
     palette and never from the app's, precisely so the two can diverge where
     the surfaces demand it without either looking like a mistake. */
  --web-score-eagle:#d6a544;
  /* RED is under par — the app's score law, and golf's. This shipped
     GREEN for a birdie while the app said red. */
  --web-score-birdie:#ff8a5b;
  --web-score-par:var(--web-text);
  --web-score-bogey:#8892a0;
  --web-score-double:#8592a0;

  /* Podium, same translation exercise. All three port unchanged: measured on
     --web-bg they run 13.18, 10.16 and 5.88 to 1. Gold is shared with eagle,
     which is the app's own convention — the two never appear in the same
     component, there as here. */
  --web-rank-first:#d6a544;
  --web-rank-second:#c0c0c0;
  --web-rank-third:#cd7f32;

  /* Form field outline. Deliberately NOT --web-hairline: a hairline is 1.45:1
     against the page, which is fine for a divider and fails WCAG 1.4.11 for a
     control whose border is its only boundary. This clears 3:1 on both the page
     (3.56) and a card (3.21). */
  --web-field-border:#4A453D;
  /* Errors. 9.0:1 on the page, 8.1:1 on a card. */
  --web-error:#ff9a8a;
}

[data-theme="dark"]{
  --color-primary:#EDE9E0;
  --color-primary-text:#EDE9E0;
  --color-secondary:#969081;
  --color-accent:#FF8A5B;
  --color-on-primary:#121314;
  --surface-background:#121314;
  --surface-card:#1D1F21;
  --surface-elevated:#25282A;
  --card-border:rgba(237,233,224,0.13);
  --color-primary-container:#3A241C;
  --color-on-primary-container:#EDE9E0;
  --surface-container:#1D1F21;
  --text-primary:#EDE9E0;
  --text-secondary:#969081;
  --score-eagle:#D6A544;
  --score-birdie:#FF8A5B;
  --score-par:#EDE9E0;
  --score-bogey:#8892A0;
  --score-double-plus:#A6AFBC;
  --rank-first:#D6A544;
  --rank-second:#C0C0C0;
  --rank-third:#CD7F32;
}
