/*
 * Route page, concept C (template-parts/route-v2.php). Loaded only on route v2 pages, after theme.css.
 * Tokens use the --rv- prefix because GeneratePress already defines --accent, --contrast and --base.
 */

body.pjc-route-c {
	--rv-bg: #F5F3EF;
	--rv-surface: #FFFFFF;
	--rv-ink: #0F1E36;
	--rv-muted: #535E73;
	--rv-line: #E4E0D8;
	--rv-line-strong: #C9C3B8;
	--rv-field: #FFFFFF;
	--rv-field-empty: #FAF8F5;
	--rv-field-line: #7F8A9C;
	--rv-hero: #0F1E36;
	--rv-hero-ink: #FFFFFF;
	--rv-hero-muted: #B6C2D6;
	--rv-hero-line: #2B3D5C;
	--rv-hero-chip: rgba(255, 255, 255, .09);
	--rv-gold: #C3A06A;
	--rv-gold-hover: #D1B07D;
	--rv-gold-ink: #141008;
	--rv-gold-text: #7E5F2E;
	--rv-chip: #F1EEE8;
	--rv-chip-hover: #E8E3DA;
	--rv-btn: #0F1E36;
	--rv-btn-hover: #22385C;
	--rv-btn-ink: #FFFFFF;
	--rv-select: #0F1E36;
	--rv-select-ink: #FFFFFF;
	--rv-select-muted: #C4CEDD;
	--rv-focus: #0F1E36;
	--rv-focus-ring: rgba(15, 30, 54, .16);
	--rv-error: #A3262A;
	--rv-error-bg: #FBEDEC;
	--rv-flash: #F4E9D6;
	--rv-shadow: 0 1px 2px rgba(15, 30, 54, .06), 0 8px 24px rgba(15, 30, 54, .06);
	--rv-float-shadow: 0 1px 2px rgba(15, 30, 54, .08), 0 8px 20px rgba(15, 30, 54, .1);
	--rv-panel: #0F1E36;
	--rv-panel-ink: #FFFFFF;
	--rv-panel-muted: #C4CEDD;
	--rv-panel-btn: #FFFFFF;
	--rv-panel-btn-ink: #0F1E36;
	--rv-panel-btn-hover: #E6EBF2;
	background: var(--rv-bg);
}

@media (prefers-color-scheme: dark) {
	body.pjc-route-c {
		--rv-bg: #0A1322;
		--rv-surface: #111E33;
		--rv-ink: #E9EDF3;
		--rv-muted: #9FACC0;
		--rv-line: #24354F;
		--rv-line-strong: #34496A;
		--rv-field: #192B46;
		--rv-field-empty: #15253D;
		--rv-field-line: #6079A0;
		--rv-hero: #0C182B;
		--rv-hero-ink: #F1F4F8;
		--rv-hero-muted: #A3B2C7;
		--rv-hero-line: #26385A;
		--rv-hero-chip: rgba(255, 255, 255, .07);
		--rv-gold: #D4B37E;
		--rv-gold-hover: #E2C695;
		--rv-gold-ink: #14100A;
		--rv-gold-text: #D4B37E;
		--rv-chip: #1A2B45;
		--rv-chip-hover: #223858;
		--rv-btn: #D4B37E;
		--rv-btn-hover: #E2C695;
		--rv-btn-ink: #14100A;
		--rv-select: #D4B37E;
		--rv-select-ink: #14100A;
		--rv-select-muted: #3B2E19;
		--rv-focus: #D4B37E;
		--rv-focus-ring: rgba(212, 179, 126, .22);
		--rv-error: #F2A7A2;
		--rv-error-bg: #3A1D24;
		--rv-flash: rgba(212, 179, 126, .16);
		--rv-shadow: inset 0 0 0 1px #24354F;
		--rv-float-shadow: inset 0 0 0 1px #34496A;
		--rv-panel: #1A2B45;
		--rv-panel-ink: #E9EDF3;
		--rv-panel-muted: #A9B5C7;
		--rv-panel-btn: #223858;
		--rv-panel-btn-ink: #E9EDF3;
		--rv-panel-btn-hover: #2A4268;
	}
}

/* Base */
/* Proportional figures in running text ("4 ft 11 in"); tabular ones only where numbers line up or change in place. */
.rv {
	background: var(--rv-bg);
	color: var(--rv-ink);
	font-size: 16px;
	line-height: 1.55;
	font-variant-numeric: proportional-nums lining-nums;
	-webkit-font-smoothing: antialiased;
}

/* pjc-result-wrap only scopes the save and copy scripts here; drop the home page's phone offset. */
.rv-est.pjc-result-wrap {
	margin-top: 0;
}

.rv :where(h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset) {
	margin: 0;
}

.rv :where(ul, ol) {
	padding: 0;
	list-style: none;
}

.rv :where(fieldset) {
	min-width: 0;
	padding: 0;
	border: 0;
}

.rv a {
	color: inherit;
	text-underline-offset: 3px;
}

.rv :focus-visible {
	outline: 2px solid var(--rv-focus);
	outline-offset: 2px;
}

.rv [hidden] {
	display: none !important;
}

.rv-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.rv-shell {
	width: min(100% - 64px, 1240px);
	margin-inline: auto;
}

.rv-i {
	display: block;
	flex: none;
}

.rv-muted {
	color: var(--rv-muted);
}

.rv-price,
.rv-bd td,
.rv-cmp td,
.rv-ap__price,
.rv-gt td.num,
.rv-class-opt__price,
.rv-alt__nums {
	font-variant-numeric: tabular-nums lining-nums;
}

/* Buttons: 44 px, radius 12; small 40 px, radius 10; icon 40 x 40.
   Variants only set --rv-btn-*: GeneratePress paints button:hover and :focus white on grey at (0,1,1),
   so the shared :hover and :focus rules below restate every button's own colours. */
.rv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	background: var(--rv-btn-bg, transparent);
	color: var(--rv-btn-fg, var(--rv-ink));
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.rv-btn--sm {
	min-height: 40px;
	padding: 0 14px;
	border-radius: 10px;
	font-size: 15px;
}

.rv-btn--primary {
	--rv-btn-bg: var(--rv-btn);
	--rv-btn-bg-hover: var(--rv-btn-hover);
	--rv-btn-fg: var(--rv-btn-ink);
}

.rv-btn--quiet {
	--rv-btn-bg: var(--rv-chip);
	--rv-btn-bg-hover: var(--rv-chip-hover);
}

.rv-btn--line {
	--rv-btn-bg-hover: var(--rv-chip);
	box-shadow: inset 0 0 0 1px var(--rv-line-strong);
}

.rv-btn--gold {
	--rv-btn-bg: var(--rv-gold);
	--rv-btn-bg-hover: var(--rv-gold-hover);
	--rv-btn-fg: var(--rv-gold-ink);
}

.rv-btn--panel {
	--rv-btn-bg: var(--rv-panel-btn);
	--rv-btn-bg-hover: var(--rv-panel-btn-hover);
	--rv-btn-fg: var(--rv-panel-btn-ink);
}

.rv-icon-btn {
	--rv-btn-bg: var(--rv-surface);
	--rv-btn-bg-hover: var(--rv-chip);
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--rv-field-line);
	border-radius: 10px;
	background: var(--rv-btn-bg);
	color: var(--rv-ink);
	cursor: pointer;
}

.rv-btn:focus,
.rv-icon-btn:focus {
	background: var(--rv-btn-bg, transparent);
	color: var(--rv-btn-fg, var(--rv-ink));
}

.rv-btn:hover,
.rv-icon-btn:hover {
	background: var(--rv-btn-bg-hover, var(--rv-btn-bg, transparent));
	color: var(--rv-btn-fg, var(--rv-ink));
}

.rv-icon-btn:hover {
	border-color: var(--rv-ink);
}

.rv-btn[aria-disabled="true"] {
	opacity: .45;
	cursor: not-allowed;
}

.rv-btn[aria-expanded="true"] .rv-i {
	transform: rotate(180deg);
}

.rv-icon-btn:disabled {
	opacity: .4;
	cursor: not-allowed;
}

.rv-icon-btn:disabled:hover {
	border-color: var(--rv-field-line);
	background: var(--rv-btn-bg);
}

.rv-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-weight: 700;
}

/* Hero */
.rv-hero {
	padding: 24px 0 128px;
	background: var(--rv-hero);
	color: var(--rv-hero-ink);
	--rv-focus: var(--rv-gold);
}

.rv-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 8px;
	color: var(--rv-hero-muted);
	font-size: 14px;
}

.rv-crumbs a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--rv-hero-muted);
}

.rv-crumbs a:hover {
	color: var(--rv-hero-ink);
}

.rv-h1 {
	margin-top: 6px;
	color: var(--rv-hero-ink);
	font-size: 44px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.022em;
}

.rv-lede {
	max-width: 60ch;
	margin-top: 10px;
	color: var(--rv-hero-muted);
	font-size: 18px;
	line-height: 1.5;
}

/* The price in the answer: bolder than the sentence, well below the estimate's own price. */
.rv-lede strong {
	color: var(--rv-hero-ink);
	font-weight: 650;
}

/* The answer repeats the estimate, so it greys out with it while a field needs fixing. */
.rv-lede.is-stale {
	opacity: .55;
	text-decoration: line-through;
}

/* Top block: one module with Your trip (the route as a ticket) beside the estimate, the route map below */
.rv-mod {
	position: relative;
	margin-top: -96px;
	border-radius: 20px;
	background: var(--rv-surface);
}

/* The shadow (an inset line in dark mode) sits on a layer above the map, so the map cannot hide it. */
.rv-mod::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: inherit;
	box-shadow: var(--rv-shadow);
	pointer-events: none;
}

.rv-mod__top {
	display: grid;
	grid-template-columns: 440px minmax(0, 1fr);
}

/* Your trip */
.rv-trip {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-content: start;
	gap: 12px;
	min-width: 0;
	padding: 24px 24px 28px;
}

.rv-trip > *,
.rv-trip__more > * {
	grid-column: 1 / -1;
	min-width: 0;
}

.rv-trip__title {
	grid-row: 1;
	grid-column: 1;
	align-self: center;
	font-size: 17px;
	font-weight: 750;
	line-height: 1.3;
}

.rv-trip__title:focus {
	outline: none;
}

.rv-trip__title:focus-visible {
	outline: 2px solid var(--rv-focus);
}

.rv-trip__more {
	display: contents;
}

.rv-trip__more > .rv-seg {
	grid-row: 1;
	grid-column: 2;
	width: 214px;
}

.rv-edit {
	display: none;
}

.rv-seg {
	display: flex;
	gap: 4px;
	padding: 4px;
	border-radius: 12px;
	background: var(--rv-chip);
}

.rv-seg label {
	position: relative;
	flex: 1;
}

.rv-seg input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.rv-seg span {
	display: grid;
	place-items: center;
	min-height: 36px;
	border-radius: 9px;
	color: var(--rv-muted);
	font-size: 15px;
	font-weight: 650;
}

.rv-seg label:hover span {
	color: var(--rv-ink);
}

.rv-seg input:checked + span {
	background: var(--rv-select);
	color: var(--rv-select-ink);
}

.rv-seg input:focus-visible + span {
	outline: 2px solid var(--rv-focus);
	outline-offset: 2px;
}

/* The ticket: big codes joined by a line, the city under each code, then the airport name.
   Each end is one button that opens the airport search over the ticket. */
.rv-tk {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
	margin: 0 -12px;
}

.rv-tk__side {
	min-width: 0;
}

.rv-tk__end,
.rv-tk__end:focus {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	height: 100%;
	min-width: 0;
	padding: 10px 0 12px 12px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--rv-ink);
	font: inherit;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
}

.rv-tk__side--to .rv-tk__end {
	align-items: flex-end;
	padding: 10px 12px 12px 0;
	text-align: right;
}

.rv-tk__end:hover,
.rv-tk__end[aria-expanded="true"] {
	background: var(--rv-chip);
	color: var(--rv-ink);
}

.rv-tk__end:focus-visible {
	outline: 2px solid var(--rv-focus);
	outline-offset: 0;
}

.rv-tk__lab {
	color: var(--rv-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 18px;
}

.rv-tk__code {
	display: flex;
	align-self: stretch;
	align-items: center;
	margin-top: 2px;
	font-size: 44px;
	font-weight: 800;
	line-height: 52px;
	letter-spacing: -.01em;
}

.rv-tk__side--from .rv-tk__code::after,
.rv-tk__side--to .rv-tk__code::before {
	content: "";
	flex: 1;
	min-width: 12px;
	border-top: 1.5px solid var(--rv-line-strong);
}

.rv-tk__side--from .rv-tk__code::after {
	margin-left: 12px;
}

.rv-tk__side--to .rv-tk__code::before {
	margin-right: 12px;
}

.rv-tk__city {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	max-width: 100%;
	margin-top: 2px;
	font-size: 16px;
	font-weight: 700;
}

.rv-tk__city .rv-i {
	color: var(--rv-muted);
	transition: transform .15s ease;
}

.rv-tk__end[aria-expanded="true"] .rv-tk__city .rv-i {
	transform: rotate(180deg);
}

.rv-tk__name {
	margin-top: 1px;
	color: var(--rv-muted);
	font-size: 14px;
	line-height: 1.4;
}

.rv-tk__mid {
	position: relative;
	display: flex;
	justify-content: center;
	padding-top: 36px;
}

.rv-tk__mid::before {
	content: "";
	position: absolute;
	top: 56px;
	left: 0;
	right: 0;
	border-top: 1.5px solid var(--rv-line-strong);
}

.rv-swap {
	position: relative;
}

.rv-tk__side.is-error .rv-tk__end {
	background: var(--rv-error-bg);
	box-shadow: inset 0 0 0 1px var(--rv-error);
}

.rv-tk__side.is-error :is(.rv-tk__lab, .rv-tk__name, .rv-tk__city .rv-i) {
	color: var(--rv-error);
}

/* The airport search covers the whole ticket, so opening it moves nothing below. */
.rv-tk__search {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: grid;
	align-content: start;
	gap: 8px;
	padding: 4px 12px 0;
	background: var(--rv-surface);
}

.rv-tk__hint {
	color: var(--rv-muted);
	font-size: 14px;
	line-height: 1.4;
}

.rv-cut {
	height: 0;
	margin: 4px -24px;
	border-top: 1.5px dashed var(--rv-line-strong);
}

.rv-field {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1px;
	min-width: 0;
	min-height: 64px;
	padding: 9px 15px;
	border: 1px solid var(--rv-field-line);
	border-radius: 12px;
	background: var(--rv-field);
	cursor: text;
}

.rv-field:hover {
	border-color: var(--rv-ink);
}

.rv-field:focus-within {
	border-color: var(--rv-focus);
	box-shadow: 0 0 0 1px var(--rv-focus), 0 0 0 5px var(--rv-focus-ring);
}

.rv-field label {
	color: var(--rv-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	cursor: inherit;
}

.rv-field input {
	width: 100%;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	outline: none;
	background: transparent;
	box-shadow: none;
	color: var(--rv-ink);
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	text-overflow: ellipsis;
}

.rv-field.is-error,
.rv-tk__side.is-error .rv-field {
	border-color: var(--rv-error);
	background: var(--rv-error-bg);
}

.rv-field.is-error label,
.rv-tk__side.is-error .rv-field label {
	color: var(--rv-error);
}

.rv-err {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: var(--rv-error);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.rv-err::before,
.rv-msg.is-ok::before,
.rv-msg.is-error::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	background: currentColor;
	-webkit-mask: var(--rv-icon-alert) center / contain no-repeat;
	mask: var(--rv-icon-alert) center / contain no-repeat;
}

.rv {
	--rv-icon-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5v5.5M12 16.2v.3'/%3E%3C/svg%3E");
	--rv-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}

.rv-msg.is-ok::before {
	-webkit-mask-image: var(--rv-icon-check);
	mask-image: var(--rv-icon-check);
}

/* Date, time, return and guests. A field without its partner takes the whole row;
   with no date on a one-way trip, guests sit beside the date. */
.rv-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 132px;
	gap: 8px;
}

.rv-cell {
	display: grid;
	align-content: start;
	gap: 6px;
	min-width: 0;
}

.rv-cell--date,
.rv-cell--ret {
	grid-column: 1;
}

.rv-cell--date:has(+ .rv-cell[hidden]),
.rv-cell--ret:has(+ .rv-cell[hidden]) {
	grid-column: 1 / -1;
}

.rv-cell--time,
.rv-cell--rtime {
	grid-column: 2;
}

.rv-cell--pax {
	grid-column: 1 / -1;
}

.rv-fields.is-compact {
	grid-template-columns: minmax(0, 1fr) auto;
}

.rv-fields.is-compact .rv-cell--date {
	grid-column: 1;
}

.rv-fields.is-compact .rv-cell--pax {
	grid-column: 2;
}

.rv-fields.is-compact .rv-guests {
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 5px 8px 5px 14px;
}

.rv-fields.is-compact .rv-stepper .rv-icon-btn {
	width: 36px;
	height: 36px;
}

.rv-date__box {
	display: grid;
}

.rv-date__box > * {
	grid-area: 1 / 1;
}

.rv-date__empty {
	align-self: center;
	overflow: hidden;
	padding-right: 24px; /* clear of the calendar button */
	color: var(--rv-muted);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.35;
	white-space: nowrap;
	text-overflow: ellipsis;
	pointer-events: none;
}

.rv-date.is-empty {
	background: var(--rv-field-empty);
}

.rv-date.is-empty:not(:focus-within) input {
	color: transparent;
}

.rv-date.is-empty:focus-within .rv-date__empty,
.rv-date:not(.is-empty) .rv-date__empty {
	visibility: hidden;
}

.rv-field input::-webkit-calendar-picker-indicator {
	cursor: pointer;
}

.rv-guests {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: default;
}

.rv-guests:hover {
	border-color: var(--rv-field-line);
}

.rv-stepper {
	display: flex;
	align-items: center;
	gap: 6px;
}

.rv-stepper input {
	width: 44px;
	text-align: center;
	font-size: 18px;
	-moz-appearance: textfield;
	appearance: textfield;
}

.rv-stepper input::-webkit-outer-spin-button,
.rv-stepper input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.rv-live {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--rv-muted);
	font-size: 14px;
}

/* Airport suggestions: theme.css positions the list; keep it inside the card's width */
.rv .pjc-airport-options {
	top: calc(100% + 6px);
	width: 100%;
	min-width: 280px;
	border-color: var(--rv-line-strong);
	background: var(--rv-surface);
	box-shadow: 0 14px 34px rgba(15, 30, 54, .18);
	cursor: default;
}

.rv .pjc-airport-options strong {
	font-size: 15px;
}

.rv .pjc-airport-options > span > span {
	font-size: 13px;
}

.rv .pjc-airport-options > span {
	min-height: 44px;
	justify-content: center;
}

/* Map: a wide row under the module, cropped to the band the labels and the legend keep to
   (MAP_SAFE_AREA in engine/route-map.mjs); the legend takes the corner the route leaves free. */
.rv-map {
	position: relative;
	border-top: 1px solid var(--rv-line);
}

.rv-map__frame {
	position: relative;
	aspect-ratio: 5 / 2;
	overflow: hidden;
	border-radius: 0 0 20px 20px;
	background: var(--pjc-map-sea);
}

.rv-map__frame .pjc-route-map {
	--pjc-map-radius: 0;
	--pjc-map-code-size: clamp(20px, 2.2cqi, 28px);
	--pjc-map-city-size: clamp(13px, 1.2cqi, 15px);
	margin-top: -11.25% !important;
}

.rv-legend {
	position: absolute;
	z-index: 1;
	top: 24px;
	right: 24px;
	display: grid;
	gap: 2px;
	padding: 12px 16px;
	border-radius: 14px;
	background: var(--rv-surface);
	box-shadow: var(--rv-float-shadow);
	color: var(--rv-muted);
	font-size: 14px;
	line-height: 1.4;
}

.rv-legend__dist {
	color: var(--rv-ink);
	font-size: 17px;
	font-weight: 750;
}

.rv-map:has([data-legend^="bottom"]) .rv-legend {
	top: auto;
	bottom: 24px;
}

.rv-map:has([data-legend$="left"]) .rv-legend {
	right: auto;
	left: 24px;
}

.rv-mod + .rv-disc {
	margin-top: 24px;
}

/* Estimate */
.rv-est {
	min-width: 0;
	padding: 24px 36px 28px;
	border-left: 1px solid var(--rv-line);
}

.rv-est:focus {
	outline: none;
}

.rv-est__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	color: var(--rv-muted);
	font-size: 14px;
}

.rv-est__label {
	padding: 2px 8px;
	border-radius: 6px;
	background: var(--rv-chip);
	color: var(--rv-ink);
	font-size: 13px;
	font-weight: 700;
}

.rv-est__stale {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--rv-error);
	font-weight: 650;
}

.rv-price {
	margin-top: 10px;
	font-size: 60px;
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -.03em;
}

.rv-price.is-flash {
	animation: rv-flash 1.1s ease-out;
}

@keyframes rv-flash {
	from {
		background: var(--rv-flash);
		box-shadow: 0 0 0 8px var(--rv-flash);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rv-price.is-flash {
		animation: none;
	}
}

.rv-for {
	margin-top: 6px;
	font-size: 17px;
	font-weight: 650;
}

.rv-for__per {
	color: var(--rv-muted);
	font-weight: 500;
}

.rv-est.is-stale :is(.rv-price, .rv-for, .rv-facts, .rv-dateline) {
	opacity: .55;
}

.rv-est.is-stale .rv-price {
	text-decoration: line-through;
	text-decoration-thickness: 3px;
}

/* Flight time and aircraft class: two columns on wide screens, two rows with icons on phones. */
.rv-facts {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	margin-top: 18px;
	border-top: 1px solid var(--rv-line);
	border-bottom: 1px solid var(--rv-line);
}

.rv-fact {
	display: grid;
	align-content: start;
	min-width: 0;
	padding: 14px 28px 16px 0;
}

.rv-fact + .rv-fact {
	padding: 14px 0 16px 28px;
	border-left: 1px solid var(--rv-line);
}

.rv-fact dt {
	color: var(--rv-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 18px;
}

.rv-fact dt .rv-i {
	display: none;
}

.rv-fact__val {
	display: grid;
	min-width: 0;
	margin-top: 4px;
}

.rv-fact__main {
	font-size: 20px;
	font-weight: 750;
	line-height: 1.3;
}

.rv-fact__sub {
	margin-top: 2px;
	color: var(--rv-muted);
	font-size: 14px;
	line-height: 1.4;
}

.rv-fact--class {
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 16px;
}

.rv-fact--class dt {
	grid-column: 1 / -1;
}

/* "Super-midsize" and "Ultra-long-range" never break at their hyphens. */
.rv-fact--class [data-out="class-name"] {
	white-space: nowrap;
}

.rv-fact__act {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-self: center;
	gap: 8px;
}

.rv-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: 10px;
	color: var(--rv-gold-text);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.45;
	vertical-align: 2px;
}

.rv-class-list {
	display: grid;
	gap: 2px;
	margin-top: 10px;
	padding: 6px;
	border: 1px solid var(--rv-line);
	border-radius: 14px;
}

.rv-class-opt {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0 12px;
	padding: 10px 12px;
	border-radius: 10px;
	cursor: pointer;
}

.rv-class-opt input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.rv-class-opt:hover {
	background: var(--rv-chip);
}

.rv-class-opt__name {
	font-weight: 700;
}

.rv-class-opt__price {
	font-weight: 700;
	text-align: right;
	white-space: nowrap;
}

.rv-class-opt__note {
	grid-column: 1 / -1;
	color: var(--rv-muted);
	font-size: 14px;
}

.rv-class-opt:has(input:checked) {
	background: var(--rv-select);
	color: var(--rv-select-ink);
}

.rv-class-opt:has(input:checked) .rv-class-opt__note {
	color: var(--rv-select-muted);
}

.rv-class-opt:has(input:focus-visible) {
	outline: 2px solid var(--rv-focus);
	outline-offset: 1px;
}

.rv-class-opt:has(input:disabled) {
	color: var(--rv-muted);
	cursor: default;
}

.rv-class-opt:has(input:disabled):hover {
	background: transparent;
}

.rv-class-opt input:disabled {
	cursor: default;
}

.rv-schedule {
	margin-top: 10px;
	font-size: 15px;
}

.rv-notes {
	display: grid;
	gap: 4px;
	margin-top: 10px;
	color: var(--rv-muted);
	font-size: 14px;
}

.rv-dateline {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 16px;
	color: var(--rv-muted);
	font-size: 15px;
	line-height: 1.45;
}

.rv-dateline .rv-i {
	margin-top: 2px;
}

/* A button that reads as a link inside a sentence; the padding widens the tap area without moving the text. */
.rv-textbtn,
.rv-textbtn:hover,
.rv-textbtn:focus {
	display: inline;
	margin: -10px 0;
	padding: 10px 0;
	border: 0;
	background: none;
	color: var(--rv-ink);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.rv-textbtn:hover {
	text-decoration-thickness: 2px;
}

.rv-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.rv-msg {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 14px;
	color: var(--rv-muted);
	font-size: 15px;
	line-height: 1.45;
}

.rv-msg:empty {
	display: none;
}

.rv-msg.is-error {
	color: var(--rv-error);
	font-weight: 600;
}

.rv-msg a {
	font-weight: 700;
}

.rv-copybox.pjc-share-fallback {
	display: none;
}

.rv-copybox.is-visible {
	position: static;
	display: flex;
	width: auto;
	height: auto;
	margin-top: 10px;
	overflow: visible;
	clip: auto;
	clip-path: none;
}

.rv-copybox input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--rv-focus);
	border-radius: 10px;
	background: var(--rv-surface);
	color: var(--rv-ink);
	font: inherit;
	font-size: 16px;
}

.rv-elsewhere {
	margin-top: 14px;
	padding: 14px 16px;
	border-radius: 12px;
	background: var(--rv-chip);
	font-size: 15px;
}

.rv-noscript {
	margin-top: 14px;
	color: var(--rv-muted);
	font-size: 14px;
}

/* Flight details, price breakdown and airports */
.rv-disc {
	border-radius: 16px;
	background: var(--rv-surface);
	box-shadow: var(--rv-shadow);
}

.rv-disc details + details {
	border-top: 1px solid var(--rv-line);
}

.rv-disc summary {
	display: grid;
	grid-template-columns: 172px minmax(0, 1fr) auto;
	align-items: center;
	gap: 2px 16px;
	min-height: 60px;
	padding: 14px 20px;
	list-style: none;
	cursor: pointer;
}

.rv-disc summary::-webkit-details-marker {
	display: none;
}

.rv-disc summary:hover .rv-disc__title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rv-disc__title {
	font-size: 17px;
	font-weight: 700;
}

.rv-disc__peek {
	color: var(--rv-muted);
	font-size: 15px;
}

.rv details[open] > summary > .rv-i:last-child {
	transform: rotate(180deg);
}

.rv-disc__body {
	padding: 4px 20px 24px;
}

.rv-kv {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 32px;
}

.rv-kv dt {
	color: var(--rv-muted);
	font-size: 13px;
	font-weight: 600;
}

.rv-kv dd {
	margin-top: 2px;
	font-size: 16px;
	font-weight: 650;
}

.rv .sub {
	display: block;
	color: var(--rv-muted);
	font-size: 14px;
	font-weight: 400;
}

.rv-note {
	margin-top: 16px;
	color: var(--rv-muted);
	font-size: 14px;
	line-height: 1.5;
}

.rv-note a,
.rv-small a {
	color: var(--rv-ink);
	font-weight: 650;
}

.rv-note strong {
	color: var(--rv-ink);
	font-weight: 650;
}

.rv-bd {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 15px;
}

.rv-bd th,
.rv-bd td {
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid var(--rv-line);
	text-align: left;
	vertical-align: top;
	font-weight: 600;
}

.rv-bd td {
	padding-left: 16px;
	text-align: right;
	white-space: nowrap;
	font-weight: 700;
}

.rv-bd tfoot th,
.rv-bd tfoot td {
	padding-top: 14px;
	border-bottom: 0;
	font-size: 17px;
	font-weight: 800;
}

.rv-ap {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 32px;
}

.rv-ap h3 {
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 700;
}

.rv-ap button {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 2px 10px;
	width: 100%;
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid var(--rv-line);
	border-radius: 0;
	background: transparent;
	color: var(--rv-ink);
	font: inherit;
	font-size: 15px;
	text-align: left;
	cursor: pointer;
}

.rv-ap button:hover .rv-ap__name {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rv-ap b {
	font-weight: 800;
}

.rv-ap__price {
	font-weight: 700;
	white-space: nowrap;
}

.rv-ap__sub {
	grid-column: 2 / 4;
	color: var(--rv-muted);
	font-size: 13px;
}

.rv-ap button[aria-pressed="true"] .rv-ap__sub {
	color: var(--rv-gold-text);
	font-weight: 700;
}

/* Sections below the top block */
.rv-sec {
	margin-top: 96px;
}

.rv-h2 {
	font-size: 32px;
	font-weight: 780;
	line-height: 1.2;
	letter-spacing: -.018em;
}

.rv-lead {
	max-width: 62ch;
	margin-top: 12px;
	color: var(--rv-muted);
	font-size: 18px;
	line-height: 1.55;
}

.rv-split {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	gap: 20px 48px;
	align-items: start;
}

.rv-alts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.rv-alt {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 24px;
	border: 1px solid transparent;
	border-radius: 16px;
	background: var(--rv-surface);
	box-shadow: var(--rv-shadow);
}

.rv-alt.is-chosen {
	border-color: var(--rv-select);
	box-shadow: inset 0 0 0 1px var(--rv-select);
}

.rv-alt__name {
	font-size: 20px;
	font-weight: 750;
	line-height: 1.25;
}

.rv-alt__ex {
	color: var(--rv-muted);
	font-size: 14px;
}

.rv-alt__nums {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 14px;
	margin-top: 14px;
}

.rv-alt__nums strong {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.01em;
}

.rv-alt__nums span {
	color: var(--rv-muted);
	font-size: 15px;
}

.rv-alt__why {
	margin-top: 12px;
	font-size: 15px;
	line-height: 1.5;
}

.rv-alt__go {
	margin-top: auto;
	padding-top: 18px;
}

.rv-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	color: var(--rv-ink);
	font-size: 15px;
	font-weight: 700;
}

.rv-compare {
	margin-top: 40px;
	border-radius: 16px;
	background: var(--rv-surface);
	box-shadow: var(--rv-shadow);
}

.rv-compare > summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 16px;
	min-height: 64px;
	padding: 16px 24px;
	list-style: none;
	cursor: pointer;
}

.rv-compare > summary::-webkit-details-marker {
	display: none;
}

.rv-compare > summary .rv-i {
	margin-left: auto;
}

.rv-compare > summary:hover .rv-compare__title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.rv-compare__title {
	font-size: 18px;
	font-weight: 750;
}

.rv-compare__peek {
	color: var(--rv-muted);
	font-size: 15px;
}

.rv-cmp {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 15px;
}

.rv-cmp th,
.rv-cmp td {
	padding: 14px 12px;
	border: 0;
	border-top: 1px solid var(--rv-line);
	text-align: left;
	vertical-align: middle;
}

.rv-cmp tr > :first-child {
	padding-left: 24px;
}

.rv-cmp tr > :last-child {
	padding-right: 24px;
}

.rv-cmp thead th {
	padding-top: 12px;
	padding-bottom: 12px;
	color: var(--rv-muted);
	font-size: 13px;
	font-weight: 600;
}

.rv-cmp tbody th {
	font-weight: 400;
}

.rv-cmp__name {
	display: block;
	font-size: 16px;
	font-weight: 750;
}

.rv-cmp__ex {
	color: var(--rv-muted);
	font-size: 14px;
}

a.rv-cmp__ex {
	color: var(--rv-ink);
	text-decoration-color: var(--rv-line-strong);
}

.rv-cmp td strong {
	font-size: 16px;
}

.rv-cmp .sub {
	font-size: 13px;
}

.rv-cmp tr.is-selected > * {
	background: var(--rv-chip);
}

.rv-cmp tr.is-off > * {
	color: var(--rv-muted);
}

.rv-cmp .rv-off {
	color: var(--rv-ink);
	font-weight: 700;
}

.rv-cmp__act {
	width: 1%;
	text-align: right;
	white-space: nowrap;
}

.rv-cmp__sel {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	font-weight: 700;
}

.rv-cmp__foot {
	padding: 14px 24px 20px;
	border-top: 1px solid var(--rv-line);
	color: var(--rv-muted);
	font-size: 14px;
}

/* Cabin */
.rv-cabin {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 24px 48px;
	align-items: start;
	margin-top: 40px;
	padding: 28px;
	border-radius: 16px;
	background: var(--rv-surface);
	box-shadow: var(--rv-shadow);
}

.rv-cabin h3 {
	font-size: 20px;
	font-weight: 750;
}

.rv-cabin__text > p {
	margin-top: 8px;
	color: var(--rv-muted);
	font-size: 15px;
	line-height: 1.6;
}

.rv-cabin__models {
	margin-top: 18px;
}

.rv-cabin__models-title {
	font-size: 14px;
	font-weight: 700;
}

.rv-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.rv-chips a,
.rv-chips span {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 14px;
	border-radius: 999px;
	background: var(--rv-chip);
	color: var(--rv-ink);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.rv-chips a:hover {
	background: var(--rv-chip-hover);
}

.rv-cabin__model-name strong {
	display: block;
	font-size: 18px;
	font-weight: 750;
}

.rv-cabin__model-name span {
	display: block;
	color: var(--rv-muted);
	font-size: 14px;
}

.rv-cabin__facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-top: 14px;
}

.rv-cabin__facts div {
	padding: 16px;
	border-radius: 12px;
	background: var(--rv-chip);
}

.rv-cabin__facts dt {
	color: var(--rv-muted);
	font-size: 13px;
	font-weight: 600;
}

.rv-cabin__facts dd {
	margin-top: 2px;
	font-size: 20px;
	font-weight: 800;
	white-space: nowrap;
}

.rv-cabin__facts dd.sub {
	color: var(--rv-muted);
	font-size: 13px;
	font-weight: 600;
	white-space: normal;
}

/* Guide */
.rv-guide {
	margin-top: 56px;
	padding-top: 56px;
	border-top: 1px solid var(--rv-line);
}

.rv-guides > .rv-guide:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.rv-guide h2 {
	font-size: 28px;
	font-weight: 780;
	line-height: 1.25;
	letter-spacing: -.015em;
}

/* The photo shows an unidentified large jet: it sits after the departure tips, away from the cabin facts. */
.rv-photo {
	max-width: 560px;
}

.rv-photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px;
}

.rv-photo figcaption {
	margin-top: 8px;
	color: var(--rv-muted);
	font-size: 13px;
	line-height: 1.45;
}

.rv-guide__body {
	max-width: 68ch;
}

.rv-guide__body > * + * {
	margin-top: 20px;
}

.rv-answer {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.55;
}

.rv-guide__body > p:not(.rv-answer, .rv-small),
.rv-guide__body > ol li,
.rv-guide__body > ul li {
	font-size: 18px;
	line-height: 1.65;
}

.rv-small {
	color: var(--rv-muted);
	font-size: 15px;
	line-height: 1.55;
}

.rv-tablewrap {
	overflow: hidden;
	border: 1px solid var(--rv-line);
	border-radius: 14px;
	background: var(--rv-surface);
}

.rv-gt {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.45;
}

.rv-gt th,
.rv-gt td {
	padding: 12px 16px;
	border: 0;
	border-top: 1px solid var(--rv-line);
	text-align: left;
	vertical-align: top;
}

.rv-gt thead th {
	border-top: 0;
	background: var(--rv-chip);
	color: var(--rv-muted);
	font-size: 13px;
	font-weight: 600;
}

.rv-gt tbody th {
	font-weight: 750;
	white-space: nowrap;
}

.rv-gt tbody th span {
	display: block;
	color: var(--rv-muted);
	font-size: 13px;
	font-weight: 500;
	white-space: normal;
}

.rv-gt td.num {
	font-weight: 700;
	white-space: nowrap;
}

.rv-steps {
	display: grid;
	gap: 16px;
	counter-reset: rv-step;
}

.rv-steps li {
	position: relative;
	padding-left: 44px;
}

.rv-steps li::before {
	content: counter(rv-step);
	counter-increment: rv-step;
	position: absolute;
	top: 2px;
	left: 0;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--rv-chip);
	font-size: 15px;
	font-weight: 800;
}

/* Home: the guide index and My trips below the calculator (route-v2.php in home mode). */
.rv-group h3 {
	font-size: 17px;
	font-weight: 750;
	line-height: 1.35;
}

.rv-trips .pjc-trip-list li {
	border-top-color: var(--rv-line);
	color: var(--rv-muted);
	font-size: 15px;
}

.rv-trips .pjc-trip-list a {
	color: var(--rv-ink);
	font-size: 16px;
}

.rv-trips .pjc-trip-list span {
	color: var(--rv-muted);
	font-size: 14px;
}

.rv-more {
	border-top: 1px solid var(--rv-line);
	border-bottom: 1px solid var(--rv-line);
}

.rv-more summary,
.rv-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 56px;
	padding: 12px 0;
	font-size: 16px;
	font-weight: 700;
	list-style: none;
	cursor: pointer;
}

.rv-more summary::-webkit-details-marker,
.rv-faq summary::-webkit-details-marker {
	display: none;
}

.rv-more p {
	padding-bottom: 16px;
	font-size: 16px;
	line-height: 1.6;
}

.rv-more p + p {
	margin-top: 0;
}

.rv-dates li {
	display: grid;
	grid-template-columns: 210px minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 2px 20px;
	padding: 14px 0;
	border-top: 1px solid var(--rv-line);
	font-size: 16px;
}

.rv-dates li:last-child {
	border-bottom: 1px solid var(--rv-line);
}

.rv-dates b {
	text-wrap: balance;
}

.rv-dates__effect {
	color: var(--rv-gold-text);
	font-size: 14px;
	font-weight: 650;
	white-space: nowrap;
}

.rv-dates__effect.is-quiet {
	max-width: 30ch;
	color: var(--rv-muted);
	white-space: normal;
}

.rv-factors {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px 32px;
}

.rv-factors dt {
	font-size: 17px;
	font-weight: 750;
}

.rv-factors dd {
	margin-top: 4px;
	color: var(--rv-muted);
	font-size: 16px;
	line-height: 1.6;
}

.rv-faq details {
	border-top: 1px solid var(--rv-line);
}

.rv-faq details:last-child {
	border-bottom: 1px solid var(--rv-line);
}

.rv-faq summary {
	min-height: 60px;
	padding: 14px 0;
	font-size: 18px;
}

.rv-faq p {
	padding-bottom: 20px;
	color: var(--rv-muted);
	font-size: 17px;
	line-height: 1.65;
}

.rv-routes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin-top: 24px;
}

.rv-routes a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 20px 22px;
	border: 1px solid transparent;
	border-radius: 16px;
	background: var(--rv-surface);
	box-shadow: var(--rv-shadow);
	text-decoration: none;
}

.rv-routes a:hover {
	border-color: var(--rv-line-strong);
}

.rv-routes strong {
	font-size: 18px;
}

.rv-routes span {
	color: var(--rv-muted);
	font-size: 14px;
}

.rv-routes em {
	margin-top: 6px;
	font-style: normal;
	font-weight: 700;
}

.rv-cta {
	margin-top: 96px;
	padding: 56px 0;
	background: var(--rv-hero);
	color: var(--rv-hero-ink);
	--rv-ink: var(--rv-hero-ink);
	--rv-muted: var(--rv-hero-muted);
	--rv-line-strong: var(--rv-hero-line);
	--rv-chip: var(--rv-hero-chip);
	--rv-surface: var(--rv-hero);
	--rv-focus: var(--rv-gold);
	--rv-error: #F2A7A2;
}

.rv-cta__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.rv-cta h2 {
	font-size: 30px;
	font-weight: 780;
	letter-spacing: -.015em;
}

.rv-cta p {
	margin-top: 8px;
	color: var(--rv-hero-muted);
}

.rv-cta .rv-actions {
	margin-top: 0;
}

/* Route map: draw the arc, then show the plane and the destination */
@media (prefers-reduced-motion: no-preference) {
	.pjc-route-map__arc {
		stroke-dasharray: 1;
		animation: pjc-arc-draw 1.1s cubic-bezier(.3, .7, .3, 1) both;
	}

	.pjc-route-map__arc-glow,
	.pjc-route-map__plane,
	.pjc-route-map__marker--destination {
		animation: pjc-fade-in .5s ease-out .7s both;
	}
}

@keyframes pjc-arc-draw {
	from {
		stroke-dashoffset: 1;
	}

	to {
		stroke-dashoffset: 0;
	}
}

@keyframes pjc-fade-in {
	from {
		opacity: 0;
	}
}

/* 1024 px and narrower */
@media (max-width: 1179px) {
	.rv-mod__top {
		grid-template-columns: 384px minmax(0, 1fr);
	}

	.rv-est {
		padding: 24px 28px 28px;
	}

	.rv-price {
		font-size: clamp(40px, 4.6vw, 52px);
	}

	.rv-fact--class {
		grid-template-columns: minmax(0, 1fr);
	}

	.rv-fact__act {
		justify-content: flex-start;
		margin-top: 10px;
	}

	/* Per guest gets its own line rather than breaking mid-range. */
	.rv-for__per {
		display: block;
		margin-top: 2px;
	}

	.rv-for__sep {
		display: none;
	}

	.rv-disc summary {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.rv-disc__peek {
		grid-row: 2;
		grid-column: 1;
	}

	.rv-disc summary > .rv-i {
		grid-row: 1 / 3;
		grid-column: 2;
	}

	.rv-split {
		grid-template-columns: minmax(0, 1fr);
	}

	.rv-guide__body {
		max-width: 72ch;
	}

	.rv-cabin__facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Narrow desktop: date and guests share a tight row, so the stepper narrows to leave the date its words. */
@media (min-width: 900px) and (max-width: 1179px) {
	/* Equal fact columns: the landing line wraps instead of squeezing the class name. */
	.rv-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rv-fields.is-compact .rv-stepper {
		gap: 4px;
	}

	.rv-fields.is-compact .rv-stepper input {
		width: 32px;
	}

	.rv-date__empty {
		font-size: 16px;
	}
}

/* Tablet and phone: one result card (estimate, ticket, class, Edit trip, actions), then the map card */
@media (max-width: 899px) {
	.rv-shell {
		width: min(100% - 48px, 1240px);
	}

	.rv-hero {
		padding: 16px 0 96px;
	}

	.rv-h1 {
		font-size: 36px;
	}

	.rv-mod {
		margin-top: -72px;
		background: none;
	}

	.rv-mod::after {
		content: none;
	}

	.rv-mod__top {
		display: flex;
		flex-direction: column;
		padding: 24px;
		border-radius: 16px;
		background: var(--rv-surface);
		box-shadow: var(--rv-shadow);
	}

	.rv-trip,
	.rv-est {
		display: contents;
	}

	.rv-trip__title {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.rv-trip > * {
		order: 2;
	}

	.rv-trip > .rv-edit {
		order: 4;
	}

	.rv-trip > .rv-trip__more {
		order: 5;
	}

	.rv-est > * {
		order: 7;
	}

	.rv-est > :is(.rv-est__top, .rv-price, .rv-for) {
		order: 1;
	}

	/* Route notes (such as tax on part of the route) wait below the date line, before the actions. */
	.rv-est > :is(.rv-facts, .rv-class-list, .rv-schedule) {
		order: 3;
	}

	.rv-est > .rv-dateline {
		order: 6;
	}

	.rv-price {
		font-size: 52px;
	}

	.rv-tk {
		grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
		margin: 16px -10px 0;
	}

	.rv-trip > .rv-err {
		margin-top: 8px;
	}

	.rv-tk__end,
	.rv-tk__end:focus {
		padding: 8px 0 10px 10px;
	}

	.rv-tk__side--to .rv-tk__end {
		padding: 8px 10px 10px 0;
	}

	.rv-tk__code {
		font-size: 34px;
		line-height: 40px;
	}

	.rv-tk__mid {
		padding-top: 28px;
	}

	.rv-tk__mid::before {
		top: 48px;
	}

	.rv-tk__city {
		font-size: 15px;
	}

	.rv-tk__name {
		font-size: 13px;
	}

	.rv-tk__search {
		padding: 0 10px;
	}

	.rv-facts {
		grid-template-columns: minmax(0, 1fr);
		margin-top: 16px;
	}

	.rv-fact,
	.rv-fact + .rv-fact {
		grid-template-columns: 18px minmax(0, 1fr) auto;
		align-items: center;
		column-gap: 10px;
		padding: 12px 0;
		border-left: 0;
	}

	.rv-fact + .rv-fact {
		border-top: 1px solid var(--rv-line);
	}

	.rv-fact dt {
		grid-row: 1;
		grid-column: 1;
		align-self: start;
		padding-top: 2px;
	}

	.rv-fact dt .rv-i {
		display: block;
	}

	.rv-fact__term {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.rv-fact__val {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		grid-column: 2 / -1;
		gap: 0 8px;
		margin-top: 0;
	}

	.rv-fact__main {
		font-size: 17px;
	}

	.rv-fact--time .rv-fact__sub {
		margin-top: 0;
		font-size: 15px;
	}

	.rv-fact--time [data-out="stops"]::before {
		content: "·" / "";
		margin-right: 8px;
	}

	.rv-fact--time [data-lands] {
		flex-basis: 100%;
		font-size: 14px;
	}

	.rv-fact--class {
		grid-template-columns: 18px minmax(0, 1fr) auto;
	}

	.rv-fact--class dt {
		align-self: center;
		padding-top: 0;
	}

	.rv-fact--class .rv-fact__val {
		display: contents;
	}

	.rv-fact--class .rv-fact__main {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		grid-row: 1;
		grid-column: 2;
		gap: 0 10px;
	}

	.rv-fact--class .rv-badge {
		margin-left: 0;
	}

	.rv-fact--class .rv-fact__sub {
		grid-row: 2;
		grid-column: 2 / -1;
		margin-top: 4px;
	}

	.rv-fact__act {
		grid-row: 1;
		grid-column: 3;
		justify-content: flex-end;
		margin-top: 0;
	}

	.rv-edit {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px 12px;
		padding: 12px 0;
		border-bottom: 1px solid var(--rv-line);
	}

	.rv-edit__line {
		font-size: 15px;
		font-weight: 600;
		line-height: 1.4;
	}

	.rv-edit .rv-btn {
		flex: none;
	}

	.rv-trip__more {
		display: none;
	}

	.rv-trip.is-editing .rv-trip__more {
		display: grid;
		gap: 10px;
		margin-top: 14px;
	}

	.rv-trip__more > .rv-seg {
		grid-row: auto;
		grid-column: 1 / -1;
		width: auto;
	}

	.rv-seg span {
		min-height: 40px;
	}

	.rv-cut {
		display: none;
	}

	.rv-fields,
	.rv-fields.is-compact {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	}

	.rv-fields.is-compact .rv-cell--date,
	.rv-fields.is-compact .rv-cell--pax {
		grid-column: 1 / -1;
	}

	.rv-fields.is-compact .rv-guests {
		flex-direction: row;
		align-items: center;
		gap: 12px;
		padding: 9px 15px;
	}

	.rv-fields.is-compact .rv-stepper .rv-icon-btn {
		width: 40px;
		height: 40px;
	}

	.rv-dateline {
		margin-top: 14px;
	}

	.rv-actions {
		margin-top: 16px;
	}

	.rv-actions .rv-btn {
		flex: 1;
		padding: 0 12px;
	}

	.rv-map {
		margin-top: 16px;
		border-top: 0;
		border-radius: 16px;
		background: var(--rv-surface);
		overflow: hidden;
	}

	.rv-map::after {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 2;
		border-radius: inherit;
		box-shadow: var(--rv-shadow);
		pointer-events: none;
	}

	.rv-map__frame {
		aspect-ratio: 16 / 9;
		border-radius: 0;
	}

	.rv-map__frame .pjc-route-map {
		--pjc-map-code-size: clamp(18px, 3.2cqi, 24px);
		--pjc-map-city-size: 13px;
		margin-top: -3.125% !important;
	}

	.rv-legend {
		position: static;
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: 2px 12px;
		padding: 10px 16px 12px;
		border-radius: 0;
		background: none;
		box-shadow: none;
	}

	.rv-legend__dist {
		font-size: 15px;
	}

	.rv-mod + .rv-disc {
		margin-top: 16px;
	}

	.rv-sec {
		margin-top: 72px;
	}

	.rv-cabin {
		grid-template-columns: minmax(0, 1fr);
	}

	.rv-cmp thead {
		display: none;
	}

	.rv-cmp,
	.rv-cmp tbody {
		display: block;
	}

	.rv-cmp tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 2px 12px;
		padding: 14px 24px;
		border-top: 1px solid var(--rv-line);
	}

	.rv-cmp tr.is-selected {
		background: var(--rv-chip);
	}

	.rv-cmp tr > *,
	.rv-cmp tr > :first-child,
	.rv-cmp tr > :last-child {
		display: block;
		padding: 0;
		border: 0;
		background: transparent;
	}

	.rv-cmp tbody th {
		grid-column: 1;
	}

	.rv-cmp td[data-label] {
		grid-column: 1;
		font-size: 14px;
	}

	.rv-cmp td[data-label]::before {
		content: attr(data-label) ": ";
		color: var(--rv-muted);
	}

	.rv-cmp td[data-label] .sub {
		display: inline;
		margin-left: 6px;
		font-size: 14px;
	}

	.rv-cmp td[data-label="Price"] {
		grid-row: 1;
		grid-column: 2;
		text-align: right;
	}

	.rv-cmp td[data-label="Price"]::before {
		content: none;
	}

	.rv-cmp td[data-label="Price"] .sub {
		display: block;
		margin-left: 0;
	}

	.rv-cmp__act {
		grid-row: 2 / 5;
		grid-column: 2;
		align-self: end;
		width: auto;
	}

	.rv-routes {
		grid-template-columns: minmax(0, 1fr);
	}

	.rv-dates li {
		grid-template-columns: 190px minmax(0, 1fr);
	}

	.rv-dates__effect {
		grid-column: 2;
	}
}

/* Phone */
@media (max-width: 599px) {
	.rv-shell {
		width: min(100% - 32px, 1240px);
	}

	.rv-hero {
		padding: 8px 0 84px;
	}

	.rv-h1 {
		margin-top: 2px;
		font-size: 30px;
		line-height: 1.15;
	}

	.rv-lede {
		font-size: 16px;
	}

	.rv-mod {
		margin-top: -64px;
	}

	.rv-mod__top {
		padding: 20px;
	}

	/* A long class name (Super-midsize and up) keeps its line; Change class moves under the example model. */
	.rv-fact--class[data-long] .rv-fact__main {
		grid-column: 2 / -1;
	}

	.rv-fact--class[data-long] .rv-fact__act {
		grid-row: 3;
		grid-column: 2 / -1;
		justify-content: flex-start;
		margin-top: 10px;
	}

	/* One line on any phone: 38px unless the range is too long for the card (about .555em a character). */
	.rv-price {
		font-size: min(38px, calc((100vw - 72px) / (var(--rv-price-len, 15) * .555)));
		letter-spacing: -.035em;
		white-space: nowrap;
	}

	.rv-for {
		font-size: 16px;
	}


	.rv-map__frame {
		aspect-ratio: 4 / 3;
	}

	/* Wider than the card and centred: the phone shows the middle of the map, where the labels stay. */
	.rv-map__frame .pjc-route-map {
		--pjc-map-code-size: clamp(18px, 4.8cqi, 22px);
		width: 120% !important;
		margin: 0 0 0 -10% !important;
	}

	.rv-legend {
		gap: 0 10px;
		font-size: 13px;
	}

	.rv-disc summary {
		padding: 14px 16px;
	}

	.rv-disc__body {
		padding: 0 16px 20px;
	}

	.rv-kv,
	.rv-ap {
		grid-template-columns: minmax(0, 1fr);
	}

	.rv-sec {
		margin-top: 56px;
	}

	.rv-h2 {
		font-size: 25px;
	}

	.rv-lead {
		font-size: 16px;
	}

	.rv-alts {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.rv-alt {
		padding: 20px;
	}

	.rv-alt__go,
	.rv-alt__go .rv-btn {
		width: 100%;
	}

	.rv-compare {
		margin-top: 24px;
	}

	.rv-compare > summary {
		padding: 14px 16px;
	}

	.rv-cmp tr {
		padding: 14px 16px;
	}

	.rv-cmp__foot {
		padding: 12px 16px 16px;
	}

	.rv-cabin {
		margin-top: 24px;
		padding: 20px;
	}

	.rv-cabin__facts {
		gap: 8px;
	}

	.rv-cabin__facts div {
		padding: 12px 14px;
	}

	.rv-guide {
		margin-top: 40px;
		padding-top: 40px;
	}

	.rv-guide h2 {
		font-size: 24px;
	}

	.rv-answer {
		font-size: 18px;
	}

	.rv-guide__body > p:not(.rv-answer, .rv-small),
	.rv-guide__body > ol li,
	.rv-guide__body > ul li {
		font-size: 17px;
		line-height: 1.6;
	}

	.rv-gt thead {
		display: none;
	}

	.rv-gt,
	.rv-gt tbody {
		display: block;
	}

	.rv-gt tr {
		display: block;
		padding: 12px 14px;
		border-top: 1px solid var(--rv-line);
	}

	.rv-gt tbody tr:first-child {
		border-top: 0;
	}

	.rv-gt th,
	.rv-gt td {
		display: block;
		padding: 2px 0;
		border: 0;
	}

	.rv-gt td[data-label]::before {
		content: attr(data-label) ": ";
		color: var(--rv-muted);
		font-weight: 600;
	}

	/* Home route guides: the route and its price on top, the class and flight time below. */
	.rv-index .rv-gt tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 2px 12px;
	}

	.rv-index .rv-gt tbody th {
		white-space: normal;
	}

	.rv-index .rv-gt td {
		color: var(--rv-muted);
		font-size: 14px;
	}

	.rv-index .rv-gt td.num {
		grid-area: 1 / 2;
		color: var(--rv-ink);
		font-size: 15px;
		text-align: right;
	}

	.rv-index .rv-gt td[data-label]::before {
		content: none;
	}

	.rv-index .rv-gt td[data-label="Flight"] {
		text-align: right;
	}

	.rv-index .rv-gt td .sub {
		display: inline;
	}

	.rv-index .rv-gt td .sub::before {
		content: " · ";
	}

	.rv-dates li {
		grid-template-columns: minmax(0, 1fr);
		gap: 2px;
	}

	.rv-dates__effect {
		grid-column: 1;
	}

	.rv-factors {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.rv-faq summary {
		font-size: 17px;
	}

	.rv-faq p {
		font-size: 16px;
	}

	.rv-cta {
		margin-top: 64px;
		padding: 40px 0;
	}

	.rv-cta h2 {
		font-size: 24px;
	}

	.rv-cta .rv-actions {
		width: 100%;
	}
}
