/**
 * Crystal Flights — booking UI.
 *
 * Palette and type taken from the site's Elementor global kit, not chosen by eye.
 * Everything is scoped under .cf-app so nothing leaks into the theme, and the
 * theme's own resets cannot reach in.
 *
 * The one rule that shaped the rest: the brand orange #FD8C04 carries white text
 * at only 2.35:1, failing WCAG outright, but carries near-black #2B1608 at 7.31:1.
 * So orange is always a fill under dark text, never a background for white.
 */

.cf-app {
	/* ---- colour ---- */
	--cf-brand: #FD8C04;
	--cf-brand-dark: #D37C0C;
	--cf-brand-soft: #F4A261;
	--cf-deep: #6C290B;
	--cf-gold: #C9A141;

	--cf-success: #395902;
	--cf-danger: #A32B12;
	--cf-warning: #8F5804;

	--cf-ink: #2B1608;
	--cf-ink-soft: #5A4636;
	/* 5.46:1 on the ground, 6.14:1 on a card. Was #7A6A5A, which measured 4.63:1
	   once the ground darkened -- passing, but with nothing spare, on the
	   smallest type on the page. */
	--cf-ink-faint: #6E5F51;
	--cf-on-dark: #FFFFFF;

	--cf-surface: #FFFFFF;

	/* The page ground the cards sit on.
	   Hue 39deg, four degrees off the brand orange, so it harmonises instead of
	   competing; 37% saturation reads as a neutral rather than as a colour, where
	   a truer cream (70%+) looks yellow across a full page width.

	   Two numbers set this value, both measured rather than judged:

	     white card on the ground   0.157 luminance apart -- the panels get their
	                                shape from the ground, not from a border. On
	                                the original #FFFEF8 it was 0.011.
	     ground vs the site header  0.044 apart. crystaltourskenya.com paints its
	                                header AND its body #F0F4E2, and the previous
	                                #F6F1E9 sat 0.003 from it -- a different hue at
	                                the same lightness, which the eye reads as one
	                                colour. That is what made the booking section
	                                appear to merge into the header.

	   Not deeper than this: #EDE5D6 separates more but reads beige-grey rather
	   than warm, and drops the help text to 4.91:1. */
	--cf-ground: #F2ECE1;

	--cf-canvas: #FFFEF8;
	--cf-sage: #F0F4E2;
	--cf-line: #E4DCCF;
	/* Panel edges, softened now that elevation does most of the separating.
	   Still present so a card keeps a defined edge at high zoom and in forced
	   colours, where shadows are dropped entirely. */
	--cf-line-card: #EFE8DC;
	--cf-line-soft: #F2ECE3;

	/* ---- type ---- */
	--cf-font-display: Georgia, "Times New Roman", serif;
	--cf-font-body: Arial, "Helvetica Neue", Helvetica, sans-serif;

	/* ---- rhythm ---- */
	--cf-1: 4px;  --cf-2: 8px;  --cf-3: 12px; --cf-4: 16px;
	--cf-5: 24px; --cf-6: 32px; --cf-7: 48px;

	--cf-radius: 10px;
	--cf-radius-sm: 8px;

	/* Layout */
	--cf-shell: 1200px;

	/* Two layers, always: a tight one for the contact edge and a wide soft one
	   for the lift. A single shadow reads as either hard or foggy, never as
	   depth.

	   Tinted with the ink colour rather than black. A pure-black shadow over a
	   warm ground turns grey and muddy, and that one detail does more to make a
	   warm palette look cheap than any other. */
	--cf-shadow: 0 1px 2px rgba(43, 22, 8, .05), 0 4px 14px rgba(43, 22, 8, .06);
	--cf-shadow-lift: 0 2px 4px rgba(43, 22, 8, .06), 0 12px 32px rgba(43, 22, 8, .10);

	font-family: var(--cf-font-body);
	font-size: 16px;
	line-height: 1.5;
	color: var(--cf-ink);

	/* ---- the ground ----
	   Breaks out of whatever column the theme puts the shortcode in. Not
	   decoration: this theme's content width is 645px, so a 1200px container
	   cannot exist inside the normal flow at all.

	   `!important` on the margins is not laziness. WordPress block themes apply

	     .is-layout-constrained > :where(:not(.alignfull)…) {
	         margin-left: auto !important; margin-right: auto !important;
	     }

	   which silently overrode the negative margins and left the element 100vw
	   wide but still sitting at the parent's left padding -- full width, pushed
	   off the right edge. An !important from the theme can only be answered with
	   one.

	   The remaining overflow is the scrollbar: 100vw counts it, clientWidth does
	   not, so the band is ~15px wider than the visible page. That is handled by
	   `overflow-x: clip` on the body, added only to pages that contain the
	   shortcode -- see Shortcode::body_class(). `clip` rather than `hidden`
	   because hidden silently disables position:sticky further up the page. */
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw) !important;
	padding-block: var(--cf-6);
	background: var(--cf-ground);

	/* A hairline and a short recess under it, so the section reads as sitting
	   beneath the header rather than continuing it.

	   Deliberately not a background gradient down the section: at this lightness
	   a full-section gradient reads as dated, or as a printing fault. 14px of
	   inset shade does the same job in a tenth of the distance.

	   Ink-tinted, not black -- black over a warm ground goes grey and muddy,
	   which is the same reason the card shadows are tinted. */
	box-shadow:
		inset 0 1px 0 rgba( 43, 22, 8, .10 ),
		inset 0 14px 22px -14px rgba( 43, 22, 8, .10 );
}

/* Absorbs the scrollbar's worth of break-out.
   100vw counts the vertical scrollbar and clientWidth does not, so the band
   overhangs by ~15px, split either side by the centring. Measured: the page
   scrolled 8px right without this.

   Both rules are needed. `clip` on the body does NOT propagate to the viewport
   the way `hidden` does -- verified, the page still scrolled -- so the root
   element needs it too. They are separate rules on purpose: a browser without
   :has() drops the second one rather than discarding both.

   `clip` and not `hidden`: hidden turns the element into a scroll container,
   which silently disables position:sticky anywhere on the page.

   Scoped to pages that render the booking flow, so nothing else on the site
   has its overflow behaviour changed by this plugin. */
body.cf-booking-page { overflow-x: clip; }
html:has(body.cf-booking-page) { overflow-x: clip; }

/* ---- the container ----
   1200px, in the same range as the booking sites customers will have used
   before this one: Booking.com 1104, Skyscanner 1200, Expedia 1240, Kayak 1280.
   Wide enough for a result row beside its filter rail, narrow enough that the
   row does not stretch into a thin line on a large monitor. */
.cf-shell {
	width: 100%;
	max-width: var(--cf-shell);
	margin-inline: auto;
	padding-inline: var(--cf-4);
}

@media (min-width: 720px) {
	.cf-app { padding-block: var(--cf-7); }
	.cf-shell { padding-inline: var(--cf-5); }
}

@media (min-width: 1080px) {
	.cf-shell { padding-inline: var(--cf-6); }
}

.cf-app *,
.cf-app *::before,
.cf-app *::after { box-sizing: border-box; }

/* The `hidden` attribute only sets display:none from the UA stylesheet, so any
   author rule with a display value silently defeats it. That is not theoretical
   here: .cf-error sets display:flex, so <p class="cf-error" hidden> stayed
   visible and rendered its "!" pseudo-element under the search form on every
   page load, with no message beside it.
   The whole step machine toggles visibility through el.hidden, so this guards
   every panel, notice and error at once rather than patching one rule. */
.cf-app [hidden] { display: none !important; }

/* Every interactive element gets the same visible ring. Removing focus styling
   is the single most common accessibility failure in booking forms. */
.cf-app :focus-visible {
	outline: 2px solid var(--cf-brand-dark);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ==========================================================================
   Test-mode band
   ========================================================================== */

/* Deliberately NOT the brand orange. Orange is the primary-action fill
   everywhere in this UI, so a warning wearing it reads as something to click.
   --cf-deep carries white at 10.72:1 and reads as a system message rather than
   as content, which is exactly the register wanted. */
.cf-testmode {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--cf-2) var(--cf-3);
	padding: var(--cf-3) var(--cf-4);
	margin-bottom: var(--cf-4);
	border-radius: var(--cf-radius-sm);
	background: var(--cf-deep);
	color: var(--cf-on-dark);
	font-size: 14px;
	line-height: 1.45;
}

.cf-testmode strong {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* The label carries a mark as well as colour, so it survives greyscale printing,
   colour-blindness and forced-colours mode. */
.cf-testmode strong::before { content: "⚠ "; }

.cf-testmode span { flex: 1 1 16em; }

/* ==========================================================================
   Progress
   ========================================================================== */

.cf-steps {
	display: flex;
	gap: var(--cf-2);
	margin-bottom: var(--cf-5);
	padding: 0;
	list-style: none;
	counter-reset: cf-step;
	overflow-x: auto;
}

.cf-step {
	flex: 1 1 0;
	min-width: 84px;
	padding-top: var(--cf-3);
	border-top: 3px solid var(--cf-line);
	font-size: 13px;
	color: var(--cf-ink-faint);
	counter-increment: cf-step;
	white-space: nowrap;
}

.cf-step::before {
	content: counter(cf-step) ". ";
	font-weight: 700;
}

.cf-step[aria-current="step"] {
	border-top-color: var(--cf-brand);
	color: var(--cf-ink);
	font-weight: 700;
}

.cf-step.is-done {
	border-top-color: var(--cf-success);
	color: var(--cf-ink-soft);
}

/* Not colour alone — a done step is also marked. */
.cf-step.is-done::after {
	content: " ✓";
	color: var(--cf-success);
	font-weight: 700;
}

/* ==========================================================================
   Panels
   ========================================================================== */

.cf-panel {
	background: var(--cf-surface);
	border: 1px solid var(--cf-line-card);
	border-radius: var(--cf-radius);
	padding: var(--cf-5);
	margin-bottom: var(--cf-4);
	box-shadow: var(--cf-shadow);
}

.cf-panel--flush { padding: 0; overflow: hidden; }

.cf-h {
	font-family: var(--cf-font-display);
	font-weight: 600;
	font-size: 28px;
	line-height: 1.2;
	margin: 0 0 var(--cf-2);
	color: var(--cf-ink);
}

.cf-h--sm { font-size: 20px; }

.cf-sub {
	color: var(--cf-ink-soft);
	font-size: 15px;
	margin: 0 0 var(--cf-5);
}

/* ==========================================================================
   Controls
   ========================================================================== */

.cf-field { display: flex; flex-direction: column; position: relative; min-width: 0; }

.cf-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .01em;
	color: var(--cf-ink-soft);
	margin-bottom: var(--cf-2);
}

.cf-input,
.cf-select {
	width: 100%;
	/* 48px keeps it thumb-sized, and 16px text stops iOS zooming on focus. */
	min-height: 48px;
	padding: var(--cf-3) var(--cf-4);
	font-family: inherit;
	font-size: 16px;
	color: var(--cf-ink);
	background: var(--cf-surface);
	border: 1px solid var(--cf-line);
	border-radius: var(--cf-radius-sm);
	transition: border-color .15s, box-shadow .15s;
}

.cf-input::placeholder { color: var(--cf-ink-faint); }

.cf-input:hover,
.cf-select:hover { border-color: var(--cf-brand-soft); }

.cf-input:focus,
.cf-select:focus {
	outline: none;
	border-color: var(--cf-brand-dark);
	box-shadow: 0 0 0 3px rgba(253, 140, 4, .18);
}

/* Error is a border *and* a message, never colour alone. */
.cf-field.is-invalid .cf-input,
.cf-field.is-invalid .cf-select { border-color: var(--cf-danger); }

.cf-error {
	display: flex;
	gap: var(--cf-1);
	margin-top: var(--cf-2);
	font-size: 13px;
	color: var(--cf-danger);
}

.cf-error::before { content: "!"; font-weight: 700; }

.cf-help { margin-top: var(--cf-2); font-size: 13px; color: var(--cf-ink-faint); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.cf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--cf-2);
	min-height: 48px;
	padding: var(--cf-3) var(--cf-6);
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	border: 1px solid transparent;
	border-radius: var(--cf-radius-sm);
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s, border-color .15s, transform .05s;
}

.cf-btn:active { transform: translateY(1px); }

/* Brand fill with INK text — 7.31:1. White here measures 2.35:1: unreadable. */
.cf-btn--primary { background: var(--cf-brand); color: var(--cf-ink); }
.cf-btn--primary:hover { background: var(--cf-brand-dark); }

.cf-btn--secondary {
	background: var(--cf-surface);
	color: var(--cf-deep);
	border-color: var(--cf-deep);
}
.cf-btn--secondary:hover { background: var(--cf-sage); }

.cf-btn--ghost {
	background: none;
	color: var(--cf-deep);
	min-height: auto;
	padding: var(--cf-2) 0;
	text-decoration: underline;
}

.cf-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.cf-btn.is-loading { color: transparent; position: relative; pointer-events: none; }

.cf-btn.is-loading::after {
	content: "";
	position: absolute;
	width: 18px; height: 18px;
	border: 2px solid rgba(43, 22, 8, .3);
	border-top-color: var(--cf-ink);
	border-radius: 50%;
	animation: cf-spin .7s linear infinite;
}

@keyframes cf-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Pills
   ========================================================================== */

.cf-pills { display: flex; gap: var(--cf-2); flex-wrap: wrap; }

.cf-pill input { position: absolute; opacity: 0; pointer-events: none; }

.cf-pill span {
	display: inline-block;
	padding: 10px 20px;
	border: 1px solid var(--cf-line);
	border-radius: 999px;
	font-size: 15px;
	cursor: pointer;
	transition: background-color .15s, border-color .15s;
}

.cf-pill input:checked + span {
	background: var(--cf-brand);
	border-color: var(--cf-brand);
	color: var(--cf-ink);
	font-weight: 700;
}

.cf-pill input:focus-visible + span {
	outline: 2px solid var(--cf-brand-dark);
	outline-offset: 2px;
}

.cf-tag {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	background: var(--cf-sage);
	color: var(--cf-ink);
}

.cf-tag--direct { background: var(--cf-sage); color: var(--cf-success); }
.cf-tag--gold { background: var(--cf-gold); color: var(--cf-ink); }

/* ==========================================================================
   Search form
   ========================================================================== */

.cf-search-grid {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: var(--cf-3);
	align-items: end;
}

.cf-swap {
	width: 44px; height: 44px;
	margin-bottom: 2px;
	border: 1px solid var(--cf-line);
	border-radius: 50%;
	background: var(--cf-surface);
	color: var(--cf-deep);
	font-size: 17px;
	cursor: pointer;
	flex: none;
}

.cf-swap:hover { background: var(--cf-sage); border-color: var(--cf-brand-soft); }

.cf-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: var(--cf-3);
	margin-top: var(--cf-3);
}

/* ---- autocomplete ---- */

.cf-suggest {
	position: absolute;
	top: 100%; left: 0; right: 0;
	z-index: 60;
	margin: var(--cf-1) 0 0;
	padding: 0;
	list-style: none;
	background: var(--cf-surface);
	border: 1px solid var(--cf-line);
	border-radius: var(--cf-radius-sm);
	box-shadow: var(--cf-shadow-lift);
	max-height: 300px;
	overflow-y: auto;
}

.cf-suggest li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: var(--cf-3) var(--cf-4);
	cursor: pointer;
	border-bottom: 1px solid var(--cf-line-soft);
}

.cf-suggest li:last-child { border-bottom: 0; }
.cf-suggest li:hover,
.cf-suggest li.is-active { background: var(--cf-sage); }

.cf-suggest strong { font-size: 15px; }
.cf-suggest span { font-size: 13px; color: var(--cf-ink-faint); }

/* ==========================================================================
   Countdown
   ========================================================================== */

.cf-timer {
	display: flex;
	align-items: center;
	gap: var(--cf-3);
	padding: var(--cf-3) var(--cf-4);
	margin-bottom: var(--cf-4);
	border-radius: var(--cf-radius-sm);
	background: var(--cf-sage);
	font-size: 14px;
}

.cf-timer strong { font-family: var(--cf-font-display); font-size: 17px; }

/* Warning and expiry differ by icon and weight, not colour alone. */
.cf-timer.is-warning { background: #FCF0DC; color: var(--cf-warning); font-weight: 700; }
.cf-timer.is-warning::before { content: "⏳"; }
.cf-timer.is-expired { background: #FBEAE6; color: var(--cf-danger); font-weight: 700; }
.cf-timer.is-expired::before { content: "⚠"; }

/* Meaningless before a search exists and after the ticket is issued. Driven off
   the step attribute so the JS does not have to remember to hide it. */
.cf-app[data-step="1"] .cf-timer,
.cf-app[data-step="5"] .cf-timer { display: none !important; }

/* ==========================================================================
   Result cards
   ========================================================================== */

.cf-results { display: flex; flex-direction: column; gap: var(--cf-3); }

.cf-results.is-stale { opacity: .45; pointer-events: none; }

/* The card is now a container for two things: the summary row, and the fare
   detail that expands underneath it. The grid moved down to .cf-card__main so
   the expanded panel can run the full width. */
.cf-card {
	background: var(--cf-surface);
	border: 1px solid var(--cf-line-card);
	border-radius: var(--cf-radius);
	box-shadow: var(--cf-shadow);
	transition: border-color .15s, box-shadow .15s, transform .15s;
}

.cf-card__main {
	display: grid;
	grid-template-columns: 150px 1fr 190px;
	align-items: center;
	gap: var(--cf-4);
	padding: var(--cf-4) var(--cf-5);
}

/* Two legs stack; one leg looks exactly as it did before. */
.cf-card__legs { display: flex; flex-direction: column; gap: var(--cf-3); }

.cf-card__legs .cf-leg + .cf-leg {
	padding-top: var(--cf-3);
	border-top: 1px dashed var(--cf-line);
}

.cf-leg__label {
	min-width: 66px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--cf-ink-faint);
}

/* The open card is the one being read: lift it and mark the edge in brand so it
   is obvious which fare the panel below belongs to. */
.cf-card.is-open {
	border-color: var(--cf-brand);
	box-shadow: var(--cf-shadow-lift);
}

.cf-card.is-open:hover { transform: none; }

/* ---- the inline fare panel ---- */

.cf-fare {
	padding: var(--cf-5);
	border-top: 1px solid var(--cf-line);
	background: var(--cf-ground);
	border-radius: 0 0 var(--cf-radius) var(--cf-radius);
}

.cf-fare__legs {
	padding: var(--cf-4);
	margin-bottom: var(--cf-4);
	background: var(--cf-surface);
	border-radius: var(--cf-radius-sm);
}

.cf-fare .cf-h--sm { margin-top: var(--cf-4); }
.cf-fare .cf-inclusions { margin: 0 0 var(--cf-4); padding-left: var(--cf-5); font-size: 15px; }
.cf-fare .cf-summary { margin-top: var(--cf-4); }

.cf-extra {
	justify-content: space-between;
	padding: var(--cf-3) 0;
	border-bottom: 1px solid var(--cf-line-soft);
}

.cf-extra__label { display: flex; align-items: center; gap: var(--cf-2); }

/* Rises rather than merely gaining a shadow. One pixel is enough to register as
   movement without the list appearing to jitter as the pointer crosses it. */
.cf-card:hover {
	border-color: var(--cf-brand-soft);
	box-shadow: var(--cf-shadow-lift);
	transform: translateY(-1px);
}

.cf-card__airline { display: flex; flex-direction: column; gap: 2px; }
.cf-card__airline b { font-size: 15px; }
.cf-card__airline span { font-size: 12px; color: var(--cf-ink-faint); }

.cf-leg { display: flex; align-items: center; gap: var(--cf-4); }

.cf-leg__end { text-align: center; min-width: 62px; }

.cf-time {
	display: block;
	font-family: var(--cf-font-display);
	font-size: 21px;
	font-weight: 600;
	line-height: 1.1;
}

.cf-iata { font-size: 12px; color: var(--cf-ink-faint); letter-spacing: .04em; }

.cf-leg__mid { flex: 1; text-align: center; }

.cf-dur { font-size: 12px; color: var(--cf-ink-faint); }

/* The rail reads as a flight path: line, dot for each stop, arrow at the end. */
.cf-rail {
	position: relative;
	height: 1px;
	margin: 6px 0;
	background: var(--cf-line);
}

.cf-rail::after {
	content: "";
	position: absolute;
	right: -1px; top: -3px;
	border: 3.5px solid transparent;
	border-left-color: var(--cf-brand);
}

.cf-rail__stop {
	position: absolute;
	top: -2.5px;
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--cf-brand);
}

.cf-card__buy {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--cf-2);
}

.cf-price {
	font-family: var(--cf-font-display);
	font-size: 26px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.cf-price small { display: block; font-family: var(--cf-font-body); font-size: 11px; font-weight: 400; color: var(--cf-ink-faint); }

.cf-price--was { font-size: 15px; color: var(--cf-ink-faint); text-decoration: line-through; }

/* ---- skeleton ---- */

.cf-skeleton {
	height: 92px;
	border-radius: var(--cf-radius);
	background: linear-gradient(90deg, var(--cf-line-soft) 25%, #FAF6F0 50%, var(--cf-line-soft) 75%);
	background-size: 200% 100%;
	animation: cf-shimmer 1.3s infinite;
}

@keyframes cf-shimmer { to { background-position: -200% 0; } }

/* ==========================================================================
   Data display
   ========================================================================== */

.cf-summary { width: 100%; border-collapse: collapse; font-size: 15px; }
.cf-summary td { padding: var(--cf-2) 0; }
.cf-summary td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.cf-summary tr.cf-total td {
	padding-top: var(--cf-3);
	border-top: 1px solid var(--cf-line);
	font-family: var(--cf-font-display);
	font-size: 20px;
	font-weight: 600;
}

.cf-notice {
	display: flex;
	gap: var(--cf-3);
	padding: var(--cf-4);
	border-radius: var(--cf-radius-sm);
	border-left: 4px solid var(--cf-brand);
	background: var(--cf-ground);
	font-size: 15px;
	margin-bottom: var(--cf-4);
}

.cf-notice--warn { border-left-color: var(--cf-warning); background: #FCF7EE; }
.cf-notice--error { border-left-color: var(--cf-danger); background: #FBEAE6; }
.cf-notice--ok { border-left-color: var(--cf-success); background: var(--cf-sage); }

.cf-empty { text-align: center; padding: var(--cf-7) var(--cf-4); color: var(--cf-ink-soft); }
.cf-empty h3 { font-family: var(--cf-font-display); font-size: 22px; margin: 0 0 var(--cf-2); color: var(--cf-ink); }

/* ---- traveller cards and review rows ---- */

.cf-paxcard {
	padding: var(--cf-4);
	margin-bottom: var(--cf-4);
	border: 1px solid var(--cf-line-card);
	border-radius: var(--cf-radius);
	background: var(--cf-surface);
	box-shadow: var(--cf-shadow);
}

.cf-paxcard .cf-h--sm { margin: 0; }

/* Three fields to a line where there is room, one where there is not. The
   auto-fit default would wrap a title select onto its own row. */
.cf-row--3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

@media (min-width: 720px) {
	.cf-row--3 { grid-template-columns: 120px 1fr 1fr; }
}

.cf-reviewrow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--cf-3);
	padding: var(--cf-3) 0;
	border-bottom: 1px solid var(--cf-line-soft);
	font-size: 15px;
}

.cf-reviewrow:last-child { border-bottom: 0; }

/* ---- confirmation ---- */

.cf-confirm { text-align: center; padding: var(--cf-6) var(--cf-4); }

.cf-confirm__mark {
	width: 64px; height: 64px;
	margin: 0 auto var(--cf-4);
	border-radius: 50%;
	background: var(--cf-success);
	color: var(--cf-on-dark);      /* 8.07:1 — white is correct on this one */
	font-size: 32px;
	line-height: 64px;
}

/* Pending and failed are distinguished by mark, colour AND wording, never by
   colour alone -- and pending is deliberately not red: the customer has paid
   and nothing is wrong yet. */
.cf-confirm__mark.is-pending { background: var(--cf-deep); }
.cf-confirm__mark.is-failed  { background: var(--cf-danger); }

.cf-ref {
	display: inline-block;
	padding: var(--cf-3) var(--cf-5);
	margin: var(--cf-2) 0;
	border: 2px dashed var(--cf-brand);
	border-radius: var(--cf-radius-sm);
	background: var(--cf-ground);
	font-family: var(--cf-font-display);
	font-size: 26px;
	font-weight: 600;
	letter-spacing: .08em;
}

/* ==========================================================================
   Actions
   ========================================================================== */

.cf-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--cf-4);
	margin-top: var(--cf-5);
	flex-wrap: wrap;
}

.cf-check { display: flex; align-items: center; gap: var(--cf-2); font-size: 15px; cursor: pointer; }
.cf-check input { width: 20px; height: 20px; accent-color: var(--cf-brand-dark); }

/* ==========================================================================
   Mobile — most Kenyan traffic, and the card is the widest thing here
   ========================================================================== */

@media (max-width: 720px) {
	.cf-panel { padding: var(--cf-4); }
	.cf-h { font-size: 23px; }

	.cf-search-grid { grid-template-columns: 1fr; }

	/* The swap control turns to face the stacked fields. */
	.cf-swap { justify-self: center; transform: rotate(90deg); margin: calc(var(--cf-2) * -1) 0; }

	.cf-card__main { grid-template-columns: 1fr; gap: var(--cf-3); }
	.cf-fare { padding: var(--cf-4); }
	.cf-leg { flex-wrap: wrap; }
	.cf-card__buy { flex-direction: row; align-items: center; justify-content: space-between; }
	.cf-card__buy .cf-btn { flex: 1; margin-left: var(--cf-4); }

	.cf-steps { font-size: 12px; }
	.cf-step { min-width: 68px; }

	.cf-actions { flex-direction: column-reverse; align-items: stretch; }
	.cf-actions .cf-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.cf-app *, .cf-app *::before, .cf-app *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}

@media print {
	.cf-steps, .cf-actions, .cf-timer, .cf-btn { display: none !important; }
	.cf-panel { border: 0; padding: 0; }

	/* Flat on paper. A ground tint costs ink and shows as grey banding on most
	   home printers, and shadows print as smudges. The break-out also has to go
	   or the page runs off the sheet. */
	/* The margins have to be !important here too. The screen rule needs
	   !important to beat the block theme, and a plain declaration in a later
	   block does not outrank it -- measured: the ground stayed 1440px wide with
	   a -57.5px margin under print emulation, which runs the page off the
	   sheet. */
	.cf-app {
		width: auto !important;
		max-width: none !important;
		margin-inline: 0 !important;
		padding-block: 0;
		background: none;
		box-shadow: none;
	}

	.cf-shell { max-width: none; padding-inline: 0; }

	.cf-panel, .cf-card, .cf-paxcard { box-shadow: none; }

	/* A solid dark block costs a cartridge and tells the reader nothing they
	   could act on -- by the time it is on paper the booking is already made. */
	.cf-testmode { display: none !important; }
}

/* Forced-colours mode drops every shadow, so the borders go back to carrying the
   card edges on their own. Without this a panel there is an unbounded block of
   text. */
@media (forced-colors: active) {
	.cf-panel,
	.cf-card,
	.cf-paxcard { border-color: CanvasText; }
}
