/* Vacation postcard (PV-006, js/vacation-ui.js). Play mood: kind colours on the meter, the tiles and the journal's icons;
   days never carry colour (only kinds do). The trip's name is Geist (the serif is not approved). Linked just before
   pocket.css (it stays last), which still styles the shared vc-* parts: the top row, the trip's fields and their phone
   sheet, the picker and the ✕; so an override of one of those takes two classes (.vp .vc-…).
   Design: docs/design/planning-v2/proto.html?screen=trip-a */

.vp .vc-top { justify-content: flex-end; flex-wrap: wrap; }
.vp .vc-status { margin-right: auto; }
.vp .num { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }

/* the postcard: the name, the sentence, the meter in kind colours, the streak, and the stamp in its corner */
.vp-post { position: relative; overflow: clip; display: grid; gap: 14px; padding: 22px 24px 20px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-md); min-width: 0; }
.vp-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 22px; }
.vp-live { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--green-dim); color: var(--green-ink); font: 600 11.5px var(--font-sans); text-transform: uppercase; letter-spacing: .06em; }
.vp-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vp-kick { font: 600 12px var(--font-sans); letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); }
.vp .vp-city { margin: 0; padding-right: 136px; font: 600 64px/.98 var(--font-sans); letter-spacing: -.045em; color: var(--text); overflow-wrap: anywhere; }
.vp-say { margin: 0; max-width: 34ch; padding-right: 20px; font: 600 22px/1.32 var(--font-sans); letter-spacing: -.02em; color: var(--text); text-wrap: balance; }
.vp-say .sp-ans { color: var(--accent); }

.vp-meterbox:empty { display: none; }
.vp-meter { position: relative; display: flex; gap: 2px; height: 12px; border-radius: 6px; background: var(--border); overflow: hidden; }
.vp-meter i { display: block; height: 100%; flex: none; background: var(--k); transition: width 320ms cubic-bezier(.2, 0, 0, 1); }
.vp-meter u { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--surface); }
.vp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font: 500 12.5px var(--font-sans); color: var(--text-dim); }
.vp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vp-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--k); }
.vp-legend b { font-weight: 500; color: var(--text-mid); }
.vp-legend .vp-room { margin-left: auto; color: var(--text); font-weight: 600; }
.vp-meter.is-over + .vp-legend .vp-room { color: var(--red-ink); }

.vp-streak { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vp-dots { display: flex; gap: 6px; }
.vp-dots i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green-dim); color: var(--green-ink); }
.vp-dots i.is-no { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text-dim); }
.vp-dots i.is-now { background: none; box-shadow: inset 0 0 0 1.5px var(--text-dim); color: var(--text-dim); }
.vp-streak-say { font: 500 13px var(--font-sans); color: var(--text-dim); }

.vp-stamp { position: absolute; right: 24px; top: 22px; display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; color: var(--green-ink); text-align: center;
  box-shadow: inset 0 0 0 2px currentColor, inset 0 0 0 6px var(--surface), inset 0 0 0 7px currentColor; transform: rotate(-12deg);
  font: 600 11px/1.25 var(--font-numeric); letter-spacing: .08em; text-transform: uppercase; animation: vp-stamp 520ms cubic-bezier(.3, 1.4, .5, 1) both; }
.vp-stamp b { display: block; font: 600 21px/1.15 var(--font-sans); letter-spacing: -.02em; text-transform: none; font-variant-numeric: tabular-nums; }
@keyframes vp-stamp { from { opacity: 0; transform: rotate(-24deg) scale(1.5); } to { opacity: 1; transform: rotate(-12deg) scale(1); } }

/* the days: neutral chips, today in ink, the days ahead dashed; a bar shows the day's spend against the daily pace */
.vp-days { display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 6px; }
.vp-day { display: grid; justify-items: center; gap: 3px; min-width: 0; padding: 8px 4px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); }
.vp-wd { font: 600 10.5px var(--font-numeric); text-transform: uppercase; color: var(--text-dim); }
.vp-dt { font: 600 17px var(--font-sans); letter-spacing: -.02em; }
.vp-bar { position: relative; width: 70%; height: 34px; border-radius: 5px; background: color-mix(in srgb, var(--text) 6%, transparent); overflow: hidden; }
.vp-bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 5px; background: var(--accent-fill); }
.vp-bar i.is-over { background: var(--yellow); }
.vp-bar[style*="--pace"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: var(--pace); border-top: 1.5px dashed var(--text-dim); opacity: .6; }
.vp-v { font-size: 10.5px; color: var(--text-dim); white-space: nowrap; }
.vp-day.is-today { background: var(--text); color: var(--bg); }
.vp-day.is-today .vp-wd, .vp-day.is-today .vp-v { color: var(--bg); }
.vp-day.is-today .vp-bar { background: color-mix(in srgb, var(--bg) 22%, transparent); }
.vp-day.is-today .vp-bar::after { border-top-color: var(--bg); }
.vp-day.is-future { background: transparent; box-shadow: none; outline: 1px dashed var(--border-hi); outline-offset: -1px; }
.vp-day.is-future .vp-dt { color: var(--text-dim); }

/* the journal and where it went */
.vp-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
.vp-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vp-journal { padding-bottom: 8px; }
.vp-scroll { max-height: 520px; overflow: auto; margin: 0 -20px; padding: 0 20px 8px; overscroll-behavior: contain; }
.vp-jday { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 10px; padding: 16px 2px 6px; background: var(--surface); }
.vp-jd { font: 600 14px var(--font-sans); color: var(--text); }
.vp-jn { font: 400 12.5px var(--font-sans); color: var(--text-dim); }
.vp-jt { margin-left: auto; font-size: 13px; color: var(--text-mid); }
.vp-jrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 52px; padding: 0 0 0 14px; border-radius: 10px; }
.vp-jrow:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.vp-who { display: flex; flex-direction: column; min-width: 0; }
.vp-who b { font: 550 14px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-who small { font: 400 12.5px var(--font-sans); color: var(--text-dim); }
.vp-pay { font-size: 14px; color: var(--text); }
.vp-tile { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; background: color-mix(in srgb, var(--k) 20%, var(--surface)); color: var(--k); }
.vp-tile.sm { width: 30px; height: 30px; border-radius: 9px; }
.vp .vc-picker { margin: 10px 0 4px; padding: 12px; border-radius: 12px; background: var(--surface-2); }

.vp-kinds { display: grid; gap: 8px; margin-top: 12px; }
.vp-kind { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; border-radius: 14px;
  background: color-mix(in srgb, var(--k) 9%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: box-shadow 160ms; }
.vp-kind .vp-tile { grid-row: span 2; }
.vp-kind b { font: 600 13.5px var(--font-sans); }
.vp-kind small { grid-column: 2; font: 400 12px var(--font-sans); color: var(--text-dim); }
.vp-kind .vp-amt { grid-row: 1 / span 2; grid-column: 3; font-size: 15px; font-weight: 600; }
.vp-kind:hover { background: color-mix(in srgb, var(--k) 14%, var(--surface)); }
.vp-kind.is-on { box-shadow: inset 0 0 0 2px var(--k); }
.vp-kind:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* a phone: one column; where it went comes before the journal; the days scroll sideways. A media query, not a container:
   a container box would place the trip's fixed sheet inside itself instead of on the window */
@media (max-width: 760px) {
  .vp-post { padding: 18px 18px 16px; }
  .vp .vp-city { font-size: 44px; }
  .vp-say { font-size: 18px; padding-right: 0; }
  .vp-meta { padding-right: 76px; }
  .vp-stamp { right: 12px; top: 10px; width: 72px; height: 72px; font-size: 8.5px; box-shadow: inset 0 0 0 2px currentColor, inset 0 0 0 5px var(--surface), inset 0 0 0 6px currentColor; }
  .vp-stamp b { font-size: 13px; }
  .vp-days { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -4px; padding: 2px 4px 6px; scrollbar-width: none; }
  .vp-days::-webkit-scrollbar { display: none; }
  .vp-day { flex: 0 0 56px; scroll-snap-align: start; }
  .vp-grid { grid-template-columns: minmax(0, 1fr); }
  .vp-side { order: -1; }
  .vp-kinds { grid-template-columns: 1fr 1fr; }
  .vp-kind { grid-template-columns: auto minmax(0, 1fr); }
  .vp-kind .vp-amt { grid-row: auto; grid-column: 1 / -1; font-size: 17px; }
  .vp-kind .vp-tile { grid-row: auto; }
  .vp-kind small { grid-column: 1 / -1; }
  .vp-scroll { max-height: none; }
  .vp-dots i { width: 24px; height: 24px; }
}
@media (max-width: 1100px) { .vp-kind, .vp .vc-add { min-height: 48px; } }
@media (prefers-reduced-motion: reduce) { .vp-stamp { animation: none; } .vp-meter i, .vp-kind { transition: none; } }

/* the Beacon while a trip is on (beacon.js renderTrip): the pill names the trip and today's money; its card has the meter and "Open trip" */
.beacon[data-tone="trip"] .bc-ico { flex: none; color: var(--bc-ink-2); margin-left: -2px; }
.beacon .bc-big { margin-top: 8px; font: 600 22px/1.1 var(--font-sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.beacon .bc-meter { display: block; height: 6px; margin: 8px 0 2px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.beacon .bc-meter i { display: block; height: 100%; border-radius: 3px; background: var(--bc-ok); }
.beacon .bc-go { justify-self: start; margin-top: 10px; padding: 9px 16px; border-radius: 999px; background: var(--bc-ink); color: var(--bc-bg); font: 600 13px var(--font-sans); }

/* Plan a trip (PV-007, js/trip-plan-ui.js): where to, a month you drag across, budget chips, and the postcard that answers.
   Design: docs/design/planning-v2/proto.html?screen=trip-start. The city is Geist. */
.tp { display: grid; gap: 16px; }
.tp-head { display: grid; gap: 4px; }
.tp .tp-title { margin: 0; font: 600 28px/1.1 var(--font-sans); letter-spacing: -.03em; color: var(--text); }
.tp-sub { margin: 0; font: 400 14px/1.45 var(--font-sans); color: var(--text-dim); }
.tp .num { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; }
/* scoped to .tp: the tax pack's own .tp-grid (tax.css, loaded after this file) shares the name and was winning, so this trip never went to one column on a phone (found in PS-002) */
.tp .tp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.tp-card { display: grid; gap: 20px; padding: 20px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.tp-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.tp-row b { font: 600 15px var(--font-sans); color: var(--text); }
.tp-tip { font: 400 12.5px var(--font-sans); color: var(--text-dim); }

/* where to: an outlined field with its label floating at the top edge */
.tp-where { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: var(--r-input, 14px); border: 1px solid var(--border-hi, var(--border)); background: var(--surface); cursor: text; }
.tp-where:focus-within { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.tp-lead { display: grid; color: var(--text-dim); }
.tp-where input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: 600 17px var(--font-sans); outline: none; }
.tp-fl { position: absolute; left: 12px; top: -9px; padding: 0 5px; background: var(--surface); font: 500 12px var(--font-sans); color: var(--text-dim); }

/* the month: days are neutral (only kinds carry colour); the trip's days in the accent, its ends filled */
.tp-range { margin: 2px 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.tp-calh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tp-month { font: 600 12px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.tp-mo { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; }
.tp-mo:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.tp-mo:disabled { color: var(--text-dim); opacity: .4; cursor: default; background: none; }
.tp-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; user-select: none; -webkit-user-select: none; touch-action: none; }
.tp-wd { padding: 4px 0; text-align: center; font: 600 10.5px var(--font-numeric); color: var(--text-dim); }
.tp-d { height: 48px; min-width: 0; border: 0; border-radius: 10px; background: none; color: var(--text); font: 600 14px var(--font-sans); font-variant-numeric: tabular-nums; cursor: pointer; }
.tp-d:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.tp-d:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tp-d.is-past { color: var(--text-dim); opacity: .45; cursor: default; background: none; }
.tp-d.is-in { border-radius: 0; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tp-d.is-a, .tp-d.is-b, .tp-d.is-ab { background: var(--accent-fill); color: var(--on-accent); }
.tp-d.is-a { border-radius: 10px 0 0 10px; } .tp-d.is-b { border-radius: 0 10px 10px 0; } .tp-d.is-ab { border-radius: 10px; }

/* budget chips: pills; last trip's pace wears the trip's kind colour */
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tp-chip { min-height: 48px; padding: 0 16px; border: 1px solid var(--border-hi, var(--border)); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 13.5px var(--font-sans); font-variant-numeric: tabular-nums; cursor: pointer; }
.tp-chip:hover { background: color-mix(in srgb, var(--text) 5%, var(--surface)); }
.tp-chip.is-pace { border-color: transparent; background: color-mix(in srgb, var(--cat-3) 16%, var(--surface)); }
.tp-chip.is-on { border-color: transparent; background: var(--accent-fill); color: var(--on-accent); }
.tp-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tp-switch { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); cursor: pointer; }
.tp-switch input { flex: none; width: 40px; height: 24px; accent-color: var(--accent-fill); cursor: pointer; }
.tp-switch span { display: flex; flex-direction: column; gap: 2px; }
.tp-switch b { font: 600 14px var(--font-sans); color: var(--text); }
.tp-switch small { font: 400 12.5px var(--font-sans); color: var(--text-dim); }

/* the postcard: the place, the answer, last trip's pace, and the one button */
.tp-post { position: sticky; top: calc(var(--nav-h, 64px) + 16px); display: grid; gap: 14px; align-content: start; padding: 24px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-md); min-width: 0; }
.tp-kick { font: 600 12px var(--font-sans); letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); }
.tp-city { margin: 0; font: 600 56px/1 var(--font-sans); letter-spacing: -.045em; color: var(--text); overflow-wrap: anywhere; }
.tp-say { margin: 0; max-width: 30ch; font: 600 26px/1.25 var(--font-sans); letter-spacing: -.025em; color: var(--text); text-wrap: balance; }
.tp-say .sp-ans { color: var(--accent); }
.tp-means { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, transparent); font: 400 13.5px/1.45 var(--font-sans); color: var(--text-mid); }
.tp-means svg { margin-top: 1px; color: var(--text-dim); }
.tp-go { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tp-start { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font: 600 15px var(--font-sans); cursor: pointer; }
.tp-start:hover { background: var(--accent-fill-hi, var(--accent-fill)); }
.tp-start:disabled { opacity: .6; cursor: default; }
.tp-status { font: 500 13px var(--font-sans); color: var(--text-dim); }
.tp :focus { outline: none; }
.tp :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 760px) {
  .tp .tp-grid { grid-template-columns: minmax(0, 1fr); }
  .tp-card { padding: 16px; gap: 18px; }
  .tp-post { position: static; padding: 20px 18px; }
  .tp-city { font-size: 42px; }
  .tp-say { font-size: 21px; }
  .tp-start { width: 100%; justify-content: center; }
}

/* Trip story (PV-008, js/trip-story-ui.js): five cards when a trip is over. In a row on a laptop; on a phone one at a time,
   tapped through, with pips. Kind colours, darkened so white text passes AA. Design: proto.html?screen=trip-story */
.vp .ts-wrap { display: none; }
.vp.is-story .ts-wrap { display: grid; gap: 14px; }
.vp.is-story > :not(.vc-top):not(.ts-wrap), .vp.is-story .vc-save { display: none; }
.ts-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.ts-head > div { display: grid; gap: 4px; margin-right: auto; }
.ts-head .vc-link { flex: none; white-space: nowrap; }
.vp .ts-title { margin: 0; font: 600 34px/1.05 var(--font-sans); letter-spacing: -.035em; color: var(--text); overflow-wrap: anywhere; }
.ts-sub { margin: 0; font: 400 13.5px var(--font-sans); color: var(--text-dim); }
.ts-stack { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.ts-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 360px; padding: 20px 18px; border-radius: var(--r-card); overflow: hidden;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); }
.ts-card.is-kind { background: color-mix(in srgb, var(--k) 58%, #000); color: #fff; }
.ts-k { font: 600 11px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.ts-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: rgb(255 255 255 / .16); }
.ts-card:not(.is-kind) .ts-ic { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--accent); }
.ts-h { margin: auto 0 0; font: 600 30px/1.02 var(--font-sans); letter-spacing: -.035em; overflow-wrap: anywhere; }
.ts-t { margin: 0; font: 400 13.5px/1.4 var(--font-sans); }
.ts-num { margin: 0; font: 600 28px/1 var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.ts-go { align-self: flex-start; min-height: 44px; margin-top: 4px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font: 600 14px var(--font-sans); cursor: pointer; }
.ts-pips { display: none; }
.ts-tip { display: none; }
.vp .vp-story-btn[hidden] { display: none; }
@media (max-width: 760px) {
  .vp .ts-title { font-size: 28px; }
  .ts-head { flex-wrap: nowrap; align-items: center; }
  .vp.is-story .vp-new { display: none; }   /* the last card says "Plan the next one" */
  .ts-stack { display: block; height: min(520px, calc(100dvh - 300px)); min-height: 360px; overflow-x: clip; cursor: pointer; touch-action: manipulation; }
  .ts-card { position: absolute; inset: 0; min-height: 0; padding: 30px 22px 22px; opacity: 0; transform: translateX(16px); pointer-events: none; transition: opacity 280ms cubic-bezier(.2, 0, 0, 1), transform 280ms cubic-bezier(.2, 0, 0, 1); }
  .ts-card.is-cur { opacity: 1; transform: none; pointer-events: auto; }
  .ts-card.is-past { transform: translateX(-16px); }
  .ts-h { font-size: 42px; }
  .ts-num { font-size: 34px; }
  .ts-pips { display: flex; gap: 4px; position: absolute; left: 16px; right: 16px; top: 12px; z-index: 2; pointer-events: none; }
  .ts-pip { flex: 1; height: 3px; border-radius: 2px; background: color-mix(in srgb, currentColor 30%, transparent); color: var(--text); }
  .ts-pip.is-on { background: var(--text); }
  .ts-stack:has(.ts-card.is-kind.is-cur) .ts-pip { color: #fff; }
  .ts-stack:has(.ts-card.is-kind.is-cur) .ts-pip.is-on { background: #fff; }
  .ts-tip { display: block; margin: 0; text-align: center; font: 400 12.5px var(--font-sans); color: var(--text-dim); }
}
@media (prefers-reduced-motion: reduce) { .ts-card { transition: none; } }

/* PS-002: under the Plan sentence the place and the budget are changed up in the sentence, so the field and the chips fold away here */
.tp-bound .tp-where, .tp-bound .tp-budget { display: none; }
