:root {
  --bg: #ffffff;
  --bg-subtle: #f5f5f7;
  --segment: #eeeef0;
  --track: #e8e8ed;
  --ink: #1d1d1f;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --link: #0066cc;
  --success: #1a7f37;
  --hairline: #d2d2d7;
  --burgundy: #6b1e2d;
  --gold: #d2b47a;
  --gutter: 20px;
  --radius: 2px; /* square-ish corners everywhere */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg-subtle);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

.app {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Type scale */
.large-title { font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: -0.022em; }
.title { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.016em; }
.headline { font-size: 17px; line-height: 22px; font-weight: 600; }
.subhead { font-size: 15px; line-height: 21px; color: var(--text-secondary); }
.subhead.strong { color: var(--text); }
.footnote { font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.muted { color: var(--text-tertiary); }
.center { text-align: center; }

/* Header & progress */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter) 10px;
}
.wordmark { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; color: inherit; text-decoration: none; }
.product { font-size: 13px; color: var(--text-tertiary); }

.progress { padding: 4px var(--gutter) 0; }
.bar { display: flex; gap: 4px; }
.bar span { flex: 1; height: 2px; border-radius: 1px; background: var(--track); transition: background .3s; }
.bar span.on { background: var(--ink); }
.progress-label { margin-top: 8px; font-size: 13px; color: var(--text-tertiary); }

/* Screens */
.screen {
  display: flex; flex-direction: column; gap: 20px;
  padding: 16px var(--gutter) 24px;
  flex: 1;
}
.screen[hidden] { display: none; }
.screen[data-screen="0"], .screen[data-screen="5"] { gap: 28px; padding-top: 24px; }
.heading { display: flex; flex-direction: column; gap: 6px; }
.block { display: flex; flex-direction: column; gap: 6px; }
.block.tight { gap: 2px; }

/* Fields: hairline underline, no boxes */
.fields { display: flex; flex-direction: column; }
.row { display: flex; gap: 16px; }
.row .field { flex: 1; min-width: 0; }
.row .field-narrow { flex: 0 0 80px; }
.field {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 0 9px;
  border-bottom: 1px solid var(--hairline);
  transition: border-color .2s;
}
.field:focus-within { border-bottom-color: var(--ink); }
.field > span { font-size: 13px; line-height: 18px; color: var(--text-tertiary); }
.field input, .field select {
  font: inherit; font-size: 17px; line-height: 24px; color: var(--text);
  border: 0; outline: 0; background: transparent; width: 100%;
  appearance: none; -webkit-appearance: none;
}
.field input::placeholder { color: var(--text-tertiary); }

/* Travellers counter: iOS-style stepper */
.counter { display: flex; align-items: center; justify-content: space-between; }
.counter output { font-size: 17px; line-height: 24px; }
.stepper { display: flex; padding: 2px; border-radius: var(--radius); background: var(--segment); }
.stepper button {
  width: 44px; height: 28px; border-radius: var(--radius);
  font-size: 20px; line-height: 1; color: var(--text);
  transition: background .15s;
}
/* Separator drawn as a background so ::before/::after stay free for the glyphs */
.stepper button + button { background: linear-gradient(var(--hairline), var(--hairline)) left center / 1px 14px no-repeat; }
/* − and + drawn with centered bars: text glyphs never sit on the optical center */
.stepper button { position: relative; font-size: 0; }
.stepper button::before, .stepper button[data-inc]::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%);
}
.stepper button[data-inc]::after { transform: translate(-50%, -50%) rotate(90deg); }
.stepper button:active { background: #fff; }
.stepper button:disabled { color: var(--text-tertiary); cursor: default; }

/* Date split into day / month / year, each selectable on its own */
.date-parts { display: flex; gap: 6px; }

/* Custom select (replaces native menus) */
.cselect { position: relative; }
.date-parts .cselect { display: inline-block; }
.cselect-trigger {
  display: inline-block; width: auto; text-align: left;
  font-size: 17px; line-height: 24px; color: var(--text);
  padding: 0 4px; margin: 0 -4px; border-radius: var(--radius);
  transition: background .15s;
}
.date-parts .cselect-trigger { width: auto; margin: 0; }
.date-parts .cselect:first-child .cselect-trigger { margin-left: -4px; }
.cselect-trigger[aria-expanded="true"] { background: var(--segment); }
.cselect-trigger:focus-visible { outline: none; background: var(--segment); }
.cselect-menu {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: -8px;
  width: max-content; max-height: 264px; overflow-y: auto;
  list-style: none; padding: 3px;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .08);
  animation: menu-in .14s ease-out;
  transform-origin: top left;
  scrollbar-width: none;
}
.cselect-menu::-webkit-scrollbar { display: none; }
.cselect-menu li {
  padding: 8px 12px; border-radius: var(--radius);
  font-size: 17px; line-height: 22px; white-space: nowrap; cursor: pointer; text-align: center;
}
.cselect-menu li:focus { background: var(--bg-subtle); outline: none; }
.cselect-menu li[aria-selected="true"] { font-weight: 600; }
@keyframes menu-in { from { opacity: 0; transform: scale(.97) translateY(-4px); } }

/* Buttons */
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.btn-primary {
  width: 100%; height: 48px; border-radius: var(--radius);
  background: var(--ink); color: #fff;
  font-size: 17px; font-weight: 600;
  transition: transform .1s, opacity .2s;
}
.btn-primary:active { transform: scale(.98); opacity: .9; }
.btn-link {
  display: block; width: 100%; padding: 8px 0;
  color: var(--link); font-size: 17px; text-align: center; cursor: pointer;
}
.btn-link.left { text-align: left; }
.btn-pill {
  align-self: flex-start;
  padding: 8px 16px; border-radius: var(--radius);
  background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600;
}
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.cta { display: flex; flex-direction: column; gap: 4px; }
.note { margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--text-tertiary); text-align: center; }

/* Passport scan block */
.scan {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px 16px 16px;
  border-radius: var(--radius); background: var(--bg-subtle);
}
.scan-visual {
  position: relative; flex: 0 0 84px; height: 106px;
  display: grid; place-items: center;
}
/* Viewfinder corners */
.scan-visual::before, .scan-visual::after {
  content: ""; position: absolute; inset: 0;
  border: 2px solid var(--ink); border-radius: var(--radius);
  -webkit-mask: linear-gradient(#000 0 0) top left / 14px 14px no-repeat,
                linear-gradient(#000 0 0) top right / 14px 14px no-repeat,
                linear-gradient(#000 0 0) bottom left / 14px 14px no-repeat,
                linear-gradient(#000 0 0) bottom right / 14px 14px no-repeat;
          mask: linear-gradient(#000 0 0) top left / 14px 14px no-repeat,
                linear-gradient(#000 0 0) top right / 14px 14px no-repeat,
                linear-gradient(#000 0 0) bottom left / 14px 14px no-repeat,
                linear-gradient(#000 0 0) bottom right / 14px 14px no-repeat;
}
.scan-visual::after { display: none; }
.passport-cover {
  position: relative;
  width: 58px; height: 80px;
  border-radius: 3px 6px 6px 3px;
  background: linear-gradient(90deg, #5a1724 0 4px, var(--burgundy) 4px);
  box-shadow: 0 4px 10px -2px rgba(51, 5, 15, .25);
  display: flex; flex-direction: column; align-items: center;
  padding-left: 4px; color: var(--gold); text-align: center;
}
.cover-country { margin-top: 9px; font-size: 4.2px; line-height: 5.5px; font-weight: 500; letter-spacing: .12em; }
.cover-title { margin-top: 23px; font-size: 6px; font-weight: 600; letter-spacing: .16em; }
.cover-chip {
  position: absolute; bottom: 9px; left: calc(50% + 2px); transform: translateX(-50%);
  width: 10px; height: 7px; border: .8px solid var(--gold); border-radius: 1px;
}
.cover-chip::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 3.2px; height: 3.2px; border: .8px solid var(--gold); border-radius: 50%;
}
.scan-content { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.scan-content .footnote { margin-top: 2px; }

/* Segmented control */
.group { border: 0; display: flex; flex-direction: column; gap: 10px; }
.group legend { margin-bottom: 10px; }
.segmented {
  display: flex; padding: 2px; border-radius: var(--radius); background: var(--segment);
}
.segmented label { flex: 1; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; padding: 6px 0; border-radius: var(--radius);
  text-align: center; font-size: 15px; line-height: 20px;
  transition: background .2s, box-shadow .2s;
}
.segmented input:checked + span { background: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.segmented input:focus-visible + span { outline: 2px solid var(--link); }

/* Option rows */
.option {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--hairline); cursor: pointer;
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option-text { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.option-title, .option-price { font-size: 17px; line-height: 22px; color: var(--text-tertiary); }
.option:has(input:checked) .option-title,
.option:has(input:checked) .option-price { color: var(--text); font-weight: 600; }
.group .option + .footnote, .group .option:last-of-type + .footnote { margin-top: 8px; }

/* Summary */
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 15px; line-height: 21px; }
.summary dt { color: var(--text-secondary); }
.summary .total { margin-top: 6px; padding-top: 11px; border-top: 1px solid var(--hairline); font-size: 17px; font-weight: 600; }
.summary .total dt { color: var(--text); }

/* How it works */
.how { display: flex; flex-direction: column; gap: 14px; }
.how ol { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.how li {
  counter-increment: step; position: relative; padding-left: 24px;
  display: flex; flex-direction: column; gap: 1px; font-size: 15px; line-height: 21px;
}
.how li::before { content: counter(step); position: absolute; left: 0; color: var(--text-tertiary); }
.how li span { color: var(--text-secondary); }

/* Tracking */
.tracking { list-style: none; }
.tracking li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--hairline);
}
.tracking li > span { flex: 1; display: flex; flex-direction: column; }
.tracking strong { font-size: 17px; line-height: 24px; font-weight: 400; }
.tracking small { font-size: 13px; color: var(--text-tertiary); }
.tracking em { font-style: normal; font-size: 13px; color: var(--text-tertiary); }
.tracking em.done { color: var(--success); }
.tracking em.current { color: var(--link); }

/* Disclaimer */
.disclaimer {
  padding: 16px var(--gutter);
  background: var(--bg-subtle);
  font-size: 12px; line-height: 16px; color: var(--text-tertiary);
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* "or" divider: centered label between two hairlines */
.divider {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; line-height: 18px; letter-spacing: .01em; color: var(--text-tertiary);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline) 45%);
}
.divider::after { background: linear-gradient(90deg, var(--hairline) 55%, transparent); }

/* ID photo: typographic requirements + preview once chosen */
.photo { display: flex; flex-direction: column; gap: 10px; }
.photo-hint { text-align: center; font-size: 13px; line-height: 18px; color: var(--text-tertiary); }
.avatar { position: relative; align-self: center; width: 168px; height: 168px; margin: 6px 0 26px; }
.avatar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--bg-subtle); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-chip {
  position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px; background: #fff;
  font-size: 17px; font-weight: 500; white-space: nowrap; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .06);
  transition: transform .15s;
}
.avatar-chip:active { transform: translateX(-50%) scale(.97); }
.btn-secondary {
  display: flex; align-items: center; justify-content: center;
  height: 48px; border: 1px solid var(--ink); border-radius: var(--radius);
  font-size: 17px; font-weight: 600; cursor: pointer; margin-top: 6px;
  transition: background .15s;
}

.btn-pill { cursor: pointer; }

/* Helper text under a field */
.helper { margin-top: 6px; margin-bottom: 4px; font-size: 13px; line-height: 18px; color: var(--text-tertiary); }

/* Custom checkbox */
.check { display: flex; gap: 12px; align-items: center; font-size: 13px; line-height: 19px; color: var(--text-secondary); cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { position: relative; flex: 0 0 20px; height: 20px; border: 1.5px solid var(--ink); border-radius: var(--radius); transition: background .15s; }
.check input:checked + .box { background: var(--ink); }
.check input:checked + .box::after {
  content: ""; position: absolute; left: 5.5px; top: 1.5px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check input:focus-visible + .box { outline: 2px solid var(--link); outline-offset: 2px; }
.check a { color: var(--text); }

/* Plain text actions (edit / delete) */
.text-action { font-size: 15px; color: var(--link); padding: 4px 0; }
.text-action.danger { color: #c4314b; }

/* Travelers list */
.travelers { list-style: none; border-top: 1px solid var(--hairline); }
.travelers li { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.traveler-name { flex: 1; font-size: 17px; font-weight: 600; }

/* Review */
.review { display: flex; flex-direction: column; gap: 24px; }
.review-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.review-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; line-height: 21px; }
.review-rows dt { color: var(--text-secondary); }
.review-rows dd { text-align: right; font-weight: 500; }

[data-show-when][hidden] { display: none; }

/* Current traveler, shown under step titles */
.traveler-line { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 17px; line-height: 22px; font-weight: 600; color: var(--text); }
.monogram {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em;
}

/* "New traveler" bar with cancel */
.adding-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 var(--gutter); padding: 8px 0 10px;
  font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--hairline);
}
.adding-bar[hidden] { display: none; }

/* Travelers list: monogram rows + "add" row */
.travelers li { min-height: 56px; }
.add-row { display: flex; align-items: center; gap: 16px; width: 100%; font-size: 17px; font-weight: 600; text-align: left; }
.monogram-add {
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink);
  font-size: 18px; font-weight: 400; line-height: 1;
}

.add-row .monogram-add { transition: background .15s, color .15s; }

/* Plus drawn with two centered bars (a "+" glyph never sits on the optical center) */
.monogram-add { position: relative; font-size: 0; }
.monogram-add::before, .monogram-add::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%);
}
.monogram-add::after { transform: translate(-50%, -50%) rotate(90deg); }

/* The hidden attribute always wins over component display rules */
[hidden] { display: none !important; }

/* Primary CTA floats at the bottom on long pages (sticky, above the mobile browser bar) */
.screen > .cta {
  position: sticky; bottom: 0; z-index: 10;
  margin: 0 calc(-1 * var(--gutter)) -24px;
  padding: 20px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 20px);
}

/* Review: values editable in place */
.review-rows > div { align-items: center; }
.review-rows dt { flex-shrink: 0; }
.review-rows dd { flex: 1; min-width: 0; display: flex; justify-content: flex-end; }
.review-rows .cselect-trigger, .inline-input {
  font-size: 15px; line-height: 21px; font-weight: 500; color: var(--text);
}
.review-rows .cselect-trigger { margin: 0 -4px 0 0; }
.review-rows .cselect-menu { left: auto; right: -8px; transform-origin: top right; }
.review-rows .cselect-menu li { font-size: 15px; }
.review-rows .date-parts { gap: 4px; }
.inline-input {
  max-width: 100%; text-align: right; border: 0; outline: 0; background: transparent;
  font-family: inherit; padding: 0 4px; margin-right: -4px; border-radius: var(--radius);
  transition: background .15s;
}
.inline-input:focus { background: var(--segment); }
.inline-input::placeholder { color: var(--text-tertiary); font-weight: 400; }

/* Pencil hint after each editable review value */
.review-rows dd { align-items: center; gap: 10px; }
.edit-hint { display: grid; place-items: center; width: 20px; height: 20px; color: var(--text-tertiary); flex-shrink: 0; transition: color .15s; }
.edit-hint:focus-visible { color: var(--ink); }

/* Black buttons: "biseau discret" depth (chosen among 5 explorations, see explorations/buttons.html) */
.btn-primary, .btn-pill {
  background: linear-gradient(180deg, #2b2b2e 0%, #1a1a1c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(0, 0, 0, .5),
    0 0 0 1px #0b0b0c,
    0 1px 2px rgba(0, 0, 0, .18);
  transition: filter .15s, box-shadow .08s;
}

.btn-primary:active, .btn-pill:active {
  transform: none; opacity: 1;
  background: linear-gradient(180deg, #1a1a1c, #232326);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6), 0 0 0 1px #0b0b0c;
}

/* Segmented control: selected segment = black bevel button (chosen among 5 explorations, see explorations/segmented.html) */
.segmented { background: #ececef; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.segmented input:checked + span {
  color: #fff; font-weight: 600;
  background: linear-gradient(180deg, #2b2b2e 0%, #1a1a1c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .5), 0 0 0 1px #0b0b0c, 0 1px 2px rgba(0, 0, 0, .18);
}
.segmented input:checked:focus-visible + span { outline: none; } /* the black thumb already shows the selection */

/* Product reminder in the payment recap */
.product-line { padding: 4px 0 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px; }
.product-name { font-size: 17px; line-height: 22px; font-weight: 600; }
.product-line .footnote { margin-top: 2px; }

/* Trustpilot-style rating badge (placeholder until the official TrustBox widget) */
.tp-badge { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; font-size: 13px; color: var(--text-secondary); }
.tp-badge strong { color: var(--text); font-weight: 600; }
.tp-stars { display: inline-flex; gap: 2px; }
.tp-star { width: 16px; height: 16px; display: grid; place-items: center; background: #dcdce6; }
.tp-star.on { background: #00b67a; }
.tp-star.half { background: linear-gradient(90deg, #00b67a 50%, #dcdce6 50%); }
.tp-star svg { width: 74%; height: 74%; }


/* Reviews stack at the bottom of the payment page (placeholder reviews until the official Trustpilot widget) */
.reviews { padding: 8px var(--gutter) 32px; }
.reviews .headline { margin-bottom: 4px; }
.tp-author { display: flex; align-items: center; gap: 12px; }
  .tp-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--segment); }
  .tp-author strong { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
  .tp-author small { font-size: 12px; color: var(--text-tertiary); }
  /* Animated stack: the front review lifts up, then tucks behind the pile while the others glide forward.
     Curves and rules from Emil Kowalski's animation standards (review-animations skill). */
  .tp-stack {
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);       /* lift: leaving the user's focus */
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);   /* cards moving on screen */
    position: relative; height: 252px; perspective: 1000px;
  }
  .tp-stack-card {
    position: absolute; top: 64px; left: 0; right: 0; padding: 16px;
    background: #fff; border-radius: var(--radius);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 12px 28px -14px rgba(0, 0, 0, .28);
    transform-origin: 50% 100%;
    transition: transform 1300ms cubic-bezier(0.45, 0, 0.2, 1); /* moves together with the leaving card, same curve */
    will-change: transform;
  }
  /* Depth shade as an opacity overlay (GPU) instead of animating background-color (paint) */
  .tp-stack-card::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: #1d1d1f; opacity: 0; transition: opacity 1200ms cubic-bezier(0.45, 0, 0.2, 1);
  }
  .tp-stack-card p { font-size: 14px; line-height: 20px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* Cards behind the front one are blank (no text bleeding through) and peek out at the bottom */
  /* One content block per card fades (a single composited layer), not each child separately */
  .tp-content { display: flex; flex-direction: column; gap: 8px; transition: opacity 500ms var(--ease-out) 250ms; }
  /* The next card (pos 1) already shows its review, so it is never blank when the front card lifts;
     at rest it is hidden under the opaque front card. Deeper cards stay blank. */
  .tp-stack-card[data-pos="2"] .tp-content, .tp-stack-card[data-pos="3"] .tp-content { opacity: 0; transition-delay: 0ms; }
  .tp-stack-card[data-pos="0"] { z-index: 4; transform: translate3d(0, 0px, 0) scale(1); }
  .tp-stack-card[data-pos="1"] { z-index: 3; transform: translate3d(0, 12px, 0) scale(.95); }
  .tp-stack-card[data-pos="2"] { z-index: 2; transform: translate3d(0, 24px, 0) scale(.9); }
  .tp-stack-card[data-pos="3"] { z-index: 1; transform: translate3d(0, 34px, 0) scale(.85); }
  .tp-stack-card[data-pos="1"]::after { opacity: .04; }
  .tp-stack-card[data-pos="2"]::after { opacity: .08; }
  .tp-stack-card[data-pos="3"]::after { opacity: .12; }
  /* Reduced motion: no movement, the reviews simply crossfade in place */
  @media (prefers-reduced-motion: reduce) {
    .tp-stack-card, .tp-stack-card::after { transition: none; }
    .tp-content { transition-delay: 0ms; }
  }

.reviews .tp-stack { margin-top: -40px; } /* the space reserved for the lift sits mostly in the heading margin */
.reviews .headline { position: relative; z-index: 0; }

.tp-stack-card.no-transition, .tp-stack-card.no-transition::after, .tp-stack-card.no-transition .tp-content { transition: none; }

/* Announcement bar: black bevel strip above the header, three trust messages sliding up in turn */
.announce {
  position: relative; height: 32px; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, #2b2b2e 0%, #1a1a1c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(0, 0, 0, .5);
}
.announce span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  transform: translateY(100%); opacity: 0;
  transition: transform 700ms cubic-bezier(0.23, 1, 0.32, 1), opacity 700ms cubic-bezier(0.23, 1, 0.32, 1);
}
.announce span.is-current { transform: translateY(0); opacity: 1; }
.announce span.is-leaving { transform: translateY(-100%); opacity: 0; }
.announce .ico { width: 14px; height: 14px; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .announce span { transition: opacity 300ms ease; transform: none !important; }
}

/* Icon micro-animations when a message slides in (short, ease-out, once per appearance) */
.announce .hand-min, .announce .hand-hour { transform-box: view-box; transform-origin: 12px 12px; }
.announce .check { stroke-dasharray: 1; stroke-dashoffset: 1; }
.announce .shackle { transform-box: fill-box; transform-origin: 50% 100%; transform: translateY(-3px); }
.announce span.is-current .hand-min, .announce span.is-leaving .hand-min { animation: icon-clock-min 900ms cubic-bezier(0.23, 1, 0.32, 1) 150ms both; }
.announce span.is-current .hand-hour, .announce span.is-leaving .hand-hour { animation: icon-clock-hour 900ms cubic-bezier(0.23, 1, 0.32, 1) 150ms both; }
.announce span.is-current .check, .announce span.is-leaving .check { animation: icon-draw 450ms cubic-bezier(0.23, 1, 0.32, 1) 200ms forwards; }
.announce span.is-current .shackle, .announce span.is-leaving .shackle { animation: icon-lock 350ms cubic-bezier(0.23, 1, 0.32, 1) 300ms forwards; }
@keyframes icon-clock-min { from { transform: rotate(-360deg); } to { transform: rotate(0); } }  /* minute hand spins a full turn */
@keyframes icon-clock-hour { from { transform: rotate(-30deg); } to { transform: rotate(0); } }   /* hour hand moves one notch */
@keyframes icon-draw { to { stroke-dashoffset: 0; } }                                        /* check mark draws itself */
@keyframes icon-lock { to { transform: translateY(0); } }                                    /* shackle snaps shut */
@media (prefers-reduced-motion: reduce) {
  .announce .check { stroke-dashoffset: 0; }
  .announce .shackle { transform: none; }
  .announce span .hand-min, .announce span .hand-hour, .announce span .check, .announce span .shackle { animation: none !important; }
}

/* Check mark in green (readable on the black bar) */
.announce .check { stroke: #34c759; }

/* Lock turns green once the shackle has closed (shackle closes at 300ms + 350ms) */
.announce span.is-current svg:has(.shackle), .announce span.is-leaving svg:has(.shackle) { animation: icon-secured 300ms ease 650ms forwards; }
@keyframes icon-secured { to { color: #34c759; } }
@media (prefers-reduced-motion: reduce) { .announce svg:has(.shackle) { animation: none !important; color: #34c759; } }

/* Step titles stay on one line on narrow phones */
.screen .title { font-size: clamp(22px, 6.9vw, 26px); }

/* Missing / invalid field (default style until one is picked in explorations/field-errors.html) */
.field.invalid { border-bottom-color: #d70015; }
.field-error { margin-top: 6px; margin-bottom: 4px; font-size: 13px; line-height: 18px; color: #d70015; animation: field-error-in 250ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes field-error-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .field-error { animation: none; } }

/* Error underline wins over the focus underline */
.field.invalid, .field.invalid:focus-within { border-bottom-color: #d70015; }

/* Never zoom on focus (iOS zooms into any field under 16px): every editable text is at least 16px */
input, select, textarea { font-size: max(16px, 1em); }
.inline-input { font-size: 16px; }

/* Chosen error style: shake (see explorations/field-errors.html, option 3) */
.field.invalid { animation: field-shake 320ms cubic-bezier(0.23, 1, 0.32, 1); transition: none; } /* red underline appears instantly with the shake */
.field.invalid input::placeholder { color: #d70015; opacity: 1; }
@keyframes field-shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@media (prefers-reduced-motion: reduce) { .field.invalid { animation: none; } }

/* Address suggestions (same surface as the custom select menus) */
.field { position: relative; }
.addr-suggest {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: -8px; right: -8px;
  list-style: none; padding: 3px; background: #fff; border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .08);
  animation: menu-in .14s ease-out; transform-origin: top center;
}
.addr-suggest li { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: var(--radius); cursor: pointer; }
.addr-suggest li strong { font-size: 16px; line-height: 21px; font-weight: 500; }
.addr-suggest li span { font-size: 13px; line-height: 18px; color: var(--text-tertiary); }
.addr-suggest li[aria-selected="true"] { background: var(--bg-subtle); }

/* Field filled automatically: brief green wash so the user sees what changed */
.field.autofilled input { animation: autofilled 1200ms cubic-bezier(0.23, 1, 0.32, 1); border-radius: var(--radius); }
@keyframes autofilled { from { background: rgba(52, 199, 89, .18); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .field.autofilled input, .addr-suggest { animation: none; } }

.field:focus-within { z-index: 30; } /* suggestions stay above the following fields and the sticky button */

/* Mobile: 100vh includes the hidden browser bars, so a page that fits still scrolls. dvh = the height actually visible. */
.app { min-height: 100vh; min-height: 100dvh; }

/* Hover effects only on devices with a real pointer: on touch screens hover "sticks" to the last tapped spot
   (it made the "+" circle flash black when coming back to the travelers page). */
@media (hover: hover) and (pointer: fine) {
  .cselect-trigger:hover { background: var(--segment); }
  .cselect-menu li:hover { background: var(--bg-subtle); }
  .btn-secondary:hover { background: var(--bg-subtle); }
  .add-row:hover .monogram-add { background: var(--ink); color: #fff; }
  .inline-input:hover { background: var(--segment); }
  .review-rows > div:hover .edit-hint { color: var(--ink); }
  .btn-primary:hover, .btn-pill:hover { filter: brightness(1.08); }
}

/* No grey/black tap flash from mobile browsers; pressed states are designed explicitly (:active) */
html { -webkit-tap-highlight-color: transparent; }

/* Payment method: vertical radio list (chosen in explorations/payment-method.html, option 1) */
.methods { display: flex; flex-direction: column; }
.method { border-bottom: 1px solid var(--hairline); }
.method:first-child { border-top: 1px solid var(--hairline); }
.method input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.method-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; }
.method-name { flex: 1; font-size: 17px; line-height: 22px; }
.method-name small { display: block; font-size: 13px; line-height: 18px; color: var(--text-tertiary); }
.ring { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; position: relative; box-shadow: inset 0 0 0 1.5px #c7c7cc; transition: box-shadow 150ms cubic-bezier(0.23, 1, 0.32, 1); }
.ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1); }
.method.selected .ring { box-shadow: inset 0 0 0 11px var(--ink); }
.method.selected .ring::after { transform: scale(1); }
.method input:focus-visible + .method-row .ring { outline: 2px solid var(--link); outline-offset: 2px; }
/* Accordion via grid rows 0fr → 1fr (height animation is the documented accordion exception) */
.card-fields { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 250ms cubic-bezier(0.23, 1, 0.32, 1), opacity 250ms cubic-bezier(0.23, 1, 0.32, 1); }
.card-fields > div { overflow: hidden; }
.method.selected .card-fields { grid-template-rows: 1fr; opacity: 1; }
.card-fields .fields { padding: 0 0 12px; }
@media (prefers-reduced-motion: reduce) { .card-fields, .ring, .ring::after { transition: none; } }

/* Recap title with the rating on the same line (wraps under it only if the screen is too narrow) */
.recap-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }
.recap-head .tp-badge { margin: 0; }
.recap-head .tp-star { width: 14px; height: 14px; }
.product-line .footnote { margin-top: 0; }
.recap-head .tp-badge { gap: 6px; font-size: 12px; }
.recap-head .tp-star { width: 12px; height: 12px; }
.recap-head { flex-wrap: nowrap; }
.recap-head .title { white-space: nowrap; }

/* Payment page: reviews sit right under the pay button (smaller lift, so less reserved space) */
.reviews { padding: 0 var(--gutter) 28px; }
.reviews .tp-stack { margin-top: 0; height: 214px; }
.reviews .tp-stack-card { top: 30px; }

/* Payment page: extra height goes below the reviews, never between the button and the reviews */
.screen[data-screen="paiement"] { flex: 0 0 auto; }
.reviews { flex: 1; }
/* Tighter gap between the pay button and the reviews */
.screen[data-screen="paiement"] { padding-bottom: 0; }
.screen[data-screen="paiement"] > .cta { padding-bottom: calc(8px + env(safe-area-inset-bottom)); margin-bottom: 0; }
.reviews .tp-stack { height: 196px; }
.reviews .tp-stack-card { top: 12px; }
/* Tighter gap between the payment method list and the pay button */
.screen[data-screen="paiement"] > .cta { margin-top: -18px; padding-top: 10px; }
/* No step counter on the payment page: the recap title sits right under the header */
.screen[data-screen="paiement"] { padding-top: 2px; }

/* Estimated delivery value in the recap */
.summary .eta-date { font-weight: 600; color: #1a7f37; }

/* Review cards: keep each card on its own GPU layer for the whole loop */
.tp-stack-card { backface-visibility: hidden; transform: translate3d(0, 0, 0); }

/* The shuffled card slides out to the side: clip it at the page edge, never create a horizontal scroll */
.reviews { overflow-x: clip; overflow-y: visible; }
.reviews .tp-stack-card { top: 6px; }
.reviews .tp-stack { height: 190px; }

/* Stripe card fields: the iframe sits where our <input> used to be, same height, so nothing shifts */
.stripe-input { min-height: 24px; }
.field:has(.StripeElement--focus) { border-bottom-color: var(--ink); }
.pay-error { margin: 0 0 4px; text-align: center; }
.btn-primary.is-paying { opacity: .7; }

/* Scroll hint: small floating pill above the sticky button, only when fields are hidden below it */
.screen > .cta { position: sticky; }
.scroll-hint {
  position: absolute; left: 50%; top: -20px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; font-weight: 500; color: var(--text);
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .08);
  animation: hint-in 250ms cubic-bezier(0.23, 1, 0.32, 1);
}
.scroll-hint svg { animation: hint-nudge 1.6s cubic-bezier(0.45, 0, 0.55, 1) 400ms 2; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 6px); } }
@keyframes hint-nudge { 50% { transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint, .scroll-hint svg { animation: none; } }

/* Custom select showing its placeholder ("Jour", "Mois", "Année", …) */
.cselect-trigger.is-placeholder { color: var(--text-tertiary); }

/* Browser / iOS autofill: keep our look instead of the yellow background */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 9999s;
}

.method-label { display: block; }

/* Apple Pay mark inside our own button: Apple logo + "Pay", optically aligned with the text */
[data-pay] { display: inline-flex; align-items: center; justify-content: center; gap: .32em; }
.apple-pay-mark { display: inline-flex; align-items: center; gap: .04em; font-weight: 600; letter-spacing: -0.01em; }
.apple-pay-mark svg { width: 1.02em; height: 1.02em; margin-top: -0.14em; }

/* Guarantee line above the recap rows */
.guarantee { padding: 10px 0 2px; text-align: center; font-size: 15px; line-height: 20px; font-weight: 700; color: var(--text); }
