: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);

  /* tokens:light:start */
  --paper: #faf7f0;
  --ink: #111418;
  --ink-2: #3b4047;
  --muted: #565c64;
  --faint: #8a8f96;
  --line: #e6e0d2;
  --line-soft: #efeadf;
  --line-strong: #d6cdb9;
  --rule: #a8781f;
  --surface: #fffdf8;
  --panel: #f3eee2;
  --accent: #1c3a7a;
  --accent-hover: #0e224e;
  --accent-fill: #0e224e;
  --accent-fill-hover: #1c3a7a;
  --on-accent: #faf7f0;
  --button-dark: #0e224e;
  --on-dark: #faf7f0;
  --gold: #a8781f;
  --gold-type: #8c5c16;
  --gold-mark: #d49e3a;
  --brand-dot: #c48e2c;
  --highlight: #f6e3b0;
  --tag-major-bg: #f8e4c8;
  --tag-major-fg: #7a3e04;
  --tag-notable-bg: #e3e8f2;
  --tag-notable-fg: #1c3a7a;
  --tag-routine-bg: #efeadf;
  --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: #1c3a7a;
  --form-insider: #6d28d9;
  --shadow: rgba(14, 34, 78, 0.1);
  /* tokens:light:end */

  --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(--button-dark);
  --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 {
    /* tokens:dark:start */
    --paper: #0b1426;
    --ink: #f4f0e6;
    --ink-2: #cfcbc0;
    --muted: #a4a9b5;
    --faint: #7d8596;
    --line: #243150;
    --line-soft: #1a2540;
    --line-strong: #34426a;
    --rule: #d49e3a;
    --surface: #101b32;
    --panel: #14203a;
    --accent: #a9bdf0;
    --accent-hover: #cdd9f8;
    --accent-fill: #f4f0e6;
    --accent-fill-hover: #ffffff;
    --on-accent: #0e224e;
    --button-dark: #f4f0e6;
    --on-dark: #0e224e;
    --gold: #d49e3a;
    --gold-type: #e2b457;
    --gold-mark: #e2b457;
    --brand-dot: #e2b457;
    --highlight: #4d3c12;
    --tag-major-bg: #3a2a16;
    --tag-major-fg: #f3c98e;
    --tag-notable-bg: #1c2a4f;
    --tag-notable-fg: #c0cff5;
    --tag-routine-bg: #1a2540;
    --tag-routine-fg: #b8bcc6;
    --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: #a9bdf0;
    --form-insider: #b9a3f7;
    --shadow: rgba(0, 0, 0, 0.4);
    /* tokens:dark:end */

    --shadow-card: none;
  }
}

/* tokens:media:start */
[data-theme="media"] {
  color-scheme: dark;
  --paper: #0e224e;
  --ink: #faf7f0;
  --ink-2: #dcd6c8;
  --muted: #aab4cc;
  --line: #2a3f70;
  --surface: #132a5c;
  --gold: #d49e3a;
  --gold-type: #e2b457;
  --gold-mark: #e2b457;
  --accent: #e2b457;
  --on-accent: #0e224e;
  --rule: #d49e3a;
}
/* tokens:media:end */
