/*
 * FareRabbit reusable component styles. See /DESIGN_SYSTEM.md.
 * Mobile-first: base rules target small viewports; min-width queries add
 * complexity upward (DESIGN_SYSTEM.md §4 — mobile-first is mandatory).
 */

/* Visible keyboard-focus states — DESIGN_SYSTEM.md §13. Token-based so
   light/dark surfaces get a ring that actually meets the contrast rule
   in §2 (coral fails as an outline colour at this weight). */
:focus-visible {
	outline: 2px solid var(--fr-focus-ring);
	outline-offset: 2px;
}

.fr-header :focus-visible,
.fr-footer :focus-visible {
	outline-color: var(--fr-focus-ring-inverse);
}

.fr-container {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 var(--fr-space-4);
}

/* Utility spacing classes — replace one-off inline styles in templates. */
.fr-section {
	padding-top: var(--fr-space-6);
}

.fr-no-margin {
	margin: 0;
}

/* Skip link — Phase 4E (DECISIONS.md D204). The first focus target on
   every page: visually hidden (still in the accessibility tree) until it
   receives keyboard focus, then shown as a solid, high-contrast control
   over the top-left of the dark header — no JavaScript, no layout shift.
   Existing tokens only; the cream outer ring keeps the focus indicator
   visible against the navy header. */
.fr-skip-link {
	position: absolute;
	top: var(--fr-space-2);
	left: var(--fr-space-4);
	z-index: 1000;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fr-skip-link:focus,
.fr-skip-link:focus-visible {
	display: inline-flex;
	align-items: center;
	width: auto;
	height: auto;
	min-height: 44px;
	margin: 0;
	padding: var(--fr-space-2) var(--fr-space-4);
	overflow: visible;
	clip: auto;
	white-space: normal;
	background: var(--fr-surface);
	color: var(--fr-text);
	font-family: var(--fr-font-body);
	font-weight: 600;
	text-decoration: underline;
	border: 2px solid var(--fr-focus-ring);
	border-radius: var(--fr-radius-sm);
	box-shadow: var(--fr-shadow-md);
	outline: 2px solid var(--fr-focus-ring-inverse);
	outline-offset: 2px;
}

/* Header — Gate 5 (DESIGN_SYSTEM.md §18): the approved dark bar with the
   FareRabbit wordmark, the two real destinations, search and the
   "Start with flights" action; a native <details> menu on phones. */
.fr-header {
	position: relative;
	z-index: 10;
	background: var(--fr-g5-night-deep);
	color: var(--fr-g5-text);
	padding: var(--fr-space-2) 0;
}

.fr-header__inner {
	display: flex;
	align-items: center;
	gap: var(--fr-space-4);
	min-height: 48px;
}

.fr-logo {
	display: flex;
	align-items: center;
	gap: var(--fr-space-2);
	min-height: 44px;
	font-family: var(--fr-font-g5-display);
	font-weight: 800;
	font-size: 1.5rem;
	letter-spacing: -0.02em;
	text-decoration: none;
	color: var(--fr-g5-text);
}

.fr-logo img {
	height: 36px;
	width: auto;
}

.fr-logo__accent {
	color: var(--fr-g5-pink);
}

/* Primary navigation — Phase 4B (D173) / 4D (D195): only real destinations
   are links. Gate 5: shown from 768px; phones use the menu below. */
.fr-nav {
	display: none;
}

.fr-nav__list {
	display: flex;
	align-items: center;
	gap: var(--fr-space-6);
	list-style: none;
	margin: 0;
	padding: 0;
}

.fr-nav__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-family: var(--fr-font-body);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--fr-g5-text);
	border-bottom: 3px solid transparent;
}

/* Current section: a text-independent underline bar plus aria-current in
   the markup — never colour alone (DESIGN_SYSTEM.md §13). */
.fr-nav__link--current {
	border-bottom-color: var(--fr-g5-cyan);
}

.fr-header__actions {
	display: none;
	align-items: center;
	gap: var(--fr-space-5);
	margin-left: auto;
}

.fr-header__search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--fr-g5-text);
	border-radius: var(--fr-radius-md);
}

.fr-header__search .fr-icon {
	width: 26px;
	height: 26px;
}

.fr-menu {
	margin-left: auto;
}

.fr-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	list-style: none;
	cursor: pointer;
	color: var(--fr-g5-text);
	border-radius: var(--fr-radius-md);
	-webkit-tap-highlight-color: transparent;
}

.fr-menu__toggle::-webkit-details-marker {
	display: none;
}

.fr-menu__toggle .fr-icon {
	width: 30px;
	height: 30px;
}

.fr-menu__icon-close,
.fr-menu[open] .fr-menu__icon-open {
	display: none;
}

.fr-menu[open] .fr-menu__icon-close {
	display: inline-flex;
}

.fr-menu__list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	gap: var(--fr-space-2);
	margin: 0;
	padding: var(--fr-space-3) var(--fr-space-4) var(--fr-space-5);
	list-style: none;
	background: var(--fr-g5-night-deep);
	border-bottom: 1px solid var(--fr-g5-line);
	box-shadow: var(--fr-shadow-g5-glow);
}

.fr-menu__link {
	display: flex;
	align-items: center;
	min-height: 48px;
	font-weight: 600;
	font-size: 1.05rem;
	text-decoration: none;
	color: var(--fr-g5-text);
	border-bottom: 1px solid var(--fr-g5-line);
}

.fr-menu__link[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--fr-g5-cyan);
	text-decoration-thickness: 3px;
	text-underline-offset: 6px;
}

.fr-menu__cta {
	width: 100%;
	margin-top: var(--fr-space-2);
}

@media (min-width: 768px) {
	.fr-header {
		padding: var(--fr-space-3) 0;
	}

	.fr-header__inner {
		gap: var(--fr-space-5);
	}

	.fr-nav__list {
		gap: var(--fr-space-5);
	}

	.fr-nav__link,
	.fr-header__actions .fr-g5-btn {
		white-space: nowrap;
	}

	.fr-logo {
		font-size: 1.75rem;
	}

	.fr-nav,
	.fr-header__actions {
		display: flex;
	}

	.fr-menu {
		display: none;
	}
}

@media (min-width: 1024px) {
	.fr-header__inner {
		gap: var(--fr-space-7);
	}

	.fr-nav__list {
		gap: var(--fr-space-6);
	}
}

/* Gate 5 buttons (DESIGN_SYSTEM.md §18): pink action fill with white text
   (--fr-g5-pink-action keeps white text at AA), 48px tall, 12px radius;
   the compact header variant is 44px. Text always says what happens. */
.fr-g5-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--fr-space-2);
	min-height: 48px;
	padding: 0 var(--fr-space-5);
	border: 0;
	border-radius: var(--fr-radius-md);
	font-family: var(--fr-font-body);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter 150ms ease-out, transform 150ms ease-out;
}

.fr-g5-btn .fr-icon {
	width: 20px;
	height: 20px;
	flex: none;
}

.fr-g5-btn--primary {
	background: var(--fr-g5-pink-action);
	color: var(--fr-g5-text);
	box-shadow: 0 4px 14px rgba(224, 20, 90, 0.35);
}

.fr-g5-btn--primary:hover {
	filter: brightness(1.08);
}

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

.fr-g5-btn--compact {
	min-height: 44px;
	font-size: 0.95rem;
}

/* Gate 5 secondary button (Gate 6 V1, D308): the approved outlined button
   for navy surfaces ("Explore more →" on the Phase 1–4 board) — white text
   and outline on transparent (18.4:1 on --fr-g5-night; the cyan hover
   11.1:1), 44px tall, 12px radius. Not yet used by a page; Gate 6 V2/V3
   use it instead of a copy. */
.fr-g5-btn--secondary {
	min-height: 44px;
	border: 1.5px solid var(--fr-g5-text);
	background: transparent;
	color: var(--fr-g5-text);
	font-size: 0.95rem;
}

.fr-g5-btn--secondary:hover {
	border-color: var(--fr-g5-cyan);
	color: var(--fr-g5-cyan);
}

/* Buttons */
.fr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 var(--fr-space-5);
	border-radius: var(--fr-radius-pill);
	font-family: var(--fr-font-body);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	border: 1.5px solid transparent;
	cursor: pointer;
}

.fr-btn--primary {
	background: var(--fr-primary-action);
	color: var(--fr-primary-action-text);
}

.fr-btn--secondary {
	background: transparent;
	border-color: var(--fr-navy);
	color: var(--fr-navy);
}

.fr-btn--inverse {
	background: transparent;
	border-color: var(--fr-cream);
	color: var(--fr-cream);
}

/* Badges */
.fr-badge {
	display: inline-flex;
	align-items: center;
	gap: var(--fr-space-1);
	padding: var(--fr-space-1) var(--fr-space-3);
	border-radius: var(--fr-radius-pill);
	font-family: var(--fr-font-body);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--fr-navy);
}

.fr-badge--good { background: var(--fr-cyan); }
.fr-badge--excellent { background: var(--fr-orange); }
.fr-badge--exceptional { background: var(--fr-coral); }

.fr-warning {
	display: flex;
	align-items: flex-start;
	gap: var(--fr-space-2);
	padding: var(--fr-space-3) var(--fr-space-4);
	border-radius: var(--fr-radius-md);
	background: var(--fr-warning-bg);
	color: var(--fr-warning);
	font-size: 0.85rem;
	font-weight: 600;
}

/* Restrained, non-alarmist note — e.g. low positioning risk. Distinct
   from .fr-warning: neutral surface/border/muted-text tokens, regular
   weight, no warning/danger colour, per DEAL_SCHEMA.md's "low" tier
   still needing a labelled treatment without reading as a warning. */
.fr-note {
	display: flex;
	align-items: flex-start;
	gap: var(--fr-space-2);
	padding: var(--fr-space-3) var(--fr-space-4);
	border-radius: var(--fr-radius-md);
	background: var(--fr-surface);
	border: 1px solid var(--fr-border);
	color: var(--fr-text-muted);
	font-size: 0.85rem;
	font-weight: 400;
}

/* Deal Card — see DESIGN_SYSTEM.md §7 */
.fr-deal-card {
	display: block;
	background: var(--fr-surface);
	border: 1px solid var(--fr-border);
	border-radius: var(--fr-radius-md);
	overflow: hidden;
	text-decoration: none;
	color: var(--fr-text);
	box-shadow: var(--fr-shadow-sm);
	transition: box-shadow 150ms ease-out, transform 150ms ease-out;
}

.fr-deal-card:hover {
	box-shadow: var(--fr-shadow-md);
	transform: translateY(-2px);
}

.fr-deal-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--fr-border);
}

.fr-deal-card__badge {
	position: absolute;
	top: var(--fr-space-3);
	left: var(--fr-space-3);
}

.fr-deal-card__body {
	padding: var(--fr-space-4);
}

.fr-deal-card__route {
	font-family: var(--fr-font-display);
	font-weight: 600;
	font-size: 1.05rem;
	margin: 0 0 var(--fr-space-2) 0;
}

.fr-deal-card__price {
	font-family: var(--fr-font-display);
	font-weight: 700;
	font-size: 1.75rem;
	color: var(--fr-text);
	margin: 0;
}

.fr-deal-card__price-label {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--fr-text-muted);
	margin-left: var(--fr-space-1);
}

.fr-deal-card__meta {
	margin-top: var(--fr-space-2);
	font-size: 0.85rem;
	color: var(--fr-text-muted);
}

.fr-deal-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--fr-space-5);
}

@media (min-width: 768px) {
	.fr-deal-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.fr-deal-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Deal Page — see DESIGN_SYSTEM.md §8 for the mandatory section order. */
.fr-deal-page {
	padding-bottom: var(--fr-space-8);
}

.fr-deal-page__body {
	max-width: 720px;
	margin: 0 auto;
	padding-top: var(--fr-space-5);
}

.fr-deal-page__body > * + * {
	margin-top: var(--fr-space-6);
}

.fr-deal-page__cta {
	margin: var(--fr-space-5) 0 0;
}

.fr-deal-page__cta .fr-btn {
	width: 100%;
}

/* Phase 4A: the short affiliate disclosure under an affiliate CTA only —
   existing caption type/colour tokens, no new colour (DESIGN_SYSTEM.md §5). */
.fr-deal-page__disclosure {
	margin: var(--fr-space-2) 0 0;
}

/* Phase 4C: the source-neutral external-handoff note under every live CTA
   (hero and lower placement) — the same caption treatment. */
.fr-deal-page__handoff {
	margin: var(--fr-space-2) 0 0;
}

.fr-btn--disabled {
	background: var(--fr-border);
	color: var(--fr-text-muted);
	cursor: not-allowed;
}

.fr-deal-section {
	scroll-margin-top: var(--fr-space-6);
}

/* Deal Page hero — badge, headline, route, price, dates, cabin, and the
   primary CTA all live here so the CTA is guaranteed above the fold on
   mobile (DESIGN_SYSTEM.md §8, item 7). */
.fr-deal-hero__media {
	position: relative;
	background: var(--fr-surface-dark);
	padding: var(--fr-space-6) 0 var(--fr-space-5);
}

.fr-deal-hero--fallback .fr-deal-hero__media {
	/* No destination photo yet for this Deal — a sensible fallback per
	   DESIGN_SYSTEM.md §11 ("implementation deferred past the minimal
	   scaffold"), built only from the existing --fr-navy token (no raw
	   hex/RGB and no new brand colour) via color-mix() against itself and
	   the approved --fr-cyan accent, at low opacity, to add depth without
	   introducing anything not already in tokens.css. */
	background: linear-gradient(
		135deg,
		var(--fr-navy) 0%,
		color-mix(in srgb, var(--fr-navy) 85%, var(--fr-cyan) 15%) 60%,
		var(--fr-navy) 100%
	);
}

.fr-deal-hero__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fr-deal-hero__scrim {
	position: absolute;
	inset: 0;
	/* Token-derived transparency (color-mix() against var(--fr-navy) and
	   "transparent") rather than a raw rgba() value — same visual result,
	   sourced only from the existing --fr-navy token. */
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--fr-navy) 35%, transparent) 0%,
		color-mix(in srgb, var(--fr-navy) 92%, transparent) 100%
	);
}

.fr-deal-hero__content {
	position: relative;
	color: var(--fr-text-inverse);
	display: flex;
	flex-direction: column;
	gap: var(--fr-space-2);
}

.fr-deal-hero__headline {
	color: var(--fr-text-inverse);
	margin: 0;
}

.fr-deal-hero__route {
	color: var(--fr-text-inverse);
	margin: 0;
}

.fr-deal-hero__summary {
	background: var(--fr-surface);
	padding: var(--fr-space-5) var(--fr-space-4);
	border-bottom: 1px solid var(--fr-border);
}

.fr-deal-hero__price {
	font-family: var(--fr-font-display);
	font-weight: 700;
	font-size: 2.5rem;
	line-height: 1.1;
	color: var(--fr-text);
	margin: 0;
}

.fr-deal-hero__price-label {
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--fr-text-muted);
	margin-left: var(--fr-space-2);
}

.fr-deal-hero__meta {
	margin: var(--fr-space-1) 0 0;
}

@media (min-width: 768px) {
	.fr-deal-hero__media {
		padding: var(--fr-space-8) 0 var(--fr-space-6);
	}

	.fr-deal-hero__price {
		font-size: 3rem;
	}
}

/* Phase 4C: from 1024px the hero summary is two columns — every price
   fact (price, what it means, notices, dates, freshness) stacks in the
   first; the primary CTA, its handoff note and any disclosure sit beside
   them in the second. Below 1024px everything stacks in source order, so
   the CTA stays directly under the price on mobile (DESIGN_SYSTEM.md §8
   item 7). */
@media (min-width: 1024px) {
	.fr-deal-hero__summary {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: var(--fr-space-6);
		align-items: start;
	}

	.fr-deal-hero__summary > * {
		grid-column: 1;
	}

	.fr-deal-hero__summary .fr-deal-page__cta {
		grid-column: 2;
		grid-row: 1 / span 6;
		align-self: center;
		max-width: 20rem;
		margin-top: 0;
	}

	.fr-deal-hero__summary .fr-deal-page__cta .fr-btn {
		width: auto;
		padding: 0 var(--fr-space-7);
	}
}

/* Expired / unavailable Deal state — explicit text, not colour-only. */
.fr-expired-banner {
	display: flex;
	align-items: flex-start;
	gap: var(--fr-space-3);
	padding: var(--fr-space-4);
	margin-top: var(--fr-space-4);
	border-radius: var(--fr-radius-md);
	background: var(--fr-danger-bg);
	color: var(--fr-danger);
}

.fr-expired-banner__title {
	font-family: var(--fr-font-display);
	font-weight: 700;
	margin: 0 0 var(--fr-space-1) 0;
}

.fr-expired-banner .fr-body-sm {
	color: var(--fr-danger);
}

.fr-expired-banner__cta {
	margin-left: auto;
	flex-shrink: 0;
	border-color: var(--fr-danger);
	color: var(--fr-danger);
}

@media (max-width: 767px) {
	.fr-expired-banner {
		flex-wrap: wrap;
	}

	.fr-expired-banner__cta {
		margin-left: 0;
		width: 100%;
	}
}

/* Itinerary / baggage detail lists. */
.fr-deal-detail-list {
	margin: var(--fr-space-3) 0 0;
	display: grid;
	gap: var(--fr-space-3);
}

.fr-deal-detail-list__row {
	display: flex;
	justify-content: space-between;
	gap: var(--fr-space-4);
	padding-bottom: var(--fr-space-2);
	border-bottom: 1px solid var(--fr-border);
}

.fr-deal-detail-list__row dt {
	color: var(--fr-text-muted);
}

.fr-deal-detail-list__row dt {
	flex-shrink: 0;
	max-width: 50%;
}

.fr-deal-detail-list__row dd {
	margin: 0;
	text-align: right;
	/* Phase 4C: long values (reference basis, baggage statements, airline
	   names) wrap instead of overflowing at narrow widths. */
	min-width: 0;
	overflow-wrap: anywhere;
}

/* Phase 4C: prose conditions ("Before you book") read label-above-value,
   left-aligned, at every width. */
.fr-deal-detail-list--stacked .fr-deal-detail-list__row {
	flex-direction: column;
	gap: var(--fr-space-1);
}

.fr-deal-detail-list--stacked .fr-deal-detail-list__row dt {
	max-width: none;
}

.fr-deal-detail-list--stacked .fr-deal-detail-list__row dd {
	text-align: left;
}

/* Phase 4C Price details: the saving is stated in words ("You save") and
   given weight, never colour alone; the deal fare keeps the display face so
   the hero price stays the most prominent numeral on the page. */
.fr-deal-fare-details__row--deal-fare dd {
	font-family: var(--fr-font-display);
	font-weight: 700;
}

.fr-deal-fare-details__row--savings dd {
	font-weight: 600;
}

/* Phase 4C: the rating line and its explanation under "Why this is a good
   deal" — text only, no new badge or colour. */
.fr-deal-rating {
	margin-top: var(--fr-space-3);
}

.fr-deal-rating__label,
.fr-deal-rating__basis {
	margin: 0;
}

.fr-deal-rating__basis {
	margin-top: var(--fr-space-1);
	color: var(--fr-text-muted);
}

.fr-deal-baggage__commentary {
	margin: var(--fr-space-3) 0 0;
}

/* Phase 4C: the lower booking CTA after the decision information. Full
   width (a large tap target) on phones; natural width from 768px. */
.fr-deal-decision-cta .fr-deal-page__cta {
	margin-top: var(--fr-space-3);
}

@media (min-width: 768px) {
	.fr-deal-decision-cta .fr-deal-page__cta .fr-btn {
		width: auto;
		padding: 0 var(--fr-space-7);
	}
}

.fr-deal-warnings {
	display: flex;
	flex-direction: column;
	gap: var(--fr-space-3);
}

/* FareRabbit Alert CTA — DESIGN_SYSTEM.md §8 item 13, built per
   PHASE_1D_C_PUBLIC_ALERT_LIFECYCLE.md. Formerly the non-functional
   "Signal — coming soon" placeholder (fr-signal-cta); renamed alongside
   the real signup form it now contains (PHASE_1D_ALERT_ARCHITECTURE.md
   §19). Used on both the Deal page (deal-alert-cta.php) and Discovery
   results (discovery-alert-cta.php). */
.fr-alert-cta {
	display: flex;
	align-items: flex-start;
	gap: var(--fr-space-4);
	flex-wrap: wrap;
	padding: var(--fr-space-5);
	border-radius: var(--fr-radius-lg);
	background: var(--fr-surface-dark);
	color: var(--fr-text-inverse);
}

.fr-alert-cta__icon {
	font-size: 1.75rem;
	line-height: 1;
}

.fr-alert-cta h2,
.fr-alert-cta p {
	color: var(--fr-text-inverse);
}

.fr-alert-cta__copy {
	flex: 1 1 220px;
}

.fr-alert-cta__form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--fr-space-2);
	flex: 1 1 320px;
}

.fr-alert-cta__form .fr-input {
	flex: 1 1 200px;
	min-width: 0;
	padding: var(--fr-space-2) var(--fr-space-3);
	border-radius: var(--fr-radius-md, 6px);
	border: 1px solid var(--fr-cream);
	background: var(--fr-text-inverse);
	color: inherit;
}

.fr-alert-cta__consent {
	display: flex;
	align-items: center;
	gap: var(--fr-space-2);
	flex: 1 1 100%;
	font-size: 0.8rem;
}

.fr-alert-cta__cta {
	border-color: var(--fr-cream);
	color: var(--fr-cream);
}

.fr-alert-cta__status {
	flex: 1 1 100%;
	font-size: 0.85rem;
	margin: 0;
}

/* Honeypot — invisible to real visitors, present in the DOM for bots
   that fill every field (PHASE_1D_C_PUBLIC_ALERT_LIFECYCLE.md
   "Honeypot"). Off-screen, not display:none — some bots skip
   display:none fields specifically to evade this exact trick. */
.fr-alert-cta__hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 767px) {
	.fr-alert-cta__form {
		width: 100%;
	}
}

/* Verify/unsubscribe public pages — privacy-safe, no marketing content
   (PHASE_1D_C_PUBLIC_ALERT_LIFECYCLE.md "Public page privacy"). */
.fr-alert-page {
	padding: var(--fr-space-7) 0;
	max-width: 560px;
}

/* Phase 4D — Manage Alerts (/alerts/manage). Mobile-first, existing tokens
   only (DESIGN_SYSTEM.md §15). Status is always a text label; colour is
   decoration. Destructive actions use the danger outline so they never
   look like ordinary navigation. */
.fr-manage .fr-input {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: var(--fr-space-2) var(--fr-space-3);
	border: 1px solid var(--fr-text-muted);
	border-radius: var(--fr-radius-sm);
	background: var(--fr-surface);
	color: var(--fr-text);
	font-family: var(--fr-font-body);
	font-size: 1rem;
}

.fr-manage .fr-input[aria-invalid="true"] {
	border-color: var(--fr-danger);
	border-width: 2px;
}

.fr-manage__field {
	margin: 0 0 var(--fr-space-4);
}

.fr-manage__field .fr-label {
	display: block;
	margin-bottom: var(--fr-space-1);
}

.fr-manage__field--check {
	display: flex;
	align-items: flex-start;
	gap: var(--fr-space-2);
	min-height: 44px;
}

.fr-manage__field--check input {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	margin: 0;
}

.fr-manage__hint {
	margin: 0 0 var(--fr-space-1);
}

.fr-manage__error {
	margin: var(--fr-space-1) 0 0;
	color: var(--fr-danger);
	font-size: 0.85rem;
	font-weight: 600;
}

.fr-manage__form-error,
.fr-manage__notice {
	margin: var(--fr-space-4) 0;
}

.fr-manage__fieldset {
	margin: 0 0 var(--fr-space-5);
	padding: var(--fr-space-4);
	border: 1px solid var(--fr-border);
	border-radius: var(--fr-radius-md);
	background: var(--fr-surface);
	min-width: 0;
}

.fr-manage__fieldset legend {
	padding: 0 var(--fr-space-1);
}

.fr-manage__list {
	list-style: none;
	margin: var(--fr-space-5) 0;
	padding: 0;
	display: grid;
	gap: var(--fr-space-4);
}

.fr-manage__alert {
	padding: var(--fr-space-4);
	border: 1px solid var(--fr-border);
	border-radius: var(--fr-radius-md);
	background: var(--fr-surface);
}

.fr-manage__alert-title {
	margin: 0;
	overflow-wrap: anywhere;
}

.fr-manage__status {
	display: inline-block;
	margin: var(--fr-space-2) 0;
	padding: var(--fr-space-1) var(--fr-space-3);
	border-radius: var(--fr-radius-pill);
	border: 1px solid var(--fr-text-muted);
	color: var(--fr-text);
	font-size: 0.8rem;
	font-weight: 600;
}

.fr-manage__status--active {
	border-color: var(--fr-success);
}

.fr-manage__status--paused {
	border-style: dashed;
}

.fr-manage__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fr-space-2);
	margin-top: var(--fr-space-4);
}

.fr-manage__action-form,
.fr-manage__pager form {
	margin: 0;
}

.fr-manage__pager {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fr-space-2);
	margin: var(--fr-space-5) 0;
}

.fr-manage__danger-zone {
	margin-top: var(--fr-space-7);
	padding: var(--fr-space-4);
	border: 1px solid var(--fr-danger);
	border-radius: var(--fr-radius-md);
	background: var(--fr-surface);
}

.fr-manage__confirm {
	margin: var(--fr-space-5) 0 var(--fr-space-4);
}

.fr-btn--danger {
	background: transparent;
	border-color: var(--fr-danger);
	color: var(--fr-danger);
}

@media (max-width: 479px) {
	.fr-manage__actions .fr-btn,
	.fr-manage__actions form {
		width: 100%;
	}

	.fr-manage__actions form .fr-btn {
		width: 100%;
	}
}

/* Footer */
.fr-footer {
	background: var(--fr-surface-dark);
	color: var(--fr-text-inverse);
	padding: var(--fr-space-7) 0 var(--fr-space-5);
	margin-top: var(--fr-space-8);
}

.fr-footer__mascot {
	display: flex;
	align-items: center;
	gap: var(--fr-space-5);
	flex-wrap: wrap;
}

.fr-footer__mascot img {
	width: 96px;
}

/* Footer Navigation + Privacy Policy link — Phase 4E (DECISIONS.md D203).
   Only real, operator-assigned pages; inverse text on the dark footer,
   underlined so links are not identified by colour alone; 44px targets. */
.fr-footer__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--fr-space-2) var(--fr-space-5);
	margin-top: var(--fr-space-5);
}

.fr-footer__menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fr-space-2) var(--fr-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

.fr-footer__nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--fr-text-inverse);
	text-decoration: underline;
	text-underline-offset: 3px;
}
