/* geoguess.es — base: reset, type scale (design.md §4.2), focus, utilities. Colours come ONLY from
   tokens.css custom properties; never write a hex value outside tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  line-height: var(--lh-ui);
  color: var(--ink);
  background-color: var(--page);
  background-image: var(--grain);          /* vellum grain: the page background only */
  font-feature-settings: 'kern';
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
p { margin: 0 0 var(--sp-3); }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); }
h1, .h1 { font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-28); line-height: 1.15; letter-spacing: -0.005em; }
h2, .h2 { font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-22); line-height: 1.2; }
h3, .h3 { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-16); line-height: 1.3; }
.display { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-48); line-height: 1.02; letter-spacing: -0.01em; margin: 0; }
.flavour { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: var(--fs-15); color: var(--ink-3); }
.eyebrow { font-weight: 600; font-size: var(--fs-11); line-height: 1.2; text-transform: uppercase; letter-spacing: var(--tracking-eyebrow); color: var(--ink-3); margin: 0; }
.lede { font-size: var(--fs-15); line-height: var(--lh-body); color: var(--ink-2); max-width: 46ch; }
.small { font-size: var(--fs-13); line-height: 1.4; }
.micro { font-size: var(--fs-12); font-weight: 500; line-height: 1.3; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose { font-size: var(--fs-15); line-height: var(--lh-body); max-width: 68ch; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.icon { width: 20px; height: 20px; flex: none; }
.icon-16 { width: 16px; height: 16px; }
.icon-24 { width: 24px; height: 24px; }
.icon-28 { width: 28px; height: 28px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--sp-3); top: -100px; z-index: var(--z-tooltip); background: var(--raised); color: var(--ink); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-2); box-shadow: var(--shadow-2); }
.skip-link:focus { top: var(--sp-3); }

.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.spacer { flex: 1; }

@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; }
}
@media (prefers-contrast: more) { body { background-image: none; } }
@media (forced-colors: active) { .flag, .map-canvas { forced-color-adjust: none; } }
