/* Lantern × Bodhin design system.
   Monochrome base (Inter, white→ink, hairlines, whitespace) with amber as the single
   Lantern accent. Sentence case, no shadows at rest, quiet motion. */
:root {
  --accent: #f5a623;      /* lantern glow */
  --accent-hover: #e0951c;
  --accent-ink: #c77f12;  /* accent on light text/links */

  --ink: #0a0a0a;
  --ink-2: #262626;
  --body: #404040;
  --label: #525252;
  --muted: #737373;
  --faint: #a3a3a3;
  --line-strong: #d4d4d4;
  --line: #e5e5e5;
  --line-soft: #f0f0f0;
  --fill: #fafafa;
  --bg: #ffffff;

  --map-bg: #12161c;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 960px;
  --radius: 8px;
  --radius-lg: 14px;
  --ease: 140ms ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent-ink); }
h1, h2, h3 { color: var(--ink); }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.14; margin: 0 0 10px; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 30px 0 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
p { margin: 0 0 14px; }
strong { font-weight: 600; color: var(--ink-2); }
code { font-family: var(--mono); font-size: 0.86em; background: var(--fill); padding: 1px 5px; border-radius: 5px; }
.mono { font-family: var(--mono); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 16px; line-height: 1.6; color: var(--body); max-width: 660px; margin: 0; }
.updated { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.muted { color: var(--muted); }

/* ---------------- header ---------------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 57px; padding: 0 20px; background: var(--ink); color: #fff;
  position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--ink-2);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { color: #fff; }
.brand svg { display: block; }
.brand .name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { font-size: 13.5px; color: #d4d4d4; padding: 8px 11px; border-radius: 7px; transition: background var(--ease), color var(--ease); }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: #1f1f1f; color: #fff; }
.site-nav .support { margin-left: 8px; font-size: 13px; font-weight: 500; color: #e5e5e5; border: 1px solid #3a3a3a; padding: 6px 13px; }
.site-nav .support:hover { background: #1f1f1f; border-color: #525252; color: #fff; }

/* ---------------- content shell ---------------- */
.content { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 36px 24px 0; }
.content.narrow { max-width: 760px; }
.content.tight { padding-top: 22px; }

/* breadcrumb */
.breadcrumb { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-ink); }
.breadcrumb .sep { color: #c4c4c4; }
.breadcrumb .here { color: var(--ink); }

/* stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 18px 16px; }
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.stat.sm .n { font-size: 26px; }

/* directory cards with count bars */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 26px; }
.card-grid.cities { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 15px; color: var(--ink); transition: box-shadow var(--ease), border-color var(--ease); }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); border-color: var(--line-strong); color: var(--ink); }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-name { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.card-count { font-size: 13px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card-bar { height: 4px; border-radius: 99px; background: #efefef; margin-top: 11px; overflow: hidden; }
.card-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--ink-2); }
.card-bar > i.lead { background: var(--accent); }

/* ad slot */
.ad { margin: 34px 0 8px; }
.ad-label { font-size: 11px; text-align: center; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.ad-box { border: 1px dashed var(--line-strong); border-radius: 10px; min-height: 96px; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 12.5px; background: var(--fill); }

/* tables */
.table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: 460px; }
table.cams { width: 100%; border-collapse: collapse; font-size: 13px; }
table.cams thead tr { position: sticky; top: 0; background: var(--fill); z-index: 1; }
table.cams th { text-align: left; padding: 10px 14px; font-weight: 600; color: var(--label); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.cams td { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
table.cams tbody tr:nth-child(even) { background: #fbfbfb; }
table.cams td.sub { color: var(--body); }
table.cams td.coords { color: var(--muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
table.cams a { color: var(--accent-ink); }
.table-note { font-size: 12.5px; color: var(--muted); margin: 12px 0; }

/* FAQ */
.faq-item { border-top: 1px solid var(--line); padding: 16px 0; }
.faq-q { font-size: 15.5px; font-weight: 600; }
.faq-a { font-size: 14.5px; line-height: 1.6; color: var(--body); margin-top: 6px; }

/* about / prose */
.prose p { font-size: 16px; line-height: 1.65; color: var(--body); }
.prose > p.first { font-size: 17px; color: var(--ink-2); }
.prose a { color: var(--accent-ink); }
.callout { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin-top: 26px; }
.callout.fill { background: var(--fill); }
.callout h2 { margin: 0 0 12px; font-size: 18px; }
.callout ul { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.7; color: var(--body); }
.underline-accent { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* API */
.endpoint { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.endpoint .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.method { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink); border: 1px solid var(--ink); border-radius: 6px; padding: 2px 7px; }
.endpoint .path { font-family: var(--mono); font-size: 13.5px; }
.endpoint .desc { font-size: 14px; line-height: 1.55; color: var(--body); margin-top: 9px; }
pre.curl { margin: 12px 0 0; background: var(--ink); color: #e5e5e5; border-radius: 8px; padding: 12px 14px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
pre.curl code { background: none; padding: 0; color: inherit; }
.note-accent { font-size: 13px; line-height: 1.6; color: var(--body); margin-top: 16px; border-left: 2px solid var(--accent); padding-left: 14px; }

/* ---------------- footer ---------------- */
.site-footer { margin-top: 44px; border-top: 1px solid var(--line); padding: 30px 24px 40px; }
.site-footer .wrap { max-width: var(--maxw); margin: 0 auto; }
.footer-disclaimer { font-size: 12.5px; line-height: 1.65; color: var(--muted); max-width: 760px; }
.footer-attrib { font-size: 12.5px; color: var(--muted); margin-top: 16px; }
.footer-attrib a { color: var(--label); }
.footer-attrib a:hover { color: var(--accent-ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; font-size: 13px; }
.footer-links a { color: var(--body); }
.footer-links a:hover { color: var(--accent-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.footer-bottom, .footer-bottom a { font-size: 12.5px; color: var(--muted); }
.footer-bottom a { color: var(--label); }
.footer-bottom a:hover { color: var(--accent-ink); }

/* ---------------- map page ---------------- */
html.map-page, body.map-page { height: 100%; }
body.map-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
body.map-page .site-header { flex: 0 0 auto; }
.map-shell { position: relative; flex: 1; background: var(--map-bg); }
#map { position: absolute; inset: 0; }
.map-panel-tl { position: absolute; top: 16px; left: 16px; z-index: 10; width: min(320px, calc(100vw - 32px)); background: rgba(10,12,16,.86); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 18px 18px 16px; color: #f5f5f5; }
.map-panel-br { position: absolute; bottom: 16px; right: 16px; z-index: 10; width: min(280px, calc(100vw - 32px)); max-height: calc(100vh - 200px); overflow-y: auto; background: rgba(10,12,16,.86); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 14px 16px; color: #f5f5f5; display: flex; flex-direction: column; gap: 13px; }
.map-eyebrow { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #8a8a8a; }
.map-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); display: inline-block; }
.map-count { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.map-count .n { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.map-count .l { font-size: 13px; color: #a3a3a3; }
.map-sub { font-size: 12px; color: #6b6b6b; margin-top: 8px; }
.map-inview { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 5px; }
.map-inview:empty { display: none; }
.map-geo { margin-top: 15px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--accent); border: none; border-radius: 9px; padding: 10px 12px; cursor: pointer; transition: background var(--ease); }
.map-geo:hover { background: var(--accent-hover); }
.map-privacy { font-size: 11px; color: #6b6b6b; margin-top: 10px; line-height: 1.45; }
.map-attrib { position: absolute; bottom: 10px; left: 16px; z-index: 10; font-size: 11px; color: #8a8a8a; background: rgba(12,14,18,.7); padding: 3px 8px; border-radius: 6px; }
.map-attrib a { color: #bdbdbd; }
.panel-label { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #8a8a8a; }
.panel-input { width: 100%; margin-top: 7px; font-family: inherit; font-size: 12.5px; color: #f5f5f5; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 7px 10px; outline: none; }
.panel-input::placeholder { color: #8a8a8a; }
.seg { display: flex; gap: 4px; background: rgba(255,255,255,.05); border-radius: 9px; padding: 3px; margin-top: 7px; }
.seg button { flex: 1; font-family: inherit; font-size: 12px; font-weight: 600; border: none; border-radius: 7px; padding: 6px 4px; cursor: pointer; background: transparent; color: #9a9a9a; transition: background var(--ease), color var(--ease); }
.seg button[aria-pressed="true"] { background: rgba(255,255,255,.16); color: #fff; }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-family: inherit; font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 99px; cursor: pointer; background: transparent; color: #b5b5b5; border: 1px solid rgba(255,255,255,.18); transition: all var(--ease); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.legend { margin-top: 10px; }
.legend.hidden { display: none; }
.legend .bar { height: 8px; border-radius: 99px; background: linear-gradient(90deg, rgba(122,70,10,.5), #c77f12, #f5a623, #ffd68c, #fff5e1); }
.legend .ends { display: flex; justify-content: space-between; font-size: 10px; color: #8a8a8a; margin-top: 4px; }

/* map action buttons (share / report) */
.map-actions { display: flex; gap: 8px; margin-top: 12px; }
.map-mini { flex: 1; font-family: inherit; font-size: 12px; font-weight: 600; text-align: center; color: #d4d4d4; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 7px 8px; cursor: pointer; text-decoration: none; transition: background var(--ease), color var(--ease); }
.map-mini:hover { background: rgba(255,255,255,.12); color: #fff; }
.map-mini.wide { width: 100%; margin-top: 12px; }
.map-mini[disabled] { opacity: .55; cursor: default; }
.route-box { border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 13px; }
.route-result { font-size: 12px; color: #d4d4d4; margin-top: 9px; line-height: 1.4; min-height: 0; }
.route-result b { color: var(--accent); font-size: 14px; }
.reel-cta { background: var(--accent); color: var(--ink); border-color: var(--accent); font-weight: 700; }
.reel-cta:hover { background: var(--accent-hover); color: var(--ink); }

/* reel studio */
.reel-modal { position: fixed; inset: 0; z-index: 200; background: rgba(6,8,11,.94); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.reel-modal[hidden] { display: none; }
.reel-frame { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; max-height: 97vh; }
#reel-canvas { width: auto; height: min(70vh, 620px); max-width: 92vw; aspect-ratio: 9 / 16; border-radius: 18px; box-shadow: 0 14px 52px rgba(0,0,0,.6); background: #0a0c10; }
.reel-ui { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(92vw, 340px); transition: opacity .3s ease; }
.reel-ui.playing { opacity: 0; pointer-events: none; }
.reel-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8a8a8a; }
.reel-tpls { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.reel-tpls button { flex: 1 1 21%; font-family: var(--font); font-size: 12px; font-weight: 600; color: #b5b5b5; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 7px 4px; cursor: pointer; transition: background var(--ease), color var(--ease); }
.reel-tpls button[aria-pressed="true"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.reel-tpls button:disabled { opacity: .4; cursor: default; }
.reel-vendor { width: 100%; font-family: var(--font); font-size: 13px; font-weight: 600; color: #f5f5f5; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 9px; padding: 9px 12px; outline: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.reel-vendor option { background: #14161b; color: #f5f5f5; }
.reel-cap { width: 100%; font-family: var(--font); font-size: 13.5px; color: #f5f5f5; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 9px; padding: 9px 12px; outline: none; }
.reel-btns { display: flex; gap: 8px; width: 100%; }
.reel-btns button { flex: 1; font-family: var(--font); font-size: 13px; font-weight: 600; border-radius: 9px; padding: 10px 8px; cursor: pointer; transition: background var(--ease), color var(--ease); }
.reel-play { background: var(--accent); color: var(--ink); border: none; }
.reel-play:hover { background: var(--accent-hover); }
.reel-dl, .reel-copy { background: rgba(255,255,255,.08); color: #e8eaed; border: 1px solid rgba(255,255,255,.16); }
.reel-dl:hover, .reel-copy:hover { background: rgba(255,255,255,.16); }
.reel-music { font-size: 11px; color: #c3a768; text-align: center; line-height: 1.4; }
.reel-music strong { color: var(--accent); font-weight: 700; }
.reel-hint { font-size: 11px; color: #8a8a8a; text-align: center; line-height: 1.4; }
.reel-x { position: absolute; top: -6px; right: -6px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); font-size: 20px; line-height: 1; cursor: pointer; }
.reel-x:hover { background: rgba(255,255,255,.2); }

/* exposure card (reuses .map-panel-tl positioning, offset below the main panel) */
.exposure-card { top: auto; bottom: 16px; left: 16px; width: min(300px, calc(100vw - 32px)); }
.exposure-close { position: absolute; top: 10px; right: 12px; background: none; border: none; color: #8a8a8a; font-size: 20px; line-height: 1; cursor: pointer; }
.exposure-close:hover { color: #fff; }
.exposure-headline { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.exposure-headline .n { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.exposure-headline .l { font-size: 12px; color: #a3a3a3; }
.exposure-rings { display: flex; gap: 8px; margin-top: 14px; }
.exp-ring { flex: 1; background: rgba(255,255,255,.05); border-radius: 8px; padding: 8px 4px; text-align: center; }
.exp-ring-n { display: block; font-size: 17px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.exp-ring-l { display: block; font-size: 10px; color: #8a8a8a; margin-top: 2px; }
.exp-vrow { display: flex; justify-content: space-between; font-size: 12px; color: #d4d4d4; margin-top: 5px; }
.exposure-vendors .panel-label { margin-top: 14px; }
.exp-marker { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid #0a0a0a; box-shadow: 0 0 0 3px rgba(245,166,35,.35); }

.open-map { color: var(--accent-ink); font-weight: 600; }

/* insights bar charts */
.bars { margin: 4px 0 8px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 68px; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
a.bar-row:hover { color: var(--ink); }
a.bar-row:hover .bar-label { color: var(--accent-ink); }
.bar-label { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: #f1f1f1; border-radius: 99px; overflow: hidden; }
.bar-track > i { display: block; height: 100%; background: var(--ink-2); border-radius: 99px; }
.bar-track > i.lead { background: var(--accent); }
.bar-val { font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 110px 1fr 56px; gap: 8px; } }

/* timeline growth chart */
.timeline-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 14px 6px; }
.timeline-svg { width: 100%; height: auto; display: block; }
.tl-grid { stroke: var(--line); stroke-width: 1; }
.tl-xlab { fill: var(--muted); font-size: 11px; font-family: var(--font); text-anchor: middle; }
.tl-area { fill: var(--accent); opacity: 0.12; }
.tl-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.tl-dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }

/* maplibre popup */
.maplibregl-popup-content { font-family: var(--font); font-size: 13px; border-radius: 10px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.maplibregl-popup-content .pv { font-weight: 700; }
.maplibregl-popup-content .pm { color: var(--muted); font-size: 12px; margin: 2px 0; }
.maplibregl-popup-content a { color: var(--accent-ink); font-size: 12px; }
.maplibregl-popup-close-button { font-size: 18px; padding: 2px 7px; color: var(--muted); }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* embed maps on content pages */
.embed-map { height: 340px; margin-top: 20px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--map-bg); }
.embed-map.city { height: 320px; }

/* scrollbars for panels/tables */
.thin-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
.thin-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }

@media (max-width: 720px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 27px; }
  .map-panel-br { display: none; }
  .content { padding: 24px 18px 0; }
}
