/* Schedules: search (B's page in the shared system), plus what both schedule pages share: the sailing row, the
   search fields (port combobox, date label), the "Get a rate for this sailing" sheet and the lane chip. The results
   page links this file and its own. Semantic and component tokens only (tokens.css). */

/* ---------- 1. the bow seen from the bridge; it pushes forward as the page scrolls ----------
   The plate is a stage with its own aspect ratio, laid like object-fit: cover (fit the width or the height, anchored
   at 50% 15%, so the sky above the horizon holds the words), so the push can scale about the plate's own vanishing
   point: the bow mast on the horizon, 50% 38.6% of the plate. motion.js scene "sched-bow", scrubbed.
   Fix stage 2 (Emil): the scene starts at the page top (the section runs up under the fixed header, so p moves from
   the first pixel of scroll), runs over .6 of a screen (about the hero's own height, so the whole push is seen), and
   the plate drifts down against the scroll (--drift over the push), so it leaves slower than the page and the push
   reads. The drift never opens a gap: the stage's top slack is under the header before it could show. */
.sched-hero { --bh: clamp(480px, 70svh, 660px); --drift: calc(var(--bh) * .25); position: relative; margin-top: calc(-1 * var(--header-h)); height: calc(var(--bh) + var(--header-h)); overflow: hidden; isolation: isolate; background: var(--c-bg-alt); }
.bow { position: absolute; inset: var(--header-h) 0 0 0; overflow: hidden; z-index: 0; }
.bow-stage { position: absolute; left: 50%; top: 15%; width: max(100%, calc(var(--bh) * 1.7686)); aspect-ratio: 2400 / 1357;
  transform: translate(-50%, calc(-15% + var(--p, 0) * var(--drift))) scale(calc(1 + .07 * var(--p, 0))); transform-origin: 50% 38.6%; }
.sched-hero.is-moving .bow-stage { will-change: transform; }
/* gap pass M1: the plate lives at rest too: one idle layer inside the stage (data-idle="drift", 36 s a leg), so the
   scroll push and the entrance fade on .bow-stage and the idle never share a property */
/* final polish F3: the bow bobs (data-idle="bob", site.css: up and down only, 6.5 px, 3.8 on a phone; never astern).
   Where the stage is exactly the strip's height (tall windows 768 to 1167 px wide, such as 768x1024 or 900x1000) the
   bob showed a band of the ground above or below the plate (5 px measured); a fixed 3% zoom of the idle layer covers
   it (the shared rule: a plate that bobs overhangs its frame by 7 px; here 7.2 px at the smallest strip, 480 px, and
   3.3 px plus the crop's own 3.5 px on a phone) */
.bow-idle { position: absolute; inset: 0; transform: scale(1.03); }
.bow-stage picture, .bow-stage img { position: absolute; inset: 0; width: 100%; height: 100%; }
.bow-stage picture.dark, .rb-band picture.dark { opacity: 0; }
:root[data-theme="dark"] .bow-stage picture.dark, :root[data-theme="dark"] .rb-band picture.dark { opacity: 1; }
:root[data-theme="dark"] .bow-stage picture.light, :root[data-theme="dark"] .rb-band picture.light { opacity: 0; }
/* the entrance (fix stage 1's home rule): only the plate waits for its picture to decode (.ready, 1.2 s at most);
   the words rise at parse, 500 ms, 50 ms apart */
.bow-stage { animation: bow-in .45s var(--p-ease-out) both; }
.js .sched-hero:not(.ready) .bow-stage { animation-play-state: paused; }
@keyframes bow-in { from { opacity: 0; } to { opacity: 1; } }
.sched-h1 .line { display: inline-block; animation: af-rise .5s var(--p-ease-out) both; animation-delay: .06s; }
.sched-h1 .line + .line { animation-delay: .11s; }
.sched-hero .lede { animation: af-rise .5s var(--p-ease-out) .16s both; }

/* the words stand in the sky, above the horizon; they never move. At dusk a feathered wash of the sky's own ink lies
   under them where the horizon glow rises (an element under the text, so the readability probe measures it) */
.copy-wash { display: none; position: absolute; z-index: 1; pointer-events: none; left: calc(var(--edge) - 160px); top: var(--header-h); width: min(1100px, 80vw); height: min(420px, 64%); }
:root[data-theme="dark"] .copy-wash { display: block; background: radial-gradient(closest-side, rgba(7, 10, 24, .36), rgba(7, 10, 24, .16) 62%, rgba(7, 10, 24, 0)); }
.sched-hero .hero-copy { position: absolute; z-index: 2; inset: calc(var(--header-h) + clamp(28px, 5svh, 52px)) 0 auto 0; color: var(--c-hero-text); }
.crumbs ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-s); font-weight: var(--fw-ui); }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; opacity: .7; }
.crumbs a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sched-h1 { font-size: min(70px, 4.8vw); line-height: 1; letter-spacing: -.036em; font-weight: 600; color: var(--c-hero-text); text-wrap: balance; }
.sched-h1 .line { white-space: nowrap; }
.sched-h1 .line.light { font-weight: 350; letter-spacing: -.03em; }
.sched-hero .lede { margin-top: 18px; max-width: 41em; text-wrap: pretty; font-size: var(--fs-l); line-height: 1.5; color: var(--c-hero-text); font-weight: 450; }
/* the lede on the sunset: where its lines meet the bright horizon they wear the site's highlight (site.css), strips
   that hug each line.
   - At dusk: from 768 to 1299 px wide and on a phone held sideways (844x390 3.04:1, 1024x768 3.53, 1100x700 3.81,
     1200x700 4.49 and 4.26 at the top of the plate's bob; from 1290 px every height passes).
   - By day: only from 768 to 959 px. Up to 899 px the lede takes three lines and the third meets the horizon
     (768x600 2.95); from 900 to about 943 px its second line still dips into the sea's top edge at the top of the
     plate's bob (900x690 2.5% of glyph pixels under 4.5:1). From 960 px the day sky gives 9 or more without it.
   From 768 to 899 px the three lines are balanced, so "or less." never stands alone */
@media (min-width: 768px) and (max-width: 899px) {
  .sched-hero .lede { text-wrap: balance; }
}
@media (min-width: 768px) and (max-width: 959px) {
  .sched-hero .lede { margin-inline-start: -12px; line-height: var(--lede-strip-lh, 30px); }
  .sched-hero .lede .hl { padding: 3px 12px 4px; border-radius: var(--hl-radius); background: var(--hl-ground); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
}
@media (min-width: 960px) and (max-width: 1299px), (min-width: 768px) and (max-height: 500px) and (min-aspect-ratio: 1/1) {
  :root[data-theme="dark"] .sched-hero .lede { margin-inline-start: -12px; line-height: var(--lede-strip-lh, 30px); }
  :root[data-theme="dark"] .sched-hero .lede .hl { padding: 3px 12px 4px; border-radius: var(--hl-radius); background: var(--hl-ground); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
}

/* ---------- 2. the search panel stands on the picture ---------- */
.search-wrap { position: relative; z-index: 3; margin-top: -132px; }
/* no overflow: hidden here: the port lists open below the fields (the foot rounds its own corners) */
.search { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--p-radius-3); box-shadow: var(--shadow-pop); padding: 22px 24px 0; }
.fields { display: grid; grid-template-columns: minmax(0, 1.25fr) 44px minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .9fr) auto; gap: 0 12px; align-items: start; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 7px; font: var(--fw-strong) var(--fs-s)/1.2 var(--f-text); color: var(--c-text); }
.field input, .field select { width: 100%; height: var(--btn-h); padding: 0 14px; border-radius: var(--p-radius-2); border: 1.5px solid var(--field-line); background: var(--field-bg); color: var(--c-text); font: var(--fw-ui) var(--fs-b)/1 var(--f-text); }
.field select { appearance: none; padding-inline-end: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-color: var(--c-text); }
/* an invalid field keeps one colour: the error red is both its border and, when focused, its ring (fix stage 2:
   the red border sat inside the green ring) */
.field input[aria-invalid="true"], .field input[aria-invalid="true"]:focus-visible { border-color: var(--c-error); }
.field input[aria-invalid="true"]:focus-visible { outline-color: var(--c-error); }
/* at dusk --c-error is the token's own dusk red (--p-error-300, 6.5:1 on --c-surface; final stage: it replaced this
   page's colour-mix stand-in) */
.field input::placeholder { color: var(--c-text-muted); }

/* the port combobox (schedules-core.js combo()): a small listbox under the field, name, code and country */
.combo-box { position: relative; }
.combo-list { position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline: 0; min-width: 260px; max-height: min(320px, 46svh); overflow: auto; margin: 0; padding: 6px; list-style: none; background: var(--c-surface); border: 1px solid var(--c-line-strong); border-radius: var(--p-radius-2); box-shadow: var(--shadow-pop); overscroll-behavior: contain; }
.combo-list [role="option"] { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.combo-list .o-name { font: var(--fw-ui) var(--fs-m)/1.25 var(--f-text); color: var(--c-text); }
.combo-list .o-code { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: var(--fs-xs); font-weight: var(--fw-ui); letter-spacing: .04em; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.combo-list .o-country { font-size: var(--fs-xs); color: var(--c-text-muted); }
.combo-list [role="option"].is-active { background: var(--c-accent-wash); box-shadow: inset 0 0 0 1.5px var(--c-accent-text); }
.combo-list [role="option"].is-active .o-name { color: var(--c-text); }
@media (hover: hover) and (pointer: fine) { .combo-list [role="option"]:hover { background: var(--c-line); } }

/* the date: "1 Dec 2026" over the native input (fix stage 2), our own calendar icon in the text colour; the
   browser's picker opens from the whole field. With script only (the label is kept in step by script). */
.date-box { position: relative; }
.date-box input { position: relative; padding-inline-end: 44px; }
.date-box input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.date-show { display: none; position: absolute; inset-inline-start: 15.5px; top: 50%; transform: translateY(-50%); pointer-events: none; font: var(--fw-ui) var(--fs-b)/1 var(--f-text); color: var(--c-text); white-space: nowrap; }
.js .date-show { display: block; }
.js .date-box input { color: transparent; }
.js .date-box input::-webkit-datetime-edit { opacity: 0; }
.date-box .cal { position: absolute; inset-inline-end: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--c-text); pointer-events: none; }
.swap-btn { margin-top: 30px; width: 44px; height: 48px; border-radius: var(--p-radius-2); border: 1px solid var(--c-line-strong); background: transparent; color: var(--c-text); display: grid; place-items: center; cursor: pointer; }
.swap-btn svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .swap-btn:hover { background: var(--c-line); } }
.search .go { margin-top: 26px; }
/* a field's message: why the port did not match (never a guess); text in the text colour, the red is the rule */
.field-msg { margin-top: 8px; padding-inline-start: 10px; border-inline-start: 3px solid var(--c-error); font-size: var(--fs-s); line-height: 1.45; color: var(--c-text); }
.field-msg .pick { margin: 6px 6px 0 0; min-height: 36px; padding: 0 12px; border-radius: var(--p-radius-pill); border: 1px solid var(--c-line-strong); background: var(--c-bg-alt); color: var(--c-text); font: var(--fw-ui) var(--fs-s)/1 var(--f-text); cursor: pointer; }
.search-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin: 22px -24px 0; padding: 14px 24px; border-top: 1px solid var(--c-line); background: var(--c-bg); border-radius: 0 0 calc(var(--p-radius-3) - 1px) calc(var(--p-radius-3) - 1px); }
.search-foot p { font-size: var(--fs-m); color: var(--c-text); }
.search-foot .note { color: var(--c-text-muted); font-size: var(--fs-s); }

/* ---------- 3. popular lanes, and the lane chip (results reuse it for the port choices) ---------- */
.popular { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 24px; }
.popular .lbl { flex: none; font: var(--fw-strong) var(--fs-s)/1.2 var(--f-text); letter-spacing: 0; color: var(--c-text-muted); }
.popular ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.lane-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 15px; border-radius: var(--p-radius-pill); border: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-text); text-decoration: none; font: var(--fw-ui) var(--fs-m)/1.2 var(--f-text); white-space: nowrap; transition: border-color .2s var(--p-ease-ui), background-color .2s var(--p-ease-ui); }
.popular li { flex: none; }
.lane-chip svg { flex: none; width: 14px; height: 14px; color: var(--c-accent-text); }
@media (hover: hover) and (pointer: fine) { .lane-chip:hover { border-color: var(--c-accent-text); } }

/* ---------- 4. the next sailings (a preview of the results list) ---------- */
.next { padding-top: var(--p-space-13); }
.next-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 32px; }
.next-head h2 { max-width: 20ch; }
.next-head h2 .nw { white-space: nowrap; }
.next-head .lede { margin-top: 16px; }
.next-head .sample-note { max-width: 32ch; text-align: end; }
.next .more { margin-top: 18px; }

/* ---------- the sailing row (both pages): A's row. Fix stage 2: no port names on a one-lane list; the track
   carries the days above it, and below it the transhipment as a node with its port, or a quiet "Direct" tag ---------- */
.sailings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sailings.swap { animation: list-swap .15s linear; }
@keyframes list-swap { from { opacity: .35; } to { opacity: 1; } }
.sailing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) auto; gap: 28px; align-items: center; min-height: 104px; padding: 20px 24px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--p-radius-3); transition: border-color .2s var(--p-ease-ui); }
.sailing .carrier b { display: block; font-size: var(--fs-b); font-weight: var(--fw-strong); }
.sailing .carrier > span { display: block; color: var(--c-text-muted); font-size: var(--fs-s); margin-top: 2px; }
.sailing .carrier .code, .ex-carrier .code { font-size: var(--fs-xs); color: var(--c-text-muted); }
.leg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; }
/* the ends keep one width per list, so every row's track starts and ends at the same place */
.leg .end { font: var(--fw-strong) var(--fs-xl)/1.2 var(--f-display); min-width: 3.2em; }
.leg .end.to { min-width: 5.4em; text-align: end; }
.leg .end b { display: block; font: inherit; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.leg .track { position: relative; height: 58px; }
.leg .track::before { content: ""; position: absolute; top: 50%; inset-inline: 4px; height: 2px; margin-top: -1px; background: var(--c-line-strong); }
.leg .track .dot { position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--c-text-muted); }
.leg .track .dot.a { inset-inline-start: 0; }
.leg .track .dot.b { inset-inline-end: 0; }
.leg .track .days { position: absolute; bottom: calc(50% + 7px); left: 50%; transform: translateX(-50%); font-size: var(--fs-s); font-weight: var(--fw-ui); white-space: nowrap; color: var(--c-text); }
.leg .track .node { position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--c-surface); border: 2.5px solid var(--c-text); }
.leg .track .via-port { position: absolute; top: calc(50% + 10px); left: 50%; transform: translateX(-50%); font-size: var(--fs-xs); font-weight: var(--fw-strong); white-space: nowrap; color: var(--c-text); }
.leg .track .tag { position: absolute; top: calc(50% + 8px); left: 50%; transform: translateX(-50%); padding: 1px 8px; border-radius: var(--p-radius-pill); border: 1px solid var(--c-line); font-size: var(--fs-xs); line-height: 1.5; white-space: nowrap; color: var(--c-text-muted); }
.sailing .act { display: flex; align-items: center; gap: 8px; }
/* the row's one action: the site's WhatsApp outline button with its glyph, at the touch size */
.sailing .btn-rate { height: 44px; }
.sailing:focus-within { border-color: var(--c-accent-text); }
@media (hover: hover) and (pointer: fine) { .sailing:hover { border-color: var(--c-accent-text); } }

/* ---------- 5. the worked example (fix stage 2; it replaces the 01/02/03 steps): the home page's timestamp rail
   beside one sailing, the message it writes and the agent's answer ---------- */
.ex-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 72px; align-items: start; }
.ex-text h2 { max-width: 14ch; }
.rail { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; }
.rail li { display: grid; grid-template-columns: 72px 1fr; column-gap: 16px; padding: 18px 0; border-top: 1px solid var(--c-line); }
.rail li:last-child { border-bottom: 1px solid var(--c-line); }
.rail time { font-size: var(--fs-m); font-weight: var(--fw-strong); font-variant-numeric: tabular-nums; color: var(--c-accent-text); padding-top: 2px; }
.rail h3 { font-size: var(--fs-b); margin-bottom: 4px; font-family: var(--f-text); font-weight: var(--fw-strong); letter-spacing: 0; }
.rail p { color: var(--c-text-muted); font-size: var(--fs-m); line-height: 1.5; }
.ex-demo { margin: 0; display: flex; flex-direction: column; gap: 14px; }
/* the picked row: the same row, smaller, with the green edge of the row the visitor is on */
.ex-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 20px; align-items: center; padding: 14px 18px; background: var(--c-surface); border: 1.5px solid var(--c-accent-text); border-radius: var(--p-radius-3); box-shadow: var(--shadow-soft); }
.ex-carrier b { display: block; font-size: var(--fs-m); font-weight: var(--fw-strong); }
.ex-carrier > span { display: block; color: var(--c-text-muted); font-size: var(--fs-xs); margin-top: 2px; }
.ex-pick .leg .end { font-size: var(--fs-b); }
.ex-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border-radius: var(--btn-radius); border: 1.5px solid var(--btn-secondary-line); color: var(--btn-secondary-text); font: var(--fw-ui) var(--fs-s)/1 var(--f-text); white-space: nowrap; }
.ex-btn .wa-glyph { width: 20px; height: 20px; }
.ex-chat { padding: 18px 18px 20px; border-radius: var(--p-radius-3); background: var(--chat-paper); }
.ex-chat .msg { max-width: 86%; }
.ex-chat .msg.wide { max-width: 96%; }
.ex-demo .sample-note { max-width: 60ch; }

/* ---------- "Get a rate for this sailing": the first message as a bubble before WhatsApp opens ----------
   Fix stage 2: a deeper backdrop (it barely dimmed in dark), a raised surface and a hairline ring in dark so the
   sheet stands off the cards, and on a phone the sheet docks to the bottom edge */
.rate-sheet { border: 0; padding: 0; border-radius: var(--p-radius-3); background: var(--c-surface); color: var(--c-text); width: min(520px, calc(100vw - 32px)); max-height: calc(100svh - 32px); box-shadow: var(--shadow-pop); }
.rate-sheet::backdrop { background: rgba(15, 10, 46, .35); }
:root[data-theme="dark"] .rate-sheet::backdrop { background: rgba(5, 3, 20, .6); }
:root[data-theme="dark"] .rate-sheet { background: color-mix(in srgb, var(--c-surface) 95%, white); box-shadow: var(--shadow-pop), 0 0 0 1px rgba(255, 255, 255, .08); }
.rate-body { position: relative; padding: 30px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.rate-sheet h2 { font-size: var(--fs-2xl); padding-inline-end: 52px; }
.rate-x { position: absolute; top: 18px; inset-inline-end: 18px; }
.rate-what { color: var(--c-text-muted); font-size: var(--fs-s); }
.rate-chat { padding: 14px 16px 16px; border-radius: var(--p-radius-2); background: var(--chat-paper); }
.rate-lbl { margin-bottom: 10px; font-size: var(--fs-xs); font-weight: var(--fw-ui); color: var(--chat-time); }
.rate-chat .msg { max-width: 94%; }
.rate-note { color: var(--c-text-muted); font-size: var(--fs-s); }
.rate-sheet .ctas { margin-top: 4px; }
.rate-sheet[open] { animation: rate-in .22s var(--p-ease-snap); }
@keyframes rate-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rate-up { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- widths ---------- */
@media (max-width: 1240px) {
  .fields { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); row-gap: 16px; }
  .field.date, .field.box { grid-column: span 1; }
  .field.date { grid-column: 1; }
  .field.box { grid-column: 2 / span 2; }
  .search .go { grid-column: 1 / -1; margin-top: 0; justify-content: space-between; }
  .search-wrap { margin-top: -110px; }
}
@media (max-width: 1100px) {
  .sailing { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; }
  .sailing .leg { grid-column: 1 / -1; grid-row: 2; }
  .sailing .act { grid-column: 2; grid-row: 1; }
  .next-head { flex-direction: column; align-items: flex-start; }
  .next-head .sample-note { text-align: start; }
  .ex-grid { grid-template-columns: minmax(0, 1fr); }
  .ex-text h2 { max-width: 22ch; }
}
@media (max-width: 767px) {
  /* the phone: the words first, then a strip of the bow (190 px, fix stage 2: 60 px less, so "Search sailings" ends
     on the first screen at 390x844), the panel standing on its lower edge */
  .sched-hero { --bh: 190px; --drift: 22px; height: auto; padding-top: var(--header-h); display: flex; flex-direction: column; background: var(--c-bg); }
  .sched-hero .hero-copy { position: relative; inset: auto; order: 1; padding-top: 20px; padding-bottom: 20px; color: var(--c-text); }
  .sched-h1, .sched-hero .lede { color: var(--c-text); }
  .sched-h1 { font-size: 40px; line-height: 1.02; }
  .sched-h1 .line { display: block; }
  .sched-hero .lede { font-size: var(--fs-b); margin-top: 12px; }
  .sched-hero .lede .not-phone { display: none; }
  .crumbs ol { margin-bottom: 14px; }
  .bow { position: relative; inset: auto; order: 2; height: var(--bh); }
  :root[data-theme="dark"] .copy-wash { display: none; }
  /* the stage is wider than the strip, so the push has room. The strip sits lower on a phone and has left the screen
     by p = .8, so the whole move plays by p = .75.
     Gap pass S3 (Emil): the stage is now the phone's own crop of the plate (schedules-bridge-phone-*, x .10-.90 and
     y .04-.80 of the plate, 1100x591): the same place on screen as the old 130%-wide full plate (80% of that width,
     11.83% of its own height up = the old 13%), the mast at 50% 45.5% of the crop. The push is 12% (was 10%) and the
     drift 30 px (was 22): the crop still covers the strip at p = 0 and p = 1 (2 px under its foot at rest, 16 px of
     slack above at the end), at 320 and 390. */
  .sched-hero { --drift: 30px; }
  /* final polish (with F3): below about 400 px the crop no longer reached the strip's foot (at 320 it ended 24 px short,
     a band of ground beside the panel that the bob would now move); 2.15 x the strip's height keeps it 3.5 px under
     the foot at any phone width (408 px wide, as at 390 within 1%) */
  .bow-stage { --pp: min(1, calc(var(--p, 0) * 1.34)); top: 0; width: max(104%, calc(var(--bh) * 2.15)); aspect-ratio: 1100 / 591; transform-origin: 50% 45.5%; transform: translate(-50%, calc(-11.83% + var(--pp) * var(--drift))) scale(calc(1 + .12 * var(--pp))); }
  .search-wrap { margin-top: -44px; }
  .search { padding: 16px 16px 0; }
  .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 14px; }
  .field.from, .field.to { grid-column: 1 / -1; }
  .swap-btn { display: none; }
  .field.date { grid-column: 1; }
  .field.box { grid-column: 2; }
  .field select { padding: 0 30px 0 12px; font-size: var(--fs-m); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; }
  .date-show { inset-inline-start: 13.5px; }
  .search-foot { margin: 18px -16px 0; padding: 14px 16px; }
  /* final polish m11: the touch size on a phone (the small button is 40 px); the port picks in a field's message too */
  .search-foot .btn { width: 100%; height: 44px; justify-content: center; }
  .field-msg .pick { min-height: 44px; }
  .popular ul { flex-wrap: nowrap; overflow-x: auto; max-width: calc(100vw - 2 * var(--margin)); padding-bottom: 6px; scrollbar-width: none; }
  .next-head h2 { font-size: var(--fs-h2); }
  .next-head h2 .nw { white-space: normal; }
  .sailing { padding: 16px; }
  .leg .end { font-size: var(--fs-b); }
  .ex-pick { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .ex-pick .leg { grid-column: 1 / -1; grid-row: 2; }
  .ex-chat { padding: 14px 12px 16px; }
  .ex-chat .msg { max-width: 92%; }
  .ex-chat .msg.wide { max-width: 100%; }
  /* the rate sheet docks to the bottom edge: full width, top corners only, clear of the home indicator */
  .rate-sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--p-radius-3) var(--p-radius-3) 0 0; max-height: calc(100svh - 24px); }
  .rate-sheet[open] { animation: rate-up .28s var(--p-ease-out); }
  .rate-body { padding: 24px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .rate-sheet .ctas .btn { justify-content: center; }
}
@media (max-width: 374px) {
  .sched-h1 { font-size: 34px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .field.date, .field.box { grid-column: 1; }
  .sailing .act { grid-column: 1; grid-row: 3; }
  .sailing { grid-template-columns: minmax(0, 1fr); }
  .ex-pick { grid-template-columns: minmax(0, 1fr); }
  .ex-pick .leg { grid-row: auto; }
}
:root.rm .bow-stage, :root.rm .sailings.swap, :root.rm .sched-h1 .line, :root.rm .sched-hero .lede, :root.rm .rate-sheet[open] { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .sched-h1 .line, .sched-hero .lede, .rate-sheet[open], .sailings.swap { animation: none; }
}
