/* ── Reset + design tokens ─────────────────────────────────────────────────── */

:root {
  /* Colours */
  --c-bg:          #f8f9fa;
  --c-surface:     #ffffff;
  --c-border:      #dee2e6;
  --c-text:        #212529;
  --c-text-muted:  #6c757d;
  --c-primary:     #1a56db;
  --c-primary-dk:  #1447b2;
  --c-danger:      #dc2626;
  --c-success:     #16a34a;
  --c-warning:     #d97706;
  --c-overlay:     rgba(0, 0, 0, 0.45);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);

  /* Safe area */
  --safe-top:    env(safe-area-inset-top,    0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left,   0px);
  --safe-right:  env(safe-area-inset-right,  0px);

  /* Tap target */
  --tap: 44px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
  overscroll-behavior: none;
}

/* Eliminate 300ms tap delay everywhere */
a, button, input, select, textarea, label, [role="button"] {
  touch-action: manipulation;
}

/* Minimum tap targets */
button, a, input[type="checkbox"], input[type="radio"], select {
  min-height: var(--tap);
  min-width:  var(--tap);
}

input[type="checkbox"], input[type="radio"] {
  width:  20px;
  height: 20px;
  min-width:  20px;
  min-height: 20px;
  cursor: pointer;
}

/* Reset button */
button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

/* Reset list */
ul, ol { list-style: none; }

/* Reset link */
a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* Hidden utility */
[hidden] { display: none !important; }
