:root {
  --cq-font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cq-font-editorial: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;

  --cq-color-ink-950: #0b1220;
  --cq-color-ink-800: #1e293b;
  --cq-color-ink-600: #475569;
  --cq-color-line: #e2e8f0;
  --cq-color-canvas: #f8fafc;
  --cq-color-surface: #ffffff;
  --cq-color-brand: #356fe8;
  --cq-color-brand-strong: #2455bd;
  --cq-color-editorial: #b7791f;
  --cq-color-student: #2563eb;
  --cq-color-ai: #7c3aed;
  --cq-color-success: #047857;
  --cq-color-warning: #b45309;
  --cq-color-danger: #b91c1c;

  --cq-domain-accent: var(--cq-color-brand);
  --cq-domain-accent-strong: var(--cq-color-brand-strong);
  --cq-radius-sm: 0.625rem;
  --cq-radius-md: 0.875rem;
  --cq-radius-lg: 1.25rem;
  --cq-radius-xl: 1.75rem;
  --cq-shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
  --cq-shadow-md: 0 16px 40px rgb(15 23 42 / 0.08);
  --cq-shadow-lg: 0 28px 80px rgb(15 23 42 / 0.12);
  --cq-motion-fast: 140ms;
  --cq-motion-normal: 220ms;
  --cq-focus-ring: 0 0 0 4px color-mix(in srgb, var(--cq-domain-accent) 18%, transparent);
}

[data-product-surface="blog"] {
  --cq-domain-accent: var(--cq-color-editorial);
  --cq-domain-accent-strong: #92400e;
}

[data-product-surface="student"] {
  --cq-domain-accent: var(--cq-color-student);
  --cq-domain-accent-strong: #1d4ed8;
}

[data-product-surface="ai"] {
  --cq-domain-accent: var(--cq-color-ai);
  --cq-domain-accent-strong: #6d28d9;
}

[data-product-surface="platform"] {
  --cq-domain-accent: var(--cq-color-brand);
  --cq-domain-accent-strong: var(--cq-color-brand-strong);
}

html {
  color-scheme: light;
  font-family: var(--cq-font-ui);
  text-rendering: optimizeLegibility;
}

::selection {
  background: color-mix(in srgb, var(--cq-domain-accent) 20%, white);
  color: var(--cq-color-ink-950);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--cq-domain-accent);
  outline-offset: 3px;
  box-shadow: var(--cq-focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
