/* geoguess.es — base: reset, the type scale (docs/redesign/FINAL.md §2), focus, utilities. Colours come ONLY from
   tokens.css custom properties; never write a hex value outside tokens.css. One family runs the interface
   (Geist Mono); Doto and Departure Mono appear only through the .t-dot / .t-pixel classes. */

*, *::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-15);
  line-height: var(--lh-body);
  color: var(--ink);
  background-color: var(--paper);
  font-feature-settings: 'kern';
  font-synthesis-weight: none;   /* two real weights (400/500): never a faux bold */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
p { margin: 0 0 var(--sp-3); }
ul, ol { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 500; }
em, i { font-style: normal; }   /* no italics in a monospace system: emphasis is weight 500 */
em { font-weight: 500; }

/* ------------------------------------------------------------------ type scale
   12 label · 13 secondary · 15 body · 18 lead · 22 section · 28 section-lg · 40 page title · 56 big number.
   Two weights (400/500). Numbers are tabular. */
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: break-word; }
h1, .h1 { font-size: var(--fs-40); line-height: 1.1; letter-spacing: -0.03em; }
h2, .h2 { font-size: var(--fs-22); line-height: 1.35; letter-spacing: -0.01em; }
h3, .h3 { font-size: var(--fs-15); line-height: 1.5; }
h4 { font-size: var(--fs-13); line-height: 1.5; }
.t-28 { font-size: var(--fs-28); line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; }
.t-56 { font-size: var(--fs-56); line-height: 1; letter-spacing: -0.04em; font-weight: 500; font-variant-numeric: tabular-nums; }
.t-34 { font-size: var(--fs-34); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; font-variant-numeric: tabular-nums; }
.lead, .lede { font-size: var(--fs-18); line-height: 1.55; color: var(--ink-2); max-width: 52ch; }
.small { font-size: var(--fs-13); line-height: 1.55; }
.micro { font-size: var(--fs-12); font-weight: 500; line-height: 1.5; }
/* the section label ("Friends online"): 12 / 500, sentence case — there are no uppercase eyebrows */
.label, .eyebrow { font-size: var(--fs-12); font-weight: 500; line-height: 1.5; letter-spacing: var(--tracking-label); color: var(--ink-2); margin: 0; text-transform: none; }
/* legacy: the Caslon italic subtitles are gone; whatever text a page still passes reads as one quiet line */
.flavour { font-size: var(--fs-13); line-height: 1.55; font-style: normal; font-weight: 400; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-faint); }  /* decoration only */
.mono { font-family: var(--font-ui); font-weight: 500; }
.num, .tnum { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prose { font-size: var(--fs-15); line-height: 1.7; max-width: 68ch; }
.display { font-size: var(--fs-48); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; margin: 0; }

/* hero faces — rare by rule (FINAL.md §2.1) */
.t-dot { font-family: var(--font-dot); font-weight: 800; font-variation-settings: 'ROND' 100; letter-spacing: 0; line-height: .95; }
.t-pixel { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0; }
.t-pixel-66 { font: 400 66px/66px var(--font-pixel); }
.t-pixel-44 { font: 400 44px/44px var(--font-pixel); }
.t-pixel-33 { font: 400 33px/33px var(--font-pixel); }
.t-pixel-22 { font: 400 22px/22px var(--font-pixel); }

/* links: ink with a quiet underline (never colour alone) */
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--ink-faint); }
a:hover { color: var(--ink); text-decoration-color: currentColor; }
.link-quiet { color: var(--ink-2); text-decoration: none; }
.link-quiet:hover { color: var(--ink); text-decoration: underline; }

/* focus: a 2 px signal ring, offset 3 px, keyboard only */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
a:not([class]):not([role]):focus-visible { border-radius: 4px; }
/* headings that receive focus only to announce a new view (route changes, sheets) are not controls: no ring */
:is(h1, h2, h3)[tabindex="-1"]:focus-visible { outline: none; }

.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; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--sp-3); top: -100px; z-index: var(--z-tooltip); background: var(--ink); color: var(--paper); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill); text-decoration: none; }
.skip-link:focus { top: var(--sp-3); color: var(--paper); }
body[data-chrome="game"] .skip-link { display: none; } /* the game hides #main: the first Tab goes to the game itself */

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

::selection { background: var(--signal-wash); color: var(--ink); }

@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; }
}
/* Settings → Appearance → Reduce motion "Reduce" forces it regardless of the OS (WP1: <html data-motion>) */
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after {
  animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
@media (forced-colors: active) { .flag, .map-canvas { forced-color-adjust: none; } }
