*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root,
[data-theme="light"] {
  color-scheme: light;

  --bg-kraft: #eef4ff;
  --bg-kraft-deep: #dbeafe;
  --bg-kraft-light: #f8fafc;
  --bg-glow: rgba(59, 130, 246, 0.14);
  --bg-glow-secondary: rgba(37, 99, 235, 0.08);

  --surface-paper: #ffffff;
  --surface-paper-raised: #fafcff;
  --surface-paper-inset: #f1f5f9;
  --surface-accent-wash: rgba(59, 130, 246, 0.07);
  --surface-accent-wash-strong: rgba(37, 99, 235, 0.11);

  --text-ink: #0f172a;
  --text-ink-muted: #475569;
  --text-on-accent: #ffffff;

  --accent-brass: #2563eb;
  --accent-brass-light: #3b82f6;
  --accent-brass-dark: #1d4ed8;
  --accent-copper: #3b82f6;
  --accent-focus: #2563eb;
  --accent-focus-ring: rgba(37, 99, 235, 0.22);

  --color-likely: #22c55e;
  --color-likely-light: #4ade80;
  --color-likely-dark: #16a34a;
  --color-likely-border: #15803d;
  --color-likely-text: #052e16;
  --color-maybe: #c2410c;
  --color-maybe-light: #ea580c;
  --color-maybe-dark: #9a3412;
  --color-maybe-border: #7c2d12;
  --color-maybe-text: #fff7ed;
  --color-danger: #dc2626;
  --color-danger-deep: #b91c1c;

  --border-paper: #cbd5e1;
  --border-paper-dark: #94a3b8;
  --border-subtle: rgba(15, 23, 42, 0.08);

  --bevel-light: rgba(255, 255, 255, 0.92);
  --bevel-dark: rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-raised: inset 0 1px 0 var(--bevel-light), var(--shadow-soft);
  --shadow-pressed: inset 0 1px 3px rgba(15, 23, 42, 0.1);
  --shadow-inset: inset 0 1px 0 var(--bevel-light);

  --alert-bg: #eff6ff;
  --alert-border: #93c5fd;
  --alert-text: #1e3a8a;
  --code-bg: #f1f5f9;
  --code-border: #cbd5e1;

  --btn-ghost-top: #ffffff;
  --btn-ghost-bottom: #f1f5f9;
  --btn-primary-border: #1d4ed8;
  --btn-primary-top: #60a5fa;
  --btn-primary-mid: #3b82f6;
  --btn-primary-bottom: #2563eb;

  --toast-bg-top: #ffffff;
  --toast-bg-bottom: #f8fafc;
  --toast-border: #cbd5e1;
  --toast-error-bg-top: #fef2f2;
  --toast-error-bg-bottom: #fee2e2;
  --toast-error-border: #fca5a5;
  --toast-error-text: #991b1b;

  --overlay-bg: rgba(15, 23, 42, 0.72);

  --badge-organizer-bg: #dbeafe;
  --badge-organizer-border: #93c5fd;
  --badge-organizer-text: #1e40af;
  --badge-deadline-bg: #e0e7ff;
  --badge-deadline-border: #818cf8;
  --badge-deadline-text: #3730a3;
  --badge-closed-bg: #fee2e2;
  --badge-closed-border: #fca5a5;
  --badge-closed-text: #991b1b;

  --admin-bar-bg: #dbeafe;
  --admin-bar-border: #60a5fa;
  --admin-bar-text: #1e40af;
  --guest-bar-bg: #e0f2fe;
  --guest-bar-border: #38bdf8;
  --guest-bar-text: #0369a1;

  --input-bg-top: #ffffff;
  --input-bg-bottom: #f8fafc;

  --day-cell-border: #cbd5e1;
  --day-cell-bg-top: #ffffff;
  --day-cell-bg-bottom: #f1f5f9;
  --day-cell-weekend-top: #f0f7ff;
  --day-cell-weekend-bottom: #e8f0fe;
  --day-cell-shadow: transparent;
  --day-cell-out-bg: #e2e8f0;
  --day-cell-out-text: #64748b;
  --day-cell-out-border: #cbd5e1;

  --day-cell-likely-top: #86efac;
  --day-cell-likely-bottom: var(--color-likely-dark);
  --day-cell-maybe-top: var(--color-maybe-light);
  --day-cell-maybe-bottom: var(--color-maybe-dark);

  --toolbar-mobile-top: #ffffff;
  --toolbar-mobile-bottom: #f1f5f9;
  --toolbar-mobile-border: #cbd5e1;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg-kraft: #0a0a0f;
  --bg-kraft-deep: #030712;
  --bg-kraft-light: #111827;
  --bg-glow: rgba(59, 130, 246, 0.18);
  --bg-glow-secondary: rgba(37, 99, 235, 0.12);

  --surface-paper: #111827;
  --surface-paper-raised: #1a2332;
  --surface-paper-inset: #0f172a;
  --surface-accent-wash: rgba(59, 130, 246, 0.12);
  --surface-accent-wash-strong: rgba(37, 99, 235, 0.18);

  --text-ink: #f1f5f9;
  --text-ink-muted: #94a3b8;
  --text-on-accent: #ffffff;

  --accent-brass: #3b82f6;
  --accent-brass-light: #60a5fa;
  --accent-brass-dark: #2563eb;
  --accent-copper: #60a5fa;
  --accent-focus: #60a5fa;
  --accent-focus-ring: rgba(96, 165, 250, 0.28);

  --color-likely: #22c55e;
  --color-likely-light: #4ade80;
  --color-likely-dark: #16a34a;
  --color-likely-border: #15803d;
  --color-likely-text: #ecfdf5;
  --color-maybe: #ea580c;
  --color-maybe-light: #f97316;
  --color-maybe-dark: #c2410c;
  --color-maybe-border: #9a3412;
  --color-maybe-text: #fff7ed;

  --border-paper: #334155;
  --border-paper-dark: #475569;
  --border-subtle: rgba(148, 163, 184, 0.14);

  --bevel-light: rgba(255, 255, 255, 0.07);
  --bevel-dark: rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 1px 4px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-raised: inset 0 1px 0 var(--bevel-light), var(--shadow-soft);
  --shadow-pressed: inset 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-inset: inset 0 1px 0 var(--bevel-light);

  --alert-bg: #172554;
  --alert-border: #3b82f6;
  --alert-text: #bfdbfe;
  --code-bg: #1e293b;
  --code-border: #334155;

  --btn-ghost-top: #1e293b;
  --btn-ghost-bottom: #111827;
  --btn-primary-border: #2563eb;
  --btn-primary-top: #60a5fa;
  --btn-primary-mid: #3b82f6;
  --btn-primary-bottom: #2563eb;

  --toast-bg-top: #1e293b;
  --toast-bg-bottom: #111827;
  --toast-border: #475569;
  --toast-error-bg-top: #450a0a;
  --toast-error-bg-bottom: #3f0f0f;
  --toast-error-border: #b91c1c;
  --toast-error-text: #fecaca;

  --overlay-bg: rgba(3, 7, 18, 0.88);

  --badge-organizer-bg: #172554;
  --badge-organizer-border: #3b82f6;
  --badge-organizer-text: #bfdbfe;
  --badge-deadline-bg: #1e1b4b;
  --badge-deadline-border: #6366f1;
  --badge-deadline-text: #c7d2fe;
  --badge-closed-bg: #450a0a;
  --badge-closed-border: #b91c1c;
  --badge-closed-text: #fecaca;

  --admin-bar-bg: #172554;
  --admin-bar-border: #3b82f6;
  --admin-bar-text: #bfdbfe;
  --guest-bar-bg: #0c4a6e;
  --guest-bar-border: #38bdf8;
  --guest-bar-text: #e0f2fe;

  --input-bg-top: #1e293b;
  --input-bg-bottom: #111827;

  --day-cell-border: #334155;
  --day-cell-bg-top: #1e293b;
  --day-cell-bg-bottom: #111827;
  --day-cell-weekend-top: #1a2740;
  --day-cell-weekend-bottom: #152238;
  --day-cell-shadow: transparent;
  --day-cell-out-bg: #0f172a;
  --day-cell-out-text: #64748b;
  --day-cell-out-border: #1e293b;

  --day-cell-likely-top: #4ade80;
  --day-cell-likely-bottom: var(--color-likely-dark);
  --day-cell-maybe-top: var(--color-maybe-light);
  --day-cell-maybe-bottom: var(--color-maybe-dark);

  --toolbar-mobile-top: #1a2332;
  --toolbar-mobile-bottom: #111827;
  --toolbar-mobile-border: #334155;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--text-ink);
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-kraft);
  background-image:
    radial-gradient(ellipse 90% 60% at 12% -5%, var(--bg-glow) 0%, transparent 55%),
    radial-gradient(ellipse 75% 50% at 92% 4%, var(--bg-glow-secondary) 0%, transparent 50%),
    radial-gradient(ellipse 55% 40% at 50% 100%, color-mix(in srgb, var(--accent-brass-light) 10%, transparent) 0%, transparent 58%),
    linear-gradient(165deg, var(--bg-kraft-light) 0%, var(--bg-kraft) 48%, var(--bg-kraft-deep) 100%);
}

a {
  color: var(--accent-brass);
}

strong {
  color: var(--text-ink);
}

#main-nav-placeholder {
  display: none !important;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
