:root {
  --asphalt: #26282b;
  --asphalt-soft: #3a3d41;
  --lane: #f7f6f2;
  --sign-green: #006b54;
  --sign-blue: #4a6785;
  --warning: #ffcc00;
  --cone: #e8590c;
  --ink: #1b1c1e;
  --muted: #5f6368;
  --radius-sign: 10px;
  --radius-card: 10px;
  --radius-control: 8px;
  --hairline: #e3e1d9;
  --card-bg: #fff;
  --shadow-card: 0 1px 2px rgba(27, 28, 30, 0.06), 0 4px 12px rgba(27, 28, 30, 0.05);
  --shadow-raised: 0 2px 4px rgba(27, 28, 30, 0.12), 0 8px 20px rgba(27, 28, 30, 0.10);
  --shadow-float: 0 4px 10px rgba(27, 28, 30, 0.14), 0 16px 40px rgba(27, 28, 30, 0.16);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --panel-w: 380px;
  --panel-ease: 300ms cubic-bezier(0.32, 0.72, 0.24, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: "Overpass", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--lane);
  line-height: 1.5;
  overflow: hidden;
}

/* ---- Full-viewport map; everything else floats over it ------------------- */
#map {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #dfe3e6;
}

/* Emblem watermark, always centred in the viewport. It lives in a custom
   Leaflet pane (z 350: above tiles at 200, below overlays/markers/popups)
   and app.js re-centres it on every map move. */
.map-watermark {
  position: absolute;
  width: 480px;
  max-width: 65vw;
  opacity: 0.085;
  pointer-events: none;
  user-select: none;
}

/* ---- Floating search pill (Apple Maps / Google Maps style) ---------------- */
.search-pill {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: min(460px, calc(100vw - 24px));
  padding: 0.45rem 0.5rem 0.45rem 0.9rem;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  box-shadow: var(--shadow-float);
}

.pill-logo { flex: none; width: 28px; height: auto; }

input#pill-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  color: var(--ink);
}

input#pill-input::placeholder { color: #7a7f85; font-weight: 600; }
input#pill-input:focus { outline: none; }
.search-pill:focus-within {
  border-color: var(--asphalt);
  box-shadow: var(--shadow-float), 0 0 0 2px rgba(38, 40, 43, 0.25);
}

#pill-go {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--ink);
  background: var(--warning);
  border: 2px solid var(--asphalt);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 0 var(--asphalt);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}
#pill-go:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 2px 0 var(--asphalt); }
#pill-go:active { transform: translateY(1px); box-shadow: 0 0 0 var(--asphalt); }

/* ---- Docked popout tab: toggles the panel open AND closed ------------------ */
/* It never disappears — it rides the panel's right edge as it slides, so the
   same control that opens the panel is the one that tucks it away again. */
.panel-tab {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 1060; /* above the panel, so it stays clickable riding its edge */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 104px;
  padding: 0;
  color: var(--asphalt);
  background: var(--warning);
  border: 2px solid var(--asphalt);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  box-shadow: var(--shadow-raised);
  transform: translateY(-50%);
  transition: transform var(--panel-ease), filter 120ms ease;
}

.panel-tab:hover { transform: translateY(-50%) translateX(3px); filter: brightness(1.04); }

.panel-tab svg { transition: transform var(--panel-ease); }

/* Docks flush against the open panel's right edge instead of hiding. */
body.panel-open .panel-tab { transform: translateY(-50%) translateX(var(--panel-w)); }
body.panel-open .panel-tab svg { transform: rotate(180deg); }
body.panel-open .panel-tab:hover { transform: translateY(-50%) translateX(calc(var(--panel-w) - 3px)); }

/* ---- Slide-in trip panel --------------------------------------------------- */
.panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1050;
  width: var(--panel-w);
  max-width: calc(100vw - 16px);
  display: flex;
  flex-direction: column;
  border-right: 6px solid var(--asphalt);
  /* dashed centre line down the panel edge, like a lane marking */
  background:
    linear-gradient(var(--warning) 50%, transparent 50%) right -6px top / 2px 36px repeat-y,
    var(--lane);
  box-shadow: var(--shadow-float);
  transform: translateX(calc(-100% - 24px));
  transition: transform var(--panel-ease);
  visibility: hidden;
}

body.panel-open .panel { transform: translateX(0); visibility: visible; }

/* keep it discoverable to transition back out */
.panel { transition: transform var(--panel-ease), visibility 0s linear 320ms; }
body.panel-open .panel { transition: transform var(--panel-ease), visibility 0s; }

.panel-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-5) var(--space-5) var(--space-4);
}

.sheet-handle { display: none; }

/* ---- Masthead: emblem + wordmark on one baseline, tagline underneath ------- */
.masthead {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: var(--space-3);
  row-gap: var(--space-1);
}

.masthead .logo {
  grid-column: 1;
  grid-row: 1;
  width: 52px;
  height: auto;
}

h1 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* "jawn" gets the hazard-yellow warning-plate treatment. */
.wordmark .jawn {
  background: var(--warning);
  color: var(--ink);
  padding: 0 0.12em;
  margin-left: 0.02em;
  border-radius: 5px;
  box-shadow: 0 1px 0 var(--asphalt);
}

.tagline {
  grid-column: 1 / 3;
  grid-row: 2;
  margin: 0;
  padding-top: var(--space-1);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

/* ---- Segmented mode switch: unifies "plan a trip" and "ask 311 data" ------- */
.mode-switch {
  display: flex;
  gap: 3px;
  margin-top: var(--space-4);
  padding: 3px;
  background: rgba(38, 40, 43, 0.06);
  border: 1.5px solid var(--asphalt);
  border-radius: 999px;
}

.mode-tab {
  flex: 1;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.62rem 0.5rem;
  color: var(--asphalt-soft);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.mode-tab:hover { color: var(--ink); }

.mode-tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--warning);
  box-shadow: 0 1px 0 var(--asphalt);
}

.mode-panel {
  margin-top: var(--space-4);
  animation: mode-in 180ms ease both;
}

@keyframes mode-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.fine-print {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

h2 {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--asphalt-soft);
  margin: var(--space-5) 0 var(--space-2);
}

form { display: grid; gap: var(--space-1); }

label { font-weight: 600; font-size: 0.85rem; margin-top: var(--space-2); color: var(--asphalt-soft); }

input[type="text"] {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--asphalt);
  border-radius: var(--radius-control);
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input[type="text"]:hover { border-color: var(--asphalt-soft); }

input[type="text"]::placeholder { color: #9aa0a6; }

button#go, button#ask-go {
  margin-top: var(--space-4);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 0.8rem;
  color: var(--ink);
  background: var(--warning);
  border: 2px solid var(--asphalt);
  border-radius: var(--radius-control);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--asphalt);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

button#go:hover:not(:disabled), button#ask-go:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--asphalt);
}

button#go:active:not(:disabled), button#ask-go:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--asphalt);
  filter: brightness(0.97);
}

button#go:disabled, button#ask-go:disabled {
  opacity: 0.55;
  cursor: progress;
  transform: none;
  box-shadow: 0 2px 0 var(--asphalt);
}

input:focus-visible, button:focus-visible, summary:focus-visible, .route-sign:focus-visible, a:focus-visible {
  outline: 3px solid var(--cone);
  outline-offset: 2px;
}

.status {
  min-height: 1.4rem;
  margin: var(--space-3) 0 0;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.status.error { color: #a61b1b; }

/* Spinner shown while an agent request is in flight. */
.status.busy::before {
  content: "";
  flex: none;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 2.5px solid var(--asphalt);
  border-top-color: var(--warning);
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.briefing {
  margin-top: var(--space-4);
  padding: var(--space-4) 1.1rem;
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-left: 6px solid var(--sign-green);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  box-shadow: var(--shadow-card);
  white-space: pre-wrap;
  font-size: 0.95rem;
}

.briefing .mode {
  display: block;
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--hairline);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.routes { display: grid; gap: var(--space-3); margin-top: var(--space-4); }

/* Route cards look like highway guide signs: solid fill, white inset border. */
.route-sign {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  text-align: left;
  color: #fff;
  background: var(--sign-blue);
  border: 0;
  border-radius: var(--radius-sign);
  box-shadow: inset 0 0 0 3px var(--sign-blue), inset 0 0 0 5px #fff, var(--shadow-card);
  cursor: pointer;
  opacity: 0.82;
  transition: opacity 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.route-sign:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 3px var(--sign-blue), inset 0 0 0 5px #fff, var(--shadow-raised);
}

.route-sign:active { transform: translateY(0); }

.route-sign.recommended {
  background: var(--sign-green);
  box-shadow: inset 0 0 0 3px var(--sign-green), inset 0 0 0 5px #fff, var(--shadow-card);
}

.route-sign.recommended:hover {
  box-shadow: inset 0 0 0 3px var(--sign-green), inset 0 0 0 5px #fff, var(--shadow-raised);
}

.route-sign.active { opacity: 1; box-shadow: inset 0 0 0 3px var(--sign-blue), inset 0 0 0 5px #fff, var(--shadow-raised); }
.route-sign.recommended.active { box-shadow: inset 0 0 0 3px var(--sign-green), inset 0 0 0 5px #fff, var(--shadow-raised); }

.route-letter { font-size: 2rem; font-weight: 800; line-height: 1; }
.route-meta { font-size: 0.85rem; opacity: 0.92; }
.route-meta strong { display: block; font-size: 1.05rem; letter-spacing: 0.01em; }
.route-count { text-align: center; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.2; opacity: 0.92; }
.route-count b { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--warning); }

details {
  margin-top: var(--space-5);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  transition: background-color 120ms ease;
}

summary:hover { background: rgba(38, 40, 43, 0.04); }

details[open] summary { border-bottom: 1px solid var(--hairline); border-radius: var(--radius-card) var(--radius-card) 0 0; }

details ol { margin: var(--space-2) 0 var(--space-3); }

#live, #ask-live {
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-4) var(--space-3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
}

#steps, #live-steps, #ask-live-steps {
  padding-left: 1.4rem;
  font-size: 0.85rem;
  color: var(--asphalt-soft);
}
#steps { margin: var(--space-3) var(--space-4); }
#steps li, #live-steps li, #ask-live-steps li { margin: 0.35rem 0; overflow-wrap: anywhere; }
#live-steps li, #ask-live-steps li { animation: step-in 260ms ease both; }
#steps li.error, #live-steps li.error, #ask-live-steps li.error { color: #a61b1b; }

@keyframes step-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Ask-the-analyst tab ---------------------------------------------------- */
.ask-explainer {
  margin: 0 0 var(--space-3);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.ask-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  margin: 0 calc(-1 * var(--space-5)) var(--space-2);
  padding: 2px var(--space-5) 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.ask-chips::-webkit-scrollbar { display: none; }

.ask-chip {
  flex: none;
  max-width: 100%;
  white-space: nowrap;
  scroll-snap-align: start;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  color: var(--asphalt-soft);
  background: var(--card-bg);
  border: 1.5px solid var(--asphalt);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 0 var(--asphalt);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, color 120ms ease;
}

.ask-chip:hover {
  background: var(--warning);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 2px 0 var(--asphalt);
}

.ask-chip:active { transform: translateY(1px); box-shadow: 0 0 0 var(--asphalt); }

/* ---- Location autocomplete dropdown --------------------------------------- */
.ac-list {
  position: fixed;
  z-index: 1300;
  max-height: 42vh;
  overflow-y: auto;
  padding: 4px;
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-float);
}

.ac-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

.ac-item:hover, .ac-item.active { background: rgba(255, 204, 0, 0.2); }

.ac-glyph { flex: none; width: 1.25rem; text-align: center; }
.ac-text { display: flex; flex-direction: column; min-width: 0; }
.ac-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-sub { font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Entrance only — plays once when the dropdown opens, never on a per-
   keystroke re-render, so results updating while typing never jitters. */
.ac-list.ac-open { animation: ac-in 140ms ease both; }
@keyframes ac-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Trailing "still looking" row while a Photon request is in flight. */
.ac-loading {
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  animation: hazard 1.2s ease-in-out infinite;
}

/* ---- Use-my-location button inside the start input ------------------------- */
.input-geo { position: relative; }
.input-geo input { width: 100%; padding-right: 2.6rem; }

.geo-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.25rem 0.35rem;
  font-size: 1.02rem;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.geo-btn:hover { background: rgba(38, 40, 43, 0.08); }

.live-title {
  font-size: 0.75rem;
  margin: var(--space-2) 0 var(--space-1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Blinking hazard dot next to the live activity title. */
.live-title::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--warning);
  border: 1.5px solid var(--asphalt);
  transform: rotate(45deg);
  animation: hazard 1.2s ease-in-out infinite;
}

@keyframes hazard {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.pothole-list { list-style: none; margin: 0; padding: 0; }
.pothole-list li {
  display: grid;
  grid-template-columns: 3.6rem 1fr auto;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2);
  margin: 0 calc(-1 * var(--space-2));
  border-bottom: 1px solid var(--hairline);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.pothole-list li:hover { background: rgba(255, 204, 0, 0.14); }
.pothole-list .mile { font-weight: 800; font-variant-numeric: tabular-nums; }
.pothole-list .age { color: var(--muted); white-space: nowrap; font-size: 0.82rem; }
.pothole-list .age.old { color: var(--cone); font-weight: 600; }

footer {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

footer p { margin: 0 0 var(--space-2); }

footer a { color: var(--sign-blue); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 2px; }
footer a:hover { color: var(--sign-green); }

.footer-credit { letter-spacing: 0.01em; }

/* Mute the basemap so routes and warning signs carry the colour. */
.leaflet-tile-pane { filter: grayscale(0.9) contrast(0.92) brightness(1.06); }

/* Pothole markers: yellow diamond warning signs. Orange when open 90+ days. */
.pothole-marker {
  width: 18px; height: 18px;
  background: var(--warning);
  border: 2px solid var(--ink);
  border-radius: 3px;
  transform: rotate(45deg);
  box-shadow: 0 1px 3px rgba(27, 28, 30, 0.35);
}
.pothole-marker.old { background: var(--cone); }

/* Count of citywide open reports currently in view (Leaflet control). */
.citywide-badge {
  padding: 0.3rem 0.65rem;
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--warning);
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  font-family: "Overpass", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--asphalt-soft);
}

/* Landmark chips: tiny emoji in a white circle, quiet enough to sit under routes. */
.landmark-chip {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(27, 28, 30, 0.25);
  cursor: pointer;
}

.landmark-popup strong { font-size: 0.9rem; }

.landmark-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.landmark-btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  color: var(--ink);
  background: var(--warning);
  border: 1.5px solid var(--asphalt);
  border-radius: var(--radius-control);
  cursor: pointer;
  box-shadow: 0 1px 0 var(--asphalt);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.landmark-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 0 var(--asphalt);
}

.landmark-btn:active {
  transform: translateY(1px);
  box-shadow: 0 0 0 var(--asphalt);
}

.endpoint-marker {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--asphalt);
  box-shadow: 0 1px 3px rgba(27, 28, 30, 0.35);
}

/* ---- Mobile: bottom sheet (Waze / Google Maps pattern) --------------------- */
@media (max-width: 768px) {
  .map-watermark { width: 200px; }

  /* The bottom sheet's peek strip and the pill cover this role on mobile. */
  .panel-tab { display: none; }

  .search-pill {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
  }

  /* keep the zoom control clear of the pill, and the citywide badge clear
     of the wrapped attribution line */
  .leaflet-top.leaflet-left { top: 74px; }
  .leaflet-bottom.leaflet-left { bottom: 46px; }

  .panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: 58vh;
    border-right: 0;
    border-top: 6px solid var(--asphalt);
    border-radius: 16px 16px 0 0;
    /* lane marking runs along the top edge on mobile */
    background:
      linear-gradient(90deg, var(--warning) 50%, transparent 50%) left top -6px / 36px 2px repeat-x,
      var(--lane);
    transform: translateY(calc(100% + 24px));
  }

  body.panel-open .panel { transform: translateY(0); }
  body.panel-open .panel.collapsed { transform: translateY(calc(100% - 56px)); }

  .sheet-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 100%;
    height: 30px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
  }

  .sheet-handle span {
    display: block;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(38, 40, 43, 0.28);
  }

  .panel-scroll { padding: 0 var(--space-4) var(--space-4); }

  .masthead .logo { width: 44px; }
  h1 { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
