/* assets/css/design-v2/trips.css
 * Trips redesign route stylesheet (Main -> Trips). For now it styles the
 * read-first Trip Overview (?trip=<id>); the index card grid (next slice) will
 * extend it. The hero/stat/back blocks are REUSED from .v2-tb-detail* /
 * .v2-tb-stat* / .v2-tb-back in trip_builder.css (loaded on every V2 page via
 * _overlays.php); this file adds only the net-new .v2-tov-* main+rail layout,
 * the read timeline, the "This trip earns" panel, and the Readiness panel.
 * Tokens only, no raw hex (css-hex-guard hard-fails pre-push). */

/* ── Overview layout: itinerary main column + right rail ─────────────── */
.v2-tov-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 322px;
  gap: 22px;
  align-items: start;
}
.v2-tov-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.v2-tov-rail { display: flex; flex-direction: column; gap: 14px; }

.v2-tov-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.v2-tov-actions .v2-btn { white-space: nowrap; flex: 0 0 auto; }

/* Flowing trip meta line under the title */
.v2-tov-meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.v2-tov-meta .v2-tov-status { align-items: flex-start; }
.v2-tov-meta__edited {
  font-family: 'Geist', sans-serif;
  font-size: 0.73333rem;
  color: var(--ink-faint);
  letter-spacing: 0;
}

/* Per-trip notification override (Live Flight Experience Phase G). Pro-only;
 * Explorer sees a quiet nudge. Master flag off => not rendered at all. */
.v2-tov-alerts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 18px; padding: 10px 14px;
  border: 1px solid var(--hairline); border-radius: 12px;
  background: var(--paper-soft);
}
.v2-tov-alerts__lab { font-size: 0.86667rem; font-weight: 600; color: var(--ink-strong); }
.v2-tov-alerts__nudge { font-size: 0.83333rem; color: var(--ink-muted); }
.v2-tov-alerts__seg { display: inline-flex; border: 1px solid var(--hairline); border-radius: 999px; overflow: hidden; }
.v2-tov-alerts__btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 0.83333rem; font-weight: 600; color: var(--ink-muted);
  padding: 5px 14px; line-height: 1.4;
}
.v2-tov-alerts__btn + .v2-tov-alerts__btn { border-left: 1px solid var(--hairline); }
.v2-tov-alerts__btn:hover { color: var(--ink-strong); }
.v2-tov-alerts__btn.is-active { background: var(--orange-deep); color: var(--paper); }

/* 3-way status: dot + text (never colour alone) */
.v2-tov-status { display: inline-flex; align-items: center; gap: 6px; }
.v2-tov-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-muted); display: inline-block; flex-shrink: 0; }
.v2-tov-dot--upcoming { background: var(--orange-deep); }
.v2-tov-dot--active { background: var(--atlas-deep); }
.v2-tov-dot--completed { background: var(--ink-faint); }

/* ── Read timeline: one-line-per-segment, expandable, read-only ──────── */
.v2-tov-timeline { display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; }
.v2-tov-seg {
  background: var(--paper-soft);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
}
.v2-tov-seg[open] { border-color: var(--hairline-strong); }
.v2-tov-seg > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.v2-tov-seg > summary::-webkit-details-marker { display: none; }
.v2-tov-seg > summary:focus-visible { outline: 2px solid var(--atlas-deep); outline-offset: -2px; }
.v2-tov-seg__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--hairline-strong);
  color: var(--ink-strong); font-family: 'Geist Mono', monospace; font-size: 0.8rem; font-weight: 600;
  flex-shrink: 0;
}
.v2-tov-seg__ic { color: var(--ink-muted); display: inline-flex; flex-shrink: 0; }
.v2-tov-seg__ic svg { width: 18px; height: 18px; }
.v2-tov-seg__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.v2-tov-seg__t strong { font-family: 'Geist Mono', monospace; font-size: 0.9rem; color: var(--ink-strong); }
.v2-tov-seg__t span { font-family: 'Geist', sans-serif; font-size: 0.83333rem; color: var(--ink-muted); }
.v2-tov-seg__flag { font-family: 'Geist Mono', monospace; font-size: 0.66667rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.v2-tov-seg__flag svg { width: 13px; height: 13px; }
.v2-tov-seg__flag--flown { color: var(--atlas-deep); }
.v2-tov-seg__meta { padding: 0 16px 14px 54px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: 'Geist', sans-serif; font-size: 0.8rem; color: var(--ink-muted); }
.v2-tov-seg__meta b { color: var(--ink-strong); font-weight: 500; margin-right: 4px; }

/* read-only gap/layover chip between two segments */
.v2-tov-chip { display: flex; align-items: center; gap: 8px; padding: 2px 0 2px 54px; font-family: 'Geist Mono', monospace; font-size: 0.73333rem; color: var(--ink-faint); letter-spacing: 0.02em; }
.v2-tov-chip--warn { color: var(--orange-deep); }

/* ── Right-rail panels ───────────────────────────────────────────────── */
.v2-tov-panel { background: var(--paper-soft); border: 1px solid var(--hairline); border-radius: 16px; padding: 16px 18px; }
.v2-tov-panel__title { font-family: 'Bricolage Grotesque', serif; font-style: normal; font-size: 1.13333rem; color: var(--ink-strong); margin: 0 0 12px; }

/* This trip earns / earned — uniform per-programme list */
.v2-tov-earn__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.v2-tov-earn__item {
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
  line-height: 1.45;
  color: var(--ink-muted);
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}
.v2-tov-earn__item strong { color: var(--ink-strong); font-weight: 600; }
.v2-tov-chipv { font-family: 'Geist Mono', monospace; font-size: 0.66667rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: var(--paper-shade); color: var(--ink-strong); padding: 4px 9px; border-radius: 999px; }

/* Notes panel in the right rail */
.v2-tov-notes .v2-tov-note { margin: 0; }

/* Readiness — "what you need now" */
.v2-tov-ready__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.v2-tov-ready__item > a, .v2-tov-ready__item > button {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 10px;
  padding: 9px 11px; font-family: 'Geist', sans-serif; font-size: 0.83333rem; color: var(--ink-strong);
  cursor: pointer; text-decoration: none; transition: border-color 140ms var(--ease-out);
}
.v2-tov-ready__item > a:hover, .v2-tov-ready__item > button:hover { border-color: var(--hairline-strong); }
.v2-tov-ready__item .v2-tov-ic { color: var(--orange-deep); display: inline-flex; flex-shrink: 0; }
.v2-tov-ready__item .v2-tov-ic svg { width: 15px; height: 15px; }
.v2-tov-ready--ok { display: flex; align-items: center; gap: 8px; font-family: 'Geist', sans-serif; font-size: 0.86667rem; color: var(--ink-strong); }
.v2-tov-ready--ok .v2-tov-ic { color: var(--atlas-deep); display: inline-flex; }
.v2-tov-ready--ok .v2-tov-ic svg { width: 17px; height: 17px; }

.v2-tov-note { font-family: 'Geist', sans-serif; font-size: 0.86667rem; color: var(--ink-strong); white-space: pre-wrap; line-height: 1.6; margin: 0; }
.v2-tov-empty { font-family: 'Geist', sans-serif; font-size: 0.83333rem; color: var(--ink-muted); font-style: normal; margin: 0; }

/* ── Responsive: rail stacks below the itinerary ─────────────────────── */
@media (max-width: 900px) {
  .v2-tov-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .v2-tb-detail { padding: 16px 16px 48px; }
  .v2-tb-detail__head { flex-direction: column; align-items: flex-start; }
  .v2-tov-actions { width: 100%; }
  .v2-tov-seg__meta { padding-left: 16px; }
  .v2-tov-chip { padding-left: 16px; }
}

/* ── Trips index: card grid + travel-record stat strip (.v2-trip-* ns) ──
   Cards compose the orphaned .v2-tb-card* shell (already loaded); these are
   the net-new deltas. Tokens only, no raw hex. */
.v2-trips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; margin-top: 12px; }

.v2-trip-stats { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.v2-trip-stats__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-trip-stats__cta { margin-left: auto; }

/* card wrap holds the <a> body + the sibling action cluster */
.v2-trip-card-wrap { position: relative; }
.v2-trip-card__actions { position: absolute; top: 14px; right: 14px; display: flex; gap: 4px; opacity: 0; transition: opacity 140ms var(--ease-out); }
.v2-trip-card-wrap:hover .v2-trip-card__actions,
.v2-trip-card-wrap:focus-within .v2-trip-card__actions { opacity: 1; }
.v2-trip-card__act { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--hairline); background: var(--paper-soft); color: var(--ink-muted); cursor: pointer; }
.v2-trip-card__act:hover { border-color: var(--hairline-strong); color: var(--ink-strong); }
.v2-trip-card__act--danger:hover { color: var(--orange-deep); border-color: var(--orange-paper); }
.v2-trip-card__act-ic { width: 16px; height: 16px; }

.v2-trip-card__lead { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.v2-trip-card__dest { font-family: 'Geist', sans-serif; font-size: 0.73333rem; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-trip-card__dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.v2-trip-card__dot--upcoming { background: var(--orange-deep); }
.v2-trip-card__dot--active   { background: var(--atlas-deep); }
.v2-trip-card__dot--past     { background: transparent; border: 1.5px solid var(--hairline-strong); }

.v2-trip-card__count { display: inline-block; margin-left: 6px; font-family: 'Geist Mono', monospace; font-size: 0.73333rem; font-weight: 600; }
.v2-trip-card__count--upcoming { color: var(--orange-deep); }
.v2-trip-card__count--active   { color: var(--atlas-deep); }

.v2-trip-card__signals { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v2-trip-card__ready { display: inline-flex; align-items: center; gap: 5px; font-family: 'Geist', sans-serif; font-size: 0.8rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.v2-trip-card__ready--ok   { background: var(--atlas-paper); color: var(--atlas-deep); }
.v2-trip-card__ready--warn { background: var(--orange-paper); color: var(--orange-deep); }
.v2-trip-card__ready-ic { width: 13px; height: 13px; flex: 0 0 auto; }
.v2-trip-card__loyalty { font-family: 'Geist Mono', monospace; font-size: 0.8rem; font-weight: 600; color: var(--ink-strong); }

.v2-trip-card--past { background: var(--paper-shade); }
.v2-trip-card--past .v2-tb-card__name { color: var(--ink-muted); }
.v2-trip-year { margin-top: 28px; }

@media (max-width: 767px) {
  .v2-trips-grid { grid-template-columns: 1fr; }
  .v2-trip-stats { flex-direction: column; align-items: stretch; }
  .v2-trip-stats__cta { margin-left: 0; }
  .v2-trip-card__actions { opacity: 1; }
}

/* ── A11y + touch polish (Trips redesign; inert unless the surfaces render) ──
   Keyboard focus rings on every new interactive element, touch-visible card
   actions with >=40px targets, and small-phone overflow safety. */
.v2-trip-card:focus-visible,
.v2-trip-card__act:focus-visible,
.v2-tov-actions .v2-btn:focus-visible,
.v2-tov-ready__item > button:focus-visible {
  outline: 2px solid var(--atlas-deep);
  outline-offset: 2px;
}
.v2-tb-back:focus-visible { outline: 2px solid var(--atlas-deep); outline-offset: 2px; border-radius: 4px; }
/* keyboard users: reveal the hover-only card actions when focus enters the card */
.v2-trip-card-wrap:focus-within .v2-trip-card__actions { opacity: 1; }

@media (pointer: coarse) {
  .v2-trip-card__actions { opacity: 1; }
  .v2-trip-card__act { width: 40px; height: 40px; }
}
@media (max-width: 360px) {
  .v2-tb-detail { padding: 14px 12px 44px; }
  .v2-tov-grid { gap: 16px; }
  .v2-trip-stats__pills { gap: 6px; }
}

/* ── Archive (Phase 2): inline form-buttons + collapsible archived group ── */
.v2-trip-card__sform,
.v2-tov-archive-form { display: contents; }
.v2-trip-archive { margin-top: 28px; border-top: 1px solid var(--hairline); padding-top: 8px; }
.v2-trip-archive__summary { cursor: pointer; list-style: none; padding: 6px 0; display: inline-block; }
.v2-trip-archive__summary::-webkit-details-marker { display: none; }
.v2-trip-archive__summary:focus-visible { outline: 2px solid var(--atlas-deep); outline-offset: 2px; border-radius: 4px; }
.v2-trip-archive[open] .v2-trip-archive__summary { margin-bottom: 8px; }

/* ── Index filter bar (P2-5): GET form, progressive enhancement ── */
.v2-trip-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.v2-trip-filter__q { flex: 1 1 220px; min-width: 160px; font-family: 'Geist', sans-serif; font-size: 0.86667rem; padding: 8px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--paper); color: var(--ink-strong); }
.v2-trip-filter__sel { font-family: 'Geist', sans-serif; font-size: 0.86667rem; padding: 8px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--paper); color: var(--ink-strong); }
.v2-trip-filter__q:focus-visible,
.v2-trip-filter__sel:focus-visible { outline: 2px solid var(--atlas-deep); outline-offset: 1px; }
.v2-trip-filter__clear { font-family: 'Geist', sans-serif; font-size: 0.83333rem; color: var(--ink-muted); text-decoration: none; padding: 6px 8px; }
.v2-trip-filter__clear:hover { color: var(--ink-strong); }
@media (max-width: 767px) {
  .v2-trip-filter__q { flex-basis: 100%; }
}

/* ── Completed-archive pager (M11) ── */
.v2-trip-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; }
.v2-trip-pager__count { font-family: 'Geist', sans-serif; font-size: 0.83333rem; color: var(--ink-muted); }
.v2-trip-pager__btn { text-decoration: none; }
.v2-trip-pager__btn--off { opacity: 0.45; pointer-events: none; cursor: default; }

/* ── Per-segment edit deep-link (P2-6) ── */
.v2-tov-seg__edit { display: inline-flex; }
.v2-tov-seg__edit button { background: none; border: 0; padding: 0; cursor: pointer; font-family: 'Geist', sans-serif; font-size: 0.8rem; color: var(--atlas-deep); text-decoration: underline; }
.v2-tov-seg__edit button:hover { color: var(--ink-strong); }
.v2-tov-seg__edit button:focus-visible { outline: 2px solid var(--atlas-deep); outline-offset: 2px; border-radius: 3px; }

/* ── Route map (P2-3) ── */
.v2-tov-map__frame { border: 1px solid var(--hairline); border-radius: 14px; background: var(--paper-soft); padding: 8px; color: var(--atlas-deep); overflow: hidden; }
.v2-tov-map__svg { display: block; width: 100%; height: auto; }
/* Base land/dot = legacy (flag-OFF byte-identity). The colourful v2 tones are
   scoped to .v2-tov-map__svg--v2, which only the flag-ON arc map emits. */
.v2-tov-map__land { fill: var(--hairline); }
.v2-tov-map__svg--v2 .v2-tov-map__land { fill: var(--paper-shade); stroke: var(--hairline); stroke-width: 0.2; }
.v2-tov-map__route { color: var(--atlas-deep); }
.v2-tov-map__arc--flown { stroke: var(--orange); }
.v2-tov-map__arc--planned { stroke: var(--atlas-deep); opacity: 0.85; }
.v2-tov-map__chev { stroke: var(--ink-muted); }
.v2-tov-map__dot { fill: var(--orange-deep); }
.v2-tov-map__svg--v2 .v2-tov-map__dot { stroke: var(--paper); stroke-width: 0.15; }
/* font-size is set per-element in the partial (scaled to the viewBox region). */
.v2-tov-map__lbl { font-family: 'Geist Mono', monospace; fill: var(--ink-muted); }

/* ── Completed-trip "Passport" recap (P2-4) ── */
.v2-tov-passport { background: var(--paper-soft); border: 1px solid var(--hairline); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.v2-tov-passport__stats { display: flex; flex-wrap: wrap; gap: 6px; }
.v2-tov-passport .v2-btn { align-self: flex-start; }

/* ── Zero-trips onboarding hero (Rec 3) ─────────────────────────────── */
.v2-trips-hero--empty {
  margin-top: 20px;
  padding: 36px 28px 32px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--navy-soft) 0%, var(--navy) 100%);
  border: 1px solid var(--navy);
  box-shadow: var(--sh-inverse);
  color: var(--paper-soft);
}
.v2-trips-hero--empty .v2-eyebrow { color: var(--orange-paper); margin: 0 0 10px; }
.v2-trips-hero--empty__title {
  font-family: 'Bricolage Grotesque', serif;
  font-style: normal;
  font-size: clamp(1.73333rem, 3vw, 2.26667rem);
  line-height: 1.12;
  color: var(--paper-soft);
  margin: 0;
}
.v2-trips-hero--empty__body {
  font-family: 'Geist', sans-serif;
  font-size: 0.93333rem;
  line-height: 1.55;
  color: var(--paper-muted, rgba(255, 255, 255, 0.78));
  margin: 12px 0 0;
  max-width: 52ch;
}
.v2-trips-hero--empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.v2-trips-hero--empty__actions .v2-btn { min-height: 44px; }
.v2-trips-hero--empty__actions .v2-btn--p {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.v2-trips-hero--empty__actions .v2-btn:not(.v2-btn--p) {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
}
@media (max-width: 560px) {
  .v2-trips-hero--empty { padding: 28px 18px 24px; }
  .v2-trips-hero--empty__actions { flex-direction: column; }
  .v2-trips-hero--empty__actions .v2-btn { width: 100%; justify-content: center; }
}

/* ── Print itinerary (Rec 5) ─────────────────────────────────────────── */
@media print {
  .v2-topnav,
  .v2-subnav,
  .v2-bottombar,
  .v2-tb-back,
  .v2-tov-actions,
  .v2-tov-archive-form,
  .v2-tov-seg__edit,
  .v2-tov-passport .v2-btn,
  .mm-pull-refresh { display: none !important; }
  .v2-tb-detail,
  .v2-tov-root { padding: 0 !important; box-shadow: none !important; }
  .v2-tov-seg > summary { list-style: none; }
  .v2-tov-seg[open] .v2-tov-seg__meta,
  .v2-tov-seg .v2-tov-seg__meta { display: flex !important; }
  .v2-tov-grid { grid-template-columns: 1fr !important; }
}

/* ── Trips section redesign §5C: My Trips list ───────────────────────── */
.v2-mytrips { margin-top: 4px; }

/* Selection checkbox on live trip cards (page-level merge). */
.v2-trip-card__selwrap { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; cursor: pointer; }
.v2-trip-card__select { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.v2-trip-card__selbox { width: 20px; height: 20px; border-radius: 6px; border: 1.8px solid var(--ink-line); background: var(--surface); transition: border-color 120ms var(--ease-out), background 120ms var(--ease-out); }
.v2-trip-card__select:focus-visible + .v2-trip-card__selbox { outline: 2px solid var(--atlas-deep); outline-offset: 2px; }
.v2-trip-card__select:checked + .v2-trip-card__selbox {
  border-color: var(--atlas-deep); background: var(--atlas-deep);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 14px 14px; background-position: center; background-repeat: no-repeat;
}
/* Nudge the card content right so the checkbox does not overlap the dest chip. */
.v2-trip-card-wrap:has(.v2-trip-card__selwrap) .v2-tb-card__head { padding-left: 28px; }

/* List/Cards view toggle on the Completed header. */
.v2-s-head--completed { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.v2-mytrips-view { display: inline-flex; border: 1px solid var(--ink-line); border-radius: 999px; overflow: hidden; }
.v2-mytrips-view__btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font: inherit; font-size: 0.83333rem; font-weight: 600; color: var(--ink-muted); background: transparent; border: 0; cursor: pointer; }
.v2-mytrips-view__btn svg { width: 15px; height: 15px; }
.v2-mytrips-view__btn.is-on { color: var(--ink-strong); background: var(--atlas-paper); }
.v2-mytrips-view__btn + .v2-mytrips-view__btn { border-left: 1px solid var(--ink-line); }

/* List mode: collapse the year grids to single-column compact rows. Cards mode
   restores the auto-fill grid. The PHP renders cards with cardLayout='row'; we
   swap the grid template per the data attribute on the region. */
.v2-mytrips-completed[data-mm-view-mode="list"] .v2-mytrips-yeargrid { grid-template-columns: 1fr; gap: 6px; }
.v2-mytrips-completed[data-mm-view-mode="cards"] .v2-mytrips-yeargrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.v2-mytrips-completed[data-mm-view-mode="cards"] .v2-trip-card--list-row { /* full card look in Cards mode */ }
/* The list-row card: compact one-line presentation. */
.v2-mytrips-completed[data-mm-view-mode="list"] .v2-trip-card--list-row .v2-tb-card__chips,
.v2-mytrips-completed[data-mm-view-mode="list"] .v2-trip-card--list-row .v2-trip-card__signals { display: none; }
.v2-mytrips-completed[data-mm-view-mode="list"] .v2-trip-card--list-row { padding: 10px 14px; }
.v2-mytrips-completed[data-mm-view-mode="list"] .v2-trip-card--list-row .v2-tb-card__name { font-size: 0.93333rem; margin: 2px 0; }

.v2-mytrips-showall { margin-top: 12px; }

/* Completeness dot (shared contract; used on card row bars in Phase 5, styled
   here so the token mapping lives with the trip card styles). grey=0 amber=1
   green=2. SVG/currentColor, no emoji. */
.v2-pt-completeness { display: inline-flex; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-muted); flex-shrink: 0; }
.v2-pt-completeness[data-mm-complete="1"] { background: var(--orange-deep); }
.v2-pt-completeness[data-mm-complete="2"] { background: var(--atlas-deep); }

/* Floating merge action bar. */
.v2-trips-mergebar { position: sticky; bottom: 16px; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--ink-line); background: var(--surface); box-shadow: 0 10px 30px rgba(10, 17, 36, 0.12); }
.v2-trips-mergebar__count { font-weight: 600; font-size: 0.86667rem; color: var(--ink-strong); }
.v2-trips-mergebar__actions { display: inline-flex; gap: 8px; }

/* Merge confirm modal: radio survivor rows. */
.v2-merge-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.v2-merge-row > label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ink-line); border-radius: 12px; cursor: pointer; }
.v2-merge-row > label:has(input:checked) { border-color: var(--atlas-deep); background: var(--atlas-paper); }
.v2-merge-row__b { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.v2-merge-row__b .meta { font-size: 0.8rem; color: var(--ink-muted); }
.v2-merge-row__keep { font-size: 0.73333rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--atlas-deep); }
.v2-merge-progress { margin-top: 12px; font-size: 0.86667rem; color: var(--ink-muted); }

@media (max-width: 560px) {
  .v2-trips-mergebar { flex-direction: column; align-items: stretch; gap: 10px; }
  .v2-trips-mergebar__actions .v2-btn { flex: 1; justify-content: center; }
  .v2-s-head--completed { align-items: flex-start; }
}

/* Trip detail overlay host (§5D). Wider than a side drawer; reuses drawer
   mechanics from drawer.js. */
.v2-overlay-host--tov .v2-drawer--tov {
  width: min(960px, 100%);
  max-width: 960px;
  margin-inline: auto;
  border-radius: 16px;
}
/* Chrome row only — close on the right, same shell as add/edit flight drawers. */
.v2-drawer__head--tov {
  padding-bottom: 0;
  border-bottom: none;
  align-items: center;
}
.v2-overlay-host--tov .v2-drawer__body {
  padding-top: 0;
}
.v2-tovm__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.v2-tovm__body { position: relative; }
.v2-tovm__loading {
  display: flex; align-items: center; gap: 10px;
  padding: 48px 24px; color: var(--ink-muted);
  font-family: 'Geist Mono', monospace; font-size: 0.86667rem;
}
.v2-tovm__spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--hairline); border-top-color: var(--orange);
  animation: v2-tovm-spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .v2-tovm__spinner { animation: none; } }
@keyframes v2-tovm-spin { to { transform: rotate(360deg); } }
