/* Trip planner (trip-planner.html) */
.tp { --tp-gap: clamp(1rem, .6rem + 1.5vw, 2rem); padding-top: var(--header-h); background: var(--c-bg); min-height: 100vh; }
.tp [hidden] { display: none !important; }
.tp h1 { font-family: var(--f-serif); font-weight: 400; color: var(--c-primary-900); line-height: 1.1; margin: 0; }
.tp h2 { font-family: var(--f-serif); font-weight: 400; font-size: 1.35rem; color: var(--c-primary-900); margin: 0; }
.tp-link { background: none; border: 0; padding: 0; color: var(--c-accent-600); font-weight: 700; font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tp-link:hover { color: var(--c-primary); }
.tp svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Step 1 */
.tp-start { display: grid; place-items: center; padding: clamp(2.5rem, 2rem + 4vw, 6rem) 16px; }
.tp-start-card { width: min(640px, 100%); background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: clamp(1.5rem, 1rem + 2.5vw, 3rem); box-shadow: var(--sh-2); }
.tp-start h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); }
.tp-start-card > .muted { margin: .9rem 0 2rem; color: var(--c-muted); }
.tp-date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tp-dates .field label { display: flex; align-items: center; gap: .4rem; }
.tp-dates .field label svg { width: 16px; height: 16px; color: var(--c-accent-600); }
.tp-dates .field .error { display: none; color: #B4442F; font-size: .8rem; }
.tp-dates .field.has-error .error { display: block; }
.tp-dates .field.has-error input { border-color: #B4442F; }
.tp-count-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.tp-count { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 1rem; border: 1px solid rgba(36,43,40,.18); border-radius: 12px; background: var(--c-bg); }
.tp-count > span { font-size: .82rem; font-weight: 700; color: var(--c-primary-900); }
.tp-stepper { display: flex; align-items: center; gap: .6rem; }
.tp-stepper button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--c-line); background: #fff; display: grid; place-items: center; color: var(--c-primary); cursor: pointer; transition: border-color .2s, background .2s;
}
.tp-stepper button:hover { border-color: var(--c-accent); background: var(--c-bg); }
.tp-stepper button svg { width: 14px; height: 14px; }
.tp button:disabled { opacity: .35; cursor: default; }
.tp-stepper output { font-weight: 700; min-width: 2ch; text-align: center; }
.tp-length { min-height: 1.5em; margin: 1.25rem 0; font-size: .9rem; color: var(--c-muted); }
.tp-dates .btn { width: 100%; }

/* Step 2 layout */
.tp-build { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tp-tabs { display: none; }
.tp-plan { padding: clamp(1.5rem, 1rem + 2vw, 3rem) clamp(16px, 1rem + 2vw, 3rem) 4rem; max-width: 760px; width: 100%; justify-self: end; }
.tp-head h1 { font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem); }
.tp-head .kicker { margin-bottom: .6rem; }
.tp-summary { margin: .6rem 0 0; color: var(--c-muted); display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: baseline; }
.tp-summary .tp-link { margin-left: .25rem; }
.tp-block { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--c-line); }
.tp-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tp-nights { margin: 0; font-size: .85rem; color: var(--c-muted); font-weight: 600; }
.tp-note { margin: -.4rem 0 1rem; font-size: .9rem; color: var(--c-muted); }
.tp-bar { height: 4px; border-radius: 4px; background: var(--c-sand); overflow: hidden; margin-bottom: 1rem; }
.tp-bar span { display: block; height: 100%; width: 0; background: var(--c-primary); transition: width .3s; }
.tp-bar.is-over span { background: #B4442F; }

/* Stops */

/* Vehicles */
/* Day by day */
.tp-days { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.tp-day { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r); padding: .9rem 1rem 1rem; transition: border-color .2s, box-shadow .2s; }
.tp-day.is-active { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.tp-day-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tp-day-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .6rem; background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; color: var(--c-text); }
.tp-day-title b { color: var(--c-primary-900); }
.tp-day-title span { font-size: .85rem; color: var(--c-muted); }
.tp-day-title em { font-style: normal; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent-600); background: var(--c-sand); padding: .15rem .5rem; border-radius: var(--r-pill); }
.tp-day-where { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.tp-day-where select { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: .55rem .9rem; border-radius: 10px; border: 1px solid rgba(36,43,40,.18); background: var(--c-bg); font: inherit; font-size: .92rem; color: var(--c-muted); cursor: pointer; }
.tp-day.has-place .tp-day-where select { background: #fff; color: var(--c-primary-900); font-weight: 600; }
.tp-day-where select:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px rgba(185,149,85,.18); }
.tp-same { min-height: 44px; padding: .5rem 1rem; border-radius: var(--r-pill); border: 1px dashed var(--c-accent); background: transparent; font: inherit; font-size: .85rem; font-weight: 600; color: var(--c-primary); cursor: pointer; }
.tp-same:hover { background: var(--c-bg); border-style: solid; }
.tp-stay { margin-top: .9rem; }
.tp-stay label { display: block; margin-bottom: .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }
.tp-stay input { width: 100%; min-height: 44px; padding: .55rem .9rem; border-radius: 10px; border: 1px solid rgba(36,43,40,.18); background: #fff; font: inherit; font-size: .92rem; color: var(--c-primary-900); }
.tp-stay input::placeholder { color: var(--c-muted); opacity: .8; }
.tp-stay input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px rgba(185,149,85,.18); }
.tp-acts-h { margin: .9rem 0 .45rem; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }
.tp-acts { display: flex; flex-wrap: wrap; gap: .4rem; }
.tp-act { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .35rem .8rem .35rem .6rem; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-bg); font: inherit; font-size: .82rem; color: var(--c-text); text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.tp-act:hover { border-color: var(--c-accent); }
.tp .tp-act svg { width: 14px; height: 14px; flex: none; }
.tp-act.is-on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* Driver / guide choice */
.tp-service { display: grid; gap: .6rem; margin-bottom: 1.75rem; }
.tp-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: start; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r); padding: .9rem 1rem; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.tp-opt:hover { border-color: rgba(185,149,85,.6); }
.tp-opt:has(input:checked) { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.tp-opt input { accent-color: var(--c-primary); width: 18px; height: 18px; margin: .15rem 0 0; }
.tp-opt b { display: block; color: var(--c-primary-900); }
.tp-opt small { display: block; color: var(--c-muted); font-size: .82rem; margin-top: .1rem; }
.tp-opt .tp-opt-rate { color: var(--c-accent-600); font-weight: 700; margin-top: .35rem; }
.tp-opt .tp-opt-rate:empty { display: none; }
.tp-sub { font-family: var(--f-sans); font-size: 1rem; font-weight: 700; color: var(--c-primary-900); margin: 0 0 .7rem; }

.tp-vehicles { display: grid; gap: .6rem; }
.tp-veh { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .9rem; align-items: center; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r); padding: .9rem 1rem; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.tp-veh:hover { border-color: rgba(185,149,85,.6); }
.tp-veh:has(input:checked) { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.tp-veh.is-off { opacity: .5; cursor: not-allowed; }
.tp-veh input { accent-color: var(--c-primary); width: 18px; height: 18px; margin: 0; }
.tp-veh-body b { display: block; color: var(--c-primary-900); }
.tp-veh-body small { display: block; color: var(--c-muted); font-size: .82rem; margin-top: .1rem; }
.tp-veh-body .tp-veh-meta { font-size: .78rem; }
.tp-veh-rate { text-align: right; font-weight: 700; color: var(--c-primary-900); white-space: nowrap; }
.tp-veh-rate small { display: block; font-weight: 500; font-size: .75rem; color: var(--c-muted); }

/* Estimate */
.tp-estimate .tp-est-body { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r); padding: .5rem 1.1rem; }
.tp-lines { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tp-lines th { text-align: left; font-weight: 600; padding: .7rem 0; color: var(--c-text); }
.tp-lines th small { display: block; font-weight: 500; font-size: .78rem; color: var(--c-muted); margin-top: .1rem; }
.tp-lines td { text-align: right; padding: .7rem 0 .7rem 1rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tp-lines tbody tr + tr { border-top: 1px solid var(--c-line); }
.tp-lines tfoot tr:first-child { border-top: 1px solid var(--c-primary); }
.tp-lines tfoot th, .tp-lines tfoot td { font-family: var(--f-serif); font-weight: 400; font-size: 1.3rem; color: var(--c-primary-900); padding-top: .9rem; }
.tp-lines .tp-pp th, .tp-lines .tp-pp td { font-family: var(--f-sans); font-size: .85rem; color: var(--c-muted); padding-top: 0; }
.tp-sample { margin: .6rem 0 .2rem; font-size: .78rem; font-weight: 700; color: var(--c-accent-600); letter-spacing: .04em; }
.tp-unavail { margin: .7rem 0; color: var(--c-muted); }
.tp-fine { display: flex; gap: .5rem; margin: .9rem 0 0; font-size: .8rem; color: var(--c-muted); line-height: 1.55; }
.tp-fine svg { width: 16px; height: 16px; margin-top: .15rem; color: var(--c-accent-600); }

/* Send */
.tp-send > .muted { margin: -.4rem 0 1.25rem; color: var(--c-muted); font-size: .92rem; }
.tp-send .form-grid { gap: 1rem; }
.tp-send-foot { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.tp-send-foot .btn { flex: 1 1 200px; }

/* Map */
.tp-mapcol { position: relative; border-left: 1px solid var(--c-line); background: #F4EFE4; }
.tp-map { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 1.5rem; overflow: hidden; }
.tp-map-stage { position: relative; height: min(100%, 900px); aspect-ratio: 370 / 640; max-width: 100%; }
.tp .tp-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; stroke: none; }
.tp-map-svg image { filter: drop-shadow(0 14px 24px rgba(18, 61, 50, .18)); }
.tp .tp-route { fill: none; stroke: #FAF8F3; stroke-width: 2.4; stroke-dasharray: 5 5; stroke-linecap: round; stroke-linejoin: round; }
.tp-pins { position: absolute; inset: 0; }
.tp-pin { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: .35rem; background: none; border: 0; padding: 4px; cursor: pointer; z-index: 1; }
.tp-pin-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--c-primary); display: grid; place-items: center; font-size: .65rem; font-weight: 700; color: #fff; transition: transform .15s; }
.tp-pin-label { font-size: .72rem; font-weight: 700; color: var(--c-primary-900); white-space: nowrap; background: rgba(250,248,243,.85); padding: .05rem .35rem; border-radius: 4px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.tp-pin { flex-direction: row; transform: translate(-11px, -50%); }
.tp-pin--l { flex-direction: row-reverse; transform: translate(calc(-100% + 11px), -50%); }
.tp-pin:hover .tp-pin-label, .tp-pin:focus-visible .tp-pin-label, .tp-pin.is-on .tp-pin-label, .tp-pin.is-active .tp-pin-label { opacity: 1; }
.tp-pin:hover .tp-pin-dot { transform: scale(1.2); }
.tp-pin.is-on { z-index: 2; }
.tp-pin.is-on .tp-pin-dot { width: 22px; height: 22px; background: var(--c-primary); border-color: #fff; box-shadow: 0 1px 4px rgba(11,42,34,.35); }
.tp-pin.is-on { transform: translate(-15px, -50%); }
.tp-pin.is-on.tp-pin--l { transform: translate(calc(-100% + 15px), -50%); }
.tp-pin.is-active .tp-pin-dot { border-color: var(--c-accent); box-shadow: 0 0 0 4px rgba(185,149,85,.35); }
.tp-pin:focus-visible { outline: none; }
.tp-pin:focus-visible .tp-pin-dot { box-shadow: 0 0 0 3px var(--c-accent); }

.tp-card { position: absolute; left: 1.25rem; bottom: 1.25rem; width: min(300px, calc(100% - 2.5rem)); background: #fff; border-radius: var(--r); box-shadow: var(--sh-2); border: 1px solid var(--c-line); overflow: hidden; z-index: 3; }
.tp-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.tp-card-body { padding: 1rem 1.1rem 1.1rem; }
.tp-card-region { margin: 0; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--c-accent-600); }
.tp-card h3 { font-family: var(--f-serif); font-weight: 400; font-size: 1.35rem; color: var(--c-primary-900); margin: .25rem 0 .35rem; }
.tp-card-body > p:not(.tp-card-region) { margin: 0; font-size: .88rem; color: var(--c-text); }
.tp-card dl { margin: .8rem 0 0; display: grid; gap: .45rem; font-size: .8rem; }
.tp-card dt { font-weight: 700; color: var(--c-primary-900); }
.tp-card dd { margin: 0; color: var(--c-muted); }
.tp-card-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.tp-card-x { position: absolute; top: .6rem; right: .6rem; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; color: var(--c-primary-900); }
.tp-card-x svg { width: 16px; height: 16px; }

body.tp-building .sticky-cta, body.tp-building .plan-badge { display: none !important; }
body.tp-building .site-footer { position: relative; z-index: 4; }

/* Mobile */
@media (max-width: 960px) {
  .tp-build { grid-template-columns: 1fr; }
  .tp-tabs { display: flex; position: sticky; top: var(--header-h); z-index: 5; background: var(--c-bg); border-bottom: 1px solid var(--c-line); padding: .5rem 16px; gap: .5rem; }
  .tp-tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: #fff; font: inherit; font-weight: 700; font-size: .9rem; color: var(--c-primary); cursor: pointer; }
  .tp-tabs button[aria-selected="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
  .tp-plan { justify-self: stretch; max-width: none; padding: 1.5rem 16px 3rem; }
  .tp-mapcol { border-left: 0; }
  .tp-map { height: calc(100svh - var(--header-h) - 61px); top: calc(var(--header-h) + 61px); padding: 1rem; }
  .tp-build[data-view="plan"] .tp-mapcol, .tp-build[data-view="map"] .tp-plan { display: none; }
  .tp-mapcol { min-width: 0; }
  .tp-map { grid-template-columns: minmax(0, 1fr); }
  .tp-map-stage { height: auto; width: min(100%, calc((100svh - var(--header-h) - 61px - 2rem) * 370 / 640)); }
  .tp-card { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .tp-card img { height: 110px; }
}
@media (max-width: 560px) {
  .tp-date-row, .tp-count-row { grid-template-columns: 1fr; }
  .tp-veh { grid-template-columns: auto minmax(0, 1fr); }
  .tp-veh-rate { grid-column: 2; text-align: left; }
  .tp-veh-rate small { display: inline; margin-left: .3rem; }
}
