/* "What we find" page. Self-contained: loads on top of style.css. Matches the
   Veropol palette (violet brand, the stamp red/green) and leans on Bricolage
   Grotesque, which base.html already loads. Animations are opt-in and reduced-motion
   safe: the markup carries the final numbers/widths, and defenses.js only resets them
   to animate when motion is allowed (see defenses.js). */
.defenses {
  --df-brand: #4b2fe0;
  --df-ink: #1b1536;
  --df-mut: #6b6688;
  --df-line: #e7e3f6;
  --df-track: #efecfb;
  --df-red: #e8326a;
  --df-amber: #c67d00;
  --df-amber-pip: #f2a738;
  --df-green: #13a06b;
}

/* ---- hero ---------------------------------------------------------------- */
.df-hero { background: linear-gradient(180deg, #f5f2ff 0%, #fdfcff 100%); border-bottom: 1px solid var(--df-line); }
.df-hero .wrap { padding: 54px 0 40px; }
.df-kicker { margin: 0 0 12px; color: var(--df-brand); font-weight: 600; letter-spacing: .01em; }
.df-hero h1 { margin: 0; max-width: 20ch; font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.04; letter-spacing: -.02em; color: var(--df-ink); }
.df-lead { margin: 18px 0 0; max-width: 62ch; color: var(--df-mut); font-size: 1.06rem; line-height: 1.5; }

.df-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.df-stat { padding-top: 14px; border-top: 3px solid var(--df-brand); }
.df-stat b { display: block; font-size: clamp(2rem, 4.6vw, 2.9rem); font-weight: 800; color: var(--df-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.df-stat span { display: block; margin-top: 8px; color: var(--df-mut); font-size: .95rem; line-height: 1.35; }

/* ---- table --------------------------------------------------------------- */
.df-wrap { padding: 44px 0 10px; }
.df-scroll { overflow-x: auto; }
.df-table { width: 100%; min-width: 660px; border-collapse: collapse; }
.df-table thead th { text-align: left; padding: 0 18px 12px; font-size: .82rem; font-weight: 700; color: var(--df-mut); border-bottom: 2px solid var(--df-line); }
.df-c-seen { width: 30%; }
.df-c-held { width: 40%; }
.df-row { border-bottom: 1px solid var(--df-line); transition: background .15s; }
.df-row:hover { background: #faf9ff; }
.df-table td { padding: 18px; vertical-align: top; }

.df-c-name b { display: block; font-size: 1.12rem; font-weight: 700; color: var(--df-ink); }
.df-c-name span { display: block; margin-top: 3px; color: var(--df-mut); font-size: .9rem; }

/* prevalence bar + count */
.df-c-seen { white-space: nowrap; }
.df-bar { height: 12px; border-radius: 7px; background: var(--df-track); overflow: hidden; }
.df-fill { display: block; height: 100%; width: var(--w, 0%); border-radius: 7px;
  background: linear-gradient(90deg, #6a4ff0, var(--df-brand));
  transition: width .9s cubic-bezier(.2, .72, .22, 1); }
.df-pct { display: inline-block; margin-top: 7px; font-weight: 800; color: var(--df-ink); font-variant-numeric: tabular-nums; }

/* held-up: a 0-5 star rating + a one-line note */
.df-stars { display: inline-flex; gap: 3px; font-size: 1.12rem; line-height: 1; }
.df-stars i { font-style: normal; color: #d9d5e8; }
.df-stars i.on { color: #f4b400; }
.df-note { display: block; margin-top: 8px; color: var(--df-mut); font-size: .92rem; line-height: 1.4; max-width: 50ch; }

.df-foot { margin: 20px 0 0; color: var(--df-mut); font-size: .85rem; }
.df-foot code { background: #f1eefb; padding: 1px 6px; border-radius: 5px; font-size: .9em; }

/* stars pop in one after another when the row scrolls into view */
.df-row.in .df-stars i.on { animation: df-pop .4s both; }
.df-stars i:nth-child(1) { animation-delay: .04s; }
.df-stars i:nth-child(2) { animation-delay: .10s; }
.df-stars i:nth-child(3) { animation-delay: .16s; }
.df-stars i:nth-child(4) { animation-delay: .22s; }
.df-stars i:nth-child(5) { animation-delay: .28s; }
@keyframes df-pop { from { transform: scale(.2); opacity: .2; } to { transform: scale(1); opacity: 1; } }

/* ---- bot-check showcase -------------------------------------------------- */
.dc-wrap { padding: 46px 0 6px; }
.dc-wrap h2 { margin: 0; max-width: 20ch; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.08; letter-spacing: -.01em; color: var(--df-ink); }
.dc-sub { margin: 12px 0 26px; max-width: 60ch; color: var(--df-mut); line-height: 1.5; }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.dc-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 13px; padding: 15px 16px; border: 1px solid var(--df-line); border-radius: 14px; background: #fff; }
.dc-ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: #f1eefb; color: var(--df-brand); }
.dc-ic.brand { background: #fff; border: 1px solid var(--df-line); }   /* a clean tile so the vendor logos keep their own colours */
.dc-ic svg { width: 23px; height: 23px; display: block; }
.dc-ic .dc-logo { width: 26px; height: 26px; }
.dc-body b { display: block; color: var(--df-ink); font-size: 1rem; line-height: 1.15; }
.dc-body span { display: block; margin-top: 3px; color: var(--df-mut); font-size: .85rem; line-height: 1.3; }
.dc-seen { align-self: center; display: inline-flex; align-items: center; gap: 4px; color: var(--df-green); font-weight: 700; font-size: .8rem; white-space: nowrap; }
.dc-seen::before { content: "\2713"; font-size: .95em; }

/* ---- cta ----------------------------------------------------------------- */
.df-cta { margin: 40px 0 0; background: var(--df-ink); color: #fff; }
.df-cta .wrap { padding: 48px 0; text-align: center; }
.df-cta h2 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.2rem); letter-spacing: -.01em; }
.df-cta p { margin: 12px 0 24px; color: #c9c3e6; }

/* ---- phones: the table reflows into cards -------------------------------- */
@media (max-width: 640px) {
  .df-table { min-width: 0; }
  .df-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .df-table, .df-table tbody, .df-row, .df-table td { display: block; width: 100%; }
  .df-row { padding: 16px 0; }
  .df-table td { padding: 10px 0 0; }
  .df-table td.df-c-name { padding-top: 0; }
  .df-table td::before { content: attr(data-label); display: block; margin-bottom: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: var(--df-mut); }
  .df-c-name::before { display: none; }
  .df-c-seen, .df-c-held { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .df-fill { transition: none; }
  .df-row.in .df-stars i.on { animation: none; }
}
