/*
 * Canonical public compositions for AVDS4.
 *
 * Load order is intentional: tokens -> primitives -> product CSS -> this file.
 * The few !important declarations below neutralise legacy product rules that
 * otherwise force a conflicting grid or absolute positioning on public pages.
 */

:root {
  --av-public-ink: hsl(var(--foreground));
  --av-public-muted: hsl(var(--muted-foreground));
  --av-public-line: hsl(var(--border));
  --av-public-panel: hsl(var(--card));
  --av-public-canvas: hsl(var(--background));
  --av-public-subtle: hsl(var(--muted));
  --av-public-input-line: hsl(var(--input));
  --av-public-gold: hsl(var(--chart-1));
}

html[data-product] :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid hsl(var(--ring));
  outline-offset: 3px;
}

html[data-product="antifake"] .af-service-shell {
  width: min(calc(100% - 2rem), 76rem);
  margin-inline: auto;
}

html[data-product="antifake"] .af-service-hero {
  min-height: 0;
  margin-block: clamp(1.25rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  color: var(--av-public-ink);
  background: linear-gradient(
    112deg,
    var(--av-public-panel),
    var(--av-public-subtle)
  );
  border: 1px solid var(--av-public-line);
  border-radius: 1rem;
  box-shadow: none;
}

html[data-product="antifake"] .af-service-hero :is(h1, .af-service-hero__title) {
  max-width: 19ch;
  margin: .25rem 0 .85rem;
  color: var(--av-public-ink);
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.035em;
}

html[data-product="antifake"] .af-service-hero > p:not(.af-kicker),
html[data-product="antifake"] .af-service-hero__lead {
  max-width: 65ch;
  margin: 0;
  color: var(--av-public-muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}

html[data-product="antifake"] .af-service-hero .af-kicker {
  margin: 0 0 .5rem;
  color: var(--av-public-muted);
}

/* Compatibility override: old guide CSS fixes this layout to a narrow column. */
html[data-product="antifake"] .af-guide-shell .guide-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 18rem) !important;
  gap: clamp(2rem, 5vw, 4rem) !important;
  align-items: start;
  max-width: none;
  margin: 0 0 clamp(2.5rem, 6vw, 5rem);
}

html[data-product="antifake"] .guide-content {
  min-width: 0;
  max-width: 48rem;
}

html[data-product="antifake"] .guide-sidebar {
  display: block;
  min-width: 0;
}

html[data-product="antifake"] .guide-sidebar-inner {
  position: sticky;
  top: 1.5rem;
  padding: 1.15rem;
  background: var(--av-public-panel);
  border: 1px solid var(--av-public-line);
  border-radius: .875rem;
}

html[data-product="antifake"] .guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .875rem;
}

html[data-product="antifake"] .guide-type-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .7rem 1rem;
  min-height: 0;
  padding: 1.15rem;
  background: var(--av-public-panel);
  border: 1px solid var(--av-public-line);
  border-radius: .875rem;
}

html[data-product="antifake"] .guide-type-icon {
  position: static !important;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--av-public-ink);
  background: var(--av-public-subtle);
  border-radius: .55rem;
}

html[data-product="antifake"] .guide-type-card :is(h3, p, .guide-example) {
  grid-column: 2;
  margin: 0;
}

html[data-product="antifake"] .guide-type-card h3,
html[data-product="antifake"] .guide-step h3,
html[data-product="antifake"] .guide-tools-list h3,
html[data-product="antifake"] .guide-actions-list h3,
html[data-product="antifake"] .guide-faq h3 {
  color: var(--av-public-ink);
  font-family: var(--font-sans);
}

html[data-product="antifake"] .guide-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  padding: 0;
  list-style: none;
}

html[data-product="antifake"] .guide-check-item {
  position: relative;
  min-height: 3.4rem;
  padding: .8rem .9rem .8rem 2.6rem;
  color: var(--av-public-ink);
  background: var(--av-public-panel);
  border: 1px solid var(--av-public-line);
  border-radius: .7rem;
  line-height: 1.35;
}

html[data-product="antifake"] .guide-check-item::before {
  position: absolute;
  top: .8rem;
  left: .9rem;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid var(--av-public-muted);
  border-radius: .2rem;
  content: "";
}

html[data-product="antifake"] .guide-step {
  padding: 1.35rem 0;
  border-top: 1px solid var(--av-public-line);
}

html[data-product="antifake"] .af-tools-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, .52fr);
  gap: 1.5rem clamp(2rem, 5vw, 4rem);
  align-items: start;
}

html[data-product="antifake"] .af-tools-hero > :not(.af-tools-hero__route) {
  grid-column: 1;
}

html[data-product="antifake"] .af-tools-hero__route {
  grid-column: 2;
  grid-row: 1 / span 3;
  margin: 0;
  padding: 1.2rem 1.3rem;
  background: var(--av-public-panel);
  border: 1px solid var(--av-public-line);
  border-radius: .875rem;
}

html[data-product="antifake"] .af-tools-hero__route :is(strong, ol) { margin: 0; }
html[data-product="antifake"] .af-tools-hero__route ol { display: grid; gap: .65rem; padding-left: 1.25rem; margin-top: .7rem; color: var(--av-public-muted); }

html[data-product="antifake"] .af-tools-privacy {
  grid-column: 1 / -1;
  padding: 0;
  background: var(--av-public-panel);
  border: 1px solid var(--av-public-line);
  border-radius: .75rem;
}

html[data-product="antifake"] .af-tools-privacy summary {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.25rem;
  padding: .75rem 1rem;
  color: var(--av-public-ink);
  cursor: pointer;
}

html[data-product="antifake"] .af-tools-privacy summary svg { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
html[data-product="antifake"] .af-tools-privacy p { max-width: 72ch; margin: 0; padding: 0 1rem 1rem 3rem; color: var(--av-public-muted); line-height: 1.5; }

html[data-product="antifake"] .af-mission-console,
html[data-product="antifake"] .af-tools-role-matrix,
html[data-product="antifake"] .af-tool-form,
html[data-product="antifake"] .af-osint-group,
html[data-product="antifake"] .af-research-evidence-principles > article {
  background: var(--av-public-panel);
  border: 1px solid var(--av-public-line);
  border-radius: .875rem;
  box-shadow: none;
}

html[data-product="antifake"] .af-mission-console { padding: clamp(1.25rem, 3vw, 2rem); }
html[data-product="antifake"] .af-mission-console__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
html[data-product="antifake"] .af-mission-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; min-height: 6.5rem; padding: 1rem; color: var(--av-public-ink); border: 1px solid var(--av-public-line); border-radius: .75rem; }
html[data-product="antifake"] .af-mission-card__icon { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 1px solid var(--av-public-line); border-radius: .6rem; }
html[data-product="antifake"] .af-mission-card__icon svg { width: 1.25rem; height: 1.25rem; }
html[data-product="antifake"] .af-mission-card :is(small, strong, em) { display: block; }
html[data-product="antifake"] .af-mission-card small { color: var(--av-public-muted); font-style: normal; }
html[data-product="antifake"] .af-mission-card strong { margin: .15rem 0; }
html[data-product="antifake"] .af-mission-card em { color: var(--av-public-muted); font-size: .9rem; font-style: normal; }

html[data-product="antifake"] .af-tools-shell :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 2.75rem;
  padding: .65rem .8rem;
  color: var(--av-public-ink);
  background: var(--av-public-canvas);
  border: 1px solid var(--av-public-input-line);
  border-radius: .55rem;
  font: inherit;
}

/* Compatibility boundary for the pre-AVDS product stylesheet: every public
   field and button in the governed main region remains keyboard- and
   touch-reachable. The important flag is intentionally limited to this final
   public layer because older page modules set more-specific compact heights. */
html[data-product="antifake"] main[data-av-quality-scope] :is(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .af-btn,
  .av-btn
) {
  min-height: 2.75rem !important;
}

html[data-product="antifake"] main[data-av-quality-scope] :is(.af-btn, .av-btn) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

html[data-product="ortcom"] main[data-av-quality-scope] :is(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  button,
  .btn,
  .av-btn
) {
  min-height: 2.75rem;
}

html[data-product="antifake"] [data-theme-toggle] {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

/* Public actions use the same reachable target size in every composition.
   This deliberately lives in the canonical layer so compact legacy links do
   not turn into undersized controls on a single page. */
html[data-product="antifake"] :is(.af-guide-shell, .af-tools-shell, .af-research-shell, .af-bulletins-shell) .af-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
}

html[data-product="antifake"] .af-tools-shell .af-tool-suggestion {
  min-height: 2.5rem;
  padding: .45rem .7rem;
}

html[data-product="antifake"] .af-guide-shell .af-sidebar-cta {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: .7rem;
  align-items: center;
  padding: 1rem;
  background: var(--av-public-panel);
  border: 1px solid var(--av-public-line);
  border-radius: .875rem;
}

html[data-product="antifake"] .af-guide-shell .af-sidebar-cta-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--av-public-ink);
  background: var(--av-public-subtle);
  border-radius: .65rem;
}

html[data-product="antifake"] .af-guide-shell .af-sidebar-cta :is(h2, p) { margin: 0; }
html[data-product="antifake"] .af-guide-shell .af-sidebar-cta h2 { font-size: 1rem; line-height: 1.25; }
html[data-product="antifake"] .af-guide-shell .af-sidebar-cta p { color: var(--av-public-muted); font-size: .9rem; line-height: 1.45; }
html[data-product="antifake"] .af-guide-shell .af-sidebar-cta h2 { grid-column: 2; }
html[data-product="antifake"] .af-guide-shell .af-sidebar-cta p { grid-column: 1 / -1; }
html[data-product="antifake"] .af-guide-shell .af-sidebar-report-button { grid-column: 1 / -1; width: 100%; }

html[data-product="antifake"] .af-tools-shell details > summary {
  min-height: 3.25rem;
  padding: .85rem 1rem;
}

html[data-product="antifake"] .af-tools-shell .af-tools-role-matrix__summary,
html[data-product="antifake"] .af-tools-shell .af-osint-group > summary {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(14rem, .75fr) auto;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
}

html[data-product="antifake"] .af-tools-shell .af-tools-role-matrix__summary > span:first-child {
  display: grid;
  gap: .18rem;
}

html[data-product="antifake"] .af-tools-shell .af-tools-role-matrix__summary > span:nth-child(2) {
  color: var(--av-public-muted);
  font-size: .9rem;
  line-height: 1.4;
}

html[data-product="antifake"] .af-tools-shell .af-tools-role-matrix__summary > b {
  padding: .3rem .5rem;
  color: var(--av-public-ink);
  background: var(--av-public-subtle);
  border: 1px solid var(--av-public-line);
  border-radius: .45rem;
  font-size: .78rem;
  white-space: nowrap;
}

html[data-product="antifake"] .af-tools-shell .af-tools-role-matrix__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  padding: 1rem;
}

html[data-product="antifake"] .af-tools-shell .af-tools-role-card {
  min-height: 8.5rem;
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--av-public-line);
  border-radius: .7rem;
  color: var(--av-public-ink);
  background: var(--av-public-panel);
}

html[data-product="antifake"] .af-tools-shell .af-tool-panel > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: center;
}

html[data-product="antifake"] .af-tools-shell .af-tool-panel > summary > span:nth-child(2) {
  display: grid;
  gap: .2rem;
  min-width: 0;
}

html[data-product="antifake"] .af-tools-shell .af-tool-panel > summary small {
  color: var(--av-public-muted);
  line-height: 1.4;
}

html[data-product="antifake"] .af-research-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, .62fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
html[data-product="antifake"] .af-research-hero__aside { display: grid; gap: .8rem; }
html[data-product="antifake"] .af-research-hero__facts,
html[data-product="antifake"] .af-research-hero__formats { background: var(--av-public-panel); border: 1px solid var(--av-public-line); border-radius: .8rem; overflow: hidden; }
html[data-product="antifake"] .af-research-evidence-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
html[data-product="antifake"] .af-research-evidence-principles > article { padding: 1.15rem; }
html[data-product="antifake"] .af-research-evidence-principles :is(h3, p) { margin: 0; }
html[data-product="antifake"] .af-research-evidence-principles h3 { color: var(--av-public-ink); font-size: 1rem; }
html[data-product="antifake"] .af-research-evidence-principles p { margin-top: .55rem; color: var(--av-public-muted); line-height: 1.45; }

@media (max-width: 620px) {
  html[data-product="antifake"] body.antifake-research-page .af-research-shell .af-research-hero__actions .af-btn {
    min-height: 2.75rem;
  }
}

html[data-product="antifake"] .af-bulletin-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .45fr) auto max-content; gap: .75rem; align-items: end; padding: 1rem; background: var(--av-public-panel); border: 1px solid var(--av-public-line); border-radius: .875rem; }
html[data-product="antifake"] .af-bulletin-filters label { display: grid; gap: .35rem; color: var(--av-public-muted); font-size: .85rem; font-weight: 700; }
html[data-product="antifake"] .af-bulletin-filters select { width: 100%; min-height: 2.75rem; padding-inline: .8rem; color: var(--av-public-ink); background: var(--av-public-canvas); border: 1px solid var(--av-public-input-line); border-radius: .55rem; font: inherit; }
html[data-product="antifake"] .af-bulletin-filters > .af-btn { min-height: 2.75rem; white-space: nowrap; }
html[data-product="antifake"] .af-bulletin-filters-summary { margin: 0 0 .72rem; color: var(--av-public-muted); white-space: nowrap; }

html[data-product="antifake"] .af-bulletin-featured { display: grid; background: var(--av-public-panel); border: 1px solid var(--av-public-line); border-radius: 1rem; overflow: hidden; }
html[data-product="antifake"] .af-bulletin-featured--with-media { grid-template-columns: minmax(15rem, .72fr) minmax(0, 1fr); }
html[data-product="antifake"] .af-bulletin-featured--without-media { grid-template-columns: 1fr; }
html[data-product="antifake"] .af-bulletin-featured__media { min-height: 100%; background: var(--av-public-subtle); }
html[data-product="antifake"] .af-bulletin-featured__media img { width: 100%; height: 100%; min-height: 14rem; object-fit: cover; }
html[data-product="antifake"] .af-bulletin-featured__body { padding: clamp(1.25rem, 3vw, 2rem); }
html[data-product="antifake"] .af-bulletin-featured :is(h2, h3, .av-feed-card__title) { font-family: var(--font-sans); }

html[data-product] .av-feed-card__media--neutral {
  display: grid;
  place-items: center start;
  min-height: 9rem;
  padding: 1.15rem;
  color: var(--av-public-muted);
  background: linear-gradient(135deg, var(--av-public-panel), var(--av-public-subtle));
  border-bottom: 1px solid var(--av-public-line);
}

html[data-product] .av-feed-card__media--neutral span { font-size: .75rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }

html[data-product="antifake"] .af-publication-card { border-color: var(--av-public-line); box-shadow: none; }
html[data-product="antifake"] .af-publication-card .av-feed-card__title { font-family: var(--font-sans); font-weight: 750; }
html[data-product="antifake"] .av-feed-card__title { font-family: var(--font-sans); }
html[data-product="antifake"] .af-publication-card :is(.av-feed-card__deck, .av-feed-card__meta) { color: var(--av-public-muted); }

html[data-product="ortcom"] :is(.av-feed-card, .ortcom-card) { border-color: var(--av-public-line); box-shadow: var(--shadow-xs); }
html[data-product="ortcom"] :is(input, select, textarea) { border-radius: .5rem; }

html[data-product="ortcom"] :is(.av-home-hero, .av-home-hero__media) {
  /* Hero copy must retain AA contrast even while media is absent or loading. */
  background-color: hsl(224 60% 12%);
}

html[data-product="ortcom"] .digest-page :is(.digest-article-card, .digest-event-item, .digest-ann-item) {
  color: var(--av-public-ink);
  background: var(--av-public-panel);
  border-color: var(--av-public-line);
}

html[data-product="ortcom"] .digest-page :is(.digest-article-title, .digest-event-title, .digest-ann-title) {
  color: var(--av-public-ink);
}

html[data-product="ortcom"] .digest-page :is(.digest-article-lead, .digest-article-meta) {
  color: var(--av-public-muted);
}

html[data-product="ortcom"] .digest-page :is(.digest-cat-badge, .digest-event-type-badge) {
  color: var(--av-public-ink);
  background: var(--av-public-subtle);
  border: 1px solid var(--av-public-line);
}

@media (max-width: 900px) {
  html[data-product="antifake"] .af-guide-shell .guide-layout,
  html[data-product="antifake"] .af-tools-hero,
  html[data-product="antifake"] .af-research-hero,
  html[data-product="antifake"] .af-bulletin-featured--with-media { grid-template-columns: 1fr !important; }

  html[data-product="antifake"] .guide-sidebar-inner { position: static; }
  html[data-product="antifake"] .af-tools-hero > :not(.af-tools-hero__route),
  html[data-product="antifake"] .af-tools-hero__route { grid-column: auto; grid-row: auto; }
  html[data-product="antifake"] .af-research-evidence-principles { grid-template-columns: 1fr; }
  html[data-product="antifake"] .af-tools-shell .af-tools-role-matrix__summary { grid-template-columns: minmax(0, 1fr) auto; }
  html[data-product="antifake"] .af-tools-shell .af-tools-role-matrix__summary > span:nth-child(2) { display: none; }
  html[data-product="antifake"] .af-bulletin-filters { grid-template-columns: 1fr 1fr; }
  html[data-product="antifake"] .af-bulletin-filters > :is(.af-btn, p) { grid-column: auto; }
}

@media (max-width: 600px) {
  html[data-product="antifake"] .af-service-shell { width: min(calc(100% - 1.25rem), 76rem); }
  html[data-product="antifake"] .af-service-hero { padding: 1.25rem; border-radius: .75rem; }
  html[data-product="antifake"] .guide-grid,
  html[data-product="antifake"] .guide-checklist,
  html[data-product="antifake"] .af-mission-console__grid,
  html[data-product="antifake"] .af-tools-shell .af-tools-role-matrix__grid,
  html[data-product="antifake"] .af-bulletin-filters { grid-template-columns: 1fr; }
  html[data-product="antifake"] .af-tools-shell .af-tools-role-card { min-height: auto; }
  html[data-product="antifake"] .guide-type-card :is(h3, p, .guide-example) { grid-column: 1 / -1; }
  html[data-product="antifake"] .guide-type-icon { grid-column: 1; }
  html[data-product="antifake"] .af-bulletin-filters > :is(.af-btn, p) { grid-column: 1; }
  html[data-product="antifake"] .af-bulletin-filters-summary { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-product] *, html[data-product] *::before, html[data-product] *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* AVDS 4.7 public uplift v128.
   AntiFake's opening surface used a separate, light-only palette after the
   token adapter. Map that composition back to semantic AVDS surfaces, while
   retaining the Centre's blue/gold institutional signature. */
html[data-product="antifake"] {
  --af-shell-navy: hsl(var(--primary));
  --af-shell-navy-deep: hsl(var(--foreground));
  --af-hero-ink: hsl(var(--foreground));
  --af-hero-copy: hsl(var(--muted-foreground));
  --af-hero-surface: hsl(var(--background));
  --af-hero-surface-strong: hsl(var(--muted));
  --af-panel-surface: hsl(var(--card));
  --af-panel-border: hsl(var(--border));
  --af-panel-muted: hsl(var(--accent));
  --af-panel-shadow: var(--shadow-md);
  --af-action: hsl(var(--primary));
  --af-action-hover: hsl(var(--sidebar-primary));
  --ortcom-ds-border: hsl(var(--border));
  --ortcom-ds-border-soft: hsl(var(--card-border));
  --gold: hsl(var(--chart-3));
  --gold-hover: hsl(var(--chart-3));
}

html[data-product="antifake"][data-theme="dark"] {
  --af-shell-navy: hsl(var(--sidebar));
  --af-shell-navy-deep: hsl(var(--background));
  --af-hero-surface: hsl(var(--background));
  --af-hero-surface-strong: hsl(var(--secondary));
  --af-panel-surface: hsl(var(--card));
  --af-panel-border: hsl(var(--border));
  --af-panel-muted: hsl(var(--accent));
  --af-action: hsl(var(--primary));
  --af-action-hover: hsl(var(--sidebar-primary));
}

/* The shell intentionally scopes a darker primary inside the opening panel.
   Rebind the action aliases at that same scope so custom-property values do
   not retain the lighter page-level primary. */
html[data-product="antifake"][data-theme="dark"] .af-home-intro {
  --af-action: hsl(var(--primary));
  --af-action-hover: hsl(var(--primary));
}

/* The dark product shell makes its action blue deliberately lighter than the
   light theme. Its readable foreground is the dark AVDS canvas, not the
   light-theme white used by legacy button rules. */
html[data-product="antifake"][data-theme="dark"] .af-home-intro :is(
  .af-home-intro__actions .af-btn--primary,
  .af-home-check-form .af-btn
) {
  color: hsl(var(--primary-foreground)) !important;
}

html[data-product="antifake"][data-theme="dark"] .af-home-intro
  .af-home-intro__actions
  .af-btn--secondary {
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
  background: hsl(var(--card));
}

html[data-product="antifake"] .af-site-header :is(
  .af-site-report-link,
  [data-theme-toggle],
  .af-site-languages a
):focus-visible {
  outline-color: hsl(var(--ring));
  outline-offset: 3px;
}

html[data-product="antifake"] .af-home-intro__panel,
html[data-product="antifake"] .af-home-task.av-cta-tile,
html[data-product="antifake"] .af-home-priority-card.av-feed-card,
html[data-product="antifake"] .antifake-index-page .af-card.av-feed-card {
  box-shadow: var(--shadow-sm);
}

/* The search console is the primary mobile journey. Keep its direct report
   alternative visible without duplicating the "start checking" affordance
   that the adjacent form already provides. */
@media (max-width: 820px) {
  html[data-product="antifake"] .af-home-intro__actions {
    display: flex;
    margin-top: var(--avds-space-content);
  }

  html[data-product="antifake"] main[data-av-quality-scope]
    .af-home-intro__actions
    .af-btn--primary {
    display: inline-flex !important;
    min-width: min(100%, 12.5rem);
  }

  html[data-product="antifake"] .af-home-intro__actions .af-btn--secondary {
    display: none;
  }
}

/* Compact navigation has one clearly reachable information hierarchy: the
   tool route stays in the More disclosure until it is the active route. This
   removes the clipped fourth label visible on 320–420 px screens. */
@media (max-width: 420px) {
  html[data-product="antifake"] .af-site-nav__scroll > a:nth-child(4):not([aria-current="page"]) {
    display: none !important;
  }

  html[data-product="antifake"] .af-site-nav__scroll {
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  html[data-product="antifake"] .af-site-nav__scroll::-webkit-scrollbar {
    display: none;
  }

  html[data-product="antifake"] .af-site-nav__scroll > a {
    scroll-snap-align: start;
  }
}

/* ORTCOM legacy pages inherit the AVDS dark palette through the same public
   adapter. A light primary must never become the background for a white-text
   page header, and old literal-white empty/KPI cards must remain surfaces. */
html[data-site="ortcom"][data-theme="dark"] :is(
  .page-header,
  .map-header
) {
  --primary: 224 60% 22%;
  --primary-foreground: 0 0% 100%;
  background: hsl(var(--primary));
}

html[data-site="ortcom"][data-theme="dark"] :is(
  .cabinet-empty,
  .kpi-card
) {
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
  background: hsl(var(--card));
}

html[data-site="ortcom"][data-theme="dark"] :is(
  .cabinet-empty p,
  .kpi-label
) {
  color: hsl(var(--muted-foreground));
}

html[data-site="ortcom"][data-theme="dark"] .kpi-val {
  color: hsl(var(--primary));
}

html[data-site="ortcom"][data-theme="dark"] .map-wrap {
  background: hsl(var(--muted));
}

html[data-site="ortcom"][data-theme="dark"] .map-sidebar {
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
  background: hsl(var(--card));
}

html[data-site="ortcom"][data-theme="dark"] .panel-hero {
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}

html[data-site="ortcom"][data-theme="dark"] :is(
  .panel-hero-title,
  .sidebar-close,
  .panel-expand
) {
  color: hsl(var(--primary-foreground));
}

html[data-site="ortcom"][data-theme="dark"] .panel-hero-sub {
  color: hsl(var(--primary-foreground) / 0.82);
}

html[data-site="ortcom"][data-theme="dark"] .map-layer-btn {
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
  background: hsl(var(--card));
}

html[data-site="ortcom"][data-theme="dark"] .map-layer-btn.active {
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
}
