:root {
  --color-background: #faf9f5;
  --color-surface: #ffffff;
  --color-border: #e5e2d9;
  --color-border-strong: #d8d4c8;
  --color-text-primary: #17170f;
  --color-text-secondary: #3f3f33;
  --color-text-muted: #6b6b5c;
  --color-text-faint: #9b9b8a;
  --color-primary: #2563eb;
  --color-danger: #dc2626;
  --color-success: #16a34a;
  --color-success-tint: rgba(22, 163, 74, 0.08);
  --color-feed: #4f46e5;
  --color-feed-tint: rgba(79, 70, 229, 0.1);
  --color-clubs: #059669;
  --color-clubs-tint: rgba(5, 150, 105, 0.1);
  --color-calendar: #ea580c;
  --color-calendar-tint: rgba(234, 88, 12, 0.1);
  --color-cup: #d97706;
  --color-cup-tint: rgba(217, 119, 6, 0.1);
  --color-admin: #dc2626;
  --color-admin-tint: rgba(220, 38, 38, 0.1);
  --color-account: #7c3aed;
  --color-account-tint: rgba(124, 58, 237, 0.1);
  --color-neutral-track: #d9d6c9;
  --color-white: #ffffff;
  --color-border-input: #d8d4c8;
  --color-text-placeholder: #a8a496;
  --color-surface-muted: #efece3;
  --color-surface-light: #f6f4ec;
  --color-surface-subtle: #faf9f5;
  --color-divider: #efece3;
  --color-info-tint: #eef2ff;
  --color-accent-border: #9db6e0;
  --color-badge-dot: #ff3b30;
  --color-cup-tint-light: #fef3c7;
  --color-tour-fallback: #f59e0b;
  --color-rank-gold: #8a6212;
  --color-rank-gold-tint: #f5e6bc;
  --color-rank-gold-solid: #bc8a14;
  --color-rank-silver: #565a4a;
  --color-rank-silver-tint: #e9e7da;
  --color-rank-silver-solid: #a0a094;
  --color-rank-bronze: #8a4a26;
  --color-rank-bronze-tint: #efdccb;
  --color-rank-bronze-solid: #a95c3c;
  --color-tab-blue: #2563eb;
  --color-tab-blue-tint: rgba(37, 99, 235, 0.1);
  --color-tab-rose: #e11d48;
  --color-tab-rose-tint: rgba(225, 29, 72, 0.1);
  --color-tab-emerald: #10b981;
  --color-tab-emerald-tint: rgba(16, 185, 129, 0.1);
  --color-tab-cyan: #0891b2;
  --color-tab-cyan-tint: rgba(6, 182, 212, 0.1);
  --color-tab-green: #16a34a;
  --color-tab-green-tint: rgba(22, 163, 74, 0.1);
  --color-glass-bg: rgba(255, 255, 255, 0.9);
  --color-glass-border: rgba(255, 255, 255, 0.6);
  --color-shadow-soft: rgba(23, 23, 15, 0.06);
  --color-shadow-light: rgba(23, 23, 15, 0.05);
  --color-shadow-medium: rgba(23, 23, 15, 0.09);
  --color-shadow-strong: rgba(23, 23, 15, 0.18);
  --color-primary-tint: rgba(37, 99, 235, 0.1);
  --color-footer-bg: #17170f;
  --color-footer-text: rgba(250, 249, 245, 0.75);
  --color-footer-text-strong: #faf9f5;
  --color-panel: #f7f6f2;
  --color-panel-border: #d8d7d0;
  --color-panel-active: #efece3;
  --color-page-bg: #f6f4ec;
  --color-checkbox-bg: #ffffff;
  --color-pill-bg: #17170f;
  --color-pill-text: #ffffff;
  --color-pill-hover-bg: #000000;
  --color-ink: #14161d;
  --color-ink-soft: #2a2d38;
  --color-ink-muted: #6b6e78;
  --color-head-bg: #14161d;
  --color-head-text: #eeeeea;
  --color-head-button-bg: #ffffff;
  --color-head-button-text: #14161d;
  --color-head-button-hover-bg: #e5e5e0;
  --color-tab-active-bg: #e5e5e0;
  --color-table-head-bg: #eeeeea;
  --color-badge-success-text: oklch(0.35 0.11 155);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-card: 20px;
  --radius-toolbar: 0px;
  --radius-pill: 999px;
  --color-card-bg: #ffffff;
  --color-card-border: #e5e2d9;
  --card-border-width: 1px;
  --shadow-card: none;
  --color-card-header-bg: #f6f4ec;
  --color-card-header-border: #e5e2d9;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --font-size-xs: 0.72rem;
  --font-size-sm: 13px;
  --font-size-md: 14px;
  --font-size-lg: 22px;
  --font-size-xl: 2rem;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-family-display: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-family-accent: 'Instrument Serif', Georgia, serif;
  --font-family-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* The dark set (the visitor's choice, T1): `data-theme-mode="dark"` on <html>, set by the server
   from the visitor's cookie and by /js/default-layout.js. Text pairs hold 4.5:1 or more. The
   layout also sets Bootstrap's own `data-bs-theme="dark"` next to it; the variables below put its
   surfaces and borders on these tokens. */
[data-theme-mode="dark"] {
  color-scheme: dark;
  --color-background: #11110e;
  --color-page-bg: #11110e;
  --color-surface: #1a1a16;
  --color-border: #2d2c26;
  --color-border-strong: #45443b;
  --color-text-primary: #f2f0e8;
  --color-text-secondary: #d6d3c7;
  --color-text-muted: #a19f92;
  --color-text-faint: #8c8a7d;
  --color-primary: #8ab4ff;
  --color-danger: #f87171;
  --color-success: #6ee7b7;
  --color-success-tint: rgba(52, 211, 153, 0.14);
  --color-feed: #a5b4fc;
  --color-feed-tint: rgba(129, 140, 248, 0.16);
  --color-clubs: #6ee7b7;
  --color-clubs-tint: rgba(52, 211, 153, 0.14);
  --color-calendar: #fb923c;
  --color-calendar-tint: rgba(251, 146, 60, 0.14);
  --color-cup: #fbbf24;
  --color-cup-tint: rgba(251, 191, 36, 0.14);
  --color-admin: #f87171;
  --color-admin-tint: rgba(248, 113, 113, 0.14);
  --color-account: #c4b5fd;
  --color-account-tint: rgba(167, 139, 250, 0.16);
  --color-neutral-track: #45443b;
  --color-border-input: #45443b;
  --color-text-placeholder: #8c8a7d;
  --color-surface-muted: #20201b;
  --color-surface-light: #1f1f1a;
  --color-surface-subtle: #11110e;
  --color-divider: #2d2c26;
  --color-info-tint: rgba(138, 180, 255, 0.12);
  --color-accent-border: #3b5a8f;
  --color-cup-tint-light: rgba(251, 191, 36, 0.18);
  --color-rank-gold: #e6b84a;
  --color-rank-gold-tint: rgba(230, 184, 74, 0.16);
  --color-rank-gold-solid: #d4a42a;
  --color-rank-silver: #c9c7b8;
  --color-rank-silver-tint: rgba(201, 199, 184, 0.14);
  --color-rank-silver-solid: #8f8d80;
  --color-rank-bronze: #e0a07a;
  --color-rank-bronze-tint: rgba(224, 160, 122, 0.16);
  --color-rank-bronze-solid: #c47a52;
  --color-tab-blue: #8ab4ff;
  --color-tab-blue-tint: rgba(138, 180, 255, 0.14);
  --color-tab-rose: #fb7185;
  --color-tab-rose-tint: rgba(251, 113, 133, 0.14);
  --color-tab-emerald: #34d399;
  --color-tab-emerald-tint: rgba(52, 211, 153, 0.14);
  --color-tab-cyan: #22d3ee;
  --color-tab-cyan-tint: rgba(34, 211, 238, 0.14);
  --color-tab-green: #4ade80;
  --color-tab-green-tint: rgba(74, 222, 128, 0.14);
  --color-glass-bg: rgba(26, 26, 22, 0.9);
  --color-glass-border: rgba(255, 255, 255, 0.08);
  --color-shadow-soft: rgba(0, 0, 0, 0.3);
  --color-shadow-light: rgba(0, 0, 0, 0.25);
  --color-shadow-medium: rgba(0, 0, 0, 0.4);
  --color-shadow-strong: rgba(0, 0, 0, 0.6);
  --color-primary-tint: rgba(138, 180, 255, 0.14);
  --color-footer-bg: #0a0a08;
  --color-footer-text: rgba(242, 240, 232, 0.75);
  --color-footer-text-strong: #f2f0e8;
  --color-panel: #1a1a16;
  --color-panel-border: #2d2c26;
  --color-panel-active: #20201b;
  --color-card-bg: #1a1a16;
  --color-card-border: #2d2c26;
  --color-card-header-bg: #20201b;
  --color-card-header-border: #2d2c26;
  --color-checkbox-bg: #1a1a16;
  /* Pills invert: the active pill is light on the dark page. */
  --color-pill-bg: #f2f0e8;
  --color-pill-text: #11110e;
  --color-pill-hover-bg: #ffffff;
  --color-ink: #f2f0e8;
  --color-ink-soft: #d6d3c7;
  --color-ink-muted: #a19f92;
  --color-head-bg: #20201b;
  --color-head-text: #f2f0e8;
  --color-head-button-bg: #f2f0e8;
  --color-head-button-text: #11110e;
  --color-head-button-hover-bg: #ffffff;
  --color-tab-active-bg: #2d2c26;
  --color-table-head-bg: #20201b;
  --color-badge-success-text: #6ee7b7;

  /* Bootstrap 5.3's own variables, so cards, tables, forms, alerts, dropdowns and modals follow. */
  --bs-body-bg: #1a1a16;
  --bs-body-bg-rgb: 26, 26, 22;
  --bs-body-color: #f2f0e8;
  --bs-body-color-rgb: 242, 240, 232;
  --bs-emphasis-color: #f2f0e8;
  --bs-emphasis-color-rgb: 242, 240, 232;
  --bs-secondary-color: rgba(214, 211, 199, 0.75);
  --bs-secondary-color-rgb: 214, 211, 199;
  --bs-tertiary-color: rgba(214, 211, 199, 0.5);
  --bs-secondary-bg: #20201b;
  --bs-secondary-bg-rgb: 32, 32, 27;
  --bs-tertiary-bg: #1f1f1a;
  --bs-tertiary-bg-rgb: 31, 31, 26;
  --bs-border-color: #2d2c26;
  --bs-border-color-translucent: rgba(242, 240, 232, 0.12);
  --bs-link-color: #8ab4ff;
  --bs-link-color-rgb: 138, 180, 255;
  --bs-link-hover-color: #b3cdff;
  --bs-link-hover-color-rgb: 179, 205, 255;
  --bs-code-color: #f0abfc;
  --bs-heading-color: inherit;
}
