/* =====================================================================
   Sage & Stone — variant palette of Inkwell.
   Override-only: load this AFTER inkwell.css to switch the brand layer.

   Default canonical palette is Indigo & Cloud (see inkwell-tokens.css).
   This file redefines surface + accent + neutral tokens only; all
   structural rules (1.5px borders, type scale, spacing, motion,
   components) come from inkwell-components.css unchanged.

   3.0: single light-dark() declarations. Derived tints (focus ring,
   strong border) are inherited from the canonical color-mix() rules —
   they track this file's --accent automatically. --accent-tint is
   redeclared because sage's dark alpha (18%) differs from canonical's
   hand-tuned 10%.
   ===================================================================== */

:root {
  /* ---------- Surfaces ---------- */
  --ivory: light-dark(#F6F4EE, #13140F);
  --paper: light-dark(#FFFFFF, #1B1D17);
  --slate: light-dark(#181816, #E8E8E0);
  --oat:   light-dark(#DDD9CE, #363932);

  /* ---------- Accent (sage forest green, lifted in dark) ---------- */
  --accent:   light-dark(#3F7C5C, #6FA585);
  --accent-d: light-dark(#2D5E44, #7FB294); /* dark hover LIGHTENS — paper label on old #578D6E read 4.41:1; lifted value reads 7.04:1 */
  --accent-tint: light-dark(
    color-mix(in srgb, var(--accent) 14%, transparent),
    color-mix(in srgb, var(--accent) 18%, transparent));
  --accent-ink: light-dark(#3A7456, #6FA585); /* sage as text — 5.0:1 on ivory (raw #3F7C5C reads 4.49:1); dark = lifted accent */
  /* no --on-accent override: white on #3F7C5C is 4.94:1, passes AA */

  /* ---------- Neutral scale (warm stone) ---------- */
  --gray-100: light-dark(#EBE9E1, #22241E);
  --gray-200: light-dark(#DFDCD2, #2A2C26);
  --gray-300: light-dark(#CDCAC0, #373A33);
  --gray-400: light-dark(#8C8A80, #6E6F63);
  --gray-500: light-dark(#6B6962, #9A9A91); /* light was #84827B (3.5:1 on ivory) — AA on ivory+paper */
  --gray-700: light-dark(#3A3A36, #BFBFB6);
}

/* Select chevrons mirror this palette's --gray-500 in each mode.
   SVG data URIs cannot inherit CSS variables; keep the native select markup. */
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%236B6962' stroke-width='1.5' stroke-linecap='round'/></svg>");
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%239A9A91' stroke-width='1.5' stroke-linecap='round'/></svg>");
  }
}
@media screen {
  :root[data-theme="dark"] .select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%239A9A91' stroke-width='1.5' stroke-linecap='round'/></svg>");
  }
}
