/* Leonida Guide: shared tokens, type and components. Vice City palette: neon pink and aqua on sand (light) or night purple (dark). */
:root {
  --bg: #fff7f1; --surface: #ffffff; --surface-2: #ffede4; --line: #ebcfc6;
  --text: #1b1035; --muted: #62557a;
  --accent: #ff2e93; --accent-ink: #1b1035; --accent-2: #007a82; --sunset: #ff8a3d; --link: #b0126a;
  --water: #8fe3dc; --water-line: #74d0cd; --land: #fff1dc; --land-edge: #d9b79a;
  --park: #c5e6b0; --wet: #a6e4dd; --urban: #ffc2dd; --farm: #ffd3a1; --zone-edge: #9a84a0;
  --pin-edge: #1b1035; --label: #5f7480; --glow: none; --grain-o: .3;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .1 0 0 0 0 .1 0 0 0 .6 -.14'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --r: 8px;
}
:root[data-theme="dark"], .night {
  --bg: #0c0914; --surface: #130e22; --surface-2: #161028; --line: #322a52;
  --text: #fbf4ff; --muted: #b9a8dc;
  --accent: #ff4fa3; --accent-ink: #14082b; --accent-2: #3df0e0; --sunset: #ff8a3d; --link: #ff8cc6;
  --water: #060b2a; --water-line: #15235c; --land: #241446; --land-edge: #5d479a;
  --park: #1d5a45; --wet: #0f5568; --urban: #7a1f5c; --farm: #7a4420; --zone-edge: #9c8fc4;
  --pin-edge: #fbf4ff; --label: #9a8fc0; --glow: 0 0 26px rgba(255, 79, 163, .5); --grain-o: .26;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 -.14'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0c0914; --surface: #130e22; --surface-2: #161028; --line: #322a52;
  --text: #fbf4ff; --muted: #b9a8dc;
  --accent: #ff4fa3; --accent-ink: #14082b; --accent-2: #3df0e0; --sunset: #ff8a3d; --link: #ff8cc6;
  --water: #060b2a; --water-line: #15235c; --land: #241446; --land-edge: #5d479a;
  --park: #1d5a45; --wet: #0f5568; --urban: #7a1f5c; --farm: #7a4420; --zone-edge: #9c8fc4;
  --pin-edge: #fbf4ff; --label: #9a8fc0; --glow: 0 0 26px rgba(255, 79, 163, .5); --grain-o: .26;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 -.14'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--body); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; font-stretch: 112%; letter-spacing: -.025em; line-height: 1.02; margin: 0; text-wrap: balance; }
p { margin: 0; }
/* Film grain over everything: the retro layer. One tiled SVG noise, dark specks in light mode and light specks in dark. */
body::after { content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; background-image: var(--grain); opacity: var(--grain-o); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--link); outline-offset: 3px; border-radius: 3px; }
.num { font-variant-numeric: tabular-nums; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 18px; padding: 0 max(20px, calc((100vw - 1180px) / 2 + 24px)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--line); }
/* Wordmark: the same wide display face as the headings, with the second word on a slanted neon plate. */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font: 800 19px/1 var(--display); font-stretch: 112%; letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap; }
.brand b { font-weight: 800; }
.brand small { margin-left: 12px; padding-left: 16px; border-left: 1.5px solid var(--line); font: 500 14px/1.2 var(--body); font-stretch: 100%; letter-spacing: 0; text-transform: none; color: var(--muted); }
.brand i { font-style: normal; padding: 5px 8px 4px; background: var(--accent); color: var(--accent-ink); transform: skewX(-9deg); box-shadow: 3px 3px 0 var(--accent-2); }
.count { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; white-space: nowrap; }
.count em { margin-right: 12px; font: 900 15px/.92 var(--display); font-stretch: 112%; font-style: normal; letter-spacing: -.01em; text-transform: uppercase; text-align: right; color: var(--text); }
.count span { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 0 10px; border-left: 1.5px solid var(--line); line-height: 1; }
.count b { font: 800 19px/1 var(--display); font-stretch: 112%; font-variant-numeric: tabular-nums; color: var(--accent); }
.count small { margin-top: 4px; font: 500 10.5px/1 var(--mono); color: var(--muted); }
@media (max-width: 1560px) { .brand small { display: none; } }
@media (max-width: 1020px) { .count { display: none; } }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: var(--r); text-decoration: none; font-weight: 600; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--bg); cursor: pointer; }
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 22px; border: 2px solid var(--text); border-radius: var(--r); background: none; text-decoration: none; font-weight: 700; font-size: 17px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--text); color: var(--bg); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: var(--glow); }
.btn.primary:hover { background: var(--text); border-color: var(--text); color: var(--bg); }

/* Map markers (shared by the landing page and the map) */
.map .maplibregl-canvas { outline: none; }
.mk { display: flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--text); text-decoration: none; font: 700 13.5px var(--body); white-space: nowrap; }
.mk i { width: 17px; height: 17px; flex: none; border-radius: 50%; background: var(--accent); border: 2.5px solid var(--pin-edge); }
.mk span { text-shadow: 0 0 2px var(--land), 0 0 3px var(--land), 0 0 6px var(--land), 0 0 8px var(--land); }
.mk.sel i { box-shadow: 0 0 0 3px var(--land), 0 0 0 6px var(--text); }
.mk.est i { background: var(--bg); border-style: dashed; }
.mk.sel span { margin-left: 6px; }
.mk.off { display: none; }
.sea { font: italic 500 13px var(--body); letter-spacing: .06em; color: var(--label); pointer-events: none; }
.map-fail { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); padding: 24px; text-align: center; }

/* Layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.foot { padding: 36px 0 48px; font-size: 14.5px; color: var(--muted); border-top: 1.5px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; }
.foot p { max-width: 70ch; }

/* Guide cards (landing page and guides index) */
.guide-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; margin-top: 44px; }
.guide { display: block; padding: 22px 0 28px; border-top: 3px solid var(--text); text-decoration: none; }
.guide h2, .guide h3 { font-size: 26px; line-height: 1.1; max-width: none; }
.guide p { margin-top: 10px; color: var(--muted); }
.guide:hover h2, .guide:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 5px; text-underline-offset: 5px; }

/* Illustrations */
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); border-radius: 10px; }
.shot figcaption, .art-note { margin-top: 10px; font: 400 12.5px/1.5 var(--mono); color: var(--muted); }
.article .shot { margin: 28px 0; }

/* Place pages: laid out like a travel guide entry */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 26px 0 0; padding: 18px 20px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r); font-size: 16px; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--muted); }
.status { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 3px; font-size: 13px; font-weight: 700; color: var(--accent-ink); background: var(--accent); }
.status.likely { background: none; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.toc { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 26px; padding: 0; list-style: none; font-weight: 700; }
.toc a { display: inline-block; padding: 9px 0; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.prose .gonext { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; margin: 18px 0 0; padding: 0; list-style: none; border-bottom: 1.5px solid var(--line); }
.prose .gonext li { margin: 0; padding: 12px 0; border-top: 1.5px solid var(--line); }
.gonext a { font-weight: 700; font-size: 18px; text-decoration: none; }
.gonext a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 4px; }
.gonext span { display: block; font: 400 12.5px/1.6 var(--mono); color: var(--muted); }

/* Article pages */
.article { max-width: 760px; margin: 0 auto; padding: 56px 24px 88px; }
.article.wide { max-width: 1180px; }
.article h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 900; }
.crumb { margin-bottom: 18px; font: 500 13px var(--mono); color: var(--muted); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--text); }
.dek { margin-top: 20px; font-size: 21px; line-height: 1.45; color: var(--muted); max-width: 60ch; }
.byline { margin-top: 18px; padding-bottom: 28px; border-bottom: 1.5px solid var(--line); font: 400 12.5px var(--mono); color: var(--muted); }
.prose { font-size: 18.5px; line-height: 1.65; }
.prose h2 { font-size: 28px; margin: 40px 0 0; padding-top: 22px; border-top: 1.5px solid var(--line); }
.prose h3 { font-size: 23px; margin: 34px 0 0; }
.prose p, .prose ul { margin: 16px 0 0; }
.prose ul { padding-left: 1.15em; }
.prose li { margin-top: 8px; }
.prose li::marker { color: var(--muted); }
.prose a, .more a, .foot a { text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.prose strong { font-weight: 700; }
.see-map { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 56px; padding: 24px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r); }
.see-map p { font: 800 22px/1.2 var(--display); font-stretch: 112%; letter-spacing: -.02em; }
.more { margin-top: 56px; }
.more h2 { font-size: 24px; }
.more ul { list-style: none; padding: 0; margin: 14px 0 0; }
.more li { padding: 12px 0; border-top: 1.5px solid var(--line); font-weight: 600; font-size: 18px; }

@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .guide-list { grid-template-columns: 1fr; }
  .article { padding: 40px 20px 64px; }
  .prose { font-size: 17.5px; }
  .bar { gap: 10px; padding: 0 14px; }
  .bar { flex-wrap: wrap; height: auto; padding: 8px 14px 0; }
  .bar .icon-btn { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; gap: 0; margin: 8px 0 0; border-top: 1.5px solid var(--line); }
  .nav a { flex: 1; padding: 13px 4px; text-align: center; font-size: 15px; }
  .brand { font-size: 16px; gap: 7px; }
  .brand small { display: none; }
  .prose .gonext { grid-template-columns: 1fr; }
}
