:root {
  --q22-paper: #f4efe6;
  --q22-paper-raised: #fbf8f1;
  --q22-paper-deep: #e8ded0;
  --q22-ink: #25211f;
  --q22-ink-soft: #68605a;
  --q22-wine: #721f2b;
  --q22-wine-dark: #52151f;
  --q22-rule: #cfc3b4;
  --q22-shadow: 0 18px 56px rgb(58 36 28 / 0.09);
}

[data-theme="dark"] {
  --q22-paper: #171412;
  --q22-paper-raised: #211d1a;
  --q22-paper-deep: #2c2622;
  --q22-ink: #f0e8dc;
  --q22-ink-soft: #bdb1a5;
  --q22-wine: #c06472;
  --q22-wine-dark: #d48591;
  --q22-rule: #4e443d;
  --q22-shadow: 0 22px 62px rgb(0 0 0 / 0.26);
}

html {
  background: var(--q22-paper);
  color-scheme: light;
}

html[data-theme="dark"] { color-scheme: dark; }

body,
body:has(.avds-page) {
  background: var(--q22-paper);
  color: var(--q22-ink);
  font-family: "Noto Sans", system-ui, sans-serif;
}

.avds-lede, .avds-prose, .error-description { font-family: var(--font-body); }

h1,
h2,
h3,
.avds-title,
.q22-memory-quote {
  color: var(--q22-ink);
  font-family: "Onest", system-ui,sans-serif;
  font-weight: 650;
  letter-spacing: -0.02em;
}

a { text-underline-offset: 0.18em; }
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--q22-wine);
  outline-offset: 3px;
}

/* `static/styles.css` ships `a:hover { color: var(--accent-hover) }`, and AVDS
   redefines only `--accent` (as a bare HSL triple), so `--accent-hover` still
   resolves to the legacy red `#c43b3b`/`#ffaaa0`. That red was the sole hover
   cue for links that own no box and is outside the AVDS palette. Re-pin the
   variable to the product wine for the public surface -- the header and footer
   sit outside `.avds-page`, so the scope is the page that contains it.
   Component rules that declare their own colours do not read it. */
body:has(.avds-page) {
  --accent-hover: var(--q22-wine-dark);
}

/* Content-link contract.
   `static/styles.css` declares `a { color: var(--accent) }`, but AVDS
   redefines --accent as a bare HSL triple, so that declaration is invalid at
   computed-value time. Text-level links that own no box therefore inherited
   body ink with no underline, and their only cue was the legacy
   `--accent-hover` red that is outside the AVDS palette. These containers hold
   inline links inside prose, metadata and disclosure bodies, so they carry the
   product link contract explicitly. Fluid headings and card titles are handled
   separately below: they are set in wine without an underline so display type
   keeps its shape. */
.avds-page :is(
  .q22-faq-section > p > a,
  .q22-rules-grid > section > p > a,
  .q22-home-intro p > a,
  .q22-edition-status > div > a,
  .qantar-report-more > a,
  .qantar-public-map-list li > a,
  .qantar-selected-event > a,
  .qantar-story-stage > a,
  .qantar-document-text > a,
  .qantar-report-access > a,
  .avds-chart-source > a,
  .avds-provenance-strip > a,
  .avds-meta dd > a
) {
  color: var(--q22-wine);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.avds-page :is(
  .q22-faq-section > p > a,
  .q22-rules-grid > section > p > a,
  .q22-home-intro p > a,
  .q22-edition-status > div > a,
  .qantar-report-more > a,
  .qantar-public-map-list li > a,
  .qantar-selected-event > a,
  .qantar-story-stage > a,
  .qantar-document-text > a,
  .qantar-report-access > a,
  .avds-chart-source > a,
  .avds-provenance-strip > a,
  .avds-meta dd > a,
  .avds-panel > h2 > a,
  .avds-source-card a,
  .q22-timeline-card__link
):hover {
  color: var(--q22-wine-dark);
}

/* Card titles and day headings are navigational, so they are set in wine to
   read as links at rest, and take an underline only on hover. */
.avds-page :is(.avds-panel > h2 > a, .avds-source-card a, .q22-timeline-card__link) {
  color: var(--q22-wine);
}

.avds-page :is(.avds-panel > h2 > a, .avds-source-card a, .q22-timeline-card__link):hover {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.q22-header.site-header {
  background: color-mix(in srgb, var(--q22-paper) 94%, transparent);
  border-bottom: 1px solid var(--q22-rule);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

/* The launch header is taller than the inherited 60px shell: its mark is
 * 3.25rem and the two-line brand descriptor needs the extra room.  Keeping
 * --header-h in sync prevents the header border from cutting the descriptor
 * and keeps the mobile drawer and sticky offsets aligned. */
:root {
  --header-h: 5.25rem;
}

@media (max-width: 63.9375rem) {
  :root {
    --header-h: 4.4rem;
  }
}

.q22-header .header-inner {
  width: min(100% - 2rem, 92rem);
  min-height: 5.25rem;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
}

.q22-brand {
  min-width: max-content;
  gap: 0.75rem;
  color: var(--q22-ink);
  text-decoration: none;
}

.q22-brand__mark {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border: 1px solid var(--q22-wine);
  color: var(--q22-wine);
  font-family: "Onest", "Noto Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.q22-brand__copy { display: grid; gap: 0.08rem; }
.q22-brand__copy strong {
  font-family: "Onest", system-ui,sans-serif;
  font-size: 1.2rem;
  line-height: 1.05;
}
.q22-brand__copy small {
  max-width: none;
  white-space: nowrap;
  color: var(--q22-ink-soft);
  font-size: 0.63rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
}

.q22-main-nav { overflow: visible; }
.q22-main-nav .nav-list { gap: clamp(0.15rem, 0.5vw, 0.55rem); }
.q22-main-nav .nav-link {
  border-radius: 0;
  color: var(--q22-ink-soft);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.3rem;
  text-transform: uppercase;
}
.q22-main-nav .nav-link::after {
  background: var(--q22-wine);
  bottom: 0.22rem;
  height: 1px;
}
.q22-main-nav .nav-link:hover,
.q22-main-nav .nav-link.active { color: var(--q22-wine); }

.lang-btn,
.theme-toggle,
.nav-toggle {
  border-color: var(--q22-rule);
  color: var(--q22-ink);
}
.nav-toggle .hamburger-line { background: currentColor; }
.lang-btn.active { background: var(--q22-wine); color: #fffaf2; }
.q22-reader-language-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.q22-reader-language-list .lang-btn {
  min-width: 0;
  padding: 0.3rem 0.4rem;
  font-size: 0.64rem;
  letter-spacing: 0;
  white-space: nowrap;
}
.q22-reader-language-unavailable {
  color: var(--q22-ink-soft);
  cursor: default;
  opacity: 1;
}
.q22-reader-language-unavailable:hover { color: var(--q22-ink-soft); }
.q22-reader-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.theme-toggle:hover { background: var(--q22-paper-deep); }

.main-content { min-height: calc(100vh - 16rem); }
.main-content:has(.avds-page[data-content-state="empty"]) {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body:has(.avds-page--empty) {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body:has(.avds-page--empty) > .main-content { flex: 1 0 auto; }
.main-content:has(.avds-page[data-content-state="empty"]) > .avds-page[data-content-state="empty"] {
  display: flex;
  flex: 1 0 auto;
}
.avds-page { padding-block: clamp(2.5rem, 6vw, 7rem); }
.avds-page[data-content-state="empty"] {
  min-height: 0;
  padding-block: clamp(2rem, 4vw, 3.5rem);
}
.avds-page[data-content-state="empty"] > .avds-container {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  justify-content: center;
}
.avds-container { width: min(100%, 88rem); }
.avds-page-header { border-color: var(--q22-rule); }
.avds-page-header::after { background: var(--q22-wine); }

/* A long record headline must not turn into a full-screen wall of display
 * type.  Keep the editorial scale for short titles and step down once the
 * headline is a real sentence. */
.avds-page-header--long-title .avds-title {
  max-width: 24ch;
  font-size: clamp(1.85rem, 3.4vw, 3.05rem);
  line-height: 1.07;
}

@media (max-width: 48rem) {
  .avds-page-header--long-title .avds-title {
    max-width: none;
    font-size: clamp(1.6rem, 6.4vw, 2.2rem);
  }
}
.avds-page-header .avds-lede,
.avds-eyebrow,
small { color: var(--q22-ink-soft); }
.avds-eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.avds-panel,
.avds-source-card,
.qantar-featured-report,
.avds-provenance-strip {
  background: var(--q22-paper-raised);
  border-color: var(--q22-rule);
  box-shadow: none;
}
.avds-panel { border-radius: 0; }
.avds-panel h3:not(:first-child) { margin-top: clamp(1.4rem, 3vw, 2rem); }
.avds-panel h3 + p { margin-top: clamp(0.4rem, 1vw, 0.6rem); }
.avds-card {
  border-radius: 0;
  box-shadow: none;
}
.avds-card:has(a:hover),
.avds-card:has(a:focus-visible) {
  box-shadow: none;
  transform: none;
}
.avds-source-card {
  border-left: 2px solid var(--q22-rule);
  border-radius: 0;
  transition: border-color 160ms ease, transform 160ms ease;
}
.avds-source-card:hover { border-left-color: var(--q22-wine); transform: translateX(2px); }
.avds-status--public { color: var(--q22-wine); }
.avds-button,
.qantar-filter-form button,
.q22-primary-action {
  background: var(--q22-wine);
  border: 1px solid var(--q22-wine);
  border-radius: 0;
  color: #fffaf2;
}
.avds-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.q22-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}
.avds-button:focus-visible,
.q22-primary-action:focus-visible { outline: 2px solid var(--q22-wine-dark); outline-offset: 2px; }
.avds-button:hover,
.qantar-filter-form button:hover,
.q22-primary-action:hover { background: var(--q22-wine-dark); }

.q22-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  border-top: 3px solid var(--q22-wine);
  border-bottom: 1px solid var(--q22-rule);
}
.q22-home-hero__copy { max-width: 58rem; }
.q22-home-hero h1 {
  max-width: 12ch;
  margin: 0 0 1rem;
  font-size: clamp(3.15rem, 7.4vw, 6.75rem);
  line-height: 0.92;
}
.q22-home-hero__lead {
  max-width: 46rem;
  margin: 0;
  color: var(--q22-ink-soft);
  font-family: "Onest", system-ui,sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  line-height: 1.48;
}
.q22-home-hero__actions { display: grid; gap: 0.65rem; min-width: 14rem; }
.q22-home-hero__actions a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--q22-wine);
  color: var(--q22-ink);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}
.q22-home-hero__actions a:hover,
.q22-home-hero__actions a:focus-visible {
  background: var(--q22-wine);
  color: #fffaf2;
}
.q22-home-hero__actions b { color: var(--q22-wine); font-size: 1.1rem; }
.q22-home-hero__actions a:hover b,
.q22-home-hero__actions a:focus-visible b { color: currentColor; }

.q22-home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  gap: clamp(2rem, 6vw, 6rem);
  margin-bottom: clamp(3rem, 7vw, 7rem);
}
.q22-home-intro h2 { font-size: clamp(2rem, 4.5vw, 4rem); }
.q22-home-intro__principles { display: grid; gap: 1px; background: var(--q22-rule); }
.q22-home-intro__principles { border-block: 1px solid var(--q22-rule); background: transparent; }
.q22-home-intro__principles article { padding: 1.35rem 0; background: transparent; }
.q22-home-intro__principles article + article { border-top: 1px solid var(--q22-rule); }
.q22-home-intro__principles h3 { margin-top: 0; }

.q22-edition-status {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(15rem, 0.85fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  margin: 0 0 clamp(3rem, 7vw, 7rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border-block: 1px solid var(--q22-rule);
}
.q22-edition-status h2 { margin: 0.25rem 0 0.75rem; font-size: clamp(1.7rem, 3vw, 2.65rem); }
.q22-edition-status p:not(.avds-eyebrow) { max-width: 38rem; color: var(--q22-ink-soft); }
.q22-edition-status__coverage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0.75rem 0 1rem;
  background: var(--q22-rule);
}
.q22-edition-status__coverage div { padding: 1rem; background: var(--q22-paper-raised); }
.q22-edition-status__coverage dt { color: var(--q22-ink-soft); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; }
.q22-edition-status__coverage dd { margin: 0.35rem 0 0; font-family: "Onest", system-ui,sans-serif; font-size: 2rem; }
.avds-record-unknown { color: var(--q22-ink-soft); font-size: 0.82rem; }

.q22-home-path {
  display: grid;
  gap: 0;
  margin: 2rem 0 4.5rem;
  border-top: 3px solid var(--q22-wine);
  border-bottom: 1px solid var(--q22-rule);
}
.q22-home-path a {
  color: var(--q22-ink);
  text-decoration: none;
}
.q22-home-path__primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.7fr) auto;
  align-items: end;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.4rem, 3vw, 2.4rem) 0;
  background: transparent;
  color: var(--q22-ink) !important;
}
.q22-home-path__primary > span { color: var(--q22-ink-soft); }
.q22-home-path__primary strong {
  grid-column: 1;
  grid-row: 1;
  font-family: "Onest", system-ui,sans-serif;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1;
}
.q22-home-path__primary > span { grid-column: 2; grid-row: 1 / span 2; }
.q22-home-path__primary b { grid-column: 3; grid-row: 1; }
.q22-home-path__primary b,
.q22-archive-card b { font-size: 1.15rem; font-weight: 700; }
.q22-home-path__primary:hover { color: var(--q22-wine) !important; }
.q22-home-path__secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 4rem);
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  border-top: 1px solid var(--q22-rule);
}
.q22-home-path__group h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.q22-home-path__list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.q22-home-path__list li + li { border-top: 1px solid var(--q22-rule); }
.q22-home-path__list a {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 2rem 1rem 0;
  position: relative;
  background: transparent;
}
.q22-home-path__list a::after {
  content: "→";
  position: absolute;
  top: 1rem;
  right: 0;
  color: var(--q22-wine);
  font-weight: 700;
}
.q22-home-path__list a:hover,
.q22-archive-card:hover { color: var(--q22-wine); }
.q22-home-path__list strong,
.q22-archive-card h2 { font-family: "Onest", system-ui,sans-serif; font-size: 1.35rem; }
.q22-home-path__list span,
.q22-archive-card > span { color: var(--q22-ink-soft); font-size: 0.98rem; line-height: 1.5; }
.q22-home-path__list small { color: var(--q22-ink-soft); font-size: 0.82rem; line-height: 1.45; }
.q22-archive-card b { align-self: end; color: var(--q22-wine); font-weight: 700; }
.q22-home-path__list a:hover strong { text-decoration: underline; text-underline-offset: 0.2em; }

.q22-portal-hub {
  display: grid;
  grid-template-columns: minmax(14rem, 0.32fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin: 0 0 4.5rem;
  padding: clamp(1.4rem, 3vw, 2.4rem) 0 0;
  border-top: 3px solid var(--q22-wine);
  border-bottom: 1px solid var(--q22-rule);
}
.q22-portal-hub a { color: var(--q22-ink); text-decoration: none; }
.q22-portal-hub__head h2 {
  margin: 0.35rem 0 0.6rem;
  font-family: "Onest", system-ui,sans-serif;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.08;
}
.q22-portal-hub__head > p:last-child {
  margin: 0;
  max-width: 34ch;
  color: var(--q22-ink-soft);
}
.q22-portal-hub__rail { display: grid; }
.q22-portal-hub__primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 0.75fr) auto;
  align-items: end;
  gap: clamp(0.8rem, 2vw, 2rem);
  padding-bottom: clamp(1rem, 2vw, 1.4rem);
}
.q22-portal-hub__primary strong {
  font-family: "Onest", system-ui,sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.05;
}
.q22-portal-hub__primary > span { color: var(--q22-ink-soft); }
.q22-portal-hub__secondary {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--q22-rule);
}
.q22-portal-hub__secondary li + li { border-top: 1px solid var(--q22-rule); }
.q22-portal-hub__secondary a {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.35fr) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: clamp(0.8rem, 2vw, 2rem);
  padding: 0.9rem 0;
}
.q22-portal-hub__secondary strong {
  font-family: "Onest", system-ui,sans-serif;
  font-size: 1.2rem;
}
.q22-portal-hub__secondary span { color: var(--q22-ink-soft); }
.q22-portal-hub b {
  align-self: end;
  color: var(--q22-wine);
  font-size: 1.05rem;
  font-weight: 700;
}
.q22-portal-hub a:hover { color: var(--q22-wine); }

.q22-archive-card {
  display: grid;
  grid-template-columns: minmax(7rem, 0.32fr) minmax(11rem, 0.5fr) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: clamp(0.75rem, 2vw, 2rem);
  padding: 1.25rem 0;
  border-radius: 0;
}
.q22-archive-card h2 { margin: 0; }
.q22-archive-card__count { color: var(--q22-ink-soft); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.q22-archive-index { margin: clamp(2rem, 5vw, 4.5rem) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--q22-rule); }
.q22-archive-index li + li { border-top: 1px solid var(--q22-rule); }
.qantar-featured-report--archive {
  padding: clamp(1.25rem, 3vw, 2.25rem) 0;
  border: 0;
  border-block: 1px solid var(--q22-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.q22-timeline-card {
  display: grid;
  grid-template-columns: minmax(9rem, 0.46fr) minmax(0, 1.54fr);
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 0.75rem;
  padding: clamp(1rem, 2vw, 1.55rem);
}
.q22-timeline-card .avds-record-head {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.55rem;
  grid-row: span 2;
}
.q22-timeline-card .avds-record-head time { color: var(--q22-wine); font-family: "Onest", system-ui,sans-serif; font-size: 1.6rem; }
.q22-timeline-card__body p { margin: 0; color: var(--q22-ink); font-size: 1.05rem; line-height: 1.55; }
.q22-timeline-card__body small { display: block; margin-top: 0.65rem; }
.q22-timeline-card__evidence { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; color: var(--q22-ink-soft); font-size: 0.78rem; }
.q22-timeline-card__evidence span + span { padding-left: 1rem; border-left: 1px solid var(--q22-rule); }
.q22-timeline-card__flag {
  display: inline-flex;
  align-items: center;
}
.q22-timeline-card__evidence .q22-timeline-card__flag { padding-left: 0; border-left: 0; }
.q22-timeline-card__link { grid-column: 2; justify-self: start; color: var(--q22-wine); font-weight: 700; }
.q22-timeline-filter-shortcut { margin-block: 1.25rem; }
#timeline-filters { scroll-margin-top: 1rem; }

.q22-place-aliases {
  display: block;
  margin-top: 0.2rem;
  color: var(--q22-ink-soft);
  overflow-wrap: anywhere;
}

.q22-memory-page { overflow: hidden; }
.q22-memory-opening {
  display: grid;
  align-content: start;
  border-block: 1px solid var(--q22-rule);
  padding: clamp(2.75rem, 6vw, 5rem) 0;
}
.q22-memory-opening__mark {
  width: 4rem;
  height: 0.2rem;
  margin-bottom: 2rem;
  background: var(--q22-wine);
}
.q22-memory-opening h1 { max-width: 14ch; font-size: clamp(3rem, 7vw, 6rem); line-height: 0.98; }
.q22-memory-opening p { max-width: 42rem; color: var(--q22-ink-soft); font-size: clamp(1.15rem, 2.3vw, 1.7rem); }
.q22-memory-principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 6vw, 7rem);
  padding-block: clamp(4rem, 9vw, 9rem);
}
.q22-memory-principles article { border-top: 1px solid var(--q22-wine); padding-top: 1.4rem; }
.q22-memory-principles h2 {
  font-size: clamp(1.9rem, 3.4vw, 3.05rem);
  text-wrap: balance;
}
.q22-memory-quote {
  margin: 0;
  padding: clamp(3rem, 8vw, 8rem) clamp(1rem, 6vw, 6rem);
  background: var(--q22-wine-dark);
  color: #fff8ec;
  font-size: clamp(2rem, 5.5vw, 5.6rem);
  line-height: 1.05;
}
.q22-memory-quote p { color: inherit; }
.q22-memory-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--q22-rule);
}
.q22-memory-metrics__scope { grid-column: 1 / -1; margin: 0; padding: 0.85rem 1.5rem; color: var(--q22-ink-soft); border-bottom: 1px solid var(--q22-rule); font-size: 0.82rem; }
.q22-memory-metrics div { padding: 1.5rem; border-right: 1px solid var(--q22-rule); }
.q22-memory-metrics div:last-child { border-right: 0; }
.q22-memory-metrics strong { display: block; font-family: "Onest",sans-serif; font-size: clamp(2rem, 5vw, 4rem); }
.q22-memory-metrics span { color: var(--q22-ink-soft); }

.q22-memory-reading {
  padding-top: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--q22-rule);
}
.q22-memory-reading h2 { font-size: clamp(1.7rem, 3.4vw, 2.8rem); }
.q22-memory-reading__note { color: var(--q22-ink-soft); font-size: 0.95rem; }
.q22-memory-reading__terms { margin-top: 0; align-content: start; }

.q22-term-list {
  grid-template-columns: minmax(9rem, 0.3fr) minmax(0, 1fr);
  gap: 0 clamp(1rem, 4vw, 3rem);
  margin-top: clamp(1.25rem, 3vw, 2rem);
  color: var(--q22-ink-soft);
  font: 1rem/1.65 var(--avds-sans);
}
.q22-term-list dt,
.q22-term-list dd {
  margin: 0;
  padding-block: 0.9rem;
  border-top: 1px solid var(--q22-rule);
}
.q22-term-list dt { color: var(--q22-ink); font-weight: 700; }

.q22-faq { margin-top: clamp(1.25rem, 3vw, 2rem); }
.q22-faq > div {
  display: grid;
  grid-template-columns: minmax(9rem, 0.34fr) minmax(0, 1fr);
  gap: 0 clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--q22-rule);
  padding-block: clamp(0.9rem, 2vw, 1.35rem);
}
.q22-faq dt { color: var(--q22-ink); font-weight: 700; }
.q22-faq dd { margin: 0; max-width: 64ch; color: var(--q22-ink-soft); }
.q22-faq-section {
  margin-top: clamp(2.5rem, 6vw, 5rem);
  padding-top: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--q22-rule);
}

.q22-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}
.q22-rules-grid > section {
  border-top: 1px solid var(--q22-wine);
  padding-top: 1.2rem;
}
.q22-rules-grid h2 { font-size: clamp(1.3rem, 1.9vw, 1.7rem); }
.q22-faq-section > .q22-rules-grid { margin-top: clamp(1.6rem, 3.5vw, 2.6rem); }
.q22-rules-grid h3 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
}
.q22-rules-grid h3 + p { margin-top: 0.55rem; }

/* Numbered reference rail: used where the content is a sequence rather than a
   set of parallel rules, so the archive and the chronology do not repeat the
   three-column guide shape. */
.q22-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.5rem, 3.5vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: q22-step;
}
.q22-faq-section > .q22-steps { margin-top: clamp(1.6rem, 3.5vw, 2.6rem); }
.q22-steps > li {
  border-top: 1px solid var(--q22-wine);
  padding-top: 1.2rem;
  counter-increment: q22-step;
}
.q22-steps > li::before {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--q22-wine);
  font: 700 0.72rem/1 var(--avds-mono);
  letter-spacing: 0.12em;
  content: counter(q22-step, decimal);
}
.q22-steps h3 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
}
.q22-steps h3 + p { margin-top: 0.55rem; }
.q22-steps p { color: var(--q22-ink-soft); }
.q22-faq-section > p { margin-top: clamp(1.4rem, 3vw, 2rem); }

.q22-map-consent {
  display: grid;
  min-height: 26rem;
  place-content: center;
  gap: 1rem;
  padding: clamp(2rem, 6vw, 6rem);
  text-align: center;
  background: var(--q22-paper-deep);
  border: 1px solid var(--q22-rule);
}
.q22-map-consent p { max-width: 44rem; color: var(--q22-ink-soft); }
.q22-map-consent button { justify-self: center; padding: 0.9rem 1.2rem; }
.qantar-public-map {
  min-height: 28rem;
  overflow: hidden;
  background: var(--q22-paper-deep);
  border: 1px solid var(--q22-rule);
}
.qantar-public-map svg { display: block; width: 100%; min-height: 28rem; }
.q22-map-outline { fill: var(--q22-paper-raised); stroke: var(--q22-rule); stroke-width: 2; }
.q22-map-marker { fill: var(--q22-wine); stroke: var(--q22-paper-raised); stroke-width: 3; }
.q22-map-marker-link:focus .q22-map-marker { stroke: var(--q22-ink); stroke-width: 6; }

.qantar-document-viewer {
  display: grid;
  min-height: 30rem;
  place-items: center;
  overflow: auto;
  background: var(--q22-paper-deep);
  border: 1px solid var(--q22-rule);
}
.qantar-document-viewer img { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; }

.qantar-document-text { margin-top: var(--avds-space-3, 1rem); }
.qantar-document-list { grid-template-columns: minmax(0, 1fr); }
.qantar-document-list > .avds-source-card {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
.qantar-document-text summary { cursor: pointer; font-weight: 650; }
.qantar-document-text__body {
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 76ch;
  box-sizing: border-box;
  margin-block: var(--avds-space-3, 1rem);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.qantar-document-text__paragraph { margin: 0 0 1rem; white-space: pre-wrap; }
.qantar-document-text__table-scroll {
  position: relative;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  box-sizing: border-box;
  margin-block: 1.25rem;
  overflow: auto;
  border: 1px solid var(--q22-rule);
  background: var(--q22-paper-raised);
  scrollbar-color: var(--q22-ink-soft) var(--q22-paper-deep);
}
.qantar-document-text__table-scroll:focus-visible {
  outline: 3px solid var(--q22-ink);
  outline-offset: 3px;
}
.qantar-document-text__scroll-cue { display: none; }
@media (max-width: 37.5rem) {
  .qantar-document-text__scroll-cue {
    position: absolute;
    inset-block-start: 0.35rem;
    inset-inline-end: 0.35rem;
    z-index: 1;
    display: grid;
    inline-size: 1.75rem;
    block-size: 1.75rem;
    place-items: center;
    border: 1px solid var(--q22-rule);
    background: var(--q22-paper-raised);
    color: var(--q22-wine);
    font: 700 1rem/1 var(--avds-font-sans, sans-serif);
    pointer-events: none;
  }
}
body.qantar-document-table-in-view #back-to-top {
  display: none;
}
.qantar-document-text__table {
  inline-size: 100%;
  min-inline-size: 38rem;
  border-collapse: collapse;
  line-height: 1.45;
}
.qantar-document-text__table caption {
  padding: 0.75rem 0.85rem;
  color: var(--q22-ink-soft);
  font: 0.82rem/1.4 var(--avds-font-sans, sans-serif);
  text-align: start;
}
.qantar-document-text__table th,
.qantar-document-text__table td {
  min-inline-size: 7rem;
  padding: 0.65rem 0.75rem;
  border-block-start: 1px solid var(--q22-rule);
  border-inline-end: 1px solid var(--q22-rule);
  text-align: start;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}
.qantar-document-text__table th {
  background: var(--q22-paper-deep);
  font-weight: 650;
}
.qantar-document-text__table tr > :last-child { border-inline-end: 0; }

.q22-source-reader__hash {
  margin-block: 0 1rem;
  color: var(--q22-ink-soft);
  font: 0.78rem/1.45 var(--avds-font-sans, sans-serif);
  overflow-wrap: anywhere;
}
.q22-source-reader__body {
  max-inline-size: 76ch;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.72;
}

.q22-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
}
.q22-media-card {
  margin: 0;
  overflow: hidden;
  background: var(--q22-paper-raised);
  border: 1px solid var(--q22-rule);
}
.q22-media-card > a,
.q22-media-picture { display: block; width: 100%; }
.q22-media-card > a { color: inherit; }
.q22-media-card > a > .q22-media-picture {
  aspect-ratio: 4 / 3;
  background: var(--q22-paper-deep);
}
.q22-media-card > a > .q22-media-picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.q22-media-card > a > img {
  display: block;
  width: 100%;
  max-height: 28rem;
  object-fit: contain;
  background: var(--q22-paper-deep);
}
.q22-media-card figcaption small { overflow-wrap: anywhere; }
.q22-media-card > .q22-media-picture > img,
.q22-media-card video,
.q22-media-card audio,
.q22-sensitive-disclosure [data-sensitive-media] {
  display: block;
  width: 100%;
  max-height: 42rem;
  object-fit: contain;
  background: var(--q22-paper-deep);
}
.q22-media-card > .q22-media-picture > img { max-height: 42rem; }
.q22-media-card figcaption {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border-top: 1px solid var(--q22-rule);
}
.q22-media-preview {
  position: relative;
  min-height: 18rem;
  overflow: hidden;
  background: var(--q22-paper-deep);
}
.q22-media-preview img {
  width: 100%;
  min-height: 18rem;
  object-fit: cover;
  filter: blur(14px) saturate(0.45);
  transform: scale(1.08);
}
.q22-media-preview span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgb(32 24 22 / 0.56);
  color: #fffaf2;
  font-family: "Onest", system-ui,sans-serif;
  font-size: 1.45rem;
  text-align: center;
}
.q22-sensitive-disclosure { border-top: 1px solid var(--q22-rule); }
.q22-sensitive-disclosure summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  list-style: none;
}
.q22-sensitive-disclosure summary::-webkit-details-marker { display: none; }
.q22-sensitive-disclosure summary > span:first-child { display: grid; gap: 0.3rem; }
.q22-sensitive-action { align-self: center; pointer-events: none; }
.q22-sensitive-disclosure [data-sensitive-media] { border-top: 1px solid var(--q22-rule); }
.q22-media-metadata { min-height: 12rem; padding: 1.5rem; background: var(--q22-paper-deep); }

.q22-coverage-progress {
  width: 100%;
  height: 0.75rem;
  border: 0;
  border-radius: 0;
  background: var(--q22-paper-deep);
}
.q22-coverage-progress::-webkit-progress-bar { background: var(--q22-paper-deep); }
.q22-coverage-progress::-webkit-progress-value { background: var(--q22-wine); }
.q22-coverage-progress::-moz-progress-bar { background: var(--q22-wine); }

.q22-footer.site-footer {
  background: var(--q22-ink);
  border-top: 4px solid var(--q22-wine);
  color: var(--q22-paper);
}
.q22-footer a { color: var(--q22-paper); }
/* The footer is inverted against the page (dark on light paper, light on dark
   paper), so the wine focus ring measured 1.48:1 there. Paper is the exact
   inverse of the footer surface in both themes and clears 13:1. */
.q22-footer :is(a, button, summary):focus-visible { outline-color: var(--q22-paper); }
.q22-footer .footer-inner { width: min(100% - 2rem, 88rem); }
.q22-footer .footer-memorial { max-width: 48rem; font-family: "Onest", system-ui,sans-serif; font-size: clamp(1.25rem, 2.4vw, 2rem); }
.q22-memorial-line { display: inline-block; width: 2.5rem; height: 2px; margin-right: 0.8rem; background: #ca7580; vertical-align: middle; }
.q22-footer .footer-brand { color: #cfc5bb; }

.q22-nav-backdrop[hidden] { display: none !important; }
.q22-nav-backdrop { position: fixed; inset: 0; z-index: 1020; border: 0; background: rgb(20 14 12 / 0.58); }
body.q22-nav-is-open { overflow: hidden; }

@media (max-width: 84rem) {
  .q22-brand__copy small { display: none; }
}

@media (max-width: 78rem) {
  .q22-main-nav .nav-link { font-size: 0.7rem; padding-inline: 0.28rem; }
}

@media (max-width: 64rem) {
  .q22-header .header-inner { width: min(100% - 1rem, 92rem); }
  .q22-brand__copy { display: none; }
  .q22-brand__mark { width: 2.75rem; height: 2.75rem; }
}

@media (max-width: 63.9375rem) {
  .q22-header .header-inner { min-height: 4.4rem; }
  .q22-header.site-header { z-index: 1040; }
  .q22-brand__copy { display: grid; }
  .q22-brand__copy small { display: none; }
  .lang-switch-desktop { display: none; }
  .q22-main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1040;
    display: grid;
    width: min(88vw, 25rem);
    height: 100dvh;
    align-content: start;
    gap: 2rem;
    overflow-y: auto;
    padding: 6.5rem 1.4rem 2rem;
    background: var(--q22-paper-raised);
    border-left: 1px solid var(--q22-rule);
    box-shadow: -24px 0 70px rgb(0 0 0 / 0.2);
    transform: translateX(104%);
    visibility: hidden;
  }
  /* A translated fixed drawer still contributes to body.scrollWidth in
     WebKit. Keep the closed dialog out of layout so narrow viewports have no
     horizontal overflow; the JS controller makes it visible before focus is
     moved into the modal. */
  .q22-main-nav:not(.nav-open) { display: none; }
  .q22-main-nav.nav-open {
    display: grid;
    transform: translateX(0);
    visibility: visible;
  }
  .q22-main-nav .nav-list { display: grid; gap: 0; }
  .q22-main-nav .nav-link {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--q22-rule);
    font-family: "Onest", system-ui,sans-serif;
    font-size: 1.25rem;
    letter-spacing: 0;
    text-transform: none;
  }
  .q22-main-nav .nav-link::after { display: none; }
  .q22-main-nav .lang-switch-mobile { display: flex; }
  .nav-toggle { position: relative; z-index: 1050; display: flex; }
  .q22-home-hero { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 2.25rem; }
  .q22-home-hero__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
  .q22-home-intro,
  .q22-memory-principles,
  .q22-edition-status { grid-template-columns: 1fr; }
  .q22-home-path__primary { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .q22-home-path__primary > span { grid-column: 1; grid-row: 2; }
  .q22-home-path__primary b { grid-column: 2; grid-row: 1 / span 2; }
  .q22-home-path__secondary { grid-template-columns: 1fr; gap: 1.5rem; }
  .q22-portal-hub { grid-template-columns: 1fr; gap: 1.25rem; }
  .q22-portal-hub__primary { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .q22-portal-hub__primary > span { grid-column: 1; grid-row: 2; }
  .q22-portal-hub__primary b { grid-column: 2; grid-row: 1 / span 2; }
  .q22-archive-card { grid-template-columns: minmax(6rem, 0.32fr) minmax(9rem, 0.5fr) minmax(0, 1fr) auto; }
  .q22-timeline-card { grid-template-columns: 1fr; }
  .q22-timeline-card .avds-record-head { grid-row: auto; grid-auto-flow: column; justify-content: start; align-items: center; }
  .q22-timeline-card__link { grid-column: auto; }
  .q22-memory-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q22-memory-metrics div:nth-child(2) { border-right: 0; }
  .q22-memory-metrics div:nth-child(-n + 2) { border-bottom: 1px solid var(--q22-rule); }
  .q22-sensitive-disclosure summary { grid-template-columns: 1fr; }
  .q22-sensitive-action { justify-self: start; }
}

@media (max-width: 40rem) {
  .q22-archive-card { grid-template-columns: 1fr auto; align-items: start; }
  .q22-archive-card > span:not(.q22-archive-card__count),
  .q22-archive-card h2,
  .q22-archive-card__count { grid-column: 1; }
  .q22-archive-card b { grid-column: 2; grid-row: 1 / span 3; }
  .q22-term-list,
  .q22-faq > div { grid-template-columns: 1fr; }
  .q22-term-list dt { padding-bottom: 0.2rem; }
  .q22-term-list dd { padding-top: 0.2rem; border-top: 0; }
}

@media (max-width: 24rem) {
  .q22-brand__copy strong { font-size: 1rem; }
  .q22-brand__mark { width: 2.5rem; height: 2.5rem; font-size: 0.92rem; }
  .q22-header .header-inner { gap: 0.4rem; }
  .theme-toggle,
  .nav-toggle { width: 2.5rem; height: 2.5rem; }
  .q22-home-hero h1 { font-size: clamp(2.7rem, 16vw, 4rem); }
  .q22-memory-metrics { grid-template-columns: 1fr; }
  .q22-memory-metrics div { border-right: 0; border-bottom: 1px solid var(--q22-rule); }
  .q22-portal-hub__secondary a,
  .q22-archive-card { grid-template-columns: 1fr auto; align-items: start; }
  .q22-portal-hub__secondary a span,
  .q22-archive-card > span:not(.q22-archive-card__count) { grid-column: 1; }
  .q22-archive-card__count { grid-column: 1; }
  .q22-portal-hub__secondary b,
  .q22-archive-card b { grid-column: 2; grid-row: 1 / span 2; }
}

/* Keep the shell usable when 200% zoom leaves a very narrow CSS viewport. */
@media (max-width: 200px) {
  .q22-header .header-inner { gap: 0.25rem; }
  .q22-header .q22-brand { min-width: 0; gap: 0; }
  .q22-header .q22-brand__copy { display: none; }
  .q22-header .q22-brand__mark { width: 2.5rem; height: 2.5rem; }
  .q22-header .theme-toggle,
  .q22-header .nav-toggle { flex: 0 0 2.25rem; width: 2.25rem; min-width: 2.25rem; }
  .avds-page-header { min-width: 0; }
  .avds-page-header .avds-title {
    font-size: 1.5rem !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
    overflow-wrap: anywhere;
  }
  article[data-record-type="document"][data-record-id="document-drive-c5b456a45c24a9b831a9a683"]
    .avds-page-header .avds-title {
    hyphens: none;
  }
  .qantar-report :is(h1, h2, h3, p, li, summary, dt, dd, a, small) {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .qantar-report .qantar-report-intro h2,
  .qantar-report .qantar-report-chapter > h2 {
    font-size: 1.25rem !important;
    line-height: 1.2 !important;
  }
  .qantar-report .qantar-report-intro { min-width: 0; }
  .qantar-report .qantar-report-intro > div { min-width: 0; }
  .qantar-report .qantar-report-metrics {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
  }
  .qantar-report .qantar-report-metrics div { min-width: 0; padding-left: 0.35rem; }
  .qantar-report .qantar-report-metrics dd { font-size: 0.8rem; }
}

@media (max-width: 12rem) {
  .avds-page[data-avds-pattern="dense-document-registry"]
    .avds-source-card > a > strong {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Keep the fixed control clear of compact archive cards and footer links. */
@media (max-width: 25rem) {
  #back-to-top {
    display: none;
  }
}

/* Reflow the shared drawer at narrow CSS widths reached under 200% zoom. */
@media (max-width: 13rem) {
  .q22-main-nav.nav-open {
    width: 100%;
    padding-inline: 1rem;
  }

  .q22-main-nav .nav-list,
  .q22-main-nav .nav-list > li,
  .q22-main-nav .nav-link {
    min-width: 0;
    max-width: 100%;
  }

  .q22-main-nav .nav-link {
    font-size: clamp(1rem, 8vw, 1.25rem);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .q22-main-nav .lang-switch-mobile,
  .q22-reader-language-list {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .q22-reader-language-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }

  .q22-reader-language-list > li {
    min-width: 0;
    max-width: 100%;
  }

  .q22-reader-language-list .lang-btn {
    min-width: 0;
    max-width: 100%;
    padding-inline: 0.25rem;
    font-size: clamp(0.75rem, 5vw, 0.875rem);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 11rem) {
  .q22-reader-language-list > li {
    flex-basis: 100%;
  }

  .q22-reader-language-list .lang-btn {
    width: 100%;
  }
}
