/* ============================================================
   CORE TOKENS
   Source of truth — never use these directly in components.
   Use semantic tokens instead.
   ============================================================ */

:root {
   /* Color — Slate */
   --color-slate-50: #ffffff;
   --color-slate-75: #f6f7f8;
   --color-slate-100: #ebecef;
   --color-slate-200: #ced0d6;
   --color-slate-300: #b1b4bc;
   --color-slate-400: #9498a2;
   --color-slate-500: #787d88;
   --color-slate-600: #5c616d;
   --color-slate-700: #414652;
   --color-slate-800: #383d4a;
   --color-slate-900: #303541;
   --color-slate-1000: #282c38;
   --color-slate-1100: #20242f;
   --color-slate-1200: #181c25;
   --color-slate-1300: #11141b;
   --color-slate-1400: #000000;

   /* Color — Coral */
   --color-coral-700: #ff444f;
   --color-coral-800: #e12e3a;
   --color-coral-900: #c41c28;

   /* Color — Emerald */
   --color-emerald-500: #4cd6c0;
   --color-emerald-600: #00b39a;
   --color-emerald-700: #00a286;

   /* Color — Yellow */
   --color-yellow-500: #ffb84d;
   --color-yellow-600: #e4a700;

   /* Color — Blue */
   --color-blue-500: #4da6ff;
   --color-blue-600: #2f77ff;

   /* Color — Cherry */
   --color-cherry-700: #dc0000;
   --color-cherry-800: #f50032;
   --color-cherry-900: #dc002c;

   /* Color — Green (field success) */
   --color-green-600: #007a22;

   /* Color — Red (field error) */
   --color-red-600: #c40000;

   /* Color — Opacity / Green */
   --color-opacity-green-8: rgba(0, 136, 50, 0.08);
   --color-opacity-green-16: rgba(0, 136, 50, 0.16);
   --color-opacity-green-72: rgba(0, 136, 50, 0.72);
   --color-opacity-green-88: rgba(0, 136, 50, 0.88);

   /* Color — Opacity / Red */
   --color-opacity-red-8: rgba(230, 25, 14, 0.08);
   --color-opacity-red-16: rgba(230, 25, 14, 0.16);
   --color-opacity-red-72: rgba(230, 25, 14, 0.72);
   --color-opacity-red-88: rgba(230, 25, 14, 0.88);

   /* Color — Opacity / Slate */
   --color-opacity-slate-4: rgba(24, 28, 37, 0.04);
   --color-opacity-slate-8: rgba(24, 28, 37, 0.08);
   --color-opacity-slate-16: rgba(24, 28, 37, 0.16);
   --color-opacity-slate-24: rgba(24, 28, 37, 0.24);
   --color-opacity-slate-48: rgba(24, 28, 37, 0.48);
   --color-opacity-slate-72: rgba(24, 28, 37, 0.72);
   --color-opacity-slate-88: rgba(24, 28, 37, 0.88);

   /* Color — Opacity / White */
   --color-opacity-white-4: rgba(255, 255, 255, 0.04);
   --color-opacity-white-8: rgba(255, 255, 255, 0.08);
   --color-opacity-white-16: rgba(255, 255, 255, 0.16);
   --color-opacity-white-24: rgba(255, 255, 255, 0.24);
   --color-opacity-white-48: rgba(255, 255, 255, 0.48);
   --color-opacity-white-72: rgba(255, 255, 255, 0.72);
   --color-opacity-white-88: rgba(255, 255, 255, 0.88);

   /* Content Width */
   --content-width-846: 52.875rem;
   --content-width-1064: 66.5rem;
   --content-width-1280: 80rem;

   /* Spacing */
   --spacing-0: 0rem;
   --spacing-2: 0.125rem;
   --spacing-4: 0.25rem;
   --spacing-8: 0.5rem;
   --spacing-12: 0.75rem;
   --spacing-16: 1rem;
   --spacing-24: 1.5rem;
   --spacing-32: 2rem;
   --spacing-40: 2.5rem;
   --spacing-48: 3rem;
   --spacing-56: 3.5rem;
   --spacing-64: 4rem;
   --spacing-72: 4.5rem;
   --spacing-80: 5rem;
   --spacing-88: 5.5rem;
   --spacing-96: 6rem;
   --spacing-112: 7rem;

   /* Font Family */
   --font-family-base: Inter, sans-serif;

   /* Font Size — mobile (default)
       xs–lg are identical across viewports; xl–5xl scale up at tablet/desktop */
   --font-size-xs: 0.75rem;
   --font-size-sm: 0.875rem;
   --font-size-md: 1rem;
   --font-size-lg: 1.125rem;
   --font-size-xl: 1.25rem;
   /* mobile.xl  */
   --font-size-2xl: 1.5rem;
   /* mobile.2xl */
   --font-size-3xl: 2rem;
   /* mobile.3xl */
   --font-size-4xl: 2.5rem;
   /* mobile.4xl */
   --font-size-5xl: 3rem;
   /* mobile.5xl */

   /* Font Weight */
   --font-weight-regular: 400;
   --font-weight-medium: 500;
   --font-weight-semi-bold: 600;
   --font-weight-extra-bold: 800;

   /* Line Height — ratio utilities (used for body/label text) */
   --line-height-tight: 1.2;
   --line-height-snug: 1.3;
   --line-height-normal: 1.5;
   --line-height-relaxed: 1.75;

   /* Line Height — absolute, mobile (default)
       xs–lg are identical across viewports; xl–5xl scale up at tablet/desktop */
   --line-height-xs: 1.25rem;
   --line-height-sm: 1.5rem;
   --line-height-md: 1.5rem;
   --line-height-lg: 1.75rem;
   --line-height-xl: 1.75rem;
   /* mobile.xl  */
   --line-height-2xl: 2rem;
   /* mobile.2xl */
   --line-height-3xl: 2.5rem;
   /* mobile.3xl */
   --line-height-4xl: 3rem;
   /* mobile.4xl */
   --line-height-5xl: 3.5rem;
   /* mobile.5xl */

   /* Border Radius */
   --radius-none: 0;
   --radius-xs: 0.125rem;
   --radius-sm: 0.25rem;
   --radius-md: 0.5rem;
   --radius-lg: 0.75rem;
   --radius-xl: 1rem;
   --radius-2xl: 1.5rem;
   --radius-full: 9999px;

   /* Shadow */
   --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
   --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
   --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
   --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.16);
   --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.2);
}


/* ============================================================
   CORE TOKENS — responsive overrides
   font-size and line-height xl–5xl scale up at tablet/desktop
   ============================================================ */

@media (min-width: 768px) {
   :root {
      --font-size-xl: 1.5rem;
      /* tablet.xl  */
      --font-size-2xl: 2rem;
      /* tablet.2xl */
      --font-size-3xl: 2.5rem;
      /* tablet.3xl */
      --font-size-4xl: 3rem;
      /* tablet.4xl */
      --font-size-5xl: 4rem;
      /* tablet.5xl */

      --line-height-xl: 2rem;
      /* tablet.xl  */
      --line-height-2xl: 2.5rem;
      /* tablet.2xl */
      --line-height-3xl: 3rem;
      /* tablet.3xl */
      --line-height-4xl: 3.5rem;
      /* tablet.4xl */
      --line-height-5xl: 4rem;
      /* tablet.5xl */
   }
}

@media (min-width: 992px) {
   :root {
      --font-size-xl: 1.75rem;
      /* desktop.xl  */
      --font-size-2xl: 2.5rem;
      /* desktop.2xl */
      --font-size-3xl: 3rem;
      /* desktop.3xl */
      --font-size-4xl: 3.5rem;
      /* desktop.4xl */
      --font-size-5xl: 5rem;
      /* desktop.5xl */

      --line-height-xl: 2.25rem;
      /* desktop.xl  */
      --line-height-2xl: 3rem;
      /* desktop.2xl */
      --line-height-3xl: 3.5rem;
      /* desktop.3xl */
      --line-height-4xl: 4rem;
      /* desktop.4xl */
      --line-height-5xl: 5.5rem;
      /* desktop.5xl */
   }
}

/* ============================================================
   SEMANTIC TOKENS
   Use these in components. They map intent → core values.
   ============================================================ */

:root {
   /* Button — Primary */
   --button-primary-background: var(--color-coral-700);
   --button-primary-background-hover: var(--color-coral-800);
   --button-primary-background-active: var(--color-coral-900);
   --button-primary-text: var(--color-slate-50);
   --button-primary-border: var(--color-coral-700);

   /* Button — Secondary */
   --button-secondary-background: var(--color-slate-50);
   --button-secondary-background-hover: var(--color-slate-75);
   --button-secondary-background-active: var(--color-slate-100);
   --button-secondary-text: var(--color-slate-1200);
   --button-secondary-border: var(--color-slate-300);

   /* Button — Ghost */
   --button-ghost-background: var(--color-opacity-white-4);
   --button-ghost-background-hover: var(--color-opacity-white-8);
   --button-ghost-background-active: var(--color-opacity-white-16);
   --button-ghost-text: var(--color-slate-1200);
   --button-ghost-border: var(--color-opacity-white-4);

   /* Button — Danger */
   --button-danger-background: var(--color-cherry-700);
   --button-danger-background-hover: var(--color-cherry-800);
   --button-danger-background-active: var(--color-cherry-900);
   --button-danger-text: var(--color-slate-50);
   --button-danger-border: var(--color-cherry-700);

   /* Button — Disabled */
   --button-disabled-background: var(--color-slate-200);
   --button-disabled-text: var(--color-slate-500);
   --button-disabled-border: var(--color-slate-200);

   /* Link — Coral scheme */
   --link-coral-color: var(--color-coral-700);

   /* Link — Black scheme */
   --link-black-color: var(--color-slate-1300);

   /* Link — White scheme */
   --link-white-color: var(--color-slate-50);

   /* Link — Shared */
   --link-disabled-opacity: 0.24;

   /* Tag */
   --tag-fill-background: var(--color-opacity-slate-4);
   --tag-outline-border: var(--color-opacity-slate-8);
   --tag-text-color: var(--color-opacity-slate-72);

   /* Chip */
   --chip-border-color: var(--color-opacity-slate-16);
   --chip-border-width: 1px;
   --chip-text-color: var(--color-slate-1200);
   --chip-hover-background: var(--color-opacity-slate-8);
   --chip-active-background: var(--color-opacity-slate-16);
   --chip-selected-background: var(--color-opacity-slate-8);
   --chip-selected-border: var(--color-slate-1200);
   --chip-selected-border-width: 1.5px;
   --chip-selected-text: var(--color-slate-1200);
   --chip-disabled-border: var(--color-opacity-slate-8);
   --chip-disabled-text: var(--color-opacity-slate-16);
   --chip-focus-ring-color: var(--color-blue-600);

   /* Accordion */
   --accordion-divider-color: var(--color-opacity-slate-8);
   --accordion-title-color: var(--color-slate-1200);
   --accordion-body-color: var(--color-slate-1200);
   --accordion-chevron-color: var(--color-opacity-slate-72);
   --accordion-focus-ring-color: var(--color-blue-600);

   /* TextField — Surface */
   --field-surface-outline: var(--color-slate-50);
   --field-surface-fill: var(--color-opacity-slate-4);
   --field-surface-fill-hover: var(--color-opacity-slate-8);
   --field-surface-fail: var(--color-opacity-red-8);
   --field-surface-fail-hover: var(--color-opacity-red-16);
   --field-surface-success: var(--color-opacity-green-8);
   --field-surface-success-hover: var(--color-opacity-green-16);

   /* TextField — Border */
   --field-border-default: var(--color-opacity-slate-8);
   --field-border-hover: var(--color-opacity-slate-16);
   --field-border-focus: var(--color-slate-1300);
   --field-border-fail-default: var(--color-opacity-red-72);
   --field-border-fail-hover: var(--color-opacity-red-88);
   --field-border-fail-focus: var(--color-red-600);
   --field-border-success-default: var(--color-opacity-green-72);
   --field-border-success-hover: var(--color-opacity-green-88);
   --field-border-success-focus: var(--color-green-600);

   /* TextField — Text */
   --field-text-default: var(--color-opacity-slate-72);
   --field-text-focus: var(--color-slate-1300);
   --field-text-placeholder: var(--color-opacity-slate-24);
   --field-text-disabled: var(--color-opacity-slate-24);
   --field-text-subtle: var(--color-opacity-slate-48);
   --field-text-fail: var(--color-red-600);
   --field-text-success: var(--color-green-600);

   /* TextField — Icon */
   --field-icon-default: var(--color-opacity-slate-72);
   --field-icon-disabled: var(--color-opacity-slate-24);
   --field-icon-subtle: var(--color-opacity-slate-48);

   /* Breadcrumb */
   --breadcrumb-text-color: var(--color-opacity-slate-72);
   --breadcrumb-text-current-color: var(--color-opacity-slate-48);
   --breadcrumb-separator-color: var(--color-opacity-slate-48);
   --breadcrumb-focus-ring-color: var(--color-blue-600);

   /* Chip Dropdown — List panel */
   --chip-dropdown-list-bg: var(--color-slate-50);
   --chip-dropdown-list-border: var(--color-opacity-slate-4);
   --chip-dropdown-list-shadow: 0 16px 24px rgba(0, 0, 0, 0.04), 0 16px 24px rgba(0, 0, 0, 0.02);

   /* Chip Dropdown — List item */
   --chip-dropdown-item-text: var(--color-opacity-slate-72);
   --chip-dropdown-item-hover-bg: var(--color-opacity-slate-8);
   --chip-dropdown-item-active-bg: var(--color-opacity-slate-16);
   --chip-dropdown-item-selected-check: var(--color-opacity-slate-72);

   /* ── Typography — Headings ──────────────────────────────────
       font-size and line-height are responsive because the core
       --font-size-* / --line-height-* vars override at each
       breakpoint in the core section above.
       ────────────────────────────────────────────────────────── */

   /* Typography — H1 */
   --typography-h1-font-family: var(--font-family-base);
   --typography-h1-font-size: var(--font-size-5xl);
   /* mobile: 3rem → tablet: 4rem → desktop: 5rem */
   --typography-h1-font-weight: var(--font-weight-extra-bold);
   /* 800 — all viewports */
   --typography-h1-line-height: var(--line-height-5xl);
   /* mobile: 3.5rem → tablet: 4rem → desktop: 5.5rem */

   /* Typography — H2 */
   --typography-h2-font-family: var(--font-family-base);
   --typography-h2-font-size: var(--font-size-4xl);
   /* mobile: 2.5rem → tablet: 3rem → desktop: 3.5rem */
   --typography-h2-font-weight: var(--font-weight-extra-bold);
   /* 800 — all viewports */
   --typography-h2-line-height: var(--line-height-4xl);
   /* mobile: 3rem → tablet: 3.5rem → desktop: 4rem */

   /* Typography — H3 */
   --typography-h3-font-family: var(--font-family-base);
   --typography-h3-font-size: var(--font-size-3xl);
   /* mobile: 2rem → tablet: 2.5rem → desktop: 3rem */
   --typography-h3-font-weight: var(--font-weight-extra-bold);
   /* 800 — all viewports */
   --typography-h3-line-height: var(--line-height-3xl);
   /* mobile: 2.5rem → tablet: 3rem → desktop: 3.5rem */

   /* Typography — H4 */
   --typography-h4-font-family: var(--font-family-base);
   --typography-h4-font-size: var(--font-size-2xl);
   /* mobile: 1.5rem → tablet: 2rem → desktop: 2.5rem */
   --typography-h4-font-weight: var(--font-weight-extra-bold);
   /* 800 — all viewports */
   --typography-h4-line-height: var(--line-height-2xl);
   /* mobile: 2rem → tablet: 2.5rem → desktop: 3rem */

   /* Typography — H5 */
   --typography-h5-font-family: var(--font-family-base);
   --typography-h5-font-size: var(--font-size-xl);
   /* mobile: 1.25rem → tablet: 1.5rem → desktop: 1.75rem */
   --typography-h5-font-weight: var(--font-weight-extra-bold);
   /* 800 — all viewports */
   --typography-h5-line-height: var(--line-height-xl);
   /* mobile: 1.75rem → tablet: 2rem  → desktop: 2.25rem */

   /* ── Typography — Body ──────────────────────────────────────
       xs–lg are identical across all viewports — no responsive
       overrides needed.
       ────────────────────────────────────────────────────────── */

   /* Typography — body-lg */
   --typography-body-lg-font-family: var(--font-family-base);
   --typography-body-lg-font-size: var(--font-size-lg);
   /* 1.125rem (18px) — all viewports */
   --typography-body-lg-font-weight: var(--font-weight-regular);
   /* 400 */
   --typography-body-lg-line-height: var(--line-height-lg);
   /* 1.75rem (28px) — all viewports */

   /* Typography — body-md */
   --typography-body-md-font-family: var(--font-family-base);
   --typography-body-md-font-size: var(--font-size-md);
   /* 1rem (16px) — all viewports */
   --typography-body-md-font-weight: var(--font-weight-regular);
   /* 400 */
   --typography-body-md-line-height: var(--line-height-md);
   /* 1.5rem (24px) — all viewports */

   /* Typography — body-sm */
   --typography-body-sm-font-family: var(--font-family-base);
   --typography-body-sm-font-size: var(--font-size-sm);
   /* 0.875rem (14px) — all viewports */
   --typography-body-sm-font-weight: var(--font-weight-regular);
   /* 400 */
   --typography-body-sm-line-height: var(--line-height-sm);
   /* 1.5rem (24px) — all viewports */

   /* Typography — body-xs */
   --typography-body-xs-font-family: var(--font-family-base);
   --typography-body-xs-font-size: var(--font-size-xs);
   /* 0.75rem (12px) — all viewports */
   --typography-body-xs-font-weight: var(--font-weight-regular);
   /* 400 */
   --typography-body-xs-line-height: var(--line-height-xs);
   /* 1.25rem (20px) — all viewports */

   /* ── Typography — Labels ────────────────────────────────────
       ────────────────────────────────────────────────────────── */

   /* Typography — label-lg */
   --typography-label-lg-font-family: var(--font-family-base);
   --typography-label-lg-font-size: var(--font-size-lg);
   /* 1.125rem (18px) */
   --typography-label-lg-font-weight: var(--font-weight-regular);
   /* 400 */
   --typography-label-lg-line-height: var(--line-height-lg);
   /* 1.75rem (28px) */

   /* Typography — label-md */
   --typography-label-md-font-family: var(--font-family-base);
   --typography-label-md-font-size: var(--font-size-md);
   /* 1rem (16px) */
   --typography-label-md-font-weight: var(--font-weight-regular);
   /* 400 */
   --typography-label-md-line-height: var(--line-height-md);
   /* 1.5rem (24px) */

   /* Typography — label-sm */
   --typography-label-sm-font-family: var(--font-family-base);
   --typography-label-sm-font-size: var(--font-size-xs);
   /* 0.75rem (12px) */
   --typography-label-sm-font-weight: var(--font-weight-regular);
   /* 400 */
   --typography-label-sm-line-height: var(--line-height-xs);
   /* 1.25rem (20px) */

   /* ── Typography — Caption ───────────────────────────────────
       ────────────────────────────────────────────────────────── */
   --typography-caption-font-family: var(--font-family-base);
   --typography-caption-font-size: var(--font-size-xs);
   /* 0.75rem (12px) */
   --typography-caption-font-weight: var(--font-weight-regular);
   /* 400 */
   --typography-caption-line-height: var(--line-height-xs);
   /* 1.25rem (20px) */

   /* ── Typography — Link ──────────────────────────────────────
       ────────────────────────────────────────────────────────── */
   --typography-link-md-font-family: var(--font-family-base);
   --typography-link-md-font-size: var(--font-size-md);
   /* 1rem (16px) */
   --typography-link-md-font-weight: var(--font-weight-semi-bold);
   /* 600 */
   --typography-link-md-line-height: var(--line-height-md);
   /* 1.5rem (24px) */

   /* Pagination — Page */
   --pagination-page-radius: var(--radius-full);
   --pagination-page-text: var(--color-opacity-slate-72);
   --pagination-page-selected-bg: var(--color-slate-1400);
   --pagination-page-selected-text: var(--color-slate-50);
   --pagination-page-ellipsis-text: var(--color-opacity-slate-24);

   /* Pagination — Nav */
   --pagination-nav-icon: var(--color-slate-1400);
   --pagination-nav-icon-disabled: var(--color-opacity-slate-24);

   /* Bottom Sheet */
   --bottom-sheet-overlay-bg: var(--color-opacity-slate-72);
   --bottom-sheet-bg: var(--color-slate-50);
   --bottom-sheet-handle-color: var(--color-opacity-slate-24);
   --bottom-sheet-title-color: var(--color-slate-1200);
   --bottom-sheet-close-icon-color: var(--color-slate-1200);
   --bottom-sheet-close-hover-bg: var(--color-opacity-slate-8);
   --bottom-sheet-close-active-bg: var(--color-opacity-slate-16);
   --bottom-sheet-focus-ring-color: var(--color-blue-600);
   --bottom-sheet-shadow: var(--shadow-lg);
   --bottom-sheet-action-primary-bg: var(--color-slate-1200);
   --bottom-sheet-action-primary-bg-hover: var(--color-slate-1100);
   --bottom-sheet-action-primary-bg-active: var(--color-slate-1000);
   --bottom-sheet-action-primary-text: var(--color-slate-50);
   --bottom-sheet-action-secondary-border: var(--color-slate-1200);
   --bottom-sheet-action-secondary-text: var(--color-slate-1200);
   --bottom-sheet-action-secondary-hover-bg: var(--color-opacity-slate-8);
   --bottom-sheet-action-secondary-active-bg: var(--color-opacity-slate-16);
   --bottom-sheet-list-item-border: var(--color-opacity-slate-8);

   /* Text Color */
   --text-primary: var(--color-slate-1200);
   --text-secondary: var(--color-slate-1000);
   --text-tertiary: var(--color-slate-500);
   --text-disabled: var(--color-slate-400);
   --text-inverse: var(--color-slate-50);
   --text-brand: var(--color-coral-700);
   --text-success: var(--color-emerald-700);
   --text-warning: var(--color-yellow-600);
   --text-danger: var(--color-cherry-700);

   /* Icon Color */
   --icon-primary: var(--color-slate-1200);
   --icon-secondary: var(--color-slate-700);
   --icon-tertiary: var(--color-slate-500);
   --icon-disabled: var(--color-slate-400);
   --icon-inverse: var(--color-slate-50);
   --icon-brand: var(--color-coral-700);
   --icon-success: var(--color-emerald-700);
   --icon-warning: var(--color-yellow-600);
   --icon-danger: var(--color-cherry-700);
   --icon-info: var(--color-blue-600);

   /* Background */
   --background-page: var(--color-slate-50);
   --background-surface: var(--color-slate-50);
   --background-surface-secondary: var(--color-slate-75);
   --background-surface-tertiary: var(--color-slate-100);
   --background-surface-inverse: var(--color-slate-1200);
   --background-brand: var(--color-coral-700);

   /* Border */
   --border-subtle: var(--color-slate-200);
   --border-default: var(--color-slate-300);
   --border-strong: var(--color-slate-1200);
   --border-inverse: var(--color-slate-50);
   --border-brand: var(--color-coral-700);
   --border-focus: var(--color-blue-600);
   --border-success: var(--color-emerald-700);
   --border-warning: var(--color-yellow-600);
   --border-danger: var(--color-cherry-700);
   --border-disabled: var(--color-slate-200);

   /* Footer */
   --footer-background: var(--color-slate-1200);
   --footer-surface: var(--color-slate-1100);
   --footer-header-divider: var(--color-opacity-white-16);
   --footer-divider-desktop: var(--color-opacity-white-16);
   --footer-nav-title-color: var(--color-opacity-white-88);
   --footer-nav-link-color: var(--color-slate-200);
   --footer-social-icon-color: var(--color-slate-200);
   --footer-legal-text-color: var(--color-opacity-white-48);
   --footer-accordion-text-color: var(--color-slate-50);
   --footer-accordion-chevron-color: var(--color-slate-50);
   --footer-app-badge-border: var(--color-opacity-white-8);
}