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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--ink);
  transition: background .8s ease, color .8s ease;
}

img { max-width: 100%; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font: inherit; }

button:focus-visible, [tabindex]:focus-visible, a:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
  border-radius: 10px;
}

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(127, 155, 180, .35); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.leaflet-container { background: transparent; font-family: 'IBM Plex Sans', sans-serif; }

.mono { font-family: 'IBM Plex Mono', monospace; }
.heading-font { font-family: 'Archivo', sans-serif; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes fw-gust {
  0%   { transform: translate3d(-32vw, 0, 0); opacity: 0; }
  12%  { opacity: 1; }
  50%  { transform: translate3d(36vw, -14px, 0); }
  88%  { opacity: 1; }
  100% { transform: translate3d(108vw, 0, 0); opacity: 0; }
}
@keyframes fw-swell { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-50%, 0, 0); } }
@keyframes fw-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* ── Avatar (Makkere): initials on a per-person hue, set inline as --h ── */
.avatar {
  --size: 34px;
  flex: 0 0 auto;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: hsl(var(--h, 205) 60% 86%);
  color: hsl(var(--h, 205) 55% 24%);
  font-family: 'Archivo', sans-serif;
  font-size: calc(var(--size) * .38);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  user-select: none;
}
.avatar.is-sm { --size: 30px; }
.avatar.is-lg { --size: 56px; }
.avatar.is-xl { --size: 76px; }
:root[data-phase="night"] .avatar {
  background: hsl(var(--h, 205) 35% 30%);
  color: hsl(var(--h, 205) 70% 88%);
}
