/* =========================================
   Modern Reset + Base (Pool League)
   - Safe defaults
   - Box sizing + margins reset
   - Typographic smoothing
   - Media + form normalization
   - Accessible focus-visible
   - Honors your --clr-* and --ft-clr-* vars
   ========================================= */

/* 1) Box sizing + margin reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

/* 2) Document defaults */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;             /* feel free to drop if you dislike */
}
html:focus-within { scroll-behavior: smooth; }

/* 3) Body defaults */
body {
  min-height: 100dvh;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ft-clr-base, rgba(28,31,38,1));
  background: var(--clr-bg-page, rgba(255,255,255,1));
}

/* 4) Typography defaults */
:where(h1,h2,h3,h4,h5,h6) {
  line-height: 1.2;
  font-weight: 700;
}
:where(p, h1, h2, h3, h4, h5, h6) { overflow-wrap: anywhere; }
:where(b, strong) { font-weight: bolder; }
:where(code, kbd, samp, pre) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

/* 5) Links */
a {
  color: inherit;                      /* you’ll style links explicitly */
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--clr-focus, rgba(62,61,72,1));
  outline-offset: 2px;
}

/* 6) Images, video, svg, canvas */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
img { height: auto; }

/* 7) Forms: inherit fonts + sensible defaults */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  outline: none;
}
textarea { resize: vertical; }
button,
[type="button"],
[type="submit"],
[type="reset"] {
  /* vendor first, standard last */
  -webkit-appearance: button;
  appearance: button;
  cursor: pointer;
}
:disabled { cursor: not-allowed; opacity: 0.6; }

/* Remove number input spinners (optional) */
input[type="number"] {
  -moz-appearance: textfield; /* Firefox */
  appearance: textfield;       /* standard */
}

/* Chrome/Safari spinner removal */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 8) Lists: no bullets by default; opt in per component */
:where(ul, ol) { list-style: none; }

/* 9) Tables */
table { border-collapse: collapse; border-spacing: 0; width: 100%; }
th, td { vertical-align: top; }

/* 10) Fieldsets/legends */
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; }

/* 11) Abbreviations */
abbr[title] { text-decoration: underline dotted; }

/* 12) Selection */
::selection {
  background: var(--clr-accent, rgba(247,187,51,1));
  color: var(--ft-clr-base, rgba(28,31,38,1));
}

/* 13) Focus visible for all interactive elements */
:where(button, [role="button"], a, input, select, textarea) :focus { outline: none; }
:where(button, [role="button"], a, input, select, textarea):focus-visible {
  outline: 2px solid var(--clr-focus, rgba(62,61,72,1));
  outline-offset: 2px;
  border-radius: 6px;
}

/* 14) Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 15) Root font + color variables (placeholders if not set elsewhere) */
:root {
  /* Colours (RGBA fallbacks if you haven’t loaded your palette yet) */
  --clr-accent: rgba(247,187,51,1);
  --clr-focus: rgba(62,61,72,1);
  --clr-bg-page: rgba(255,255,255,1);

  /* Font colours */
  --ft-clr-base: rgba(28,31,38,1);
  --ft-clr-muted: rgba(92,99,112,1);
  --ft-clr-inverse: rgba(255,255,255,1);
}