/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --brand: #c02a2a;
  --brand-light: #f5e6e6;
  --link: #3477ad;
  --text: #333;
  --muted: #828282;
  --muted-dark: #555;
  --bg: #fdfdfd;
  --surface: #fafafa;
  --border: #e8e8e8;
  --content-w: 980px;
  --gap: 30px;

  /* per-tracker accent colors */
  --meta: #1877f2;
  --google: #ea4335;
  --firebase: #fbbc05;
  --yandex: #ff0000;
  --purple: #7c3aed;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 68px;
}

body {
  font-family: "Source Sans 3", "Source Sans Pro", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
  padding: 0;
}
p {
  margin-bottom: 1em;
}
p:last-child {
  margin-bottom: 0;
}

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  max-width: calc(var(--content-w) + 2 * var(--gap));
  margin: 0 auto;
  padding: 0 var(--gap);
}

section {
  padding: 3.5rem 0;
}
section + section {
  border-top: 1px solid var(--border);
}

/* ─── Nav ───────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-top: 5px solid var(--brand);
  border-bottom: 1px solid var(--border);
  height: 58px;
}

.nav-inner {
  max-width: calc(var(--content-w) + 2 * var(--gap));
  margin: 0 auto;
  padding: 0 var(--gap);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
}

.site-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  white-space: nowrap;
  margin-right: 2rem;
  text-decoration: none;
}
.site-title:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.nav-links a {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted-dark);
  padding: 0.3rem 0.65rem;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0.8;
  transition:
    opacity 0.2s,
    color 0.2s;
}
.nav-links a:hover {
  opacity: 1;
  color: var(--brand);
  text-decoration: none;
}
.nav-links a.active {
  opacity: 1;
  color: var(--brand);
  border-bottom: 2px solid var(--brand);
  border-radius: 0;
}

.nav-divider {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--border);
  margin: 0 0.3rem;
  vertical-align: middle;
}

.nav-ext {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-ext a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  padding: 5px 12px;
  border: 1px solid #e8b0b0;
  border-radius: 3px;
  white-space: nowrap;
  transition:
    background 0.2s,
    color 0.2s;
}
.nav-ext a:hover {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  padding-top: calc(58px + 3.5rem);
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand);
  background: var(--brand-light);
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 1.2rem;
}
.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
  max-width: 720px;
  margin-bottom: 1.2rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--muted-dark);
  max-width: 640px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.hero-callouts {
  padding: 1rem 0 0;
}
.hero-callouts .callout {
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
  line-height: 1.5;
}
.hero-callouts .callout:last-child {
  margin-bottom: 0;
}
.hero-callouts .callout-title {
  font-size: 0.68rem;
  margin-bottom: 0.1rem;
}

/* ─── Hero Body ─────────────────────────────────────────────── */
.hero-body {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.hero-figure {
  flex-shrink: 0;
  width: 340px;
}

.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-text {
  min-width: 0;
}

/* ─── Hero Stats ────────────────────────────────────────────── */
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.stat-cell {
  background: #fff;
  padding: 1.2rem 1.4rem;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--brand);
  line-height: 1;
  display: block;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  display: block;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover {
  background: #a52020;
  border-color: #a52020;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: #e8b0b0;
}
.btn-outline:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-neutral {
  background: transparent;
  color: var(--muted-dark);
  border-color: var(--border);
}
.btn-neutral:hover {
  border-color: var(--muted-dark);
  color: var(--text);
}

/* ─── Section Headings ──────────────────────────────────────── */
.section-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}
.section-heading::after {
  content: "";
  display: block;
  width: 2em;
  height: 2px;
  background: var(--brand);
  margin-top: 6px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* ─── Callout / Alert Banners ───────────────────────────────── */
.callout {
  border-left: 4px solid var(--brand);
  background: var(--surface);
  padding: 1rem 1.25rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.callout-title {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.callout.callout-info {
  border-color: var(--link);
}
.callout.callout-warn {
  border-color: #d97706;
}
.callout.callout-success {
  border-color: #059669;
}

/* ─── Platform Cards ────────────────────────────────────────── */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.platform-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 1.2rem 1.4rem;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.platform-card:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  border-color: #ccc;
}

.platform-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.platform-surfaces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.surface-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
}
.surface-tag svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0.7;
}

.surface-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted-dark);
  white-space: nowrap;
}
.surface-icon svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--muted);
}

/* ─── Tracker Pills ─────────────────────────────────────────── */
.tracker-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pill-meta {
  background: #e7f0fd;
  color: var(--meta);
}
.pill-google {
  background: #fce8e6;
  color: var(--google);
}
.pill-firebase {
  background: #fef9e7;
  color: #b45309;
}
.pill-yandex {
  background: #fff0f0;
  color: var(--yandex);
}
.pill-unknown {
  background: #f0f0f0;
  color: var(--muted-dark);
}
.pill-more {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ─── Leakage Matrix Table ──────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

table.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fff;
}

table.matrix thead th {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 0.7rem 0.9rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-dark);
  white-space: nowrap;
}

table.matrix tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
table.matrix tbody tr:last-child {
  border-bottom: none;
}
table.matrix tbody tr:hover {
  background: #f9f9f9;
}

table.matrix tbody td {
  padding: 0.65rem 0.9rem;
  vertical-align: middle;
  color: var(--text);
}

table.matrix td.platform-col {
  font-weight: 600;
  white-space: nowrap;
}

.leak-yes {
  color: var(--brand);
  font-weight: 700;
  font-size: 1rem;
}
.leak-no {
  color: #aaa;
}
.leak-part {
  color: #d97706;
  font-weight: 700;
}
.leak-unk {
  color: #ccc;
}

.severity {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sev-critical {
  background: #fee2e2;
  color: #991b1b;
}
.sev-high {
  background: #fef3c7;
  color: #92400e;
}
.sev-medium {
  background: #e0f2fe;
  color: #0369a1;
}
.sev-low {
  background: #f0fdf4;
  color: #166534;
}

/* ─── Condition Matrix ──────────────────────────────────────── */
table.conditions thead th:first-child {
  width: 200px;
}

.cond-yes {
  text-align: center;
  color: var(--brand);
  font-weight: 700;
}
.cond-no {
  text-align: center;
  color: #ccc;
}
.cond-partial {
  text-align: center;
  color: #d97706;
  font-weight: 700;
}

/* ─── Timeline ──────────────────────────────────────────────── */
.timeline {
  position: relative;
  margin-top: 1.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 112px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.tl-item {
  display: flex;
  gap: 0;
  margin-bottom: 1.8rem;
  position: relative;
}

.tl-date {
  min-width: 112px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 2px;
  padding-right: 1.2rem;
  text-align: right;
}

.tl-dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 6px;
  margin-right: 1.2rem;
  margin-left: 0;
}
.tl-dot.open {
  background: #fff;
  border: 2px solid var(--border);
}

.tl-body {
  flex: 1;
}
.tl-body strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}
.tl-body p {
  font-size: 0.88rem;
  color: var(--muted-dark);
  margin: 0;
}

/* ─── FAQ / Accordion ───────────────────────────────────────── */
.faq-list {
  margin-top: 1.5rem;
}

details.faq {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0;
  margin-bottom: 0.6rem;
  background: #fff;
  transition: box-shadow 0.2s;
}
details.faq[open] {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

details.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
details.faq summary::-webkit-details-marker {
  display: none;
}
details.faq summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
details.faq[open] summary::after {
  content: "−";
}

details.faq .faq-body {
  padding: 0 1.1rem 1rem;
  font-size: 0.9rem;
  color: var(--muted-dark);
  line-height: 1.7;
  border-top: 1px solid var(--border);
}
details.faq .faq-body p {
  margin-top: 0.75rem;
}

/* ─── Grids ─────────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2.5rem;
  margin-top: 1.5rem;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 800px) {
  .three-col {
    grid-template-columns: 1fr;
  }
}

/* ─── Researcher Grid ───────────────────────────────────────── */
.researcher-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}
.researcher-row {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.researcher-row .researcher-card {
  width: 210px;
  flex-shrink: 0;
}

/* ─── Researcher Cards ──────────────────────────────────────── */
.researcher-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.6rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.researcher-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  border-color: #d0d0d0;
}

.researcher-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.researcher-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.researcher-affil {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.researcher-email {
  font-size: 0.76rem;
  color: var(--link);
  word-break: break-all;
  line-height: 1.4;
}
.researcher-email:hover {
  text-decoration: underline;
}

/* ─── Leak condition tags ───────────────────────────────────── */
.leak-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.leak-always {
  background: #fee2e2;
  color: #991b1b;
}
.leak-cookies {
  background: #fef3c7;
  color: #92400e;
}
.leak-discontinued {
  background: #f0f0f0;
  color: #828282;
  text-decoration: line-through;
}

/* ─── Matrix toolbar ────────────────────────────────────────── */
.matrix-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.btn-expand-all {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--link);
  background: none;
  border: 1px solid var(--link);
  border-radius: 3px;
  padding: 3px 12px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
  white-space: nowrap;
}
.btn-expand-all:hover {
  background: var(--link);
  color: #fff;
}

/* ─── Expanding matrix rows ─────────────────────────────────── */
.matrix-row {
  cursor: pointer;
}
.matrix-row:hover {
  background: #f9f9f9;
}
.matrix-row.row-open {
  background: #fafafa;
}
.row-chevron-cell {
  text-align: center;
  color: var(--muted);
  width: 1.8rem;
}
.row-chevron {
  display: inline-block;
  font-size: 1rem;
  transition: transform 0.2s ease;
  user-select: none;
}
.matrix-row.row-open .row-chevron {
  transform: rotate(90deg);
}
.detail-row td {
  padding: 0;
  background: #fafafa;
}
.detail-row-body {
  padding: 0.9rem 1.2rem;
  font-size: 0.84rem;
  color: var(--muted-dark);
  line-height: 1.7;
  border-left: 3px solid var(--brand);
  border-bottom: 2px solid var(--border);
}

/* ─── Inline Document Links ─────────────────────────────────── */
.doc-link {
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #b8d4ee;
  text-underline-offset: 2px;
}
.doc-link:hover {
  text-decoration-color: var(--link);
}

/* ─── Inline Code ───────────────────────────────────────────── */
.inline-code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.82em;
  background: #f0f4f8;
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
}

/* ─── Findings ──────────────────────────────────────────────── */
.findings-coda {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--muted-dark);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  max-width: 820px;
}

.finding-card {
  border-left: 4px solid var(--brand);
  background: var(--surface);
  padding: 1rem 1.2rem;
  border-radius: 0 5px 5px 0;
}
.finding-card.blue {
  border-color: var(--link);
}
.finding-card.amber {
  border-color: #d97706;
}
.finding-card.green {
  border-color: #059669;
}
.finding-card.purple {
  border-color: var(--purple);
}

.finding-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-dark);
  margin-bottom: 0.4rem;
}
.finding-card p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

/* ─── Methodology Steps ─────────────────────────────────────── */
/* ─── Per-section methodology callout ───────────────────────── */
.method-callout {
  margin-top: 1.5rem;
  background: #fafafa;
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  font-size: 0.84rem;
  color: var(--muted-dark);
  line-height: 1.7;
}

/* ─── Methodology platform blocks ───────────────────────────── */
.method-platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.method-platform-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem;
  background: #fff;
}

.method-platform-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.method-steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.method-step {
  counter-increment: step;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.2rem;
  position: relative;
}
.method-step::before {
  content: counter(step);
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}
.method-step h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.method-step p {
  font-size: 0.85rem;
  color: var(--muted-dark);
  line-height: 1.55;
}

/* ─── Research Figures ──────────────────────────────────────── */
.research-figure {
  margin: 0 0 3rem;
  padding: 0;
}
.research-figure:last-child {
  margin-bottom: 0;
}

/* ─── Web evidence panels ───────────────────────────────────── */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.evidence-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.evidence-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  border-color: #d8d8d8;
}
.evidence-card-header {
  padding: 1.15rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}
.evidence-card-header .platform-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.evidence-card-header .tracker-pills {
  margin-top: 0.6rem;
}
.card-media {
  flex: 1;
  background: #f4f4f4;
  position: relative;
  overflow: hidden;
}
.card-media .figure-img-wrap {
  border: none;
  border-radius: 0;
  background: transparent;
}
.card-media .figure-img-wrap img,
.card-media .figure-img-wrap video {
  display: block;
  width: 100%;
  height: auto;
}
.card-media-caption {
  padding: 0.7rem 1rem 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  background: #fff;
  border-top: 1px solid var(--border);
}
.card-media--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 200px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
  background: repeating-linear-gradient(135deg, #f4f4f4 0 8px, #ececec 8px 16px);
}
.card-media--placeholder::before {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23bbb'><path d='M8 5v14l11-7z'/></svg>");
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position: 13px 12px;
}
.evidence-subheading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}
@media (max-width: 700px) {
  .evidence-grid {
    grid-template-columns: 1fr;
  }
}
.research-figure--small {
  margin: 0;
}
.research-figure--small .figure-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.research-figure--small figcaption {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}
@media (max-width: 700px) {
  .web-layout {
    grid-template-columns: 1fr;
  }
  .web-figures {
    flex-direction: row;
  }
}

/* ─── Consent screens figure ────────────────────────────────── */
.consent-figure {
  margin: 2.5rem 0 0;
  padding: 0;
}
.consent-figure-lead {
  font-size: 0.88rem;
  color: var(--muted-dark);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  max-width: 780px;
}
.consent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}
.consent-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.consent-platform-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

@media (max-width: 700px) {
  .consent-grid {
    grid-template-columns: 1fr;
  }
}

.figure-img-wrap {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #f8f8f8;
  line-height: 0;
  position: relative;
  cursor: zoom-in;
}
.figure-img-wrap::after {
  content: "Click to expand";
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.figure-img-wrap:hover::after {
  opacity: 1;
}
.figure-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.2s;
}
.figure-img-wrap:hover img {
  filter: brightness(0.97);
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-dark);
  line-height: 1.6;
  max-width: 860px;
}
.fig-label {
  font-weight: 700;
  color: var(--text);
}

/* ─── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox.open {
  display: flex;
  animation: lbFade 0.2s ease;
}

@keyframes lbFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-inner {
  max-width: 1200px;
  width: 100%;
  cursor: default;
}
.lightbox-inner img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  text-align: center;
}
.lightbox-caption strong {
  color: #fff;
}

.lightbox-close {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ─── Code / Payload Block ──────────────────────────────────── */
.payload-block {
  background: #1e1e2e;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-top: 1.5rem;
}
.payload-block code {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  color: #cdd6f4;
  display: block;
  white-space: pre;
}
.payload-block .key {
  color: #89b4fa;
}
.payload-block .val {
  color: #a6e3a1;
}
.payload-block .redact {
  color: #f38ba8;
}
.payload-block .comment {
  color: #6c7086;
}

/* ─── Footer ────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.3rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--muted-dark);
}
.footer-links a:hover {
  color: var(--brand);
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 800px) {
  .hero h1 {
    font-size: 1.9rem;
  }
  .hero-body {
    flex-direction: column;
  }
  .hero-figure {
    width: 100%;
    max-width: 360px;
  }
  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .method-steps {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  :root {
    --gap: 18px;
  }
  .hero h1 {
    font-size: 1.55rem;
  }
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .method-steps {
    grid-template-columns: 1fr;
  }
  .timeline::before {
    left: 4px;
  }
  .tl-item {
    display: grid;
    grid-template-columns: 22px 1fr;
    grid-template-areas: "dot date" "dot body";
  }
  .tl-date {
    grid-area: date;
    min-width: unset;
    text-align: left;
    padding-right: 0;
    padding-bottom: 0.2rem;
  }
  .tl-dot {
    grid-area: dot;
    margin-right: 0;
  }
  .tl-body {
    grid-area: body;
  }
  .footer-inner {
    flex-direction: column;
  }
}
