/* Resident page: /:slug and /embed/:slug. Builds on site.css tokens. */
.tr { display: block; }
.tr-top { padding-top: 20px; }
.tr-name { margin-bottom: 0.1em; }
.tr-where { margin: 0 0 14px; }
.tr-pad { padding: 12px 16px 0; max-width: 760px; margin: 0 auto; width: 100%; }

.tr-status { margin: 0 0 6px; padding: 16px 18px; border-width: 2px; }
.tr-status-title { margin: 0; font-size: 1.4rem; font-weight: 800; line-height: 1.3; color: var(--navy); }
.tr-status-detail { margin: 6px 0 0; font-size: 1.1rem; }
.tr-updated { margin: 0 0 14px; }
.tr-map-error { margin-top: 8px; }

.tr-map-wrap { position: relative; width: 100%; }
.tr-map-wrap .tr-map { display: block; }
.tr-map { width: 100%; height: 52vh; min-height: 300px; max-height: 640px; background: #e8e6df; }
.tr-map-controls { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px; background: var(--snow); border-bottom: 1px solid var(--line); }
.tr-map-btn {
  font: inherit; font-weight: 700; font-size: 1rem; min-height: 48px; padding: 8px 16px;
  color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 999px;
  cursor: pointer;
}
.tr-map-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.tr-map-btn.is-on, .tr-map-btn[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* Two or more trucks: the legend under the map, and the name tag on each truck */
.tr-legend { padding: 10px 16px 12px; background: var(--snow); border-bottom: 1px solid var(--line); }
.tr-legend[hidden] { display: none; }
.tr-legend-hint { margin: 0 0 8px; color: var(--ink); }
.tr-legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.tr-legend-list li { margin: 0; }
.tr-legend-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px;
  font: inherit; text-align: left; color: var(--ink); background: #fff;
  border: 2px solid var(--navy); border-radius: var(--radius); cursor: pointer;
}
.tr-legend-btn:disabled { opacity: 0.8; cursor: default; }
.tr-legend-btn.is-on, .tr-legend-btn[aria-pressed="true"] { background: var(--navy); color: #fff; }
.tr-legend-swatch {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--unit-color, #c8102e);
  border: 2px solid #fff; box-shadow: 0 0 0 2px var(--navy);
}
.tr-legend-btn.is-on .tr-legend-swatch { box-shadow: 0 0 0 2px #fff; }
.tr-legend-text { display: grid; gap: 1px; min-width: 0; }
.tr-legend-name { font-weight: 800; font-size: 1.1rem; line-height: 1.25; overflow-wrap: anywhere; }
.tr-legend-state { font-size: 1rem; line-height: 1.3; }
.tr-legend-compact { padding: 8px 12px 10px; }
.tr-legend-compact .tr-legend-list { gap: 6px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.tr-legend-compact .tr-legend-btn { min-height: 48px; padding: 6px 10px; gap: 8px; }
.tr-legend-compact .tr-legend-name { font-size: 1rem; }
.tr-legend-compact .tr-legend-state { font-size: 0.9rem; }
.truck-tag {
  --tag-color: #c8102e; padding: 1px 8px; font: 700 12px/1.35 system-ui, sans-serif; white-space: nowrap; pointer-events: none;
  color: #1d1d1f; background: #fff; border: 3px solid var(--tag-color); border-radius: 999px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.tr-below { padding-top: 20px; padding-bottom: 32px; display: grid; gap: 20px; }
.tr-h { margin: 0 0 0.4em; font-size: 1.4rem; }
.tr-label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.tr-combo { position: relative; }
.tr-suggest {
  list-style: none; margin: 4px 0 0; padding: 0; position: absolute; left: 0; right: 0; z-index: 5;
  background: #fff; border: 2px solid var(--navy); border-radius: var(--radius);
  max-height: 260px; overflow-y: auto; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.tr-suggest li { margin: 0; padding: 14px 16px; min-height: 52px; font-size: 1.1rem; cursor: pointer; border-bottom: 1px solid var(--line); }
.tr-suggest li:last-child { border-bottom: 0; }
.tr-suggest li:hover, .tr-suggest li[aria-selected="true"] { background: var(--info-bg); }
.tr-privacy { margin: 8px 0 0; }
.tr-answer { min-height: 1px; margin-top: 12px; }
.tr-answer-street { margin: 0; }
.tr-answer-head { margin: 0 0 4px; font-size: 1.5rem; font-weight: 800; line-height: 1.25; color: var(--navy); }
.tr-answer-now, .tr-answer-minutes { color: var(--pine); }
.tr-answer-not_on_route, .tr-answer-off, .tr-answer-no_route { color: var(--red-dark); }

.tr-message-text { margin: 0; white-space: pre-wrap; font-size: 1.15rem; }

.tr-section { display: block; }
.tr-nights { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tr-night { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 0; }
.tr-night-off { opacity: 0.8; }
.tr-night-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tr-night-title { font-weight: 700; }
.tr-badge { font-size: 0.9rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--info-bg); color: var(--navy); }
.tr-badge-on-the-road-now { background: var(--pine); color: #fff; }
.tr-badge-tonight, .tr-badge-today { background: var(--gold); color: var(--navy); }
.tr-badge-postponed { background: var(--warn-bg); color: #5c4200; border: 1px solid #c99a2e; }
.tr-badge-cancelled { background: var(--danger-bg); color: var(--red-dark); border: 1px solid #e7a3ac; }

.tr-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tr-qr { flex-basis: 100%; margin: 4px 0 0; }

.tr-message { padding-top: 32px; padding-bottom: 32px; }

/* Embed */
.embed-body { background: var(--snow); }
.tr-embed .tr-embed-name { margin: 0 0 8px; font-weight: 800; color: var(--navy); font-size: 1.15rem; }
.tr-embed .tr-status-title { font-size: 1.2rem; }
.tr-embed .tr-status-detail { font-size: 1rem; }
.tr-embed .tr-map { height: 44vh; min-height: 240px; }
.tr-embed .tr-find { margin-top: 16px; }
.tr-embed-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-bottom: 16px; padding-top: 16px; }
.tr-embed-foot p { margin: 0; }

@media (min-width: 760px) {
  .tr-map { height: 56vh; }
}

/* A department that hasn't set up a tracker yet */
.tr-listed .tr-top { padding-bottom: 8px; }
.tr-listed-badge {
  display: inline-block; margin: 0 0 14px; padding: 4px 14px; border-radius: 999px; font-weight: 800; font-size: 0.95rem;
  background: var(--warn-bg); color: #5c4200; border: 1px solid #c99a2e;
}
.tr-listed-card { display: grid; gap: 12px; border-width: 2px; }
.tr-listed-card p { margin: 0; }
.tr-listed-line { font-size: 1.3rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.tr-listed-site a { font-weight: 700; }
.tr-listed-actions { display: grid; gap: 10px; }
.tr-listed-actions .btn { min-height: 56px; width: 100%; font-size: 1.1rem; }
.tr-listed-mail { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }
.tr-listed-note { margin: 14px 0 0; }
.tr-listed .tr-pad { padding-bottom: 16px; }
@media (min-width: 560px) {
  .tr-listed-actions { grid-template-columns: 1fr 1fr; }
  .tr-listed-mail { grid-column: 1 / -1; }
}
.tr-answer-paused { color: var(--ink); }

/* Santa heads-up: the "Alert me" controls, the sticky your-street bar and the full-screen card */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/fraunces-700-latin.woff2) format("woff2");
}
.tr-hu { margin-top: 12px; }
.tr-hu:empty { display: none; }
.tr-hu-bell { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; text-align: left; }
.tr-hu-bell svg { flex: 0 0 auto; }
.tr-hu-on { margin: 0 0 4px; font-size: 1.05rem; color: var(--navy); }
.tr-hu-links { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.tr-hu-link {
  font: inherit; font-weight: 700; min-height: 44px; padding: 8px 0; color: var(--navy);
  background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.tr-hu-later { margin: 0; }

.tr-map-wrap { scroll-margin-top: 76px; }
.tr-bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; color: #fff; background: var(--navy); border-bottom: 3px solid var(--gold);
}
.tr-bar[hidden] { display: none; }
.tr-bar-main { flex: 1 1 auto; min-width: 0; display: grid; }
.tr-bar-street {
  justify-self: start; max-width: 100%; font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.3; min-height: 28px; padding: 0;
  color: var(--gold); background: none; border: 0; text-align: left; text-decoration: underline; text-underline-offset: 3px;
  overflow-wrap: anywhere; cursor: pointer;
}
.tr-bar-text { font-size: 0.95rem; line-height: 1.3; overflow-wrap: anywhere; }
.tr-bar-bell {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0;
  color: #fff; background: transparent; border: 2px solid #fff; border-radius: 50%; cursor: pointer;
}
.tr-bar-bell[hidden], .tr-bar-share[hidden] { display: none; }
.tr-bar-bell.is-on { color: var(--navy); background: var(--gold); border-color: var(--gold); }
.tr-bar-share {
  flex: 0 0 auto; font: inherit; font-weight: 700; font-size: 0.95rem; min-height: 44px; padding: 6px 14px;
  color: var(--navy); background: var(--gold); border: 0; border-radius: 999px; cursor: pointer;
}
.tr-bar-compact { padding: 4px 10px; gap: 6px; }
.tr-bar-compact .tr-bar-street { font-size: 0.95rem; }
.tr-bar-compact .tr-bar-text { font-size: 0.9rem; }

html.hu-open { overflow: hidden; }
.hu-card {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; overflow-y: auto;
  padding: 24px 16px; color: #fff; background: #0f1b2d; text-align: center;
}
.hu-card[hidden] { display: none; }
.hu-inner { position: relative; z-index: 1; width: 100%; max-width: 560px; margin: auto; }
.hu-icon { display: inline-flex; margin-bottom: 8px; color: #f2b043; }
.hu-heading {
  margin: 0 0 12px; font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 700; letter-spacing: -0.01em;
  font-size: clamp(2rem, 9vw, 3.25rem); line-height: 1.12; color: #f2b043; overflow-wrap: anywhere;
}
.hu-heading:focus { outline: none; }
.hu-heading:focus-visible { outline: 3px solid #f2b043; outline-offset: 4px; box-shadow: none; }
.hu-body { margin: 0 0 28px; font-size: clamp(1.2rem, 5.5vw, 1.6rem); line-height: 1.4; }
.hu-actions { display: grid; gap: 12px; }
.hu-btn { min-height: 56px; font-size: 1.15rem; width: 100%; }
.hu-btn-gold { color: #0f1b2d; background: #f2b043; border: 3px solid #f2b043; }
.hu-btn-line { color: #fff; background: transparent; border: 3px solid #fff; }
.hu-card :focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #0f1b2d; }
@media (min-width: 480px) { .hu-actions { grid-template-columns: 1fr 1fr; } }

/* Snow behind the words. Gentle, slow, no flashing. Off for reduced motion and for Less motion. */
.hu-snow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hu-flake {
  position: absolute; top: -12px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  background: #fff; opacity: 0.7; animation: hu-fall var(--d) linear var(--dl) infinite;
}
@keyframes hu-fall {
  from { transform: translate3d(0, -10px, 0); }
  to { transform: translate3d(24px, 105vh, 0); }
}
@media (prefers-reduced-motion: reduce) { .hu-snow { display: none; } }
html.a11y-motion .hu-snow { display: none; }

/* Listed page (v-bold-1) */
.tr-listed .tr-hero { display: grid; gap: 20px; align-items: center; padding: 8px 0 20px; }
.tr-listed .tr-hero-name { margin: 0 0 6px; font-weight: 700; }
.tr-listed .tr-hero .tr-name { font-family: Fraunces, Georgia, serif; font-size: clamp(1.7rem, 6vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; overflow-wrap: anywhere; }
.tr-listed .tr-hero-line { font-size: 1.1rem; margin: 0 0 14px; max-width: 34em; }
.tr-listed .tr-listed-badge { font-size: 0.8rem; padding: 2px 10px; margin: 0; }
.tr-sample { margin: 0; justify-self: center; width: 150px; }
.tr-sample-svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 18px rgba(15, 27, 45, 0.25)); }
.tr-doors { display: grid; gap: 16px; }
.tr-door { display: grid; gap: 12px; align-content: start; }
.tr-door h2 { margin: 0; font-size: 1.3rem; overflow-wrap: anywhere; }
.tr-door p { margin: 0; }
.tr-door .tr-listed-actions { grid-template-columns: 1fr; }
.tr-facts { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.tr-listed .tr-listed-site { margin: 16px 0 0; }
.tr-listed-demand { margin: 0; }
.tr-listed-demand[hidden] { display: none; }
@media (min-width: 760px) {
  .tr-listed .tr-hero { grid-template-columns: 1fr 220px; gap: 40px; }
  .tr-sample { width: 220px; }
  .tr-doors { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 559px) {
  .tr-listed .tr-listed-actions { grid-template-columns: 1fr; }
}

/* Countdown (v-bold-3) */
.tr-cd { margin: 0 0 12px; padding: 18px 18px 16px; border-radius: 14px; background: #0f1b2d; color: #fbf3e6; text-align: center; border: 2px solid #f2b043; }
.tr-cd[hidden] { display: none; }
.tr-cd-lead { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fbf3e6; }
.tr-cd-num { margin: 6px 0 8px; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: clamp(1.7rem, 8vw, 2.5rem); line-height: 1.15; color: #f2b043; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tr-cd-when { margin: 0; font-size: 1.1rem; font-weight: 600; }
.tr-cd-area { margin: 4px 0 0; color: #fbf3e6; }
.tr-cd-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; justify-content: center; align-items: center; margin-top: 14px; }
.tr-cd-btn { min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid #f2b043; background: #f2b043; color: #0f1b2d; font: inherit; font-weight: 800; cursor: pointer; }
.tr-cd-btn:hover { background: #fbf3e6; border-color: #fbf3e6; }
.tr-cd-link { color: #f2b043; font-weight: 700; text-decoration: underline; padding: 10px 4px; }
.tr-cd :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tr-cd-compact { padding: 14px 14px 12px; }
.tr-cd-compact .tr-cd-num { font-size: clamp(1.4rem, 7vw, 2rem); }
.tr-cd-compact .tr-cd-when { font-size: 1rem; }

/* Festive map (v-bold-6) */
.truck-marker.is-festive { width: 30px; height: 53px; position: absolute; overflow: visible; }
.truck-marker.is-festive svg { position: relative; z-index: 1; overflow: visible; }
.truck-halo {
  position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%;
  pointer-events: none; z-index: 0; transition: opacity 0.3s;
  background: radial-gradient(circle, rgba(255, 244, 205, 0.95) 0%, rgba(255, 224, 140, 0.7) 28%, rgba(242, 176, 67, 0.32) 55%, rgba(242, 176, 67, 0) 72%);
  animation: truck-glow 3.6s ease-in-out infinite;
}
.truck-marker .tw { animation: truck-twinkle 2.8s ease-in-out infinite; }
.truck-marker .tw1 { animation-delay: -0.7s; }
.truck-marker .tw2 { animation-delay: -1.4s; }
.truck-marker .tw3 { animation-delay: -2.1s; }
@keyframes truck-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes truck-glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) {
  .truck-halo, .truck-marker .tw { animation: none; }
}
html.a11y-motion .truck-halo, html.a11y-motion .truck-marker .tw { animation: none; }

/* Tonight's streets (v-bold-10) */
.tr-streets[hidden] { display: none; }
.tr-sl-sum { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.tr-sl-sum::-webkit-details-marker { display: none; }
.tr-sl-sum::after { content: "+"; flex: 0 0 auto; font-weight: 800; font-size: 1.4rem; line-height: 1; color: var(--navy); }
.tr-streets[open] > .tr-sl-sum::after { content: "\2212"; }
.tr-sl-h { margin: 0; }
.tr-sl-body { display: grid; gap: 20px; margin-top: 12px; }
.tr-sl-block { display: grid; gap: 8px; min-width: 0; }
.tr-sl-truck { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.tr-sl-truck-name { min-width: 0; overflow-wrap: anywhere; }
.tr-sl-dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: var(--unit-color, #c8102e); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--navy); }
.tr-sl-note { margin: 0; }
.tr-sl-note[hidden] { display: none; }
.tr-sl-summary { margin: 0; font-weight: 800; font-size: 1.2rem; color: var(--navy); overflow-wrap: anywhere; }
.tr-sl-bar { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tr-sl-bar[hidden] { display: none; }
.tr-sl-fill { display: block; height: 100%; width: 0; background: var(--pine); border-radius: 999px; transition: width 0.6s ease; }
.tr-sl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tr-sl-row { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 2px 10px; border-radius: 10px; border: 2px solid transparent; }
.tr-sl-row[hidden] { display: none; }
.tr-sl-row[data-state="next"] { background: #fff4d9; border-color: var(--gold); }
.tr-sl-name { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 6px 0; font: inherit; font-weight: 600; text-align: left; color: var(--navy); background: none; border: 0; cursor: pointer; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.tr-sl-name:hover { text-decoration-color: currentColor; }
.tr-sl-row[data-state="done"] .tr-sl-name { font-weight: 400; color: #4a5568; }
.tr-sl-mark { flex: 0 0 auto; font-weight: 800; color: var(--pine); }
.tr-sl-row[data-state="next"] .tr-sl-mark { padding: 2px 10px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 0.9rem; }
.tr-sl-toggle { justify-self: start; max-width: 100%; }
.tr-sl-toggle[hidden] { display: none; }
html.a11y-motion .tr-sl-fill { transition: none; }
@media (prefers-reduced-motion: reduce) { .tr-sl-fill { transition: none; } }

/* Wave at Santa (v-bold-8) */
.tr-wave { margin: 0 0 12px; display: grid; gap: 8px; justify-items: start; }
.tr-wave[hidden], .tr-wave [hidden] { display: none; }
.tr-wave-row { display: block; max-width: 100%; }
.tr-wave-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; max-width: 100%; padding: 10px 24px; border-radius: 999px;
  border: 3px solid #f2b043; background: #f2b043; color: #0f1b2d;
  font: inherit; font-size: 1.2rem; font-weight: 800; line-height: 1.2; cursor: pointer; text-align: center;
}
.tr-wave-btn:hover { background: #fbf3e6; border-color: #fbf3e6; }
.tr-wave-btn:focus-visible { outline: 3px solid #0f1b2d; outline-offset: 3px; box-shadow: 0 0 0 6px #f2b043; }
.tr-wave-btn.tr-wave-rest { background: #fbf3e6; border-color: #dcd8cf; color: #55555c; cursor: default; }
.tr-wave-hand { display: inline-block; font-size: 1.7rem; line-height: 1; transform-origin: 70% 80%; }
.tr-wave-label { overflow-wrap: anywhere; }
.tr-wave-plus {
  position: absolute; right: 18px; top: 2px; font-weight: 800; font-size: 1.1rem; color: #9a1028;
  opacity: 0; pointer-events: none;
}
.tr-wave-go .tr-wave-plus { opacity: 1; }
.tr-wave-line, .tr-watching { margin: 0; font-weight: 700; color: #0f1b2d; }
.tr-watching { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #e9eef5; border: 1px solid #c9d3e0; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.a11y-motion) .tr-wave-go .tr-wave-hand { animation: tr-wave-hand 0.9s ease-in-out 1; }
  html:not(.a11y-motion) .tr-wave-go .tr-wave-plus { animation: tr-wave-plus 1.2s ease-out 1 forwards; }
}
@keyframes tr-wave-hand {
  0% { transform: rotate(0); } 20% { transform: rotate(18deg); } 40% { transform: rotate(-14deg); }
  60% { transform: rotate(16deg); } 80% { transform: rotate(-8deg); } 100% { transform: rotate(0); }
}
@keyframes tr-wave-plus { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-22px); } }
.tr-wave-compact { margin: 0 0 8px; gap: 6px; }
.tr-wave-compact .tr-wave-btn { min-height: 48px; padding: 8px 18px; font-size: 1.05rem; }
@media (max-width: 380px) {
  .tr-wave-btn { padding: 10px 16px; font-size: 1.1rem; }
  .tr-wave-plus { right: 10px; }
}

/* Truck messages (v-bold-15) */
.tr-tmsg-live { margin: 0; }
.tr-tmsg { display: flex; align-items: center; gap: 10px; margin: 10px 0; padding: 10px 14px; border-radius: var(--radius, 12px); background: #fff7e0; border: 2px solid var(--gold, #f2b043); color: #0f1b2d; }
.tr-tmsg[hidden] { display: none; }
.tr-tmsg-icon { flex: none; font-size: 1.6rem; line-height: 1; }
.tr-tmsg-body { display: grid; min-width: 0; }
.tr-tmsg-text { font-weight: 700; overflow-wrap: anywhere; }
.tr-tmsg-ago { color: #4a5568; }
.tr-embed .tr-tmsg { margin-top: 8px; padding: 8px 12px; }

/* Night mode (v-bold-14) */
/* The switch: Night mode  Auto / On / Off. Same in day and night. */
.tr-nm { margin: 0; padding: 12px 16px 10px; display: grid; gap: 8px; justify-items: start; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tr-nm-legend { padding: 0 6px; font-size: 1rem; font-weight: 700; }
.tr-nm-opts { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.tr-nm-opt { position: relative; display: inline-flex; }
.tr-nm-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tr-nm-text {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 76px; min-height: 48px; padding: 8px 18px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 999px;
}
.tr-nm-input:checked + .tr-nm-text { color: #fff; background: var(--navy); }
.tr-nm-input:checked + .tr-nm-text::before { content: "\2713"; }
.tr-nm-input:focus-visible + .tr-nm-text { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 5px var(--navy); }
.tr-nm-status { margin: 0; color: var(--muted); }
.tr-embed .tr-nm { margin-top: 4px; }

/* Night colours. Everything below only applies with data-theme="night" on <html> and the toolbar's high contrast off. */
html[data-theme="night"]:not(.a11y-contrast) {
  color-scheme: dark;
  --snow: #0b1422; --card: #0f1b2d; --ink: #fbf3e6; --muted: #b9c3d4; --line: #2c3d58;
  --info-bg: #16263d; --warn-bg: #2b2410; --danger-bg: #34171e; --ok-bg: #12291f; --pine: #58c795;
  --night-cream: #fbf3e6; --night-raise: #14233a; --night-edge: #8fa0bb; --night-red: #ff9aa8;
}
html[data-theme="night"]:not(.a11y-contrast) body { background: var(--snow); color: var(--ink); }
html[data-theme="night"]:not(.a11y-contrast) h1, html[data-theme="night"]:not(.a11y-contrast) h2, html[data-theme="night"]:not(.a11y-contrast) h3, html[data-theme="night"]:not(.a11y-contrast) .tr-label, html[data-theme="night"]:not(.a11y-contrast) legend, html[data-theme="night"]:not(.a11y-contrast) .field > label, html[data-theme="night"]:not(.a11y-contrast) .tr-status-title, html[data-theme="night"]:not(.a11y-contrast) .tr-answer-head, html[data-theme="night"]:not(.a11y-contrast) .tr-sl-summary,
html[data-theme="night"]:not(.a11y-contrast) .tr-sl-name, html[data-theme="night"]:not(.a11y-contrast) .tr-sl-sum::after, html[data-theme="night"]:not(.a11y-contrast) .tr-hu-on, html[data-theme="night"]:not(.a11y-contrast) .tr-hu-link, html[data-theme="night"]:not(.a11y-contrast) .tr-embed-name, html[data-theme="night"]:not(.a11y-contrast) .tr-listed-line, html[data-theme="night"]:not(.a11y-contrast) .card-link strong,
html[data-theme="night"]:not(.a11y-contrast) .tr-wave-line, html[data-theme="night"]:not(.a11y-contrast) .tr-watching, html[data-theme="night"]:not(.a11y-contrast) .tr-nm-legend, html[data-theme="night"]:not(.a11y-contrast) .pv-status, html[data-theme="night"]:not(.a11y-contrast) .pv-change summary { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) main a:not(.btn) { color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) main a:not(.btn):hover { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .req, html[data-theme="night"]:not(.a11y-contrast) .form-error, html[data-theme="night"]:not(.a11y-contrast) .slug-status.bad, html[data-theme="night"]:not(.a11y-contrast) .tr-answer-not_on_route, html[data-theme="night"]:not(.a11y-contrast) .tr-answer-off, html[data-theme="night"]:not(.a11y-contrast) .tr-answer-no_route { color: var(--night-red); }
html[data-theme="night"]:not(.a11y-contrast) .tr-answer-paused { color: var(--ink); }
html[data-theme="night"]:not(.a11y-contrast) .tr-answer-now, html[data-theme="night"]:not(.a11y-contrast) .tr-answer-minutes, html[data-theme="night"]:not(.a11y-contrast) .slug-status.ok { color: var(--pine); }

/* Status banner and notes */
html[data-theme="night"]:not(.a11y-contrast) .banner { border-color: var(--line); }
html[data-theme="night"]:not(.a11y-contrast) .banner-warn { border-color: #8a6a22; }
html[data-theme="night"]:not(.a11y-contrast) .banner-error { border-color: #7d3340; }
html[data-theme="night"]:not(.a11y-contrast) .banner-ok { border-color: #2f6b52; }
html[data-theme="night"]:not(.a11y-contrast) .draft-banner { border-color: #8a6a22; }

/* Buttons and inputs */
html[data-theme="night"]:not(.a11y-contrast) .btn-ghost { color: var(--night-cream); border-color: var(--night-cream); background: transparent; }
html[data-theme="night"]:not(.a11y-contrast) .btn-ghost:hover { color: var(--navy); background: var(--night-cream); border-color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) input[type="text"], html[data-theme="night"]:not(.a11y-contrast) input[type="email"], html[data-theme="night"]:not(.a11y-contrast) input[type="tel"], html[data-theme="night"]:not(.a11y-contrast) input[type="url"], html[data-theme="night"]:not(.a11y-contrast) input[type="search"], html[data-theme="night"]:not(.a11y-contrast) input[type="number"],
html[data-theme="night"]:not(.a11y-contrast) input[type="password"], html[data-theme="night"]:not(.a11y-contrast) input[type="date"], html[data-theme="night"]:not(.a11y-contrast) input[type="time"], html[data-theme="night"]:not(.a11y-contrast) select, html[data-theme="night"]:not(.a11y-contrast) textarea { color: var(--night-cream); background: var(--night-raise); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) input::placeholder, html[data-theme="night"]:not(.a11y-contrast) textarea::placeholder { color: #a3afc3; opacity: 1; }
html[data-theme="night"]:not(.a11y-contrast) input:focus-visible, html[data-theme="night"]:not(.a11y-contrast) select:focus-visible, html[data-theme="night"]:not(.a11y-contrast) textarea:focus-visible { border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .check label { color: var(--ink); }
html[data-theme="night"]:not(.a11y-contrast) .tr-map-btn, html[data-theme="night"]:not(.a11y-contrast) .tr-legend-btn { color: var(--night-cream); background: var(--night-raise); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .tr-map-btn.is-on, html[data-theme="night"]:not(.a11y-contrast) .tr-map-btn[aria-pressed="true"], html[data-theme="night"]:not(.a11y-contrast) .tr-legend-btn.is-on, html[data-theme="night"]:not(.a11y-contrast) .tr-legend-btn[aria-pressed="true"] { color: var(--navy); background: var(--gold); border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-legend-btn.is-on .tr-legend-swatch { box-shadow: 0 0 0 2px var(--navy); }
html[data-theme="night"]:not(.a11y-contrast) .tr-legend-swatch, html[data-theme="night"]:not(.a11y-contrast) .tr-sl-dot { box-shadow: 0 0 0 2px var(--night-cream); }

/* Find my street */
html[data-theme="night"]:not(.a11y-contrast) .tr-suggest { background: var(--night-raise); border-color: var(--night-edge); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); }
html[data-theme="night"]:not(.a11y-contrast) .tr-suggest li:hover, html[data-theme="night"]:not(.a11y-contrast) .tr-suggest li[aria-selected="true"] { background: #1f3350; }

/* Nights, badges, tonight's streets */
html[data-theme="night"]:not(.a11y-contrast) .tr-badge { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-badge-on-the-road-now { background: var(--pine); color: #06210f; }
html[data-theme="night"]:not(.a11y-contrast) .tr-badge-tonight, html[data-theme="night"]:not(.a11y-contrast) .tr-badge-today { background: var(--gold); color: var(--navy); }
html[data-theme="night"]:not(.a11y-contrast) .tr-badge-postponed, html[data-theme="night"]:not(.a11y-contrast) .tr-listed-badge { background: var(--warn-bg); color: #f6d68a; border-color: #8a6a22; }
html[data-theme="night"]:not(.a11y-contrast) .tr-badge-cancelled { background: var(--danger-bg); color: var(--night-red); border-color: #7d3340; }
html[data-theme="night"]:not(.a11y-contrast) .tr-sl-row[data-state="next"] { background: #2b2410; border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-sl-row[data-state="done"] .tr-sl-name { color: #aab4c6; }
html[data-theme="night"]:not(.a11y-contrast) .tr-sl-row[data-state="next"] .tr-sl-mark { background: var(--gold); color: var(--navy); }

/* Wave */
html[data-theme="night"]:not(.a11y-contrast) .tr-wave-btn.tr-wave-rest { background: var(--night-raise); border-color: var(--line); color: #b9c3d4; }
html[data-theme="night"]:not(.a11y-contrast) .tr-watching { background: var(--info-bg); border-color: var(--line); }
html[data-theme="night"]:not(.a11y-contrast) .tr-wave-btn:focus-visible { outline-color: var(--night-cream); box-shadow: 0 0 0 6px var(--gold); }

/* Map: only the tiles dim. Markers, labels on markers and the name tags keep their colours. */
html[data-theme="night"]:not(.a11y-contrast) .tr-map, html[data-theme="night"]:not(.a11y-contrast) .map { background: #1a2536; }
html[data-theme="night"]:not(.a11y-contrast) .maplibregl-canvas { filter: brightness(0.82); }
html[data-theme="night"]:not(.a11y-contrast) .truck-tag { background: #f3ead9; }
html[data-theme="night"]:not(.a11y-contrast) .maplibregl-ctrl-group { background: var(--night-raise); }
html[data-theme="night"]:not(.a11y-contrast) .maplibregl-ctrl-group button + button { border-top-color: var(--line); }
html[data-theme="night"]:not(.a11y-contrast) .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(0.95); }
html[data-theme="night"]:not(.a11y-contrast) .maplibregl-ctrl-attrib { background: rgba(11, 20, 34, 0.78); color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .maplibregl-ctrl-attrib a { color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .maplibregl-ctrl-attrib-button { filter: invert(1); }

/* Toasts, cookie banner and settings, the header and footer on this page */
html[data-theme="night"]:not(.a11y-contrast) .toast { border: 1px solid var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .toast-error { border-color: var(--night-red); }
html[data-theme="night"]:not(.a11y-contrast) .consent-btn { color: var(--night-cream); background: transparent; border-color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .consent-btn:hover { color: var(--navy); background: var(--gold); border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .consent-dialog { color: var(--ink); background: var(--card); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7); }
html[data-theme="night"]:not(.a11y-contrast) .consent-dialog .consent-btn { color: var(--night-cream); background: var(--night-raise); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .consent-dialog .consent-btn:hover { color: var(--navy); background: var(--gold); border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .consent-dialog .consent-btn:focus-visible { outline-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .consent-row, html[data-theme="night"]:not(.a11y-contrast) .consent-dialog .consent-actions { border-color: var(--line); }
html[data-theme="night"]:not(.a11y-contrast) .consent-help { color: var(--muted); }
html[data-theme="night"]:not(.a11y-contrast) .consent-notice { color: var(--ink); background: var(--warn-bg); border-color: #8a6a22; }
html[data-theme="night"]:not(.a11y-contrast) .site-header, html[data-theme="night"]:not(.a11y-contrast) .site-footer, html[data-theme="night"]:not(.a11y-contrast) .tr-bar { background: #0b1422; }
html[data-theme="night"]:not(.a11y-contrast) .site-header { border-bottom-color: var(--red-dark); }
html[data-theme="night"]:not(.a11y-contrast) .site-footer { border-top-color: var(--red-dark); color: #d9deea; }
html[data-theme="night"]:not(.a11y-contrast) .site-header.has-menu.is-open .site-menu, html[data-theme="night"]:not(.a11y-contrast) .menu-toggle { background: #0b1422; }
html[data-theme="night"]:not(.a11y-contrast) .demo-bar, html[data-theme="night"]:not(.a11y-contrast) .pv-label { background: #0b1422; }

/* The /preview page */
html[data-theme="night"]:not(.a11y-contrast) .pv-problem, html[data-theme="night"]:not(.a11y-contrast) .pv-choose { background: var(--card); }
html[data-theme="night"]:not(.a11y-contrast) .pv-chooser-btn { color: var(--night-cream); background: var(--night-raise); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .pv-chooser-btn:hover { background: #1f3350; }
html[data-theme="night"]:not(.a11y-contrast) .pv-cta { background: var(--card); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5); }
html[data-theme="night"]:not(.a11y-contrast) .pv-status.is-busy::before { border-color: var(--night-cream); border-right-color: transparent; }

/* Night mode on the switch itself */
html[data-theme="night"]:not(.a11y-contrast) .tr-nm-text { color: var(--night-cream); background: var(--night-raise); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .tr-nm-input:checked + .tr-nm-text { color: var(--navy); background: var(--gold); border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-nm-input:focus-visible + .tr-nm-text { box-shadow: 0 0 0 5px var(--snow); }
html[data-theme="night"]:not(.a11y-contrast) .hu-heading, html[data-theme="night"]:not(.a11y-contrast) .site-footer .footer-heading, html[data-theme="night"]:not(.a11y-contrast) .tr-cd-num { color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .hu-card h1, html[data-theme="night"]:not(.a11y-contrast) .hu-card h2, html[data-theme="night"]:not(.a11y-contrast) .hu-card h3 { color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .consent-dialog a, html[data-theme="night"]:not(.a11y-contrast) .consent-banner a { color: var(--gold); }
/* The header's sign-in pop-up: site.css paints it white, so night gives it a dark card to match the text colours it inherits. */
html[data-theme="night"]:not(.a11y-contrast) .signin-dialog { color: var(--ink); background: var(--card); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7); }
html[data-theme="night"]:not(.a11y-contrast) .signin-title { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .signin-status { color: var(--muted); }
html[data-theme="night"]:not(.a11y-contrast) .signin-close { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .signin-close:hover { background: rgba(251, 243, 230, 0.12); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .signin-dialog a:not(.btn) { color: var(--gold); }
/* Night: the truck message banner (added alongside v-bold-15). */
html[data-theme="night"]:not(.a11y-contrast) .tr-tmsg { background: #1b2a40; border-color: #f2b043; color: #fbf3e6; }
html[data-theme="night"]:not(.a11y-contrast) .tr-tmsg-ago { color: #c9d1dc; }
html[data-theme="night"]:not(.a11y-contrast) .tr-wave-plus { color: #ffb4bf; }

/* Keepsake (v-bold-17) */
.tr-ks { margin: 14px 0 0; padding: 14px; border-radius: 14px; background: linear-gradient(160deg, #0f1b2d, #1b3358); color: #fbf3e6; border: 2px solid var(--gold); }
.tr-ks[hidden] { display: none; }
.tr-ks-line { margin: 0 0 10px; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; color: #fbf3e6; }
.tr-ks-make { min-height: 48px; color: var(--navy); background: var(--gold); border-color: var(--gold); }
.tr-ks-make:disabled { opacity: 0.7; }
.tr-ks-img { display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 4 / 5; margin: 4px auto 12px; border-radius: 10px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); background: #0f1b2d; }
.tr-ks-img[hidden], .tr-ks-actions[hidden], .tr-ks-make[hidden], .tr-ks-share[hidden] { display: none; }
.tr-ks-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tr-ks-save { min-height: 48px; color: var(--navy); background: var(--gold); border-color: var(--gold); text-decoration: none; }
.tr-ks-share { min-height: 48px; color: #fbf3e6; background: transparent; border-color: #fbf3e6; }
.tr-ks-link { font: inherit; min-height: 44px; padding: 0 6px; color: #fbf3e6; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tr-ks .tr-ks-note { margin: 10px 0 0; color: #d9deea; }
.tr-ks :focus-visible { outline: 3px solid #fbf3e6; outline-offset: 2px; }
.tr-bar-keepsake {
  flex: 0 0 auto; font: inherit; font-weight: 700; font-size: 0.95rem; min-height: 44px; padding: 6px 14px;
  color: #fff; background: transparent; border: 2px solid var(--gold); border-radius: 999px; cursor: pointer;
}
.tr-bar-keepsake[hidden] { display: none; }
.tr-bar:has(.tr-bar-keepsake:not([hidden])) { flex-wrap: wrap; }
.tr-bar:has(.tr-bar-keepsake:not([hidden])) .tr-bar-main { flex: 1 1 140px; }
html[data-theme="night"]:not(.a11y-contrast) .tr-ks { background: linear-gradient(160deg, #0b1422, #16294a); border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-ks-line { color: #fbf3e6; }
html[data-theme="night"]:not(.a11y-contrast) .tr-ks-make, html[data-theme="night"]:not(.a11y-contrast) .tr-ks-save { color: #0f1b2d; background: #f2b043; border-color: #f2b043; }
html[data-theme="night"]:not(.a11y-contrast) .tr-ks-share, html[data-theme="night"]:not(.a11y-contrast) .tr-ks-link { color: #fbf3e6; border-color: #fbf3e6; }
html[data-theme="night"]:not(.a11y-contrast) .tr-bar-keepsake { color: #fbf3e6; border-color: #f2b043; }
html[data-theme="night"]:not(.a11y-contrast) .tr-ks :focus-visible { outline-color: #f2b043; }

/* Home screen (v-bold-20) */
.tr-hs { display: grid; gap: 8px; margin: 12px 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card); }
.tr-hs[hidden], .tr-hs [hidden] { display: none; }
.tr-hs p { margin: 0; }
.tr-hs-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tr-hs-btn { min-height: 44px; padding: 8px 14px; font: inherit; font-weight: 700; color: var(--navy); background: transparent; border: 2px solid var(--navy); border-radius: var(--radius); cursor: pointer; touch-action: manipulation; }
.tr-hs-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tr-hs-icon { display: inline-block; vertical-align: -3px; }
html[data-theme="night"]:not(.a11y-contrast) .tr-hs { background: var(--night-raise); border-color: var(--night-edge); color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-hs-btn { color: var(--night-cream); border-color: var(--night-cream); }

/* Replay (v-bold-19) */
.tr-replay { margin: 0; padding: 14px 16px 16px; display: grid; gap: 10px; justify-items: start; background: var(--card, #fff); border-bottom: 1px solid var(--line); }
.tr-replay[hidden], .tr-replay [hidden] { display: none; }
.tr-replay-h { margin: 0; font-size: 1.25rem; line-height: 1.25; color: #0f1b2d; }
.tr-replay-sub, .tr-replay-sum { margin: 0; max-width: 60ch; color: #0f1b2d; }
.tr-replay-sub { color: #444a55; }
.tr-replay-sum { font-weight: 700; }
.tr-replay-row { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.tr-replay-btn, .tr-replay-share {
  font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.2; min-height: 48px; max-width: 100%; padding: 8px 22px;
  border-radius: 999px; border: 2px solid #0f1b2d; cursor: pointer; text-align: center;
}
.tr-replay-btn { background: #f2b043; color: #0f1b2d; border-color: #f2b043; }
.tr-replay-btn:hover { background: #fbf3e6; border-color: #0f1b2d; }
.tr-replay-share { background: #fff; color: #0f1b2d; }
.tr-replay-share:hover { background: #0f1b2d; color: #fff; }
.tr-replay-btn:focus-visible, .tr-replay-share:focus-visible { outline: 3px solid #0f1b2d; outline-offset: 3px; box-shadow: 0 0 0 6px #f2b043; }
/* On /demo the way in is a link, not a big button. */
.tr-replay-btn.tr-replay-try { min-height: 44px; padding: 8px 4px; background: transparent; border-color: transparent; color: #9a1028; text-decoration: underline; text-underline-offset: 3px; }
.tr-replay-btn.tr-replay-try:hover { background: transparent; border-color: transparent; color: #0f1b2d; }
.tr-replay-bar { width: 100%; max-width: 520px; height: 10px; border-radius: 999px; background: #e3e7ee; overflow: hidden; }
.tr-replay-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: #e8a21c; }
.tr-replay-compact { padding: 12px 16px; }
.tr-replay-compact .tr-replay-h { font-size: 1.1rem; }
/* While a replay is up, only the replay's engine shows; the live engines and their tags wait. */
html.tr-replaying .truck-marker:not(.tr-replay-truck), html.tr-replaying .truck-tag { visibility: hidden; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay { background: #0f1b2d; border-bottom-color: var(--line); }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-h, html[data-theme="night"]:not(.a11y-contrast) .tr-replay-sum { color: #fbf3e6; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-sub { color: #c9d1dc; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-btn { background: #f2b043; border-color: #f2b043; color: #0f1b2d; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-btn:hover { background: #fbf3e6; border-color: #fbf3e6; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-share { background: #14233a; color: #fbf3e6; border-color: #8fa0bb; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-share:hover { background: #fbf3e6; color: #0f1b2d; border-color: #fbf3e6; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-btn:focus-visible, html[data-theme="night"]:not(.a11y-contrast) .tr-replay-share:focus-visible { outline-color: #fbf3e6; box-shadow: 0 0 0 6px #f2b043; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-btn.tr-replay-try { background: transparent; border-color: transparent; color: #f2b043; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-btn.tr-replay-try:hover { color: #fbf3e6; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-bar { background: #2c3d58; }
html[data-theme="night"]:not(.a11y-contrast) .tr-replay-fill { background: #f2b043; }

/* My street (v-bold-18) */
.tr-mystreet-pin {
  z-index: 1; pointer-events: none; max-width: min(230px, 72vw); padding: 4px 11px; overflow: hidden;
  font-family: inherit; font-weight: 700; font-size: 0.8rem; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis;
  color: #0f1b2d; background: #fbf3e6; border: 2px solid #f2b043; border-radius: 999px; box-shadow: 0 2px 6px rgba(15, 27, 45, 0.35);
}
.maplibregl-marker.truck-marker, .maplibregl-marker.truck-tag { z-index: 3; }
.tr-ms-note { margin: 10px 0 0; color: var(--ink); }
.tr-ms-note[hidden], .tr-ms-share[hidden], .tr-bar-share-nb[hidden], .tr-ms-show[hidden] { display: none; }
.tr-ms-keep {
  display: inline; font: inherit; font-weight: 700; min-height: 44px; padding: 4px 0; color: var(--navy);
  background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; text-align: left; cursor: pointer;
}
.tr-ms-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; max-width: 100%; }
.tr-ms-share svg { flex: 0 0 auto; }
.tr-bar-share-nb {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  color: #fff; background: transparent; border: 2px solid #fff; border-radius: 50%; cursor: pointer;
}
.tr-bar-share-nb:focus-visible, .tr-ms-keep:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
html[data-theme="night"]:not(.a11y-contrast) .tr-mystreet-pin { color: #f2b043; background: #0b1422; border-color: #f2b043; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); }
html[data-theme="night"]:not(.a11y-contrast) .tr-ms-note { color: var(--ink); }
html[data-theme="night"]:not(.a11y-contrast) .tr-ms-keep { color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-ms-share { color: var(--night-cream); background: var(--night-raise); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .tr-bar-share-nb { color: var(--night-cream); border-color: var(--night-cream); }

/* Santa's stops (v-bold-16) */
.tr-stops[hidden] { display: none; }
.tr-stops-help { margin: 0 0 8px; }
.tr-stops-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tr-stop { margin: 0; padding: 4px 10px 8px; border-radius: 10px; border: 2px solid transparent; min-width: 0; }
.tr-stop-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; }
.tr-stop-name { flex: 1 1 10rem; min-width: 0; min-height: 44px; padding: 6px 0; font: inherit; font-weight: 700; text-align: left; color: var(--navy); background: none; border: 0; cursor: pointer; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.tr-stop-name:hover { text-decoration-color: currentColor; }
.tr-stop-when { flex: 0 1 auto; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.tr-stop-truck, .tr-stop-detail { display: block; margin: 0; overflow-wrap: anywhere; }
.tr-stop-detail[hidden] { display: none; }
.tr-stop[data-state="now"] { background: #fff4d9; border-color: var(--gold); }
.tr-stop[data-state="now"] .tr-stop-when, .tr-stop[data-state="minutes"] .tr-stop-when { color: var(--pine); }
.tr-stop[data-state="done"] .tr-stop-name, .tr-stop[data-state="done"] .tr-stop-when { font-weight: 400; color: #4a5568; }
.tr-stop-pin { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; background: var(--gold); color: var(--navy); cursor: pointer; box-shadow: 0 0 0 2px var(--navy), 0 2px 6px rgba(0, 0, 0, 0.35); }
.tr-stop-pin:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.tr-stop-pin[data-state="done"] { opacity: 0.7; }
.tr-stop-popup .maplibregl-popup-content { padding: 10px 28px 10px 12px; border-radius: 10px; color: var(--navy); }
.tr-stop-pop { display: grid; gap: 2px; font-size: 0.95rem; line-height: 1.35; overflow-wrap: anywhere; }
.tr-stop-pop-detail[hidden] { display: none; }
@media (hover: none) and (pointer: coarse) { .tr-stop-pin { width: 44px; height: 44px; } }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop-name, html[data-theme="night"]:not(.a11y-contrast) .tr-stop-when { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop[data-state="now"] { background: var(--warn-bg); border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop[data-state="now"] .tr-stop-when, html[data-theme="night"]:not(.a11y-contrast) .tr-stop[data-state="minutes"] .tr-stop-when { color: var(--pine); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop[data-state="done"] .tr-stop-name, html[data-theme="night"]:not(.a11y-contrast) .tr-stop[data-state="done"] .tr-stop-when { color: var(--muted); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop-pin { border-color: var(--night-cream); box-shadow: 0 0 0 2px #0b1422, 0 2px 8px rgba(0, 0, 0, 0.6); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop-pin:focus-visible { outline-color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup .maplibregl-popup-content { background: var(--night-raise); color: var(--night-cream); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup .maplibregl-popup-close-button { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip, html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--night-raise); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--night-raise); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--night-raise); }
html[data-theme="night"]:not(.a11y-contrast) .tr-stop-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--night-raise); }

/* Practice run (v-bold-25) */
.pr-host { position: sticky; top: 0; z-index: 900; }
.pr-bar { color: #fbf3e6; background: var(--navy); border-bottom: 3px solid var(--gold); }
.pr-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; max-width: 1100px; margin: 0 auto; padding: 8px 16px; }
.pr-note { flex: 1 1 20rem; min-width: 0; margin: 0; font-size: 0.95rem; line-height: 1.35; }
.pr-note strong { color: var(--gold); }
.pr-top-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-bar .btn { min-height: 44px; padding: 8px 14px; }
.pr-bar .btn-ghost { color: #fbf3e6; border-color: #fbf3e6; background: transparent; }
.pr-bar .btn-ghost:hover:not(:disabled) { color: var(--navy); background: #fbf3e6; border-color: #fbf3e6; }
.pr-bar .btn:disabled { opacity: 0.55; cursor: not-allowed; color: #fbf3e6; background: transparent; border-color: #fbf3e6; }
.pr-bar .btn:focus-visible, .pr-bar select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pr-bar .btn[aria-pressed="true"] { color: var(--navy); background: var(--gold); border-color: var(--gold); }
.pr-tools { max-width: 1100px; max-height: 65vh; margin: 0 auto; padding: 4px 16px 14px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 12px 20px; align-items: start; }
.pr-tools > .pr-wide { grid-column: 1 / -1; }
.pr-trucks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 10px; align-items: start; }
.pr-tools[hidden], .pr-bar [hidden] { display: none; }
.pr-group { display: grid; gap: 6px; min-width: 0; }
.pr-label { font-weight: 700; color: var(--gold); }
.pr-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-truck { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid #8fa0bb; border-radius: 10px; }
.pr-truck-name { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.pr-dot { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px #fbf3e6; }
.pr-state, .pr-hint { margin: 0; font-size: 0.92rem; line-height: 1.4; overflow-wrap: anywhere; }
.pr-skipped { margin: 0; padding-left: 1.2rem; font-size: 0.92rem; }
.pr-bar select { max-width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; color: var(--navy); background: #fff; border: 2px solid #fbf3e6; border-radius: 8px; }
.pr-host ~ main .tr-bar { top: var(--pr-h, 0px) !important; }
html[data-theme="night"]:not(.a11y-contrast) .pr-bar { color: var(--night-cream); background: #0b1422; border-bottom-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .pr-bar .btn-ghost { color: var(--night-cream); border-color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .pr-bar .btn-ghost:hover:not(:disabled) { color: #0b1422; background: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .pr-bar .btn[aria-pressed="true"] { color: #0b1422; background: var(--gold); border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .pr-bar select { color: var(--night-cream); background: var(--night-raise); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .pr-truck { border-color: var(--night-edge); }
html.a11y-contrast .pr-bar { color: #fff; background: #000; border-bottom-color: #fff; }
@media (max-width: 480px) { .pr-bar .btn { padding: 8px 10px; } .pr-top { padding: 6px 12px; } .pr-tools { padding: 4px 12px 12px; } }

/* Español (v-bold-21) */
.tr-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 10px 0 0; max-width: 100%; }
.tr-lang-btn { min-height: 44px; min-width: 44px; padding: 8px 10px; font: inherit; font-weight: 600; color: var(--navy); background: none; border: 0; border-radius: 8px; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.tr-lang-btn:hover { text-decoration-color: currentColor; }
.tr-lang-btn.is-on { font-weight: 800; text-decoration-color: currentColor; cursor: default; }
.tr-lang-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 5px var(--navy); }
.tr-lang-dot { color: var(--muted); }
.tr-embed .tr-lang { margin-top: 4px; }
/* Spanish runs longer than English. Let long words and lines break instead of pushing the page sideways. */
html[lang="es"] .tr-status-title, html[lang="es"] .tr-status-detail, html[lang="es"] .tr-answer-head, html[lang="es"] .tr-cd-lead, html[lang="es"] .tr-hu-on,
html[lang="es"] .tr-hu-later, html[lang="es"] .hu-heading, html[lang="es"] .hu-body, html[lang="es"] .tr-stop-when, html[lang="es"] .tr-sl-note,
html[lang="es"] .tr-sl-summary, html[lang="es"] .tr-ks-line, html[lang="es"] .tr-replay-sub, html[lang="es"] .tr-replay-sum { overflow-wrap: anywhere; }
html[lang="es"] .tr-map-btn, html[lang="es"] .tr-cd-btn, html[lang="es"] .tr-hs-btn, html[lang="es"] .tr-ms-share, html[lang="es"] .tr-hu-bell, html[lang="es"] .tr-ks-make, html[lang="es"] .tr-replay-btn, html[lang="es"] .tr-replay-share { white-space: normal; text-align: center; }
html[data-theme="night"]:not(.a11y-contrast) .tr-lang-btn { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-lang-btn:focus-visible { outline-color: var(--night-cream); box-shadow: 0 0 0 5px var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-lang-dot { color: var(--night-edge); }

/* Branding (v-bold-27): the department patch beside its name, and its accent colour on the name underline and the main buttons.
   The page root carries data-br="<accent id>" and the --br-* variables (src/client/lib/branding.ts). Without data-br nothing changes. */
.tr-brand { display: flex; align-items: center; gap: 14px; margin: 0 0 0.1em; min-width: 0; }
.tr-brand .tr-name { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tr-logo { width: 56px; height: 56px; flex: none; object-fit: contain; border-radius: 10px; background: #fff; }
.tr-logo-sm { width: 40px; height: 40px; border-radius: 8px; }
.tr-brand .tr-embed-name { margin: 0; min-width: 0; overflow-wrap: anywhere; }
html:not(.a11y-contrast) [data-br] .tr-name,
html:not(.a11y-contrast) [data-br] .tr-embed-name { text-decoration: underline; text-decoration-color: var(--br-line); text-decoration-thickness: 4px; text-underline-offset: 6px; text-decoration-skip-ink: none; }
html:not(.a11y-contrast) [data-br] .btn:not(.btn-ghost):not(.btn-gold):not(:disabled) { background: var(--br-bg); border-color: var(--br-line); color: var(--br-fg); }
html:not(.a11y-contrast) [data-br] .btn:not(.btn-ghost):not(.btn-gold):not(:disabled):hover { background: var(--br-bg); border-color: var(--br-fg); color: var(--br-fg); box-shadow: inset 0 0 0 2px var(--br-fg); }
html[data-theme="night"]:not(.a11y-contrast) .tr-logo { background: #fbf3e6; }
html[data-theme="night"]:not(.a11y-contrast) [data-br] .tr-name,
html[data-theme="night"]:not(.a11y-contrast) [data-br] .tr-embed-name { text-decoration-color: var(--br-n-line); }
html[data-theme="night"]:not(.a11y-contrast) [data-br] .btn:not(.btn-ghost):not(.btn-gold):not(:disabled) { background: var(--br-n-bg); border-color: var(--br-n-line); color: var(--br-n-fg); }
html[data-theme="night"]:not(.a11y-contrast) [data-br] .btn:not(.btn-ghost):not(.btn-gold):not(:disabled):hover { background: var(--br-n-bg); border-color: var(--br-n-fg); color: var(--br-n-fg); box-shadow: inset 0 0 0 2px var(--br-n-fg); }
.tr-embed .tr-brand { margin-bottom: 8px; }

/* Drive (v-bold-26) */
.tr-dr { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; padding: 14px 16px; border-radius: 14px; background: #fbf3e6; color: #0f1b2d; border: 2px solid #c31432; text-align: left; }
.tr-dr-slot[hidden] { display: none; }
.tr-dr-icon { flex: 0 0 auto; margin-top: 2px; }
.tr-dr-body { min-width: 0; flex: 1 1 auto; }
.tr-dr-head { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 700; font-size: 1.25rem; line-height: 1.2; color: #9a1028; overflow-wrap: anywhere; }
.tr-dr-bring { margin: 6px 0 0; overflow-wrap: anywhere; }
.tr-dr-chips { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tr-dr-chip { margin: 0; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid #c31432; color: #0f1b2d; font-size: 0.875rem; font-weight: 600; overflow-wrap: anywhere; }
.tr-dr-benefits { margin: 8px 0 0; overflow-wrap: anywhere; }
.tr-dr-compact { padding: 10px 12px; }
.tr-dr-curb { margin: 6px 0 0; font-weight: 700; color: #9a1028; }
html[data-theme="night"]:not(.a11y-contrast) .tr-dr { background: var(--night-raise); color: var(--night-cream); border-color: var(--night-red); }
html[data-theme="night"]:not(.a11y-contrast) .tr-dr-head, html[data-theme="night"]:not(.a11y-contrast) .tr-dr-curb { color: #f2b043; }
html[data-theme="night"]:not(.a11y-contrast) .tr-dr-chip { background: #0f1b2d; color: var(--night-cream); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .tr-dr-benefits { color: #b9c3d4; }

/* Embed builder (v-bold-28) */
/* The compact card: a small box for a narrow sidebar. No map. Colors come from the same variables as the rest, so the night palette just works. */
.tr-card { max-width: 100%; }
.tr-card .tr-pad { padding-left: 12px; padding-right: 12px; }
.tr-card .tr-embed-name { font-size: 1.1rem; overflow-wrap: anywhere; }
.tr-card .tr-status-title { font-size: 1.1rem; overflow-wrap: anywhere; }
.tr-card .tr-status-detail { font-size: 0.95rem; overflow-wrap: anywhere; }
.tr-card .tr-find { margin-top: 12px; padding: 12px; }
.tr-card .tr-card-cd[hidden], .tr-card .tr-card-upd[hidden] { display: none; }
.tr-card .tr-card-upd { margin-top: 4px; }
.tr-card-foot { display: grid; gap: 12px; justify-items: stretch; padding-top: 4px; padding-bottom: 16px; }
.tr-card-foot p { margin: 0; text-align: center; }
.tr-card .tr-card-go { display: flex; align-items: center; justify-content: center; min-height: 56px; width: 100%; box-sizing: border-box; padding: 12px 16px; font-size: 1.15rem; font-weight: 800; text-align: center; }
.tr-card .tr-lang { justify-content: center; }
.tr-card .tr-nm { margin: 0; }
/* Keep the card short: no calendar buttons, a tighter countdown and status, the label read aloud but not shown twice. */
.tr-card .tr-cd-actions, .tr-card .tr-cd-area { display: none; }
.tr-card .tr-cd { padding: 10px 12px; margin-bottom: 8px; }
.tr-card .tr-cd p { margin: 0 0 2px; }
.tr-card .tr-cd-num { font-size: 1.35rem; }
.tr-card .tr-status { padding: 10px 12px; margin: 0; }
.tr-card .tr-status p { margin: 0 0 2px; }
.tr-card .tr-pad:first-child { padding-top: 10px; }
.tr-card .tr-embed-name { margin-bottom: 6px; }
.tr-card .tr-find { margin-top: 0; }
.tr-card .tr-find .tr-h { font-size: 1.05rem; margin: 0 0 6px; }
.tr-card .tr-find .tr-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tr-card .tr-find .tr-privacy { margin: 6px 0 0; font-size: 0.8rem; }
.tr-card-foot { gap: 8px; }
.tr-card .tr-pad { padding-left: 10px; padding-right: 10px; }
.tr-card .tr-pad:nth-child(3) { padding-top: 0; }
.tr-card .tr-cd { padding: 8px 10px; margin-bottom: 6px; }
.tr-card .tr-cd-lead { font-size: 0.8rem; }
.tr-card .tr-cd-num { font-size: 1.2rem; }
.tr-card .tr-cd-when { font-size: 0.9rem; }
.tr-card .tr-status { padding: 8px 10px; }
.tr-card .tr-status-title { font-size: 1rem; }
.tr-card .tr-status-detail { font-size: 0.88rem; line-height: 1.35; }
.tr-card .tr-find { padding: 10px; }
.tr-card .tr-find .tr-h { margin-bottom: 4px; }
.tr-card .tr-find input { min-height: 44px; }
.tr-card .tr-card-go { min-height: 50px; font-size: 1.1rem; }
.tr-card-foot { padding-bottom: 10px; }
.tr-card-gobar { position: sticky; bottom: 0; z-index: 2; padding-top: 8px; padding-bottom: 8px; background: var(--snow); box-shadow: 0 -8px 8px -8px rgba(0, 0, 0, 0.25); }
.tr-card-foot { padding-top: 0; }

/* Weather (v-bold-29) */
.tr-wx { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: #fff; color: var(--navy); border: 2px solid #c9d3e3; max-width: 100%; }
.tr-wx[hidden] { display: none; }
.tr-wx-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tr-wx-ico { flex: 0 0 auto; width: 40px; height: 40px; color: var(--navy); }
.tr-wx-text { min-width: 0; }
.tr-wx-line { margin: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tr-wx-more { margin: 2px 0 0; font-size: 0.92rem; line-height: 1.35; overflow-wrap: anywhere; }
.tr-wx-tip { margin: 8px 0 0; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.tr-wx-alert { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #9a1028; color: #fff; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.tr-wx-alert p { margin: 0; }
.tr-wx-alert p + p { margin-top: 4px; }
.tr-wx-src { margin: 8px 0 0; font-size: 0.85rem; color: var(--muted); }
.tr-embed .tr-wx { margin-bottom: 8px; }
html[data-theme="night"]:not(.a11y-contrast) .tr-wx { background: var(--night-raise); color: var(--night-cream); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .tr-wx-ico { color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-wx-alert { background: #8e1a2e; color: #fff; border: 2px solid var(--night-red); }
html[data-theme="night"]:not(.a11y-contrast) .tr-wx-src { color: var(--night-edge); }
html.a11y-contrast .tr-wx { background: #fff; color: #000; border-color: #000; }
html.a11y-contrast .tr-wx-alert { background: #000; color: #fff; }

/* Kid view link (v-bold-32). */
.tr-kids { margin: 6px 0 0; }
.tr-kids-link { display: inline-block; min-height: 44px; padding: 10px 0; font-weight: 700; }
/* Alert me even if I close this page (v-bold-31) */
.tr-push { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tr-push[hidden] { display: none; }
.tr-push-btn { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-height: 48px; text-align: center; white-space: normal; }
.tr-push-btn[disabled] { opacity: .7; cursor: progress; }
.tr-push-on { margin: 0 0 4px; font-size: 1.05rem; color: var(--navy); }
.tr-push-note { margin: 8px 0 0; font-size: .95rem; line-height: 1.45; color: var(--muted, #4a5568); }
.tr-push-small { font-size: .875rem; }
.tr-push-err { color: var(--danger, #9a1028); font-weight: 600; }
.tr-push-off { display: inline-block; max-width: 100%; text-align: left; }
html[data-theme="night"]:not(.a11y-contrast) .tr-push { border-top-color: var(--line); }
html[data-theme="night"]:not(.a11y-contrast) .tr-push-on, html[data-theme="night"]:not(.a11y-contrast) .tr-push-off { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-push-note { color: var(--muted); }
html[data-theme="night"]:not(.a11y-contrast) .tr-push-err { color: var(--night-red); }
html[data-theme="night"]:not(.a11y-contrast) .tr-push-btn { color: var(--night-cream); border-color: var(--night-cream); background: transparent; }
/* Local sponsors (v-bold-40): "Thanks to our sponsors", below the run info. Logos sit in white cards. */
.tr-sponsors { display: block; }
.tr-sp-head { font-family: Fraunces, Georgia, serif; font-size: 1.15rem; margin: 0 0 10px; color: var(--navy); }
.tr-sp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.tr-sp-card { margin: 0; display: grid; place-items: center; min-height: 72px; min-width: 0; padding: 8px 10px; background: #fff; color: #0f1b2d; border: 1px solid var(--line); border-radius: 12px; }
.tr-sp-link { display: grid; place-items: center; width: 100%; min-height: 56px; color: inherit; text-decoration: none; border-radius: 8px; }
.tr-sp-link:hover .tr-sp-name { text-decoration: underline; }
.tr-sp-link:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 5px var(--navy); }
.tr-sp-logo { display: block; max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.tr-sp-name { font-weight: 700; text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
html[data-theme="night"]:not(.a11y-contrast) .tr-sp-head { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-sp-card { border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .tr-sp-link:focus-visible { outline-color: var(--night-cream); box-shadow: 0 0 0 6px var(--gold); }
/* The card is white in day and night, so its link text stays dark (the night link colour is for dark backgrounds). */
main .tr-sp-card a.tr-sp-link, main .tr-sp-card a.tr-sp-link:hover, html[data-theme="night"]:not(.a11y-contrast) main .tr-sp-card a.tr-sp-link, html[data-theme="night"]:not(.a11y-contrast) main .tr-sp-card a.tr-sp-link:hover { color: #0f1b2d; }

/* Subscribe to Santa's calendar (v-bold-41) */
.tr-sub { margin: 0 0 12px; padding: 14px 16px 12px; border-radius: 14px; background: #0f1b2d; color: #fbf3e6; text-align: center; border: 2px solid #f2b043; }
.tr-sub[hidden] { display: none; }
.tr-sub-lead { margin: 0; font-weight: 800; font-size: 1.05rem; color: #f2b043; overflow-wrap: anywhere; }
.tr-sub-line { margin: 4px 0 0; overflow-wrap: anywhere; }
.tr-sub-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; align-items: center; margin-top: 10px; }
.tr-sub-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: 10px 18px; border-radius: 999px; border: 2px solid #f2b043; background: #f2b043; color: #0f1b2d; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; text-align: center; }
.tr-sub-btn:hover { background: #fbf3e6; border-color: #fbf3e6; }
.tr-sub-link { min-height: 44px; padding: 10px 4px; border: 0; background: none; color: #f2b043; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.tr-sub-status { margin: 4px 0 0; min-height: 0; }
.tr-sub-status:empty { display: none; }
.tr-sub :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
html[data-theme="night"]:not(.a11y-contrast) .tr-sub { background: var(--night-raise); }
html[lang="es"] .tr-sub-btn { white-space: normal; }
/* Volunteers (v-bold-42): "<Department> is looking for volunteers", after Santa has passed or the run is over. */
.tr-recruit-host[hidden] { display: none; }
.tr-recruit { margin: 0; padding: 16px; border-left: 6px solid var(--red, #c31432); min-width: 0; }
.tr-recruit-title { font-family: Fraunces, Georgia, serif; font-size: 1.25rem; line-height: 1.25; margin: 0 0 8px; color: var(--navy); overflow-wrap: anywhere; }
.tr-recruit-text { margin: 0 0 14px; line-height: 1.5; overflow-wrap: anywhere; }
.tr-recruit-btn { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-height: 48px; text-align: center; white-space: normal; }
.tr-recruit-link { margin: 4px 0 0; }
.tr-recruit-link a { display: inline-block; min-height: 44px; padding: 10px 0; overflow-wrap: anywhere; }
html[data-theme="night"]:not(.a11y-contrast) .tr-recruit { border-left-color: var(--night-red); }
html[data-theme="night"]:not(.a11y-contrast) .tr-recruit-title { color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-recruit-btn { background: var(--gold); color: var(--navy); border-color: var(--gold); }
html.a11y-contrast .tr-recruit { border: 2px solid #000; border-left-width: 6px; }
/* Point to Santa (v-bold-44): the button, and the full-screen compass. The view is always on Night Run Navy, day or night. */
.tr-cp-entry { margin: 0 0 12px; display: block; }
.tr-cp-entry[hidden], .tr-cp [hidden] { display: none; }
.tr-cp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; max-width: 100%; min-height: 56px; padding: 10px 24px;
  border-radius: 999px; border: 3px solid #f2b043; background: #0f1b2d; color: #fbf3e6;
  font: inherit; font-size: 1.2rem; font-weight: 800; line-height: 1.2; text-align: center; cursor: pointer;
}
.tr-cp-btn:hover { background: #1b2b45; }
.tr-cp-btn:focus-visible { outline: 3px solid #0f1b2d; outline-offset: 3px; box-shadow: 0 0 0 6px #f2b043; }
.tr-cp-icon { font-size: 1.6rem; line-height: 1; }
.tr-cp-btn-label { overflow-wrap: anywhere; }
html.tr-cp-open, html.tr-cp-open body { overflow: hidden; }
.tr-cp {
  position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; overflow-x: hidden;
  background: #0f1b2d; color: #fbf3e6; text-align: center; box-sizing: border-box;
}
.tr-cp *, .tr-cp *::before, .tr-cp *::after { box-sizing: border-box; }
.tr-cp-top { width: 100%; max-width: 560px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tr-cp-title { margin: 0; font-family: Fraunces, Georgia, serif; font-size: 1.5rem; line-height: 1.15; color: #fbf3e6; text-align: left; overflow-wrap: anywhere; }
.tr-cp-close {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none; min-width: 56px; min-height: 56px; padding: 8px 18px;
  border-radius: 999px; border: 3px solid #fbf3e6; background: #fbf3e6; color: #0f1b2d; font: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer;
}
.tr-cp-close:focus-visible, .tr-cp-retry:focus-visible { outline: 3px solid #f2b043; outline-offset: 3px; box-shadow: 0 0 0 6px #0f1b2d; }
.tr-cp-who { margin: 0; padding: 4px 14px; border-radius: 999px; border: 2px solid #f2b043; color: #f2b043; font-weight: 800; max-width: 100%; overflow-wrap: anywhere; }
.tr-cp-dial { width: min(78vw, 46vh, 340px); aspect-ratio: 230 / 240; margin: 4px 0; }
.tr-cp-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tr-cp-line { margin: 0; max-width: 560px; font-family: Fraunces, Georgia, serif; font-size: 1.7rem; font-weight: 700; line-height: 1.25; color: #fbf3e6; overflow-wrap: anywhere; }
.tr-cp-sub { margin: 0; font-size: 1.15rem; color: #f2b043; font-weight: 700; }
.tr-cp-note { margin: 0; max-width: 560px; font-size: 1.05rem; line-height: 1.4; color: #fbf3e6; }
.tr-cp-sub:empty { display: none; }
.tr-cp-retry {
  min-height: 56px; padding: 10px 24px; border-radius: 999px; border: 3px solid #f2b043; background: transparent; color: #fbf3e6;
  font: inherit; font-size: 1.1rem; font-weight: 800; cursor: pointer;
}
.tr-cp-privacy { margin: auto 0 0; padding-top: 8px; max-width: 560px; font-size: .95rem; color: #b9c3d4; }
/* Tell the crew (v-bold-43): two toggles under the street answer */
.tr-crew { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; justify-items: start; }
.tr-crew[hidden], .tr-crew [hidden] { display: none; }
.tr-crew-h { margin: 0; font-size: 1.15rem; }
.tr-crew-anon, .tr-crew-help, .tr-crew-line { margin: 0; }
.tr-crew-quiet-row { display: grid; gap: 6px; justify-items: start; max-width: 100%; }
.tr-crew-btn {
  max-width: 100%; min-height: 52px; padding: 10px 20px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 1.05rem; line-height: 1.25; text-align: center; overflow-wrap: anywhere;
  color: var(--navy); background: #fff; border: 3px solid var(--navy);
}
.tr-crew-btn:hover { background: var(--snow); }
.tr-crew-btn.is-on { color: #fff; background: var(--navy); }
.tr-crew-btn[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.tr-crew-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 6px var(--gold); }
.tr-crew-line { font-weight: 700; color: var(--navy); min-height: 1.3em; }
html[data-theme="night"]:not(.a11y-contrast) .tr-crew-btn { color: var(--night-cream); background: var(--night-raise); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .tr-crew-btn:hover { background: #1b3358; }
html[data-theme="night"]:not(.a11y-contrast) .tr-crew-btn.is-on { color: #0f1b2d; background: var(--gold); border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-crew-btn:focus-visible { outline-color: var(--night-cream); box-shadow: 0 0 0 6px var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-crew-line, html[data-theme="night"]:not(.a11y-contrast) .tr-crew-h { color: var(--night-cream); }
/* Tell me out loud (v-bold-60): a switch under Find my street */
.tr-ol { margin: 16px 0 0; display: grid; gap: 6px; justify-items: start; max-width: 100%; }
.tr-ol[hidden] { display: none; }
.tr-ol-btn {
  display: inline-flex; align-items: center; gap: 12px; max-width: 100%; min-height: 52px; padding: 8px 18px 8px 10px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 1.05rem; line-height: 1.25; text-align: left; overflow-wrap: anywhere;
  color: var(--navy); background: #fff; border: 3px solid var(--navy);
}
.tr-ol-btn:hover { background: var(--snow); }
.tr-ol-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 6px var(--gold); }
.tr-ol-knob { position: relative; flex: 0 0 auto; width: 44px; height: 26px; border-radius: 999px; background: #fff; border: 3px solid var(--navy); box-sizing: border-box; }
.tr-ol-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--navy); transition: transform .15s; }
.tr-ol-btn.is-on { color: #fff; background: var(--navy); }
.tr-ol-btn.is-on .tr-ol-knob { background: var(--gold); border-color: #fff; }
.tr-ol-btn.is-on .tr-ol-knob::after { transform: translateX(18px); background: var(--navy); }
.tr-ol-help { margin: 0; }
html.a11y-motion .tr-ol-knob::after { transition: none; }
@media (prefers-reduced-motion: reduce) { .tr-ol-knob::after { transition: none; } }
html[lang="es"] .tr-ol-btn { white-space: normal; }
html[data-theme="night"]:not(.a11y-contrast) .tr-ol-btn { color: var(--night-cream); background: var(--night-raise); border-color: var(--night-edge); }
html[data-theme="night"]:not(.a11y-contrast) .tr-ol-btn:hover { background: #1b3358; }
html[data-theme="night"]:not(.a11y-contrast) .tr-ol-knob { background: var(--night-raise); border-color: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-ol-knob::after { background: var(--night-cream); }
html[data-theme="night"]:not(.a11y-contrast) .tr-ol-btn.is-on { color: #0f1b2d; background: var(--gold); border-color: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-ol-btn.is-on .tr-ol-knob { background: #0f1b2d; border-color: #0f1b2d; }
html[data-theme="night"]:not(.a11y-contrast) .tr-ol-btn.is-on .tr-ol-knob::after { background: var(--gold); }
html[data-theme="night"]:not(.a11y-contrast) .tr-ol-btn:focus-visible { outline-color: var(--night-cream); box-shadow: 0 0 0 6px var(--gold); }

/* Text-only page offer (v-bold-52): a banner when the connection looks weak, and a quiet link at the bottom. */
.tr-lite-offer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; font-weight: 600; }
.tr-lite-offer[hidden] { display: none; }
.tr-lite-offer a { min-width: 0; overflow-wrap: anywhere; }
.tr-lite-close { flex: none; min-width: 44px; min-height: 44px; font: inherit; font-size: 1.4rem; line-height: 1; color: inherit; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.tr-lite-link { margin: 8px 0 0; }
html[data-theme="night"]:not(.a11y-contrast) .tr-lite-offer a, html[data-theme="night"]:not(.a11y-contrast) .tr-lite-link a { color: var(--gold); }
