/* whami — shared styles for the public site.
   Deliberately one small stylesheet and no build step: these are legal pages
   that must stay reachable for years, so the fewer moving parts the better. */

:root {
  --bg: #000;
  --panel: rgba(0, 0, 0, 0.55);
  --border: rgba(255, 255, 255, 0.22);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.42);
  --accent: #2563eb;
  --danger: #ef4444;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* A faint street-grid wash, echoing the app's map backdrop without shipping
     a map: two sets of hairlines at different angles. */
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 76px 76px, 76px 76px;
  background-attachment: fixed;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 22px 96px;
}

/* --- masthead ---------------------------------------------------------- */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0 34px;
}

.wordmark {
  font-size: 30px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 15px;
}
nav.site a:hover { color: var(--text); }

/* --- hero (landing only) ----------------------------------------------- */

.hero {
  padding: 40px 0 22px;
}
.hero h1 {
  font-size: clamp(34px, 8vw, 54px);
  line-height: 1.1;
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -1px;
}
.hero p {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 26px;
  max-width: 46ch;
}

/* --- glass panel, mirroring the app's surfaces ------------------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 24px;
  margin: 20px 0;
}
.panel h2 { margin-top: 0; }

/* --- long-form legal copy ---------------------------------------------- */

article h1 {
  font-size: 32px;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}
article .updated {
  color: var(--faint);
  font-size: 14px;
  margin: 0 0 34px;
}
article h2 {
  font-size: 20px;
  margin: 38px 0 10px;
  letter-spacing: -0.2px;
}
article h3 {
  font-size: 16px;
  margin: 24px 0 6px;
  color: var(--text);
}
article p, article li { color: rgba(255, 255, 255, 0.82); }
article ul { padding-left: 22px; }
article li { margin: 6px 0; }
article a { color: #7ea8ff; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 6px;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  vertical-align: top;
}
th { color: var(--text); font-weight: 600; white-space: nowrap; }
td { color: rgba(255, 255, 255, 0.78); }

/* --- buttons ----------------------------------------------------------- */

.btn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 13px 26px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.btn:hover { background: rgba(255, 255, 255, 0.16); }
.btn.danger { border-color: rgba(239, 68, 68, 0.55); color: #ffb4b4; }

/* --- footer ------------------------------------------------------------ */

footer.site {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--faint);
  font-size: 14px;
}
footer.site a { color: var(--muted); text-decoration: none; margin-right: 16px; }
footer.site a:hover { color: var(--text); }

@media (max-width: 520px) {
  nav.site a { margin: 0 14px 0 0; display: inline-block; }
  header.site { padding-bottom: 22px; }
}

/* --- landing backdrop ---------------------------------------------------
   The drifting map lives behind everything on the landing page. It starts
   black and only becomes visible once tiles have loaded (map-backdrop.js adds
   .ready), so a blocked script, a dead tile server or a browser without WebGL
   all leave exactly the black page that was there before. */

#map {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg);
  opacity: 0;
  transition: opacity 1.2s ease;
  /* Brightness lives in map-backdrop.js, which repaints the basemap's layers.
     A canvas-wide filter was tried first and fogs the picture: it raises the
     near-black background as fast as the roads. */
}
#map.ready { opacity: 1; }

/* Keeps the wordmark and buttons readable wherever the map has drifted to —
   the same banded scrim the app uses. */
.has-map::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.00) 0%,
    rgba(0,0,0,0.12) 38%,
    rgba(0,0,0,0.12) 66%,
    rgba(0,0,0,0.00) 100%
  );
}

/* The page's own faint grid is the fallback texture; with a real map behind it
   it would just be noise. */
.has-map { background-image: none; }

/* MapLibre's attribution: required (OSM data), but it shouldn't shout. */
#map .maplibregl-ctrl-attrib {
  background: rgba(0, 0, 0, 0.45);
  font-size: 11px;
}
#map .maplibregl-ctrl-attrib a { color: rgba(255, 255, 255, 0.6); }

@media (prefers-reduced-motion: reduce) {
  #map { transition: none; }
}
