:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #183c34;
  background: #f8faf7;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button,
select {
  min-height: 44px;
}
button {
  border: 1px solid #d6dfd8;
  background: white;
  color: #183c34;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 650;
}
button:hover {
  background: #edf3ed;
}
a {
  color: #205e4c;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #c6802d;
  outline-offset: 3px;
}
header {
  height: 88px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #dee5df;
  background: #fff;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-weight: 750;
  font-size: 21px;
  letter-spacing: -0.6px;
}
.brandmark {
  display: grid;
  place-items: center;
  background: #173f36;
  color: #d5ef9a;
  width: 42px;
  height: 46px;
  border-radius: 13px;
  font-size: 32px;
}
.brand-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 3.5px;
  margin-top: 4px;
}
.edition {
  margin-left: auto;
  color: #66776e;
  font-size: 12px;
  text-align: right;
}
.edition b {
  display: block;
  letter-spacing: 1.4px;
  font-size: 9px;
  margin-top: 6px;
}
.outline {
  font-size: 12px;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  height: calc(100dvh - 88px);
}
.map-area {
  position: relative;
  background: #dce8db;
  min-height: 390px;
}
#map {
  height: 100%;
  width: 100%;
  z-index: 0;
}
.map-heading {
  position: absolute;
  top: 26px;
  left: 26px;
  pointer-events: none;
  z-index: 400;
  padding: 20px 24px;
  border-radius: 15px;
  background: rgba(255, 255, 252, 0.94);
  box-shadow: 0 4px 30px #183c3410;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.7px;
  color: #647b67;
}
h1 {
  font-size: 27px;
  line-height: 1.17;
  letter-spacing: -1px;
  margin: 12px 0 0;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.8px;
  margin: 10px 0;
}
h3 {
  font-size: 13px;
  margin: 24px 0 12px;
}
p {
  font-size: 13px;
  line-height: 1.6;
  color: #61726a;
}
.map-tools {
  position: absolute;
  bottom: 55px;
  left: 22px;
  z-index: 400;
  display: flex;
  gap: 8px;
  box-shadow: 0 3px 15px #183c3412;
}
.map-tools button {
  font-size: 13px;
}
#map-status {
  position: absolute;
  bottom: 24px;
  left: 22px;
  max-width: 75%;
  z-index: 400;
  font-size: 11px;
  background: #fff;
  padding: 4px 9px;
  border-radius: 5px;
}
aside {
  padding: 26px;
  overflow: auto;
  background: #fbfcf9;
}
.panel-heading p {
  margin: 7px 0 22px;
}
.search-label {
  font-size: 11px;
  font-weight: 650;
  display: block;
  margin-bottom: 8px;
}
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dce3da;
  border-radius: 9px;
  background: #fff;
  color: #25483d;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.notice {
  display: flex;
  gap: 10px;
  background: #eff3e8;
  border: 1px solid #dfe7d4;
  padding: 14px;
  border-radius: 10px;
  margin-top: 20px;
}
.notice strong {
  font-size: 11px;
}
.notice p {
  font-size: 11px;
  margin: 4px 0 0;
}
.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 6px;
  border-radius: 50%;
  background: #89935f;
}
.layer-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 7px 0;
  border: 1px solid #e1e7df;
  border-radius: 12px;
  background: white;
  padding: 4px 10px 4px 4px;
}
.layer-row.active {
  border-color: #759880;
  background: #f3f7ef;
}
.layer-select {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px;
  font-weight: 600;
}
.mode-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--tint);
  color: var(--color);
  font-size: 19px;
}
.layer-select small {
  display: block;
  color: #728075;
  font-size: 10px;
  font-weight: 400;
  margin-top: 3px;
}
.toggle {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px;
  min-height: 44px;
}
.toggle input {
  width: 19px;
  height: 19px;
  accent-color: #356c51;
  cursor: pointer;
}
.detail-card {
  margin-top: 21px;
  padding-top: 3px;
  border-top: 1px solid #dce3d9;
}
.detail-card p {
  font-size: 12px;
}
.detail-card a {
  display: inline-block;
  margin: 6px 0;
  font-size: 12px;
  font-weight: 650;
}
.tag {
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 5px 7px;
  background: #edf0e9;
  border-radius: 4px;
}
.primary {
  background: #173f36;
  color: white;
  border-color: #173f36;
  width: 100%;
  margin-top: 10px;
}
.primary:hover {
  background: #2d5a45;
}
.panel-footer {
  margin-top: 28px;
  border-top: 1px solid #e2e7df;
  padding-top: 14px;
}
.panel-footer button {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 11px;
}
.panel-footer span {
  display: block;
  font-size: 10px;
  color: #859184;
  margin: 6px 0;
}
.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: 0 3px 12px #19372b22 !important;
}
.leaflet-popup-content {
  font-family: inherit;
  line-height: 1.6;
}
.place-marker {
  border-radius: 50%;
  border: 3px solid white;
  background: var(--color);
  box-shadow: 0 2px 7px #173f3640;
}
.draft {
  border-top: 1px solid #dce3d9;
  padding: 12px 0;
  overflow-wrap: anywhere;
}
.draft strong {
  font-size: 12px;
}
.draft button {
  font-size: 11px;
}
dialog {
  border: 1px solid #d5dfd2;
  border-radius: 18px;
  padding: 26px;
  max-width: 470px;
  width: calc(100% - 28px);
  max-height: 85dvh;
  color: #183c34;
}
dialog::backdrop {
  background: #102a26a8;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
dialog label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 16px 0 8px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #173f36;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  z-index: 2000;
  font-size: 13px;
  max-width: 90%;
  box-shadow: 0 4px 20px #0003;
}
#toast:empty {
  display: none;
}
.skip {
  position: absolute;
  top: -100px;
  z-index: 3000;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 0;
}
@media (min-width: 1300px) {
  main {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
  aside {
    padding: 30px;
  }
}
@media (max-width: 760px) {
  header {
    height: 72px;
    padding: 0 16px;
    gap: 10px;
  }
  .brand {
    font-size: 17px;
  }
  .brandmark {
    width: 34px;
    height: 39px;
    font-size: 27px;
  }
  .brand-sub {
    font-size: 8px;
  }
  .edition {
    display: none;
  }
  #install {
    margin-left: auto;
    font-size: 11px;
  }
  main {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .map-area {
    height: 47dvh;
    min-height: 350px;
  }
  .map-heading {
    top: 14px;
    left: 14px;
    padding: 13px 16px;
  }
  h1 {
    font-size: 21px;
  }
  .map-heading .eyebrow {
    font-size: 8px;
  }
  .map-tools {
    left: 14px;
    bottom: 49px;
  }
  #map-status {
    left: 14px;
    bottom: 22px;
    font-size: 10px;
  }
  aside {
    padding: 24px 20px;
    overflow: visible;
  }
  .panel-heading h2 {
    font-size: 27px;
  }
  #layers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .layer-row {
    margin: 0;
    padding: 3px;
  }
  .layer-select {
    gap: 6px;
    padding: 5px;
    font-size: 12px;
  }
  .mode-icon {
    width: 27px;
    height: 30px;
    font-size: 16px;
  }
  .toggle {
    padding: 3px;
  }
  .layer-select small {
    font-size: 9px;
  }
  .panel-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.route-prototype { margin: 18px 0; padding: 14px; border: 1px solid #d9e3d8; border-radius: 12px; background: #f5f8f1; }
.route-prototype h3 { margin: 8px 0 5px; font-size: 14px; }
.route-prototype p { margin: 5px 0 10px; font-size: 11px; }
.route-prototype button { width: 100%; }
#route-status { color: #35594d; font-weight: 600; }

.route-fields { display: grid; grid-template-columns: 48px 1fr; gap: 8px 10px; align-items: center; margin: 12px 0; }
.route-fields label { font-size: 11px; font-weight: 700; }
.route-fields select { min-height: 42px; padding: 9px 10px; }

.commute-card {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #d9e3d8;
  border-radius: 12px;
  background: #fff;
}
.commute-card h3 {
  margin: 8px 0 5px;
  font-size: 14px;
}
.commute-card p {
  margin: 5px 0 10px;
  font-size: 11px;
}
.commute-card button {
  width: 100%;
}
.commute-card small,
.privacy-note {
  display: block;
  margin-top: 9px;
  font-size: 10px;
  line-height: 1.5;
  color: #6e7c73;
}
.commute-modes {
  border: 0;
  padding: 0;
  margin: 16px 0 0;
}
.commute-modes legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.commute-modes label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 4px 10px 4px 0;
  min-height: 40px;
  font-weight: 500;
}
.commute-modes input {
  width: 19px;
  height: 19px;
  accent-color: #356c51;
}
.optional {
  font-weight: 400;
  color: #7b877f;
}
#commute-status {
  min-height: 18px;
  font-size: 11px;
  font-weight: 600;
  color: #35594d;
}

.insights-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
}
.insights-page {
  background: #f8faf7;
}
.insights-home {
  margin-left: auto;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.insights-main {
  display: block;
  height: auto;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 60px;
}
.insights-hero {
  max-width: 760px;
  margin-bottom: 28px;
}
.insights-hero h1 {
  font-size: clamp(32px, 6vw, 54px);
  margin: 10px 0;
}
.insights-stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 20px 0 6px;
}
.insights-stat strong {
  font-size: 38px;
  letter-spacing: -1px;
}
.insights-stat span {
  color: #61726a;
  font-size: 13px;
}
.insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
}
.insight-panel {
  background: #fff;
  border: 1px solid #dfe6dd;
  border-radius: 14px;
  padding: 20px;
  min-width: 0;
}
.insight-routes {
  grid-row: span 2;
}
.insight-heading h2 {
  margin: 7px 0 18px;
  font-size: 20px;
}
.insights-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.insights-table th,
.insights-table td {
  padding: 11px 8px;
  border-bottom: 1px solid #e6ebe4;
  text-align: left;
}
.insights-table th:last-child,
.insights-table td:last-child {
  text-align: right;
  width: 90px;
}
.insight-bar-row {
  margin: 12px 0;
}
.insight-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 5px;
}
.insight-bar-track {
  height: 9px;
  background: #edf1eb;
  border-radius: 999px;
  overflow: hidden;
}
.insight-bar-fill {
  height: 100%;
  background: #547c68;
  border-radius: inherit;
}
.insights-empty {
  margin: 0;
  padding: 16px 0;
  font-size: 12px;
}
.insights-note {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid #dfe7d4;
  background: #eff3e8;
  border-radius: 12px;
}
.insights-note h2 {
  margin: 0 0 6px;
  font-size: 16px;
}
.insights-note p {
  margin: 0;
}
@media (max-width: 760px) {
  .insights-main {
    padding: 24px 18px 48px;
  }
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .insight-routes {
    grid-row: auto;
  }
  .insights-home {
    font-size: 11px;
  }
}

.commute-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.insights-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 18px;
}
.insights-controls label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #61726a;
}
.insights-controls button {
  min-width: 118px;
}
.insights-controls button:disabled {
  opacity: 0.5;
  cursor: default;
}
.flow-panel {
  background: #fff;
  border: 1px solid #dfe6dd;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}
.flow-panel .insight-heading h2 {
  margin-bottom: 5px;
}
.flow-panel .insight-heading p {
  margin: 0 0 14px;
  font-size: 11px;
}
#flow-visual {
  overflow-x: auto;
}
.flow-svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
}
.flow-line {
  fill: none;
  stroke: #547c68;
  stroke-linecap: round;
  opacity: 0.58;
}
.flow-label {
  fill: #25483d;
  font-size: 13px;
  font-family: inherit;
}
.ranked-reason {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}
.reason-rank {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #edf3ed;
  font-size: 11px;
  font-weight: 750;
  color: #35594d;
}
@media (max-width: 900px) {
  .insights-controls {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .insights-controls {
    grid-template-columns: 1fr;
  }
  .insights-controls button {
    width: 100%;
  }
}

/* Commute overview is scoped to its separate page. */
.demand-overview { margin: 24px 0; }
.demand-overview > p { max-width: 78ch; line-height: 1.6; color: #4d625a; }
.demand-stats { display: flex; flex-wrap: wrap; gap: 32px; margin: 22px 0; }
.demand-stats strong { display: block; font-size: 32px; color: #173f36; }
.demand-stats span { display: block; font-size: 13px; margin-top: 5px; }
.flow-line:hover, .flow-line:focus { opacity: 1; stroke: #b16328; outline: none; }
.insights-page .insight-panel h3 { margin-top: 0; }
.demand-overview .insights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) {
  .demand-overview .insights-grid { grid-template-columns: 1fr; }
}

/* Everyday cycling planner */
.cycle-pin-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cycle-pin-buttons button { flex: 1; font-size: 11px; padding: 8px; }
.cycle-pin-buttons [hidden] { display: none; }
.route-prototype .cycle-check { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 12px; }
.cycle-check input { width: 17px; height: 17px; flex: 0 0 auto; }
.route-prototype #cycle-results p, .cycle-notices p { line-height: 1.55; font-size: 12px; }
#cycle-results h4 { margin: 14px 0 6px; font-size: 16px; }
.cycle-warning { background: #fff0de; border-left: 3px solid #bd5900; padding: 10px; color: #713300; }
.cycle-notices, #cycle-results details { margin: 14px 0; font-size: 12px; }
.cycle-notices summary, #cycle-results summary { cursor: pointer; font-weight: 700; }
.cycle-notices a { display: block; margin: 10px 0; }
#cycle-results ol { padding-left: 20px; max-height: 280px; overflow-y: auto; }
#cycle-results li { padding: 5px 0; line-height: 1.4; }
.cycle-legend { font-size: 11px; line-height: 1.6; }
.legend-path { color: #2f7d5b; }.legend-road { color: #236bb0; }.legend-busy { color: #a84b00; }.legend-walk { color: #7b4190; }
.picking-cycle-point { cursor: crosshair; }


/* Journey-first home UX */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.transport-shell {
  grid-template-columns: minmax(0, 1fr) 430px;
}
.journey-search-card {
  position: absolute;
  z-index: 450;
  top: 26px;
  left: 26px;
  width: min(520px, calc(100% - 52px));
  padding: 18px;
  border: 1px solid #dfe6dd;
  border-radius: 16px;
  background: rgba(255,255,252,.96);
  box-shadow: 0 7px 32px #173f3624;
  backdrop-filter: blur(8px);
}
.journey-search-card h1 {
  margin: 6px 0 12px;
  font-size: 28px;
}
.journey-search-card p {
  margin: 10px 2px 0;
  max-width: 62ch;
  font-size: 11px;
}
.destination-search {
  min-height: 52px;
  border: 2px solid #9caf9f;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 650;
  background: #fff;
}
.journey-panel {
  padding: 0;
  background: #f7f9f5;
}
.panel-section {
  padding: 24px 26px;
  border-bottom: 1px solid #e0e6df;
}
.section-heading h2 {
  margin: 6px 0;
  font-size: 24px;
}
.section-heading p {
  margin: 6px 0 0;
  font-size: 12px;
}
.compact-heading h2 {
  font-size: 18px;
}
.route-prototype {
  margin: 18px 0 0;
  padding: 16px;
  background: #fff;
  border-color: #dce5dc;
}
.mode-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mode-chip {
  font-size: 12px;
  font-weight: 750;
}
.journey-action {
  margin-top: 8px;
}
.future-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.future-modes div {
  padding: 11px 12px;
  border: 1px solid #e0e6df;
  border-radius: 10px;
  background: #fbfcfa;
}
.future-modes span {
  display: block;
  font-size: 12px;
  font-weight: 700;
}
.future-modes small {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.4;
  color: #7b887f;
}
.network-section .notice {
  margin-top: 14px;
}
.layers-drawer {
  margin-top: 12px;
  border: 1px solid #dce4da;
  border-radius: 11px;
  background: #fff;
}
.layers-drawer > summary {
  cursor: pointer;
  padding: 13px 14px;
  font-size: 12px;
  font-weight: 750;
  list-style-position: inside;
}
.layers-drawer[open] > summary {
  border-bottom: 1px solid #e4e9e2;
}
.layers-drawer #layers,
.layers-drawer #details {
  padding-left: 12px;
  padding-right: 12px;
}
.layers-drawer #details {
  padding-bottom: 12px;
}
.community-section {
  background: #fff;
}
.community-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.community-actions .primary {
  margin-top: 0;
}
.button-link {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  border: 1px solid #d6dfd8;
  border-radius: 10px;
  background: #fff;
  color: #183c34;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.button-link:hover {
  background: #edf3ed;
}
.panel-footer {
  margin-top: 0;
  padding: 18px 26px 26px;
  border-top: 0;
}
@media (max-width: 760px) {
  .transport-shell {
    display: flex;
    flex-direction: column;
  }
  .map-area {
    height: 58dvh;
    min-height: 430px;
  }
  .journey-search-card {
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
    padding: 14px;
  }
  .journey-search-card .eyebrow {
    font-size: 8px;
  }
  .journey-search-card h1 {
    margin: 4px 0 9px;
    font-size: 22px;
  }
  .journey-search-card p {
    display: none;
  }
  .destination-search {
    min-height: 48px;
    font-size: 14px;
  }
  .map-tools {
    bottom: 50px;
  }
  .journey-panel {
    margin-top: -16px;
    position: relative;
    z-index: 500;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 28px #173f3618;
    background: #f7f9f5;
  }
  .panel-section {
    padding: 22px 18px;
  }
  .journey-section {
    padding-top: 26px;
  }
  .future-modes {
    grid-template-columns: 1fr 1fr;
  }
  .layers-drawer #layers {
    display: block;
  }
  .layer-row {
    margin: 7px 0;
  }
  .panel-footer {
    padding: 18px 18px calc(26px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 430px) {
  .future-modes {
    grid-template-columns: 1fr;
  }
}


/* Mobile map/search simplification */
.map-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: center;
}
.search-locate {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 12px;
  font-size: 20px;
}
.selected-destination {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 10px 11px;
  border: 1px solid #dfe6dd;
  border-radius: 10px;
  background: #f8faf7;
}
.selected-destination span {
  font-size: 11px;
  font-weight: 700;
  color: #61726a;
}
.selected-destination strong {
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
}
.selected-destination button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 10px;
}
.route-fields-single {
  grid-template-columns: 48px 1fr;
}
@media (max-width: 760px) {
  .map-area {
    height: 68dvh;
    min-height: 500px;
  }
  .journey-search-card {
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .map-search-row {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 7px;
  }
  .destination-search {
    min-height: 46px;
    height: 46px;
    padding: 10px 12px;
    border: 1px solid #cfd9d0;
    border-radius: 12px;
    box-shadow: 0 3px 14px #173f3622;
    font-size: 14px;
  }
  .search-locate {
    width: 46px;
    min-width: 46px;
    height: 46px;
    background: #fff;
    box-shadow: 0 3px 14px #173f3622;
  }
  .map-tools {
    left: 12px;
    bottom: 48px;
  }
  .map-tools #reset {
    min-height: 38px;
    padding: 7px 10px;
    font-size: 11px;
  }
  .journey-panel {
    margin-top: -12px;
  }
  .journey-section .section-heading p {
    margin-bottom: 4px;
  }
}
@media (max-width: 430px) {
  .map-area {
    height: 70dvh;
    min-height: 520px;
  }
}


/* Compact journey card */
.compact-mode-heading {
  margin-bottom: 10px;
}
.mode-icon-only {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #e9f3ec;
  font-size: 20px;
}
.cancel-map-pick {
  margin: 6px 0 0;
  font-size: 11px;
}
.route-icon-button {
  width: 46px !important;
  min-width: 46px;
  height: 44px;
  margin: 10px 0 2px auto !important;
  padding: 0 !important;
  border-radius: 12px;
  font-size: 21px;
  line-height: 1;
}
.route-prototype > select#route-variant {
  margin-top: 4px;
}
.cycle-notices .cycle-legend {
  margin: 10px 0 12px;
}
@media (max-width: 760px) {
  .route-prototype {
    padding: 14px;
  }
  .selected-destination {
    margin-top: 6px;
  }
}


/* Matched journey controls */
.journey-section {
  padding-top: 18px;
}
.route-location-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 8px 0;
}
.route-location-row label,
.route-location-label {
  font-size: 11px;
  font-weight: 700;
  color: #183c34;
}
.route-location-control {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #dce3da;
  border-radius: 9px;
  background: #fff;
  color: #25483d;
  font-size: 12px;
  font-weight: 600;
}
.route-location-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}
.route-location-button:hover {
  background: #f7faf6;
}
.route-plan-button {
  width: 100% !important;
  min-height: 46px;
  margin: 10px 0 2px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}
@media (max-width: 760px) {
  .journey-section {
    padding-top: 16px;
  }
  .route-prototype {
    margin-top: 0;
  }
}


/* Ultra-clean map + routing card */
.map-locate-button {
  position: absolute;
  right: 14px;
  bottom: 18px;
  z-index: 450;
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 14px #173f3626;
  font-size: 20px;
}
.route-prototype {
  margin-top: 0;
}
.route-preference {
  margin-top: 8px;
}
.routing-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e4e9e2;
}
.routing-meta small {
  margin: 0;
  font-size: 9px;
  line-height: 1.4;
  color: #7b877f;
}
.routing-meta .tag {
  flex: none;
}
@media (max-width: 760px) {
  .map-locate-button {
    right: 12px;
    bottom: 16px;
  }
  #map-status {
    left: 12px;
    right: 70px;
    bottom: 18px;
    max-width: none;
  }
  .journey-section {
    padding-top: 14px;
  }
}


/* Mobile first-screen journey layout */
@media (max-width: 760px) {
  .route-advanced-option {
    display: none !important;
  }

  .map-area {
    height: calc(100dvh - 72px - 196px);
    min-height: 300px;
  }

  .journey-panel {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .journey-section {
    min-height: 196px;
    padding: 10px 14px 12px;
    background: #f7f9f5;
  }

  .route-prototype {
    min-height: 174px;
    padding: 8px 10px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
  }

  .route-location-row {
    margin: 4px 0;
  }

  .route-location-control {
    min-height: 42px;
  }

  .cancel-map-pick {
    margin: 3px 0 0;
  }

  #pick-status,
  #network-status {
    margin: 0;
    min-height: 0;
  }

  .route-plan-button {
    order: 10;
    margin-top: auto !important;
    min-height: 46px;
  }

  .route-preference {
    order: 11;
    min-height: 38px;
    margin-top: 6px;
    padding: 7px 10px;
    font-size: 11px;
  }

  #cycle-results {
    order: 12;
  }

  .cycle-notices,
  .routing-meta {
    order: 13;
  }

  .map-locate-button {
    display: grid !important;
    place-items: center;
    right: 14px;
    bottom: 14px;
    z-index: 1200 !important;
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #d2dcd4;
    border-radius: 50%;
    background: #fff !important;
    color: #173f36 !important;
    box-shadow: 0 4px 18px #102a2640;
    font-size: 22px;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #map-status {
    left: 12px;
    right: 76px;
    bottom: 16px;
    max-width: none;
  }

  .future-modes,
  .network-section,
  .community-section,
  .panel-footer {
    position: relative;
  }
}

@media (max-width: 430px) {
  .map-area {
    height: calc(100dvh - 72px - 196px);
    min-height: 300px;
  }
}


@media (max-width: 760px) {
  .route-preference {
    order: 9;
    margin-top: 5px;
  }
  .route-plan-button {
    order: 10;
    margin-top: auto !important;
    margin-bottom: 0 !important;
  }
}


/* Compact planned-route result */
.route-result-summary {
  margin-top: 10px;
  padding: 10px 0 2px;
}
.route-result-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}
.route-result-primary strong {
  font-size: 18px;
}
.route-result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.route-result-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #dce4da;
  border-radius: 999px;
  background: #f8faf7;
  font-size: 10px;
}
.route-result-chip strong {
  font-size: 10px;
}
.route-result-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #fff0de;
  color: #713300;
  font-size: 10px;
  font-weight: 700;
}
.route-result-details {
  margin-top: 10px;
  font-size: 11px;
}
.route-result-details > summary,
.route-sections > summary {
  cursor: pointer;
  font-weight: 700;
}
.route-result-meta {
  margin-top: 8px;
}
.route-result-meta p {
  margin: 4px 0;
  font-size: 10px;
  line-height: 1.4;
}
.route-sections {
  margin-top: 8px;
}
.route-sections ol {
  padding-left: 20px;
  max-height: 220px;
  overflow-y: auto;
}
.route-sections li {
  padding: 4px 0;
  font-size: 10px;
  line-height: 1.35;
}
@media (max-width: 760px) {
  .route-result-summary {
    padding-top: 8px;
  }
  .route-result-chips {
    gap: 6px;
  }
}


/* Route elevation profile */
.route-elevation {
  margin: 10px 0 4px;
}
.route-elevation-loading,
.route-elevation-unavailable {
  min-height: 48px;
  display: grid;
  place-items: center;
  color: #7b877f;
  font-size: 11px;
}
.route-elevation-stats {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 3px;
  font-size: 10px;
  color: #61726a;
}
.route-elevation-stats strong {
  color: #183c34;
}
.route-elevation-svg {
  display: block;
  width: 100%;
  height: 76px;
  overflow: visible;
}
.route-elevation-baseline {
  stroke: #dfe6df;
  stroke-width: 1;
}
.route-elevation-line {
  stroke-width: 5;
  stroke-linecap: round;
}
.route-elevation-path {
  stroke: #2f7d5b;
}
.route-elevation-road {
  stroke: #236bb0;
}
.route-elevation-busy {
  stroke: #a84b00;
}
.route-elevation-walk {
  stroke: #7b4190;
}
.route-elevation-unsealed {
  stroke-dasharray: 6 5;
}
.route-elevation-key {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: -3px;
  font-size: 15px;
  line-height: 1;
}
.route-elevation-key .key-path { color: #2f7d5b; }
.route-elevation-key .key-road { color: #236bb0; }
.route-elevation-key .key-busy { color: #a84b00; }
.route-elevation-key .key-walk { color: #7b4190; }
@media (max-width: 760px) {
  .route-elevation-svg {
    height: 68px;
  }
  .route-elevation {
    margin-top: 8px;
  }
}


/* Route export */
.route-result-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.route-export-button {
  min-height: 36px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9px;
  font-size: 11px;
}
.route-export-button:disabled {
  opacity: .55;
  cursor: default;
}
@media (max-width: 760px) {
  .route-result-actions {
    margin-top: 5px;
  }
}


/* Floating map layers */
.map-layers-control {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1200;
}
.map-layers-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 14px #173f3626;
  font-size: 12px;
}
.map-layers-panel {
  position: absolute;
  top: 50px;
  left: 0;
  width: min(260px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid #d8e1da;
  border-radius: 12px;
  background: rgba(255,255,252,.98);
  box-shadow: 0 8px 28px #102a2630;
  backdrop-filter: blur(8px);
}
.map-layers-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px 6px 8px;
  font-size: 11px;
}
.map-layers-heading #map-layers-close {
  min-height: 32px;
  width: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 18px;
}
.map-layer-row {
  margin: 4px 0;
  padding: 4px;
  border-radius: 9px;
}
.map-layer-row .layer-select {
  padding: 5px 6px;
  font-size: 12px;
}
.map-layer-row .mode-icon {
  width: 29px;
  height: 29px;
  font-size: 16px;
}
.map-layer-row .toggle {
  padding: 4px;
}
@media (max-width: 760px) {
  .map-layers-control {
    top: 10px;
    left: 10px;
  }
  .map-layers-button {
    min-height: 40px;
    padding: 7px 10px;
  }
  .map-layers-panel {
    top: 46px;
    width: min(245px, calc(100vw - 20px));
  }
}


/* QueenstownGo header CTA */
.header-commute {
  margin-left: 0;
  white-space: nowrap;
  font-size: 12px;
}
@media (max-width: 760px) {
  .header-commute {
    margin-left: auto;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 11px;
  }
}


/* Ultra-clean route result refinements */
.route-result-primary {
  flex-wrap: nowrap;
  gap: 7px;
  white-space: nowrap;
}
.route-result-primary .route-ascent,
.route-result-primary .route-descent {
  font-size: 10px;
  color: #61726a;
}
.route-result-primary .route-ascent strong,
.route-result-primary .route-descent strong {
  font-size: 10px;
  color: #183c34;
}
.route-result-chips {
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.route-result-chips::-webkit-scrollbar {
  display: none;
}
.route-result-chip {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}
.route-result-actions {
  align-items: center;
  justify-content: space-between;
}
.route-shortest-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  font-size: 10px;
  font-weight: 650;
  color: #35594d;
}
.route-shortest-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #356c51;
}
.route-export-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 17px;
}
.route-elevation-stats {
  display: none;
}
.map-layers-button {
  width: 42px;
  min-width: 42px;
  justify-content: center;
  padding: 0;
  font-size: 18px;
}
@media (max-width: 760px) {
  .map-layers-button {
    width: 40px;
    min-width: 40px;
    padding: 0;
  }
  .route-result-chips {
    gap: 8px;
  }
}


/* Route result hierarchy cleanup */
.route-result-primary {
  display: flex;
  align-items: center;
  gap: 7px;
}
.route-result-primary .route-export-button {
  margin-left: auto;
}
.route-result-actions {
  display: block;
  margin-top: 4px;
}
.route-shortest-toggle {
  min-height: 28px;
}
.route-sections {
  margin-top: 8px;
}
.route-sections > summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.route-sections ol {
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
}
.route-sections li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid #edf0eb;
  font-size: 10px;
  line-height: 1.35;
}
.route-sections li:last-child {
  border-bottom: 0;
}
.route-sections li span {
  min-width: 0;
}
.route-sections li strong {
  flex: none;
  font-size: 10px;
}
