/*
Theme Name: Explore Directory
Description: A fast, plain theme for a city directory. Works with the Directory Core plugin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: explore-directory
*/

:root {
  --bg: #f2f5f6;
  --surface: #ffffff;
  --fg: #14232b;
  --muted: #53656e;
  --line: #d3dde1;
  --accent: #0b6e75;
  --accent-ink: #ffffff;
  --accent-soft: #dcefef;
  --mark: #b45f06;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e191e; --surface: #15242b; --fg: #e3ecee; --muted: #9ab0b8; --line: #27393f;
    --accent: #4dc2c8; --accent-ink: #062226; --accent-soft: #14343a; --mark: #f0a04b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg); color: var(--fg);
  font: 400 16px/1.55 var(--font-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 1040px; margin: 0 auto; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: static; width: auto; height: auto; clip: auto; }

/* header */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.brand { font: 700 20px/1 var(--font-display); letter-spacing: -0.01em; margin-right: auto; color: var(--fg); text-decoration: none; }
.topbar nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; font-size: 14px; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover, .topbar nav .current-menu-item > a { color: var(--fg); }
.search { display: flex; gap: 6px; flex: 1 1 220px; max-width: 320px; }
.search input[type="search"] { flex: 1; min-width: 0; font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--fg); }
.btn, .search button, .report-form button { font: 600 14px var(--font-body); padding: 8px 14px; border-radius: 4px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; }
.btn:hover, .search button:hover, .report-form button:hover { background: var(--accent-soft); }

/* page head */
.crumbs { font-size: 14px; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); }
h1 { font: 700 clamp(32px, 6vw, 52px)/1.05 var(--font-display); letter-spacing: -0.02em; margin: 8px 0 6px; text-wrap: balance; }
.lede { color: var(--muted); max-width: 62ch; margin: 0 0 20px; }
.lede b { color: var(--fg); font-weight: 600; }
h2 { font: 700 22px/1.2 var(--font-display); letter-spacing: -0.01em; margin: 0 0 12px; text-wrap: balance; }
h3 { font: 700 17px/1.3 var(--font-display); margin: 0 0 8px; }
section { margin-top: 36px; }
main { padding-bottom: 48px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.hero { padding: 40px 0 8px; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 28px; margin: 0; }
.facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { color: var(--muted); font-size: 14px; flex: none; }
.facts dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.mono { font-family: var(--font-data); font-weight: 500; font-size: 14px; }

.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* plot */
.plot-svg { display: block; width: 100%; height: auto; }
.plot-svg .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.plot-svg .ringlbl { fill: var(--muted); font: 11px var(--font-data); }
.plot-svg .cross { stroke: var(--muted); stroke-width: 1; }
.plot-svg .pt { fill: var(--accent); }
.plot-svg .num { fill: var(--accent-ink); font: 600 11px var(--font-body); text-anchor: middle; dominant-baseline: central; }
.plot-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font: 600 12px var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 10px 8px 0; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
td.n, th.n { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; margin-right: 8px; }
.scroll { overflow-x: auto; }

.about > *:first-child { margin-top: 0; }
.about > *:last-child { margin-bottom: 0; }
.about p { max-width: 68ch; }

.grid-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 20px; }
.grid-links a { text-decoration: none; }
.grid-links a:hover { text-decoration: underline; }
.letter { font: 700 13px var(--font-data); color: var(--muted); margin: 16px 0 6px; }
.letter:first-child { margin-top: 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li span:first-child { min-width: 0; overflow-wrap: anywhere; }
.list .sub { color: var(--muted); font-size: 14px; text-align: right; }
.more { margin: 12px 0 0; font-size: 15px; }
.empty { color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

details { border-bottom: 1px solid var(--line); padding: 10px 0; }
details summary { font-weight: 600; cursor: pointer; }
details p { margin: 8px 0 0; max-width: 68ch; }

.report-form { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report-form input[type="text"] { flex: 1 1 260px; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--fg); }
.hp { position: absolute; left: -9999px; }
.notice { font-size: 14px; border-left: 3px solid var(--mark); padding: 2px 0 2px 12px; margin: 0 0 14px; max-width: 70ch; color: var(--muted); }

footer.site-footer { padding: 16px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pagination { margin-top: 20px; }
.entry-list { list-style: none; padding: 0; margin: 0; }
.entry-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }

/* photos */
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--line); }
.photo figcaption { font-size: 13px; color: var(--muted); padding-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.photo .credit { font-size: 12px; }
.hero-photo { margin: 0 0 8px; max-width: 760px; }
.hero-photo img { max-height: 420px; object-fit: cover; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

/* updated line */
.updated { font-size: 14px; color: var(--muted); margin: -10px 0 18px; }

/* map */
.mapbox .map-canvas { height: 420px; border-radius: 6px; overflow: hidden; z-index: 0; }
.mapbox .map-actions { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mapbox .map-msg { font-size: 14px; color: var(--mark); }
.mapbox .btn[disabled] { opacity: 0.6; cursor: default; }
.leaflet-container { font: inherit; }

/* reach, climate */
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.three p { margin: 0 0 8px; }
.reach-note { margin-top: 14px; max-width: 68ch; }
.reach-note p { margin: 0 0 8px; }
.climate-summary { margin: 0 0 14px; max-width: 68ch; }
table.climate .barcell { width: 38%; padding-right: 0; }
table.climate .bar { display: block; height: 10px; border-radius: 2px; background: var(--accent); min-width: 2px; }
.grid-links .sub { color: var(--muted); font-size: 13px; margin-left: 6px; }
table.climate .barcell { padding-left: 12px; }
