:root {
  color-scheme: light;
  --ink: #17392f;
  --muted: #6d7a72;
  --paper: #f3f2eb;
  --card: #fffefa;
  --line: #e1e5dc;
  --green: #22604d;
  --green-soft: #e5efe7;
  --orange: #df7047;
  --sand: #e9e5d8;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 92% 8%, rgb(218 227 212 / 48%), transparent 32rem),
    var(--paper);
}

button,
a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 12px 0;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(23 57 47 / 11%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.055em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
}

.brand-mark svg {
  width: 22px;
  stroke: #f3f2eb;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.brand-mark circle {
  fill: var(--orange);
  stroke: none;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.015em;
}

.live-dot,
.sample-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #75a87d;
  box-shadow: 0 0 0 3px rgb(117 168 125 / 15%);
}

.intro-search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "intro"
    "search";
}

.intro {
  grid-area: intro;
  max-width: 720px;
  padding: 65px 0 48px;
}

.search-form-scroll {
  grid-area: search;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 690;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

h1 em {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.065em;
}

.intro-copy {
  max-width: 430px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.trip-explainer {
  max-width: 650px;
  margin-top: 27px;
}

.trip-explainer-title {
  margin: 0 0 13px;
  color: var(--green);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.trip-explainer-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trip-explainer-step {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.trip-explainer-step:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 25px;
  right: -12px;
  left: 50px;
  border-top: 1px dashed #b8cabb;
  content: "";
}

.trip-step-visual {
  position: relative;
  z-index: 1;
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  margin-bottom: 10px;
  place-items: center;
  border: 1px solid #d3e1d5;
  border-radius: 50%;
  background: var(--card);
  color: var(--green);
}

.trip-step-visual-stay {
  border-color: rgb(223 112 71 / 30%);
  background: #fff8f3;
  color: #a64f30;
}

.trip-step-visual svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.trip-step-index {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--green);
  font-size: 8px;
  font-weight: 760;
  line-height: 1;
}

.trip-step-title {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.trip-step-copy {
  display: block;
  max-width: 190px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.trip-section {
  padding-bottom: 55px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.section-heading .eyebrow {
  margin-bottom: 5px;
  font-size: 9px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.045em;
}

.sample-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #dbe3d8;
  border-radius: 99px;
  background: rgb(255 254 250 / 58%);
  color: #527060;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.sample-pill span {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.trip-list {
  display: grid;
  gap: 24px;
  min-height: 330px;
}

.trip-card {
  display: grid;
  overflow: hidden;
  min-height: 406px;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  border: 1px solid rgb(23 57 47 / 10%);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 14px 40px rgb(32 54 40 / 7%);
  animation: card-arrive 460ms ease both;
}

.trip-details {
  display: flex;
  flex-direction: column;
  padding: 22px 24px 20px;
}

.trip-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 660;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.trip-index {
  display: inline-grid;
  padding: 0 8px;
  height: 22px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
}

.trip-name {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.travel-legs {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.travel-leg {
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
}

.travel-leg:first-child {
  padding-top: 0;
  border-top: 0;
}

.travel-leg:last-child {
  padding-bottom: 0;
}

.walking-leg + .travel-leg {
  border-top: 0;
}

.leg-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 690;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leg-title > span {
  color: var(--green);
}

.walking-leg {
  margin: 4px -10px;
  padding: 8px 10px;
  border: 1px solid rgb(223 112 71 / 24%);
  border-radius: 12px;
  background: rgb(223 112 71 / 7%);
}

.walking-leg .leg-title,
.walking-leg .leg-title > span {
  color: #a64f30;
}

.leg-route {
  position: relative;
  display: grid;
  gap: 7px;
}

.leg-route::before {
  position: absolute;
  top: 7px;
  bottom: 20px;
  left: 5px;
  width: 1px;
  background: #abc2b0;
  content: "";
}

.walking-leg .leg-route::before {
  width: 0;
  background: none;
  border-left: 1px dashed #df7047;
}

.leg-stop {
  position: relative;
  display: grid;
  grid-template-columns: 11px 1fr;
  align-items: start;
  gap: 14px;
}

.leg-dot {
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: var(--card);
}

.walking-leg .leg-dot {
  border-color: var(--orange);
}

.leg-city {
  display: block;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.leg-station {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.leg-distance {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 22px;
  margin-left: 25px;
  color: var(--green);
}

.leg-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.leg-kilometres {
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.leg-kilometres small {
  font-size: 10px;
  font-weight: 500;
}

.leg-mode {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.walking-leg .leg-distance {
  color: #be5d39;
}

.estimate-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.map-panel {
  position: relative;
  min-height: 406px;
  background: #e5e9dd;
}

.trip-map {
  width: 100%;
  height: 100%;
  min-height: 406px;
  background: #e5e9dd;
}

.map-heading {
  position: absolute;
  z-index: 500;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgb(23 57 47 / 9%);
  border-radius: 9px;
  background: rgb(255 254 250 / 94%);
  box-shadow: 0 3px 12px rgb(23 57 47 / 9%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.map-pin-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid #fffefa;
  border-radius: 50% 50% 50% 4px;
  background: var(--green);
  box-shadow: 0 2px 7px rgb(23 57 47 / 24%);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  transform: rotate(-45deg);
}

.map-pin-icon span {
  transform: rotate(45deg);
}

.map-pin-icon.waypoint-pin {
  background: var(--orange);
}

.map-key {
  position: absolute;
  z-index: 500;
  right: 13px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  max-width: calc(100% - 26px);
  padding: 9px 11px;
  border: 1px solid rgb(23 57 47 / 9%);
  border-radius: 9px;
  background: rgb(255 254 250 / 94%);
  box-shadow: 0 3px 12px rgb(23 57 47 / 9%);
  font-size: 9px;
  font-weight: 600;
}

.map-key-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5c6d62;
  white-space: nowrap;
}

.walking-route-status[data-state="ready"]::before {
  width: 14px;
  border-top: 3px solid var(--orange);
  content: "";
}

.map-key-note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
}

.map-key-note a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.key-line {
  width: 14px;
  border-top: 2px solid var(--green);
}

.key-line.between {
  border-top-color: var(--orange);
  border-top-style: dashed;
}

.error-card,
.empty-card {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  text-align: center;
}

.message-content {
  max-width: 400px;
}

.message-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 13px;
  background: #f9e8de;
  color: #a74e2d;
  font-size: 17px;
  font-weight: 700;
}

.message-title {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: -0.04em;
}

.message-copy {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.retry-button {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: #fffefa;
  font: inherit;
  font-size: 11px;
  font-weight: 680;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.retry-button:hover {
  background: #174b3b;
  transform: translateY(-1px);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 25px;
  border-top: 1px solid rgb(23 57 47 / 11%);
  color: #77847a;
  font-size: 10px;
  line-height: 1.5;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  background: #e9ede5;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 55%), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.3s infinite;
}

.skeleton-line {
  width: 72%;
  height: 10px;
  margin-bottom: 12px;
}

.skeleton-line.short {
  width: 35%;
  height: 8px;
  margin-bottom: 17px;
}

.skeleton-line.title {
  width: 58%;
  height: 24px;
  margin-bottom: 23px;
}

.skeleton-distance {
  height: 60px;
  margin-top: auto;
}

.loading-card {
  min-height: 330px;
}

.loading-card .trip-details {
  gap: 0;
}

.trip-map-skeleton {
  min-height: 330px;
  border-radius: 0;
}

.leaflet-container {
  font-family: inherit;
}

.map-load-error {
  display: grid;
  height: 100%;
  min-height: 275px;
  place-items: center;
  padding: 32px;
  color: #647369;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.leaflet-control-attribution {
  font-size: 8px !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #fffefa;
}

.popup-name {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.popup-city {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes card-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 900px) {
  .intro-search-layout {
    grid-template-columns: 390px minmax(0, 1fr);
    grid-template-areas: "search intro";
    align-items: center;
    column-gap: clamp(40px, 5vw, 72px);
    padding-top: 48px;
    margin-bottom: 48px;
  }

  .intro {
    max-width: none;
    padding: 24px 0;
  }

  .intro h1 {
    font-size: clamp(42px, 5vw, 72px);
  }

  .intro-search-layout .search-form-scroll {
    margin: 0;
  }
}

@media (max-width: 740px) {
  .page-shell {
    width: min(100% - 28px, 560px);
  }

  .site-header {
    min-height: 66px;
  }

  .intro {
    padding: 49px 0 36px;
  }

  h1 {
    font-size: clamp(42px, 12vw, 58px);
  }

  .intro-copy {
    max-width: 350px;
    font-size: 13px;
  }

  .trip-card {
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 15px;
  }

  .trip-details {
    padding: 18px 20px 16px;
  }

  .trip-name {
    margin-bottom: 14px;
    font-size: 22px;
  }

  .map-panel,
  .trip-map {
    min-height: 275px;
    height: 275px;
  }

  .trip-map-skeleton {
    min-height: 275px;
  }

  .site-footer {
    flex-direction: column;
    gap: 5px;
    padding-bottom: 21px;
  }
}

@media (max-width: 390px) {
  .section-heading h2 {
    font-size: 17px;
  }

  .sample-pill {
    gap: 6px;
    padding: 7px 9px;
    font-size: 9px;
  }

  .trip-details {
    padding-right: 16px;
    padding-left: 16px;
  }

  .map-key {
    right: 8px;
    bottom: 9px;
    gap: 8px;
    padding: 8px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}