/* Perch Scout — shared styles for every page.
   Look: a field-survey sheet. Warm paper, black ink, one loud color (survey orange), road-sign type.
   Fonts are self-hosted (no font CDN): Overpass for text, Overpass Mono for labels, numbers, coordinates. */

@font-face { font-family: "Overpass"; src: url("/fonts/overpass.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Overpass"; src: url("/fonts/overpass-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Overpass Mono"; src: url("/fonts/overpass-mono.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --font: "Overpass", system-ui, sans-serif;
  --mono: "Overpass Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --paper: #f4f2eb;       /* page background */
  --bg: #fbfaf6;          /* panels, inputs */
  --fg: #1b1a17;          /* ink */
  --muted: #6b675e;
  --line: #d8d4c8;
  --panel: rgba(251, 250, 246, 0.97);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 3px 10px rgba(0, 0, 0, 0.14);
  --radius: 5px;

  /* point colors — also read by app.js for the canvas */
  --lead: #ff5a00;
  --osm: #3a6fd8;
  --near: var(--osm);    /* blue = "maybe already on OSM": the opposite of the orange leads, and colorblind-safe */
  --listed: #8b4fd6;     /* violet = on OpenStreetMap and in Flock's list */
  --matched: #2f9e6b;
  --decom: #8d8a82;

  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151513; --bg: #1d1c1a; --fg: #efece4; --muted: #a39e92; --line: #3a3833;
    --panel: rgba(29, 28, 26, 0.96); --osm: #7fa6ff; --listed: #b98cff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151513; --bg: #1d1c1a; --fg: #efece4; --muted: #a39e92; --line: #3a3833;
  --panel: rgba(29, 28, 26, 0.96); --osm: #7fa6ff; --listed: #b98cff;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--fg);
  font: 400 15px/1.45 var(--font); font-feature-settings: "kern", "liga"; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--lead); outline-offset: 2px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
code, kbd, .num { font-family: var(--mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* Small uppercase mono label: field names, section kickers, tags. */
.label { font: 600 11px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* ---------- components ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px;
  padding: 9px 14px 8px; border: 1.5px solid var(--fg); border-radius: var(--radius); background: var(--bg);
  color: var(--fg); font-weight: 700; font-size: 14px; text-decoration: none; text-align: center; }
.btn:hover { background: color-mix(in srgb, var(--fg) 7%, var(--bg)); text-decoration: none; }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.primary:hover { background: color-mix(in srgb, var(--fg) 85%, var(--bg)); }

.linkish { border: 0; background: none; padding: 0; color: inherit; font: inherit;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* Status tag: flat, square-cornered, like a stamp on a survey form. */
.tag { display: inline-block; padding: 3px 7px 2px; border-radius: 2px;
  font: 700 11px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.tag.lead { background: var(--lead); color: #fff; }
.tag.near { background: var(--near); color: #fff; }  /* white on the mid blue (light mode) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.near { color: #0b1a3a; } }  /* dark text on light blue */
:root[data-theme="dark"] .tag.near { color: #0b1a3a; }
.tag.osm { background: var(--fg); color: var(--paper); }
.tag.listed { background: var(--listed); color: #fff; }  /* white on the mid violet (light mode) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.listed { color: #1d0d38; } }  /* dark text on light violet */
:root[data-theme="dark"] .tag.listed { color: #1d0d38; }
.tag.matched { background: var(--matched); color: #fff; }
.tag.decom { background: var(--decom); color: #fff; }

/* Map-point swatches, matching how the canvas draws each kind. */
.sw { flex: none; display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; }
.sw.lead { border: 3px solid var(--lead); }
.sw.near { border: 3px solid var(--near); }
.sw.planned { /* broken ring: four arcs, like the canvas draws it */
  background: repeating-conic-gradient(from -31.5deg, var(--lead) 0 63deg, transparent 63deg 90deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); }
.sw.osm { background: var(--fg); width: 10px; height: 10px; margin: 0 2px; }
.sw.listed { background: var(--listed); width: 11px; height: 11px; margin: 0 1.5px; }
.sw.matched { background: var(--matched); width: 9px; height: 9px; margin: 0 2.5px; }
.sw.decom { background: var(--decom); width: 8px; height: 8px; margin: 0 3px; }

/* Field list: label column + value column. */
.fields { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 10px 0; font-size: 14px; }
.fields dt { font: 600 11px/1.9 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.fields dd { margin: 0; overflow-wrap: anywhere; }

/* The one sentence the whole site is about. */
.verify { margin: 12px 0; padding: 10px 12px 9px; border-left: 4px solid var(--lead);
  background: color-mix(in srgb, var(--lead) 9%, transparent); font-size: 15px; }

/* Legal disclaimer text: small, but never hidden. */
.disclaimer { font-size: 12px; line-height: 1.5; color: var(--muted); }

/* ---------- menu bar (every page) ---------- */
.masthead { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px;
  max-width: 760px; margin: 0 auto; padding: 18px 16px 14px; border-bottom: 1.5px solid var(--fg); }
.masthead nav a { white-space: nowrap; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font: 700 14px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
/* Survey ring, same proportions as favicon.svg (stroke ≈ 21% of the diameter). */
.wordmark::before { content: ""; flex: none; width: 13px; height: 13px; border: 3px solid var(--lead); border-radius: 50%; }
.masthead nav { display: flex; gap: 18px; font: 600 12px/1 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }
.masthead nav a { text-decoration: none; color: var(--muted); padding: 4px 0; }
.masthead nav a:hover { color: var(--fg); }
.masthead nav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--lead); }
.masthead nav { margin-left: auto; }

/* Theme switcher: theme.js fills <div class="theme-switch"> with an icon button + Light/Dark/System menu.
   The slot only takes space once theme.js has run (it adds .js to <html> from <head>), so nothing shifts. */
.theme-switch { display: none; position: relative; align-self: center; }
.js .theme-switch { display: block; flex: none; width: 32px; height: 32px; margin: -4px -7px -4px -8px; }  /* icon lines up with the right edge */
.theme-btn { position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--radius); background: none; color: var(--muted); }
.theme-btn::before { content: ""; position: absolute; inset: -6px; }  /* 44px touch target, same 32px look */
.theme-btn:hover, .theme-btn[aria-expanded="true"] { color: var(--fg); background: color-mix(in srgb, var(--fg) 8%, transparent); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-menu { position: absolute; z-index: 1100; top: calc(100% + 8px); right: 0; min-width: 150px; padding: 4px;
  background: var(--bg); border: 1.5px solid var(--fg); border-radius: var(--radius); box-shadow: var(--shadow); }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 8px 10px 6px;
  border: 0; border-radius: 3px; background: none; color: var(--muted); text-align: left;
  font: 600 12px/1 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }
.theme-menu button svg { flex: none; width: 16px; height: 16px; margin-top: -2px; }
.theme-menu button:hover, .theme-menu button:focus-visible { color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }
.theme-menu button:focus-visible { outline-offset: -2px; }
.theme-menu [aria-checked="true"] { color: var(--fg); }
.theme-menu [aria-checked="true"]::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--lead); }
@media (pointer: coarse) { .theme-menu button { min-height: 44px; } }

/* Narrow screens: the links already wrap under the wordmark, so give them their own row and keep the
   theme button top right, next to the wordmark. (The map page keeps one row; see map.css.) */
@media (max-width: 460px) {
  .masthead { align-items: center; }
  .masthead nav { order: 3; flex-basis: 100%; margin-left: 0; }
  .js .theme-switch { margin-left: auto; }
}


/* ---------- steps: solid numbered circles on one continuous vertical line ----------
   <ol class="steps"><li><b>Title</b><span>Text</span></li>…</ol>
   The line runs through every step and trails past the last one. */
.steps { --dot: 34px; --line: 2px; list-style: none; counter-reset: step; margin: 20px 0 28px; padding: 0; }
ol.steps li { counter-increment: step; position: relative; min-height: var(--dot); margin: 0; padding: 5px 0 22px calc(var(--dot) + 16px); }
ol.steps li:last-child { padding-bottom: 26px; }
.steps li::before, .steps li::after { box-sizing: border-box; }
.steps li::before { content: counter(step); position: absolute; z-index: 1; top: 0; left: 0; width: var(--dot); height: var(--dot);
  display: grid; place-items: center; padding-top: 2px; border-radius: 50%;
  background: var(--fg); color: var(--paper); font: 700 15px/1 var(--mono); }
.steps li::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc((var(--dot) - var(--line)) / 2);
  width: var(--line); background: var(--fg); }
.steps li:last-child::after { background: linear-gradient(var(--fg) 60%, transparent); }
.steps b { display: block; font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.steps span { display: block; font-size: 15px; line-height: 1.45; color: var(--muted); }
