body.speed-project:not(.sp-editor) [data-sp-edit],
body.speed-project #pacing-input-field,
body.speed-project #utmb-field,
body.speed-project #pace-correction-block,
body.speed-project :is(.account-required-badge, .cms-admin-badge, .cms-builder-panel) {
  display: none !important;
}
body.speed-project:not(.sp-editor) .nutri-card input,
body.speed-project:not(.sp-editor) .nutri-card select,
body.speed-project:not(.sp-editor) [id^="nutri-"]:is(input, select) {
  pointer-events: none;
}

.sp-breadcrumb { font-size: .875rem; color: #405b73; margin: 0 0 8px; }
.speed-project .hero .sp-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .12em; margin: 0 0 9px; }
.sp-project-bar, .sp-section-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sp-project-bar p, .sp-section-head p { margin: 4px 0 0; }
.sp-project-bar [data-error="true"] { color: #982a21; font-weight: 700; }
.sp-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sp-actions a { color: #13568b; font-weight: 700; }
.sp-team { margin-block: 20px 14px; }
.sp-team h3, .sp-section-head h2 { margin: 0 0 8px; }
.sp-cars, .sp-runners { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px; }
.sp-cars { grid-template-columns: repeat(2, minmax(0, 225px)); margin-bottom: 10px; }
.sp-car, .sp-runner { padding: 12px; border: 1px solid #cbdfee; background: #f7fbff; border-radius: 10px; min-width: 0; overflow-wrap: anywhere; }
.sp-runner h4, .sp-runner p { margin: 0 0 5px; }
.sp-field { display: grid; gap: 3px; margin: 6px 0; font-size: .82rem; font-weight: 700; }
.speed-project .sp-field :is(input, select), .speed-project .sp-relays :is(input, select) {
  border: 1px solid #9bb6cb; border-radius: 7px; background: white; color: #173b59; padding: 7px;
  font: inherit; width: 100%; min-width: 0; box-sizing: border-box;
}
.sp-table-wrap { overflow: auto; }
.sp-table-wrap th:first-child { min-width: 180px; }
.sp-table-wrap small { display: block; color: #415d74; font-weight: 500; }
.sp-table-wrap select { min-width: 128px !important; }
.sp-table-wrap input { min-width: 70px !important; }
.sp-directions { display: flex; gap: 4px; flex-wrap: wrap; margin-block: 4px; }
.sp-directions a, .speed-project .leaflet-container .sp-directions a {
  display: inline-block; text-decoration: none; white-space: nowrap; font-weight: 700; font-size: .78rem;
  color: #104a79; background: #f0f7fd; border: 1px solid #a8c4d9; border-radius: 6px; padding: 5px 8px;
}
.sp-directions a:hover, .sp-directions a:focus-visible { background: #dceefa; text-decoration: underline; }
#sp-rotation-view { scroll-margin-top: 155px; }
#sp-rotation-jump[hidden] { display: none; }
#sp-legs > tr[hidden] { display: none; }
.sp-car-filter {
  margin: 0 0 12px; padding: 10px; border: 1px solid #c6d9e9; border-radius: 10px;
  background: #f7fbff;
}
.sp-car-filter-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px;
  margin-bottom: 7px; color: #173b59;
}
#sp-car-count { color: #405b73; font-size: .8rem; font-variant-numeric: tabular-nums; }
.sp-car-filter-options { display: flex; flex-wrap: wrap; gap: 5px; }
.sp-car-filter-options button {
  min-height: 44px; max-width: 100%; padding: 6px 10px; border: 1px solid #9fbbd2;
  border-radius: 7px; background: #fff; color: #104a79; font: inherit; font-size: .875rem;
  font-weight: 700; cursor: pointer; overflow-wrap: anywhere;
}
.sp-car-filter-options button:hover { background: #e5f1fb; }
.sp-car-filter-options button[aria-pressed="true"] { border-color: #136299; background: #136299; color: #fff; }
.sp-car-filter-options button:focus-visible { outline: 2px solid #165b8e; outline-offset: 2px; }
.sp-leg-travel { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 7px; }
.sp-leg-eta {
  display: grid; align-content: center; gap: 2px; min-height: 44px; box-sizing: border-box;
  padding: 5px 8px; border: 1px solid #99b9d1; border-radius: 7px; background: #eaf5fe; color: #123e62;
  white-space: nowrap;
}
.sp-leg-eta span { font-size: .68rem; font-weight: 700; }
.sp-leg-eta-value { font-size: .95rem; font-variant-numeric: tabular-nums; line-height: 1; }
.sp-leg-nav .sp-directions { margin: 0; }
.sp-leg-field-label, .sp-leg-note:empty { display: none; }
@media (min-width: 901px) {
  #sp-relay-table th:first-child { min-width: 334px; }
  .speed-project .ravito-row, .speed-project .ravito-head {
    grid-template-columns: 44px minmax(130px, 1.5fr) minmax(65px, .55fr) minmax(145px, 1fr) 105px auto;
  }
}
@media (max-width: 560px) {
  .sp-project-bar .sp-actions { width: 100%; }
  .sp-directions a, .speed-project .leaflet-container .sp-directions a { padding: 9px 8px; }
}

.speed-project #map-section { scroll-margin-top: 155px; }
.speed-project .sp-leg-map {
  background: none; border: 0; padding: 5px 0; color: #104a79;
  font: inherit; font-size: .78rem; text-decoration: underline; cursor: pointer;
}
.speed-project .leaflet-marker-icon.ravito-drag-marker.sp-handoff-marker > span {
  box-sizing: border-box; display: grid; place-items: center; width: 30px; height: 30px;
  background: #6736a5; color: white; border: 2px solid #fff; font: 700 10px/1 system-ui, sans-serif;
}
.speed-project .leaflet-marker-icon.ravito-drag-marker.sp-skipped-marker > span { background: #58616f; }
.speed-project .leaflet-marker-icon.ravito-drag-marker.is-editing > span { width: 34px; height: 34px; background: #9a3518; }
.speed-project .leaflet-marker-icon.ravito-drag-marker:not(.is-editing) { cursor: pointer; }

.sp-replan { padding: 14px; margin-top: 12px; border: 1px solid #cbdfee; border-radius: 10px; background: #f7fbff; }
.sp-replan h3 { margin: 0 0 8px; }
.sp-replan-fields { display: grid; grid-template-columns: minmax(130px, .6fr) minmax(0, 1.4fr); gap: 10px; margin-bottom: 8px; }
.sp-replan .sp-actions button { min-height: 42px; }
.sp-unavailable { display: flex; align-items: center; gap: 6px; margin: 9px 0 0; font-size: .82rem; font-weight: 700; cursor: pointer; }
.sp-coherence { margin: 8px 0 12px; color: #8a2424; padding: 8px 12px 8px 31px; background: #fff2ee; border-radius: 8px; }
.sp-leg-problem th, .sp-leg-problem td { background: #fff7f2; }
.sp-leg-problem .sp-leg-note { color: #8a2424; font-weight: 700; }
.sp-runner-summary .sp-table-wrap th:first-child { min-width: 115px; }
.sp-runner-summary td { white-space: nowrap; }
.speed-project .sp-relays :disabled { opacity: .65; }
@media (max-width: 560px) {
  .sp-replan-fields { grid-template-columns: 1fr; gap: 2px; }
  .sp-replan .sp-actions button { width: 100%; }
}

@media (max-width: 900px) {
  #sp-leg-results { overflow: visible; }
  .sp-car-filter-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-car-filter-options button { padding-inline: 5px; }
  #sp-relay-table:not([hidden]), #sp-legs { display: block; width: 100%; min-width: 0; }
  #sp-relay-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  #sp-legs tr {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px;
    padding: 11px; margin: 0 0 10px; border: 1px solid #c6d9e9; border-radius: 11px; background: #fff;
  }
  .sp-editor #sp-legs tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sp-legs tr.sp-leg-problem { background: #fff7f2; }
  #sp-legs th, #sp-legs td {
    min-width: 0; padding: 0; border: 0; background: transparent; text-align: left;
    white-space: normal; overflow-wrap: anywhere;
  }
  #sp-legs th { grid-column: 1 / -1; padding-bottom: 7px; border-bottom: 1px solid #dce8f2; }
  #sp-legs td { font-size: .875rem; }
  .sp-leg-field-label { display: block; margin-bottom: 2px; color: #405b73; font-size: .72rem; }
  #sp-legs :is(input, select) { min-width: 0 !important; min-height: 40px; font-size: 16px; }
  #sp-legs .sp-leg-nav a {
    display: inline-flex; align-items: center; box-sizing: border-box; min-height: 44px; padding: 5px 7px;
  }
  #sp-rotation-jump { display: inline-flex; align-items: center; min-height: 44px; }
  .speed-project .sp-leg-map { min-height: 32px; }
}
