/* Shared styling for the static pages served alongside the SPA (/info, the
   legal pages, the landing pages). Deliberately its own file with a stable,
   unhashed name: these pages are plain HTML in public/ and never go through
   the Vite asset pipeline, so they must not depend on a hashed bundle.

   Colour tokens mirror src/index.css so the pages look like the app they
   belong to, including in dark mode. */

:root {
  --bg: #f8fafc;
  --panel-bg: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #2563eb;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --panel-bg: #1e293b;
    --border: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem 1.25rem 4rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

main,
header,
footer {
  max-width: 46rem;
  margin: 0 auto;
}

header {
  margin-bottom: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2.25rem 0 0.6rem;
}

h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.4rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--accent);
}

address {
  font-style: normal;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.cta {
  display: inline-block;
  margin: 0.5rem 0 1.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

/* The honest note that belongs next to every "free" claim. */
.note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.cta.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  margin-left: 0.5rem;
}

/* --- shared-route page (/s/<id>) ------------------------------------------ */

.share-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.share-facts strong {
  font-size: 1.35rem;
  color: var(--text);
}

.share-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.route-badge {
  font-size: 0.8rem;
  line-height: 1.7;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

/* Route outline and elevation profile, drawn inline without a basemap so the
   page needs no tiles, no JavaScript and no attribution beyond the footer. */
.share-figure {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0.5rem 0 1rem;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
}

footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer a {
  margin-right: 1rem;
}

.updated {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
