/* =============================================================================
   CFI.co — AI Visibility Report
   Premium sales asset. Bloomberg-terminal-meets-editorial-luxury.
   Pure CSS/SVG, no external runtime assets, system font stacks.
   ============================================================================= */

/* ---- Design tokens -------------------------------------------------------- */
:root {
  /* canvas */
  --bg:        #16161A;
  --bg-deep:   #101013;
  --panel:     #1F1F25;
  --panel-2:   #232329;
  --hairline:  rgba(255,255,255,0.08);
  --hairline-2:rgba(255,255,255,0.05);
  --inner-hi:  rgba(255,255,255,0.04);

  /* brand */
  --magenta:       #AD74A2;
  --magenta-glow:  #C77FB8;
  --magenta-deep:  #96588A;
  --blue:          #4CB6E2;
  --blue-deep:     #0073B2;
  --purple:        #9B6FC4;

  /* text */
  --ink:    #F4F2F5;
  --muted:  #9A9AA2;
  --faint:  #6B6B73;

  /* type */
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* rhythm */
  --maxw: 1180px;
  --gap:  clamp(20px, 3vw, 36px);
  --radius: 18px;
  --radius-sm: 12px;

  /* motion */
  --ease: cubic-bezier(.16,.84,.36,1);
}

/* ---- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
::selection { background: rgba(173,116,162,0.34); color: #fff; }

/* tabular figures everywhere numbers matter */
.counter, .count, .hits, #trendChart text, .stat-num { font-variant-numeric: tabular-nums; }

/* =============================================================================
   PAGE WRAPPER + TOP BAR
   ============================================================================= */
.avr {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px) 0;
}

/* Top bar is injected by app.js as .avr-topbar (sticky) */
.avr-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px clamp(18px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(16,16,19,0.92) 0%, rgba(16,16,19,0.66) 70%, rgba(16,16,19,0) 100%);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.avr-topbar .wordmark {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.avr-topbar .wordmark .dot { color: var(--magenta-glow); }
.avr-topbar .tag-eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}

/* =============================================================================
   SHARED SECTION CHROME
   ============================================================================= */
.avr > section {
  position: relative;
  margin: clamp(48px, 7vw, 96px) 0;
}
.avr > section > h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 33px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.section-note {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 70ch;
  margin: 10px 0 26px;
}
.section-note strong { color: var(--ink); font-weight: 600; }

.engine-footnote {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  width: 100%;
  margin: 22px 0 0;
  padding: 14px 18px;
  border-left: 3px solid var(--blue);
  background: rgba(255,255,255,.03);
  border-radius: 0 8px 8px 0;
}
.engine-footnote strong { color: var(--ink); font-weight: 600; }

.engine-gemini { cursor: help; }
/* Instant full-card hover overlay explaining Gemini's modest direct figure. */
.engine-why {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  padding: 18px 20px;
  margin: 0;
  background: var(--panel-2);
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none; /* instant — no fade/delay */
}
.engine-why p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.engine-why strong { color: var(--ink); font-weight: 600; }
.engine-gemini:hover .engine-why,
.engine-gemini:focus-within .engine-why { opacity: 1; visibility: visible; }

/* eyebrow above a section h2 — applied to h2 via ::before label utility */
.avr > section > h2 .kicker { display: block; }

/* =============================================================================
   HERO
   ============================================================================= */
.hero {
  position: relative;
  margin-top: 0 !important;
  padding: clamp(56px, 11vw, 132px) clamp(22px, 5vw, 64px) clamp(48px, 7vw, 84px);
  border-radius: 0 0 calc(var(--radius) + 6px) calc(var(--radius) + 6px);
  overflow: hidden;
  isolation: isolate;
  /* pull the hero full-bleed-ish within the container's padding */
  margin-left: calc(-1 * clamp(18px, 4vw, 40px));
  margin-right: calc(-1 * clamp(18px, 4vw, 40px));
}
/* layered gradient-mesh background */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% -10%;
  z-index: -2;
  background:
    radial-gradient(48% 60% at 16% 18%, rgba(173,116,162,0.34) 0%, rgba(173,116,162,0) 62%),
    radial-gradient(46% 58% at 86% 24%, rgba(76,182,226,0.20) 0%, rgba(76,182,226,0) 60%),
    radial-gradient(60% 70% at 72% 92%, rgba(150,88,138,0.26) 0%, rgba(150,88,138,0) 64%),
    radial-gradient(50% 60% at 30% 88%, rgba(0,115,178,0.16) 0%, rgba(0,115,178,0) 62%),
    var(--bg);
  animation: meshDrift 26s var(--ease) infinite alternate;
}
/* the data-network canvas (svg injected by JS lives in .hero-net) sits above mesh */
.hero-net {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(120% 100% at 70% 30%, #000 30%, transparent 86%);
          mask-image: radial-gradient(120% 100% at 70% 30%, #000 30%, transparent 86%);
}
/* legibility scrim */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(110deg, rgba(16,16,19,0.78) 0%, rgba(16,16,19,0.40) 46%, rgba(16,16,19,0.08) 100%),
    radial-gradient(140% 120% at 0% 0%, rgba(16,16,19,0.35), transparent 60%);
}
/* fine grain texture */
.hero {
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
}

@keyframes meshDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-2.4%, 1.4%, 0) scale(1.06); }
  100% { transform: translate3d(2%, -1.6%, 0) scale(1.04); }
}

.hero .eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--magenta-glow);
  margin-bottom: 22px;
  padding-left: 2px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  max-width: 16ch;
  margin-bottom: clamp(22px, 3vw, 34px);
}
.hero h1 span {
  position: relative;
  color: var(--magenta-glow);
  white-space: nowrap;
  text-shadow: 0 0 38px rgba(199,127,184,0.55);
}
.hero h1 span::after {
  content: "";
  position: absolute;
  left: 0; right: 6%;
  bottom: 0.06em;
  height: 2px;
  background: linear-gradient(90deg, var(--magenta-glow), transparent);
  opacity: 0.7;
}
.hero .lede {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  color: #DDD9DF;
  max-width: 52ch;
  margin-bottom: 10px;
}
.hero .lede strong.counter {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.06em;
  color: var(--magenta-glow);
  text-shadow: 0 0 22px rgba(199,127,184,0.40);
  letter-spacing: -0.01em;
}
.hero .unlock-note {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 14px;
  max-width: 52ch;
}

/* freshness pill */
.hero .freshness {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding: 9px 9px 9px 16px;
  font-size: 13px;
  color: #CFCBD4;
  background: rgba(31,31,37,0.62);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero .freshness time { color: var(--ink); font-weight: 500; }
.pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--magenta-glow);
  box-shadow: 0 0 0 0 rgba(199,127,184,0.55);
  animation: pulseRing 2.2s var(--ease) infinite;
  flex: 0 0 auto;
}
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(199,127,184,0.55); }
  70%  { box-shadow: 0 0 0 11px rgba(199,127,184,0); }
  100% { box-shadow: 0 0 0 0 rgba(199,127,184,0); }
}
#refreshBtn {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: rgba(173,116,162,0.16);
  border: 1px solid rgba(173,116,162,0.42);
  border-radius: 999px;
  padding: 9px 17px;
  min-height: 38px;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
#refreshBtn:hover { background: rgba(173,116,162,0.28); border-color: var(--magenta-glow); }
#refreshBtn:active { transform: scale(.96); }
#refreshBtn:disabled { opacity: 0.6; cursor: progress; }
#refreshBtn.is-loading { position: relative; color: transparent; }
#refreshBtn.is-loading::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 13px; height: 13px;
  border: 2px solid rgba(244,242,245,0.35);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero .evidence-label {
  margin-top: 26px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* =============================================================================
   ENGINE GRID
   ============================================================================= */
.engine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;
}
.engine {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, var(--inner-hi), transparent 38%),
    var(--panel);
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: transform .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}
.engine::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(199,127,184,0.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;
  transition: opacity .28s var(--ease);
  pointer-events: none;
}
.engine:hover {
  transform: translateY(-4px);
  border-color: rgba(173,116,162,0.32);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,0.8), 0 0 36px -18px rgba(173,116,162,0.5);
}
.engine:hover::before { opacity: 1; }
.engine .logo {
  width: 40px; height: 40px;
  border-radius: 11px;
  margin-bottom: 14px;
}
.engine h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.engine .vendor {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 1px;
}
.engine .count {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 38px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 16px 0 2px;
  background: linear-gradient(180deg, #fff, var(--magenta-glow) 130%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.engine .count-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.engine .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  min-height: 22px;
}
.tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tag-training {
  color: #E6B6DC;
  background: rgba(173,116,162,0.14);
  border-color: rgba(173,116,162,0.32);
}
.tag-ai_search {
  color: #A9DCF2;
  background: rgba(76,182,226,0.13);
  border-color: rgba(76,182,226,0.30);
}
.tag-user_fetch {
  color: #C9B2E6;
  background: rgba(155,111,196,0.15);
  border-color: rgba(155,111,196,0.34);
}

/* =============================================================================
   TREND CHART
   ============================================================================= */
.trend #trendChart {
  margin-top: 8px;
  padding: 26px 24px 16px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, var(--inner-hi), transparent 30%),
    var(--panel);
  border: 1px solid var(--hairline);
}
#trendChart svg { width: 100%; height: auto; display: block; }
#trendChart .grid-line { stroke: rgba(255,255,255,0.06); stroke-width: 1; }
#trendChart .axis-label { fill: var(--faint); font: 500 11px var(--sans); }
#trendChart .bar { transition: opacity .18s var(--ease); cursor: default; }
#trendChart .bar:hover { opacity: 0.82; }
#trendChart .area-line { fill: none; stroke: var(--magenta-glow); stroke-width: 2; }
#trendChart .dot { fill: var(--magenta-glow); }
#trendChart .dot-halo { fill: rgba(199,127,184,0.18); }
#trendChart .empty {
  fill: var(--muted); font: 500 14px var(--sans);
}

/* =============================================================================
   TOP CONTENT
   ============================================================================= */
.content-list {
  list-style: none;
  margin: 0; padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--panel);
  overflow: hidden;
}
.content-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title hits" "path hits";
  align-items: center;
  gap: 2px 16px;
  padding: 15px 20px;
  border-top: 1px solid var(--hairline-2);
  transition: background .18s var(--ease);
}
.content-list li:first-child { border-top: none; }
.content-list li:hover { background: rgba(255,255,255,0.025); }
.content-list li a {
  grid-area: title;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  transition: color .18s var(--ease);
}
.content-list li a:hover { color: var(--magenta-glow); }
.content-list .path {
  grid-area: path;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-list .hits {
  grid-area: hits;
  justify-self: end;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #E6B6DC;
  background: rgba(173,116,162,0.14);
  border: 1px solid rgba(173,116,162,0.28);
  border-radius: 999px;
  padding: 4px 11px;
}

/* =============================================================================
   REFERRALS
   ============================================================================= */
.ref-list {
  list-style: none; margin: 0; padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--panel);
}
.ref-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--hairline-2);
}
.ref-list li:first-child { border-top: none; }
.ref-list li span { font-weight: 600; color: var(--magenta-glow); font-variant-numeric: tabular-nums; }
.ref-list li.muted {
  color: var(--muted);
  font-style: normal;
  justify-content: flex-start;
  gap: 10px;
}
.ref-list li.muted::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--faint);
  flex: 0 0 auto;
}
.referrals .section-note em { color: var(--blue); font-style: normal; font-weight: 600; }

/* =============================================================================
   CITATIONS — "coming soon" ghost card
   ============================================================================= */
.citations.placeholder {
  padding: 32px clamp(22px, 4vw, 40px);
  border-radius: var(--radius-sm);
  border: 1.5px dashed rgba(173,116,162,0.34);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(173,116,162,0.08), transparent 60%),
    rgba(31,31,37,0.4);
  position: relative;
}
.citations.placeholder::after {
  content: "Live report";
  position: absolute;
  top: 18px; right: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta-glow);
  background: rgba(173,116,162,0.12);
  border: 1px solid rgba(173,116,162,0.34);
  border-radius: 999px;
  padding: 4px 11px;
}
.citations.placeholder h2 { margin-bottom: 8px; }
.citations.placeholder .section-note { margin-bottom: 0; }

/* =============================================================================
   OPENNESS — confident statement block
   ============================================================================= */
.openness {
  padding: clamp(30px, 5vw, 48px);
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(76,182,226,0.10), transparent 56%),
    radial-gradient(80% 120% at 0% 100%, rgba(173,116,162,0.12), transparent 58%),
    var(--panel);
  position: relative;
  overflow: hidden;
}
.openness h2 {
  display: flex;
  align-items: center;
  gap: 16px;
}
/* circular badge holding a CSS checkmark, perfectly centered */
.openness h2 .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(76,182,226,0.30), transparent 72%),
    rgba(76,182,226,0.10);
  border: 1px solid rgba(76,182,226,0.42);
  box-shadow: 0 0 24px -8px rgba(76,182,226,0.5);
}
.openness h2 .check::before {
  content: "";
  width: 13px; height: 7px;
  margin-top: -3px;
  border-left: 2.5px solid var(--blue);
  border-bottom: 2.5px solid var(--blue);
  transform: rotate(-45deg);
}
.openness p {
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.6;
  color: #DDD9DF;
  max-width: 64ch;
  margin-top: 14px;
}

/* =============================================================================
   PROOF — terminal / code panel
   ============================================================================= */
.proof details {
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--bg-deep);
  overflow: hidden;
}
.proof summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
  transition: background .18s var(--ease);
}
.proof summary::-webkit-details-marker { display: none; }
.proof summary::before {
  content: "›";
  font-family: var(--mono);
  color: var(--magenta-glow);
  font-size: 20px;
  line-height: 1;
  transition: transform .22s var(--ease);
}
.proof details[open] summary::before { transform: rotate(90deg); }
.proof summary:hover { background: rgba(255,255,255,0.025); }
.proof summary:focus-visible { outline: 2px solid var(--magenta); outline-offset: -2px; }
.proof details > p {
  padding: 0 22px 14px;
  color: var(--muted);
  font-size: 14px;
  max-width: 80ch;
}
.proof .query {
  margin: 0 16px 16px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #0B0B0E;
  border: 1px solid var(--hairline-2);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: #B9D4C8;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  position: relative;
}
.proof .query::before {
  content: "GraphQL · Cloudflare Analytics";
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline-2);
}

/* =============================================================================
   FOOTER (injected by app.js)
   ============================================================================= */
.avr-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px clamp(18px, 4vw, 40px) 56px;
  border-top: 1px solid var(--hairline-2);
  margin-top: clamp(40px, 6vw, 80px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  font-size: 12.5px;
  color: var(--faint);
}
.avr-footer .fdot { color: var(--faint); }
.avr-footer .flive {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted);
}
.avr-footer .flive::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--magenta-glow);
  box-shadow: 0 0 8px rgba(199,127,184,0.7);
}

/* =============================================================================
   SCROLL REVEAL
   ============================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 860px) {
  .engine-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .avr-topbar .tag-eyebrow { display: none; }
  .hero {
    padding: clamp(44px, 14vw, 64px) 22px 40px;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .hero h1 { font-size: clamp(33px, 10vw, 44px); }
  .hero h1 span { white-space: normal; }
  .hero .freshness { width: 100%; }
  .engine-grid { grid-template-columns: 1fr; }
  .content-list li {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "path" "hits";
    gap: 6px;
  }
  .content-list .hits { justify-self: start; }
  .openness h2 { flex-direction: row; }
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */
:where(a, button, summary):focus-visible {
  outline: 2px solid var(--magenta-glow);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero::before { animation: none; }
}

/* ---- AI retrieval (query-time answering) section ---- */
.retrieval-list { list-style:none; margin:0; padding:0; border:1px solid var(--hairline); border-radius:var(--radius-sm); background:var(--panel); overflow:hidden; }
.retrieval-list li { display:flex; align-items:center; gap:14px; padding:16px 20px; border-top:1px solid var(--hairline-2); transition:background .18s var(--ease); }
.retrieval-list li:first-child { border-top:none; }
.retrieval-list li:hover { background:rgba(255,255,255,0.025); }
.retrieval-list .ret-logo { width:26px; height:26px; border-radius:7px; flex:0 0 auto; }
.retrieval-list .ret-eng { font-weight:600; color:var(--ink); min-width:140px; }
.retrieval-list .ret-meta { color:var(--muted); font-size:0.86rem; flex:1; }
.retrieval-list .ret-count { color:var(--magenta-glow); font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.retrieval-list .muted { color:var(--muted); }
@media (max-width:640px){ .retrieval-list li{ flex-wrap:wrap; gap:6px 12px; } .retrieval-list .ret-eng{ min-width:0; } .retrieval-list .ret-meta{ flex-basis:100%; order:3; } }

/* ---- citation matrix ---- */
.citegrid-wrap { overflow-x:auto; border:1px solid var(--hairline); border-radius:var(--radius-sm); background:var(--panel); }
.citegrid { width:100%; border-collapse:collapse; font-size:0.9rem; }
.citegrid th, .citegrid td { padding:12px 14px; text-align:left; border-top:1px solid var(--hairline-2); }
.citegrid thead th { color:var(--muted); font-weight:600; border-top:none; white-space:nowrap; }
.citegrid th.eng { text-align:center; } .citegrid th.eng.off { color:var(--faint); }
.citegrid td.q { color:var(--ink); min-width:240px; }
.citegrid td.c { text-align:center; white-space:nowrap; }
.citegrid td.c.yes a, .citegrid td.c.yes { color:#7ee0a6; font-weight:600; text-decoration:none; }
.citegrid td.c.yes a:hover { text-decoration:underline; }
.citegrid td.c.no { color:var(--faint); }
.citegrid td.c.off, .citegrid td.c.err { color:var(--faint); }
.citegrid .cat { display:inline-block; font-size:0.7rem; text-transform:uppercase; letter-spacing:.04em; padding:1px 7px; border-radius:999px; margin-right:6px; vertical-align:middle; }
.citegrid .cat-branded { background:rgba(173,116,162,0.18); color:var(--magenta-glow); }
.citegrid .cat-category { background:rgba(76,182,226,0.15); color:var(--blue); }
@media (max-width:640px){ .citegrid td.q{ min-width:160px; } .citegrid th,.citegrid td{ padding:9px 10px; } }

/* trend chart value labels (numbers on bars) */
#trendChart .bar-value { fill: var(--ink); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: 0.92; }
@media (max-width:520px){ #trendChart .bar-value { font-size: 9px; } }

/* =============================================================================
   MEASUREMENT CAVEAT — the limits, stated before the numbers
   Deliberately quiet: this is not a disclaimer to be skimmed past, but it must
   not compete with the hero for attention either.
   ============================================================================= */
.hero .lede-sub {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 60ch;
  margin-top: 14px;
}
.hero .lede-sub strong { color: var(--ink); font-weight: 600; }

.caveat {
  padding: clamp(22px, 3vw, 30px) clamp(22px, 3.2vw, 34px);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--magenta);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255,255,255,0.022);
}
.avr > section.caveat > h2 {
  font-size: clamp(19px, 2.1vw, 23px);
  margin-bottom: 14px;
}
.caveat p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
  max-width: 78ch;
}
.caveat p + p { margin-top: 14px; }
.caveat em { color: var(--ink); font-style: italic; }
.caveat .caveat-provenance {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-2);
  font-size: 14px;
  color: var(--faint);
}

/* proof panel — one label per published query, so a reader knows which number
   each one checks */
.proof .query-label {
  padding: 0 22px 8px;
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  max-width: 80ch;
}
