/* ===== Design tokens ===== */
:root {
  /* Locked brand palette */
  --primary: #1976d2;
  --primary-dark: #0d47a1;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2a37;
  --muted: #6b7280;
  --border: #e6eaf0;

  /* Secondary (grey) palette — mirrors the --primary/--primary-dark pattern,
     derived from the existing --muted/--border/--bg family so it reads as
     one cohesive design rather than a second theme. */
  --secondary: #6b7280;
  --secondary-dark: #4b5563;
  --secondary-bg: #eef0f4;
  --secondary-border: #d7dce3;

  /* Supporting tokens */
  --success: #2e7d32;
  --success-bg: #e8f5e9;
  --danger: #c62828;
  --danger-bg: #fdecea;
  --focus-ring: #90caf9;

  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(31, 42, 55, 0.08);
  --shadow-md: 0 4px 16px rgba(31, 42, 55, 0.12);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;

  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container-max: 1140px;
  --header-height: 72px;
}

/* Breakpoints used across CSS (documented, not usable as CSS vars in media queries):
   600px  - small tablets
   900px  - desktop nav takes over from hamburger
   1140px - container caps at --container-max
*/

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--space-3); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--space-3); }

ul, ol { margin: 0 0 var(--space-3); padding-left: 1.25em; }

button { font-family: inherit; }

/* Visible, accessible focus state everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
