/**
 * KI-PraxisTests – Modern Finance
 * Tokens only: no component or page selectors.
 *
 * VERIFIED brand values are taken from the public ki-praxistests.de homepage
 * on 2026-10-09. EXTENDED values are proposals for the trading application.
 */

:root {
  color-scheme: light;

  /* VERIFIED: corporate identity */
  --brand-paper: #f6f4ee;
  --brand-ink: #14243a;
  --brand-muted: #5d6876;
  --brand-accent: #167481;
  --brand-surface-translucent: rgba(255, 255, 255, 0.78);
  --brand-line: rgba(20, 36, 58, 0.14);
  --brand-shadow-xl: 0 24px 70px rgba(20, 36, 58, 0.12);
  --brand-warm-glow: rgba(217, 157, 76, 0.12);

  /* EXTENDED: application neutrals */
  --color-white: #ffffff;
  --color-canvas: var(--brand-paper);
  --color-canvas-dense: #f2f4f6;
  --color-surface: var(--color-white);
  --color-surface-subtle: #fafbfb;
  --color-surface-selected: #e8f3f4;
  --color-text: var(--brand-ink);
  --color-text-muted: var(--brand-muted);
  --color-text-on-dark: #ffffff;
  --color-border: var(--brand-line);
  --color-border-strong: rgba(20, 36, 58, 0.28);
  /* EXTENDED (Prüfung AP-D1, M2): Rand von Eingabefeldern und Bedienelementen, 3,6:1 auf Weiß */
  --color-border-control: rgba(20, 36, 58, 0.55);
  --color-sidebar: var(--brand-ink);
  --color-sidebar-hover: #203a5b;
  /* EXTENDED (AP-D1): sidebar text with graded opacity, overlay behind mobile navigation */
  --color-sidebar-text: rgba(255, 255, 255, 0.86);
  --color-sidebar-text-muted: rgba(255, 255, 255, 0.68);
  --color-sidebar-line: rgba(255, 255, 255, 0.14);
  --color-sidebar-active: rgba(255, 255, 255, 0.12);
  --color-focus-ring-on-dark: rgba(255, 255, 255, 0.85);
  --color-overlay: rgba(20, 36, 58, 0.48);

  /* EXTENDED: interactive and status colors */
  --color-action: var(--brand-accent);
  --color-action-hover: #0f5d67;
  --color-action-active: #0b4b54;
  --color-focus-ring: rgba(22, 116, 129, 0.35);
  --color-positive: #137a4b;
  --color-positive-bg: #e8f5ee;
  --color-negative: #b42318;
  --color-negative-bg: #fdf0ee;
  /* Prüfung AP-D1, M2: vorher #b65d0e (4,3:1 auf warning-bg), jetzt 5,1:1 */
  --color-warning: #a3530c;
  --color-warning-bg: #fff5e7;
  --color-info: #1f5f8b;
  --color-info-bg: #eaf3f8;

  /* EXTENDED: charts; order conveys no status meaning */
  --chart-series-1: #167481;
  --chart-series-2: #1f5f8b;
  --chart-series-3: #7357a6;
  --chart-series-4: #b65d0e;
  --chart-series-5: #5d6876;
  --chart-grid: rgba(20, 36, 58, 0.10);
  --chart-axis: #5d6876;
  --chart-tooltip-bg: #14243a;
  --chart-tooltip-text: #ffffff;

  /* Typography: no remote font dependency */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-brand: Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: clamp(1.75rem, 2.5vw, 2.25rem);
  --line-height-tight: 1.2;
  --line-height-body: 1.55;
  --font-weight-normal: 400;
  --font-weight-medium: 600;
  --font-weight-bold: 750;

  /* 4 px spacing grid */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-brand: 1.75rem;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 36, 58, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 36, 58, 0.08);
  --shadow-lg: 0 16px 40px rgba(20, 36, 58, 0.10);

  --border-width: 1px;
  --focus-width: 3px;
  --control-height-sm: 2rem;
  --control-height-md: 2.75rem;
  --control-height-lg: 3rem;
  --tap-target-min: 2.75rem;

  --sidebar-width: 16rem;
  --sidebar-width-collapsed: 4.5rem;
  --content-max: 90rem;
  --content-reading-max: 52rem;
  --chart-min-height: 22rem;

  --duration-fast: 120ms;
  --duration-normal: 180ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  --z-base: 0;
  --z-sticky: 20;
  --z-dropdown: 40;
  --z-modal: 60;
  --z-toast: 80;
}

@media (max-width: 48rem) {
  :root {
    --chart-min-height: 17rem;
    --radius-brand: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
  }
}

