/* =============================================================================
   TOKEN CONTRACT
   The single vocabulary every UI primitive is allowed to reference. Values are
   never declared here — each app (site / admin) ships its own token layer, and
   a site theme may override any of them. Because the mapping below is `inline`,
   the indirection is resolved at the point of use, so overriding a raw custom
   property inside `[data-theme]`, `.dark` or a runtime <style> block restyles
   every utility built on top of it.
   ============================================================================= */
@theme inline {
    --font-sans: var(--tk-font-sans);
    --font-display: var(--tk-font-display);
    --font-mono: var(--tk-font-mono);

    /* Surfaces, from furthest back to closest to the reader. */
    --color-canvas: var(--tk-canvas);
    --color-surface: var(--tk-surface);
    --color-surface-raised: var(--tk-surface-raised);
    --color-surface-sunken: var(--tk-surface-sunken);
    --color-surface-inverse: var(--tk-surface-inverse);

    /* Foreground ramp. */
    --color-fg: var(--tk-fg);
    --color-fg-muted: var(--tk-fg-muted);
    --color-fg-subtle: var(--tk-fg-subtle);
    --color-fg-inverse: var(--tk-fg-inverse);

    /* Lines. */
    --color-line: var(--tk-line);
    --color-line-strong: var(--tk-line-strong);
    /* A panel's outline. Rules keep --tk-line; a theme may make this transparent
       so its panels sit on the canvas by tone and shadow instead. */
    --color-frame: var(--tk-frame, var(--tk-line));

    /* Brand. Only --tk-primary needs to be set; the rest derive from it. */
    --color-primary: var(--tk-primary);
    --color-primary-hover: var(--tk-primary-hover);
    --color-primary-active: var(--tk-primary-active);
    --color-primary-soft: var(--tk-primary-soft);
    --color-primary-fg: var(--tk-primary-fg);

    --color-accent: var(--tk-accent);
    --color-accent-soft: var(--tk-accent-soft);

    /* Status. */
    --color-success: var(--tk-success);
    --color-success-soft: var(--tk-success-soft);
    --color-warning: var(--tk-warning);
    --color-warning-soft: var(--tk-warning-soft);
    --color-danger: var(--tk-danger);
    --color-danger-soft: var(--tk-danger-soft);
    --color-info: var(--tk-info);
    --color-info-soft: var(--tk-info-soft);

    /* Geometry. */
    --radius-control: var(--tk-radius-control);
    --radius-card: var(--tk-radius-card);
    --radius-panel: var(--tk-radius-panel);
    --radius-pill: var(--tk-radius-pill);

    --shadow-card: var(--tk-shadow-card);
    --shadow-raised: var(--tk-shadow-raised);
    --shadow-overlay: var(--tk-shadow-overlay);
}
