/* ============================================================
   Site chrome — header, footer, brand, icons. Every page.
   Consumes var(--bbc-*) only.

   The identity in one sentence: a raspberry line, drawn like a
   transit-map route, that ends at a front door. It appears as the
   thread across the top of every page, under the current nav item,
   along the top of the footer, and through every illustration.
   ============================================================ */

/* ---- Icons (base; the plugin's results.css repeats this so the grid
   still works if the theme is ever switched) ------------------------ */
.bbc-ico {
	width: 1.15em;
	height: 1.15em;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -0.2em;
}

/* ---- The thread: the line starts at the top of every page ---------- */
body::before {
	content: "";
	display: block;
	height: 3px;
	background: var(--bbc-line);
}

/* ---- Brand lockup ---------------------------------------------------- */
.bbc-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--bbc-text);
	text-decoration: none;
}
.bbc-brand:visited { color: var(--bbc-text); }
.bbc-brand__mark {
	width: 2.25rem;
	height: 2.25rem;
	flex: none;
	border-radius: 9px;
}
.bbc-brand__word {
	font-family: var(--bbc-font-sans);
	font-size: 1.3rem;
	font-weight: 680;
	letter-spacing: -0.03em;
	line-height: 1;
}
.bbc-brand__tld { color: var(--bbc-brand-primary); }
.bbc-brand:hover .bbc-brand__word { text-decoration: none; }

/* ---- Header ---------------------------------------------------------- */
.bbc-site-header {
	background: var(--bbc-surface);
	border-bottom: 1px solid var(--bbc-border);
	position: relative;
	z-index: 20;
}
.bbc-site-header__inner {
	max-width: 76rem;
	margin-inline: auto;
	padding-inline: var(--bbc-space-4);
	min-height: var(--bbc-header-h);
	display: flex;
	align-items: center;
	gap: var(--bbc-space-5);
}
.bbc-nav {
	display: flex;
	align-items: center;
	gap: var(--bbc-space-5);
	margin-left: auto;
}
.bbc-nav__list {
	display: flex;
	align-items: center;
	gap: var(--bbc-space-1);
	list-style: none;
	margin: 0;
	padding: 0;
}
.bbc-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: var(--bbc-tap-min);
	padding-inline: var(--bbc-space-3);
	font-family: var(--bbc-font-sans);
	font-size: var(--bbc-text-sm);
	font-weight: var(--bbc-weight-medium);
	color: var(--bbc-text-muted);
	text-decoration: none;
	border-radius: var(--bbc-radius-1);
	position: relative;
}
.bbc-nav__link:visited { color: var(--bbc-text-muted); }
.bbc-nav__link .bbc-ico { color: var(--bbc-brand-primary); opacity: .8; }
.bbc-nav__link:hover { color: var(--bbc-text); background: var(--bbc-surface-2); }
/* Current section: the line runs under it, ending in a node. */
.bbc-nav__link[aria-current="page"] { color: var(--bbc-text); }
.bbc-nav__link[aria-current="page"]::after {
	content: "";
	position: absolute;
	left: var(--bbc-space-3);
	right: var(--bbc-space-3);
	bottom: 4px;
	height: 3px;
	border-radius: 2px;
	background:
		radial-gradient(circle, var(--bbc-line) 0 3.5px, transparent 4px) right center / 9px 9px no-repeat,
		linear-gradient(var(--bbc-line), var(--bbc-line)) left center / calc(100% - 4px) 3px no-repeat;
	height: 9px;
	bottom: 1px;
}

.bbc-site-header__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: var(--bbc-tap-min);
	padding-inline: var(--bbc-space-4);
	border-radius: var(--bbc-radius-1);
	background: var(--bbc-cta-bg);
	color: var(--bbc-cta-fg);
	font-family: var(--bbc-font-sans);
	font-size: var(--bbc-text-sm);
	font-weight: var(--bbc-weight-semi);
	text-decoration: none;
	white-space: nowrap;
	transition: background var(--bbc-dur-1) var(--bbc-ease);
}
.bbc-site-header__cta:visited { color: var(--bbc-cta-fg); }
.bbc-site-header__cta:hover { background: var(--bbc-cta-bg-hover); color: var(--bbc-cta-fg); }

.bbc-nav-toggle {
	display: none;
	margin-left: auto;
	width: var(--bbc-tap-min);
	height: var(--bbc-tap-min);
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--bbc-border-strong);
	border-radius: var(--bbc-radius-1);
	color: var(--bbc-text);
	padding: 0;
	cursor: pointer;
}
.bbc-nav-toggle .bbc-ico { width: 1.4rem; height: 1.4rem; }
.bbc-nav-toggle__close { display: none; }
.bbc-nav-toggle[aria-expanded="true"] .bbc-nav-toggle__open { display: none; }
.bbc-nav-toggle[aria-expanded="true"] .bbc-nav-toggle__close { display: block; }

@media (max-width: 62rem) {
	.bbc-site-header__inner { flex-wrap: wrap; gap: var(--bbc-space-3); padding-block: var(--bbc-space-2); }
	/* Without script the nav stays visible, stacked under the brand. */
	.bbc-nav { width: 100%; flex-wrap: wrap; margin-left: 0; gap: var(--bbc-space-2); }
	.bbc-nav__list { flex-wrap: wrap; }
	.bbc-js .bbc-nav-toggle { display: inline-flex; }
	.bbc-js .bbc-nav { display: none; }
	.bbc-js .bbc-nav.is-open {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		padding-block: var(--bbc-space-3) var(--bbc-space-4);
		border-top: 1px solid var(--bbc-border);
	}
	.bbc-js .bbc-nav.is-open .bbc-nav__list { flex-direction: column; align-items: stretch; }
	.bbc-js .bbc-nav.is-open .bbc-nav__link { font-size: var(--bbc-text-base); padding-inline: var(--bbc-space-2); }
	.bbc-nav__link[aria-current="page"]::after { left: var(--bbc-space-2); right: auto; width: 3rem; }
	.bbc-site-header__cta { justify-content: center; }
	.bbc-brand__word { font-size: 1.15rem; }
	.bbc-brand__mark { width: 2rem; height: 2rem; }
}

/* ---- Shared small furniture ------------------------------------------ */
.bbc-eyebrow {
	font-family: var(--bbc-font-sans);
	font-size: var(--bbc-text-sm);
	font-weight: var(--bbc-weight-semi);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bbc-brand-primary);
	margin: 0 0 var(--bbc-space-3);
}

/* Monogram tile for a provider with no logo: initials on its tile colour. */
.bbc-monogram {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-family: var(--bbc-font-serif);
	font-size: 1.35rem;
	font-weight: var(--bbc-weight-bold);
	letter-spacing: -0.02em;
	color: var(--bbc-brand-primary);
	background: var(--bbc-fun-rose-bg);
	border-radius: inherit;
}
.bbc-tile-1 .bbc-monogram { color: var(--bbc-fun-teal-fg);   background: var(--bbc-fun-teal-bg); }
.bbc-tile-2 .bbc-monogram { color: var(--bbc-fun-amber-fg);  background: var(--bbc-fun-amber-bg); }
.bbc-tile-3 .bbc-monogram { color: var(--bbc-fun-violet-fg); background: var(--bbc-fun-violet-bg); }
.bbc-tile-4 .bbc-monogram { color: var(--bbc-fun-green-fg);  background: var(--bbc-fun-green-bg); }
.bbc-tile-5 .bbc-monogram { color: var(--bbc-fun-sky-fg);    background: var(--bbc-fun-sky-bg); }

/* A logo drawn for a dark header gets a dark tile, wherever it appears. */
.bbc-deal__logo--dark,
.bbc-isp__logo--dark,
.bbc-dir__logo--dark,
.bbc-local__logo--dark {
	background: var(--bbc-grey-900) !important;
	border-color: var(--bbc-grey-900) !important;
}

/* ---- Footer ---------------------------------------------------------- */
.bbc-site-footer {
	background: var(--bbc-footer-bg);
	color: var(--bbc-footer-fg);
	margin-top: var(--bbc-space-9);
	font-family: var(--bbc-font-sans);
}
/* The line across the top of the footer, with three stops. Drawn in CSS
   rather than a stretched SVG so the nodes stay round at every width. */
.bbc-site-footer__route {
	position: relative;
	height: 48px;
	margin-right: 7%;
}
.bbc-site-footer__route::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: var(--bbc-line-w);
	margin-top: calc(var(--bbc-line-w) / -2);
	background: var(--bbc-footer-line);
	border-radius: 0 2px 2px 0;
}
.bbc-route__node {
	position: absolute;
	top: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border-radius: 50%;
	background: var(--bbc-footer-bg);
	border: var(--bbc-line-w) solid var(--bbc-footer-line);
	box-sizing: border-box;
}

.bbc-site-footer__inner {
	max-width: 76rem;
	margin-inline: auto;
	padding: var(--bbc-space-6) var(--bbc-space-4) var(--bbc-space-7);
	display: grid;
	grid-template-columns: 1.5fr repeat(3, 1fr);
	gap: var(--bbc-space-6);
}
.bbc-brand--invert, .bbc-brand--invert:visited { color: var(--bbc-footer-fg); }
.bbc-brand--invert .bbc-brand__tld { color: var(--bbc-footer-line); }
.bbc-site-footer__promise {
	font-family: var(--bbc-font-serif);
	font-size: var(--bbc-text-lg);
	line-height: 1.35;
	margin: var(--bbc-space-4) 0 var(--bbc-space-3);
	max-width: 30ch;
	text-wrap: balance;
}
.bbc-site-footer__stats {
	font-size: var(--bbc-text-xs);
	color: var(--bbc-footer-muted);
	margin: 0;
}
.bbc-site-footer__col h2 {
	font-family: var(--bbc-font-sans);
	font-size: var(--bbc-text-xs);
	font-weight: var(--bbc-weight-semi);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bbc-footer-muted);
	margin: var(--bbc-space-2) 0 var(--bbc-space-3);
}
.bbc-site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.bbc-site-footer__col li + li { margin-top: var(--bbc-space-2); }
.bbc-site-footer a { color: var(--bbc-footer-fg); text-decoration: none; font-size: var(--bbc-text-sm); }
.bbc-site-footer a:visited { color: var(--bbc-footer-fg); }
.bbc-site-footer a:hover { text-decoration: underline; text-decoration-color: var(--bbc-footer-line); text-decoration-thickness: 2px; }
.bbc-site-footer :where(a):focus-visible { box-shadow: 0 0 0 2px var(--bbc-footer-bg), 0 0 0 5px var(--bbc-footer-fg); }
.bbc-site-footer__legal {
	border-top: 1px solid rgba(242, 238, 231, .14);
	max-width: 76rem;
	margin-inline: auto;
	padding: var(--bbc-space-4);
}
.bbc-site-footer__legal p {
	margin: 0;
	font-size: var(--bbc-text-xs);
	line-height: var(--bbc-lh-xs);
	color: var(--bbc-footer-muted);
	max-width: 90ch;
}

@media (max-width: 56rem) {
	.bbc-site-footer__inner { grid-template-columns: 1fr 1fr; }
	.bbc-site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 30rem) {
	.bbc-site-footer__inner { grid-template-columns: 1fr; }
}


/* ---- Article cards (homepage, guides, categories, related) --------- */
.bbc-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: var(--bbc-space-5);
}
.bbc-card {
	background: var(--bbc-surface);
	border: 1px solid var(--bbc-card-border);
	border-radius: var(--bbc-radius-2);
	overflow: hidden;
	transition: border-color var(--bbc-dur-2) var(--bbc-ease), box-shadow var(--bbc-dur-2) var(--bbc-ease), transform var(--bbc-dur-2) var(--bbc-ease);
}
.bbc-card:hover { border-color: var(--bbc-card-border-hover); box-shadow: var(--bbc-shadow-card-hover); transform: translateY(-2px); }
.bbc-card__link { display: flex; flex-direction: column; height: 100%; color: var(--bbc-text); text-decoration: none; }
.bbc-card__link:visited { color: var(--bbc-text); }
.bbc-card__img { display: block; aspect-ratio: 1200 / 630; background: var(--bbc-bg); border-bottom: 1px solid var(--bbc-border); overflow: hidden; }
.bbc-card__img img, .bbc-card__img svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.bbc-card__body { display: flex; flex-direction: column; gap: var(--bbc-space-2); padding: var(--bbc-space-4) var(--bbc-space-4) var(--bbc-space-5); flex: 1; }
.bbc-card__cat {
	font-family: var(--bbc-font-sans);
	font-size: var(--bbc-text-2xs);
	font-weight: var(--bbc-weight-semi);
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--bbc-brand-primary);
}
.bbc-card__title {
	font-family: var(--bbc-font-serif);
	font-size: var(--bbc-text-lg);
	line-height: 1.25;
	margin: 0;
	text-wrap: balance;
}
.bbc-card__link:hover .bbc-card__title { text-decoration: underline; text-decoration-color: var(--bbc-line); text-decoration-thickness: 2px; text-underline-offset: .15em; }
.bbc-card__excerpt { font-family: var(--bbc-font-sans); font-size: var(--bbc-text-sm); line-height: var(--bbc-lh-sm); color: var(--bbc-text-muted); }
.bbc-card__meta { margin-top: auto; padding-top: var(--bbc-space-2); display: inline-flex; align-items: center; gap: .35rem; font-family: var(--bbc-font-sans); font-size: var(--bbc-text-xs); color: var(--bbc-text-muted); }
.bbc-card__meta .bbc-ico { color: var(--bbc-brand-primary); }

/* ---- Credited photographs (Geograph, CC BY-SA 2.0) -----------------
   The credit line is part of the licence, so it is always visible — never
   hidden on hover, never smaller than the 12px floor. */
.bbc-photo { margin: 0; }
.bbc-photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--bbc-radius-2);
	border: 1px solid var(--bbc-border);
	background: var(--bbc-surface-2);
}
.bbc-photo figcaption {
	display: grid;
	gap: .2rem;
	margin-top: var(--bbc-space-2);
	font-family: var(--bbc-font-sans);
	font-style: normal;   /* core's figure styles italicise captions */
	text-align: left;
}
.bbc-photo__caption { font-size: var(--bbc-text-sm); line-height: var(--bbc-lh-sm); color: var(--bbc-text); }
.bbc-photo__credit { font-size: var(--bbc-text-2xs); line-height: var(--bbc-lh-2xs); color: var(--bbc-text-muted); }
.bbc-photo__credit a { color: inherit; text-decoration: underline; text-decoration-color: var(--bbc-border-strong); }
.bbc-photo__credit a:hover { color: var(--bbc-link); }

/* In an article: a little wider than the text column, with the line's
   raspberry stop above the caption. */
.bbc-photo--inline { max-width: 46rem; margin: var(--bbc-space-6) auto; }
/* A portrait photo narrows rather than towering over the text — and is
   never cropped to fit, so the whole picture is always shown. */
.bbc-photo--inline img { width: auto; max-width: 100%; max-height: 32rem; margin-inline: auto; }
.bbc-photo--inline figcaption { border-left: var(--bbc-line-w) solid var(--bbc-line); padding-left: var(--bbc-space-3); }

/* On a card: fixed 4:3 frame so three photos of different shapes line up. */
.bbc-photo--card img { aspect-ratio: 4 / 3; object-fit: cover; }
/* Slashed zeros are for data tables; in a credit "2.0" read as "2.Ø". */
.bbc-photo figcaption, .bbc-real__item p { font-feature-settings: "zero" 0; }

/* ---- Consent banner --------------------------------------------------
   A bottom bar, not a wall: the comparison stays usable while it is up.
   Accept and Reject are deliberately identical — the ICO expects refusing
   to be as easy as agreeing. */
.bbc-consent {
	position: fixed;
	left: var(--bbc-space-3);
	right: var(--bbc-space-3);
	bottom: var(--bbc-space-3);
	z-index: 50;
	background: var(--bbc-footer-bg);
	color: var(--bbc-footer-fg);
	border-radius: var(--bbc-radius-3);
	box-shadow: 0 8px 30px rgba(26, 25, 23, .25);
	font-family: var(--bbc-font-sans);
}
.bbc-consent__inner {
	max-width: 76rem;
	margin-inline: auto;
	padding: var(--bbc-space-4) var(--bbc-space-5);
	display: flex;
	align-items: center;
	gap: var(--bbc-space-4) var(--bbc-space-6);
}
.bbc-consent__text { margin: 0; font-size: var(--bbc-text-sm); line-height: var(--bbc-lh-sm); flex: 1; }
.bbc-consent__text strong { display: block; font-size: var(--bbc-text-base); margin-bottom: .15rem; }
.bbc-consent__text a { color: var(--bbc-footer-fg); text-decoration: underline; text-decoration-color: var(--bbc-footer-line); }
.bbc-consent__actions { display: flex; gap: var(--bbc-space-2); flex: none; }
.bbc-consent__btn {
	min-width: 7rem;
	background: var(--bbc-footer-fg) !important;
	color: var(--bbc-footer-bg) !important;
	border: 0;
	border-radius: var(--bbc-radius-1);
	font-weight: var(--bbc-weight-semi);
	cursor: pointer;
}
.bbc-consent__btn:hover { background: #fff !important; }
.bbc-consent__btn:focus-visible { box-shadow: 0 0 0 2px var(--bbc-footer-bg), 0 0 0 5px var(--bbc-footer-fg); }
@media (max-width: 40rem) {
	.bbc-consent__inner { flex-direction: column; align-items: stretch; padding: var(--bbc-space-4); }
	.bbc-consent__actions .bbc-consent__btn { flex: 1; }
}
/* The footer's "Cookie settings" is a button styled as a link. */
.bbc-consent-open { background: none !important; border: 0; padding: 0; min-height: 0 !important; color: var(--bbc-footer-fg) !important; font: inherit; font-size: var(--bbc-text-sm); text-decoration: underline; text-decoration-color: var(--bbc-footer-line); cursor: pointer; }
/* A card whose picture is a credited photograph: the credit sits below the
   link (its own links cannot nest inside the card's). */
.bbc-card { display: flex; flex-direction: column; }
.bbc-card__link { flex: 1; }
.bbc-card__credit {
	margin: 0;
	padding: 0 var(--bbc-space-4) var(--bbc-space-3);
	font-family: var(--bbc-font-sans);
	font-size: var(--bbc-text-2xs);
	line-height: var(--bbc-lh-2xs);
	color: var(--bbc-text-muted);
	font-feature-settings: "zero" 0;
}
.bbc-card__credit a { color: inherit; text-decoration: underline; text-decoration-color: var(--bbc-border-strong); }
