:root {
  --paper: #f5f1e8;
  --paper-2: #ebe5d9;
  --ink: #17312b;
  --ink-soft: #567069;
  --cream: #fffdf7;
  --line: #d8d1c3;
  --moss: #78906c;
  --teal: #167d74;
  --amber: #d1833b;
  --shadow: 0 18px 55px rgba(31, 51, 44, .12);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.site-header {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand { display: block; flex: 0 1 260px; min-width: 0; text-decoration: none; }
.brand-logo { display: block; width: 100%; height: auto; }
.brand:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 4px; }
.header-meta { color: var(--ink-soft); font-size: 13px; }
.live-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(22,125,116,.11); margin-right: 8px; }

main { overflow: clip; }
.hero {
  max-width: 1440px;
  margin: 18px auto 34px;
  padding: 38px clamp(20px, 4vw, 64px) 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  align-items: end;
  gap: 48px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  left: -8%; top: 2%; width: 62%; height: 118%;
  background: radial-gradient(ellipse, rgba(120,144,108,.18), transparent 66%);
  pointer-events: none;
}
.eyebrow, .section-kicker { margin: 0 0 10px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; }
h1 { max-width: 900px; font-size: clamp(46px, 6.2vw, 86px); line-height: .93; }
h1 em { color: var(--amber); font-weight: 400; }
.hero-copy { max-width: 660px; margin: 28px 0 0; color: var(--ink-soft); font-size: clamp(17px, 1.5vw, 21px); }
.hero-pick { background: var(--ink); color: var(--cream); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); transform: none; }
.pick-label { display: block; margin-bottom: 22px; color: #bad0c6; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 800; }
.hero-pick strong { display: block; font-family: Georgia, serif; font-size: 27px; line-height: 1.1; margin-bottom: 8px; }
.hero-pick > div { color: #bad0c6; font-size: 14px; }
.hero-pick > div span { color: white; font-weight: 800; }
.text-button { border: 0; background: transparent; padding: 20px 0 0; color: #f3b276; font-weight: 800; cursor: pointer; }

.explorer { max-width: 1440px; margin: 0 auto; padding: 52px clamp(20px, 4vw, 64px) 72px; }
.explorer-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
h2 { font-size: clamp(38px, 4vw, 58px); line-height: 1; }
.quiet-button, .map-action, .bar-link { border: 0; background: transparent; padding: 8px; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.quiet-button:hover, .map-action:hover { color: var(--teal); }

.filter-panel { display: grid; grid-template-columns: 1fr 1.15fr auto; gap: 20px 24px; align-items: end; margin-bottom: 32px; padding: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.36); border-radius: 16px; }
.region-filter { grid-column: 1 / -1; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.filter-label { display: block; margin: 0 0 9px 3px; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--cream); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.chip:hover { transform: translateY(-1px); border-color: var(--teal); }
.chip.active { background: var(--ink); color: white; border-color: var(--ink); }
.toggle-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 220px; padding: 7px 4px; }
.toggle-wrap input { position: absolute; opacity: 0; pointer-events: none; }
.toggle { width: 42px; height: 24px; border-radius: 999px; background: #c7c1b5; position: relative; flex: none; transition: .2s ease; }
.toggle::after { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: .2s ease; }
.toggle-wrap input:checked + .toggle { background: var(--teal); }
.toggle-wrap input:checked + .toggle::after { transform: translateX(18px); }
.toggle-wrap strong { display: block; font-size: 12px; }
.toggle-wrap small { display: block; color: var(--ink-soft); font-size: 10px; }

.explorer-grid { scroll-margin-top: 16px; --toolbar-height: 76px; display: grid; padding: 24px; grid-template-columns: minmax(0, 1.35fr) minmax(440px, .8fr); min-height: 690px; background: var(--cream); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 12px 42px rgba(31,51,44,.07); }
.map-column { position: sticky; top: 0; align-self: start; min-width: 0; background: #dce4db; }
.map-toolbar { min-height: var(--toolbar-height); padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; background: var(--cream); border-bottom: 1px solid var(--line); font-size: 13px; }
.map-toolbar span { color: var(--ink-soft); }
#map { height: 574px; min-height: 480px; background: #dce4db; position: relative; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #d8e0d6, #c9d4c8); color: var(--ink-soft); overflow: hidden; }
.fallback-grid { position: absolute; inset: -40px; opacity: .22; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 45px 45px; transform: rotate(9deg); }
.map-fallback p { z-index: 1; background: rgba(255,255,255,.65); padding: 10px 14px; border-radius: 999px; }
.map-legend { min-height: 62px; padding: 12px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--cream); border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }
.legend-line { display: inline-block; width: 22px; height: 4px; border-radius: 99px; margin-right: 5px; vertical-align: middle; }
.legend-line.rail { background: var(--amber); }
.legend-line.greenway { background: var(--teal); }
.legend-line.loop { background: var(--moss); }
.map-disclaimer { margin-left: auto; max-width: 220px; text-align: right; }
.leaflet-control-attribution { font-size: 9px !important; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 12px 35px rgba(23,49,43,.2); }
.leaflet-popup-content { margin: 15px 17px; font-family: Inter, system-ui, sans-serif; }
.popup-title { margin: 0 0 4px; font: 700 17px/1.15 Georgia, serif; color: var(--ink); }
.popup-meta { color: var(--ink-soft); font-size: 12px; }

.results-column { min-width: 0; border-left: 1px solid var(--line); background: #fbfaf5; }
.results-toolbar { min-height: var(--toolbar-height); padding: 16px 18px; display: flex; align-items: center; justify-content: flex-end; border-bottom: 1px solid var(--line); background: var(--cream); }
.results-toolbar label { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.results-toolbar select { max-width: 190px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 32px 9px 10px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: 0; text-transform: none; cursor: pointer; }
.results-toolbar select:focus-visible { outline: 3px solid rgba(22,125,116,.22); outline-offset: 2px; border-color: var(--teal); }
.trail-list { max-height: 622px; overflow-y: auto; overscroll-behavior: contain; }
.trail-card { padding: 22px 22px 20px; border-bottom: 1px solid var(--line); background: transparent; transition: .18s ease; cursor: pointer; }
.trail-card:hover, .trail-card.active { background: white; }
.trail-card.active { box-shadow: inset 4px 0 0 var(--route-color); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.route-type { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--route-color); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.route-type::before { content: ""; width: 15px; height: 4px; background: currentColor; border-radius: 999px; }
.trail-card h3 { margin: 0; font: 600 24px/1.08 Georgia, serif; letter-spacing: -.02em; }
.place-label { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.drive-time { flex: none; color: var(--ink-soft); font-size: 11px; font-weight: 800; text-align: right; }
.drive-time strong { display: block; color: var(--ink); font-size: 17px; }
.route-summary { margin: 9px 0 16px; color: var(--ink-soft); font-size: 13px; }
.route-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 0 0 15px; }
.metric { min-width: 0; padding: 9px 8px; background: var(--paper); border-radius: 10px; }
.metric span { display: block; color: var(--ink-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { display: block; margin-top: 3px; font-size: 12px; overflow-wrap: anywhere; }
.crossing-note { margin: 0 0 14px; display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--ink-soft); }
.crossing-icon { flex: none; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink); font-size: 11px; font-weight: 900; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.map-button, .compare-button, .primary-button { border: 0; border-radius: 999px; padding: 10px 14px; font-size: 12px; font-weight: 850; cursor: pointer; transition: .18s ease; }
.map-button { background: var(--ink); color: white; }
.map-button:hover, .primary-button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(23,49,43,.2); }
.compare-button { margin-left: auto; background: transparent; border: 1px solid var(--line); }
.compare-button.selected { background: var(--route-color); color: white; border-color: var(--route-color); }
.source-link, .trail-site-link { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--cream); color: var(--ink); font-size: 12px; font-weight: 850; text-decoration: none; white-space: nowrap; transition: .18s ease; }
.source-link:hover, .trail-site-link:hover { border-color: var(--teal); background: var(--teal); color: white; }
.source-link:focus-visible, .trail-site-link:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.route-alert { margin: 0 0 13px; padding: 10px 11px; display: flex; gap: 9px; align-items: flex-start; border: 1px solid #e7b978; border-radius: 10px; background: #fff5e4; color: #71491f; font-size: 12px; }
.route-alert > span:first-child { flex: none; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--amber); color: white; font-weight: 900; }
.route-alert.closed { border-color: #d59a92; background: #fff0ed; color: #7c3027; }
.route-alert.closed > span:first-child { background: #a74437; }
.trail-card.unavailable { background-image: repeating-linear-gradient(-45deg, transparent, transparent 16px, rgba(167,68,55,.025) 16px, rgba(167,68,55,.025) 32px); }
.empty-state { padding: 56px 28px; text-align: center; }
.empty-state strong { font: 600 24px Georgia, serif; }
.empty-state p { color: var(--ink-soft); }
.primary-button { background: var(--teal); color: white; padding: 11px 18px; }

.ride-notes { max-width: 1440px; margin: 0 auto; padding: 64px clamp(20px, 4vw, 64px) 80px; display: grid; grid-template-columns: .65fr 1.35fr; gap: 52px; }
.ride-notes h2 { max-width: 410px; }
.notes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.notes-grid p { margin: 0; padding: 20px; background: rgba(255,255,255,.42); border-top: 3px solid var(--moss); color: var(--ink-soft); font-size: 13px; }
.notes-grid strong { color: var(--ink); font-family: Georgia, serif; font-size: 20px; }
footer { padding: 26px clamp(20px, 4vw, 64px) 100px; max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }

.compare-bar { position: fixed; z-index: 900; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(620px, calc(100% - 32px)); padding: 12px 13px 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--ink); color: white; border-radius: 999px; box-shadow: 0 20px 55px rgba(0,0,0,.28); }
.compare-bar[hidden] { display: none; }
.compare-count { font-weight: 900; }
.compare-copy { color: #bad0c6; font-size: 13px; }
.compare-actions { display: flex; align-items: center; gap: 5px; }
.compare-bar .bar-link { color: #bad0c6; }

dialog { width: min(1000px, calc(100% - 28px)); max-height: calc(100vh - 36px); border: 0; border-radius: 24px; padding: 0; color: var(--ink); background: var(--cream); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(17,35,31,.68); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 24px 28px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 40px; }
.icon-button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 25px; cursor: pointer; }
.compare-content { overflow: auto; padding: 8px 28px 30px; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table th, .compare-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table th { width: 140px; color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.compare-table td { font-size: 13px; }
.compare-table thead th { width: auto; color: var(--ink); text-transform: none; letter-spacing: 0; font: 600 20px/1.1 Georgia, serif; }
.compare-table a { color: var(--teal); font-weight: 800; }
.notes-dialog { width: min(720px, calc(100% - 28px)); }
.notes-dialog-body { padding: 24px 28px 32px; color: var(--ink-soft); }
.source-list { display: grid; gap: 8px; margin-top: 22px; }
.source-list a { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 800; }
.source-list a:hover { border-color: var(--teal); color: var(--teal); }

@media (max-width: 1050px) {
  .filter-panel { grid-template-columns: 1fr 1fr; }
  .region-filter { grid-column: 1 / -1; }
  .toggle-wrap { grid-column: 1 / -1; }
  .explorer-grid { grid-template-columns: minmax(0, 1fr); }
  .map-column { position: relative; }
  .results-column { min-width: 0; border-left: 0; border-top: 1px solid var(--line); }
  .results-toolbar { justify-content: flex-start; }
  .trail-list { max-height: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trail-card:nth-child(odd) { border-right: 1px solid var(--line); }
  .ride-notes { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { align-items: center; gap: 16px; }
  .brand { flex-basis: clamp(150px, 45vw, 210px); }
  .header-meta { max-width: 150px; text-align: right; font-size: 11px; }
  .hero { grid-template-columns: 1fr; padding-top: 34px; }
  .hero-pick { transform: none; }
  .explorer-heading { align-items: flex-start; }
  .explorer-grid { padding: 12px; }
  .map-toolbar, .results-toolbar { padding: 14px 12px; gap: 8px; }
  .results-toolbar label { flex-wrap: wrap; }
  .filter-panel { grid-template-columns: 1fr; gap: 18px; }
  .region-filter { grid-column: auto; }
  .toggle-wrap { grid-column: auto; }
  #map { height: 430px; min-height: 430px; }
  .map-disclaimer { width: 100%; max-width: none; margin-left: 0; text-align: left; }
  .trail-list { grid-template-columns: minmax(0, 1fr); }
  .trail-card:nth-child(odd) { border-right: 0; }
  .route-metrics { grid-template-columns: repeat(2, 1fr); }
  .notes-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
  .compare-copy { display: none; }
  .compare-bar { left: 16px; right: 16px; width: auto; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Trail video replaces the map only after a viewer requests it. */
#mapView[hidden], #videoView[hidden] { display: none !important; }
.video-view { background: var(--cream); }
.video-toolbar { min-height: var(--toolbar-height); padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.video-toolbar .map-action { flex-shrink: 0; }
.video-stage { min-height: 574px; display: flex; align-items: center; background: #10211d; }
.video-stage iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border: 0; }
.video-footer { padding: 14px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; color: var(--ink-soft); font-size: 11px; }
.video-footer a { color: var(--teal); font-weight: 750; }
.video-footer p { flex-basis: 100%; margin: 0; }
.video-button { border: 1px solid var(--teal); border-radius: 999px; padding: 9px 14px; background: transparent; color: var(--teal); font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; }
.video-button:hover, .video-button[aria-expanded="true"] { background: var(--teal); color: white; }
.video-button:focus-visible, #backToMapButton:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
@media (max-width: 720px) {
  .video-toolbar { flex-wrap: wrap; padding: 14px 12px; }
  .video-stage { min-height: 240px; }
  .video-footer { padding: 12px; }
}

/* Keep trail actions together, with a consistent selected state. */
.card-actions { flex-wrap: nowrap; justify-content: safe center; gap: 6px; overflow-x: auto; padding: 4px; margin: -4px; }
.card-actions > button, .card-actions > a { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 74px; width: 74px; height: 38px; margin-left: 0; padding: 9px 10px; border: 1px solid #171917; border-radius: 999px; background: #171917; color: white; font-size: 11px; font-weight: 800; line-height: 1.4; white-space: nowrap; text-decoration: none; box-shadow: none; transform: none; }
.card-actions > :hover { border-color: var(--teal); }
.card-actions > :active,
.card-actions > [aria-pressed="true"],
.card-actions > [aria-expanded="true"],
.card-actions > .is-selected { background: var(--teal); border-color: var(--teal); color: white; }
.card-actions > :focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Personal ride lists and ratings. */
.site-header { flex-wrap: wrap; }
.my-rides-button, .save-ride-button, .saved-view-button { border: 1px solid var(--ink); border-radius: 999px; padding: 10px 16px; background: #171917; color: white; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.my-rides-button:hover, .saved-view-button:hover, .save-ride-button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: white; }
.ride-status-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; font-size: 13px; }
.ride-status-filter label { font-weight: 800; }
.ride-status-filter select { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--cream); color: var(--ink); font: inherit; }
#rideProgressCount { margin-left: auto; color: var(--ink-soft); }
.ride-storage-status:empty, #myRidesNotice:empty { display: none; }
.ride-storage-status, #myRidesNotice { color: #71491f; font-size: 13px; }
.personal-controls { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); cursor: default; }
.personal-toggles { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ridden-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; cursor: pointer; min-height: 40px; }
.ridden-check input { width: 18px; height: 18px; accent-color: var(--teal); }
.personal-rating { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--ink-soft); }
.rating-stars { display: inline-flex; }
.rating-star { position: relative; display: grid; place-items: center; width: 32px; height: 40px; font-size: 27px; color: #aaa394; cursor: pointer; }
.rating-star.filled { color: #a65c18; }
.rating-star input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rating-star:focus-within { outline: 2px solid var(--teal); border-radius: 5px; }
.clear-rating { border: 0; padding: 8px; background: transparent; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.my-rides-dialog { width: min(640px, calc(100% - 28px)); }
.my-rides-body { padding: 20px 24px 28px; }
.my-rides-storage { margin-top: 0; color: var(--ink-soft); font-size: 12px; }
.my-rides-progress { font-weight: 800; }
.my-rides-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.saved-ride { padding: 20px; margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.saved-ride h3 { margin: 0; font: 600 24px Georgia, serif; }
.saved-ride > p { color: var(--ink-soft); font-size: 12px; }
.saved-view-button { margin-top: 12px; }
.saved-empty { padding: 28px 12px; text-align: center; color: var(--ink-soft); }
.my-rides-button:focus-visible, .save-ride-button:focus-visible, .saved-view-button:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
@media (max-width: 720px) {
  .site-header .header-meta { display: none; }
  .my-rides-body { padding: 16px; }
  .saved-ride { padding: 14px; }
}


/* Search sits after the riding-progress controls, before the map and results. */
.trail-search { margin: 0 0 24px; }
.trail-search-help { margin: 10px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.trail-search-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 9px; }
.trail-search-heading label { font-size: 13px; font-weight: 800; }
#searchResultCount { color: var(--ink-soft); font-size: 12px; }
.trail-search-row { display: flex; align-items: stretch; gap: 10px; }
#trailSearch { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; background: var(--cream); color: var(--ink); font-size: 16px; }
#trailSearch::placeholder { color: var(--ink-soft); opacity: 1; }
#clearSearchButton { flex: none; border: 1px solid #171917; border-radius: 999px; padding: 10px 20px; background: #171917; color: white; font-size: 13px; font-weight: 800; cursor: pointer; }
#clearSearchButton:hover:not(:disabled), #clearSearchButton:active:not(:disabled) { border-color: var(--teal); background: var(--teal); color: white; }
#clearSearchButton:disabled { opacity: .45; cursor: default; }
#trailSearch:focus-visible, #clearSearchButton:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
@media (max-width: 480px) {
  .trail-search-row { flex-wrap: wrap; }
  #trailSearch { flex-basis: 100%; }
  #clearSearchButton { margin-left: auto; }
}


/* The starting city stays visible above Joy Finder's filters. */
.origin-panel { display: grid; grid-template-columns: minmax(180px, 1fr) 180px auto; align-items: end; gap: 12px 16px; padding: 22px; margin-bottom: 24px; background: var(--cream); border: 1px solid var(--line); border-radius: 16px; }
.origin-panel label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.origin-panel input { width: 100%; min-width: 0; height: 48px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: 16px; }
.origin-panel input[readonly] { color: var(--ink-soft); }
.origin-submit { min-height: 48px; padding: 12px 22px; border: 0; border-radius: 999px; background: #171917; color: white; font-size: 13px; font-weight: 800; cursor: pointer; }
.origin-submit:hover, .origin-submit:active { background: var(--teal); color: white; }
.origin-panel input:focus-visible, .origin-submit:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.origin-panel input[aria-invalid="true"] { border-color: #a33f27; }
.origin-help, .origin-status, .origin-error { grid-column: 1 / -1; margin: 0; font-size: 12px; }
.origin-help { color: var(--ink-soft); }
.origin-status { color: var(--ink); }
.origin-error { color: #973821; font-weight: 700; }
.drive-time { max-width: 145px; overflow-wrap: anywhere; }
.drive-time small { display: block; font-size: 10px; font-weight: 500; }
@media (max-width: 720px) {
  .origin-panel { grid-template-columns: minmax(0, 1fr) 140px; padding: 16px; }
  .origin-submit { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .origin-panel { grid-template-columns: minmax(0, 1fr); }
  .origin-state input { height: 42px; }
}

/* Let compact ride cards shrink to their column and wrap every action. */
@media (max-width: 1050px) {
  .trail-card { min-width: 0; }
  .card-top { flex-direction: column; gap: 10px; }
  .card-top > div { min-width: 0; max-width: 100%; }
  .route-type::before { flex-shrink: 0; }
  .trail-card h3 { overflow-wrap: anywhere; }
  .drive-time { max-width: none; text-align: left; }
  .route-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-actions { flex-wrap: wrap; justify-content: center; gap: 8px; overflow: visible; }
  .card-actions > button, .card-actions > a { flex-basis: 84px; width: 84px; height: 44px; font-size: 12px; }
}

@media (max-width: 720px) {
  .trail-card { padding: 20px 16px; }
  .results-toolbar label { min-width: 0; width: 100%; }
  .results-toolbar select { min-width: 0; max-width: 100%; }
}

/* JoyRiders Version 2: a compact finder, clear cards, and a focused ride view. */
[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; }
:focus-visible { outline:3px solid var(--teal); outline-offset:3px; }
.site-header { padding-top:8px; padding-bottom:0; flex-wrap:nowrap; }
.brand { flex-basis:205px; }
.site-header nav { margin-left:auto; }
.header-meta { display:none; }
.hero { display:block; margin:8px auto 22px; padding-top:10px; padding-bottom:0; }
.hero::before { display:none; }
h1 { max-width:none; font-size:clamp(38px,4.4vw,66px); line-height:1.08; }
.explorer { padding-top:0; }
.trail-search { position:relative; margin-bottom:16px; }
.trail-search-row { position:relative; flex-wrap:nowrap; }
#trailSearch { min-height:56px; padding:15px 80px 15px 20px; background:var(--cream); font-size:18px; border-radius:12px; }
#clearSearchButton { position:absolute; right:10px; top:8px; min-height:40px; padding:8px 12px; background:transparent; color:var(--ink-soft); border:0; }
#clearSearchButton:disabled { visibility:hidden; }
.search-suggestions { position:absolute; top:calc(100% + 4px); left:0; width:min(490px,100%); max-height:420px; overflow:auto; z-index:1100; border:1px solid var(--line); border-radius:12px; background:var(--cream); box-shadow:var(--shadow); padding:8px; }
.suggestion-heading { padding:10px 12px 4px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; color:var(--teal); }
.search-suggestions button { width:100%; display:block; text-align:left; border:0; background:transparent; padding:10px 12px; border-radius:8px; cursor:pointer; }
.search-suggestions button:hover,.search-suggestions [aria-selected=true] { background:#dfebe3; }
.search-suggestions strong,.search-suggestions span { display:block; }
.search-suggestions span { font-size:13px; color:var(--ink-soft); margin-top:3px; }
.finder-tools { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.finder-tools .chip,.finder-tools select { min-height:44px; font-size:14px; }
.finder-tools select { padding:10px 14px; color:var(--ink); border:1px solid var(--line); border-radius:12px; background:var(--paper); font:inherit; }
.origin-chip { background:#d3e4da; border-color:#d3e4da; }
.finder-tools #dataNotesButton { margin-left:auto; font-size:12px; }
.origin-status { margin:10px 0; color:var(--ink-soft); }
.active-filters { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.active-filters:empty { display:none; }
#advancedFilters { margin-top:16px; }
.results-summary { display:flex; align-items:center; justify-content:space-between; margin:16px 0 12px; }
#searchResultCount { font-size:14px; }
.view-switch { display:none; }
.explorer-grid { grid-template-columns:minmax(0,1.12fr) minmax(0,1fr); padding:0; border-radius:20px; overflow:hidden; }
.map-column { min-width:0; }
#map { height:620px; min-height:620px; }
.map-toolbar,.results-toolbar { min-height:66px; }
.results-column { background:var(--cream); }
.trail-list { max-height:700px; display:block; }
.trail-card { padding:25px 24px; cursor:default; }
.trail-card h3 { font-size:28px; line-height:1.14; }
.place-label { font-size:14px; font-weight:500; margin-top:7px; }
.nearby-distance { margin:8px 0 14px; font-size:12px; color:var(--ink-soft); }
.route-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:18px; gap:8px; }
.metric { padding:12px; }
.metric strong { font-size:15px; line-height:1.35; }
.metric span { font-size:11px; font-weight:500; text-transform:none; letter-spacing:0; margin-top:4px; }
.card-actions { overflow:visible; flex-wrap:wrap; justify-content:flex-start; gap:10px; margin-top:8px; }
.card-actions > button { flex:0 1 auto; width:auto; min-height:44px; height:auto; padding:10px 20px; font-size:14px; background:transparent; color:var(--ink); border:1px solid var(--ink); }
.card-actions > .primary-button { background:var(--ink); color:white; min-width:125px; }
.card-actions > .compare-button { margin-left:auto; border-color:transparent; font-size:13px; padding:10px; }
.card-actions > [aria-pressed=true] { background:#d3e4da; color:var(--ink); border-color:#a6c4b2; }
.route-alert { display:block; }
.ride-dialog { width:min(760px,calc(100% - 32px)); }
.detail-top { display:flex; align-items:center; justify-content:space-between; padding:18px 24px; }
.detail-body { padding:8px 28px 32px; }
.detail-body h2 { font-size:clamp(32px,4vw,48px); line-height:1.08; }
.detail-place { font-size:18px; color:var(--ink-soft); margin:12px 0 22px; }
.detail-crossings { font-size:14px; color:var(--ink-soft); }
.detail-actions { display:flex; flex-wrap:wrap; gap:10px; margin:20px 0; }
.detail-actions > * { display:inline-flex; align-items:center; justify-content:center; min-height:44px; text-decoration:none; }
.primary-button { background:var(--ink); }
.ride-facts { border-top:1px solid var(--line); padding-top:12px; }
.ride-facts div { margin:14px 0; }
.ride-facts dt { font-size:12px; font-weight:800; color:var(--ink-soft); }
.ride-facts dd { margin:4px 0 0; font-size:14px; }
.share-dialog { width:min(560px,calc(100% - 28px)); }
.share-dialog .dialog-head { border:0; padding-bottom:0; }
.share-dialog h2 { font-size:42px; }
.share-dialog .dialog-head p { margin:10px 0 0; color:var(--ink-soft); }
.share-body { padding:8px 28px 24px; }
.share-body h3 { font:600 25px/1.2 Georgia,serif; margin:18px 0 4px; }
#shareTrailPlace { margin:0 0 18px; color:var(--ink-soft); }
.share-body label { display:block; font-size:13px; font-weight:700; margin:14px 0 6px; }
.share-body label span { font-weight:400; color:var(--ink-soft); }
.share-body textarea,.share-body input { display:block; width:100%; min-width:0; border:1px solid var(--line); border-radius:12px; background:var(--paper); padding:12px; font:inherit; font-size:16px; color:var(--ink); }
.share-body textarea { resize:vertical; }
#shareLink { font-size:13px; }
#nativeShare { width:100%; margin-top:18px; min-height:48px; font-size:16px; }
.share-help,.share-privacy { font-size:12px; color:var(--ink-soft); line-height:1.5; }
.share-copy-actions { display:flex; gap:10px; flex-wrap:wrap; }
.share-copy-actions button { flex:1; min-height:44px; }
.share-privacy { text-align:center; margin:20px 0 0; }
#shareStatus:empty { display:none; }
#shareStatus { font-size:13px; }
.save-toast { position:fixed; z-index:1500; bottom:92px; left:24px; max-width:calc(100vw - 48px); padding:14px 18px; display:flex; align-items:center; gap:16px; background:var(--ink); color:white; border-radius:12px; box-shadow:var(--shadow); font-size:14px; }
.save-toast button { background:transparent; border:0; color:#efb575; min-height:36px; font-weight:700; cursor:pointer; }
.region-progress { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:20px 0; }
.region-progress span,.region-progress small { display:block; font-size:12px; }
.region-progress progress { display:block; width:100%; height:8px; margin:8px 0; accent-color:var(--teal); }
.backup-actions { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0; }
#backupStatus { font-size:13px; }
@media(max-width:1050px) and (min-width:761px) {
  .explorer-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .trail-card { padding:20px 16px; }
  .trail-card h3 { font-size:24px; }
  .metric { padding:9px; }
  .metric strong { font-size:13px; }
}
@media(max-width:760px) {
  .site-header { padding:8px 20px 0; }
  .brand { flex-basis:150px; }
  .hero { margin:8px auto 20px; padding:8px 20px 0; }
  .hero .eyebrow { font-size:10px; }
  h1 { font-size:38px; max-width:390px; }
  .explorer { padding:0 20px 20px; }
  #trailSearch { font-size:16px; min-height:52px; }
  .finder-tools { gap:8px; }
  .finder-tools .chip,.finder-tools select { font-size:12px; padding:9px 12px; }
  .finder-tools #dataNotesButton { margin-left:0; }
  .origin-status { font-size:11px; }
  .results-summary { display:block; }
  .view-switch { display:flex; background:var(--paper-2); border-radius:12px; margin-top:12px; padding:4px; }
  .view-switch button { flex:1; border:0; border-radius:9px; padding:12px; font-weight:700; background:transparent; cursor:pointer; }
  .view-switch [aria-pressed=true] { background:var(--ink); color:white; }
  .explorer-grid { display:block; border-radius:14px; }
  .explorer-grid[data-view=list] .map-column { display:none; }
  .explorer-grid[data-view=map] .results-column { display:none; }
  .results-column { border:0; }
  .trail-list { max-height:none; }
  .trail-card { padding:22px 16px; }
  .trail-card h3 { font-size:26px; }
  .route-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .metric { padding:10px 8px; }
  .metric strong { font-size:13px; }
  .metric span { font-size:11px; }
  .card-actions { gap:6px; }
  .card-actions > button { padding:10px 14px; font-size:13px; }
  .card-actions > .primary-button { min-width:100px; }
  #map { height:520px; min-height:520px; }
  .ride-dialog { width:100%; max-width:100%; height:100%; max-height:100dvh; margin:0; border-radius:0; }
  .detail-top { padding:16px 20px; }
  .detail-body { padding:6px 20px 32px; }
  .detail-body h2 { font-size:38px; }
  .share-dialog { width:100%; max-width:100%; max-height:90dvh; margin:auto 0 0; border-radius:24px 24px 0 0; }
  .share-dialog .dialog-head { padding:20px 20px 0; }
  .share-dialog h2 { font-size:36px; }
  .share-body { padding:0 20px 20px; }
  .share-body h3 { font-size:21px; }
  .save-toast { left:12px; max-width:calc(100vw - 24px); bottom:82px; gap:10px; padding:10px 12px; font-size:12px; }
}

/* Equal spacing between the eyebrow, justified intro, and headline. */
.hero > .eyebrow { margin: 0; }
.hero > .hero-copy { margin: 20px 0; text-align: justify; text-align-last: left; }
.hero > h1 { margin: 0; }

/* Closest-ride card placement follows the supplied homepage edit. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; column-gap: 64px; row-gap: 0; align-items: start; }
.hero > .eyebrow, .hero > .hero-copy, .hero > h1 { grid-column: 1; }
.hero > .hero-pick { grid-column: 2; grid-row: 1 / span 3; width: 100%; min-height: 236px; padding: 28px; border-radius: 22px; box-shadow: none; }
.hero-pick .text-button { min-height: 44px; }
@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 28px; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero > .hero-pick { grid-column: 1; grid-row: auto; min-height: 0; margin-top: 24px; }
}

/* Selected centered masthead and contrasting footer. */
.site-header {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 540px) minmax(0, 1fr);
  gap: 0;
  padding: 12px clamp(20px, 3.4vw, 64px);
  border-bottom: 1px solid var(--line);
}
.site-header .brand {
  grid-column: 2;
  width: 100%;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-header nav {
  grid-column: 3;
  align-self: start;
  justify-self: end;
  margin: 24px 0 0;
}
.hero { margin-top: 30px; }
body > footer {
  max-width: none;
  background: var(--ink);
  color: #fff;
  border-top: 0;
  padding: 32px max(24px, calc((100vw - 1312px) / 2)) 100px;
  font-size: 12px;
}
@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr; padding: 16px 20px 8px; }
  .site-header .brand { grid-column: 1; grid-row: 2; width: min(400px, 100%); height: 180px; justify-self: center; }
  .site-header nav { grid-column: 1; grid-row: 1; margin: 0; }
  .hero { margin-top: 20px; }
  body > footer { gap: 16px; }
}

/* More breathing room from the masthead through the finder controls. */
.hero { margin-top: 48px; margin-bottom: 36px; }
.hero > .hero-copy { margin-top: 28px; margin-bottom: 28px; }
.trail-search { margin-bottom: 24px; }
.finder-tools { column-gap: 14px; row-gap: 12px; }
.origin-status { margin-top: 14px; margin-bottom: 14px; }
.results-summary { margin-top: 24px; margin-bottom: 20px; }
@media (max-width: 760px) {
  .hero { margin-top: 28px; margin-bottom: 28px; }
  .hero > .hero-copy { margin-top: 24px; margin-bottom: 24px; }
  .trail-search { margin-bottom: 20px; }
  .finder-tools { column-gap: 8px; row-gap: 12px; }
  .results-summary { margin-top: 20px; margin-bottom: 16px; }
}

/* Ride details expand in the results list alongside the map. */
.inline-ride-detail { margin-top: 24px; border-top: 1px solid var(--line); }
.inline-ride-detail .detail-top { padding: 16px 0; }
.inline-ride-detail .detail-body { padding: 0 0 8px; }
.inline-ride-detail .detail-body h2 { font-size: clamp(28px, 2.5vw, 36px); margin: 12px 0; }
.inline-ride-detail .route-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inline-ride-detail .route-metrics .metric:last-child { grid-column: 1 / -1; }
.inline-ride-detail .ride-facts dd { overflow-wrap: anywhere; }
.trail-card h3, .trail-card > .route-type, .trail-card > .place-label { cursor: pointer; }
.trail-card:has([data-view-ride][aria-expanded="true"]) > .route-metrics,
.trail-card:has([data-view-ride][aria-expanded="true"]) > .route-alert { display: none; }
.inline-ride-detail [data-close-ride] { margin-top: 20px; }

/* A welcoming, useful footer. */
body > .site-footer { display: block; padding-top: 48px; padding-bottom: 40px; }
.footer-main { display: flex; justify-content: space-between; gap: 48px; padding-bottom: 36px; }
.footer-intro { min-width: 0; }
.footer-intro > p { max-width: 490px; }
.footer-intro h2 { margin: 0 0 14px; font: 600 clamp(30px, 3vw, 42px)/1.15 Georgia, serif; letter-spacing: .015em; font-variant-ligatures: none; white-space: nowrap; color: #fff; }
.footer-intro p { margin: 0; font-size: 16px; line-height: 1.65; color: #fff; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.footer-links button { padding: 0; border: 0; background: none; color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.5; text-align: left; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.footer-links button:disabled { cursor: default; text-decoration: none; }
.footer-links small { display: block; margin-top: 3px; color: #c7d8d1; font-size: 11px; }
.footer-fine-print { display: flex; justify-content: space-between; gap: 24px; padding-top: 22px; border-top: 1px solid #59716a; }
.footer-fine-print p { margin: 0; line-height: 1.6; }
.site-footer :focus-visible { outline-color: #fff; }
@media(max-width:760px) {
  .footer-main, .footer-fine-print { flex-direction: column; gap: 28px; }
  .footer-fine-print { gap: 16px; }
  body > .site-footer { padding-top: 36px; padding-bottom: 40px; }
}

.footer-copyright { margin: 0 0 22px; font-size: 12px; line-height: 1.7; }
.footer-copyright span { color: #c7d8d1; }

/* Use initial capitals consistently across action labels and their states. */
button,
a.primary-button,
a.chip,
a.map-action,
[role="button"] {
  text-transform: capitalize;
}

/* Align the account action with the finder and match the logo ink. */
.site-header {
  padding-inline: calc(max(0px, (100vw - 1440px) / 2) + clamp(20px, 4vw, 64px));
}
.my-rides-button { background: #1f4335; border-color: #1f4335; }
.my-rides-button:hover { background: #17312b; border-color: #17312b; }
@media (max-width: 760px) {
  .site-header { padding-inline: 20px; }
}

/* Give the native dropdown arrow a comfortable inset from the outer edge. */
.ride-length-control { display: inline-flex; align-items: center; padding-right: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.finder-tools .ride-length-control select { border: 0; border-radius: 12px; background: transparent; padding: 10px 12px 10px 16px; font-size: 14px; text-transform: capitalize; cursor: pointer; }
.ride-length-control:focus-within { outline: 3px solid var(--teal); outline-offset: 3px; }
.ride-length-control select:focus-visible { outline: none; }
@media(max-width:760px) { .finder-tools .ride-length-control select { font-size: 12px; padding-left: 12px; } }

/* Faint trail illustration, kept behind the readable page surfaces. */
body { position: relative; isolation: isolate; }
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(1200px, 100vw);
  min-height: 850px;
  background: url("assets/trail-line-drawing.png") center top / cover no-repeat;
  opacity: .065;
  pointer-events: none;
}
@media (max-width: 760px) {
  body::before { height: 1200px; background-position: 48% top; opacity: .045; }
}

/* Carry the illustration across the entire cream page area. */
body::before {
  inset: 0;
  height: auto;
  min-height: 0;
  background-size: cover;
}
@media (max-width: 760px) {
  body::before { height: auto; }
}

body::before { opacity: .0425; }

/* Background 2: mountains, using Background 1's full-page subtle treatment. */
body::before {
  background-image: url("assets/mountain-background.png");
  background-position: center top;
  background-size: cover;
  opacity: .0425;
}

/* Photographic layers need more presence than the line drawing. */
body::before { opacity: .5; }

/* Original mountain photograph with a tan fade across the top third. */
body::before {
  background-image: linear-gradient(to bottom, #f5f1e8 0%, rgba(245, 241, 232, 0) 33.333%), url("assets/mountain-original.jpg");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: .5;
}

body::before { opacity: .75; }

.ride-notes .section-kicker { color: #fff; }
#notes-title { color: var(--amber); }

#notes-title > span { color: #1f4335; }

/* One rounded planning-notes panel aligned with the map/results frame. */
.ride-notes {
  width: calc(min(100%, 1440px) - clamp(20px, 4vw, 64px) - clamp(20px, 4vw, 64px));
  margin: 0 auto 64px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
  gap: 36px;
}
.ride-notes .section-kicker {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 6px;
  background: #1f4335;
  color: #fff;
}
.notes-grid p { border-radius: 8px; }
@media (max-width: 760px) {
  .ride-notes { width: calc(100% - 40px); padding: 24px 20px; gap: 24px; margin-bottom: 32px; }
}

/* A quiet white brand signature beneath the footer links. */
.footer-brand { display: block; width: 190px; margin: 2px 0 0 -12px; border-radius: 6px; }
.footer-brand img { display: block; width: 100%; height: auto; filter: brightness(0) invert(1); }

/* Footer proportions from the selected reference. */
.footer-main { padding-bottom: 24px; }
.footer-intro .footer-copyright { margin: 36px 0 0; font-size: 12px; line-height: 1.7; }
.footer-brand { width: 140px; margin: -4px 0 -10px -9px; }

/* Keep the footer slogan open and on one line. */
.footer-traffic { letter-spacing: .08em; font-kerning: none; }
@media (max-width: 760px) {
  .footer-intro h2 { font-size: clamp(18px, 5.4vw, 30px); }
}

.contact-dialog { width: min(600px, calc(100vw - 32px)); }
.contact-dialog .dialog-head h2 { font-size: clamp(26px, 5vw, 34px); }
.contact-dialog .dialog-head p { margin: 12px 0 0; color: var(--ink-soft); }
.contact-form { padding: 24px; display: grid; gap: 10px; }
.contact-form label { font-size: 14px; font-weight: 700; }
.contact-form label span { font-weight: 400; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; margin-bottom: 8px; }
.contact-form textarea { resize: vertical; }
.contact-form :is(input,select,textarea):focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.contact-privacy, #contactStatus { font-size: 13px; line-height: 1.5; margin: 0; }
.contact-honeypot { display: none; }
.contact-form button:disabled { opacity: .65; cursor: wait; }
