/* ==========================================================================
   Fonts: self-hosted variable fonts (SIL Open Font License), no third-party requests
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans-italic.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

/* ==========================================================================
   Theme tokens. Every color on the site comes from these variables; change the
   palette here, never with hex values further down. Dark values are defined twice
   (automatic via the device setting, and forced via the theme toggle): keep both
   dark blocks identical.
   ========================================================================== */

:root {
  /* palette: "linen and denim" (dusty blue accent), light */
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-2: #eeebe5;
  --ink: #22303b;
  --ink-2: #5a6772;
  --border: #e1ddd5;
  --accent: #3d6784;
  --accent-strong: #2d4f66;
  --accent-soft: #e0eaf1;
  --on-accent: #ffffff;
  --positive: #4f7556;
  --positive-soft: #e3ece1;
  --gold: #e8a33d;
  --gold-strong: #d48f26;
  --on-gold: #22303b;
  --callout-bg: #fdf1dc;
  --callout-ink: #6b4410;
  --shadow: 0 1px 2px rgb(34 48 59 / 6%), 0 6px 20px rgb(34 48 59 / 7%);
  --shadow-hover: 0 2px 4px rgb(34 48 59 / 8%), 0 12px 32px rgb(34 48 59 / 12%);
  color-scheme: light;

  /* type */
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;

  /* shape & layout */
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 72rem;
  --reading-width: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12181d;
    --surface: #1a2229;
    --surface-2: #232d35;
    --ink: #e9eef2;
    --ink-2: #a3b0bb;
    --border: #2e3a44;
    --accent: #83aecb;
    --accent-strong: #a3c4db;
    --accent-soft: #203140;
    --on-accent: #12181d;
    --positive: #93b597;
    --positive-soft: #1f2b24;
    --gold: #e8a33d;
    --gold-strong: #f0b75f;
    --on-gold: #12181d;
    --callout-bg: #2e2716;
    --callout-ink: #f2d6a8;
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #12181d;
  --surface: #1a2229;
  --surface-2: #232d35;
  --ink: #e9eef2;
  --ink-2: #a3b0bb;
  --border: #2e3a44;
  --accent: #83aecb;
  --accent-strong: #a3c4db;
  --accent-soft: #203140;
  --on-accent: #12181d;
  --positive: #93b597;
  --positive-soft: #1f2b24;
  --gold: #e8a33d;
  --gold-strong: #f0b75f;
  --on-gold: #12181d;
  --callout-bg: #2e2716;
  --callout-ink: #f2d6a8;
  --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
  --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
  color-scheme: dark;
}

/* ==========================================================================
   Palettes: visitors pick one in the header settings widget (partials/nav.ejs).
   The default ("Dusty blue") is the tokens above; each alternate below sets its own
   accent AND neutrals (background, text, borders) so every palette looks right.
   Every palette needs three blocks with the SAME variables: light, auto-dark, and
   forced-dark. The dark blocks are more specific, so they win in dark mode even
   though the light block comes later.
   ========================================================================== */

/* Terracotta */
:root[data-palette="terracotta"] {
  --bg: #faf6f0;
  --surface: #ffffff;
  --surface-2: #f3ece2;
  --ink: #2d2622;
  --ink-2: #6b5f57;
  --border: #e6dccf;
  --accent: #b4552f;
  --accent-strong: #963f1e;
  --accent-soft: #f7e4d9;
  --on-accent: #ffffff;
  --positive: #4f7556;
  --positive-soft: #e3ece1;
  --on-gold: #2d2622;
  --callout-bg: #fdf1dc;
  --shadow: 0 1px 2px rgb(45 38 34 / 6%), 0 6px 20px rgb(45 38 34 / 7%);
  --shadow-hover: 0 2px 4px rgb(45 38 34 / 8%), 0 12px 32px rgb(45 38 34 / 12%);
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="terracotta"]:not([data-theme="light"]) {
    --bg: #1a1613;
    --surface: #241f1b;
    --surface-2: #2e2823;
    --ink: #f3ece4;
    --ink-2: #b7aa9e;
    --border: #3b332d;
    --accent: #e08560;
    --accent-strong: #eca083;
    --accent-soft: #3b271e;
    --on-accent: #1a1613;
    --positive: #93b597;
    --positive-soft: #25302a;
    --on-gold: #1a1613;
    --callout-bg: #33291b;
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
  }
}
:root[data-palette="terracotta"][data-theme="dark"] {
  --bg: #1a1613;
  --surface: #241f1b;
  --surface-2: #2e2823;
  --ink: #f3ece4;
  --ink-2: #b7aa9e;
  --border: #3b332d;
  --accent: #e08560;
  --accent-strong: #eca083;
  --accent-soft: #3b271e;
  --on-accent: #1a1613;
  --positive: #93b597;
  --positive-soft: #25302a;
  --on-gold: #1a1613;
  --callout-bg: #33291b;
  --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
  --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
}

/* Sage */
:root[data-palette="sage"] {
  --bg: #f6f5ef;
  --surface: #ffffff;
  --surface-2: #ecebe2;
  --ink: #26302a;
  --ink-2: #5d675f;
  --border: #e0ded3;
  --accent: #4d7155;
  --accent-strong: #3b5a42;
  --accent-soft: #e2ebe0;
  --on-accent: #ffffff;
  --positive: #b4552f;
  --positive-soft: #f7e4d9;
  --on-gold: #26302a;
  --callout-bg: #fdf1dc;
  --shadow: 0 1px 2px rgb(38 48 42 / 6%), 0 6px 20px rgb(38 48 42 / 7%);
  --shadow-hover: 0 2px 4px rgb(38 48 42 / 8%), 0 12px 32px rgb(38 48 42 / 12%);
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="sage"]:not([data-theme="light"]) {
    --bg: #141814;
    --surface: #1c211d;
    --surface-2: #252b26;
    --ink: #eaefe9;
    --ink-2: #a6b0a7;
    --border: #2f372f;
    --accent: #93b597;
    --accent-strong: #aec9b1;
    --accent-soft: #223026;
    --on-accent: #141814;
    --positive: #e08560;
    --positive-soft: #3b271e;
    --on-gold: #141814;
    --callout-bg: #2e2716;
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
  }
}
:root[data-palette="sage"][data-theme="dark"] {
  --bg: #141814;
  --surface: #1c211d;
  --surface-2: #252b26;
  --ink: #eaefe9;
  --ink-2: #a6b0a7;
  --border: #2f372f;
  --accent: #93b597;
  --accent-strong: #aec9b1;
  --accent-soft: #223026;
  --on-accent: #141814;
  --positive: #e08560;
  --positive-soft: #3b271e;
  --on-gold: #141814;
  --callout-bg: #2e2716;
  --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
  --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
}

/* Plum */
:root[data-palette="plum"] {
  --bg: #f8f4f3;
  --surface: #ffffff;
  --surface-2: #efe8e7;
  --ink: #2e2530;
  --ink-2: #685c66;
  --border: #e5dcdb;
  --accent: #7d4a67;
  --accent-strong: #633751;
  --accent-soft: #f1e3ea;
  --on-accent: #ffffff;
  --positive: #4f7556;
  --positive-soft: #e3ece1;
  --on-gold: #2e2530;
  --callout-bg: #fdf1dc;
  --shadow: 0 1px 2px rgb(46 37 48 / 6%), 0 6px 20px rgb(46 37 48 / 7%);
  --shadow-hover: 0 2px 4px rgb(46 37 48 / 8%), 0 12px 32px rgb(46 37 48 / 12%);
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="plum"]:not([data-theme="light"]) {
    --bg: #19141a;
    --surface: #221c23;
    --surface-2: #2c252d;
    --ink: #f1eaf0;
    --ink-2: #b5a8b3;
    --border: #3a3139;
    --accent: #c893b1;
    --accent-strong: #dab0c8;
    --accent-soft: #34222d;
    --on-accent: #19141a;
    --positive: #93b597;
    --positive-soft: #1f2b24;
    --on-gold: #19141a;
    --callout-bg: #2e2716;
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
  }
}
:root[data-palette="plum"][data-theme="dark"] {
  --bg: #19141a;
  --surface: #221c23;
  --surface-2: #2c252d;
  --ink: #f1eaf0;
  --ink-2: #b5a8b3;
  --border: #3a3139;
  --accent: #c893b1;
  --accent-strong: #dab0c8;
  --accent-soft: #34222d;
  --on-accent: #19141a;
  --positive: #93b597;
  --positive-soft: #1f2b24;
  --on-gold: #19141a;
  --callout-bg: #2e2716;
  --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
  --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
}

/* Teal */
:root[data-palette="teal"] {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --surface-2: #e8edeb;
  --ink: #1f2e2d;
  --ink-2: #566665;
  --border: #dbe2df;
  --accent: #2f6f6a;
  --accent-strong: #225450;
  --accent-soft: #dcecea;
  --on-accent: #ffffff;
  --positive: #4f7556;
  --positive-soft: #e3ece1;
  --on-gold: #1f2e2d;
  --callout-bg: #fdf1dc;
  --shadow: 0 1px 2px rgb(31 46 45 / 6%), 0 6px 20px rgb(31 46 45 / 7%);
  --shadow-hover: 0 2px 4px rgb(31 46 45 / 8%), 0 12px 32px rgb(31 46 45 / 12%);
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="teal"]:not([data-theme="light"]) {
    --bg: #111817;
    --surface: #182120;
    --surface-2: #212b2a;
    --ink: #e6f0ee;
    --ink-2: #9fb2af;
    --border: #2b3836;
    --accent: #7fbab3;
    --accent-strong: #a0cec8;
    --accent-soft: #1c2f2d;
    --on-accent: #111817;
    --positive: #93b597;
    --positive-soft: #1f2b24;
    --on-gold: #111817;
    --callout-bg: #2e2716;
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
    --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
  }
}
:root[data-palette="teal"][data-theme="dark"] {
  --bg: #111817;
  --surface: #182120;
  --surface-2: #212b2a;
  --ink: #e6f0ee;
  --ink-2: #9fb2af;
  --border: #2b3836;
  --accent: #7fbab3;
  --accent-strong: #a0cec8;
  --accent-soft: #1c2f2d;
  --on-accent: #111817;
  --positive: #93b597;
  --positive-soft: #1f2b24;
  --on-gold: #111817;
  --callout-bg: #2e2716;
  --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 6px 20px rgb(0 0 0 / 30%);
  --shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 40%);
}

/* ==========================================================================
   Base
   ========================================================================== */

html {
  /* base size for everything in rem, stepped up on wider screens (see media queries
     at the bottom): 100% = 16px on phones, 112.5% = 18px on tablets/small laptops,
     125% = 20px on desktops. Percentages (not px) still respect a visitor's own
     browser font-size setting. */
  font-size: 100%;
  /* reserves space for the scrollbar so pages shorter than the viewport don't shift content when navigating */
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

/* The page is at least as tall as the window, so the footer sits at the bottom even
   when there's little content */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body > main {
  flex: 1 0 auto;
  width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.15rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

img {
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-2);
  max-width: var(--reading-width);
  margin: 0 0 1rem;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.3rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--on-accent);
}

.button-secondary {
  background: transparent;
  color: var(--accent);
}

.button-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 600;
}

/* an amenity on a park card ("Fenced", "Some shade"), set apart from ages and cost */
.chip-feature {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* drafts are only ever visible on the local dev site */
.draft-badge {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  background: var(--callout-bg);
  color: var(--callout-ink);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Header & footer
   ========================================================================== */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.site-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Display settings widget (header): light/dark theme + palette. Hidden until settings.js has
   run (it sets data-theme-choice), since it does nothing without JavaScript. */
.settings {
  position: relative;
  display: none;
}

:root[data-theme-choice] .settings {
  display: block;
}

.settings-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.settings-toggle:hover,
.settings-toggle[aria-expanded="true"] {
  color: var(--ink);
  background: var(--surface-2);
}

.settings-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}

.settings-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 10;
  width: 17rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}

.settings-panel[hidden] {
  display: none;
}

.settings-heading {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.settings-heading:not(:first-child) {
  margin-top: 1rem;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--surface-2);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.4rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.segmented svg {
  width: 1rem;
  height: 1rem;
}

.palette-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.25rem;
}

.palette-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.1rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.palette-option:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* each swatch shows its palette's light background with its accent in the middle */
.palette-swatch {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: radial-gradient(circle, var(--swatch) 55%, var(--swatch-bg) 57%);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%);
}

.palette-option[aria-pressed="true"] {
  color: var(--ink);
}

.palette-option[aria-pressed="true"] .palette-swatch {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--swatch);
}

.site-footer {
  margin-top: 2rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.site-footer-about p {
  margin: 0.35rem 0 0;
  color: var(--ink-2);
  max-width: var(--reading-width);
}

.site-footer-fineprint {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-2);
}

/* ==========================================================================
   Home & list pages
   ========================================================================== */

.hero {
  padding: 1.5rem 0 1rem;
}

.hero h1 {
  font-size: 2.25rem;
  max-width: 20ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.home-section {
  margin-top: 2.5rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.section-header h2 {
  margin: 0;
}

.section-link {
  font-weight: 700;
  text-decoration: none;
}

.page-header {
  margin-bottom: 0.5rem;
}

/* Park list: the city filter (public/js/park-filters.js), shown only with JavaScript */
.park-filters {
  margin: 0.75rem 0 0;
}

.park-filters[hidden] {
  display: none;
}

.park-filters-label {
  margin: 0 0 0.5rem;
  color: var(--ink-2);
  font-weight: 600;
}

/* Phones: one row that scrolls sideways (like Google Maps' chips), running to the
   screen edges, with a fade on the right to show there's more. Wider screens wrap. */
.filter-chips {
  position: relative; /* so a pill's offsetLeft is measured from the row */
  display: flex;
  gap: 0.5rem;
  margin: 0 -1.25rem;
  padding: 0.1rem 1.25rem 0.3rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
  mask-image: linear-gradient(to right, #000 85%, transparent);
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: none;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-chip:hover {
  border-color: var(--accent);
}

.filter-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.filter-count {
  margin-left: 0.2rem;
  opacity: 0.7;
  font-weight: 400;
}

.park-filters-status {
  min-height: 1.4em;
  margin: 0.5rem 0 0;
  color: var(--ink-2);
  font-size: 0.9rem;
}

/* a card hidden by a filter (its display: flex would otherwise win over [hidden]) */
.review-card[hidden] {
  display: none;
}

/* Park page: the directions button under the address */
.directions-link {
  align-self: flex-start;
  margin-top: 0.6rem;
  padding: 0.4rem 1.1rem;
  font-size: 0.95rem;
}

.empty-state {
  color: var(--ink-2);
}

/* Review cards (toys, parks, ...) - mobile-first: single column, expands via media query below */
.review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.review-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.review-card:hover {
  color: inherit;
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.review-card-media {
  position: relative;
}

.review-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-2);
}

.score-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.review-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem 1.2rem;
}

.review-card-body h3 {
  margin: 0;
}

.review-card-body .review-subtitle {
  margin: 0 0 0.4rem;
}

.review-subtitle {
  color: var(--ink-2);
  margin: 0;
}

.review-date {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ==========================================================================
   Review detail page (toys, parks, ...)
   ========================================================================== */

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--ink-2);
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

.review-detail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review-hero {
  /* also used by .glance-amenities to join the box above it */
  --hero-gap: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--hero-gap);
}

.review-detail-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.review-hero-summary h1 {
  margin-bottom: 0.25rem;
}

.score-display {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.4rem;
  margin: 1rem 0;
}

.score-number {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.score-max {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-2);
}

.score-label {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.score-pending {
  margin: 1rem 0;
  color: var(--ink-2);
  font-style: italic;
}

.at-a-glance {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
  margin: 0;
}

.detail-specs dt {
  font-weight: 700;
  color: var(--ink-2);
}

.detail-specs dd {
  margin: 0;
}

.ratings {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.rating {
  display: grid;
  grid-template-columns: 8.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.rating-label {
  font-weight: 700;
  color: var(--ink-2);
}

.rating-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.meter {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.meter > span {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: 999px;
  background: var(--positive);
}

.amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.amenity {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.amenity-yes {
  background: var(--positive-soft);
  color: var(--positive);
}

/* the callout's amber: "partly" reads as a caution in every palette, never as the
   accent (which is green in some palettes, close to the "yes" color) */
.amenity-partly {
  background: var(--callout-bg);
  color: var(--callout-ink);
}

.amenity-no {
  background: var(--surface-2);
  color: var(--ink-2);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--ink-2) 50%, transparent);
}

/* what "partly" means, e.g. "· street only" */
.amenity-note {
  font-weight: 600;
}

.details-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
}

/* parks: the amenity chips continue the glance box as one card on phones, and become a
   strip of their own under the photo from 800px. On phones the two halves overlap the
   hero's gap, and each clips its shadow at the seam. */
.at-a-glance-joined {
  padding-bottom: 0;
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  clip-path: inset(-2rem -2rem 0 -2rem);
}

.glance-amenities {
  /* 1px of overlap hides the seam where a box edge falls between pixels */
  margin-top: calc(-1 * var(--hero-gap) - 1px);
  padding: 0 1.2rem 1.1rem;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  /* no shadow along the top, where it joins the box above */
  clip-path: inset(0 -2rem -2rem -2rem);
}

.affiliate-link {
  display: block;
  margin-top: 1.1rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.affiliate-link:hover {
  background: var(--gold-strong);
  color: var(--on-gold);
}

.affiliate-disclosure {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-2);
  text-align: center;
}

/* "The details" (parks): one card per playground, then a short label/value list */
.park-details h2 {
  margin: 0 0 0.75rem;
}

.playground-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.playground {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.playground h3 {
  margin: 0;
}

.playground-ages {
  margin: 0.15rem 0 0.5rem;
  color: var(--ink-2);
  font-weight: 700;
}

.playground-equipment,
.playground-notes {
  margin: 0.6rem 0 0;
}

.detail-facts {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* ==========================================================================
   Review write-up
   ========================================================================== */

.review-body {
  width: 100%;
  max-width: var(--reading-width);
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.75;
}

.review-body h2 {
  margin: 2.25rem 0 0.5rem;
}

.review-body h3 {
  margin: 1.75rem 0 0.5rem;
}

.review-body p {
  margin: 0 0 1.1rem;
}

.review-body ul,
.review-body ol {
  margin: 0 0 1.1rem;
  padding-left: 1.5rem;
}

.review-body li {
  margin-bottom: 0.3rem;
}

.review-body li::marker {
  color: var(--accent);
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--callout-bg);
  color: var(--callout-ink);
}

/* a callout is written as "> text" in review.md, which renders paragraphs inside it */
.callout p:last-child {
  margin-bottom: 0;
}

.review-image,
.review-video,
.review-map {
  margin: 2rem 0;
}

/* centers inline photos narrower than the text column (e.g. portrait shots) */
.review-image {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* landscape photos fill the column; the height cap keeps portrait phone photos from
   towering over the page by shrinking their width instead */
.review-image img {
  display: block;
  max-width: 100%;
  max-height: min(35rem, 75vh);
  width: auto;
  height: auto;
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.review-image figcaption,
.review-video figcaption,
.review-map figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-2);
  text-align: center;
}

.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-embed {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Ad slots (partials/ad-banner.ejs) - discreet by design, no fixed/sticky positioning
   ========================================================================== */

.ad-slot {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
}

.ad-slot-placeholder {
  width: 100%;
  padding: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  opacity: 0.7;
}

.site-footer .ad-slot-bottom {
  margin: 0 0 1.5rem;
}

/* ==========================================================================
   Not found
   ========================================================================== */

.not-found {
  padding: 3rem 0;
  text-align: center;
}

.not-found .lede {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Larger screens: bigger base text, multi-column layouts. Breakpoints are in px
   because media queries ignore the html font-size.
   ========================================================================== */

@media (min-width: 800px) {
  html {
    font-size: 112.5%;
  }

  .filter-chips {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .filter-chip {
    padding: 0.35rem 0.9rem;
  }

  .container {
    padding: 2.5rem 1.5rem 4rem;
  }

  .site-header-inner,
  .site-footer-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  h1 {
    font-size: 2.4rem;
  }

  .hero {
    padding: 2.5rem 0 1.5rem;
  }

  .hero h1 {
    font-size: 2.9rem;
  }

  .review-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .review-hero {
    --hero-gap: 2rem;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }

  .at-a-glance-joined {
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius);
    clip-path: none;
  }

  .glance-amenities {
    grid-column: 1 / -1;
    margin-top: 0;
    padding: 1.1rem 1.2rem;
    border-top: 1px solid var(--border);
    border-radius: var(--radius);
    clip-path: none;
  }

  .glance-amenities .amenities {
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  /* a draft with playgrounds but no glance answers: just the link */
  .glance-amenities .details-link:first-child {
    margin-top: 0;
  }

  .playground-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  html {
    font-size: 125%;
  }

  .review-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
