:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0c100e;
  color: #f5f8f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0a0e0c;
}

[hidden] {
  display: none !important;
}

button,
a {
  font: inherit;
}

.shell {
  width: min(100%, 52rem);
  margin: 0 auto;
  padding: max(2rem, env(safe-area-inset-top)) 1.25rem max(2rem, env(safe-area-inset-bottom));
}

.topbar,
.freshness,
.recording-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.eyebrow,
.label {
  margin: 0 0 0.35rem;
  color: #91a099;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #35433c;
  border-radius: 999px;
  color: #c7d0cb;
  font-size: 0.82rem;
  font-weight: 700;
}

.topbar .status {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #aeb9b3;
  font-weight: 650;
}

.topbar .status.is-live,
.topbar .status.is-disconnected {
  border: 0;
  background: transparent;
}

.status.is-live {
  border-color: #39734d;
  background: #173321;
  color: #9ce7b4;
}

.status.is-disconnected {
  border-color: #725d2f;
  background: #2c2514;
  color: #f1d58e;
}

.destination-planner {
  margin-top: 2.25rem;
  padding: 1.35rem;
  border: 1px solid #314039;
  border-radius: 1.35rem;
  background: linear-gradient(145deg, #17221c, #101713);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
}

.destination-planner h2 {
  margin-bottom: 1.25rem;
  font-size: 1.65rem;
}

.planner-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.destination-history {
  margin: 0.2rem 0 1.15rem;
}

.destination-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.65rem;
}

.destination-history-heading h3 {
  margin: 0;
  color: #d8e0dc;
  font-size: 0.88rem;
  font-weight: 750;
}

.destination-history-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.2rem;
  border: 1px solid #35433c;
  border-radius: 0.75rem;
  background: #0c100e;
}

.destination-history-tabs button {
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 0.56rem;
  background: transparent;
  color: #91a099;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.destination-history-tabs button[aria-selected="true"] {
  background: #26362e;
  color: #dff5e5;
  box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.24);
}

.destination-history-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-destination-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
}

.history-destination {
  display: grid;
  width: 100%;
  min-height: 4.25rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #35433c;
  border-radius: 0.9rem;
  background: #101713;
  color: #f5f8f6;
  text-align: left;
  cursor: pointer;
}

.history-destination::after {
  content: none;
}

.history-destination-text {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.history-destination-text strong,
.history-destination-text small,
.history-destination-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-destination-text strong {
  font-size: 0.95rem;
}

.history-destination-text small,
.history-destination-meta {
  color: #91a099;
  font-size: 0.74rem;
}

.history-destination-meta {
  grid-column: 1;
}

.destination-map-link,
.suggestion-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  min-height: 3rem;
  border: 1px solid #35433c;
  border-radius: 0.85rem;
  color: #9ce7b4;
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.destination-map-link {
  min-height: 4.25rem;
  padding: 0.5rem 0.65rem;
  background: #0c100e;
}

.history-more {
  width: 100%;
  min-height: 2.9rem;
  margin-top: 0.35rem;
  border: 0;
  background: transparent;
  color: #9ce7b4;
  font-weight: 750;
  cursor: pointer;
}

.history-attribution {
  margin: 0.15rem 0 0;
  color: #718078;
  font-size: 0.68rem;
  text-align: right;
}

.planner-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.15rem 0 1rem;
  color: #718078;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.planner-divider::before,
.planner-divider::after {
  height: 1px;
  flex: 1;
  background: #27322d;
  content: "";
}

.field-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #c7d0cb;
  font-size: 0.88rem;
  font-weight: 700;
}

@media (max-width: 24rem) {
  .destination-history-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .destination-history-tabs button {
    min-height: 2.65rem;
  }
}

@media (min-width: 40rem) {
  .destination-history-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.search-field {
  position: relative;
}

#destination-search {
  width: 100%;
  min-height: 3.35rem;
  padding: 0.8rem 4.5rem 0.8rem 1rem;
  border: 1px solid #46564e;
  border-radius: 0.9rem;
  outline: none;
  background: #0c100e;
  color: #f5f8f6;
  font: inherit;
  font-size: 1rem;
}

#destination-search:focus {
  border-color: #71b887;
  box-shadow: 0 0 0 3px rgba(113, 184, 135, 0.18);
}

.search-progress {
  position: absolute;
  top: 50%;
  right: 1rem;
  color: #91a099;
  font-size: 0.78rem;
  transform: translateY(-50%);
}

.place-suggestions {
  margin: 0;
  padding: 0;
  list-style: none;
}

.place-suggestions li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #27322d;
}

.place-suggestion {
  grid-column: 1 / -1;
  display: grid;
  width: 100%;
  min-height: 3.5rem;
  gap: 0.2rem;
  padding: 0.75rem 0.2rem;
  border: 0;
  background: transparent;
  color: #f5f8f6;
  text-align: left;
  cursor: pointer;
}

.place-suggestions li.is-history .place-suggestion {
  grid-column: 1;
}

.historical-suggestion-meta {
  color: #9ce7b4 !important;
  font-weight: 750;
}

.suggestion-map-link {
  grid-column: 2;
  grid-row: 1;
  min-height: 2.75rem;
  padding: 0.45rem 0.6rem;
}

.place-suggestion strong,
.place-suggestion span {
  overflow-wrap: anywhere;
}

.place-suggestion span {
  color: #91a099;
  font-size: 0.8rem;
}

.google-attribution {
  margin: 0.65rem 0 0;
  color: #91a099;
  font-size: 0.72rem;
  text-align: right;
}

.journey-options {
  display: grid;
  gap: 0;
  margin-top: 1.15rem;
  border-top: 1px solid #27322d;
}

.option-row,
.arrival-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  gap: 1rem;
  border-bottom: 1px solid #27322d;
}

.option-row > span,
.arrival-field > span:first-child {
  display: grid;
  gap: 0.2rem;
}

.option-row small,
.arrival-field small {
  color: #91a099;
  line-height: 1.35;
}

#destination-charging {
  width: 1.5rem;
  height: 1.5rem;
  accent-color: #71b887;
}

.percent-input {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #b8efc8;
  font-weight: 800;
}

#arrival-target {
  width: 4.25rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 1px solid #46564e;
  border-radius: 0.7rem;
  background: #0c100e;
  color: #f5f8f6;
  font: inherit;
  font-weight: 800;
  text-align: right;
}

.planner-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

#save-destination,
#start-navigation {
  min-height: 3.35rem;
  padding: 0.75rem 0.9rem;
  border: 0;
  border-radius: 0.9rem;
  font-weight: 850;
  cursor: pointer;
}

#save-destination {
  border: 1px solid #4f7d5e;
  background: #173321;
  color: #b8efc8;
}

#start-navigation {
  background: #e9f8ed;
  color: #102016;
}

#save-destination:disabled,
#start-navigation:disabled,
#clear-destination:disabled {
  cursor: default;
  opacity: 0.5;
}

.plan-message {
  margin: 0.9rem 0 0;
  color: #aeb9b3;
  font-size: 0.85rem;
  line-height: 1.45;
}

.cockpit {
  margin-top: clamp(1.4rem, 5vw, 2.5rem);
}

.destination-anchor {
  display: grid;
  gap: 0.9rem;
  padding: 0 0.15rem 0.8rem;
}

.destination-anchor h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.65rem, 7vw, 2.6rem);
  line-height: 1.05;
}

.trip-overview {
  display: grid;
  grid-auto-columns: max-content;
  grid-auto-flow: column;
  justify-content: start;
  gap: clamp(1.5rem, 8vw, 3.5rem);
}

.trip-overview-metric {
  display: grid;
  min-width: 0;
}

.trip-overview-metric strong {
  color: #f5f8f6;
  font-size: clamp(2rem, 9vw, 3.25rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 0.95;
  white-space: nowrap;
}

.trip-overview-metric small {
  margin-top: 0.35rem;
  color: #91a099;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.destination-state-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.destination-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.destination-summary {
  margin-bottom: 0;
  color: #aeb9b3;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.destination-summary::before {
  display: inline-block;
  margin-right: 0.4rem;
  font-weight: 900;
}

.destination-summary.is-confirmed::before {
  content: "✓";
  color: #9ce7b4;
}

.destination-summary.is-pending::before {
  content: "○";
  color: #f1d58e;
}

.destination-summary.is-unsent::before {
  content: "–";
  color: #91a099;
}

.secondary-action {
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid #3f5f4a;
  border-radius: 999px;
  background: transparent;
  color: #9ce7b4;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.secondary-action.is-danger {
  border-color: #80544f;
  color: #f3b4aa;
}

.charging-section {
  margin-top: 0.9rem;
}

.charging-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.charging-heading h2 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.85rem, 8vw, 2.7rem);
  letter-spacing: -0.04em;
}

.charging-heading p {
  margin-bottom: 0;
  color: #aeb9b3;
}

.candidate-count {
  color: #91a099;
  font-weight: 800;
}

.charging-summary,
.charging-updated-at {
  color: #aeb9b3;
  font-size: 0.9rem;
  line-height: 1.5;
}

.charging-summary {
  margin: 0.9rem 0 0;
}

.charging-list {
  display: grid;
  gap: 0;
  margin: 1rem 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #2d3933;
  border-radius: 1rem;
  background: #0d1310;
  list-style: none;
}

.charging-candidate {
  border-bottom: 1px solid #2d3933;
}

.charging-candidate:last-child {
  border-bottom: 0;
}

.charging-candidate.is-current {
  background: #182d20;
}

.candidate-button {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
  padding: 0.7rem 0.85rem 0.65rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.candidate-button:focus-visible {
  outline: 3px solid #8fd8a5;
  outline-offset: -3px;
}

.candidate-button:disabled {
  cursor: default;
}

.candidate-heading,
.candidate-facts,
.candidate-metrics,
.candidate-metric {
  display: grid;
}

.candidate-heading {
  min-width: 0;
  gap: 0.18rem;
}

.candidate-heading-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.candidate-label {
  color: #83c897;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.candidate-heading > strong {
  font-size: clamp(1.05rem, 4.8vw, 1.4rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.candidate-facts {
  color: #aeb9b3;
  font-size: 0.72rem;
  line-height: 1.25;
}

.candidate-distance {
  color: #b8efc8;
  font-weight: 800;
  white-space: nowrap;
}

.candidate-availability {
  display: grid;
  align-content: end;
  justify-items: start;
  min-width: 0;
  padding-left: 0.5rem;
  border-left: 1px solid #334139;
  color: #aeb9b3;
}

.candidate-availability-value {
  font-size: clamp(1.2rem, 5.2vw, 1.75rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
  line-height: 0.9;
  white-space: nowrap;
}

.candidate-availability-value.is-symbol {
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  line-height: 0.8;
}

.candidate-availability-status {
  margin-top: 0.22rem;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
}

.candidate-availability.is-good {
  color: #9ce7b4;
}

.candidate-availability.is-limited {
  color: #f1d58e;
}

.candidate-availability.is-full,
.candidate-availability.is-closed {
  color: #f0a2a2;
}

.candidate-availability.is-unknown {
  color: #91a099;
}

.candidate-metrics {
  grid-template-columns: minmax(5.4rem, 1fr) minmax(5.4rem, 1fr) minmax(4.4rem, 0.8fr);
  gap: 0;
}

.candidate-metric {
  align-content: end;
  min-width: 0;
  padding-left: 0.5rem;
  border-left: 1px solid #334139;
}

.candidate-metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.candidate-metric strong {
  color: #a3e6b5;
  font-size: clamp(1.65rem, 7vw, 2.35rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
  line-height: 0.9;
  white-space: nowrap;
}

.candidate-metric > span {
  margin-top: 0.2rem;
  color: #aeb9b3;
  font-size: 0.72rem;
  line-height: 1.15;
}

.charging-updated-at {
  margin: 0.75rem 0 0;
  color: #91a099;
}

.change-destination {
  display: block;
  min-height: 3rem;
  margin: 1rem auto 0;
  padding: 0.65rem 1rem;
  border: 0;
  background: transparent;
  color: #9ce7b4;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 0.4rem;
  cursor: pointer;
}

.navigation-dialog {
  width: min(calc(100% - 2rem), 27rem);
  padding: 0;
  border: 1px solid #3a4a42;
  border-radius: 1.2rem;
  background: #111714;
  color: #f5f8f6;
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.55);
}

.navigation-dialog::backdrop {
  background: rgba(3, 7, 5, 0.78);
  backdrop-filter: blur(4px);
}

.navigation-dialog form {
  padding: 1.4rem;
}

.navigation-dialog h2 {
  margin-bottom: 0.75rem;
  font-size: 1.55rem;
  line-height: 1.2;
}

.navigation-dialog p:not(.label) {
  color: #aeb9b3;
  line-height: 1.5;
}

.dialog-status {
  min-height: 1.5rem;
  margin-bottom: 0;
  color: #9ce7b4 !important;
}

.dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.dialog-actions button {
  min-height: 3.25rem;
  border: 1px solid #486154;
  border-radius: 0.8rem;
  background: transparent;
  color: #d8e0dc;
  font-weight: 800;
  cursor: pointer;
}

#confirm-navigation {
  border-color: #dff5e5;
  background: #e9f8ed;
  color: #102016;
}

.dialog-actions button:disabled {
  cursor: default;
  opacity: 0.55;
}

.system-details {
  margin-top: 2.5rem;
  border-top: 1px solid #27322d;
  color: #91a099;
}

.system-details > summary {
  min-height: 3.5rem;
  padding: 1.15rem 0;
  font-weight: 750;
  cursor: pointer;
}

.freshness {
  margin-top: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #27322d;
}

.recording-status {
  padding: 1rem 0;
  border-bottom: 1px solid #27322d;
}

.recording-status strong {
  color: #c7d0cb;
}

.recording-status strong.is-active {
  color: #9ce7b4;
}

.recording-status > p {
  margin-bottom: 0;
  color: #91a099;
  font-size: 0.85rem;
  text-align: right;
}

.freshness p:last-child {
  margin-bottom: 0;
  color: #c7d0cb;
}

#refresh,
#ping,
#log-refresh,
#log-older,
.primary-button {
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.85rem;
  background: #e9f8ed;
  color: #102016;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.freshness-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

#ping {
  border: 1px solid #4f7d5e;
  background: #173321;
  color: #b8efc8;
}

#ping:disabled,
#refresh:disabled,
#log-refresh:disabled,
#log-older:disabled {
  cursor: default;
  opacity: 0.52;
}

.secondary-navigation {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  text-align: center;
}

.secondary-navigation a,
.back-link {
  color: #b8efc8;
  font-weight: 700;
  text-decoration: none;
}

.back-link {
  min-height: 2.75rem;
  padding: 0.75rem;
}

.log-summary,
.log-section {
  margin-top: 1.5rem;
  border: 1px solid #27322d;
  border-radius: 1.2rem;
  background: #111714;
}

.log-shell {
  width: min(100%, 72rem);
}

.log-summary {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.log-status-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.log-summary strong {
  font-size: 1.25rem;
}

.log-summary strong.is-connected {
  color: #9ce7b4;
}

.log-summary > p:not(.label) {
  margin-bottom: 0;
  color: #aeb9b3;
  font-size: 0.9rem;
}

.log-explanation {
  margin: 1rem 0 0;
  color: #aeb9b3;
  font-size: 0.9rem;
  line-height: 1.5;
}

.log-section {
  padding: 1.25rem;
}

.log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.log-heading h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.event-log {
  display: grid;
  gap: 0;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.event {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid #27322d;
  line-height: 1.4;
}

.event time {
  color: #91a099;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 32rem) {
  .event {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }

  .event time {
    font-size: 0.82rem;
  }
}

.event-success span::before,
.event-warning span::before,
.event-error span::before {
  margin-right: 0.45rem;
  font-weight: 900;
}

.event-success span::before {
  content: "✓";
  color: #9ce7b4;
}

.event-warning span::before {
  content: "!";
  color: #f1d58e;
}

.event-error span::before {
  content: "×";
  color: #f0a2a2;
}

.empty-state,
.log-privacy {
  margin: 1.25rem 0 0;
  color: #91a099;
}

#log-older {
  width: 100%;
  margin-top: 1rem;
  border: 1px solid #4f7d5e;
  background: #173321;
  color: #b8efc8;
}

.log-privacy {
  text-align: center;
}

.action-message {
  margin: 1rem 0 0;
  color: #b8efc8;
  line-height: 1.45;
}

.warning {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid #725d2f;
  border-radius: 0.85rem;
  background: #2c2514;
  color: #f1d58e;
  line-height: 1.45;
}

.logout-form {
  margin-top: 1.5rem;
  text-align: center;
}

.text-button {
  min-height: 2.75rem;
  border: 0;
  background: transparent;
  color: #91a099;
  cursor: pointer;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.25rem;
}

.login-card {
  width: min(100%, 28rem);
  padding: 2rem;
  border: 1px solid #27322d;
  border-radius: 1.35rem;
  background: #111714;
}

.login-card h1 {
  margin-bottom: 1rem;
  font-size: 2rem;
  line-height: 1.1;
}

.login-card > p:not(.eyebrow) {
  color: #aeb9b3;
  line-height: 1.55;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 1.5rem 0 1rem;
}

.privacy-note {
  margin-bottom: 0;
  font-size: 0.8rem;
}

.legal-link {
  display: block;
  margin-top: 1rem;
  color: #91a099;
  font-size: 0.82rem;
  text-align: center;
}

.legal-page section {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid #27322d;
  border-radius: 1.2rem;
  background: #111714;
}

.legal-page h2 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.legal-page p {
  margin-bottom: 0.85rem;
  color: #aeb9b3;
  line-height: 1.6;
}

.legal-page p:last-child {
  margin-bottom: 0;
}

.legal-page a {
  color: #b8efc8;
}

@media (min-width: 44rem) {
  .candidate-button {
    grid-template-columns: minmax(14rem, 1fr) minmax(22rem, 1.3fr);
    align-items: center;
    gap: 0.35rem 1.25rem;
    padding: 0.85rem 1.2rem;
  }

  .candidate-metrics {
    grid-column: 2;
    grid-row: 1;
  }

  .candidate-facts {
    grid-column: 1 / -1;
  }

  .candidate-metric strong {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
  }
}

@media (max-width: 24rem) {
  .history-destination-card {
    grid-template-columns: 1fr;
  }

  .destination-map-link {
    min-height: 2.8rem;
  }

  .planner-actions {
    grid-template-columns: 1fr;
  }

  .arrival-field {
    align-items: flex-start;
    padding: 0.75rem 0;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .metric span {
    margin-bottom: 0;
  }

  .freshness {
    align-items: flex-start;
    flex-direction: column;
  }

  .recording-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .recording-status > p {
    text-align: left;
  }

  .freshness-actions {
    width: 100%;
  }

  #ping,
  #refresh {
    flex: 1;
  }

  .log-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .log-status-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .candidate-button {
    padding: 0.65rem 0.75rem 0.6rem;
  }

  .candidate-metrics {
    grid-template-columns: minmax(4.7rem, 1fr) minmax(4.7rem, 1fr) minmax(3.9rem, 0.78fr);
  }

  .candidate-metric strong {
    font-size: clamp(1.35rem, 6.5vw, 1.8rem);
  }
}
