/* FreeCamps — single committed night theme.
 *
 * The accent is National Digital's brand orange, #f26324, tinted 25% toward
 * white: #f58a5b. Tinting preserves hue exactly, so this is the brand colour at
 * 18.3 degrees and not a colour that happens to look similar — and the lift is
 * what gets it to 7.96:1 on this ground, which clears WCAG AAA. It replaced an
 * amber, #dfa34c, that was nobody's brand colour at 35.5 degrees.
 *
 * The neutrals are rotated to sit around 22 degrees for the same reason: a warm
 * grey biased toward the page's accent reads as chosen, and one biased toward a
 * different hue reads as left over. The semantic colours below are deliberately
 * NOT derived from the accent — green, red and purple mean something here, and
 * a palette that pulled them toward the brand would blunt the one distinction
 * on this site that decides someone's night.
 *
 * Every value above the semantic block is checked for contrast by a test —
 * including --accent-deep, which is the one colour here that is read on WHITE:
 * MapLibre draws its popups on a white card regardless of the page's palette.
 */
:root {
  --bg: #130d09;
  --surface: #1c1410;
  --surface-2: #241913;
  --line: #33241c;
  --text: #edddd3;
  --muted: #a28c7f;
  --faint: #968274;   /* was #6f6552: 3.09:1 on the page and failing AA as body text */
  --accent: #f58a5b;  /* National Digital #f26324, tinted 25% */
  --accent-hover: #f7a17c;
  --accent-ink: #1a0d06;
  --accent-deep: #a94519;  /* #f26324 shaded to 70%: the same hue, on a white map popup */
  --ok: #74c296;      /* permitted / open */
  --pay: #6fb9d6;     /* book + pay */
  --contested: #a99be0;
  --warn: #d97c7c;    /* prohibited */
  --ban: #c44a4a;     /* exclusion-zone hatch; mirrored as a literal in map.js (canvas) */
  --unknown: #a28c7f;
  --max-copy: 42rem;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 'Public Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Bitter', Georgia, serif; font-weight: 700; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 .7rem; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
p, ul, ol { max-width: var(--max-copy); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .9em; }
small { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.wrap { max-width: 60rem; margin: 0 auto; padding: 0 1.1rem; }

/* header / footer */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-head .wrap { display: flex; align-items: baseline; gap: 1.4rem; padding-top: .9rem; padding-bottom: .9rem; flex-wrap: wrap; }
.brand { font-family: 'Bitter', Georgia, serif; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.site-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.site-nav a:hover { color: var(--text); }
.site-foot { border-top: 1px solid var(--line); margin-top: 4rem; padding: 1.6rem 0 2.4rem; color: var(--muted); font-size: .88rem; }
.site-foot p { margin: .35rem 0; }

main { padding-top: 2rem; }
.crumbs { font-size: .85rem; color: var(--faint); margin-bottom: 1.2rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.lede { color: var(--muted); font-size: 1.08rem; max-width: var(--max-copy); }

/* the name on the sign, where we have tidied the wording for the title */
.signed-as { color: var(--faint); font-size: .9rem; max-width: var(--max-copy); }
.signed-as strong { color: var(--muted); font-weight: 600; }

/* the one banner that appears on every place page */
.signs {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: .7rem 1rem;
  margin: 1.4rem 0;
  max-width: var(--max-copy);
  font-size: .95rem;
}

/* tier badges */
.tier {
  display: inline-block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .28rem .6rem;
  border: 1px solid;
  border-radius: 2px;
}
.tier-permitted { color: var(--ok); border-color: var(--ok); }
.tier-pay { color: var(--pay); border-color: var(--pay); }
.tier-contested { color: var(--contested); border-color: var(--contested); }
.tier-prohibited { color: var(--warn); border-color: var(--warn); }
.tier-unknown { color: var(--unknown); border-color: var(--unknown); }

/* amenity chips */
.amenities { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; padding: 0; list-style: none; max-width: none; }
.amenities li {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: .3rem .65rem;
  font-size: .88rem;
  border-radius: 2px;
  color: var(--text);
}
.amenities li.off { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line); }

/* provenance blocks */
.prov {
  border-top: 1px solid var(--line);
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  font-size: .88rem;
  color: var(--muted);
}
.prov h2 { font-size: 1rem; margin-top: 0; }
.prov ul { list-style: none; padding: 0; margin: 0; }
.prov li { margin: .55rem 0; }
.prov .quote { color: var(--text); font-style: italic; }
.unverified {
  border: 1px dashed var(--faint);
  padding: .7rem 1rem;
  margin: 1rem 0;
  max-width: var(--max-copy);
  color: var(--muted);
  font-size: .92rem;
}

/* cards / listings */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .8rem; padding: 0; margin: 1.2rem 0; list-style: none; }
.cards li { background: var(--surface); border: 1px solid var(--line); border-radius: 3px; }
.cards a { display: block; padding: .85rem 1rem; text-decoration: none; color: var(--text); height: 100%; }
.cards a:hover { border-color: var(--muted); background: var(--surface-2); }
/* A card whose source published no link. Same box, no affordance — it must not
   look clickable when there is nowhere to click to. */
.cards .card-static { display: block; padding: .85rem 1rem; color: var(--text); height: 100%; }
.cards .t { font-weight: 600; display: block; }
.cards .m { color: var(--muted); font-size: .85rem; display: block; margin-top: .2rem; }

table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
td.num { font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; margin: 1.2rem 0; }

/* mode split on home */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin: 1.8rem 0; }
.mode { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1.2rem 1.3rem; }
.mode h2 { margin-top: 0; font-size: 1.15rem; }
.mode p { color: var(--muted); font-size: .95rem; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  padding: .55rem 1rem;
  border-radius: 3px;
  margin-top: .4rem;
}
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-quiet { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-quiet:hover { background: var(--surface-2); color: var(--text); }

/* map */
#map { height: 66vh; min-height: 22rem; border: 1px solid var(--line); border-radius: 4px; margin: 1.4rem 0; }
.map-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.map-legend span::before { content: '●'; margin-right: .35rem; }
.map-legend .lg-ok::before { color: var(--ok); }
.map-legend .lg-shower::before { color: var(--accent); }
.map-legend .lg-ban::before {
  content: '';
  display: inline-block;
  width: .8em; height: .8em;
  margin-right: .35rem;
  border: 1px solid var(--ban);
  background: repeating-linear-gradient(45deg, rgba(196,74,74,.55) 0 2px, transparent 2px 6px);
}

/* MapLibre popups sit on a white card — force readable colors regardless of
   the page's dark palette (body color would otherwise be cream-on-white). */
.maplibregl-popup-content {
  color: var(--accent-ink);
  font: 400 .88rem/1.5 'Public Sans', system-ui, sans-serif;
  padding: .7rem .9rem;
}
.maplibregl-popup-content a { color: var(--accent-deep); }

.stat-strip { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1.6rem 0; }
.stat-strip div { min-width: 7rem; }
.stat-strip .n { font-family: 'Bitter', Georgia, serif; font-size: 1.7rem; font-weight: 700; color: var(--accent); display: block; }
.stat-strip .l { font-size: .85rem; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  a, .btn, .cards a { transition: color .12s ease, background .12s ease, border-color .12s ease; }
}

/* finder — the front door. Sized for a thumb on a phone at night: the primary
   button is the largest thing on the page, and results are readable without
   zooming. */
.find {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.3rem;
  margin: 1.4rem 0 2rem;
}
.btn-big {
  font-size: 1.15rem;
  padding: .95rem 1.5rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  max-width: 22rem;
  margin-top: 0;
}
.btn-big:disabled { opacity: .6; cursor: default; }
.find-town { margin-top: 1.2rem; }
.find-town label { display: block; color: var(--muted); font-size: .9rem; margin-bottom: .35rem; }
.find-row { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 22rem; }
.find-row input {
  flex: 1 1 10rem;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 3px;
  padding: .55rem .7rem;
  font: inherit;
  min-width: 0;
}
.find-row input::placeholder { color: var(--faint); }
.find-row .btn { margin-top: 0; cursor: pointer; font-family: inherit; }
.find-privacy { color: var(--faint); font-size: .85rem; margin: 1rem 0 0; }
.find-status { color: var(--accent); margin: .9rem 0 0; min-height: 1.2em; }
#find-results:focus { outline: 2px solid var(--accent); outline-offset: 4px; }
/* Shorter than the state maps: this one sits above a list that is the point,
   and has to leave the first two or three cards visible on a phone. */
#find-map { height: 42vh; min-height: 15rem; border: 1px solid var(--line); border-radius: 4px; margin: 1.2rem 0 0; }
.find-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .7rem; }
.find-list li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .8rem .9rem;
}
.f-head { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.f-title { font-weight: 600; color: var(--text); }
.f-dist { color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .9rem; }
.f-rule { margin: .4rem 0 0; font-size: .9rem; }
.f-rule.tier-permitted { color: var(--ok); }
.f-rule.tier-unknown { color: var(--muted); }
.f-rule.tier-prohibited { color: var(--warn); }
.f-meta { margin: .25rem 0 .5rem; color: var(--faint); font-size: .85rem; }
.f-go { font-size: .9rem; }
.f-note { color: var(--faint); font-size: .85rem; margin-top: 1rem; }
.state-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.state-links .btn { margin-top: 0; }

/* help — the numbers people ring. Bigger tap targets than a body link. */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .8rem; margin: 1.2rem 0; padding: 0; list-style: none; }
.help-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1rem; }
.help-grid .t { font-weight: 600; display: block; }
.help-grid .m { color: var(--muted); font-size: .88rem; display: block; margin: .25rem 0 .6rem; }
.help-grid .tel { display: inline-block; font-size: 1.05rem; font-weight: 600; }
