/*
 * Increased contrast.
 *
 * A request for more contrast is about the faint end of each ramp — quiet text
 * and hairline edges — not about the whole palette. Brand hues, surfaces, and
 * every on-color pairing stay exactly as authored, so no component opts in and
 * no contrast pair that already passed gets re-tuned.
 *
 * Every declaration here reads a token this block does not itself reassign.
 * Custom properties resolve to the winning value, so a chain of promotions
 * inside one block (subtle -> muted -> base) would collapse all three onto the
 * base and flatten the hierarchy instead of raising it. Borders deliberately do
 * collapse — a divider that cannot be seen has no hierarchy to preserve — while
 * text keeps three distinguishable steps, measured against the canvas.
 *
 * Remapping the resolved aliases rather than the -light/-dark inputs means one
 * block covers system dark mode, both data-theme choices, and the light-dark()
 * path together.
 */
@media (prefers-contrast: more) {
  :root {
    /* Secondary text is the first thing to go. Muted reaches full foreground;
       the two steps below it stay apart by mixing toward the canvas rather
       than by referencing each other. */
    --sigvelo-color-text-muted: var(--sigvelo-color-text);
    --sigvelo-color-text-subtle: color-mix(
      in oklab,
      var(--sigvelo-color-text),
      var(--sigvelo-color-canvas) 20%
    );
    --sigvelo-color-text-faint: color-mix(
      in oklab,
      var(--sigvelo-color-text),
      var(--sigvelo-color-canvas) 35%
    );

    /* Hairlines at the subtle and muted steps round to nothing at this
       contrast level, so both take the solid border for their hue. */
    --sigvelo-color-neutral-border-subtle: var(--sigvelo-color-neutral-border);
    --sigvelo-color-neutral-border-muted: var(--sigvelo-color-neutral-border);
    --sigvelo-color-primary-border-subtle: var(--sigvelo-color-primary-border);
    --sigvelo-color-primary-border-muted: var(--sigvelo-color-primary-border);
    --sigvelo-color-success-border-subtle: var(--sigvelo-color-success-border);
    --sigvelo-color-success-border-muted: var(--sigvelo-color-success-border);
    --sigvelo-color-warning-border-subtle: var(--sigvelo-color-warning-border);
    --sigvelo-color-warning-border-muted: var(--sigvelo-color-warning-border);
    --sigvelo-color-danger-border-subtle: var(--sigvelo-color-danger-border);
    --sigvelo-color-danger-border-muted: var(--sigvelo-color-danger-border);
  }
}
