/* Design tokens: light & dark palettes, typography, shadows, and motion. */
:root {
  color-scheme: light;
  --text-primary: #1b2028;
  --text-secondary: #465060;
  --text-tertiary: #6b7688;
  --bg-primary: #fcfcfd;
  --bg-elevated: #ffffff;
  --bg-surface: #f4f7fb;
  --bg-hover: #f2f6fc;
  --logo-surface: #ffffff;
  --accent-blue: #1f56a6;
  --accent-blue-soft: rgba(31, 86, 166, 0.09);
  --accent-blue-border: rgba(31, 86, 166, 0.22);
  --accent-orange: #a85b16;
  --line: #e4eaf2;
  --line-subtle: #edf1f7;
  --highlight-yellow: #ffe96b;
  --highlight-opacity: 0.42;
  --link-color: var(--accent-blue);
  --shadow-sm: 0 1px 2px rgba(20, 30, 48, 0.04), 0 4px 12px rgba(20, 30, 48, 0.04);
  --shadow-md: 0 6px 20px rgba(20, 30, 48, 0.08), 0 2px 6px rgba(20, 30, 48, 0.04);
  --shadow-avatar: 0 12px 32px rgba(20, 30, 48, 0.10), 0 2px 8px rgba(20, 30, 48, 0.06);
  --toast-bg: #1b2028;
  --toast-text: #f8fafc;

  /* Competition medal tier palettes */
  --tier-gold-bg: #fef7e0;
  --tier-gold-text: #8c5a00;
  --tier-gold-border: #f3dc98;
  --tier-silver-bg: #f1f5f9;
  --tier-silver-text: #475569;
  --tier-silver-border: #d5dde8;
  --tier-bronze-bg: #fdf2ea;
  --tier-bronze-text: #944d1d;
  --tier-bronze-border: #efc9ae;
  --tier-award-bg: #eef4fc;
  --tier-award-text: #1f56a6;
  --tier-award-border: #cadbf3;

  --font-heading: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-size-2xs: 12px;
  --font-size-xs: 13px;
  --font-size-sm: 14.5px;
  --font-size-base: 16px;
  --font-size-title: 18px;
  --font-size-icon: 22px;
  --font-size-heading: 31px;
  --font-size-display: 40px;
  --motion-fast: 170ms;
  --motion-medium: 260ms;
  --motion-slow: 440ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --scroll-progress: 0;
}

[data-theme="dark"] {
  color-scheme: dark;
  --text-primary: #edf2f8;
  --text-secondary: #b2bfd2;
  --text-tertiary: #8190a8;
  --bg-primary: #0f131a;
  --bg-elevated: #151b24;
  --bg-surface: #18202c;
  --bg-hover: #1b2433;
  --logo-surface: rgba(255, 255, 255, 0.94);
  --accent-blue: #6ea8fe;
  --accent-blue-soft: rgba(110, 168, 254, 0.14);
  --accent-blue-border: rgba(110, 168, 254, 0.30);
  --accent-orange: #f0a45d;
  --line: #232d3f;
  --line-subtle: #1d2635;
  --highlight-yellow: #f6c75c;
  --highlight-opacity: 0.24;
  --link-color: var(--accent-blue);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.36), 0 2px 8px rgba(0, 0, 0, 0.24);
  --shadow-avatar: 0 14px 36px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.28);
  --toast-bg: #edf2f8;
  --toast-text: #0f131a;

  --tier-gold-bg: rgba(245, 194, 66, 0.14);
  --tier-gold-text: #f6ca59;
  --tier-gold-border: rgba(245, 194, 66, 0.30);
  --tier-silver-bg: rgba(148, 163, 184, 0.14);
  --tier-silver-text: #cbd5e1;
  --tier-silver-border: rgba(148, 163, 184, 0.28);
  --tier-bronze-bg: rgba(232, 146, 86, 0.14);
  --tier-bronze-text: #f0a973;
  --tier-bronze-border: rgba(232, 146, 86, 0.30);
  --tier-award-bg: rgba(110, 168, 254, 0.14);
  --tier-award-text: #8bbafe;
  --tier-award-border: rgba(110, 168, 254, 0.28);
}
