/* ============================================
   RiverReady — My Roads screen
   Loaded after app.css, which supplies the palette.
   ============================================ */

/* The auth screens center a small card. This one is a list that
   scrolls, so undo the body centring rather than fight it. */
.body--app {
  display: block;
  align-items: initial;
  overflow-y: auto;
}

.body--app .water { height: 26vh; opacity: 0.55; }

.app {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 20px 40vh;   /* deep bottom padding keeps the last
                                card clear of the waterline */
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.topbar-eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep);
  opacity: 0.75;
}

.topbar-title {
  font-family: "Sora", sans-serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.app-sub {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--ink-60);
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0 20px;
  padding: 4px;
  background: var(--card-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 999px;
}

.tab {
  flex: 1;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-60);
  background: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.tab--on {
  color: var(--on-dark);
  background: var(--deep);
}

.panel { display: none; }
.panel--on { display: block; }

/* ---------- Road cards ---------- */

.roads { display: grid; gap: 10px; }

.road {
  padding: 4px 18px 16px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 18px;
}

.road--saved { background: var(--white); }

/* Status tints the whole card edge, so the list can be read at a
   glance without parsing a single word. */
.road--watch    { border-color: rgba(176, 125, 26, 0.4); }
.road--flooding { border-color: rgba(194, 90, 30, 0.5); }
.road--avoid    { border-color: rgba(176, 48, 48, 0.55); }

.road-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 0 0;
  font-family: inherit;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.road-name {
  font-family: "Sora", sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--riverbed);
  margin: 0 0 2px;
}

.road-where {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-55);
}

/* ---------- Status pill ---------- */

.pill {
  flex-shrink: 0;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
}

.pill--clear    { color: #1d5a3f; background: rgba(29, 158, 117, 0.15); }
.pill--watch    { color: #7a5510; background: rgba(176, 125, 26, 0.16); }
.pill--flooding { color: #8a3c11; background: rgba(194, 90, 30, 0.16); }
.pill--avoid    { color: #7d2020; background: rgba(176, 48, 48, 0.16); }
.pill--unknown  { color: var(--ink-55); background: var(--ink-45); }

.road-summary {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-72);
}

/* ---------- Expanded detail ---------- */

.detail {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--edge-soft);
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--edge-soft);
}

.fact-label { color: var(--ink-60); }

.fact-value {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.detail-stamp {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-45);
}

.detail-why {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-72);
}

.detail-source {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-45);
}

/* ---------- Alert chips ---------- */

.alerts { margin-top: 16px; }

.alerts-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-60);
}

.chip {
  padding: 8px 15px;
  margin: 0 6px 6px 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--deep);
  background: none;
  border: 1px solid rgba(43, 108, 163, 0.28);
  border-radius: 999px;
  cursor: pointer;
}

.chip--on {
  color: var(--on-dark);
  background: var(--deep);
  border-color: var(--deep);
}

/* ---------- Buttons ---------- */

.btn-small {
  margin-top: 16px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-dark);
  background: var(--deep);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.btn-small--quiet {
  color: var(--deep);
  background: none;
  border: 1px solid rgba(43, 108, 163, 0.28);
}

.btn-small:disabled { opacity: 0.55; cursor: default; }

/* ---------- Map ---------- */

.map {
  height: 380px;
  margin-bottom: 12px;
  border: 1px solid var(--edge);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.map-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.map-tools .btn-small { margin-top: 0; }

.map-note {
  font-size: 13px;
  color: var(--ink-55);
}

/* ---------- Nearby list ---------- */

.nearby { margin-top: 24px; }

.nearby-title {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}

.nearby-sub {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-55);
}

.gauge-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--card-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 14px;
}

.gauge-row-name { font-size: 14px; font-weight: 500; }
.gauge-row-miles { font-size: 12px; color: var(--ink-55); }

.gauge-row-feet {
  margin-left: auto;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Profile ---------- */

.profile-card {
  padding: 18px;
  margin-bottom: 18px;
  background: var(--white);
  border: 1px solid var(--edge);
  border-radius: 18px;
}

.profile-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.profile-value {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.app-foot {
  margin-top: 30px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-45);
}


/* ============================================
   History
   ============================================ */

.history {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--edge-soft);
}

.history-loading {
  margin: 0;
  font-size: 13px;
  color: var(--ink-45);
}

/* ---------- How unusual is now ---------- */

.unusual {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  /* Single-sided borders and rounded corners don't mix, so this
     uses a full tinted panel instead of a left accent. */
}

.unusual--clear    { background: var(--edge-soft); }
.unusual--watch    { background: rgba(176, 125, 26, 0.13); }
.unusual--flooding { background: rgba(194, 90, 30, 0.13); }
.unusual--avoid    { background: rgba(176, 48, 48, 0.13); }

.unusual-label {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}

.unusual--watch    .unusual-label { color: #7a5510; }
.unusual--flooding .unusual-label { color: #8a3c11; }
.unusual--avoid    .unusual-label { color: #7d2020; }

.unusual-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-72);
}

/* ---------- Events by year ---------- */

.history-title {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
}

.year-bars { margin-bottom: 14px; }

.year-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.year-label {
  width: 40px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-60);
}

/* Bars share a row with the count, so max-width keeps a busy year
   from pushing the number off the edge. */
.year-bar {
  height: 9px;
  max-width: calc(100% - 90px);
  background: var(--current);
  border-radius: 999px;
}

.year-count {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-55);
}

/* ---------- Individual events ---------- */

.event {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 6px;
  font-family: inherit;
  text-align: left;
  background: var(--card-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 12px;
  cursor: pointer;
}

.event--on { background: var(--white); border-color: rgba(43, 108, 163, 0.3); }

.event-date { font-size: 14px; color: var(--riverbed); }

.event-peak {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.event-detail {
  padding: 4px 14px 14px;
  margin: -4px 0 8px;
}

.event-span {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-60);
}

.event-road {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 13px;
}

.event-road-where {
  font-size: 12px;
  color: var(--ink-55);
}

.dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 999px;
}

.dot--watch    { background: #b07d1a; }
.dot--flooding { background: #c25a1e; }
.dot--avoid    { background: #b03030; }

.history-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-45);
}


/* ============================================
   Expanded card: level, chart, forecast, thresholds
   ============================================ */

.now {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.now-feet {
  font-family: "Sora", sans-serif;
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.now-trend { font-size: 14px; font-weight: 500; }

.now-trend--up   { color: #a3421c; }
.now-trend--down { color: #1d6e56; }
.now-trend--flat { color: var(--ink-55); }

.detail-stamp {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-45);
}

.detail-stamp--stale {
  padding: 7px 11px;
  color: #7d2020;
  background: rgba(176, 48, 48, 0.12);
  border-radius: 10px;
}

.detail-caveat {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-55);
}

/* ---------- Chart ---------- */

.ranges { display: flex; gap: 6px; margin: 18px 0 10px; }

.range {
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-60);
  background: none;
  border: 1px solid var(--edge);
  border-radius: 999px;
  cursor: pointer;
}

.range--on {
  color: var(--on-dark);
  background: var(--deep);
  border-color: var(--deep);
}

.chart-box { margin-bottom: 4px; }

.chart { width: 100%; height: auto; display: block; }

.chart-line {
  fill: none;
  stroke: var(--deep);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Dashes are the only thing separating measured from predicted.
   Worth keeping obvious. */
.chart-line--fc {
  stroke: #8a3c11;
  stroke-width: 1.8;
  stroke-dasharray: 4 3;
  opacity: 0.85;
}

.chart-thresh { stroke-width: 1; stroke-dasharray: 3 3; }
.chart-thresh--flood { stroke: rgba(194, 90, 30, 0.7); }
.chart-thresh--close { stroke: rgba(176, 48, 48, 0.7); }

.chart-now { stroke: var(--ink-45); stroke-width: 1; }
.chart-dot { fill: var(--deep); }

.chart-tick {
  font-family: "Inter", sans-serif;
  font-size: 9px;
  fill: var(--ink-55);
}

/* ---------- Forecast ---------- */

.forecast {
  padding: 14px 16px;
  margin-top: 16px;
  background: var(--edge-soft);
  border-radius: 14px;
}

.forecast--warn { background: rgba(194, 90, 30, 0.13); }

.forecast-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.forecast--warn .forecast-title { color: #8a3c11; }

.forecast-main { display: flex; align-items: baseline; gap: 10px; }

.forecast-peak {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.forecast-when { font-size: 13px; color: var(--ink-60); }

.forecast-line {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-72);
}

.forecast-source {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--ink-45);
}

/* ---------- Thresholds ---------- */

.thresholds {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--edge-soft);
}

.threshold-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--edge-soft);
}

.threshold-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  flex-shrink: 0;
  border-radius: 999px;
}

.threshold-dot--flood { background: #c25a1e; }
.threshold-dot--close { background: #b03030; }

.threshold-label { margin: 0; font-size: 14px; font-weight: 500; }

.threshold-means {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-55);
}

.threshold-feet {
  margin-left: auto;
  padding-left: 12px;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.why-btn {
  margin-top: 12px;
  padding: 8px 15px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--deep);
  background: none;
  border: 1px solid rgba(43, 108, 163, 0.28);
  border-radius: 999px;
  cursor: pointer;
}

/* ---------- Source evidence ---------- */

.evidence {
  padding: 14px 16px;
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 14px;
}

.evidence-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.evidence-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-72);
}

.evidence-source {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-55);
}

.evidence-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.watch-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-55);
}


/* ============================================
   Condensed history + map instructions
   ============================================ */

/* The percentile banner now opens the expanded card, so it loses
   the top margin it had when it sat mid-card. */
.unusual { margin: 0 0 16px; }

.history-summary {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-72);
}

.history .why-btn { margin-top: 0; }

.history .year-bars { margin-top: 14px; }

/* ---------- Map instructions ---------- */

.how {
  padding: 16px 18px;
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 16px;
}

.how-title {
  margin: 0 0 8px;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.how-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-72);
}

.how-list li { margin-bottom: 4px; }


/* ============================================
   Road-impact forecast
   ============================================ */

.forecast--close { background: rgba(176, 48, 48, 0.13); }

.forecast-dir {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-55);
}

.fc-event {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-85);
}

.fc-event strong { font-weight: 600; }

.fc-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  flex-shrink: 0;
  border-radius: 999px;
}

.fc-dot--ok    { background: #1d9e75; }
.fc-dot--flood { background: #c25a1e; }
.fc-dot--close { background: #b03030; }

/* The thresholds used to be their own section. Folded in here as
   one quiet line, since they only matter as the yardstick the
   forecast is measured against. */
.forecast-levels {
  margin: 12px 0 0;
  padding-top: 10px;
  font-size: 12px;
  color: var(--ink-55);
  border-top: 1px solid var(--edge-soft);
}

.forecast-source a {
  color: var(--deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ============================================
   Near me
   ============================================ */

.nearme {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.nearme .btn-small { margin-top: 0; }

.nearme { align-items: center; }

.nearme-select {
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--deep);
  background: var(--card);
  border: 1px solid rgba(43, 108, 163, 0.28);
  border-radius: 999px;
  cursor: pointer;
}

.nearme-controls[hidden] { display: none; }

.nearme-note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-55);
}

/* Distance sits inside the grey sub-line but reads a shade stronger —
   it's the one part of that line that changes with where you are. */
.road-miles {
  font-weight: 500;
  color: var(--deep);
}


/* ============================================
   Flood record — on the collapsed card
   ============================================ */

.road-record {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-55);
}

/* A road that floods repeatedly is a different proposition from one
   that flooded once in 2023, so it gets said in a different color. */
/* No bolding. Most of these roads flood repeatedly — that's why NWS
   wrote a statement about them — so emphasis on some and not others
   reads as a ranking that isn't there. */
.road-record--often { color: var(--ink-55); }
.road-record--calm  { color: var(--ink-45); }


/* ============================================
   Rain forecast
   ============================================ */

.rain-box {
  padding: 14px 16px;
  margin-top: 16px;
  border-radius: 14px;
  background: var(--edge-soft);
}

/* Dry reads as calm, wet reads as the sky about to add to the river. */
.rain-box--dry { background: rgba(29, 158, 117, 0.1); }
.rain-box--wet { background: var(--edge-soft); }

.rain-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-55);
}

.rain-line {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-85);
}

.rain-burst {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  color: #8a3c11;
}

.rain-chance {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-55);
}

.rain-source {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--ink-45);
}


/* ============================================
   Collapsed card: the numbers up front
   ============================================ */

.road-metrics {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 10px;
}

/* Big enough to read at a glance, small enough that the road name is
   still the first thing you see. */
.road-now {
  font-family: "Sora", sans-serif;
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--riverbed);
}

.road-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-55);
}

.road-trend { font-size: 13px; font-weight: 500; }

/* The threshold sits right of the current level, so the comparison is
   one eye movement rather than a tap. */
.road-limit {
  margin-left: auto;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-55);
  white-space: nowrap;
}

/* ---------- Outlook ---------- */

.road-outlook {
  margin: 7px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 500;
}

.road-outlook--ok   { color: #1d6e56; font-weight: 400; }
.road-outlook--warn { color: #8a3c11; }
.road-outlook--bad  { color: #7d2020; }
.road-outlook--idle { color: var(--ink-45); font-weight: 400; }

/* The record line follows the outlook, so give it a little air. */
.road-outlook + .road-record { margin-top: 5px; }


/* ============================================
   Map controls
   ============================================ */

.map-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.map-input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--riverbed);
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 999px;
  outline: none;
}

.map-input:focus {
  background: var(--white);
  border-color: var(--deep);
  box-shadow: 0 0 0 4px var(--edge-soft);
}

.map-search .btn-small { margin-top: 0; flex-shrink: 0; }

.map-radius {
  padding: 9px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--deep);
  background: var(--card);
  border: 1px solid rgba(43, 108, 163, 0.28);
  border-radius: 999px;
  cursor: pointer;
}

.map-note { display: block; margin: 8px 0 0; }

/* MapLibre chrome, toned down to match the cards. */
.maplibregl-ctrl-group { border-radius: 10px; box-shadow: 0 2px 8px var(--ink-45); }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* "You are here": halo, ring, dark center. */
.me-pin { position: relative; width: 26px; height: 26px; }

.me-halo {
  position: absolute;
  inset: -12px;
  border-radius: 999px;
  background: var(--edge);
  animation: mepulse 2.6s ease-in-out infinite;
}

.me-dot {
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: #12354f;
  border: 3px solid #ffffff;
  box-shadow: 0 1px 4px var(--ink-45);
}

/* The card a map pin sent you to, so it's obvious which one opened. */
.road--open { box-shadow: 0 0 0 3px var(--edge); }


/* ============================================
   Map legend + filters
   ============================================ */

.how-lead {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-72);
}

.legend {
  display: flex;
  gap: 28px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--edge-soft);
}

.legend-head {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 12.5px;
  color: var(--ink-72);
}

/* Shape carries the road/river split, so the legend has to show it —
   red means "closed" on one scale and "high river" on the other. */
.key { width: 11px; height: 11px; flex-shrink: 0; }
.key--road  { border-radius: 999px; }
.key--gauge { transform: rotate(45deg); border-radius: 2px; }

.map-kinds { display: flex; gap: 6px; }
.map-kinds .chip { margin: 0; padding: 7px 14px; font-size: 13px; }

/* Gauge pins are drawn as real diamond polygons in map.js now — the
   canvas renderer ignores CSS classes, so the rotation trick that used
   to live here no longer applies. */


/* ============================================
   River condition pills — NOT road statuses
   ============================================ */

.river-pill {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
}

.river-pill--normal      { color: #1d5a3f; background: rgba(29, 158, 117, 0.15); }
.river-pill--elevated    { color: #7a5510; background: rgba(176, 125, 26, 0.16); }
.river-pill--high        { color: #7d2020; background: rgba(176, 48, 48, 0.16); }
.river-pill--unavailable { color: var(--ink-55); background: var(--ink-45); }


/* ============================================
   Gauge rows + card
   ============================================ */

.gauge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-family: inherit;
  text-align: left;
  background: var(--card-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 14px;
  cursor: pointer;
}

.gauge-row-name { font-size: 13.5px; font-weight: 500; flex: 1; min-width: 0; }

.gauge-row-meta {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-55);
  white-space: nowrap;
}

.gauge-row-meta strong { color: var(--riverbed); font-weight: 600; }

.gauge-card {
  position: relative;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: var(--white);
  border: 1px solid rgba(43, 108, 163, 0.22);
  border-radius: 18px;
}

.gauge-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-45);
  background: none;
  border: none;
  cursor: pointer;
}

.gauge-name {
  margin: 0 0 10px;
  padding-right: 24px;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.gauge-now { display: flex; align-items: center; gap: 10px; }

.gauge-feet {
  font-family: "Sora", sans-serif;
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gauge-meaning {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-72);
}

.gauge-section {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-45);
}

/* The unlinked case is the important one — it has to read as a limit
   on what RiverReady knows, not as reassurance. */
.gauge-unlinked,
.gauge-roads {
  padding: 13px 15px;
  margin-top: 16px;
  border-radius: 12px;
}

.gauge-unlinked { background: var(--ink-45); }
.gauge-roads    { background: var(--edge-soft); }

.gauge-note {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-60);
}

.gauge-road {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  margin-bottom: 5px;
  font-family: inherit;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--edge-soft);
  border-radius: 10px;
  cursor: pointer;
}

.gauge-road-name { flex: 1; font-size: 13.5px; font-weight: 500; }

.gauge-road-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-60);
}

.gauge-facts { margin-top: 16px; }

.gauge-fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--edge-soft);
}

.gauge-fact span:first-child { color: var(--ink-55); }
.gauge-fact span:last-child  { font-weight: 500; font-variant-numeric: tabular-nums; }

.gauge-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dot--clear { background: #1d9e75; }
.dot--avoid { background: #b03030; }


/* ============================================
   Route check
   ============================================ */

.route {
  padding: 16px 18px;
  margin-bottom: 16px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 16px;
}

.route-title {
  margin: 0 0 10px;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.route-fields { display: flex; gap: 8px; margin-bottom: 10px; }
.route-fields .map-input { flex: 1; min-width: 0; }

.route .btn-small { margin-top: 0; }

.route-result:empty { display: none; }
.route-result { margin-top: 14px; }

.route-verdict {
  padding: 13px 15px;
  border-radius: 12px;
}

.route-verdict--ok   { background: rgba(29, 158, 117, 0.12); }
.route-verdict--warn { background: rgba(176, 125, 26, 0.14); }
.route-verdict--bad  { background: rgba(176, 48, 48, 0.13); }
.route-verdict--idle { background: var(--ink-45); }

.route-headline {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.route-verdict--ok   .route-headline { color: #1d5a3f; }
.route-verdict--warn .route-headline { color: #7a5510; }
.route-verdict--bad  .route-headline { color: #7d2020; }

.route-advice {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-72);
}

.route-trip {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--ink-55);
}

.route-section {
  margin: 16px 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.route-road {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 6px;
  font-family: inherit;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--edge-soft);
  border-radius: 11px;
  cursor: pointer;
}

.route-road-name { flex: 1; font-size: 13.5px; font-weight: 500; }

.route-road-where {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-55);
}

.route-road-status { font-size: 12px; font-weight: 600; color: var(--ink-60); }

/* The coverage caveat. Quiet, but never absent — a short answer here
   must not be mistaken for "your whole route is fine". */
.route-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-55);
}

.dot--watch { background: #b07d1a; }


/* ============================================
   Finding a road among hundreds
   ============================================ */

.road-find { margin-bottom: 10px; }
.road-find .map-input { width: 100%; }

.road-count-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.road-count {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-55);
}

.road-more {
  margin: 0;
  padding: 0;
  width: auto;
  font-size: 12.5px;
  white-space: nowrap;
}

.road-more[hidden] { display: none; }


/* ============================================
   Status key
   ============================================ */

.key-box {
  padding: 12px 16px;
  margin-bottom: 12px;
  background: var(--card-soft);
  border: 1px solid var(--edge);
  border-radius: 14px;
}



.key-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 10px;
}

.key-row .pill { flex-shrink: 0; }

.key-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-72);
}

.key-foot {
  margin: 12px 0 0;
  padding-top: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-55);
  border-top: 1px solid var(--edge-soft);
}

/* A soft pulse on the location halo, so the eye finds it among the pins. */
.me-halo { animation: mepulse 2.6s ease-in-out infinite; }

@keyframes mepulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .me-halo { animation: none; }
}


/* ============================================
   Data freshness
   ============================================ */

.data-stamp {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--ink-45);
}

.data-stamp:empty { display: none; }

/* Unable to assess is a caution, not a calm state — it gets the same
   dashed treatment as anything else the app can't vouch for. */
.road--unknown { border-color: var(--ink-45); border-style: dashed; }

.gauge-trend { font-size: 13px; font-weight: 500; }


/* ============================================
   Five tabs
   ============================================ */

/* Five doesn't fit comfortably on a narrow phone, so the bar scrolls
   rather than squashing the labels into initials. */
.tabs {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab { padding: 9px 14px; white-space: nowrap; flex: 1 0 auto; }


/* ============================================
   Routes
   ============================================ */

.route-field { display: flex; gap: 8px; margin-bottom: 8px; }
.route-field .map-input { flex: 1; min-width: 0; }
.route-field .btn-small { margin-top: 0; flex-shrink: 0; }
.route-to { width: 100%; margin-bottom: 10px; }

.route-ends { margin: 0 0 3px; font-size: 13px; line-height: 1.5; }
.route-ends strong { color: var(--ink-55); font-weight: 500; }

.route-dist { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-55); }

/* Printed back so a wrong geocoder match is visible, not silent. */
.route-alt {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-45);
}

.route-trip {
  padding: 12px 14px;
  margin-top: 12px;
  background: var(--card-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 12px;
}

.route-note--bad { color: #7d2020; font-weight: 500; font-size: 13px; }


/* ============================================
   Saved roads
   ============================================ */

.saved-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  margin-bottom: 8px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 14px;
}

.saved-row--watch   { border-color: rgba(176, 125, 26, 0.4); }
.saved-row--avoid   { border-color: rgba(176, 48, 48, 0.55); }
.saved-row--unknown { border-color: var(--ink-45); border-style: dashed; }

.saved-open {
  flex: 1;
  min-width: 0;
  padding: 0;
  font-family: inherit;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.saved-name {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--riverbed);
}

.saved-where {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-55);
}

.saved-line {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-72);
}

.saved-drop {
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-45);
  background: none;
  border: none;
  cursor: pointer;
}

.saved-drop:hover { color: #b03030; }

.empty {
  padding: 26px 20px;
  text-align: center;
  background: var(--card-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 16px;
}

.empty-title {
  margin: 0 0 6px;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.empty-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-60);
}


/* ============================================
   Profile settings
   ============================================ */

.setting {
  padding: 15px 17px;
  margin-bottom: 10px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 14px;
}

.setting-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.setting-label--open {
  margin: 0;
  cursor: pointer;
  list-style: none;
  color: var(--deep);
}

.setting-label--open::-webkit-details-marker { display: none; }
.setting-label--open::after { content: " ＋"; }
.setting[open] .setting-label--open::after { content: " －"; }

.setting-value {
  margin: 0 0 10px;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.setting-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.setting-actions .btn-small { margin-top: 0; }
.setting-actions .chip { margin: 0; }

.setting-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-60);
}

.dot--unknown { background: var(--ink-45); }

.watch-note--bad { color: #7d2020; font-weight: 500; }


/* ============================================
   Place suggestions
   ============================================ */

/* The wrapper has to establish a positioning context or the dropdown
   lands relative to the panel instead of the field. */
.route-field,
.route,
.map-search { position: relative; }

.suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid rgba(43, 108, 163, 0.22);
  border-radius: 14px;
  box-shadow: 0 8px 24px var(--ink-45);
}

.suggest[hidden] { display: none; }

.suggest-item {
  padding: 10px 13px;
  font-size: 13.5px;
  line-height: 1.4;
  border-radius: 9px;
  cursor: pointer;
}

.suggest-item:hover { background: var(--edge-soft); }

/* The To field sits full width, so its list needs to clear the button
   underneath rather than overlap the input above. */
.route-to + .suggest { top: 100%; }

.route-field--single { display: block; margin-bottom: 10px; }
.route-field--single .map-input { width: 100%; }


/* ============================================
   Toast
   ============================================ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  max-width: min(440px, calc(100vw - 32px));
  padding: 13px 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--on-dark);
  background: #12354f;
  border-radius: 14px;
  box-shadow: 0 10px 30px var(--ink-45);
  transform: translate(-50%, 130%);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s;
  pointer-events: none;
}

.toast--on { transform: translate(-50%, 0); opacity: 1; }

.toast--bad { background: #7d2020; }
.toast--ok  { background: #1d5a3f; }

@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity 0.2s; transform: translate(-50%, 0); }
}

.suggest-item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.suggest-name { flex: 1; min-width: 0; }

/* Distance is the reason the right result is at the top, so it's worth
   showing rather than hiding in a tooltip. */
.suggest-far {
  flex-shrink: 0;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-45);
}

/* The picker builds this around each input, so suggestions never depend
   on the surrounding layout being positioned. */
.suggest-shell { position: relative; flex: 1; min-width: 0; display: block; }
.suggest-shell .map-input { width: 100%; }


/* ============================================
   Route map
   ============================================ */

.route-map-wrap[hidden] { display: none; }

.map--route { height: 300px; margin-top: 14px; }

.route-map-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-55);
}

/* A and B, the two ends of the drive. */
.route-end {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: #12354f;
  border: 2.5px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 2px 6px var(--ink-45);
}

.route-detour {
  margin: 10px 0 0;
  padding: 10px 13px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #7a5510;
  background: rgba(176, 125, 26, 0.13);
  border-radius: 11px;
}


/* ============================================
   You tab
   ============================================ */

.you-head { margin-bottom: 18px; }

.you-name {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.you-sub { margin: 3px 0 0; font-size: 13px; color: var(--ink-55); }

.setting-sub {
  margin: 14px 0 7px;
  font-size: 13px;
  color: var(--ink-60);
}

.setting-value--quiet {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
}

/* Says plainly that a setting doesn't do anything yet. */
.setting-warn {
  margin: 0 0 12px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #7a5510;
  background: rgba(176, 125, 26, 0.14);
  border-radius: 10px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 14px;
  cursor: pointer;
}

.toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--deep); }

/* ---------- Saved places ---------- */

.places { margin-top: 10px; }

.places-empty { margin: 0 0 10px; font-size: 13px; color: var(--ink-45); }

.place {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  margin-bottom: 7px;
  background: var(--card-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 12px;
}

.place-icon { font-size: 17px; color: var(--deep); }
.place-text { flex: 1; min-width: 0; }
.place-name { display: block; font-size: 14px; font-weight: 500; }

.place-where {
  display: block;
  font-size: 12px;
  color: var(--ink-55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-drop {
  font-size: 19px;
  line-height: 1;
  color: var(--ink-45);
  background: none;
  border: none;
  cursor: pointer;
}

.place-drop:hover { color: #b03030; }

.place-form { margin-top: 10px; }
.place-form .map-input { width: 100%; margin-bottom: 8px; }
.place-chips { display: flex; gap: 6px; margin-bottom: 9px; }
.place-chips .chip { margin: 0; }

.place-hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #7d2020;
}

/* ---------- Report ---------- */

.report-form { margin-top: 12px; }
.report-form .map-input { width: 100%; }

.report-list { margin: 6px 0; }

.report-match {
  display: block;
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 5px;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 10px;
  cursor: pointer;
}

.report-match span { color: var(--ink-55); }

.loc-form { margin-top: 10px; }
.loc-form[hidden] { display: none; }
.loc-form .map-input { width: 100%; }
#locaccuracy[hidden] { display: none; }


/* ============================================
   Journeys — the first thing on the roads screen
   ============================================ */

.journeys { margin-bottom: 16px; }
.journeys:empty { display: none; }

.journey {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 8px;
  font-family: inherit;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--edge);
  border-left-width: 4px;
  border-radius: 14px;
  cursor: pointer;
}

/* The left edge carries the status, so a glance down the list is enough. */
.journey--clear   { border-left-color: #1d9e75; }
.journey--watch   { border-left-color: #b07d1a; }
.journey--avoid   { border-left-color: #b03030; }
.journey--pending { border-left-color: var(--ink-45); }

.journey-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.journey-name {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--riverbed);
}

.journey-line {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-72);
}

.journey-prompt {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  color: var(--ink-72);
  background: var(--edge-soft);
  border: 1px dashed rgba(43, 108, 163, 0.3);
  border-radius: 14px;
  cursor: pointer;
}

.journey-pick { width: 100%; margin-bottom: 8px; }

/* ---------- Share and hand-off ---------- */

.road-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.road-actions .btn-small { margin-top: 0; }

a.btn-small {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.route-handoff { display: inline-block; margin-top: 14px; }


/* ============================================
   Home
   ============================================ */

.home-head {
  margin: 20px 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.home-head[hidden] { display: none; }

/* The first heading shouldn't push the journeys away from the top. */
.journeys + .home-head { margin-top: 16px; }

.near-list { margin-bottom: 4px; }

.home-empty {
  padding: 22px 20px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: var(--ink-60);
  background: var(--card-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 16px;
}

.home-empty[hidden] { display: none; }
.home-empty .link-quiet { display: inline; margin: 0; padding: 0; width: auto; }

/* A nearby road offers a star to save it; a saved road offers an ×. */
.saved-drop { font-size: 17px; }


/* ============================================
   Journey detail, map detail, route figures
   ============================================ */

.journey-roads {
  margin: -4px 0 10px;
  padding: 4px 0 0;
}

.journey-roads[hidden] { display: none; }

.journey-road {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 5px;
  font-family: inherit;
  text-align: left;
  background: var(--card-soft);
  border: 1px solid var(--edge-soft);
  border-radius: 11px;
  cursor: pointer;
}

.journey-road-name { flex: 1; font-size: 13.5px; font-weight: 500; }

.journey-road-when {
  font-size: 11.5px;
  color: var(--ink-55);
  white-space: nowrap;
}

.journey-road .pill { font-size: 11px; padding: 4px 10px; }

.journey-none {
  margin: 0 0 8px;
  padding: 0 4px;
  font-size: 12.5px;
  color: var(--ink-55);
}

/* ---------- Road detail, on the map ---------- */

.map-detail { display: none; }

.map-detail--on {
  display: block;
  position: relative;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--white);
  border: 1px solid rgba(43, 108, 163, 0.22);
  border-radius: 16px;
}

.map-detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 22px;
}

.map-detail-name {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.map-detail-where {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-55);
}

.map-detail-line {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-85);
}

.map-detail-when {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--ink-55);
}

/* ---------- Saved places on the map ---------- */

.place-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

.place-pin-label {
  order: -1;
  margin-bottom: 3px;
  padding: 3px 8px;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: #ffffff;
  background: #12354f;
  border-radius: 999px;
  box-shadow: 0 1px 4px var(--ink-45);
}

.place-pin-dot {
  width: 9px;
  height: 9px;
  background: #12354f;
  border: 2px solid #ffffff;
  border-radius: 999px;
}

/* ---------- Route figures ---------- */

.route-figures {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

/* The two numbers people came for. Everything else on this card is
   supporting detail. */
.route-figure {
  font-family: "Sora", sans-serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--riverbed);
}

.route-figure--quiet {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-55);
}


/* ============================================
   Switch
   ============================================
   A real switch rather than two buttons: the state is the control, so
   there's nothing to read before you know whether it's on.
   ============================================ */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 4px;
}

.switch-label {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.switch {
  flex-shrink: 0;
  width: 52px;
  height: 30px;
  padding: 3px;
  display: flex;
  justify-content: flex-start;
  background: var(--ink-45);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.switch[aria-checked="true"] { background: var(--deep); }

.switch-handle {
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 1px 3px var(--ink-45);
  /* A spring, so it settles rather than stopping dead. */
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.5, 1);
}

.switch[aria-checked="true"] .switch-handle { transform: translateX(22px); }

.switch:disabled { opacity: 0.55; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .switch, .switch-handle { transition: none; }
}


/* ============================================
   Coverage honesty
   ============================================ */

/* Not a footnote. A user who doesn't know how partial this is will read
   an empty result as an all-clear. */
.coverage {
  margin: 0 0 12px;
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-72);
  background: rgba(176, 125, 26, 0.1);
  border: 1px solid rgba(176, 125, 26, 0.28);
  border-radius: 12px;
}

.coverage strong { font-weight: 600; color: var(--riverbed); }

.key--none {
  border-radius: 999px;
  background: transparent;
  border: 1.6px solid #8aa4b8;
}


/* ============================================
   Unknown — a reading too old to rely on
   ============================================
   Never green, and never quiet. A stale Caution reading as reassurance
   is the most dangerous thing this app could do.
   ============================================ */

.pill--stale,
.pill--unrated {
  color: #7a5510;
  background: rgba(176, 125, 26, 0.18);
}

.road--stale,
.saved-row--stale,
.journey--stale {
  border-color: rgba(176, 125, 26, 0.5);
  border-style: dashed;
}

.journey--stale { border-left-color: #b07d1a; }

.road-outlook--stale {
  color: #7a5510;
  font-weight: 500;
}

.dot--stale { background: #b07d1a; }

/* Destructive actions look destructive. */
.btn-small--danger {
  color: #ffffff;
  background: #b03030;
}

.btn-small--danger:hover { background: #8f2626; }

.place-icon svg { width: 18px; height: 18px; display: block; color: var(--deep); }

/* Shown only when using the app without an account. */
.guest-only { display: none; }
body.is-guest .guest-only { display: block; }

/* Account-specific controls have nothing to act on as a guest. */
body.is-guest #deleteaccount,
body.is-guest #signout { display: none; }


/* ============================================
   Account wall
   ============================================
   Shown when a guest reaches something that needs an account. It says
   what the feature does before it asks for anything, because a blank
   "sign up" is just a locked door.
   ============================================ */

.wall {
  padding: 18px 20px;
  margin-top: 10px;
  background: var(--card-soft);
  border: 1px dashed var(--edge);
  border-radius: 16px;
}

.wall-title {
  margin: 0 0 6px;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.wall-text {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-72);
}

.wall-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-55);
}

.wall .btn-small { margin-top: 0; }

/* Shown only when using the app without an account. */
.guest-only { display: none; }
body.is-guest .guest-only { display: block; }

body.is-guest #deleteaccount,
body.is-guest #signout { display: none; }


/* ============================================
   First run tour

   A small box that points at one thing at a time. The veil dims what is
   behind it without hiding it, so the thing being described stays
   visible while it is described.
   ============================================ */

.tour {
  position: fixed;
  inset: 0;
  z-index: 9000;
}

.tour[hidden] { display: none; }

.tour-veil {
  position: absolute;
  inset: 0;
  background: rgba(18, 53, 79, 0.42);
}

.tour-box {
  position: absolute;
  width: min(320px, calc(100vw - 32px));
  padding: 16px 18px 14px;
  background: var(--card-solid);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(18, 53, 79, 0.3);
}

/* The last card points at nothing, so it sits in the middle. */
.tour-box--middle {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, calc(100vw - 40px));
}

.tour-eyebrow {
  font-family: "Sora", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep);
  margin: 0 0 5px;
}

.tour-eyebrow[hidden] { display: none; }

.tour-title {
  font-family: "Sora", sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}

.tour-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-72);
  margin: 0;
}

.tour-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.tour-dots { display: flex; gap: 6px; flex: 1; }

.tour-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--edge);
}

.tour-dot--on { background: var(--deep); }

.tour-foot .btn-small { width: auto; padding-inline: 20px; }

/* The thing being talked about, lifted above the veil. */
.tour-lit {
  position: relative;
  z-index: 9001;
  border-radius: 10px;
  box-shadow: 0 0 0 3px var(--deep), 0 0 0 9px rgba(43, 108, 163, 0.22);
}
