/* Travel: the home page teaser (travel-teaser.js) and the /travel page
   (travel-page.js), sharing the maps (travel-map.js) and the place lists.
   Colours come from the --land and --trip-* tokens in styles.css. */
.travel { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.swatch {
  display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 3px;
  background: var(--trip-both);
}
.swatch[data-who="david"] { background: var(--trip-david); }
.swatch[data-who="julia"] { background: var(--trip-julia); }
.legend-house { width: 13px; height: 13px; fill: var(--ink); }
.legend-house-door { fill: var(--bg); }

.map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0; padding: 0; font: 400 12px/1.4 var(--mono); color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }

/* ── Map ────────────────────────────────────────────────────────────────── */
.map { position: relative; display: block; aspect-ratio: 1000 / 444; border-radius: 6px; background: var(--surface); overflow: hidden; }
.map--usa { aspect-ratio: 1000 / 585; }
.map .loading { position: absolute; inset: 0; display: grid; place-items: center; }
.map-svg { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; }
.map-svg.is-zoomed { cursor: grab; }
.map-svg.is-panning { cursor: grabbing; }
.map-svg path[data-c] {
  fill: var(--land); stroke: var(--surface); stroke-width: .6px; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; transition: fill .2s, opacity .2s;
}
.map-svg path[data-who="both"] { fill: var(--trip-both); }
.map-svg path[data-who="david"] { fill: var(--trip-david); }
.map-svg path[data-who="julia"] { fill: var(--trip-julia); }
.map-svg .has-photos { cursor: pointer; }
.map-svg path[data-c]:focus { outline: none; }
.map-svg path[data-c]:focus-visible, .map-svg path.is-hot { stroke: var(--ink); stroke-width: 1.5px; }
/* Non-scaling round-capped strokes on zero-length paths: dots that keep their
   size at every zoom. */
.map-dot path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map-dot-ring { stroke: var(--surface); stroke-width: 9px; }
.map-dot-fill { stroke: var(--trip-both); stroke-width: 6px; }
.map-dot[data-who="david"] .map-dot-fill { stroke: var(--trip-david); }
.map-dot[data-who="julia"] .map-dot-fill { stroke: var(--trip-julia); }
.map-dot.is-hot .map-dot-ring { stroke: var(--ink); stroke-width: 11px; }
/* Drawn in screen px; travel-map.js scales each house to the current zoom. */
.map-home-body { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5px; stroke-linejoin: round; paint-order: stroke; }
.map-home-door { fill: var(--surface); }
.map-readout { margin: -6px 0 0; min-height: 1.4em; font: 400 12px/1.4 var(--mono); color: var(--muted); }

/* The teaser map is a link to /travel. */
.map-link { text-decoration: none; transition: box-shadow .2s; }
.map-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.map-link:active { transform: scale(.995); }
@media (hover: hover) { .map-link:hover { box-shadow: 0 0 0 1px var(--accent); } }
.travel-cta { align-self: flex-start; }

/* Under the map: the hover readout, and the zoom buttons on the right. */
.map-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: -6px; }
.map-foot .map-readout { margin: 10px 0 0; }
.map-zoom { display: flex; gap: 8px; flex: none; }
.map-zoom .icon-btn { width: 44px; height: 44px; }
.map-zoom .icon-btn:disabled { opacity: .45; }


/* ── /travel page ───────────────────────────────────────────────────────── */
.travel-page { display: flex; flex-direction: column; gap: clamp(36px, 5vw, 56px); padding-bottom: 56px; }
.back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-bottom: -24px;
  font: 500 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-decoration: none;
}
.back svg { width: 16px; height: 16px; }
@media (hover: hover) { .back:hover { color: var(--ink); } }
.travel-head { display: flex; flex-direction: column; gap: 12px; }
.travel-title { margin: 0; font-size: clamp(44px, 7vw, 76px); }
.travel-sum { margin: 0; font-size: clamp(18px, 2.1vw, 21px); max-width: 44ch; }
.travel-stats { display: flex; flex-wrap: wrap; gap: 12px 48px; margin: 4px 0 0; }
.travel-stat dt { display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.travel-stat dd { margin: 6px 0 0; font: 700 clamp(36px, 5vw, 48px)/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.travel-stat-unit { font: 400 13px/1 var(--mono); letter-spacing: 0; color: var(--muted); }
.travel-block { display: flex; flex-direction: column; gap: 16px; padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--line); min-width: 0; }
.travel-block[hidden] { display: none; }
.travel-h { display: flex; align-items: center; gap: 10px; margin: 0; font: 700 clamp(24px, 3vw, 30px)/1.1 var(--display); letter-spacing: -.01em; }

/* ── Place lists ────────────────────────────────────────────────────────── */
.place-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 32px; padding-top: 8px; align-items: start; }
.place-group { min-width: 0; }
.place-group-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line); font: 700 18px/1.2 var(--display);
}
.place-group-count { font: 400 11px/1.3 var(--mono); color: var(--muted); text-align: right; }
.places { list-style: none; margin: 0; padding: 0; }
.place {
  display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin-inline: -6px; border-radius: 4px;
  font-size: 15px; line-height: 1.35; transition: background .15s;
}
.place::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--trip-both); }
.place[data-who="david"]::before { background: var(--trip-david); }
.place[data-who="julia"]::before { background: var(--trip-julia); }
.place[data-who="none"] { color: var(--muted); }
.place[data-who="none"]::before { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.place.is-hot { background: var(--accent-soft); }
.place-name { min-width: 0; }
.place-tag { font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.place-cam { flex: none; width: 13px; height: 13px; color: var(--muted); }
.place-who { margin-left: auto; padding-left: 8px; font: 400 11px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 559px) {
  /* Maps run to the screen edges like the photo rail. */
  .map { margin-inline: -16px; border-radius: 0; }
  .place { font-size: 14px; }
}
