/* Templates beyond the homepage. Builds on shared.css (the homepage tokens and components). */

[hidden] { display: none !important; }
main:focus { outline: none; }
textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }

/* Breadcrumbs: the full trail on wide screens, only the parent (as a back link) on phones */
.breadcrumbs { padding-top: 22px; font-size: 0.9rem; color: var(--muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; }
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 12px 0 10px; border-top: 1.5px solid var(--line-strong); border-right: 1.5px solid var(--line-strong); transform: rotate(45deg); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 28px; color: var(--brand-700); text-decoration: underline; text-decoration-color: rgb(29 79 145 / 0.3); }
.breadcrumbs a:hover { text-decoration-color: currentColor; }

/* Page headers */
.page-header { padding-block: clamp(20px, 3vw, 36px) clamp(24px, 3vw, 36px); }
.page-header--flush { padding-top: 0; }
.page-header__overline { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-700); }
.page-header__overline::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-500); box-shadow: 0 0 0 3px var(--accent-100); }
.page-header__title { font-size: clamp(2.2rem, 1.6rem + 2.2vw, 3.3rem); }
.page-header__page { display: block; margin-top: 6px; font-family: var(--font-text); font-size: 1rem; letter-spacing: 0; color: var(--muted); }
.page-header__lede { margin-top: 14px; max-width: 42em; font-size: 1.15rem; color: var(--ink-soft); }
.page-header__meta { margin-top: 10px; font-size: 0.95rem; color: var(--muted); }
.page-header--compact { padding-bottom: 16px; }
.centre-tools { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 16px; }

/* Listing pages: a main column and a 300 px aside */
.listing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; padding-bottom: clamp(48px, 6vw, 80px); }
.listing-aside { display: grid; gap: 32px; align-content: start; align-self: stretch; }
.listing__heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.listing__title { font-size: clamp(1.45rem, 1.25rem + 0.6vw, 1.8rem); }
.listing__count { font-size: 0.9rem; color: var(--muted); }

.post-list li { border-bottom: 1px solid var(--line); }
.post-list__link { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; padding: 20px 0; text-decoration: none; }
.post-list__link--with-image { grid-template-columns: minmax(0, 1fr) 180px; }
.post-list__text { display: grid; gap: 6px; }
.post-list__title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; line-height: 1.25; }
.post-list__link:hover .post-list__title { color: var(--brand-700); text-decoration: underline; text-decoration-thickness: 1px; }
.post-list__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-soft); font-size: 0.98rem; }
.post-list__meta { display: flex; flex-wrap: wrap; align-items: center; font-size: 0.85rem; color: var(--muted); }
.post-list__meta > * + *::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 9px; border-radius: 50%; background: currentColor; vertical-align: middle; }
.post-list__image { width: 180px; aspect-ratio: 218 / 150; object-fit: cover; border-radius: var(--radius-small); background: var(--tint); }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.pagination__pages { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination__pages a { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); font-weight: 600; text-decoration: none; }
.pagination__pages a:hover { border-color: var(--brand-700); color: var(--brand-700); }
.pagination__pages a[aria-current="page"] { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
.pagination__gap { display: grid; place-items: center; width: 24px; color: var(--muted); }
.pagination__step { display: inline-flex; align-items: center; gap: 8px; min-width: 7.5em; min-height: 44px; font-weight: 600; color: var(--brand-700); text-decoration: none; }
.pagination__step--next { justify-content: flex-end; }
.pagination__step:hover { text-decoration: underline; }
.pagination__step .icon { width: 18px; height: 18px; }
.pagination__position { display: none; font-size: 0.95rem; color: var(--muted); }

/* Ad slots in the new templates, each with its reserved height so nothing jumps when the ad loads */
.ad-slot--in-list { margin: 4px 0; --ad-reserved-height: 250px; }
.ad-slot--in-article { margin: 32px 0; padding-block: 24px; --ad-reserved-height: 280px; }
.ad-slot--top { margin: 24px 0 8px; padding-block: 18px; --ad-reserved-height: 100px; }
.ad-slot--multiplex { padding-block: 28px; --ad-reserved-height: 400px; }
.ad-slot--top .ad-slot__space, .ad-slot--multiplex .ad-slot__space { max-width: none; }
.ad-slot__space { font-size: 0.85rem; color: var(--muted); text-align: center; }

.aside-block__title, .article-toc__title, .trust-nav__title, .policy-contents__title, .search-results__subheading, .article-footer__heading {
  margin-bottom: 8px; font-family: var(--font-text); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.aside-block .library__name { font-size: 0.98rem; }
.aside-block a[aria-current="page"] { color: var(--brand-700); font-weight: 600; }
.urgent-note--compact { padding: 18px 20px; }
.urgent-note--compact .urgent-note__title { font-size: 1.15rem; }
.urgent-note--compact p { font-size: 0.95rem; }

.empty-state { padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.empty-state__title { margin-bottom: 10px; font-size: 1.45rem; }
.empty-state p { color: var(--ink-soft); }
.empty-state__links { display: grid; gap: 4px; margin-top: 14px; }
.empty-state__urgent { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-strong); font-size: 0.95rem; }
.empty-state--error { border-left: 4px solid var(--accent-700); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1.5px solid var(--brand-900); border-radius: var(--radius-small); font-weight: 600; text-decoration: none; cursor: pointer; }
.button--primary { background: var(--brand-900); color: #fff; }
.button--primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.button--secondary { background: var(--surface); color: var(--brand-900); }
.button--secondary:hover { background: var(--brand-50); }
.button:disabled { opacity: 0.7; cursor: progress; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.95rem; font-weight: 500; text-decoration: none; background: var(--surface); }
.chip:hover { border-color: var(--brand-700); color: var(--brand-700); background: var(--brand-50); }

/* Prototype notes: only for decisions the owner still has to make */
.prototype-note { width: min(100% - 2 * var(--gutter), var(--container)); margin: 16px auto 0; padding: 12px 16px; border: 1.5px dashed #a16207; border-radius: var(--radius-small); background: #fffbeb; font-size: 0.9rem; color: var(--ink); }
.trust-content > .prototype-note { width: auto; margin: 0 0 24px; }
.prototype-inline { margin-top: 8px; font-size: 0.85rem; font-weight: 600; color: #854d0e; }

/* Article: contents, the text and a rail of three sticky ads */
.article-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 0 48px; padding-bottom: clamp(48px, 6vw, 80px); }
/* The column spans only the article row, so the sticky contents stop where the article ends, never over the related articles */
.article-toc-column { grid-column: 1; grid-row: 1; }
.article-toc { position: sticky; top: calc(var(--header-height) + 24px); max-height: calc(100vh - var(--header-height) - 48px); overflow-y: auto; padding-top: 28px; }
.article { grid-column: 2; grid-row: 1; min-width: 0; max-width: 46rem; }
.article-rail { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; gap: 32px; padding-top: 28px; }
.article-rail__segment { flex: 1; min-height: 700px; }
.related-articles, .article-layout__multiplex { grid-column: 1 / -1; }
.article-layout__multiplex { margin-top: 40px; }
/* The contents column ends with the article text, so opening the references below it never moves the contents */
@media (min-width: 1120px) {
  .article { grid-row: 1 / span 3; display: grid; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); }
  .article-rail { grid-row: 1 / span 3; }
}

.article-toc__list li { border-left: 2px solid var(--line); }
.article-toc__list a { display: block; padding: 6px 12px 6px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: 0.9rem; line-height: 1.35; color: var(--ink-soft); text-decoration: none; }
.article-toc__list a:hover { color: var(--brand-700); text-decoration: underline; }
/* No bold for the current item: wider text would rewrap the title and jolt the list */
.article-toc__list a[aria-current="location"] { border-left-color: var(--brand-700); color: var(--brand-700); background: var(--brand-50); }

.toc-inline { display: none; margin: 24px 0 8px; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.toc-inline summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px; font-weight: 600; cursor: pointer; list-style: none; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline[open] summary { border-bottom: 1px solid var(--line); }
.toc-inline[open] summary .icon { transform: rotate(180deg); }
.toc-inline__list { padding: 8px 18px 14px 40px; list-style: decimal; }
.toc-inline__list li { padding: 5px 0; }
.toc-inline__list a { color: var(--brand-700); }

.article-header { padding-top: 28px; }
.article-header__overline { margin-bottom: 12px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.article-header__overline a { display: inline-flex; align-items: center; min-height: 28px; color: var(--accent-700); text-decoration: none; }
.article-header__overline a:hover { text-decoration: underline; }
.article-header__title { font-size: clamp(2.1rem, 1.5rem + 2.3vw, 3.1rem); line-height: 1.1; }
.article-header__standfirst { margin-top: 16px; font-size: 1.2rem; line-height: 1.5; color: var(--ink-soft); }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.byline > span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 10px; border-radius: 50%; background: currentColor; vertical-align: middle; }
.byline a { color: var(--brand-700); font-weight: 600; }

.sponsored-label { display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: var(--radius-small); background: var(--accent-100); color: var(--accent-700); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.sponsored-disclosure { margin-top: 18px; padding: 14px 18px; border-left: 4px solid var(--accent-700); background: var(--tint); font-size: 0.95rem; }
.sponsored-disclosure a { color: var(--brand-700); }
.sponsored-mention { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-small); font-size: 0.95rem; }

/* Reading text */
.prose { font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.55rem, 1.35rem + 0.7vw, 1.9rem); line-height: 1.2; }
.prose h3 { margin-top: 1.7em; font-family: var(--font-text); font-size: 1.2rem; font-weight: 650; letter-spacing: 0; line-height: 1.35; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--brand-700); }
.prose a { color: var(--brand-700); overflow-wrap: anywhere; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 650; }
.prose > .ad-slot { margin-block: 36px; }
.citation { position: relative; top: -0.45em; padding: 0 1px; font-size: 0.72em; font-weight: 600; text-decoration: none; }
.prose .citation { text-decoration: none; }
.citation:hover { text-decoration: underline; }

/* Care cards (from the NHS pattern): a few per article, in rising order of urgency */
.prose .care-card { margin-block: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.prose .care-card__heading { margin: 0; padding: 14px 20px; background: var(--brand-700); color: #fff; font-size: 1.15rem; }
.care-card__content { padding: 16px 20px 18px; font-size: 1.0625rem; }
.care-card__content > * + * { margin-top: 0.8em; }
.prose .care-card--urgent { border-color: var(--accent-700); }
.prose .care-card--urgent .care-card__heading { background: var(--accent-700); }
.care-card--urgent .care-card__content p { font-weight: 600; }

/* References */
/* Sources panel: the references and the disclaimer in one tinted block */
.article-sources { margin-top: 48px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.references summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 0 20px; cursor: pointer; list-style: none; }
.references summary::-webkit-details-marker { display: none; }
.references__title { font-size: 1.25rem; }
.references__note, .references__list { margin-inline: 20px; }
.references__list { margin-bottom: 16px; }
.references__count { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 600; color: var(--brand-700); }
.references details[open] .references__count .icon { transform: rotate(180deg); }
.references__note { margin-bottom: 14px; font-size: 0.95rem; color: var(--muted); }
.references__list { padding-left: 1.6em; list-style: decimal; font-size: 0.95rem; line-height: 1.55; }
.references__list li { padding: 6px 8px 6px 4px; overflow-wrap: anywhere; }
.references__list li:target { background: var(--brand-50); border-radius: var(--radius-small); }
.references__list a { color: var(--brand-700); }
.reference__back { margin-left: 4px; font-size: 0.85rem; white-space: nowrap; }

/* Article footer */
.article-footer { display: grid; gap: 32px; margin-top: 32px; }
.article-disclaimer { padding: 14px 20px 16px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-soft); }
.article-disclaimer:first-child { border-top: 0; }
.article-disclaimer a { color: var(--brand-700); }
.article-actions { display: grid; gap: 20px; }
.article-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.article-feedback .article-footer__heading { margin-bottom: 0; }
.report-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); font-size: 0.95rem; font-weight: 600; color: var(--brand-700); text-decoration: none; }
.report-button:hover { border-color: var(--brand-700); background: var(--brand-50); }
.report-button .icon { width: 18px; height: 18px; }
/* Heading and buttons share one row when they fit; on narrow phones the buttons take their own row and shrink rather than wrap */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.share .article-footer__heading { margin-bottom: 0; }
.share__buttons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 44px); gap: clamp(4px, 1.5vw, 10px); }
.share__button { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: var(--muted); color: #fff; cursor: pointer; transition: filter 0.15s; }
.share__button:hover { filter: brightness(0.85); }
.share__button .icon { width: 20px; height: 20px; }
.share__button--native { background: var(--brand-700); }
.share__button--whatsapp { background: #25d366; }
.share__button--facebook { background: #1877f2; }
.share__button--x { background: #000; }
.share__button--pinterest { background: #e60023; }
.share__status { flex-basis: 100%; min-height: 1.5em; margin-top: -6px; font-size: 0.9rem; color: var(--brand-700); }
.article-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.article-pager__link { display: grid; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.article-pager__link:hover { border-color: var(--brand-700); }
.article-pager__link--centre { text-align: right; }
.article-pager__label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.article-pager__link--centre .article-pager__label { justify-content: flex-end; }
.article-pager__label .icon { width: 15px; height: 15px; }
.article-pager__title { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.3; }
.article-pager__link:hover .article-pager__title { color: var(--brand-700); text-decoration: underline; }

/* Related articles: a full width tinted band */
.related-articles { margin-top: 56px; padding-block: 40px 48px; background: var(--tint); box-shadow: 0 0 0 100vmax var(--tint); clip-path: inset(0 -100vmax); }
.related-articles__heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 24px; }
.related-articles__title { font-size: clamp(1.6rem, 1.35rem + 0.8vw, 2rem); }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.article-card a { display: grid; gap: 10px; text-decoration: none; }
.article-card__image { width: 100%; aspect-ratio: 218 / 150; object-fit: cover; border-radius: var(--radius-small); background: var(--line); }
.article-card__title { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3; }
.article-card a:hover .article-card__title { color: var(--brand-700); text-decoration: underline; }
.article-card__meta { font-size: 0.85rem; color: var(--muted); }

/* Video posts: a click to play cover instead of the YouTube frame */
.video-facade { margin: 24px 0 0; }
.video-facade__button { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--brand-900); cursor: pointer; }
.video-facade__button img { display: block; width: 100%; aspect-ratio: 740 / 475; object-fit: cover; }
.video-facade__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgb(15 42 79 / 0.88); color: #fff; box-shadow: 0 0 0 6px rgb(255 255 255 / 0.35); }
.video-facade__play .icon { width: 30px; height: 30px; margin-left: 4px; }
.video-facade__button:hover .video-facade__play { background: var(--accent-700); }
.video-facade__button:focus-visible { outline: 3px solid var(--brand-600); outline-offset: 3px; }
.video-facade__duration { position: absolute; right: 12px; bottom: 12px; padding: 3px 8px; border-radius: var(--radius-small); background: rgb(15 42 79 / 0.88); color: #fff; font-size: 0.85rem; font-weight: 600; }
.video-facade figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.video-facade figcaption a { color: var(--brand-700); font-weight: 600; }
.video-facade__player { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }

/* Letter indexes: a centre A to Z and the list of every centre */
.letter-nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
.letter-nav a, .letter-nav span[aria-disabled] { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); font-weight: 600; text-decoration: none; }
.letter-nav a:hover { border-color: var(--brand-700); background: var(--brand-50); color: var(--brand-700); }
.letter-nav span[aria-disabled] { border-color: var(--line); background: var(--tint); color: #8a96a3; font-weight: 500; }
.letter-section { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 0 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.letter-section__letter { grid-row: span 2; font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); font-weight: 400; line-height: 0.9; color: var(--brand-900); }
.letter-section__list { columns: 2 260px; column-gap: 36px; }
.letter-section__list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.letter-section__list a { display: block; padding: 9px 0; text-decoration: none; font-weight: 500; line-height: 1.4; }
.letter-section__list a:hover .letter-section__name { color: var(--brand-700); text-decoration: underline; }
.letter-section__meta { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.letter-section__top { justify-self: start; display: inline-flex; align-items: center; min-height: 36px; margin-top: 8px; font-size: 0.9rem; color: var(--brand-700); }

/* Explore */
.explore__section-title { margin-bottom: 22px; font-size: clamp(1.6rem, 1.35rem + 0.8vw, 2.1rem); }
.explore-groups { padding-bottom: 48px; }
.explore-groups .library__group-title { scroll-margin-top: calc(var(--header-height) + 24px); }
.explore-index { padding-block: 40px clamp(48px, 6vw, 80px); border-top: 1px solid var(--ink); }
.explore-index__heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 16px 40px; align-items: end; margin-bottom: 24px; }
.explore-index__heading .explore__section-title { margin-bottom: 0; }
.filter-field label { display: block; margin-bottom: 6px; font-weight: 600; }
.filter-field__control { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--surface); }
.filter-field__control:focus-within { border-color: var(--brand-700); box-shadow: 0 0 0 4px var(--brand-100); }
.filter-field__control .icon { color: var(--muted); }
.filter-field__control input { flex: 1; min-width: 0; min-height: 48px; border: 0; outline: 0; background: transparent; font-size: 1.05rem; }
.filter-field__status { margin-top: 6px; font-size: 0.9rem; color: var(--muted); }

/* Search */
.page-header--search { padding-bottom: 28px; }
.search--page { max-width: 760px; margin-top: 20px; }
.search-page__label { display: block; margin-bottom: 8px; font-weight: 600; }
.search-results { min-width: 0; }
.search-results__summary { padding-bottom: 12px; border-bottom: 1px solid var(--ink); font-size: 0.95rem; color: var(--muted); }
.search-results__centres { padding: 18px 0 6px; }
.search-results__browse { margin-top: 20px; }
.result-list__item { border-bottom: 1px solid var(--line); }
.result-list__link { display: grid; gap: 4px; padding: 18px 0; text-decoration: none; }
.result-list__title { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25; }
.result-list__link:hover .result-list__title { color: var(--brand-700); text-decoration: underline; }
.result-list__meta { font-size: 0.85rem; color: var(--muted); }
.result-list__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-soft); font-size: 0.98rem; }
/* Results arrive after load: the loading panel fills the window so the footer and sidebar never jump */
[data-search-panel="loading"] { min-height: 100vh; }
.result-list--loading li { display: grid; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.result-list--loading span { display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--line) 0%, var(--tint) 50%, var(--line) 100%) 0 0 / 200% 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite; }
.result-list--loading span:first-child { width: 70%; height: 22px; }
.result-list--loading span:nth-child(2) { width: 25%; }
@keyframes skeleton-shimmer { to { background-position: -200% 0; } }
[data-search-panel="idle"] .listing__title { margin-bottom: 14px; }

/* Trust and policy pages: the section navigation and a reading column */
.trust-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; padding-block: 28px clamp(48px, 6vw, 80px); }
.trust-nav { position: sticky; top: calc(var(--header-height) + 24px); }
.trust-nav li { border-left: 2px solid var(--line); }
.trust-nav a { display: block; margin-left: -2px; padding: 7px 0 7px 14px; border-left: 2px solid transparent; font-size: 0.95rem; color: var(--ink-soft); text-decoration: none; }
.trust-nav a:hover { color: var(--brand-700); text-decoration: underline; }
.trust-nav a[aria-current="page"] { border-left-color: var(--brand-700); color: var(--brand-700); font-weight: 600; }
.trust-content { min-width: 0; max-width: 39rem; }
.trust-prose h2 { font-size: clamp(1.45rem, 1.3rem + 0.5vw, 1.7rem); }
.trust-prose > h2:first-child { margin-top: 0; }
.trust-section { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.trust-section__title { margin-bottom: 16px; font-size: 1.5rem; }
.trust-section p a, .trust-section--contact a { color: var(--brand-700); }
.trust-section .text-link { margin-top: 14px; }
.policy-contents { margin: 4px 0 32px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.policy-contents ol { padding-left: 1.3em; list-style: decimal; columns: 2 220px; column-gap: 32px; }
.policy-contents li { padding: 3px 0; break-inside: avoid; }
.policy-contents a { color: var(--brand-700); }
.retired-section { margin-top: 2.2em; padding: 4px 18px 16px; border: 1.5px dashed #a16207; border-radius: var(--radius-small); }
.retired-section h2 { margin-top: 0.6em; color: var(--muted); }
.retired-section del { color: var(--muted); }

/* Contact */
.contact-urgent { margin: 4px 0 32px; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.contact-form { max-width: 36rem; }
.contact-form__title { font-size: 1.6rem; }
.contact-form__hint { margin-top: 6px; color: var(--muted); }
.form-field { margin-top: 22px; }
.form-field__label { display: block; font-weight: 600; }
.form-field__hint { margin-top: 2px; font-size: 0.92rem; color: var(--muted); }
.form-field__error { margin-top: 4px; font-weight: 600; color: var(--accent-700); }
.form-field__input { display: block; width: 100%; min-height: 48px; margin-top: 6px; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: var(--radius-small); background: var(--surface); font-size: 1.0625rem; }
.form-field__input:focus { outline: 0; border-color: var(--brand-700); box-shadow: 0 0 0 4px var(--brand-100); }
.form-field__input--message { min-height: 180px; resize: vertical; }
.form-field--error { padding-left: 14px; border-left: 4px solid var(--accent-700); }
.form-field--error .form-field__input { border-color: var(--accent-700); }
.error-summary { margin-bottom: 28px; padding: 18px 20px; border: 3px solid var(--accent-700); border-radius: var(--radius-small); }
.error-summary:focus { outline: 3px solid var(--brand-100); outline-offset: 2px; }
.error-summary__title { margin-bottom: 8px; font-size: 1.3rem; }
.error-summary__list li + li { margin-top: 4px; }
.error-summary__list a { color: var(--accent-700); font-weight: 600; }
.contact-form__legal { margin-top: 22px; font-size: 0.85rem; color: var(--muted); }
.contact-form__legal a { color: var(--brand-700); }
.contact-form__submit { margin-top: 18px; }
.form-banner { margin-bottom: 28px; padding: 18px 22px; border-left: 5px solid var(--brand-700); border-radius: var(--radius-small); background: var(--tint); }
.form-banner:focus { outline: 3px solid var(--brand-100); outline-offset: 2px; }
.form-banner--failure { border-left-color: var(--accent-700); }
.form-banner__title { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 1.3rem; }
.form-banner--success .icon { color: var(--brand-700); }
.form-banner--failure .icon { color: var(--accent-700); }
.form-banner a { color: var(--brand-700); }
.contact-aside { display: grid; gap: 28px; }
.contact-details dt { margin-top: 14px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin: 2px 0 0; }
.contact-details a, .aside-links a { color: var(--brand-700); }
.aside-links li { border-bottom: 1px solid var(--line); }
.aside-links a { display: block; padding: 9px 0; font-weight: 500; text-decoration: none; }
.aside-links a:hover { text-decoration: underline; }

/* Page not found */
.not-found { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; padding-block: clamp(32px, 5vw, 64px); }
.not-found__text .page-header__lede { margin-bottom: 8px; }
.not-found__suggestions { padding-top: 6px; }
.not-found__suggestions .listing__title, .not-found__more .listing__title { margin-bottom: 12px; font-size: 1.4rem; }
.not-found__suggestions .search-results__summary { border: 0; }
.not-found__more { grid-column: 1 / -1; padding-top: 28px; border-top: 1px solid var(--line); }
.not-found__report { margin-top: 22px; color: var(--ink-soft); }
.not-found__report a { color: var(--brand-700); }

/* Parent centres */
.subtopics, .pinned { padding-bottom: 40px; }
.subtopics__title, .pinned__title { margin-bottom: 14px; font-size: clamp(1.45rem, 1.25rem + 0.6vw, 1.8rem); }
.subtopics__list ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 36px; }

/* Prototype gallery */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 72px; }
.gallery__item { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.gallery__name { margin-bottom: 4px; font-size: 1.3rem; }
.gallery__name a { color: var(--brand-900); }
.gallery__url { margin-bottom: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.gallery__item > p:not(.gallery__url) { font-size: 0.95rem; color: var(--ink-soft); }
.gallery__states { margin-top: 10px; }
.gallery__states a { color: var(--brand-700); }

@media (max-width: 1119px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 0 40px; }
  .article-toc-column { display: none; }
  .article { grid-column: 1; }
  .article-rail { grid-column: 2; }
  .toc-inline { display: block; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subtopics__list ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 959px) {
  .listing-layout, .contact-layout, .not-found { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .listing-aside { align-self: auto; }
  .listing-aside .ad-slot--sidebar, .article-rail .ad-slot--sidebar { position: static; }
  .listing-aside .ad-slot--sidebar .ad-slot__space, .article-rail .ad-slot--sidebar .ad-slot__space { margin-inline: auto; }
  .article-layout { display: block; }
  .article { max-width: none; }
  .article-rail { display: grid; gap: 24px; padding-top: 32px; }
  .article-rail__segment { min-height: 0; }
  .related-articles { margin-top: 40px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .trust-nav { position: static; order: 2; padding-top: 28px; border-top: 1px solid var(--line); }
  .explore-index__heading { grid-template-columns: minmax(0, 1fr); }
  .subtopics__list ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  .breadcrumbs li:not(:last-child) { display: none; }
  .breadcrumbs li:last-child::before { content: ""; width: 7px; height: 7px; margin: 0 8px 0 2px; border-bottom: 1.5px solid var(--brand-700); border-left: 1.5px solid var(--brand-700); border-top: 0; border-right: 0; transform: rotate(45deg); }
  .page-header__lede, .article-header__standfirst { font-size: 1.0625rem; }
  .post-list__link--with-image { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; }
  .post-list__image { width: 96px; }
  .post-list__title { font-size: 1.15rem; }
  .post-list__excerpt { display: none; }
  .pagination__pages { display: none; }
  .pagination__position { display: block; }
  .pagination__step { min-width: 0; }
  .ad-slot--top { --ad-reserved-height: 250px; }
  .ad-slot--top .ad-slot__space, .ad-slot--multiplex .ad-slot__space { max-width: 336px; }
  .ad-slot--multiplex { --ad-reserved-height: 600px; }
  .prose { font-size: 1.0625rem; }
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .article-card a { grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 4px 14px; padding: 14px 0; border-bottom: 1px solid var(--line-strong); }
  .article-card__image { grid-row: span 2; }
  .article-card__title { font-size: 1.05rem; }
  .article-card:first-child a { padding-top: 0; }
  .article-pager { grid-template-columns: minmax(0, 1fr); }
  .article-pager__link--centre { text-align: left; }
  .article-pager__link--centre .article-pager__label { justify-content: flex-start; }
  .letter-section { grid-template-columns: minmax(0, 1fr); }
  .letter-section__letter { grid-row: auto; margin-bottom: 8px; font-size: 2.4rem; }
  .letter-section__list { columns: 1; }
  .letter-nav a, .letter-nav span[aria-disabled] { min-width: 40px; height: 40px; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .subtopics__list ul { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .result-list--loading span { animation: none; }
}
