/*
 * Mondigo design tokens v4.0 — application foundation.
 * Csendes jobbkéz / Rendezett lendület.
 *
 * The legacy aliases at the end intentionally keep the current HTML working
 * while individual screens migrate to semantic mq-* components.
 */

:root {
  /* Brand neutrals */
  --mq-ink-950: #102038;
  --mq-ink-900: #172A45;
  --mq-ink-800: #29415F;
  --mq-ink-700: #445C78;
  --mq-ink-600: #64748B;
  --mq-ink-500: #7C8BA0;
  --mq-ink-300: #C8D0DA;
  --mq-ink-200: #DDE3EA;
  --mq-ink-100: #EEF2F5;

  /* Brand green: action, progress and readiness */
  --mq-green-800: #0A6B42;
  --mq-green-700: #0B7A49;
  --mq-green-600: #0F8F56;
  --mq-green-500: #16A665;
  --mq-green-200: #BFE7D1;
  --mq-green-100: #DDF3E7;
  --mq-green-50: #EFF9F3;

  /* Ordered and warm surfaces */
  --mq-cream-100: #FBF7EA;
  --mq-cream-50: #FFFCF4;
  --mq-white: #FFFFFF;
  --mq-sand-200: #E9E1CE;
  --mq-sand-100: #F2ECDE;

  /* Source provenance only — never workflow status or CTA */
  --mq-clay-700: #91452F;
  --mq-clay-500: #C86A4A;
  --mq-clay-200: #EDB7A5;
  --mq-clay-100: #F6DDD4;
  --mq-clay-50: #FCF3EF;

  /* Semantic colours */
  --mq-yellow-700: #A66A00;
  --mq-yellow-500: #EAA31A;
  --mq-yellow-100: #FFF0C7;
  --mq-red-700: #B42318;
  --mq-red-100: #FEE4E2;
  --mq-blue-700: #175CD3;
  --mq-blue-100: #DCEBFF;
  --mq-purple-700: #6941C6;
  --mq-purple-100: #ECE9FE;

  /* Canonical semantic aliases */
  --bg-page: var(--mq-cream-50);
  --bg-surface: var(--mq-white);
  --bg-subtle: #F7F9F8;
  --bg-sidebar: #FBFCFC;
  --text-primary: var(--mq-ink-950);
  --text-secondary: var(--mq-ink-700);
  --text-muted: var(--mq-ink-600);
  --text-disabled: var(--mq-ink-500);
  --border-default: #D8E0DD;
  --border-strong: #B7C4BF;
  --brand-primary: var(--mq-green-700);
  --brand-primary-hover: var(--mq-green-800);
  --brand-soft: var(--mq-green-50);
  --source-accent: var(--mq-clay-700);
  --source-accent-live: var(--mq-clay-500);
  --source-border: var(--mq-clay-200);
  --source-soft: var(--mq-clay-50);
  --source-surface: var(--mq-clay-100);
  --ordered-surface: var(--mq-white);
  --review-text: var(--mq-ink-950);
  --review-border: var(--mq-yellow-500);
  --review-surface: var(--mq-yellow-100);
  --focus-ring: #0F8F56;
  --success: var(--mq-green-700);
  --success-bg: var(--mq-green-100);
  --warning: var(--mq-yellow-700);
  --warning-bg: var(--mq-yellow-100);
  --danger: var(--mq-red-700);
  --danger-bg: var(--mq-red-100);
  --info: var(--mq-blue-700);
  --info-bg: var(--mq-blue-100);
  --future-collaboration: var(--mq-purple-700);
  --future-collaboration-bg: var(--mq-purple-100);

  /* Typography */
  --font-display: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --type-display-xl: clamp(2.75rem, 6vw, 5.75rem);
  --type-display-lg: clamp(2.375rem, 5vw, 4rem);
  --type-heading-xl: clamp(1.875rem, 3vw, 2.75rem);
  --type-heading-lg: clamp(1.625rem, 2.5vw, 2rem);
  --type-heading-md: 1.5rem;
  --type-heading-sm: 1.25rem;
  --type-body-lg: 1.125rem;
  --type-body-md: 1rem;
  --type-body-sm: .875rem;
  --type-label: .8125rem;
  --type-micro: .75rem;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 650;
  --weight-bold: 750;
  --weight-extrabold: 850;
  --leading-display: .96;
  --leading-heading: 1.15;
  --leading-body: 1.5;
  --leading-small: 1.4;

  /* Spacing */
  --mq-s-1: 4px;
  --mq-s-2: 8px;
  --mq-s-3: 12px;
  --mq-s-4: 16px;
  --mq-s-5: 20px;
  --mq-s-6: 24px;
  --mq-s-8: 32px;
  --mq-s-10: 40px;
  --mq-s-12: 48px;
  --mq-s-16: 64px;
  --mq-s-20: 80px;

  /* Shape and elevation */
  --mq-r-sm: 8px;
  --mq-r-md: 12px;
  --mq-r-lg: 16px;
  --mq-r-xl: 24px;
  --mq-r-2xl: 30px;
  --mq-r-pill: 999px;
  --mq-shadow-1: 0 1px 2px rgba(16, 32, 56, .05), 0 1px 3px rgba(16, 32, 56, .06);
  --mq-shadow-2: 0 8px 24px rgba(16, 32, 56, .08), 0 2px 6px rgba(16, 32, 56, .05);
  --mq-shadow-3: 0 20px 55px rgba(16, 32, 56, .12);
  --mq-shadow-sticky: 0 -8px 28px rgba(16, 32, 56, .10);

  /* Interaction and layout */
  --mq-ease-standard: cubic-bezier(.2, .8, .2, 1);
  --mq-dur-fast: 120ms;
  --mq-dur-normal: 200ms;
  --mq-dur-slow: 320ms;
  --mq-dur-organize: 520ms;
  --mq-touch-min: 44px;
  --mq-touch-preferred: 48px;
  --mq-touch-field: 52px;
  --mq-content-reading: 760px;
  --mq-content-max: 1440px;
  --mq-content-wide-max: 1680px;
  --mq-sidebar-w: 252px;
  --mq-sidebar-compact-w: 72px;
  --mq-preview-min: 380px;
  --mq-mobile-gutter: 16px;
  --mq-tablet-gutter: 24px;
  --mq-desktop-gutter: 32px;
  --mq-safe-bottom: env(safe-area-inset-bottom, 0px);
  --z-base: 0;
  --z-sticky: 20;
  --z-navigation: 30;
  --z-popover: 40;
  --z-dialog: 50;
  --z-toast: 60;
  --z-system: 70;
  /* Documentation constants; custom properties cannot drive @media rules. */
  --breakpoint-mobile-max: 599px;
  --breakpoint-tablet-max: 899px;
  --breakpoint-compact-desktop-max: 1199px;
  --breakpoint-desktop-max: 1599px;

  /* Compatibility aliases for the existing landing component layer. */
  --color-bg: var(--bg-page);
  --color-surface: var(--bg-surface);
  --color-surface-sunken: var(--bg-subtle);
  --color-surface-warm: var(--mq-cream-100);
  --color-text: var(--text-primary);
  --color-text-muted: var(--text-muted);
  --color-text-on-brand: var(--mq-white);
  --color-border: var(--border-default);
  --color-border-strong: var(--border-strong);
  --color-primary: var(--brand-primary);
  --color-primary-hover: var(--brand-primary-hover);
  --color-primary-tint: var(--brand-soft);
  --color-focus: var(--brand-primary);
  --color-success: var(--success);
  --color-success-tint: var(--success-bg);
  --color-warning: var(--warning);
  --color-warning-fill: var(--mq-yellow-500);
  --color-warning-tint: var(--warning-bg);
  --color-danger: var(--danger);
  --color-danger-tint: var(--danger-bg);
  --color-accent: var(--brand-primary);
  --color-accent-dk: var(--brand-primary-hover);
  --color-accent-tint: var(--brand-soft);

  --radius-xs: var(--mq-r-sm);
  --radius-sm: var(--mq-r-sm);
  --radius-md: var(--mq-r-md);
  --radius-lg: var(--mq-r-lg);
  --radius-xl: var(--mq-r-xl);
  --radius-full: var(--mq-r-pill);
  --shadow-xs: var(--mq-shadow-1);
  --shadow-sm: var(--mq-shadow-1);
  --shadow-md: var(--mq-shadow-2);
  --shadow-lg: var(--mq-shadow-3);
  --shadow-focus: 0 0 0 3px rgba(15, 143, 86, .28);

  /* Compatibility aliases for the current application and client quote. */
  --teal: var(--brand-primary);
  --teal-d: var(--brand-primary-hover);
  --teal-l: var(--brand-soft);
  --ink: var(--text-primary);
  --muted: var(--text-muted);
  --line: var(--border-default);
  --bg: var(--bg-page);
  --card: var(--bg-surface);
  --ok: var(--success);
  --warn: var(--warning);
  --err: var(--danger);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --mq-dur-fast: .001ms;
    --mq-dur-normal: .001ms;
    --mq-dur-slow: .001ms;
    --mq-dur-organize: .001ms;
  }
}
