/*
 * Base stylesheet shared by the three designs.
 * Structure and components only use design tokens (CSS variables written by /assets/theme.css),
 * so each design re-skins them by changing tokens and adding its own header, hero and footer.
 * Layout uses logical properties throughout: the site is right-to-left.
 */

/* ───────── tokens that designs may override ───────── */
:root {
  --shadow-1: 0 1px 2px rgb(0 0 0 / .05), 0 2px 8px rgb(0 0 0 / .05);
  --shadow-2: 0 2px 6px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .10);
  --shadow-3: 0 8px 20px rgb(0 0 0 / .10), 0 28px 64px rgb(0 0 0 / .16);
  --card-bg: var(--c-surface);
  --card-border: 1px solid var(--c-border);
  --card-shadow: none;
  --title-weight: 700;
  --title-leading: 1.45;
  --btn-radius: var(--radius);
  --chip-radius: 999px;
  --gap: calc(var(--space, 1) * 1.5rem);
  --sec-pad: calc(var(--space, 1) * clamp(2.6rem, 5.5vw, 4.75rem));
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 4.5rem;
  --ok: #1d7a46; --warn: #a15c00; --danger: #b3261e;
}
html[data-mode="dark"] { --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 10px 30px rgb(0 0 0 / .45); --shadow-3: 0 24px 60px rgb(0 0 0 / .6); --ok: #5ccf8f; --warn: #f0b354; --danger: #ff8a80; }
html[data-cards="elevated"] { --card-border: 1px solid transparent; --card-shadow: var(--shadow-1); }
html[data-cards="flat"] { --card-border: 0 solid transparent; --card-bg: transparent; }

/* ───────── reset ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--fs-base, 17px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1.5rem); }
html[data-motion="on"] { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; min-height: 100vh; background: var(--c-bg); color: var(--c-text); font-family: var(--font-body); line-height: var(--body-leading, 1.8); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); font-weight: var(--title-weight); line-height: var(--title-leading); text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
dl, dd { margin: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--c-primary); color: var(--c-primary-ink); }

.container { width: min(100% - 2.5rem, var(--container, 1240px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; inset-block-start: -5rem; inset-inline-start: 1rem; z-index: 200; background: var(--c-primary); color: var(--c-primary-ink); padding: .6rem 1rem; border-radius: var(--radius); transition: inset-block-start .2s; }
.skip:focus { inset-block-start: 1rem; }
.dir-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.ic { width: 1.25em; height: 1.25em; flex: none; }
.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--c-primary-soft), var(--c-accent-soft)); position: relative; overflow: hidden; }
.ph__ic { width: clamp(1.8rem, 24%, 3.6rem); height: auto; aspect-ratio: 1; color: var(--c-link); opacity: .34; }
.ph::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgb(255 255 255 / .35), transparent 55%); pointer-events: none; }
html[data-mode="dark"] .ph::after { background: radial-gradient(circle at 30% 30%, rgb(255 255 255 / .07), transparent 55%); }

/* ───────── buttons, chips ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; padding: .55rem 1.35rem; border-radius: var(--btn-radius); border: 1.5px solid transparent; font-weight: 700; font-size: .95rem; line-height: 1.3; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s; white-space: nowrap; }
.btn .ic { width: 1.15em; height: 1.15em; }
.btn--primary { background: var(--c-primary); color: var(--c-primary-ink); }
.btn--primary:hover { background: var(--c-primary-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn--ghost { border-color: var(--c-border-strong); color: var(--c-text); background: transparent; }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-link); background: var(--c-primary-softer); }
.btn--light { background: #fff; color: #111; }
.btn--light:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn--glass { background: rgb(255 255 255 / .14); color: #fff; border-color: rgb(255 255 255 / .35); backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgb(255 255 255 / .24); }
.btn--sm { min-height: 2.4rem; padding: .35rem 1rem; font-size: .88rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.iconbtn { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; color: inherit; transition: background-color .2s, color .2s; }
.iconbtn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.ic--sun { display: none; }
html[data-mode="dark"] .ic--sun { display: block; }
html[data-mode="dark"] .ic--moon { display: none; }
.chip { display: inline-flex; align-items: center; padding: .12rem .7rem; border-radius: var(--chip-radius); background: var(--c-primary-soft); color: var(--c-link); font-size: .76rem; font-weight: 700; line-height: 1.7; white-space: nowrap; }
a.chip:hover { background: var(--c-primary); color: var(--c-primary-ink); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; font-size: .8rem; color: var(--c-muted); }
.meta__date, .meta__views, .meta__time { display: inline-flex; align-items: center; gap: .3rem; }
.meta .ic { width: 1.05em; height: 1.05em; opacity: .8; }

/* ───────── navigation (shared behaviour) ───────── */
.nav__list { display: flex; align-items: stretch; gap: .15rem; }
.nav__item { position: relative; }
.nav__link { display: inline-flex; align-items: center; gap: .3rem; height: 100%; padding: .55rem .85rem; font-weight: 700; font-size: .93rem; white-space: nowrap; border-radius: var(--radius-sm); transition: background-color .2s, color .2s; }
.nav__link .ic { width: .95em; height: .95em; opacity: .7; transition: transform .25s var(--ease); }
.nav__item.has-sub > .nav__link[aria-expanded="true"] .ic { transform: rotate(180deg); }
.nav__sub { position: absolute; inset-block-start: 100%; inset-inline-start: 0; z-index: 60; min-width: 15rem; padding-block-start: .5rem; visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s var(--ease), visibility .2s; }
.nav__sub > ul { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-3); padding: .5rem; display: grid; gap: .1rem; }
.nav__sub > ul.is-wide { grid-template-columns: repeat(2, minmax(13rem, 1fr)); min-width: 30rem; }
.nav__sub a { display: block; padding: .5rem .8rem; border-radius: var(--radius-sm); font-size: .9rem; line-height: 1.6; }
.nav__sub a:hover, .nav__sub a[aria-current="page"] { background: var(--c-primary-soft); color: var(--c-link); }
.nav__item.has-sub:hover > .nav__sub, .nav__item.has-sub.is-open > .nav__sub, .nav__item.has-sub:focus-within > .nav__sub { visibility: visible; opacity: 1; transform: none; }
.nav__head { display: none; }
.nav-toggle { display: none; }

@media (max-width: 1199px) {
  .nav-toggle { display: inline-grid; }
  .nav { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 120; width: min(22rem, 88vw); background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-3); padding: 0 1rem 2rem; overflow-y: auto; transform: translateX(105%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s; }
  html[dir="rtl"] .nav { transform: translateX(105%); }
  body.nav-open .nav { transform: none; visibility: visible; }
  body.nav-open { overflow: hidden; }
  body.nav-open::before { content: ""; position: fixed; inset: 0; z-index: 110; background: rgb(0 0 0 / .5); backdrop-filter: blur(2px); }
  .nav__head { display: flex; align-items: center; justify-content: space-between; position: sticky; inset-block-start: 0; background: var(--c-surface); padding-block: .8rem; margin-block-end: .5rem; border-block-end: 1px solid var(--c-border); font-family: var(--font-head); font-weight: 700; z-index: 1; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { width: 100%; justify-content: space-between; padding: .85rem .5rem; font-size: 1rem; border-block-end: 1px solid var(--c-border); border-radius: 0; color: var(--c-text) !important; background: none !important; }
  .nav__sub { position: static; visibility: visible; opacity: 1; transform: none; padding: 0; display: none; min-width: 0; }
  .nav__item.is-open > .nav__sub { display: block; }
  .nav__sub > ul, .nav__sub > ul.is-wide { grid-template-columns: minmax(0, 1fr); min-width: 0; border: 0; box-shadow: none; background: var(--c-surface-2); border-radius: 0; padding: .3rem .5rem; }
  .nav__item.has-sub:hover > .nav__sub { display: none; }
  .nav__item.has-sub.is-open > .nav__sub { display: block; }
  /* a sticky bar is a stacking context of its own: lift it with the drawer it holds, or the drawer opens under the backdrop */
  body.nav-open [data-sticky]:has(.nav) { z-index: 120; }
}

/* ───────── sections ───────── */
.sec { padding-block: var(--sec-pad); }
.sec__head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-block-end: calc(var(--gap) * 1.2); flex-wrap: wrap; }
.sec__kicker { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--c-accent); margin-block-end: .2rem; }
.sec__title { font-size: calc(clamp(1.45rem, 1.1rem + 1.5vw, 2.1rem) * var(--head-scale, 1)); }
.sec__more { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .9rem; color: var(--c-link); padding: .3rem 0; border-block-end: 2px solid transparent; transition: gap .2s, border-color .2s; }
.sec__more:hover { gap: .7rem; border-color: currentColor; }
[data-reveal] { opacity: 1; }
html[data-motion="on"].js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html[data-motion="on"].js [data-reveal].is-in { opacity: 1; transform: none; }

/* ───────── cards ───────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19.5rem), 1fr)); gap: var(--gap); }
.card { display: flex; flex-direction: column; background: var(--card-bg); border: var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; position: relative; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
/* covers that would lose a real part when cropped are shown whole over a blurred copy (class set by site.js) */
.fit__bg { position: absolute; inset: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; filter: blur(22px) saturate(1.15) brightness(.78); opacity: 0; pointer-events: none; }
.fit__img { position: relative; }
.is-fit > .fit__bg { opacity: 1; }
.is-fit > .fit__img { object-fit: contain; }
.card__media { display: block; position: relative; aspect-ratio: var(--cover-ratio, 16/9); overflow: hidden; background: var(--c-surface-2); }
.card__img, .card__media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; gap: .6rem; padding: 1.1rem 1.2rem 1.2rem; flex: 1; }
html[data-cards="flat"] .card__body { padding-inline: 0; }
.card__title { font-size: calc(1.08rem * var(--head-scale, 1)); line-height: 1.6; }
.card__title a { background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 1.5px; transition: background-size .3s; }
.card__title a:hover { background-size: 100% 1.5px; color: var(--c-link); }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__text { margin: 0; color: var(--c-muted); font-size: .9rem; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__more { display: inline-flex; align-items: center; gap: .35rem; margin-block-start: auto; padding-block-start: .3rem; font-size: .85rem; font-weight: 700; color: var(--c-link); position: relative; z-index: 1; }
.card__more .ic { width: 1em; height: 1em; transition: transform .25s var(--ease); }
.card:hover .card__more .ic { transform: translateX(-4px); }
.card .chip { position: relative; z-index: 1; }
.cards--list { grid-template-columns: minmax(0, 1fr); }
.cards--list .card { flex-direction: row; }
.cards--list .card__media { flex: 0 0 min(34%, 17rem); aspect-ratio: auto; min-height: 9.5rem; }
.cards--list .card__title { font-size: calc(1.18rem * var(--head-scale, 1)); }
@media (max-width: 640px) { .cards--list .card { flex-direction: column; } .cards--list .card__media { flex: none; aspect-ratio: var(--cover-ratio, 16/9); min-height: 0; } }
.rows { display: grid; grid-template-columns: minmax(0, 1fr); }
.row a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .1rem .8rem; padding: .85rem 0; border-block-end: 1px solid var(--c-border); transition: color .2s; }
.row a:hover { color: var(--c-link); }
.row__n { grid-row: span 2; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--c-faint); line-height: 1.5; font-variant-numeric: tabular-nums; }
.row__t { font-weight: 700; font-size: .93rem; line-height: 1.65; }
.row__d { font-size: .76rem; color: var(--c-muted); }

/* ───────── sliders ───────── */
[data-slide] { transition: opacity .7s var(--ease), transform .7s var(--ease), visibility .7s; }
.slider { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: #14161a; aspect-ratio: 16 / 10; isolation: isolate; }
.slide { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; opacity: 0; visibility: hidden; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
/* the whole picture is shown; a blurred copy of it fills what is left of the frame */
.smedia { position: relative; overflow: hidden; min-height: 0; background: #14161a; }
.smedia__bg { position: absolute; inset: -8%; width: 116%; height: 116%; max-width: none; object-fit: cover; filter: blur(28px) saturate(1.2) brightness(calc(1.05 - var(--hero-overlay, .5) * .8)); }
.smedia__img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.slide__cap { position: relative; z-index: 2; padding: 1rem clamp(1rem, 2.5vw, 1.8rem) 3.3rem; background: var(--c-brand); color: var(--c-brand-ink); }
.slide__title { font-size: calc(clamp(1.05rem, .85rem + .9vw, 1.5rem) * var(--head-scale, 1)); line-height: 1.6; }
.slide__title a:hover { text-decoration: underline; text-underline-offset: .3em; }
.slide__cap p { margin: .5rem 0 0; opacity: .9; }
.slider__nav { position: absolute; inset-inline: 0; inset-block-end: .9rem; z-index: 3; display: flex; align-items: center; justify-content: center; gap: .6rem; }
.slider__btn { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .18); color: #fff; backdrop-filter: blur(8px); transition: background-color .2s; }
.slider__btn:hover { background: rgb(255 255 255 / .38); }
.slider__dots { display: flex; gap: .4rem; align-items: center; }
.slider__dots button { width: .55rem; height: .55rem; border-radius: 999px; background: rgb(255 255 255 / .5); transition: width .3s var(--ease), background-color .3s; }
.slider__dots button.is-active { width: 1.8rem; background: #fff; }

/* ───────── announcement bar + ticker ───────── */
.annbar { background: var(--c-brand-deep); color: #fff; font-size: .9rem; }
.annbar__in { display: flex; align-items: center; gap: 1rem; min-height: 2.9rem; }
.annbar__label { display: inline-flex; align-items: center; gap: .4rem; flex: none; font-weight: 700; padding: .2rem .9rem; border-radius: var(--chip-radius); background: var(--c-accent); color: var(--c-accent-ink); font-size: .82rem; }
.marquee { overflow: hidden; flex: 1; mask-image: linear-gradient(to left, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(to left, transparent, #000 4%, #000 96%, transparent); }
.marquee__track { display: inline-flex; gap: 3.5rem; white-space: nowrap; will-change: transform; }
.marquee__track li { display: inline-flex; align-items: center; gap: 3.5rem; }
.marquee__track li::after { content: "◆"; font-size: .5rem; opacity: .6; }
.marquee__track a:hover { text-decoration: underline; text-underline-offset: .3em; }
html[data-motion="on"] .marquee.is-ready .marquee__track { animation: marquee var(--marquee-time, 40s) linear infinite; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(50% + 1.75rem)); } }
.ticker { border-block-end: 1px solid var(--c-border); background: var(--c-surface); font-size: .92rem; }
.ticker__in { display: flex; align-items: center; gap: 1rem; min-height: 3.2rem; }
.ticker__label { flex: none; font-family: var(--font-head); font-weight: 700; color: var(--c-link); display: inline-flex; align-items: center; gap: .5rem; }
.ticker__label::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 0 var(--c-accent); }
html[data-motion="on"] .ticker__label::before { animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 .5rem transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.ticker__view { position: relative; flex: 1; height: 3.2rem; overflow: hidden; }
.ticker__item { position: absolute; inset: 0; display: flex; align-items: center; gap: .8rem; opacity: 0; visibility: hidden; transform: translateY(60%); }
.ticker__item.is-active { opacity: 1; visibility: visible; transform: none; }
.ticker__item time { flex: none; font-size: .76rem; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.ticker__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ticker__item:hover span { color: var(--c-link); }
.ticker__nav { display: flex; gap: .2rem; flex: none; }
.ticker__nav button { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--c-border); transition: background-color .2s, color .2s; }
.ticker__nav button:hover { background: var(--c-primary); color: var(--c-primary-ink); border-color: transparent; }
@media (max-width: 640px) { .ticker__item time { display: none; } .annbar__label span { display: none; } }

/* ───────── quick links, stats ───────── */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--gap); }
.quick__item { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem 1rem; align-items: center; padding: 1.25rem 1.3rem; background: var(--card-bg); border: var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.quick__item:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--c-primary); }
.quick__icon { grid-row: span 2; width: 3.1rem; height: 3.1rem; display: grid; place-items: center; border-radius: var(--radius); background: var(--c-primary-soft); color: var(--c-link); transition: background-color .3s, color .3s; }
.quick__icon .ic { width: 1.5rem; height: 1.5rem; }
.quick__item:hover .quick__icon { background: var(--c-primary); color: var(--c-primary-ink); }
.quick__title { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.5; }
.quick__desc { font-size: .82rem; color: var(--c-muted); line-height: 1.6; }
.quick__go { position: absolute; inset-block-start: .9rem; inset-inline-end: .9rem; color: var(--c-faint); opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s var(--ease); }
.quick__item:hover .quick__go { opacity: 1; transform: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: var(--gap); text-align: center; }
.stat { display: flex; flex-direction: column-reverse; gap: .2rem; padding: 1.2rem .5rem; }
.stat__num { font-family: var(--font-head); font-weight: 700; font-size: calc(clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem) * var(--head-scale, 1)); line-height: 1.15; color: var(--c-link); font-variant-numeric: tabular-nums; direction: ltr; }
.stat__label { color: var(--c-muted); font-size: .92rem; }

/* ───────── horizontal scrollers, videos, reports ───────── */
.scroller { position: relative; }
.scroller__track { display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 19.5rem); gap: var(--gap); overflow-x: auto; scroll-snap-type: inline mandatory; padding-block: .4rem 1.1rem; scrollbar-width: thin; scrollbar-color: var(--c-border-strong) transparent; }
.scroller__track > * { scroll-snap-align: start; }
.scroller__nav { position: absolute; inset-block-start: calc(-1 * var(--gap) * 1.2 - 2.9rem); inset-inline-end: 0; display: flex; gap: .4rem; }
.sec__head + .sec__body .scroller__nav { inset-inline-end: auto; inset-inline-start: 50%; transform: translateX(50%); display: none; }
.scroller__nav button { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--c-border-strong); background: var(--c-surface); transition: background-color .2s, color .2s, border-color .2s; }
.scroller__nav button:hover { background: var(--c-primary); color: var(--c-primary-ink); border-color: transparent; }
.scroller__nav button[disabled] { opacity: .35; pointer-events: none; }
.sec:has(.scroller) .sec__head { padding-inline-end: 0; }
.sec:has(.scroller) .sec__more { margin-inline-end: 6.2rem; }
.sec__body:has(> .scroller) .scroller__nav { display: flex; inset-inline-start: auto; inset-inline-end: 0; transform: none; }
@media (max-width: 640px) { .sec__body:has(> .scroller) .scroller__nav { display: none; } .sec:has(.scroller) .sec__more { margin-inline-end: 0; } }
.vcard { display: flex; flex-direction: column; gap: .7rem; text-align: start; width: 100%; }
.vcard__media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #111; }
.vcard__img, .vcard__media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; opacity: .92; }
.vcard:hover .vcard__img { transform: scale(1.05); opacity: 1; }
.vcard__play { position: absolute; inset: 0; margin: auto; width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .92); color: var(--c-brand); box-shadow: 0 8px 30px rgb(0 0 0 / .35); transition: transform .3s var(--ease), background-color .3s, color .3s; }
.vcard__play .ic { width: 1.5rem; height: 1.5rem; fill: currentColor; margin-inline-start: -.15rem; }
.vcard:hover .vcard__play { transform: scale(1.12); background: var(--c-primary); color: var(--c-primary-ink); }
.vcard__title { font-weight: 700; font-size: .95rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: var(--gap); }
.report { display: flex; flex-direction: column; background: var(--card-bg); border: var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.report:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.report__media { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-surface-2); }
.report__img, .report__media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.report:hover .report__img { transform: scale(1.04); }
.report__body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
html[data-cards="flat"] .report__body { padding-inline: 0; }
.report__title { font-size: .98rem; line-height: 1.7; }
.report__title a:hover { color: var(--c-link); }
.report__file { margin-block-start: auto; display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 700; color: var(--c-link); }

/* ───────── map and training centres ───────── */
.map { width: 100%; height: auto; overflow: visible; }
.map__land { fill: var(--c-primary-soft); stroke: var(--c-primary); stroke-width: 3; stroke-linejoin: round; }
.map__river { fill: none; stroke: var(--c-primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: .28; }
.map__halo { fill: var(--c-accent); opacity: .22; transform-box: fill-box; transform-origin: center; transition: transform .3s var(--ease), opacity .3s; }
.map__dot { fill: var(--c-primary); stroke: var(--c-surface); stroke-width: 3; transition: fill .2s; }
.map__count { font-family: var(--font-body); font-size: 20px; font-weight: 700; fill: var(--c-primary-ink); pointer-events: none; }
.map__name { font-family: var(--font-body); font-size: 27px; font-weight: 700; fill: var(--c-text); paint-order: stroke; stroke: var(--c-surface); stroke-width: 7; stroke-linejoin: round; pointer-events: none; }
.map__pin { cursor: pointer; outline: none; }
.map__pin:hover .map__halo, .map__pin:focus-visible .map__halo, .map__pin.is-active .map__halo { transform: scale(1.5); opacity: .4; }
.map__pin:hover .map__dot, .map__pin:focus-visible .map__dot, .map__pin.is-active .map__dot { fill: var(--c-accent); }
.map__pin.is-dim { opacity: .25; }
.centers-teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.centers-teaser__map { max-width: 36rem; margin-inline: auto; width: 100%; }
.lead { font-size: 1.1rem; line-height: 1.9; color: var(--c-muted); }
.govs { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1.2rem 1.6rem; }
.govs a { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .4rem .3rem .9rem; border: 1px solid var(--c-border); border-radius: var(--chip-radius); font-size: .86rem; font-weight: 700; background: var(--c-surface); transition: border-color .2s, color .2s, background-color .2s; }
.govs a:hover { border-color: var(--c-primary); color: var(--c-link); }
.govs b { min-width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 999px; background: var(--c-primary-soft); color: var(--c-link); font-size: .76rem; padding-inline: .3rem; }
@media (max-width: 860px) { .centers-teaser { grid-template-columns: minmax(0, 1fr); } }
.centers { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 3vw, 3rem); padding-block: var(--sec-pad); align-items: start; }
.centers__sticky { position: sticky; inset-block-start: calc(var(--header-h) + 1rem); }
.centers__hint { display: flex; gap: .4rem; align-items: center; font-size: .8rem; color: var(--c-muted); margin-block-start: .5rem; }
.govgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); margin-block-start: var(--gap); }
.gov { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.2rem 1.3rem; scroll-margin-top: calc(var(--header-h) + 1.5rem); transition: border-color .3s, box-shadow .3s; }
.gov.is-active, .gov:target { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.gov__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-end: .8rem; }
.gov__name { display: inline-flex; align-items: center; gap: .4rem; font-size: 1.2rem; }
.gov__name .ic { color: var(--c-accent); }
.gov__count { font-size: .8rem; font-weight: 700; color: var(--c-muted); }
.gov__specs { display: flex; flex-wrap: wrap; gap: .4rem; }
.gov__specs li { padding: .15rem .7rem; border-radius: var(--chip-radius); background: var(--c-surface-2); font-size: .84rem; line-height: 1.8; }
.gov__specs li.is-match { background: var(--c-accent); color: var(--c-accent-ink); font-weight: 700; }
@media (max-width: 900px) { .centers { grid-template-columns: minmax(0, 1fr); } .centers__sticky { position: static; max-width: min(30rem, 100%); margin-inline: auto; } }

/* ───────── call to action ───────── */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: var(--radius-lg); background: var(--c-primary-soft); border: 1px solid var(--c-border); }
.cta__title { font-size: calc(clamp(1.3rem, 1rem + 1.2vw, 1.8rem) * var(--head-scale, 1)); margin-block-end: .3rem; }
.cta p { margin: 0; color: var(--c-muted); max-width: 46ch; }
.cta--inline { margin-block-start: calc(var(--gap) * 2); }

/* ───────── inner pages ───────── */
.phero { background: var(--c-surface); border-block-end: 1px solid var(--c-border); padding-block: clamp(1.6rem, 4vw, 3rem); }
.phero__title { font-size: calc(clamp(1.5rem, 1.1rem + 2vw, 2.45rem) * var(--head-scale, 1)); line-height: 1.5; max-width: 30em; }
.phero__sub { margin: .6rem 0 0; color: var(--c-muted); font-size: 1.02rem; }
.phero__kicker { color: var(--c-accent); font-weight: 700; font-size: .85rem; }
.phero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-block-start: .9rem; font-size: .82rem; color: var(--c-muted); }
.crumbs { margin-block-end: .9rem; font-size: .8rem; color: var(--c-muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .15rem .5rem; }
.crumbs li + li::before { content: "‹"; margin-inline-end: .5rem; opacity: .6; }
.crumbs a:hover { color: var(--c-link); text-decoration: underline; text-underline-offset: .25em; }
.listing { padding-block: var(--sec-pad); }
.article { padding-block: var(--sec-pad); }
.article__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem); gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; }
.article__grid--single { grid-template-columns: minmax(0, 52rem); justify-content: center; }
.article__cover { margin: 0 0 1.75rem; border-radius: var(--radius-lg); overflow: hidden; background: var(--c-surface-2); }
.article__cover img { width: 100%; max-height: 36rem; object-fit: contain; }
.article__side { position: sticky; inset-block-start: calc(var(--header-h) + 1.2rem); display: grid; gap: 1rem; }
.side__title { font-size: 1.15rem; padding-block-end: .7rem; border-block-end: 2px solid var(--c-primary); margin-block: 0 .2rem; }
.related { margin-block-start: calc(var(--gap) * 2); display: grid; gap: var(--gap); }
.listing > .side__title { margin-block: calc(var(--gap) * 1.5) var(--gap); }
.sublist { display: grid; grid-template-columns: minmax(0, 1fr); }
.sublist a { display: block; padding: .6rem .8rem; border-radius: var(--radius-sm); font-size: .92rem; border-inline-start: 3px solid transparent; transition: background-color .2s, color .2s, border-color .2s; }
.sublist a:hover { background: var(--c-surface-2); color: var(--c-link); }
.sublist a[aria-current="page"] { background: var(--c-primary-soft); color: var(--c-link); font-weight: 700; border-color: var(--c-primary); }
.sublist--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .4rem; }
.sublist--wide a { border: 1px solid var(--c-border); background: var(--c-surface); }
.article__foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-block-start: 2.2rem; padding-block-start: 1.4rem; border-block-start: 1px solid var(--c-border); }
.share { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.share__label { font-size: .85rem; font-weight: 700; color: var(--c-muted); margin-inline-end: .4rem; }
.share__btn { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--c-border); background: var(--c-surface); transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.share__btn:hover { background: var(--c-primary); color: var(--c-primary-ink); border-color: transparent; transform: translateY(-2px); }
.article__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-block-start: 1.6rem; }
.article__navlink { display: grid; gap: .3rem; padding: 1rem 1.2rem; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); transition: border-color .2s, transform .2s var(--ease); }
.article__navlink:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.article__navlink span { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--c-muted); }
.article__navlink b { font-size: .92rem; line-height: 1.6; }
.article__navlink--prev { text-align: end; }
.article__navlink--prev span { justify-content: flex-end; }
@media (max-width: 960px) { .article__grid { grid-template-columns: minmax(0, 1fr); } .article__side { position: static; } }
@media (max-width: 560px) { .article__nav { grid-template-columns: minmax(0, 1fr); } }

/* rich text coming from the editor */
.prose { font-size: 1.06rem; line-height: 2.05; overflow-wrap: anywhere; }
.prose > * + * { margin-block-start: 1.15em; }
.prose p { margin: 0; }
.prose h2 { font-size: calc(1.5rem * var(--head-scale, 1)); margin-block-start: 1.8em; }
.prose h3 { font-size: calc(1.25rem * var(--head-scale, 1)); margin-block-start: 1.6em; }
.prose h4 { font-size: 1.08rem; }
.prose a { color: var(--c-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-inline-start: 1.6em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-block-start: .35em; }
.prose li::marker { color: var(--c-accent); font-weight: 700; }
.prose img { border-radius: var(--radius); margin-inline: auto; }
.prose blockquote { margin-inline: 0; padding: .8rem 1.3rem; border-inline-start: 4px solid var(--c-accent); background: var(--c-surface-2); border-radius: var(--radius-sm); color: var(--c-muted); }
.prose hr { border: 0; border-block-start: 1px solid var(--c-border); margin-block: 2em; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.prose video { width: 100%; border-radius: var(--radius); }
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius); }
.prose table { width: 100%; font-size: .93rem; line-height: 1.7; }
.prose th, .prose td { padding: .6rem .85rem; border-block-end: 1px solid var(--c-border); text-align: start; vertical-align: top; }
.prose tr:first-child > * { background: var(--c-primary-soft); font-weight: 700; }
.prose tr:nth-child(even) > td { background: var(--c-surface-2); }
.prose tr:last-child > * { border-block-end: 0; }
.prose mark { background: var(--c-accent-soft); color: inherit; padding: 0 .2em; border-radius: 3px; }
.ta-center { text-align: center; } .ta-right { text-align: right; } .ta-left { text-align: left; } .ta-justify { text-align: justify; }
.c-primary { color: var(--c-link); } .c-accent { color: var(--c-accent); } .c-danger { color: var(--danger); } .c-success { color: var(--ok); } .c-muted { color: var(--c-muted); }
.note { padding: .9rem 1.2rem; border-radius: var(--radius); background: var(--c-primary-softer); border: 1px solid var(--c-border); }
.note-warn { background: var(--c-accent-soft); }
.badge { display: inline-block; padding: 0 .6em; border-radius: 999px; background: var(--c-primary); color: var(--c-primary-ink); font-size: .8em; font-weight: 700; }

.attach { margin-block-start: 2.2rem; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); overflow: hidden; }
.attach__title { display: flex; align-items: center; gap: .5rem; font-size: 1.02rem; padding: .85rem 1.2rem; background: var(--c-surface-2); border-block-end: 1px solid var(--c-border); }
.attach__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .9rem; padding: .8rem 1.2rem; border-block-end: 1px solid var(--c-border); transition: background-color .2s; }
.attach__list li:last-child .attach__item { border-block-end: 0; }
.attach__item:hover { background: var(--c-primary-softer); color: var(--c-link); }
.attach__name { font-weight: 700; font-size: .92rem; line-height: 1.6; }
.attach__size { font-size: .78rem; color: var(--c-muted); white-space: nowrap; }
.ext { display: inline-grid; place-items: center; min-width: 3.1rem; padding: .15rem .45rem; border-radius: var(--radius-sm); background: var(--c-muted); color: var(--c-bg); font-size: .68rem; font-weight: 700; letter-spacing: .03em; direction: ltr; }
.ext--pdf { background: #c0392b; color: #fff; } .ext--doc, .ext--docx { background: #2b5fb4; color: #fff; } .ext--xls, .ext--xlsx, .ext--csv { background: #1e7a46; color: #fff; } .ext--ppt, .ext--pptx { background: #c4571d; color: #fff; } .ext--jpg, .ext--jpeg, .ext--png { background: #7a4fb8; color: #fff; }

.pager { display: flex; justify-content: center; align-items: center; gap: .6rem; margin-block-start: calc(var(--gap) * 2); flex-wrap: wrap; }
.pager ol { display: flex; gap: .3rem; flex-wrap: wrap; }
.pager li a, .pager li span, .pager__step { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 2.6rem; height: 2.6rem; padding-inline: .7rem; border-radius: var(--radius); border: 1px solid var(--c-border); background: var(--c-surface); font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; transition: background-color .2s, color .2s, border-color .2s; }
.pager li a:hover, .pager__step:hover { border-color: var(--c-primary); color: var(--c-link); }
.pager li span[aria-current] { background: var(--c-primary); color: var(--c-primary-ink); border-color: transparent; }
.pager__gap { align-self: center; color: var(--c-muted); padding-inline: .3rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1.1rem var(--gap); }
.filter { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem 1rem; border-radius: var(--chip-radius); border: 1px solid var(--c-border); background: var(--c-surface); font-weight: 700; font-size: .88rem; transition: border-color .2s, color .2s, background-color .2s; }
.filter b { font-size: .74rem; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.filter:hover { border-color: var(--c-primary); color: var(--c-link); }
.filter.is-active { background: var(--c-primary); color: var(--c-primary-ink); border-color: transparent; }
.filter.is-active b { color: inherit; opacity: .8; }
.searchbar { display: flex; align-items: center; gap: .6rem; padding: .35rem .4rem .35rem 1rem; border: 1.5px solid var(--c-border-strong); border-radius: var(--btn-radius); background: var(--c-surface); transition: border-color .2s, box-shadow .2s; }
.searchbar:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-soft); }
.searchbar > .ic { color: var(--c-muted); }
.searchbar input, .searchbar select { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; min-height: 2.6rem; }
.searchbar select { cursor: pointer; }
.searchbar--filter { padding-inline-end: 1rem; }
.searchbar__count { font-size: .78rem; color: var(--c-muted); white-space: nowrap; }
.forms__group { font-size: 1.1rem; margin-block: var(--gap) .7rem; color: var(--c-link); }
.forms { display: grid; grid-template-columns: minmax(0, 1fr); gap: .55rem; margin-block-start: var(--gap); }
.form__link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: .9rem 1.2rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; }
.form__link:hover { border-color: var(--c-primary); transform: translateX(-4px); box-shadow: var(--shadow-1); }
.form__title { font-weight: 700; line-height: 1.6; }
.form__size { font-size: .78rem; color: var(--c-muted); white-space: nowrap; }
.form__dl { display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; font-weight: 700; color: var(--c-link); white-space: nowrap; }
@media (max-width: 560px) { .form__link { grid-template-columns: auto minmax(0, 1fr) auto; } .form__size { display: none; } .form__dl { font-size: 0; gap: 0; } .form__dl .ic { font-size: 1.1rem; } .attach__item { grid-template-columns: auto minmax(0, 1fr) auto; } .attach__size { display: none; } }
.infocards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--gap); margin-block-end: var(--gap); }
.infocard { display: grid; gap: .2rem; padding: 1.2rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); }
.infocard__icon { color: var(--c-accent); }
.infocard__label { font-size: .78rem; color: var(--c-muted); }
.infocard__value { font-weight: 700; }
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .75rem; margin-block-start: var(--gap); }
.contact { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon label copy" "icon mail copy"; align-items: center; gap: 0 .9rem; padding: .9rem 1rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.contact:hover { border-color: var(--c-primary); box-shadow: var(--shadow-1); }
.contact__icon { grid-area: icon; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-link); }
.contact__label { grid-area: label; font-weight: 700; font-size: .95rem; line-height: 1.6; }
.contact__mail { grid-area: mail; font-size: .82rem; color: var(--c-muted); justify-self: start; max-width: 100%; overflow-wrap: anywhere; }
.contact__label { min-width: 0; overflow-wrap: anywhere; }
.contact__mail:hover { color: var(--c-link); text-decoration: underline; }
.contact__copy { grid-area: copy; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; color: var(--c-muted); transition: background-color .2s, color .2s; }
.contact__copy:hover { background: var(--c-primary-soft); color: var(--c-link); }
.empty { display: grid; justify-items: center; gap: .7rem; padding: 3rem 1rem; text-align: center; color: var(--c-muted); }
.empty > .ic { width: 2.6rem; height: 2.6rem; opacity: .5; }
.empty p { margin: 0; }
.empty--soon { border: 1.5px dashed var(--c-border-strong); border-radius: var(--radius-lg); background: var(--c-surface); }
.errorpage { display: grid; justify-items: center; gap: .8rem; text-align: center; padding-block: clamp(3rem, 10vw, 7rem); }
.errorpage__code { font-family: var(--font-head); font-size: clamp(4.5rem, 16vw, 9rem); font-weight: 700; line-height: 1; color: var(--c-primary-soft); -webkit-text-stroke: 2px var(--c-primary); direction: ltr; }
.errorpage p { color: var(--c-muted); max-width: 44ch; }
.errorpage__actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }

/* ───────── complaint form (ported from the governance app's public complaint page) ───────── */
.complaint { padding-block: var(--sec-pad); display: grid; justify-items: center; }
.cp-card { width: min(100%, 38rem); display: grid; gap: 1.1rem; padding: clamp(1.4rem, 4vw, 2.4rem); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.cp-intro { margin: 0; color: var(--c-muted); }
.cp-field { display: grid; gap: .4rem; }
.cp-field > span { font-weight: 700; font-size: .92rem; }
.cp-input { width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--c-border-strong); border-radius: var(--radius); background: var(--c-bg); outline: none; transition: border-color .2s, box-shadow .2s; }
.cp-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-soft); }
.cp-input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent); }
.cp-input.dir-ltr { display: block; text-align: left; }
.cp-area { resize: vertical; min-height: 9rem; line-height: 1.9; }
.cp-send { justify-self: stretch; min-height: 3.2rem; font-size: 1.02rem; }
.cp-msg { margin: 0; min-height: 1.6em; font-weight: 700; text-align: center; }
.cp-msg.cp-err { color: var(--danger); }
.cp-note { margin: 0; font-size: .82rem; color: var(--c-muted); text-align: center; }
.cp-done, .cp-closed { justify-items: center; text-align: center; }
.cp-done p, .cp-closed p { margin: 0; }
.cp-check { width: 4.2rem; height: 4.2rem; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.cp-check .ic { width: 2.2rem; height: 2.2rem; }
.cp-big { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; }
.cq { justify-items: center; text-align: center; }
.cq__title { font-size: 2.2rem; }
.cq__org, .cq__hint, .cq__url { margin: 0; }
.cq__img { width: min(100%, 22rem); border-radius: var(--radius); background: #fff; padding: .6rem; }
.cq__url { font-size: .82rem; color: var(--c-muted); }

/* ───────── overlays ───────── */
dialog { border: 0; padding: 0; color: var(--c-text); max-width: none; max-height: none; }
dialog::backdrop { background: rgb(0 0 0 / .62); backdrop-filter: blur(6px); }
.searchdlg { width: min(100% - 2rem, 44rem); margin-block-start: 12vh; background: transparent; }
.searchdlg__form { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem .6rem 1.1rem; background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); }
.searchdlg__form > .ic { color: var(--c-muted); }
.searchdlg__form input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 1.1rem; min-height: 3rem; }
.searchdlg__hint { text-align: center; color: #fff; opacity: .75; font-size: .85rem; margin-block-start: .9rem; }
.lightbox { width: min(100% - 1.5rem, 68rem); background: transparent; overflow: visible; }
.lightbox__stage { border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-3); }
.lightbox__stage iframe, .lightbox__stage video { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000; }
.lightbox__stage img { width: 100%; max-height: 82vh; object-fit: contain; }
.lightbox__title { color: #fff; text-align: center; margin: .9rem 0 0; font-weight: 700; }
.lightbox__close { position: absolute; inset-block-start: -3.2rem; inset-inline-end: 0; color: #fff; background: rgb(255 255 255 / .15); }
.totop { position: fixed; inset-block-end: 1.3rem; inset-inline-start: 1.3rem; z-index: 90; width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--c-primary); color: var(--c-primary-ink); box-shadow: var(--shadow-2); transition: transform .25s var(--ease), opacity .25s; }
.totop:hover { transform: translateY(-3px); }
.toast { position: fixed; inset-block-end: 1.4rem; inset-inline: 0; margin-inline: auto; width: fit-content; max-width: calc(100% - 2rem); z-index: 300; padding: .7rem 1.3rem; border-radius: 999px; background: var(--c-text); color: var(--c-bg); font-weight: 700; font-size: .9rem; box-shadow: var(--shadow-3); }
.adminbar { position: fixed; inset-block-end: 1.3rem; inset-inline-end: 1.3rem; z-index: 95; display: flex; gap: .3rem; padding: .3rem; border-radius: 999px; background: #111; color: #fff; box-shadow: var(--shadow-3); font-size: .82rem; font-weight: 700; }
.adminbar a { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem; border-radius: 999px; }
.adminbar a:hover { background: rgb(255 255 255 / .16); }
.social { display: flex; gap: .4rem; align-items: center; }
.social a { width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.social a:hover { transform: translateY(-2px); background: color-mix(in srgb, currentColor 14%, transparent); }

/* ───────── motion preferences, print ───────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
@media print {
  [data-noprint], .totop, .adminbar, .share, .article__side, .article__nav, .skip, dialog { display: none !important; }
  body { background: #fff; color: #000; }
  .phero { border: 0; padding-block: 0 1rem; }
  .article__grid { display: block; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* grid children may shrink below their content width (long words, wide tables) */
.article__main, .article__side, .centers__list, .centers__map, .hero__copy, .deck, .feat__copy, .feat__media, .mag__feature, .vgrid__main { min-width: 0; }
@media (max-width: 420px) { .btn { white-space: normal; text-align: center; } }

/* ───────── phones ─────────
 * Long stacks of large cards are replaced by denser patterns: two-column tiles for quick links and
 * figures, a snapping rail (the next card peeks in from the edge) for card rows, compact rows in listings.
 */
@media (max-width: 640px) {
  :root { --gap: calc(var(--space, 1) * 1rem); --sec-pad: calc(var(--space, 1) * 2.2rem); --gutter: 1rem; }
  .container { width: calc(100% - 2 * var(--gutter)); }
  .sec__head { margin-block-end: 1rem; gap: .4rem .8rem; }
  .sec__title { font-size: calc(1.4rem * var(--head-scale, 1)); }
  .sec__more { min-height: 2.6rem; }
  .lead { font-size: 1rem; }

  /* rails */
  .scroller__track, .sec--reports .reports, .sec--latest .cards {
    display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78%, 18.5rem); gap: .8rem;
    overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: inline mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter)); padding: .3rem var(--gutter) .9rem; scrollbar-width: none;
  }
  :is(.scroller__track, .sec--reports .reports, .sec--latest .cards)::-webkit-scrollbar { display: none; }
  :is(.scroller__track, .sec--reports .reports, .sec--latest .cards) > * { scroll-snap-align: start; min-width: 0; }
  .sec--latest .cards .card__text { display: none; }
  .sec--latest .cards .card__title, .scroller__track .card__title, .sec--reports .report__title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .card__body { padding: .9rem 1rem 1rem; gap: .5rem; }
  .card__title { font-size: calc(1rem * var(--head-scale, 1)); }
  .card__more { min-height: 2.5rem; }
  .report__body { padding: .8rem .9rem .9rem; gap: .5rem; }
  .report__media { aspect-ratio: 16 / 10; }

  /* listings: a thumbnail beside the title */
  .cards--list { gap: .7rem; }
  :is(.cards--list, .bento) .card:not(.card--feature) { flex-direction: row; align-items: stretch; }
  :is(.cards--list, .bento) .card:not(.card--feature) .card__media { flex: 0 0 34%; aspect-ratio: auto; min-height: 6.4rem; margin: 0; border-radius: 0; }
  :is(.cards--list, .bento) .card:not(.card--feature) .card__body { padding: .7rem .8rem; gap: .35rem; min-width: 0; justify-content: center; }
  :is(.cards--list, .bento) .card:not(.card--feature) .card__title { font-size: calc(.95rem * var(--head-scale, 1)); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  :is(.cards--list, .bento) .card:not(.card--feature) :is(.card__text, .card__more) { display: none; }
  :is(.cards--list, .bento) .card:not(.card--feature) .meta { font-size: .74rem; gap: .2rem .6rem; }

  /* tiles */
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .quick__item { grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: start; text-align: center; gap: .3rem; padding: 1rem .6rem; }
  .quick__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .quick__icon { grid-row: auto; width: 2.7rem; height: 2.7rem; margin-block-end: .2rem; }
  .quick__icon .ic { width: 1.3rem; height: 1.3rem; }
  .quick__title { font-size: 1rem; }
  .quick__desc { font-size: .76rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .quick__go { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: .8rem .4rem; }
  .stat__num { font-size: calc(2rem * var(--head-scale, 1)); }
  .stat__label { font-size: .8rem; line-height: 1.55; }

  /* slider: the picture keeps its own frame and the caption sits under it, so a long title never squeezes the poster */
  .slider { aspect-ratio: auto; display: grid; grid-template-columns: minmax(0, 1fr); }
  .slide { position: relative; inset: auto; grid-area: 1 / 1; grid-template-rows: auto minmax(0, 1fr); }
  .slide .smedia { aspect-ratio: 16 / 9; }
  .slide__cap { padding: .8rem 1rem 3.5rem; }
  .slide__title { font-size: calc(1.02rem * var(--head-scale, 1)); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .slide__cap p { display: none; }
  .slider__nav { inset-block-end: .55rem; }

  /* comfortable tap targets */
  .slider__btn, .ticker__nav button, .share__btn, .contact__copy, .social a { width: 2.6rem; height: 2.6rem; }
  .slider__dots button { position: relative; }
  .slider__dots button::after { content: ""; position: absolute; inset: -1rem -.2rem; }
  .filter { min-height: 2.6rem; }
  /* small controls keep their look; an invisible margin around them takes the finger */
  .langsw { overflow: visible; }
  .langsw .langsw__opt { position: relative; }
  .langsw .langsw__opt:first-child { border-start-start-radius: 999px; border-end-start-radius: 999px; }
  .langsw .langsw__opt:last-child { border-start-end-radius: 999px; border-end-end-radius: 999px; }
  a.chip { position: relative; }
  .langsw .langsw__opt::after, a.chip::after { content: ""; position: absolute; inset: -.55rem -.1rem; }
  .marquee__track a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .report__file { min-height: 2.6rem; }
  .nav__sub a { padding-block: .7rem; }
  .crumbs a { display: inline-block; padding-block: .45rem; }
  .ticker__in { gap: .6rem; }
  .ticker__nav { gap: .1rem; }
  .annbar__in { gap: .7rem; }

  /* inner pages */
  .phero { padding-block: 1.3rem 1.5rem; }
  .phero__title { font-size: calc(1.45rem * var(--head-scale, 1)); line-height: 1.55; }
  .phero__sub { font-size: .95rem; }
  .prose { font-size: 1rem; line-height: 1.95; }
  .prose h2 { font-size: calc(1.3rem * var(--head-scale, 1)); }
  .prose h3 { font-size: calc(1.14rem * var(--head-scale, 1)); }
  /* a wide table scrolls inside its own box; its words and numbers are never split to make it fit */
  .prose table { overflow-wrap: normal; word-break: normal; font-size: .88rem; }
  .prose table:has(tr > :nth-child(4)) { min-width: 34rem; }
  .prose th, .prose td { padding: .5rem .65rem; }
  .article__cover { margin-block-end: 1.2rem; border-radius: var(--radius); }
  .article__foot { margin-block-start: 1.6rem; }
  .attach__item { padding: .8rem .9rem; gap: .7rem; min-height: 3rem; }
  .form__link { padding: .8rem .9rem; gap: .7rem; min-height: 3.2rem; }
  .form__title { font-size: .95rem; }
  .gov { padding: 1rem; }
  .govs a { min-height: 2.6rem; }
  .govs { gap: .4rem; margin-block: 1rem 1.2rem; }
  .centers-teaser .govs li:nth-child(n+10) { display: none; }
  .cta { padding: 1.3rem 1.1rem; gap: 1rem; }
  .cta__btn { width: 100%; }
  .centers-teaser__copy .btn { width: 100%; }
  .pager { gap: .4rem; }
  .pager__step { padding-inline: .55rem; }
  .searchbar { padding-inline: .8rem .35rem; }
  .contact { padding: .8rem .7rem .8rem .9rem; gap: 0 .7rem; }
  .contact__mail { font-size: .75rem; padding-block: .55rem; margin-block: -.3rem; }
  .infocard { padding: 1rem; }
  .cp-card { padding: 1.2rem 1rem; }
  .cp-input { min-height: 2.9rem; font-size: 1rem; }
  .errorpage__actions .btn { flex: 1 1 100%; }
  .totop { inset-block-end: 1rem; inset-inline-start: 1rem; }
}
