/* DM Sans and Space Mono are served with the site (SIL Open Font License;
   see fonts/*-OFL.txt). Each file is the latin subset from Google Fonts, which
   covers every character the site's text uses; anything else falls back to the
   system font. DM Sans is variable, so one file covers weights 400–700. Text
   shows in a fallback font until they load. Preloading DM Sans delayed the
   first paint on slow connections, because it competes with this stylesheet. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dm-sans-latin.468d56b6b25b.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/space-mono-400-latin.e0c8e616bda2.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/space-mono-700-latin.af7cf6d2b897.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
:root {
  --ink: #203c32;
  --green: #456f58;
  /* Text tokens meet WCAG AA (4.5:1) on every surface they are used on, in both
     themes. tests/palette.test.cjs checks the pairs. */
  --muted: #56695d;
  --orange: #d95d3f;
  --orange-text: #b5442a;
  --warning-text: #8a5a40;
  --paper: #f7f5eb;
  --field: #fffefa;
  --hover: #edf1e7;
  --line: #d5ddcf;
  /* Borders that mark a form control or button reach 3:1 (WCAG 1.4.11)
     against --field and --paper; tests/palette.test.cjs checks the pairs. */
  --field-line: #7a8f76;
  --lime: #dfe8c7;
  --bar: #203c32;
  --bar-text: #e1e8d8;
  --inverse-text: #ffffff;
  --notice: #e8eedf;
  --notice-border: #799b71;
  --table: #e7ede0;
  --tag-text: #46663f;
  --uncertain: #f4e6d6;
  --uncertain-text: #85532f;
  --bottom: #dfe9d5;
  --view-text: #536d5c;
  --error-text: #a23d25;
  --backdrop: #10251eb8;
  --dialog-edge: transparent;
  /* The neighborhood map: water, four patch tints that neighbors never
     share, and parks. Map text sits on --map-water. */
  --map-water: #d5e8e5;
  --map-1: #e4edc6;
  --map-2: #f7ddc6;
  --map-3: #f2e6b8;
  --map-4: #cfe6cf;
  --map-park: #a9cf93;
  --mono: "Space Mono", monospace;
  --sans: "DM Sans", sans-serif;
  color-scheme: light;
}
/* Dark tokens follow the device setting on screens only, so printed pages
   keep dark text on white. */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --ink: #e8f1dd;
    --green: #a8d1aa;
    --muted: #b4c7b2;
    --orange: #ed9b75;
    --orange-text: #ffb998;
    --warning-text: #e2bb96;
    --paper: #151d18;
    --field: #1e2b22;
    --hover: #27382c;
    --line: #455b4a;
    --field-line: #718c75;
    --lime: #304b32;
    --bar: #0b1510;
    --bar-text: #e8f1dd;
    --inverse-text: #183024;
    --notice: #25382b;
    --notice-border: #8ebd91;
    --table: #25372b;
    --tag-text: #d4edc4;
    --uncertain: #4c3425;
    --uncertain-text: #f8d0a5;
    --bottom: #25382b;
    --view-text: #b4c7b2;
    --error-text: #ffb998;
    --backdrop: #000000b8;
    --dialog-edge: #455b4a;
    --map-water: #10211f;
    --map-1: #2b3b25;
    --map-2: #3e2e22;
    --map-3: #38361f;
    --map-4: #20392b;
    --map-park: #2f5534;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  scrollbar-gutter: stable;
}
html:has(dialog[open]) {
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  font-family: var(--sans);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--field);
  color: var(--ink);
  padding: 10px;
}
.skip-link:focus {
  top: 8px;
}

/* ---------- Masthead and introduction ---------- */

.topline {
  background: var(--bar);
  color: var(--bar-text);
  display: flex;
  justify-content: space-between;
  padding: 8px max(4%, calc((100% - 1320px) / 2));
  /* Space Mono's own line height, so the whole page does not shift down when
     the font replaces its fallback. The results summary and the phone
     heading likewise use their web font's own line height. */
  font: 10px / 15px var(--mono);
  letter-spacing: 0.08em;
}
.topline b {
  color: #cde381;
  padding: 0 9px;
}
.masthead {
  max-width: 1320px;
  margin: auto;
  padding: 21px 0;
  display: flex;
  align-items: center;
  gap: 36px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.07em;
}
.brand-icon {
  display: block;
  flex: none;
}
.dot {
  color: var(--orange);
}
.masthead-text {
  border-left: 1px solid var(--line);
  padding-left: 26px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.masthead-text span,
.kicker {
  font: 700 10px var(--mono);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.masthead-text strong {
  font-size: 12px;
}
.masthead-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.github {
  font: 700 10px var(--mono);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}
.github:hover,
.notice a:hover,
.bottom-note a:hover,
.permalink:hover {
  color: var(--orange-text);
}
.intro {
  max-width: 1320px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 22px 0;
}
.intro-copy {
  min-width: 0;
}
.intro-art {
  display: block;
  width: 34%;
  /* The image's sizes attribute in index.html assumes this width. */
  max-width: 300px;
  flex: none;
}
.intro-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.intro h1 {
  font-size: clamp(31px, 3.4vw, 49px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  margin: 12px 0 0;
}
.intro-description {
  max-width: 52ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.stats {
  display: flex;
  gap: 36px;
  padding-top: 24px;
  padding-bottom: 3px;
}
.stats div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stats strong {
  font-size: 25px;
  letter-spacing: -0.06em;
}
.stats span {
  font: 10px var(--mono);
  color: var(--muted);
  white-space: nowrap;
}
.notice {
  max-width: 1320px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--notice);
  border-left: 3px solid var(--notice-border);
  padding: 13px 17px;
  font-size: 12px;
  line-height: 1.45;
}
.notice strong {
  font: 700 10px var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.notice a {
  margin-left: auto;
  white-space: nowrap;
  font-weight: 700;
}

/* ---------- Directory controls ---------- */

.directory {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 0 55px;
}
.directory-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.directory h2 {
  font-size: 27px;
  letter-spacing: -0.045em;
  margin: 8px 0 0;
}
.view-tabs {
  display: flex;
  border: 1px solid var(--ink);
  margin: 0;
  padding: 0;
  min-width: 0;
}
.view-tabs button {
  border: 0;
  background: transparent;
  padding: 12px 15px;
  color: var(--ink);
  font: 700 10px var(--mono);
  white-space: nowrap;
}
.view-tabs button:not(.selected):hover {
  background: var(--hover);
}
.view-tabs button.selected {
  background: var(--ink);
  color: var(--inverse-text);
}
.view-tabs button span {
  opacity: 0.8;
  margin-left: 7px;
}
/* One-tap shortcuts, each toggling one filter. */
.quick-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}
.quick-choices button {
  border: 1px solid var(--field-line);
  background: var(--field);
  color: var(--ink);
  font-size: 12px;
  padding: 9px 12px;
  min-height: 44px;
  border-radius: 3px;
}
.quick-choices button:hover {
  background: var(--hover);
}
.quick-choices button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--inverse-text);
}
.sticky-search {
  background: var(--paper);
  padding-bottom: 4px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
/* Groups the run-only menus; they lay out as toolbar items. */
.primary-filters {
  display: contents;
}
.filter-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
  margin-top: 10px;
}
.advanced-filters {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
}
.advanced-filters summary {
  cursor: pointer;
  width: fit-content;
  max-width: calc(100% - 125px);
  padding: 12px 0;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.advanced-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0 8px;
}
.filter-actions .reset {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-height: 44px;
  margin: 0;
  font: 600 13px var(--sans);
  text-decoration: none;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--field-line);
  background: var(--field);
  padding: 8px 12px;
  flex: 1 1 300px;
  min-width: 180px;
}
.search > span {
  font-size: 22px;
  line-height: 1;
}
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  width: 100%;
  font-size: 12px;
}
.search input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.search:focus-within {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
.search kbd {
  font: 10px var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 1px 5px;
}
.select-label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--field);
  border: 1px solid var(--field-line);
  padding: 0 10px;
}
.select-label > span {
  font: 700 10px var(--mono);
  color: var(--muted);
}
.select-label :is(select, input) {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 11px 6px;
  font-size: 11px;
  min-width: 105px;
}
.view-note {
  font-size: 12px;
  color: var(--view-text);
  margin: 18px 0 0;
  line-height: 1.5;
}
#coverage-note {
  margin-top: 5px;
}
.clear-club {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

/* ---------- Neighborhood map ---------- */

/* The city on the left with the list beside it; on narrow screens the list
   follows the map. */
.map-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "figure intro"
    "figure places";
  align-content: start;
  gap: 6px 32px;
  margin-top: 12px;
  padding: 18px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.map-intro {
  grid-area: intro;
}
.map-intro h3 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}
.map-hint {
  margin: 6px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.map-figure {
  grid-area: figure;
  position: relative;
  align-self: start;
}
.map-canvas {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--map-water);
}
.map-art svg {
  display: block;
  width: 100%;
  height: 100%;
}
.map-water {
  fill: var(--map-water);
}
.map-land path {
  stroke: var(--paper);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.map-tint-1 {
  fill: var(--map-1);
}
.map-tint-2 {
  fill: var(--map-2);
}
.map-tint-3 {
  fill: var(--map-3);
}
.map-tint-4 {
  fill: var(--map-4);
}
.map-park {
  fill: var(--map-park);
}
.map-bay-bridge {
  fill: none;
  stroke: var(--field-line);
  stroke-width: 2.5;
  stroke-dasharray: 1 5;
  stroke-linecap: round;
}
.map-golden-gate {
  fill: none;
  stroke: var(--orange);
  stroke-linecap: round;
}
.map-bridge-deck {
  stroke-width: 6;
}
.map-bridge-tower {
  fill: var(--orange);
  stroke: none;
}
.map-water-name {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--muted);
  font: italic 500 12px var(--sans);
  white-space: nowrap;
  pointer-events: none;
}
.map-water-name.vertical {
  writing-mode: vertical-rl;
  transform: translate(-50%, -50%) rotate(180deg);
}
.map-layer {
  position: absolute;
  inset: 0;
}
/* Markers are round stickers with a count; the chosen one turns orange. */
.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--field);
  color: var(--ink);
  font: 700 12px / 1 var(--mono);
  box-shadow: 0 2px 0 var(--ink);
}
button.map-marker:hover,
.map-marker.preview {
  background: var(--lime);
  z-index: 1;
}
.map-marker.selected {
  background: var(--orange-text);
  color: var(--inverse-text);
  z-index: 2;
}
.map-marker.map-dot {
  width: 8px;
  height: 8px;
  border: 0;
  background: var(--field-line);
  box-shadow: none;
}
.map-anchor {
  position: absolute;
  width: 5px;
  height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--ink);
}
.map-name {
  position: absolute;
  color: var(--ink);
  font: 600 12px / 1.2 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  text-shadow:
    0 0 2px var(--paper),
    0 0 2px var(--paper),
    0 0 3px var(--paper);
}
.map-name.selected {
  z-index: 3;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--field);
  box-shadow: 0 0 0 1px var(--line);
  text-shadow: none;
}
.map-name.preview {
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .map-marker {
    transition: background-color 0.12s;
  }
}
/* On wide screens the description floats over the map's southwest corner,
   which has no markers, so the list beside it never moves. */
.map-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: min(46%, 300px);
  margin: 0;
  padding: 10px 12px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 2px 0 var(--line);
  font-size: 12px;
  line-height: 1.45;
}
.map-caption strong {
  font-size: 14px;
}
.map-caption-count {
  font: 700 11px var(--mono);
  color: var(--muted);
  white-space: nowrap;
}
.map-caption-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.map-show {
  margin-top: 8px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.map-show:hover {
  background: var(--hover);
}
.map-places {
  grid-area: places;
  align-self: start;
}
.map-places h4 {
  margin: 14px 0 7px;
  font: 700 10px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.map-places ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Each place is a pill whose count badge matches its marker. */
.map-place {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 5px 4px 12px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  text-align: left;
}
.map-place:hover,
.map-place.preview {
  background: var(--hover);
}
.map-place .map-count {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border: 1.5px solid var(--ink);
  border-radius: 13px;
  background: var(--field);
  font: 700 11px / 1 var(--mono);
}
.map-place[aria-pressed="true"] {
  background: var(--orange-text);
  border-color: var(--orange-text);
  color: var(--inverse-text);
}
.map-place[aria-pressed="true"] .map-count {
  border-color: var(--inverse-text);
  background: var(--inverse-text);
  color: var(--orange-text);
}

/* ---------- Results ---------- */

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 19px 2px 10px;
  font: 700 10px / 15px var(--mono);
  color: var(--muted);
  letter-spacing: 0.05em;
}
.results {
  border-top: 2px solid var(--ink);
}
/* A day is a break inside the list, so it reads as a heading over its rows
   rather than a second tinted bar like the column header. */
.date-heading {
  margin: 0;
  padding: 22px 13px 8px;
  color: var(--ink);
  font: 700 14px var(--sans);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--ink);
}
.table-head,
.row {
  display: grid;
  grid-template-columns:
    135px minmax(170px, 1.15fr) minmax(180px, 1.35fr) minmax(180px, 1.3fr)
    85px;
  gap: 18px;
  align-items: center;
}
.table-head {
  padding: 10px 13px;
  background: var(--table);
  font: 700 10px var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 14px 13px;
  min-height: 66px;
}
.row:hover,
.row:focus-visible {
  background: var(--hover);
  box-shadow: inset 3px 0 0 var(--orange);
}
.row:focus-visible {
  outline-offset: -3px;
}
.row-date {
  font: 700 11px var(--mono);
}
.row-date > span {
  display: block;
  color: var(--orange-text);
  margin-top: 3px;
  font-size: 10px;
}
/* Under a day heading, rows show only the time. */
.results.grouped .row-day {
  display: none;
}
.row-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
}
.row-title small,
.row-place small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
}
.row-place {
  font-size: 12px;
  line-height: 1.4;
}
.row-note {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.attendance-fact {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-weight: 600;
}
.row-action {
  font: 700 10px var(--mono);
  text-align: right;
  white-space: nowrap;
}
/* A chevron: the row opens details on this page. The ↗ arrow is kept for
   links that open a new tab. */
.row-action::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}
.row:hover .row-action,
.row:focus-visible .row-action {
  color: var(--orange-text);
}
.club-row {
  grid-template-columns:
    minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(180px, 1.4fr)
    minmax(140px, 1.1fr) 85px;
}
.tag {
  display: inline-block;
  font: 700 10px var(--mono);
  padding: 5px 7px;
  background: var(--lime);
  color: var(--tag-text);
}
.tag.uncertain {
  background: var(--uncertain);
  color: var(--uncertain-text);
}
/* A known fact rather than good news or a prompt to check. */
.tag.plain {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.distance-registration {
  margin-top: 8px;
}
.empty {
  padding: 30px 12px;
  font-size: 13px;
  color: var(--muted);
}
.empty p {
  margin: 0;
}
.error {
  padding: 30px 12px;
  color: var(--error-text);
}
.error a {
  text-decoration: underline;
}
.reset {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 700 10px var(--mono);
  padding: 12px 16px;
  margin-top: 16px;
}
.reset:hover {
  background: var(--ink);
  color: var(--inverse-text);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}
.filter-chip {
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  font: 500 13px var(--sans);
  text-align: left;
  overflow-wrap: anywhere;
}

/* ---------- Closing notes ---------- */

.bottom-note {
  max-width: 1320px;
  margin: 0 auto 50px;
  background: var(--bottom);
  padding: 25px 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.note-mark {
  display: block;
  flex: none;
}
.bottom-note h2 {
  font-size: 20px;
  letter-spacing: -0.035em;
  margin: 0 0 5px;
}
.bottom-note p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.bottom-note a {
  margin-left: auto;
  white-space: nowrap;
  font: 700 10px var(--mono);
}
footer {
  background: var(--bar);
  color: var(--bar-text);
  padding: 25px max(4%, calc((100% - 1320px) / 2));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
footer strong {
  font-size: 14px;
  letter-spacing: -0.04em;
}
footer > span {
  font: 10px var(--mono);
}
/* Bold like the site's other mono links, so phones, which hide the regular
   weight's other text, never download it. */
footer a {
  font: 700 10px var(--mono);
}
footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Detail dialog ---------- */

dialog {
  border: 0;
  padding: 0;
  width: min(620px, calc(100% - 28px));
  max-height: 90dvh;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  box-shadow:
    0 0 0 1px var(--dialog-edge),
    0 20px 80px #0005;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: var(--backdrop);
}
.dialog-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px;
}
.close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--paper);
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
}
.close:hover {
  color: var(--orange-text);
}
.detail-label {
  font: 700 10px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 44px;
}
.detail-title {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 15px 44px 7px 0;
}
.detail-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}
.detail-sub a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.detail-sub + .detail-row {
  margin-top: 22px;
}
.detail-row {
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.detail-key {
  margin: 0;
  display: block;
  font: 700 10px var(--mono);
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 5px;
}
.detail-row ul {
  padding-left: 17px;
  margin: 0;
}
.detail-row ul.facts {
  list-style: none;
  padding-left: 0;
}
.facts li {
  display: grid;
  grid-template-columns: 8em minmax(0, 1fr);
  gap: 12px;
}
.facts b {
  font-weight: 600;
}
.detail-row li + li,
.detail-row > ul + a {
  margin-top: 8px;
}
/* A link after a list, such as "View all upcoming runs", keeps the list's
   spacing so it is not a cramped touch target beside the last item's link. */
.detail-row > ul + a {
  display: inline-block;
}
.detail-row a {
  color: var(--green);
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 12px;
}
.detail-link {
  display: inline-block;
  background: var(--ink);
  color: var(--inverse-text);
  padding: 12px 15px;
  font: 700 10px var(--mono);
}
.detail-link:hover {
  background: var(--green);
}
.permalink {
  font: 700 10px var(--mono);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.detail-actions .permalink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.copy-link,
.add-to-calendar {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.copy-feedback {
  flex-basis: 100%;
  font-size: 13px;
}
.copy-fallback {
  width: 100%;
}
.copy-fallback input {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--field-line);
  background: var(--field);
  color: var(--ink);
  font-size: 16px;
}
.pattern-warning {
  font-size: 11px;
  color: var(--warning-text);
}

.status-warning {
  padding: 12px;
  background: var(--uncertain);
  color: var(--uncertain-text);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */

@media (max-width: 1400px) {
  .masthead,
  .intro,
  .notice,
  .directory,
  .bottom-note {
    margin-left: 4%;
    margin-right: 4%;
  }
}
@media (hover: none) {
  .search kbd {
    display: none;
  }
}
/* Only wide screens have room to keep search in view; focused rows scroll
   clear of it. */
@media (min-width: 1001px) {
  html {
    scroll-padding-top: 120px;
  }
  .sticky-search {
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid var(--line);
  }
}
/* Tablets and phones: a compact masthead and notice, without the tagline,
   illustration or counts, so the first listings appear sooner. */
@media (max-width: 1000px) {
  .topline {
    display: none;
  }
  .masthead {
    padding: 6px 0;
    gap: 12px;
    flex-wrap: wrap;
  }
  .masthead-actions .github {
    display: none;
  }
  .masthead-text {
    display: none;
  }
  .intro {
    padding: 10px 0;
    align-items: start;
    flex-direction: column;
  }
  .intro h1 {
    font-size: 22px;
    margin: 0;
  }
  .intro .kicker,
  .intro-description,
  .stats {
    display: none;
  }
  /* index.html skips downloading it at the same widths. */
  .intro-art {
    display: none;
  }
  .notice {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    padding: 9px 12px;
    gap: 3px 8px;
    font-size: 11px;
  }
  .notice strong {
    grid-column: 1;
  }
  .notice #snapshot-text {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .notice a {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
  }
  .directory {
    padding: 12px 0 24px;
  }
  .directory-head {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }
  .directory-head .kicker {
    display: none;
  }
  .directory h2 {
    margin: 0;
    font-size: 22px;
    line-height: 29px;
  }
  /* The four tabs share one row at equal widths, without their counts. */
  .view-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
  .view-tabs button {
    text-align: center;
    padding: 7px 6px;
    min-height: 44px;
    font-size: 10px;
    white-space: normal;
  }
  .view-tabs button:not(:first-of-type) {
    border-left: 1px solid var(--ink);
  }
  .view-tabs button span {
    display: none;
  }
  .quick-choices {
    flex-wrap: nowrap;
    gap: 5px;
    margin-top: 8px;
  }
  .quick-choices button {
    /* Share the row by label length so no label wraps at phone widths. */
    flex: 1 1 auto;
    font-size: 11px;
    padding: 5px;
  }
  .map-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "intro"
      "figure"
      "places";
    margin-top: 8px;
    padding: 12px;
  }
  .map-intro h3 {
    font-size: 17px;
  }
  .map-hint {
    margin-bottom: 6px;
  }
  .map-caption {
    position: static;
    max-width: none;
    margin-top: 8px;
    box-shadow: none;
  }
  .map-name {
    font-size: 11px;
  }
  .map-water-name {
    font-size: 11px;
  }
  .toolbar {
    gap: 7px;
    margin-top: 8px;
  }
  .search {
    flex-basis: 100%;
    min-height: 44px;
  }
  .search input {
    font-size: 16px;
  }
  /* Menus use 16px text, below which iOS zooms the page when one is
     focused. Each label sits above its value, over the menu, so a long label
     leaves the value its width and a tap on the label opens the menu. */
  .select-label {
    flex: 1 1 140px;
    display: grid;
    padding: 0 7px 0 0;
  }
  .select-label > span {
    grid-area: 1 / 1;
    align-self: start;
    z-index: 1;
    margin: 7px 0 0 8px;
    line-height: 1;
    pointer-events: none;
  }
  .select-label :is(select, input) {
    grid-area: 1 / 1;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 19px 4px 3px;
    font-size: 16px;
  }
  /* Menus indent their value and the date field does not; both line up
     with the label. */
  .select-label input {
    padding-inline: 8px 0;
  }
  .view-note {
    font-size: 11px;
    margin-top: 8px;
  }
  .results-head {
    padding-top: 12px;
  }
  .results-head span:last-child {
    text-align: right;
  }
  .table-head {
    display: none;
  }
  .date-heading {
    padding: 10px 5px 6px;
  }
  .more-starts {
    display: block;
    margin-top: 2px;
  }
  .row {
    grid-template-columns: 88px 1fr;
    gap: 8px 12px;
    padding: 14px 5px;
    align-items: start;
  }
  .row-date {
    font-size: 12px;
    line-height: 1.4;
  }
  .row-date > span {
    font-size: 12px;
  }
  .row-title {
    font-size: 15px;
  }
  .row-place {
    font-size: 14px;
  }
  .row-note,
  .row-place small,
  .row-title small {
    font-size: 13px;
  }
  .row-action,
  .tag {
    font-size: 11px;
  }
  .row-place,
  .row-note,
  .row-action {
    grid-column: 2;
  }
  .row-action {
    text-align: left;
  }
  /* Club rows have no date column: stack everything in one column. */
  .club-row {
    grid-template-columns: 1fr;
  }
  .club-row > * {
    grid-column: 1;
  }
  .dialog-body {
    padding: 24px 20px;
  }
  .close {
    top: 10px;
    right: 8px;
  }
  .detail-title {
    font-size: 26px;
  }
  /* The text sits beside the mark and the link lines up beneath it, at any
     width. */
  .bottom-note {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 14px 22px;
  }
  .bottom-note a {
    grid-column: 2;
    justify-self: start;
    margin-left: 0;
  }
  footer {
    flex-wrap: wrap;
  }
  footer > span {
    display: none;
  }
}

/* ---------- Forced colors and print ---------- */

/* Windows high-contrast and other forced palettes drop backgrounds, so state
   and labels that rely on fills need a system-color equivalent. */
@media (forced-colors: active) {
  .view-tabs button.selected {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
  .tag {
    border: 1px solid CanvasText;
  }
  .map-marker.selected,
  .map-place[aria-pressed="true"] {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
}
@media print {
  .quick-choices {
    display: none;
  }
  .sticky-search {
    position: static;
  }
}

/* ---------- Loading and touch ---------- */

/* Until listings arrive, the closing note and footer stay hidden instead of
   showing and then jumping to wherever the listings end, and the summary line
   above the listings keeps its space. The app sets aria-busy="false" on
   #results once loading ends; if that never happens, they reappear after 20
   seconds. */
@media (scripting: enabled) {
  main:has(#results:not([aria-busy="false"])) .bottom-note,
  body:has(#results:not([aria-busy="false"])) > footer {
    visibility: hidden;
    animation: reveal 0s 20s forwards;
  }
  #index:has(> #results:not([aria-busy="false"])) #coverage-note:empty {
    min-height: 1.5em;
  }
}
@keyframes reveal {
  to {
    visibility: visible;
  }
}
/* On phones the check dates added to the notice take a second line. */
@media (scripting: enabled) and (max-width: 480px) {
  main:has(#results:not([aria-busy="false"])) #snapshot-text {
    min-height: 2lh;
  }
}
/* Small standalone text links get a 44px touch target; the negative margin
   keeps the layout unchanged. */
@media (pointer: coarse) {
  .notice a,
  .bottom-note a,
  footer a {
    padding-block: 15px;
    margin-block: -15px;
  }
}
