/* Ley Maps public site. Brand palette (brand/LEY_MAPS_BRANDING.md, section 7): Abyss and Crystal Magenta, dark by
   default; light follows the system with the light-mode accents. Only the logo's node glows (inside its SVG). */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url('/assets/outfit-latin.6c18d579fd.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/inter-latin.3100e775e8.woff2') format('woff2');
}
:root {
  --bg: #141a33; /* Abyss */
  --surface: #1f2a4d; /* Facet */
  --surface-2: #19223f;
  --ink: #f4f7ff; /* Frost */
  --muted: #99a3cc; /* Mist */
  --line: #344066; /* Border */
  --accent: #d946ef; /* Crystal Magenta: fills */
  --accent-text: #e879f9; /* Magenta Light: accent text on dark */
  --accent-ink: #141a33;
  --accent-soft: rgb(217 70 239 / 14%);
  --route: #7dd3fc; /* Ice Blue: routes, secondary accent, never glows */
  --ok: #86efac;
  --warn: #fbbf24;
  --code: #19223f;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  --display: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --sans:
    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7ff;
    --surface: #ffffff;
    --surface-2: #e8edfa;
    --ink: #141a33;
    --muted: #4a5578;
    --line: #cbd3ea;
    --accent: #a21caf;
    --accent-text: #a21caf;
    --accent-ink: #ffffff;
    --accent-soft: rgb(162 28 175 / 10%);
    --route: #0369a1;
    --ok: #15803d;
    --warn: #a16207;
    --code: #e8edfa;
    --shadow: 0 1px 2px rgb(20 26 51 / 8%), 0 8px 24px rgb(20 26 51 / 6%);
    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: 4px;
}
.wrap {
  width: min(1040px, 100% - 32px);
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.88rem;
}

/* header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(6px);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 600 1.2rem/1 var(--display);
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  gap: 4px 18px;
  flex-wrap: wrap;
  flex: 1;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.button:hover {
  filter: brightness(1.06);
}
.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.button.small {
  padding: 8px 14px;
  font-size: 0.92rem;
  box-shadow: none;
}

/* type */
h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.005em;
}
h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin: 0.4em 0 0.3em;
}
h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  margin: 1.8em 0 0.5em;
}
h3 {
  font-size: 1.2rem;
  margin: 1.4em 0 0.4em;
}
main {
  padding-bottom: 64px;
}
main p,
main li {
  max-width: 72ch;
}
.lede {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 62ch;
}
code,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--code);
  border-radius: 5px;
  padding: 0.1em 0.38em;
}
kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
}

/* hero */
.hero {
  padding: 56px 0 24px;
  display: grid;
  gap: 32px;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
}
.hero .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent-text);
  font-weight: 700;
  margin: 0;
}
.ledger-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 0.86rem;
}
.ledger-card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}
.ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding: 7px 0;
}
.ledger-row:last-child {
  border-bottom: 0;
}
.ledger-row span:last-child {
  color: var(--accent-text);
  white-space: nowrap;
}

/* cards & grids */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}
.card h3 {
  margin-top: 0.2em;
}
.card p {
  margin: 0.4em 0 0;
}
.step {
  counter-increment: step;
}
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
}
.steps > li {
  position: relative;
  padding: 16px 18px 16px 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: none;
}
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 700 0.95rem/1 var(--sans);
}
.steps h3 {
  margin: 0 0 4px;
}
.steps p {
  margin: 0.3em 0 0;
}

/* callouts */
.note,
.warn {
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  margin: 18px 0;
  max-width: 72ch;
}
.warn {
  border-left-color: var(--warn);
}
.note p,
.warn p {
  margin: 0.3em 0;
}

/* tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}
th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
th {
  font-weight: 600;
  background: var(--surface-2);
}
.yes {
  color: var(--ok);
  font-weight: 600;
}
.no {
  color: var(--warn);
  font-weight: 600;
}

/* page header */
.page-head {
  padding: 40px 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.92rem;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 28px 0;
}
.footer-row p {
  margin: 6px 0;
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 32px;
  }
  .header-row {
    gap: 10px;
    padding: 10px 0;
  }
  .site-nav {
    order: 3;
    flex-basis: 100%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: filter 0.15s ease;
  }
}

/* Wiki pages: the wiki's own menu above the page head. */
.wiki-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 18px 0 4px;
  font-size: 0.9rem;
}
.wiki-nav a {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}
.wiki-nav a[aria-current='page'] {
  background: var(--surface);
  font-weight: 600;
}

/* Wiki figures: a map image with its caption. */
.map-figure {
  margin: 18px 0 26px;
}
.map-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.map-figure figcaption {
  margin-top: 8px;
  font-size: 0.95rem;
}

/* Wordmark: "Ley Maps" in Outfit, "Maps" in Magenta Light on dark (single colour on light, per the brand rules). */
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wordmark-accent {
  color: var(--accent-text);
}
@media (prefers-color-scheme: light) {
  .wordmark-accent {
    color: inherit;
  }
}
