:root {
  --navy: #2c3b4e;
  --action: #2563eb;
  --success: #25875a;
  --canvas: #f2f6fa;
  --surface: #ffffff;
  --ink: #203a5f;
  --muted: #5b6f86;
  --line: #d7e1ec;
  --danger: #b42318;
  --warning: #b54708;
  --info: #3478c9;
  --focus: #3478c9;
  --accent: var(--action);
  --accent-ink: #ffffff;
  --ok: var(--success);
  --priority-high: #b42318;
  --priority-medium: #b54708;
  --priority-low: #3478c9;
  --chart-1: #203a5f;
  --chart-2: #3478c9;
  --chart-3: #25875a;
  --shadow: 0 8px 24px rgba(32, 58, 95, 0.08);
  --radius: 12px;
  --button-radius: 2px;
  --font: "Segoe UI", "Calibri", "Liberation Sans", sans-serif;
  --mono: "Cascadia Mono", "Consolas", monospace;
  --sidebar: var(--navy);
  --sidebar-text: #f4f8fc;
  --topbar: #c5d0dc;
}

[dir="rtl"] {
  --font: "IBM Plex Sans Arabic", "Segoe UI", "Calibri", sans-serif;
}

html[data-theme="dark"],
body[data-theme="dark"] {
  --canvas: #121a24;
  --surface: #1b2633;
  --ink: #e8eef5;
  --muted: #9bb0c4;
  --line: #2c3c4e;
  --topbar: #101820;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

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

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
}

img {
  max-width: 100%;
}

a {
  color: var(--action);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 40;
}

.skip-link:focus {
  top: 0.75rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
}
