:root{
  /* Surfaces */
  --surface-page:var(--pia-white);
  --surface-raised:var(--pia-neutral-50);
  --surface-sunken:var(--pia-neutral-100);
  --surface-card:var(--pia-white);
  --surface-inverse:var(--pia-forest-900);
  --surface-accent-soft:var(--pia-forest-100);
  --surface-warm-soft:var(--pia-sun-100);

  /* Text - body targets 7:1 on white */
  --text-body:var(--pia-black);
  --text-heading:var(--pia-forest-900);
  --text-muted:var(--pia-neutral-600);
  --text-on-inverse:var(--pia-white);
  --text-on-inverse-muted:var(--pia-forest-200);
  --text-link:var(--pia-forest-700);
  --text-link-hover:var(--pia-sun-700);

  /* Borders. subtle/default are decorative dividers and card edges, which
     1.4.11 exempts. Anything that outlines an actual control - a text input,
     an icon button - must use --border-control (4.41:1 on white). */
  --border-subtle:var(--pia-neutral-200);
  --border-default:var(--pia-neutral-300);
  --border-control:var(--pia-neutral-500);
  --border-control-on-inverse:var(--pia-mist);
  --border-strong:var(--pia-forest-900);
  --border-focus:var(--pia-forest-900);

  /* Actions.
     Sun carries a near-black label, not white: white on Sun is 2.96:1 and
     fails 1.4.3 at every size. Black on Sun is 7.09:1, and the state ladder
     lightens so hover (8.41:1) and active (9.90:1) stay clear of the floor.
     Sun's own 2.96:1 against white means the fill cannot mark the control's
     edge on a light surface, so primary also carries a border. Sun-600 is the
     one rung that clears 3:1 on every surface the button lands on - white
     4.07, Forest-100 3.50, Forest-900 3.05 - so one border works everywhere.
     Going darker buys contrast on white and loses it against Forest. */
  --action-primary-bg:var(--pia-sun-500);
  --action-primary-bg-hover:var(--pia-sun-400);
  --action-primary-bg-active:var(--pia-sun-300);
  --action-primary-text:var(--pia-black);
  --action-primary-border:var(--pia-sun-600);

  --action-secondary-bg:var(--pia-forest-900);
  --action-secondary-bg-hover:var(--pia-forest-950);
  --action-secondary-text:var(--pia-white);

  --action-ghost-border:var(--pia-forest-900);
  --action-ghost-text:var(--pia-forest-900);
  --action-ghost-bg-hover:var(--pia-forest-100);

  --action-disabled-bg:var(--pia-neutral-200);
  --action-disabled-text:var(--pia-neutral-600);

  /* Hand-drawn motif - decorative only, never a state or a boundary */
  --motif-line:var(--pia-sun-500);
  --motif-line-quiet:var(--pia-forest-400);
  --motif-line-on-inverse:var(--pia-sun-500);

  /* Focus ring - identical everywhere, always visible. Two tones, because one
     cannot be: Forest is the ring on light surfaces, and the white inner gap
     is what carries it on the Forest sections, where a Forest ring is 1:1
     against its own background. Both are drawn always; the surface decides
     which one you see. */
  --focus-ring:var(--pia-forest-900);
  --focus-ring-contrast:var(--pia-white);
}
