:root {
  color-scheme: light dark;

  --font-serif: 'Newsreader', 'Newsreader Fallback', 'Newsreader Fallback Times', 'Newsreader Fallback Noto', Georgia, serif;
  --font-sans: 'Public Sans', 'Public Sans Fallback', 'Public Sans Fallback Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: var(--font-sans);

  --text-display: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);
  --text-title: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  --text-headline: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --text-section: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  --text-item: 1.3125rem;
  --text-figure: clamp(2.25rem, 1.8rem + 2vw, 3rem);
  --text-lede: 1.25rem;
  --text-body: 1.0625rem;
  --text-small: 0.875rem;
  --text-caption: 0.8125rem;
  --measure: 66ch;
  --measure-lede: 40ch;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 56px;
  --space-9: 64px;
  --space-10: 96px;
  --space-block: var(--space-7);
  --space-section: var(--space-9);

  --paper: #fafaf7;
  --ink: #111418;
  --ink-2: #3b4047;
  --muted: #565c64;
  --faint: #8a8f96;
  --line: #e4e2dc;
  --line-soft: #eeede8;
  --line-strong: #d9d6ce;
  --rule: #111418;
  --surface: #ffffff;
  --panel: #f1f0eb;
  --accent: #1e46c8;
  --accent-hover: #14318f;
  --accent-fill: #1e46c8;
  --accent-fill-hover: #14318f;
  --on-accent: #ffffff;
  --button-dark: #111418;
  --on-dark: #ffffff;
  --brand-dot: #f2b33d;
  --highlight: #fceba6;

  --tag-major-bg: #fde6cc;
  --tag-major-fg: #7a3e04;
  --tag-notable-bg: #e3eafd;
  --tag-notable-fg: #1a3a9e;
  --tag-routine-bg: #eeede8;
  --tag-routine-fg: #4a4f56;
  --tag-free-bg: #dcebdd;
  --tag-free-fg: #1f4d27;
  --warn: #b45309;
  --warn-strong: #8a4b06;
  --success: #1f7a3a;
  --error: #b42318;

  --form-8k: #b42318;
  --form-10k: #b45309;
  --form-10q: #1e46c8;
  --form-insider: #6d28d9;

  --shadow: rgba(17, 20, 24, 0.1);
  --shadow-card: none;

  --radius-card: 0;
  --radius-card-sm: 0;
  --radius-button: 6px;
  --radius-button-lg: 6px;
  --radius-tag: 4px;
  --radius-image: 2px;
  --radius-pill: 999px;
  --max-width: 1320px;
  --gutter: 64px;

  --bg-primary: var(--paper);
  --bg-secondary: var(--panel);
  --bg-tertiary: var(--line-soft);
  --bg-elevated: var(--surface);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-tertiary: var(--muted);
  --text-disabled: var(--faint);
  --text-muted: var(--faint);
  --text-inverse: var(--paper);
  --text-link: var(--accent);
  --border-light: var(--line);
  --border-medium: var(--line-strong);
  --border-dark: var(--faint);
  --color-primary: var(--ink);
  --color-accent: var(--accent);
  --color-success: var(--success);
  --color-warning: var(--warn);
  --color-error: var(--error);

  --brand-icon: url('https://storage.sectracker.app/brand/icons/ai_edition_badges/badge_outline.png');
}

@media (max-width: 1099px) {
  :root {
    --gutter: 40px;
  }
}

@media (max-width: 719px) {
  :root {
    --gutter: 16px;
  }
}

@media (min-width: 720px) {
  :root {
    --text-body: 1.125rem;
    --space-block: var(--space-8);
    --space-section: var(--space-10);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1215;
    --ink: #f2f1ec;
    --ink-2: #c9ccd1;
    --muted: #a3a8af;
    --faint: #7c828a;
    --line: #2a2e34;
    --line-soft: #22262b;
    --line-strong: #3a3f46;
    --rule: #f2f1ec;
    --surface: #171a1e;
    --panel: #1c2024;
    --accent: #93acf7;
    --accent-hover: #b9c8fa;
    --accent-fill: #3358d4;
    --accent-fill-hover: #2546b8;
    --on-accent: #ffffff;
    --button-dark: #f2f1ec;
    --on-dark: #111418;
    --brand-dot: #f2b33d;
    --highlight: #5a4a12;

    --tag-major-bg: #3a2a16;
    --tag-major-fg: #f6c58e;
    --tag-notable-bg: #1e2a4d;
    --tag-notable-fg: #b5c6f8;
    --tag-routine-bg: #23272c;
    --tag-routine-fg: #b8bcc2;
    --tag-free-bg: #1e3322;
    --tag-free-fg: #a8d5ae;
    --warn: #f0a35c;
    --warn-strong: #f5b97a;
    --success: #6fcf8a;
    --error: #f38b7f;

    --form-8k: #f38b7f;
    --form-10k: #f0a35c;
    --form-10q: #93acf7;
    --form-insider: #b9a3f7;

    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-card: none;
  }
}
