/* ==========================================================================
   Al-Azhar Academy — components.css
   Every reusable section that appears on a page: heroes, cards, tiles,
   testimonials, campus cards, FAQ, tables, notices, maps, prose.
   Appearance only — motion lives in animations.css.
   ========================================================================== */

/* -------------------------------------------------------------------------
   Heroes
   ------------------------------------------------------------------------- */
.hero {
	padding-block: clamp(2.75rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
}

.hero__inner {
	display: grid;
	gap: clamp(2.25rem, 5vw, 3.5rem);
	align-items: center;
}

@media (min-width: 64em) {
	.hero__inner {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	}
}

.hero__title {
	max-width: 22ch;
}

.hero__facts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-6);
	padding-top: var(--space-5);
	border-top: 1px solid var(--border);
	list-style: none;
}

.hero__facts li {
	font-size: var(--fs-300);
	color: var(--text-muted);
}

.hero__facts strong {
	display: block;
	margin-bottom: var(--space-1);
	font-family: var(--font-heading);
	font-size: var(--fs-500);
	font-weight: 600;
	color: var(--text);
}

.hero__media {
	display: grid;
	gap: var(--space-4);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 48em) {
	.hero__media {
		grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
		align-items: start;
	}
}

.page-hero {
	padding-block: clamp(2.5rem, 5vw, 3.75rem) clamp(2.5rem, 5vw, 3.5rem);
	border-bottom: 1px solid var(--border);
}

.page-hero__inner {
	max-width: 46rem;
}

/* -------------------------------------------------------------------------
   Media frames
   ------------------------------------------------------------------------- */
.media-frame {
	position: relative;
	overflow: hidden;
	margin: 0;
	background-color: var(--surface-muted);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
}

.media-frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.media-frame--hero {
	aspect-ratio: 4 / 3;
}

.media-frame--tall {
	aspect-ratio: 3 / 4;
}

.media-frame--square {
	aspect-ratio: 1 / 1;
}

.media-frame--wide {
	aspect-ratio: 16 / 9;
}

.media-frame__caption {
	padding: var(--space-3) var(--space-4);
	font-size: var(--fs-200);
	color: var(--text-subtle);
	background-color: var(--surface);
	border-top: 1px solid var(--border);
}

/* -------------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------------- */
/* The "premium card" edge: an opaque fill clipped to the padding box over a
   hairline gradient clipped to the border box. The ring therefore picks up the
   gradient while the content sits on a clean surface. */
.card {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding: var(--space-6);
	border: 1px solid transparent;
	border-radius: var(--radius-lg);
	background-color: var(--surface);
	background-image: linear-gradient(var(--surface), var(--surface)), var(--hairline);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	box-shadow: var(--shadow-sm);
}

.card::after,
.tile::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	box-shadow: var(--shadow-md);
	opacity: 0;
	pointer-events: none;
}

.card__icon {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	margin-bottom: var(--space-1);
	background-color: var(--accent-050);
	border: 1px solid var(--accent-100);
	border-radius: var(--radius-sm);
	color: var(--accent-700);
}

.card__icon svg {
	width: 1.35rem;
	height: 1.35rem;
}

.card__title {
	font-family: var(--font-heading);
	font-size: var(--fs-500);
	font-weight: 600;
	line-height: var(--lh-snug);
}

.card__text {
	font-size: var(--fs-300);
	color: var(--text-muted);
}

.card__link {
	margin-top: auto;
	padding-top: var(--space-2);
	font-size: var(--fs-300);
}

.card__meta {
	font-family: var(--font-label);
	font-size: var(--fs-100);
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
	color: var(--text-subtle);
}

/* -------------------------------------------------------------------------
   Tiles (media on top, body below)
   ------------------------------------------------------------------------- */
.tile {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid transparent;
	border-radius: var(--radius-lg);
	background-color: var(--surface);
	background-image: linear-gradient(var(--surface), var(--surface)), var(--hairline);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	box-shadow: var(--shadow-sm);
}

.tile__media {
	aspect-ratio: 16 / 10;
	background-color: var(--surface-muted);
}

.tile__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tile__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--space-3);
	padding: var(--space-6);
}

.tile__title {
	font-family: var(--font-heading);
	font-size: var(--fs-500);
	font-weight: 600;
}

.tile__text {
	font-size: var(--fs-300);
	color: var(--text-muted);
}

.tile__foot {
	margin-top: auto;
	padding-top: var(--space-2);
}

/* -------------------------------------------------------------------------
   Lists
   ------------------------------------------------------------------------- */
.bullets,
.checklist {
	display: grid;
	gap: var(--space-2);
	list-style: none;
}

.bullets li {
	position: relative;
	padding-left: 1.15rem;
	font-size: var(--fs-300);
	color: var(--text-muted);
}

.bullets li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.58em;
	width: 0.35rem;
	height: 0.35rem;
	border-radius: 50%;
	background-color: var(--accent-500);
}

.checklist li {
	display: flex;
	gap: var(--space-3);
	font-size: var(--fs-300);
	color: var(--text-muted);
}

.checklist svg {
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
	margin-top: 0.22rem;
	color: var(--accent-600);
}

/* -------------------------------------------------------------------------
   Trust bar
   ------------------------------------------------------------------------- */
.trust-bar {
	padding-block: var(--space-5);
	background-color: var(--glass-bg-strong);
	border-block: 1px solid var(--border);
}

@supports (backdrop-filter: blur(6px)) {
	.trust-bar {
		background-color: var(--glass-bg);
		backdrop-filter: blur(10px) saturate(1.4);
		-webkit-backdrop-filter: blur(10px) saturate(1.4);
	}
}

.trust-list {
	display: grid;
	gap: var(--space-4);
	list-style: none;
}

@media (min-width: 48em) {
	.trust-list {
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
	}
}

.trust-list li {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	font-size: var(--fs-300);
	font-weight: 500;
	color: var(--text-muted);
}

.trust-list svg {
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
	color: var(--accent-600);
}

/* -------------------------------------------------------------------------
   Stats
   ------------------------------------------------------------------------- */
.stat {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding-top: var(--space-5);
	border-top: 3px solid var(--accent-600);
	box-shadow: 0 -1px 0 var(--accent-100);
}

.stat__value {
	font-family: var(--font-heading);
	font-size: var(--fs-700);
	font-weight: 600;
	line-height: 1;
}

.stat__label {
	font-size: var(--fs-300);
	color: var(--text-muted);
}

/* -------------------------------------------------------------------------
   Testimonials
   ------------------------------------------------------------------------- */
/* Testimonials: a quotation mark drawn in CSS, so the card needs no extra
   markup and the copy stays selectable. */
.quote {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--space-5);
	padding: var(--space-6);
	border: 1px solid transparent;
	border-radius: var(--radius-lg);
	background-color: var(--surface);
	background-image: linear-gradient(var(--surface), var(--surface)), var(--hairline-strong);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	box-shadow: var(--shadow-sm);
}

.quote::before {
	content: '\201C';
	position: absolute;
	top: var(--space-2);
	right: var(--space-5);
	font-family: var(--font-display);
	font-size: 4.5rem;
	line-height: 1;
	color: var(--accent-100);
	pointer-events: none;
}

.quote__text {
	font-size: var(--fs-450);
	line-height: var(--lh-relaxed);
	color: var(--text);
}

.quote__foot {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-top: auto;
	padding-top: var(--space-2);
}

.quote__avatar {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	flex: none;
	background-color: var(--accent-050);
	border: 1px solid var(--accent-100);
	border-radius: 50%;
	font-family: var(--font-heading);
	font-size: var(--fs-300);
	font-weight: 600;
	color: var(--accent-700);
}

.quote__name {
	display: block;
	font-size: var(--fs-300);
	font-weight: 600;
}

.quote__role {
	display: block;
	font-size: var(--fs-200);
	color: var(--text-subtle);
}

/* -------------------------------------------------------------------------
   Campus cards
   ------------------------------------------------------------------------- */
.campus-card {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid transparent;
	border-radius: var(--radius-xl);
	background-color: var(--surface);
	background-image: linear-gradient(var(--surface), var(--surface)), var(--hairline);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	box-shadow: var(--shadow-sm);
}

.campus-card__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: var(--surface-muted);
}

.campus-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.campus-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--space-5);
	padding: var(--space-6);
}

.campus-card__meta {
	display: grid;
	gap: var(--space-3);
	list-style: none;
}

.campus-card__meta li {
	display: flex;
	gap: var(--space-3);
	font-size: var(--fs-300);
	color: var(--text-muted);
}

.campus-card__meta svg {
	flex: none;
	width: 1.05rem;
	height: 1.05rem;
	margin-top: 0.22rem;
	color: var(--accent-600);
}

.campus-card__principal {
	padding: var(--space-4) var(--space-5);
	background-color: var(--surface-sunken);
	border-left: 3px solid var(--accent-200);
	border-radius: var(--radius-xs);
	font-size: var(--fs-300);
	color: var(--text-muted);
}

.campus-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	margin-top: auto;
}

/* -------------------------------------------------------------------------
   Call to action band
   ------------------------------------------------------------------------- */
/* The inverse panel: a deep gradient, a warm corner glow, and a hairline of
   light along the top edge. It is the same panel in both themes. */
.cta-band {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-6);
	overflow: hidden;
	padding: clamp(2rem, 5vw, 3.5rem);
	background-color: var(--surface-inverse);
	background-image: radial-gradient(120% 140% at 92% -10%, rgba(242, 163, 60, 0.28) 0%, rgba(242, 163, 60, 0) 55%),
		radial-gradient(90% 130% at 4% 110%, rgba(51, 121, 255, 0.34) 0%, rgba(51, 121, 255, 0) 60%),
		var(--grad-inverse-panel);
	color: var(--text-inverse-muted);
	border-radius: var(--radius-2xl);
	box-shadow: var(--shadow-xl);
}

.cta-band h2 {
	color: var(--white);
}

.cta-band__copy {
	max-width: 44rem;
}

@media (min-width: 64em) {
	.cta-band {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-10);
	}

	.cta-band__actions {
		flex: none;
	}
}

/* -------------------------------------------------------------------------
   Notices, callouts and steps
   ------------------------------------------------------------------------- */
.notice {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding: var(--space-5) var(--space-6);
	border: 1px solid transparent;
	border-radius: var(--radius-lg);
	background-color: var(--surface);
	background-image: linear-gradient(var(--surface), var(--surface)), var(--hairline);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	box-shadow: var(--shadow-xs);
}

/* The accent tick sits on the edge rather than being a real border, so the
   gradient hairline above stays unbroken. */
.notice::before {
	content: '';
	position: absolute;
	inset-block: var(--space-4);
	left: 0;
	width: 3px;
	border-radius: var(--radius-pill);
	background-image: linear-gradient(180deg, var(--accent-600), var(--sun-500));
}

.notice__date {
	font-family: var(--font-label);
	font-size: var(--fs-100);
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
	color: var(--text-subtle);
}

.notice__title {
	font-family: var(--font-heading);
	font-size: var(--fs-450);
	font-weight: 600;
}

.notice__text {
	font-size: var(--fs-300);
	color: var(--text-muted);
}

.note {
	display: flex;
	gap: var(--space-3);
	padding: var(--space-5);
	background-color: var(--accent-050);
	border: 1px solid var(--accent-100);
	border-radius: var(--radius-sm);
	font-size: var(--fs-300);
	color: var(--text-muted);
}

.note svg {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.15rem;
	color: var(--accent-600);
}

.steps {
	display: grid;
	gap: var(--space-8);
	list-style: none;
}

@media (min-width: 48em) {
	.steps {
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
		gap: var(--space-6);
	}
}

.step {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding-top: var(--space-5);
	border-top: 2px solid var(--border);
}

.step__num {
	font-family: var(--font-label);
	font-size: var(--fs-100);
	font-weight: 500;
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
	color: var(--accent-700);
}

.step__title {
	font-family: var(--font-heading);
	font-size: var(--fs-500);
	font-weight: 600;
}

.step__text {
	font-size: var(--fs-300);
	color: var(--text-muted);
}

/* -------------------------------------------------------------------------
   FAQ (native <details>, no JS required)
   ------------------------------------------------------------------------- */
.faq-list {
	display: grid;
	gap: var(--space-3);
}

.faq {
	border: 1px solid transparent;
	border-radius: var(--radius-lg);
	background-color: var(--surface);
	background-image: linear-gradient(var(--surface), var(--surface)), var(--hairline);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	box-shadow: var(--shadow-xs);
}

.faq[open] {
	background-image: linear-gradient(var(--surface), var(--surface)), var(--hairline-strong);
	box-shadow: var(--shadow-sm);
}

.faq__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	min-height: 3.5rem;
	padding: var(--space-4) var(--space-5);
	font-family: var(--font-heading);
	font-size: var(--fs-450);
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.faq__summary::-webkit-details-marker {
	display: none;
}

.faq__summary::marker {
	content: '';
}

.faq__icon {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	color: var(--text-subtle);
}

.faq[open] .faq__icon {
	transform: rotate(180deg);
	color: var(--accent-600);
}

.faq__panel {
	padding: 0 var(--space-5) var(--space-5);
	font-size: var(--fs-400);
	color: var(--text-muted);
}

.faq__panel > * + * {
	margin-top: var(--space-3);
}

/* -------------------------------------------------------------------------
   Tables
   ------------------------------------------------------------------------- */
.table-wrap {
	overflow-x: auto;
	background-color: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--fs-300);
}

.table caption {
	padding: var(--space-4) var(--space-5) 0;
	text-align: left;
	font-size: var(--fs-300);
	color: var(--text-subtle);
}

.table th,
.table td {
	padding: var(--space-4) var(--space-5);
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--border);
}

.table th {
	background-color: var(--surface-sunken);
	font-family: var(--font-label);
	font-size: var(--fs-100);
	font-weight: 500;
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
	color: var(--text-subtle);
	white-space: nowrap;
}

.table tbody tr:last-child td {
	border-bottom: 0;
}

@media (hover: hover) and (pointer: fine) {
	.table tbody tr:hover {
		background-color: var(--surface-sunken);
	}
}

/* -------------------------------------------------------------------------
   Contact details
   ------------------------------------------------------------------------- */
.contact-list {
	display: grid;
	gap: var(--space-5);
	list-style: none;
}

.contact-list li {
	display: flex;
	gap: var(--space-4);
}

.contact-list svg {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	margin-top: 0.25rem;
	color: var(--accent-600);
}

.contact-list__label {
	display: block;
	margin-bottom: var(--space-1);
	font-family: var(--font-label);
	font-size: var(--fs-100);
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
	color: var(--text-subtle);
}

.contact-list__value {
	font-size: var(--fs-400);
	color: var(--text);
}

/* Placeholder panel shown where a Google Maps embed will be dropped in. */
.map-panel {
	display: grid;
	place-items: center;
	gap: var(--space-3);
	min-height: 18rem;
	padding: var(--space-8);
	text-align: center;
	background-color: var(--surface-muted);
	background-image:
		linear-gradient(to right, rgba(10, 21, 38, 0.05) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(10, 21, 38, 0.05) 1px, transparent 1px);
	background-size: 2rem 2rem;
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius-md);
	font-size: var(--fs-300);
	color: var(--text-subtle);
}

.map-panel svg {
	width: 1.75rem;
	height: 1.75rem;
	color: var(--accent-600);
}

/* -------------------------------------------------------------------------
   Photo grid (campus life, life at Al-Azhar Academy)
   ------------------------------------------------------------------------- */
.photo-grid {
	display: grid;
	gap: var(--space-5);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.photo-grid > :first-child {
	grid-column: auto;
}

@media (min-width: 64em) {
	.photo-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.photo-grid > :first-child {
		grid-column: span 2;
		grid-row: span 2;
	}
}

/* -------------------------------------------------------------------------
   Long-form prose (privacy, safeguarding)
   ------------------------------------------------------------------------- */
.prose {
	max-width: var(--measure);
	color: var(--text-muted);
}

.prose > * + * {
	margin-top: var(--space-5);
}

.prose h2 {
	margin-top: var(--space-12);
	font-size: var(--fs-600);
	color: var(--text);
}

.prose h3 {
	margin-top: var(--space-8);
	font-size: var(--fs-500);
	color: var(--text);
}

.prose ul {
	display: grid;
	gap: var(--space-2);
	padding-left: 1.25rem;
	list-style: disc;
}

.prose li::marker {
	color: var(--accent-500);
}

.prose__updated {
	font-family: var(--font-label);
	font-size: var(--fs-100);
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
	color: var(--text-subtle);
}

/* -------------------------------------------------------------------------
   Error page
   ------------------------------------------------------------------------- */
.error-page {
	display: grid;
	place-items: center;
	min-height: 60vh;
	padding-block: var(--section-y);
	text-align: center;
}

.error-page__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-5);
	max-width: 34rem;
}

.error-page__code {
	font-family: var(--font-label);
	font-size: var(--fs-100);
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
	color: var(--accent-700);
}

.error-page__code--error {
	color: var(--danger);
}

.error-page__code--success {
	color: var(--success);
}





/* ==========================================================================
   Premium layer
   The pieces borrowed from the UI design bundle, adapted to this site's
   tokens and to its own accessibility rules: nothing here animates on its
   own (motion lives in animations.css), and every control is a real button
   or link.
   ========================================================================== */

/* -------------------------------------------------------------------------
   Ambient page canvas
   A soft two-colour wash behind the first screen. Purely decorative; the
   ::after layer is the one that drifts.
   ------------------------------------------------------------------------- */
.canvas {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.canvas::before,
.canvas::after {
	content: '';
	position: absolute;
	inset: -10% -5%;
	z-index: -1;
	pointer-events: none;
}

.canvas::before {
	background-image: var(--wash-hero);
}

.canvas::after {
	background-image: radial-gradient(60% 60% at 70% 40%, var(--glass-tint) 0%, rgba(255, 255, 255, 0) 70%);
}

/* -------------------------------------------------------------------------
   Gradient ink for the largest display type
   Guarded: a browser that cannot clip a background to text would otherwise
   paint the fill and hide the words entirely.
   ------------------------------------------------------------------------- */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.hero__title,
	.page-hero__inner h1,
	.stat__value {
		background-image: var(--grad-display-ink);
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
	}
}

/* -------------------------------------------------------------------------
   Flip cards
   Front and back share a single grid cell, so the card is always as tall as
   its longer face and nothing is clipped. The rotation is a transform on the
   face group and only ever happens on a real click or keypress — never on
   hover — so a stray pointer can never hide content.
   ------------------------------------------------------------------------- */
.flip-card {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	perspective: 1200px;
}

.flip-card__group {
	flex: 1;
	display: grid;
	transform-style: preserve-3d;
}

.flip-card__face {
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	padding: var(--space-6);
	border: 1px solid transparent;
	border-radius: var(--radius-lg);
	background-color: var(--surface);
	background-image: linear-gradient(var(--surface), var(--surface)), var(--hairline);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	box-shadow: var(--shadow-sm);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.flip-card__face--back {
	transform: rotateY(180deg);
	background-image: linear-gradient(var(--surface-muted), var(--surface-muted)), var(--hairline-strong);
}

.flip-card.is-flipped .flip-card__group {
	transform: rotateY(180deg);
}

.flip-card__toggle {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: 2.25rem;
	padding: 0.4rem 0.95rem 0.4rem 0.75rem;
	background-color: var(--accent-050);
	border: 1px solid var(--accent-100);
	border-radius: var(--radius-pill);
	font-family: var(--font-heading);
	font-size: var(--fs-200);
	font-weight: 600;
	color: var(--accent-700);
	cursor: pointer;
}


/* -------------------------------------------------------------------------
   Quick-action button (the floating menu)
   Fixed to the bottom-right corner on every page. Closed by default, so it is
   never in the way; each action is a labelled pill that springs out of the
   trigger with a short stagger. Hidden while the mobile nav sheet is open and
   when printing.
   ------------------------------------------------------------------------- */
/* The menu does nothing without JavaScript, so it is only laid out once the
   document is known to be scripted — the same gate the reveal animations use. */
.fab {
	position: fixed;
	right: max(var(--space-5), env(safe-area-inset-right));
	bottom: max(var(--space-5), env(safe-area-inset-bottom));
	z-index: var(--z-fab);
	display: none;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--space-3);
}

html.js .fab {
	display: flex;
}

.fab__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--space-2);
}

.fab__action {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3);
	min-height: var(--tap-target);
	padding: 0.5rem 0.5rem 0.5rem 1rem;
	background-color: var(--surface);
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	background-image: linear-gradient(var(--surface), var(--surface)), var(--hairline-strong);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	box-shadow: var(--shadow-lg);
	font-family: var(--font-heading);
	font-size: var(--fs-200);
	font-weight: 600;
	color: var(--text);
	text-decoration: none;
	opacity: 0;
	pointer-events: none;
	transform: translateY(0.85rem) scale(0.82);
	transform-origin: 100% 50%;
}

.fab.is-open .fab__action {
	opacity: 1;
	pointer-events: auto;
	transform: none;
}

.fab__action:hover {
	color: var(--accent-700);
}

.fab__action-icon {
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	flex: none;
	border-radius: 50%;
	background-image: var(--grad-primary);
	box-shadow: var(--shadow-accent);
	color: var(--white);
}

.fab__action-icon svg {
	width: 1rem;
	height: 1rem;
}

.fab__trigger {
	display: inline-grid;
	place-items: center;
	width: 3.5rem;
	height: 3.5rem;
	padding: 0;
	background-image: var(--grad-primary);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	box-shadow: var(--shadow-fab), var(--shadow-inset-top);
	color: var(--white);
	cursor: pointer;
}

.fab__trigger svg {
	width: 1.5rem;
	height: 1.5rem;
}

/* The sheet's own backdrop sits above this, so getting out of the way is the
   least confusing behaviour. */
body.is-nav-open .fab {
	visibility: hidden;
	opacity: 0;
}

@media print {
	.fab,
	.screen-only {
		display: none;
	}
}

@media (min-width: 64em) {
	.fab {
		bottom: var(--space-8);
		right: var(--space-8);
	}
}

.flip-card__toggle:hover {
	background-color: var(--accent-100);
}

.flip-card__toggle svg {
	width: 0.9rem;
	height: 0.9rem;
	flex: none;
}

.flip-card__face--back .card__text {
	color: var(--text-muted);
}
