/* ==========================================================================
   tk-tokens.css — The Konceptuals design tokens (Phase 2.4).
   Premium medical-education feel: clean white/off-white surfaces, strong ink
   text, muted teal primary, amber accent, restrained coral/error, soft
   neutral borders. Radius 8px or less. Mobile-first 375px first-class.
   Loaded AFTER legacy CSS so modern page CSS can override safely.
   These are :root variables + reduced-motion behavior only — no element
   selectors that could collide with legacy Bootstrap/Style.
   ========================================================================== */

:root {
    /* --- Color: surfaces & ink --- */
    --tk-surface: #ffffff;
    --tk-surface-muted: #f7f8f9;
    --tk-surface-alt: #eef1f3;
    --tk-ink: #1a1f24;
    --tk-ink-soft: #4a525c;
    --tk-ink-faint: #6b7480;
    --tk-border: #e2e6ea;
    --tk-border-strong: #c9d0d6;

    /* --- Color: brand (muted teal primary, amber accent) --- */
    --tk-primary: #14808a;          /* muted teal */
    --tk-primary-hover: #0f6671;
    --tk-primary-soft: #e3f3f4;
    --tk-accent: #e0a106;           /* amber */
    --tk-accent-soft: #fbf2d8;

    /* --- Color: states --- */
    --tk-success: #1f8a4c;
    --tk-success-soft: #e4f4ea;
    --tk-warning: #b8760b;
    --tk-warning-soft: #fbf0d6;
    --tk-error: #c9433a;            /* restrained coral/red */
    --tk-error-soft: #fbe9e7;

    /* --- Focus ring (accessibility) --- */
    --tk-focus-ring: 0 0 0 3px rgba(20, 128, 138, 0.35);

    /* --- Type scale (mobile-first; 1rem = 16px) --- */
    --tk-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --tk-fs-xs: 0.75rem;    /* 12px */
    --tk-fs-sm: 0.875rem;   /* 14px */
    --tk-fs-base: 1rem;     /* 16px */
    --tk-fs-md: 1.125rem;   /* 18px */
    --tk-fs-lg: 1.375rem;   /* 22px */
    --tk-fs-xl: 1.75rem;    /* 28px */
    --tk-fs-2xl: 2.25rem;   /* 36px */
    --tk-line-tight: 1.25;
    --tk-line-normal: 1.55;

    /* --- Spacing scale --- */
    --tk-space-1: 0.25rem;
    --tk-space-2: 0.5rem;
    --tk-space-3: 0.75rem;
    --tk-space-4: 1rem;
    --tk-space-5: 1.5rem;
    --tk-space-6: 2rem;
    --tk-space-7: 3rem;
    --tk-space-8: 4rem;

    /* --- Radius (8px or less per design direction) --- */
    --tk-radius-sm: 4px;
    --tk-radius: 6px;
    --tk-radius-lg: 8px;

    /* --- Shadow / depth (soft) --- */
    --tk-shadow-sm: 0 1px 2px rgba(26, 31, 36, 0.06);
    --tk-shadow: 0 2px 8px rgba(26, 31, 36, 0.08);
    --tk-shadow-lg: 0 8px 24px rgba(26, 31, 36, 0.12);

    /* --- Layout --- */
    --tk-container-max: 1200px;
    --tk-container-narrow: 760px;
    --tk-touch-target: 44px;        /* a11y: min touch target */

    /* --- Motion --- */
    --tk-transition: 150ms ease;
}

/* --- Reduced motion: disable non-essential animation (accessibility) --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
