/* =============================================================================
 * Adande Editorial
 * -----------------------------------------------------------------------------
 * One stylesheet for the news and video surfaces. No framework, no Elementor.
 *
 * COLOUR — the brand palette as published fails WCAG AA against white:
 *     Text      #7A7A7A   4.27:1   fails body text (4.5:1)
 *     Primary   #00AEEF   2.53:1   fails everything, including 3:1 for UI
 *     Secondary #54595F   7.07:1   passes AAA
 *     Blue 3    #005CA4   6.84:1   passes AA
 * So body copy uses Secondary, links and controls use Blue 3, and #00AEEF is
 * demoted to large decorative fills only — where it never has to carry meaning.
 * Every colour below is one Adande already owns; nothing here needs sign-off.
 * ========================================================================== */

.aded {
	/* --- palette ---------------------------------------------------------- */
	--aded-ink:          #54595F;  /* body copy      — 7.07:1 on white  */
	--aded-ink-strong:   #2B2F33;  /* headings       — 12.6:1 on white  */
	--aded-ink-muted:    #63696F;  /* meta, captions — 5.9:1 on white   */
	--aded-link:         #005CA4;  /* 6.84:1 on white                    */
	--aded-link-hover:   #003F72;
	--aded-brand:        #00AEEF;  /* decorative fills only              */
	--aded-brand-deep:   #009ADC;
	--aded-surface:      #FFFFFF;
	--aded-surface-alt:  #EDF9FD;  /* brand "back of containers"         */
	--aded-surface-sink: #F4F6F7;
	--aded-rule:         #DCE1E5;
	--aded-focus:        #005CA4;

	/* --- type ------------------------------------------------------------- */
	--aded-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	/* Fluid scale, 320px → 1280px. Never below 16px for body. */
	--aded-fs-body:  clamp(1rem, 0.97rem + 0.16vw, 1.0625rem);
	--aded-fs-lead:  clamp(1.125rem, 1.05rem + 0.36vw, 1.3125rem);
	--aded-fs-h1:    clamp(1.875rem, 1.35rem + 2.6vw, 3.25rem);
	--aded-fs-h2:    clamp(1.375rem, 1.15rem + 1.1vw, 2rem);
	--aded-fs-h3:    clamp(1.125rem, 1.03rem + 0.47vw, 1.375rem);
	--aded-fs-small: 0.875rem;

	/* --- space ------------------------------------------------------------ */
	--aded-shell:        1180px;
	--aded-shell-narrow: 760px;
	--aded-gutter:       clamp(1rem, 0.6rem + 2vw, 2.5rem);
	--aded-block:        clamp(2.5rem, 1.8rem + 3.5vw, 5rem);

	--aded-radius:  6px;
	--aded-shadow:  0 1px 2px rgba(16, 24, 32, .06), 0 8px 24px -12px rgba(16, 24, 32, .18);
	--aded-shadow-h:0 2px 4px rgba(16, 24, 32, .08), 0 16px 32px -14px rgba(16, 24, 32, .26);
}

/* =============================================================================
 * Base
 * ========================================================================== */

.aded .aded-main {
	font-family: var(--aded-font);
	font-size: var(--aded-fs-body);
	line-height: 1.65;
	color: var(--aded-ink);
	background: var(--aded-surface);
	/* The template sets tabindex="-1" so the skip link can move focus here.
	   Without this the browser paints a focus ring around the whole page. */
	outline: none;
}

.aded-shell {
	width: 100%;
	max-width: var(--aded-shell);
	margin-inline: auto;
	padding-inline: var(--aded-gutter);
}

.aded-shell--narrow { max-width: var(--aded-shell-narrow); }

/* -----------------------------------------------------------------------------
 * Skip link — WCAG 2.4.1
 * Hidden until focused, then unmistakably visible. A skip link that stays
 * invisible on focus is worse than none: a sighted keyboard user loses focus.
 * -------------------------------------------------------------------------- */

.aded-skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 10000;
	display: inline-block;
	padding: .75rem 1.25rem;
	font-family: var(--aded-font);
	font-size: 1rem;
	font-weight: 600;
	color: #FFF;
	background: #005CA4;
	border-radius: 0 0 var(--aded-radius) var(--aded-radius);
	text-decoration: none;
}

.aded-skip-link:focus {
	top: 0;
	outline: 3px solid #FFF;
	outline-offset: -6px;
}

/* -----------------------------------------------------------------------------
 * Focus — WCAG 2.4.7 and 2.4.11.
 * A single visible style everywhere, 3:1 against both the surface behind it and
 * the component it outlines.
 * -------------------------------------------------------------------------- */

.aded :focus-visible {
	outline: 3px solid var(--aded-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Only suppress the default ring where :focus-visible is supported. */
.aded :focus:not(:focus-visible) { outline: none; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* =============================================================================
 * Breadcrumbs
 * The separator is a pseudo-element, never a DOM character — otherwise a screen
 * reader reads "chevron" between every item.
 * ========================================================================== */

.aded-breadcrumb { margin: 0 0 1.25rem; }

.aded-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--aded-fs-small);
	color: var(--aded-ink-muted);
}

.aded-breadcrumb__item { display: flex; align-items: center; gap: .5rem; }

.aded-breadcrumb__item + .aded-breadcrumb__item::before {
	content: '';
	width: .375rem; height: .375rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(-45deg);
	opacity: .55;
	flex: none;
}

.aded-breadcrumb a { color: var(--aded-ink-muted); text-decoration: underline; text-underline-offset: 2px; }
.aded-breadcrumb a:hover { color: var(--aded-link); }
.aded-breadcrumb [aria-current="page"] { color: var(--aded-ink-strong); font-weight: 500; }

/* =============================================================================
 * Article
 * ========================================================================== */

.aded-article__header { padding-top: clamp(1.5rem, 1rem + 2vw, 3rem); }

.aded-eyebrow { margin: 0 0 .75rem; }

.aded-eyebrow__link {
	display: inline-block;
	padding: .3rem .7rem;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--aded-link);
	background: var(--aded-surface-alt);
	border-radius: 999px;
	text-decoration: none;
}

.aded-eyebrow__link:hover { background: #DCF1FB; color: var(--aded-link-hover); }

.aded-article__title,
.aded-video-page__title,
.aded-archive__title {
	margin: 0 0 1rem;
	font-size: var(--aded-fs-h1);
	line-height: 1.12;
	letter-spacing: -.015em;
	font-weight: 600;
	color: var(--aded-ink-strong);
	text-wrap: balance;
}

.aded-article__standfirst,
.aded-archive__intro {
	margin: 0 0 1.5rem;
	font-size: var(--aded-fs-lead);
	line-height: 1.5;
	color: var(--aded-ink-muted);
	max-width: 62ch;
	text-wrap: pretty;
}

.aded-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1.25rem;
	margin: 0 0 2rem;
	font-size: var(--aded-fs-small);
	color: var(--aded-ink-muted);
}

.aded-meta__item { display: inline-flex; gap: .35rem; align-items: baseline; }
.aded-meta__label { font-weight: 600; color: var(--aded-ink); }

.aded-article__figure { margin: 0 0 var(--aded-block); }

.aded-article__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--aded-radius);
	background: var(--aded-surface-sink);
}

.aded-article__caption {
	margin-top: .625rem;
	font-size: var(--aded-fs-small);
	color: var(--aded-ink-muted);
}

/* -----------------------------------------------------------------------------
 * Prose — the article body.
 * Measure capped at ~68ch: the single biggest readability lever there is.
 * -------------------------------------------------------------------------- */

.aded-prose { max-width: 68ch; }

.aded-prose > * + * { margin-top: 1.25em; }

.aded-prose p { margin: 0; }

.aded-prose h2,
.aded-prose h3,
.aded-prose h4 {
	margin-top: 2.25em;
	margin-bottom: 0;
	color: var(--aded-ink-strong);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -.01em;
	text-wrap: balance;
	/* Keep an anchor-jumped heading clear of any sticky header. */
	scroll-margin-top: 6rem;
}

.aded-prose h2 { font-size: var(--aded-fs-h2); }
.aded-prose h3 { font-size: var(--aded-fs-h3); }
.aded-prose h4 { font-size: 1.0625rem; }

.aded-prose h2 + *,
.aded-prose h3 + *,
.aded-prose h4 + * { margin-top: .75em; }

.aded-prose a {
	color: var(--aded-link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
}

.aded-prose a:hover {
	color: var(--aded-link-hover);
	text-decoration-thickness: 2px;
}

.aded-prose strong, .aded-prose b { font-weight: 600; color: var(--aded-ink-strong); }

.aded-prose ul, .aded-prose ol { padding-left: 1.5em; }
.aded-prose li + li { margin-top: .4em; }
.aded-prose li::marker { color: var(--aded-brand-deep); }

.aded-prose img {
	max-width: 100%;
	height: auto;
	border-radius: var(--aded-radius);
}

.aded-prose figure { margin: 2em 0; }
.aded-prose figcaption { margin-top: .625rem; font-size: var(--aded-fs-small); color: var(--aded-ink-muted); }

.aded-prose blockquote {
	margin: 2em 0;
	padding: .25rem 0 .25rem 1.5rem;
	border-left: 4px solid var(--aded-brand);
	font-size: var(--aded-fs-lead);
	line-height: 1.5;
	color: var(--aded-ink-strong);
}

.aded-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--aded-fs-small);
}

.aded-prose th, .aded-prose td {
	padding: .625rem .75rem;
	border-bottom: 1px solid var(--aded-rule);
	text-align: left;
}

.aded-prose th { font-weight: 600; color: var(--aded-ink-strong); background: var(--aded-surface-sink); }

/* Wide content must scroll inside itself, never the page. */
.aded-prose > table { display: block; overflow-x: auto; }

.aded-article__footer {
	margin-top: var(--aded-block);
	padding-top: 1.5rem;
	border-top: 1px solid var(--aded-rule);
}

.aded-h-small {
	margin: 0 0 .75rem;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--aded-ink-muted);
}

.aded-taglist { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }

.aded-tag {
	display: inline-block;
	padding: .35rem .8rem;
	font-size: var(--aded-fs-small);
	color: var(--aded-link);
	background: var(--aded-surface-alt);
	border-radius: 999px;
	text-decoration: none;
}

.aded-tag:hover { background: #DCF1FB; color: var(--aded-link-hover); }

/* =============================================================================
 * Archive
 * ========================================================================== */

.aded-archive__header { padding: clamp(1.5rem, 1rem + 2vw, 3rem) 0 1.5rem; }

.aded-filters { border-bottom: 1px solid var(--aded-rule); margin-bottom: var(--aded-block); }

.aded-filters__list {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0;
	padding: 0 0 1rem;
	list-style: none;
}

.aded-filters__link {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .5rem .9rem;
	font-size: var(--aded-fs-small);
	font-weight: 500;
	color: var(--aded-ink);
	background: var(--aded-surface-sink);
	border: 1px solid transparent;
	border-radius: 999px;
	text-decoration: none;
	/* Reserve the bold weight's width so the row does not reflow on hover. */
	transition: background-color .15s ease, color .15s ease;
}

.aded-filters__link:hover { background: var(--aded-surface-alt); color: var(--aded-link); }

.aded-filters__link.is-current {
	background: var(--aded-link);
	color: #FFF;
	font-weight: 600;
}

.aded-filters__count {
	font-size: .75rem;
	font-variant-numeric: tabular-nums;
	opacity: .7;
}

.aded-archive__count {
	margin: 0 0 1.5rem;
	font-size: var(--aded-fs-small);
	color: var(--aded-ink-muted);
}

.aded-empty {
	padding: 4rem 0;
	text-align: center;
	font-size: var(--aded-fs-lead);
	color: var(--aded-ink-muted);
}

/* =============================================================================
 * Cards
 * ========================================================================== */

.aded-grid {
	display: grid;
	gap: clamp(1.25rem, .9rem + 1.6vw, 2.25rem);
	margin: 0 0 var(--aded-block);
	padding: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.aded-card { display: flex; }

.aded-card__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	background: var(--aded-surface);
	border: 1px solid var(--aded-rule);
	border-radius: var(--aded-radius);
	overflow: hidden;
	transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.aded-card__inner:hover {
	box-shadow: var(--aded-shadow-h);
	border-color: #C3CBD2;
	transform: translateY(-2px);
}

/* The card's focus ring belongs on the card, not on the text inside it. */
.aded-card__inner:has(.aded-card__link:focus-visible) {
	outline: 3px solid var(--aded-focus);
	outline-offset: 2px;
}

.aded-card__inner:has(.aded-card__link:focus-visible) .aded-card__link:focus-visible { outline: none; }

.aded-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--aded-surface-sink);
	overflow: hidden;
}

.aded-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.aded-card__inner:hover .aded-card__image { transform: scale(1.03); }

.aded-card__image--placeholder {
	display: block;
	width: 100%; height: 100%;
	background: linear-gradient(135deg, var(--aded-surface-alt), var(--aded-surface-sink));
}

.aded-card__body {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding: 1.125rem 1.25rem 1.375rem;
	flex: 1;
}

.aded-card__eyebrow {
	margin: 0;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--aded-link);
}

.aded-card__title {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.35;
	font-weight: 600;
	color: var(--aded-ink-strong);
	text-wrap: pretty;
}

.aded-card__link { color: inherit; text-decoration: none; }

/* Stretch the heading link over the whole card: one tab stop, one accessible
   name, no nested interactive elements. */
.aded-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
}

.aded-card__inner:hover .aded-card__link { color: var(--aded-link); }

.aded-card__summary { margin: 0; font-size: var(--aded-fs-small); line-height: 1.55; color: var(--aded-ink-muted); }

.aded-card__meta {
	margin: auto 0 0;
	padding-top: .5rem;
	font-size: .8125rem;
	color: var(--aded-ink-muted);
}

.aded-badge {
	display: inline-block;
	padding: .2rem .55rem;
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #1F5C3A;
	background: #E4F4EA;
	border-radius: 3px;
}

/* --- video-specific card bits ------------------------------------------- */

.aded-card__play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	pointer-events: none;
}

.aded-card__play-bg    { fill: rgba(20, 24, 28, .72); transition: fill .18s ease; }
.aded-card__play-arrow { fill: #FFF; }

.aded-card__inner:hover .aded-card__play-bg { fill: var(--aded-brand-deep); }

.aded-card__duration {
	position: absolute;
	right: .5rem;
	bottom: .5rem;
	padding: .15rem .4rem;
	font-size: .75rem;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	color: #FFF;
	background: rgba(20, 24, 28, .82);
	border-radius: 3px;
}

/* =============================================================================
 * Video page
 * ========================================================================== */

.aded-video {
	position: relative;
	margin: 0 0 var(--aded-block);
}

.aded-video__button {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	aspect-ratio: 16 / 9;
	background: #0B0E11;
	border: 0;
	border-radius: var(--aded-radius);
	overflow: hidden;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.aded-video__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity .2s ease, transform .3s ease;
}

.aded-video__button:hover .aded-video__poster { opacity: .82; transform: scale(1.015); }

.aded-video__play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	pointer-events: none;
}

.aded-video__play svg { width: clamp(56px, 8vw, 84px); height: auto; }
.aded-video__play-bg    { fill: rgba(20, 24, 28, .78); transition: fill .18s ease, transform .18s ease; }
.aded-video__play-arrow { fill: #FFF; }

.aded-video__button:hover .aded-video__play-bg { fill: var(--aded-brand-deep); }

.aded-video__frame {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: var(--aded-radius);
	background: #0B0E11;
}

.aded-video__privacy {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem .75rem;
	margin: .75rem 0 0;
	font-size: var(--aded-fs-small);
	color: var(--aded-ink-muted);
}

.aded-video__privacy a { color: var(--aded-link); text-underline-offset: 2px; }

.aded-video__status:empty { display: none; }

.aded-video__status {
	margin: .5rem 0 0;
	font-size: var(--aded-fs-small);
	color: var(--aded-ink-muted);
}

.aded-video-page__summary { margin-bottom: var(--aded-block); }

/* --- transcript ---------------------------------------------------------- */

.aded-transcript {
	margin: 0 0 var(--aded-block);
	border: 1px solid var(--aded-rule);
	border-radius: var(--aded-radius);
	background: var(--aded-surface-sink);
	overflow: hidden;
}

.aded-transcript__summary {
	display: flex;
	align-items: baseline;
	gap: .75rem;
	flex-wrap: wrap;
	padding: 1rem 1.25rem;
	cursor: pointer;
	list-style: none;
	background: var(--aded-surface-alt);
}

.aded-transcript__summary::-webkit-details-marker { display: none; }

/* Custom disclosure triangle. `details` already exposes expanded/collapsed
   state to assistive technology, so this is purely visual. */
.aded-transcript__summary::before {
	content: '';
	flex: none;
	width: .5rem; height: .5rem;
	border-right: 2px solid var(--aded-link);
	border-bottom: 2px solid var(--aded-link);
	transform: rotate(-45deg);
	transition: transform .18s ease;
	align-self: center;
}

.aded-transcript__details[open] > .aded-transcript__summary::before { transform: rotate(45deg); }

.aded-transcript__summary:focus-visible {
	outline: 3px solid var(--aded-focus);
	outline-offset: -3px;
}

.aded-transcript__heading {
	display: inline;
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--aded-ink-strong);
}

.aded-transcript__hint { font-size: var(--aded-fs-small); color: var(--aded-ink-muted); }

.aded-transcript__body {
	max-width: none;
	padding: 1.25rem;
	max-height: 30rem;
	overflow-y: auto;
}

.aded-transcript__line { margin: 0 0 .875rem; }
.aded-transcript__speaker { color: var(--aded-ink-strong); font-weight: 600; }

/* =============================================================================
 * Pagination
 * ========================================================================== */

.aded-pagination { margin: 0 0 var(--aded-block); }

.aded-pagination__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .375rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aded-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* 44px target — WCAG 2.5.8 */
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 .75rem;
	font-size: var(--aded-fs-small);
	font-weight: 500;
	color: var(--aded-ink);
	background: var(--aded-surface);
	border: 1px solid var(--aded-rule);
	border-radius: var(--aded-radius);
	text-decoration: none;
}

.aded-pagination a.page-numbers:hover { background: var(--aded-surface-alt); border-color: var(--aded-brand); color: var(--aded-link); }

.aded-pagination .page-numbers.current {
	background: var(--aded-link);
	border-color: var(--aded-link);
	color: #FFF;
	font-weight: 600;
}

.aded-pagination .page-numbers.dots { border-color: transparent; background: none; }

/* =============================================================================
 * Related
 * ========================================================================== */

.aded-related {
	margin-top: var(--aded-block);
	padding: var(--aded-block) 0 0;
	background: var(--aded-surface-sink);
	padding-bottom: var(--aded-block);
}

.aded-related__heading {
	margin: 0 0 1.5rem;
	font-size: var(--aded-fs-h2);
	font-weight: 600;
	color: var(--aded-ink-strong);
}

.aded-related .aded-grid { margin-bottom: 0; }

/* =============================================================================
 * Motion — WCAG 2.3.3
 * ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.aded *,
	.aded *::before,
	.aded *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.aded-card__inner:hover { transform: none; }
	.aded-card__inner:hover .aded-card__image { transform: none; }
	.aded-video__button:hover .aded-video__poster { transform: none; }
}

/* =============================================================================
 * Forced colours (Windows High Contrast) — WCAG 1.4.1 / 1.4.11
 * Backgrounds are dropped by the OS, so anything carrying meaning through
 * background alone has to regain a border.
 * ========================================================================== */

@media (forced-colors: active) {
	.aded-card__inner,
	.aded-filters__link,
	.aded-pagination .page-numbers { border: 1px solid CanvasText; }

	.aded-filters__link.is-current,
	.aded-pagination .page-numbers.current { border-width: 3px; }

	.aded-card__play-bg,
	.aded-video__play-bg { fill: Canvas; stroke: CanvasText; stroke-width: 2px; }

	.aded-card__play-arrow,
	.aded-video__play-arrow { fill: CanvasText; }

	.aded :focus-visible { outline: 3px solid CanvasText; }
}

/* =============================================================================
 * Print
 * ========================================================================== */

@media print {
	.aded-skip-link,
	.aded-filters,
	.aded-pagination,
	.aded-related,
	.aded-video__privacy,
	.aded-video__play { display: none !important; }

	.aded-main { color: #000; font-size: 11pt; }
	.aded-prose { max-width: none; }
	.aded-transcript__body { max-height: none; overflow: visible; }
	.aded-transcript__details { display: block; }

	/* Print the destination of every link in the body. */
	.aded-prose a::after { content: ' (' attr(href) ')'; font-size: 9pt; word-break: break-all; }
}
