/* ==========================================================================
   Components (D-58) — buttons, kickers, section head, tabs, pagination, ads, skeleton, cards.
   Colours only through tokens; type from --fs-*; motion scaled by --m; hovers gated by (hover: hover).
   ========================================================================== */

/* Type roles. Desktop uses the full scale; phones step every headline role down one notch, so the
   mobile pages read like the old design (28px Mukta headline ~ 24px Martel; 17px card titles). */
:root {
	--t-lead: var(--fs-1);      /* lead headline (Martel) */
	--t-block: var(--fs-2);     /* feature headline (Martel) */
	--t-sec: var(--fs-3);       /* section title */
	--t-l: var(--fs-4);         /* card headline with an image, dek */
	--t-dek: var(--fs-4);
	--t-s: var(--fs-5);         /* list headline */
}

@media (max-width: 639px) {
	:root {
		--t-lead: var(--fs-2);
		--t-block: var(--fs-4);
		--t-sec: var(--fs-4);
		--t-l: var(--fs-5);
		--t-dek: var(--fs-5);
	}
}

/* Category accents: kicker text and the section's top rule (light and dark pairs live in tokens.css). */
[data-cat="news"] { --cat: var(--c-news); }
[data-cat="politics"] { --cat: var(--c-politics); }
[data-cat="economy"] { --cat: var(--c-economy); }
[data-cat="society"] { --cat: var(--c-society); }
[data-cat="sports"] { --cat: var(--c-sports); }
[data-cat="entertainment"] { --cat: var(--c-entertainment); }
[data-cat="tech"] { --cat: var(--c-tech); }
[data-cat="world"] { --cat: var(--c-world); }
[data-cat="health"] { --cat: var(--c-health); }
[data-cat="opinion"] { --cat: var(--c-opinion); }

/* Buttons ----------------------------------------------------------------- */
.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--s-2);
	min-height: 44px;
	padding: 0 var(--s-5);
	border: 2px solid transparent;
	border-radius: var(--radius-lg);
	font: 700 var(--fs-6) / 1 var(--font-body);
	white-space: nowrap;
	transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-hover) ease, border-color var(--dur-hover) ease, color var(--dur-hover) ease;
}

.btn--primary { background: var(--brand-fill); color: var(--white); }
.btn--navy { background: var(--fill-selected); color: var(--white); }
.btn--secondary { border-color: var(--blue); color: var(--blue); }
.btn--ghost { border-color: var(--line-strong); color: var(--heading); }
/* Destructive actions look different from every primary action (D-57). */
.btn--danger { border-color: var(--brand-ink); background: var(--bg); color: var(--brand-ink); }

@media (hover: hover) {
	.btn--primary:hover { background: var(--brand-fill-ink); }
	.btn--navy:hover { background: var(--navy-2); }
	.btn--secondary:hover { background: var(--tint); }
	.btn--ghost:hover { border-color: var(--heading); }
	.btn--danger:hover { background: var(--brand-fill); border-color: var(--brand-fill); color: var(--white); }
}

.btn:active:not(:disabled, [aria-disabled="true"]) { transform: scale(calc(1 - 0.03 * var(--m))); }
.btn--sm { min-height: 36px; padding: 0 var(--s-4); font-size: var(--fs-7); }
.btn--sm::after { content: ""; position: absolute; inset: -6px 0; } /* 44px hit area (36 + 2 x 6 + the 2px border) */
.btn--block { width: 100%; }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: var(--disabled-opacity); cursor: not-allowed; }

/* Kicker (category label) and tag pill ------------------------------------ */
.chip {
	position: relative;
	display: inline-block;
	justify-self: start;
	min-width: 44px;
	padding-block: 2px;
	color: var(--cat, var(--blue));
	font: 700 var(--fs-7) / var(--lh-ui) var(--font-body);
	text-decoration: underline transparent;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.25em;
	transition: text-decoration-color var(--dur-hover) ease;
}

/* 44px hit area: the 25px chip plus 15px above and 4px below. The 4px below is the card body's gap, so it never
   covers the headline link that follows. */
a.chip::after { content: ""; position: absolute; inset: -15px 0 -4px; }
@media (hover: hover) { a.chip:hover { text-decoration-color: currentcolor; } }
a.chip:focus-visible { text-decoration-color: currentcolor; }

.chip--solid {
	padding: 2px 10px;
	border-radius: var(--radius-pill);
	background: var(--cat, var(--brand));
	color: var(--white);
}

/* A term colour set inline (category with no token) is dark-on-white; lift it on the dark palette. */
:root[data-theme="dark"] .chip[style*="--cat"]:not(.chip--solid) { color: color-mix(in srgb, var(--cat) 45%, var(--white)); }
:root[data-theme="dark"] .chip--solid[data-cat] { color: var(--bg); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .chip[style*="--cat"]:not(.chip--solid) { color: color-mix(in srgb, var(--cat) 45%, var(--white)); }
	:root:not([data-theme="light"]) .chip--solid[data-cat] { color: var(--bg); }
}

.on-navy .chip { color: var(--sky); }

.pill {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 var(--s-3);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-pill);
	color: var(--heading);
	font-size: var(--fs-7);
	font-weight: 700;
	white-space: nowrap;
	transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}

.pill::after { content: ""; position: absolute; inset: -5px -2px; } /* 44px hit area */
.pill:active { transform: scale(calc(1 - 0.03 * var(--m))); }
@media (hover: hover) { .pill:hover { background: var(--tint); } }
.pill[aria-current="true"],
.pill.is-active { background: var(--fill-selected); border-color: var(--fill-selected); color: var(--white); }

.pill-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
	list-style: none;
	padding: 0;
}

/* Section header: a 3px accent rule on top, the title, and a "View all" link ---- */
.section-head {
	display: flex;
	flex-wrap: wrap; /* at 200% text size "Multimedia" + "View all" no longer fit one row; the link drops below */
	align-items: baseline;
	justify-content: space-between;
	gap: var(--s-1) var(--s-4);
	margin-bottom: var(--s-4);
	padding-top: var(--s-3);
	border-top: 3px solid var(--cat, var(--c-news)); /* --c-news flips navy to sky in dark; --navy would vanish there */
}

:root[data-theme="dark"] .section-head[style*="--cat"] { border-top-color: color-mix(in srgb, var(--cat) 55%, var(--white)); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .section-head[style*="--cat"] { border-top-color: color-mix(in srgb, var(--cat) 55%, var(--white)); }
}

.section-head__title {
	color: var(--heading);
	font-size: var(--t-sec);
}

.section-head__more {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--s-1);
	color: var(--blue);
	font-size: var(--fs-7);
	font-weight: 700;
	white-space: nowrap;
	--icon-size: 16px;
}

.section-head__more::after { content: ""; position: absolute; inset: -12px -6px; }
@media (hover: hover) { .section-head__more:hover { text-decoration: underline; text-underline-offset: 0.25em; } }

/* Tabs ---------------------------------------------------------------------- */
.tabs__list {
	display: flex;
	gap: var(--s-1);
	margin-bottom: var(--s-4);
	border-bottom: 1px solid var(--line);
}

.tabs__tab {
	min-height: 44px;
	margin-bottom: -1px;
	padding: 0 var(--s-4);
	border-bottom: 3px solid transparent;
	color: var(--muted);
	font-weight: 700;
}

@media (hover: hover) { .tabs__tab:hover { color: var(--ink); } }
.tabs__tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }

.tabs--pills .tabs__list { border: 0; gap: var(--s-2); margin-bottom: var(--s-2); }
.tabs--pills .tabs__tab {
	position: relative;
	min-height: 36px;
	margin-bottom: 0;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-pill);
	color: var(--heading);
	font-size: var(--fs-7);
	transition: background-color var(--dur-hover) ease, transform var(--dur-press) var(--ease-out);
}

.tabs--pills .tabs__tab::after { content: ""; position: absolute; inset: -5px -2px; } /* 44px hit area */
.tabs--pills .tabs__tab:active { transform: scale(calc(1 - 0.03 * var(--m))); }
.tabs--pills .tabs__tab[aria-selected="true"] { background: var(--fill-selected); border-color: var(--fill-selected); color: var(--white); }
.tabs__panel[hidden] { display: none; }

/* Pagination ---------------------------------------------------------------- */
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--s-2);
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 var(--s-3);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	color: var(--heading);
	font-weight: 700;
}

@media (hover: hover) { .pagination a.page-numbers:hover { border-color: var(--heading); } }
.pagination .page-numbers.current { background: var(--fill-selected); border-color: var(--fill-selected); color: var(--white); }
.pagination .page-numbers.dots { border-color: transparent; }

/* Ad slots — fixed aspect boxes so ads never shift layout ------------------- */
.sponsor-slot,
.ad-slot {
	display: grid;
	justify-items: center;
	gap: var(--s-1);
	width: 100%;
	margin-inline: auto; /* max-width comes from the inline style (ad-slots.php): --ad-w is unitless */
}

.sponsor-slot__label,
.ad-slot__label {
	color: var(--muted);
	font: 400 var(--fs-7) / 1.4 var(--font-body);
}

.sponsor-slot__box,
.ad-slot__box {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: var(--ad-w) / var(--ad-h);
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
	color: var(--muted);
	font: 500 var(--fs-7) / 1 var(--font-ui);
	overflow: hidden;
	background: repeating-linear-gradient(135deg, var(--bg-soft) 0 10px, var(--bg) 10px 20px);
}

.sponsor-slot:not(.is-placeholder) .sponsor-slot__box,
.ad-slot:not(.is-placeholder) .ad-slot__box { background: none; border: 0; }
.sponsor-slot__box img,
.ad-slot__box img { display: block; max-width: 100%; height: auto; }

/* Placeholder link */
.sponsor-slot__placeholder-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 100%;
	height: 100%;
	text-decoration: none !important;
	color: var(--muted);
	padding: var(--s-2);
	text-align: center;
}
.sponsor-slot__dim {
	font-weight: 700;
	font-size: var(--fs-6);
	color: var(--text-muted);
}
.sponsor-slot__text {
	font-size: var(--fs-7);
	color: var(--muted);
}
.sponsor-slot__placeholder-link:hover .sponsor-slot__text {
	color: var(--blue);
}

/* The box clips its overflow, so the global ring (outside the link) never showed. A block link fills the box and
   the ring is drawn inside it: the outline itself (which forced-colors mode keeps), and a pseudo-element on top
   that adds the 2px ring plus a 2px band in the page colour, so it reads on any creative (a navy banner would
   swallow a plain blue ring). The pseudo-element is needed because the creative covers an inset shadow on the link. */
.sponsor-slot__box a,
.ad-slot__box a { position: relative; display: block; width: fit-content; max-width: 100%; } /* only the creative is clickable */
.sponsor-slot__box a:focus-visible,
.ad-slot__box a:focus-visible { outline-offset: -2px; }
.sponsor-slot__box a:focus-visible::after,
.ad-slot__box a:focus-visible::after {
	content: "";
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 0 2px var(--focus), inset 0 0 0 4px var(--bg);
	pointer-events: none;
}

.sponsor-slot--desktop,
.ad-slot--desktop,
.sponsor-slot--wide,
.ad-slot--wide { display: none; }
@media (min-width: 768px) {
	.sponsor-slot--wide,
	.ad-slot--wide { display: grid; }
}
@media (min-width: 1024px) {
	.sponsor-slot--desktop,
	.ad-slot--desktop { display: grid; }
	.sponsor-slot--mobile,
	.ad-slot--mobile { display: none; }
}

/* YouTube facade (article lead media, video hub player): poster + play; iframe only on click */
.video-facade {
	position: relative;
	display: block;
	width: 100%;
	border-radius: var(--radius);
	overflow: hidden;
}

.video-facade img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.video-facade .card__play { width: 72px; height: 72px; --icon-size: 30px; }
@media (hover: hover) { .video-facade:hover .card__play { background: var(--navy-2); } }

.embed-16x9 iframe,
.video-frame {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: var(--radius);
}

/* Save button on cards (ainn-reader, D-54): bottom-right of the card text, next to the meta line. */
.card__body:has(> .save-btn) { position: relative; padding-right: 36px; }
.save-btn {
	position: absolute;
	right: -8px;
	bottom: -10px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	color: var(--muted);
	--icon-size: 18px;
}
@media (hover: hover) { .save-btn:hover { color: var(--blue); } }
.save-btn[aria-pressed="true"] { color: var(--blue); }
.save-btn[aria-pressed="true"] .icon path,
.share__btn--save[aria-pressed="true"] .icon path { fill: currentcolor; }
.on-navy .save-btn { color: var(--on-navy-muted); }

/* Newsletter form (footer, homepage, sidebar; layout per context) */
/* A shrinkable track: with the default auto track the field's own width (about 20 characters, larger with text zoom)
   sets the column, and the form overflowed a phone-width sidebar at 200% text size. */
.newsletter-form { grid-template-columns: minmax(0, 1fr); }
.newsletter-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.newsletter-form__status { flex-basis: 100%; margin: 0; font-size: var(--fs-7); }
.newsletter-form__status:empty { display: none; }
/* Success and error must look different, not only read differently (D-57). */
.newsletter-form__status.is-success::before,
.newsletter-form__status.is-error::before { margin-right: var(--s-1); font-weight: 700; }
.newsletter-form__status.is-success::before { content: "✓"; }
.newsletter-form__status.is-error::before { content: "!"; }
.newsletter-form__status.is-error { font-weight: 700; }

/* Skeleton ------------------------------------------------------------------ */
.skeleton {
	border-radius: var(--radius);
	background: linear-gradient(90deg, var(--bg-soft) 25%, var(--line) 50%, var(--bg-soft) 75%) 0 0 / 200% 100%;
	animation: skeleton 1.4s linear infinite;
}

.skeleton--text { height: 1em; margin-block: 0.4em; }
.skeleton--media { aspect-ratio: 3 / 2; }

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

@media (prefers-reduced-motion: reduce) {
	.skeleton { animation: none; }
}

/* Live dot ------------------------------------------------------------------ */
.live-dot {
	position: relative;
	display: inline-block;
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--live);
}

/* The pulse is a ring on ::after that grows and fades. Only transform and opacity change, so it runs on the
   compositor: an idle page with a live dot does no main-thread work (a box-shadow pulse repainted every frame). */
.live-dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: 0 0 0 2px var(--live);
	opacity: 0;
	animation: live-pulse 1.6s infinite;
}

/* A section marker, not a live signal: no pulse (pulsing is kept for real live/breaking). The ticker label
   (header.css) has its own fade instead. */
.ticker__label .live-dot::after { content: none; }

@keyframes live-pulse {
	0% { opacity: 0.6; transform: scale(1); }
	70%, 100% { opacity: 0; transform: scale(2); }
}

@media (prefers-reduced-motion: reduce) {
	.live-dot::after { content: none; }
}

/* Cards ----------------------------------------------------------------------
   One template part (template-parts/card.php), variants via modifier class. */
.card {
	position: relative;
	display: grid;
	align-content: start;
	gap: var(--s-2);
	min-width: 0;
}

.card__media {
	position: relative;
	display: block;
	aspect-ratio: var(--ar, 3 / 2);
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--placeholder);
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* A 1px inset outline keeps pale photographs from bleeding into the page. */
.card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px var(--image-edge);
	pointer-events: none;
}

.card__media img { filter: brightness(var(--img-dim)); }

.card__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* an implicit auto column grows to a long word's width and runs off the card at 200% text; body's overflow-wrap then breaks the word */
	align-content: start;
	gap: var(--s-1);
	min-width: 0;
}

.card__title {
	color: var(--heading);
	font-size: var(--t-l);
	line-height: var(--lh-title);
}

.card__title a {
	padding-block: 4px; /* taller hit area without touching the line box */
	text-decoration: underline transparent;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.25em;
	transition: text-decoration-color var(--dur-hover) ease;
}

@media (hover: hover) { .card__title a:hover { text-decoration-color: currentcolor; } }
.card__title a:focus-visible { text-decoration-color: currentcolor; }

.card__excerpt {
	color: var(--text);
	font-size: var(--fs-5);
	line-height: 1.6;
	text-wrap: pretty;
}

/* The separator dot sits in the gap before each item, outside the item's box. The row clips it, so an item that
   wraps to the start of a line loses its dot instead of starting the line with one. */
.card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 calc(2 * var(--s-3) + 3px);
	overflow: hidden;
	color: var(--muted);
	font-size: var(--fs-7);
	line-height: var(--lh-ui);
}

.card__meta > * + * { position: relative; }

.card__meta > * + *::before {
	content: "";
	position: absolute;
	top: 50%;
	right: 100%;
	width: 3px;
	height: 3px;
	margin: -1.5px var(--s-3) 0 0;
	border-radius: 50%;
	background: currentcolor;
}

.card__author {
	color: var(--heading);
	font-weight: 700;
}

/* Initials avatar (no Gravatar requests) */
.avatar--initials {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: var(--size, 40px);
	height: var(--size, 40px);
	border-radius: 50%;
	background: var(--fill-selected);
	color: var(--white);
	font: 700 max(var(--fs-6), calc(var(--size, 40px) * 0.4)) / 1 var(--font-body); /* 16px on the 40px avatar, larger on hub portraits */
}

/* hero: headline first, then the 16:9 image */
.card--hero { gap: var(--s-3); }
.card--hero .card__body { gap: var(--s-3); }
.card--hero .card__title {
	font-family: var(--font-display);
	font-size: var(--t-lead);
	line-height: var(--lh-display);
}
.card--hero .card__excerpt,
.card--typo .card__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	padding-block: 2px;
	color: var(--text);
	font-size: var(--t-dek);
}
.card--hero .card__media { --ar: 16 / 9; margin-top: var(--s-2); }
.card--hero .card__body:has(> .save-btn) { padding-right: 0; } /* the headline keeps its full width; the button sits beside the byline */

/* topstory: text first, 96px thumbnail on the right */
.card--topstory {
	grid-template-columns: minmax(0, 1fr) 96px;
	gap: var(--s-4);
	align-items: start;
}
.card--topstory .card__media { --ar: 1 / 1; }
.card--topstory .card__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	padding-block: 2px;
}
.card--topstory .card__title a:focus-visible { outline-offset: -2px; }

/* feature: image, Martel headline, byline. card--wide = 2:1 crop, card--3x2, card--title-l = smaller headline */
.card--feature { gap: var(--s-3); }
.card--feature .card__media { --ar: 16 / 9; }
.card--feature.card--wide .card__media { --ar: 2 / 1; }
.card--feature.card--3x2 .card__media { --ar: 3 / 2; }
.card--feature .card__title,
.card--typo .card__title,
.card--video .card__title {
	font-family: var(--font-display);
	font-size: var(--t-block);
	line-height: var(--lh-title);
}
.card--title-l .card__title {
	font-family: var(--font-body);
	font-size: var(--t-l);
}

/* typo: no image; kicker, Martel headline, dek */
.card--typo .card__body { gap: var(--s-2); }
.card--typo .card__excerpt { font-size: var(--fs-5); }

/* compact: thumb left */
.card--compact {
	grid-template-columns: 112px minmax(0, 1fr);
	gap: var(--s-3);
}
.card--compact .card__title { font-size: var(--t-s); }

/* row: listing pages */
.card--row {
	grid-template-columns: 120px minmax(0, 1fr);
	gap: var(--s-3);
}
.card--row .card__title { font-size: var(--t-s); }
.card--row .card__excerpt { display: none; }
@media (min-width: 768px) {
	.card--row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s-5); }
	.card--row .card__title { font-size: var(--t-l); }
	.card--row .card__excerpt { display: block; }
}

/* list: ranked, muted numerals (not red) */
.card--list {
	grid-template-columns: 40px minmax(0, 1fr);
	gap: var(--s-2);
	align-items: baseline;
}
.card--list .card__num {
	color: var(--muted);
	font-family: var(--font-display);
	font-size: var(--fs-2);
	line-height: 1;
}
.card--list .card__title { font-size: var(--t-s); }

/* timeline: time column + headline (ताजा समाचार, provinces). Stories from today show a clock time (32-40px); older
   ones show a relative label. The column is sized in rem (it grows with the text) to hold the labels that occur:
   "५९ मिनेट अघि" (69px) in Nepali; "23 hours ago" (90px) and "Sep 22, 2026" (91px) in English. The rare longest
   label ("59 minutes ago", 105px) wraps to a second line inside the column instead of touching the headline. */
.card--timeline { --time-col: 4.5rem; }
:lang(en) .card--timeline { --time-col: 6rem; }
.card--timeline .card__body {
	grid-template-columns: var(--time-col) minmax(0, 1fr);
	gap: 0 var(--s-3);
	align-items: baseline;
}
.card--timeline .card__time {
	padding-top: 2px;
	color: var(--muted);
	font-size: var(--fs-7);
	font-weight: 700;
	line-height: var(--lh-ui);
}
.card--timeline .card__title { font-size: var(--t-s); }
.card--timeline .card__live { grid-column: 2; }

/* text: title only */
.card--text .card__title { font-size: var(--t-s); }

/* line: kicker · headline · time on one row (थप समाचार feed) */
.card--line .card__title { font-size: var(--t-s); }
/* The time column holds "५९ मिनेट अघि" (69px) or "23 hours ago" (90px); the 16px gap absorbs the rest. */
.card--line { --time-col: 5.5rem; }
:lang(en) .card--line { --time-col: 6.5rem; }
@media (min-width: 640px) {
	.card--line .card__body {
		grid-template-columns: 96px minmax(0, 1fr) var(--time-col);
		align-items: baseline;
		gap: 0 var(--s-4);
	}
	.card--line .card__meta { justify-content: flex-end; white-space: nowrap; }
}

/* photo: 96px thumb + kicker + headline */
.card--photo {
	grid-template-columns: 96px minmax(0, 1fr);
	gap: var(--s-4);
	align-items: center;
}
.card--photo .card__media { --ar: 1 / 1; }

/* vrow: video list row, headline + duration */
.card--vrow .card__body {
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0 var(--s-3);
	align-items: baseline;
}
.card--vrow .card__title { font-size: var(--t-s); }
.card__dur {
	color: var(--muted);
	font-size: var(--fs-7);
	font-weight: 700;
	white-space: nowrap;
}

/* Compact cards carry smaller video/photo overlays. */
.card--compact .card__play { width: 32px; height: 32px; --icon-size: 14px; }
.card--compact .card__badge { display: none; }

/* opinion: quote glyph, headline, author */
.card--opinion {
	gap: var(--s-3);
	padding: var(--s-5);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	background: var(--bg);
}
.card--opinion .card__body { gap: var(--s-3); }
.card__quote {
	height: 24px;
	color: var(--cat, var(--c-opinion));
	font-family: var(--font-display);
	font-size: var(--fs-2);
	line-height: 0.8;
}
.card--opinion .card__title { font-size: var(--t-l); }
.card__by {
	display: flex;
	align-items: center;
	gap: var(--s-3);
	margin-top: var(--s-2);
}

/* video / photo overlays */
.card--video .card__media { --ar: 16 / 9; }

.card__play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: auto;
	border-radius: 50%;
	background: var(--navy);
	background: color-mix(in srgb, var(--navy) 82%, transparent);
	color: var(--white);
	--icon-size: 24px;
}
.card__play .icon { margin-left: 3px; }

.card__badge {
	position: absolute;
	right: var(--s-2);
	bottom: var(--s-2);
	display: inline-flex;
	align-items: center;
	gap: var(--s-1);
	padding: 2px var(--s-2);
	border-radius: var(--radius);
	background: var(--navy);
	background: color-mix(in srgb, var(--navy) 86%, transparent);
	color: var(--white);
	font: 700 var(--fs-7) / var(--lh-ui) var(--font-ui);
	--icon-size: 14px;
}

.card__badge--live { left: var(--s-2); right: auto; top: var(--s-2); bottom: auto; background: var(--live-fill); }
.card__badge--live .live-dot { background: var(--white); }
.card__live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--live);
	font: 700 var(--fs-7) / var(--lh-ui) var(--font-ui);
}

/* Cards on dark bands (navy sections) */
.on-navy .card__title,
.on-navy .card__title a { color: var(--white); }
.on-navy .card__meta,
.on-navy .card__excerpt { color: var(--on-navy-muted); }
.on-navy .card__media { --image-edge: color-mix(in srgb, var(--white) 18%, transparent); }

/* Windows High Contrast (forced colors) drops backgrounds and box-shadows, which is how the selected tab,
   filter pill, current page and current language are marked. Give each a system-colour fill instead, and the
   underlined tab a thick underline. */
@media (forced-colors: active) {
	.tabs--pills .tabs__tab[aria-selected="true"],
	.pill.is-active,
	.pill[aria-current="true"],
	.pagination .page-numbers.current,
	.lang-switch a[aria-current="true"] {
		forced-color-adjust: none;
		background: Highlight;
		border-color: Highlight;
		color: HighlightText;
	}

	.tabs:not(.tabs--pills) .tabs__tab[aria-selected="true"] {
		text-decoration: underline;
		text-decoration-thickness: 3px;
		text-underline-offset: 0.3em;
	}
}
