/* /app-privacy database — additions on top of blog.css. The stat band, leak
   cards, offenders list, and the searchable table all live outside <article>
   (blog.css scopes its table styles there), so they carry their own styling.
   Colours reuse the blog.css design tokens so the page matches site chrome. */

.app-section-lead { color: var(--muted); max-width: 62ch; margin: 0 0 18px; }
.index h2 { margin-top: 2.4rem; }

/* --- stat band --- */
.app-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin: 26px 0 8px;
}
.app-stat {
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 16px;
  background: var(--cream);
}
.app-stat-n {
  display: block; font-size: 40px; line-height: 1; font-weight: 800;
  color: var(--forest); font-family: var(--serif); letter-spacing: -0.01em;
}
.app-stat-l { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }
.app-stat-l strong { color: var(--ink); font-weight: 650; }

/* --- common-leak cards --- */
.app-leak-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.app-leak {
  border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--paper);
}
.app-leak h3 { margin: 0 0 6px; font-size: 18px; }
.app-leak-stat { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.app-leak-stat strong { font-size: 22px; color: var(--forest); font-family: var(--serif); }
.app-leak-mean { margin: 0 0 10px; font-size: 15px; }
.app-leak-why { margin: 0; font-size: 14px; }
.app-leak-why a { font-weight: 600; }

/* --- serious offenders --- */
.app-offenders {
  border: 1px solid var(--line); border-left: 4px solid var(--sage-2);
  border-radius: 12px; padding: 20px 22px; background: var(--paper-2); margin-top: 2.4rem;
}
.app-offenders h2 { margin-top: 0; }
.app-offender-list { list-style: none; margin: 12px 0 0; padding: 0; }
.app-offender-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.app-offender-list li:last-child { border-bottom: 0; }
.app-offender-name { font-weight: 650; }
.app-offender-n { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* --- searchable directory --- */
.app-count { color: var(--muted); margin: 6px 0 10px; }
.app-filter-wrap { margin: 0 0 14px; }
.app-filter-wrap label { font-weight: 650; margin-right: 8px; }
#app-filter {
  width: 100%; max-width: 420px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--cream); color: var(--ink); font: inherit;
}
/* A–Z jump bar: a row of letter chips. Empty letters render disabled so a
   click always lands on a populated list. */
.app-az {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px;
}
.app-az-btn {
  min-width: 30px; padding: 4px 6px; font: inherit; font-weight: 650;
  line-height: 1; text-align: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--cream); color: var(--ink);
}
.app-az-btn:hover:not(:disabled) { background: var(--paper-2); }
.app-az-btn.is-active {
  background: var(--forest); color: var(--cream); border-color: var(--forest);
}
.app-az-btn:disabled { opacity: 0.32; cursor: default; }

/* The directory scrolls inside its own box so long letter lists get a scroll
   bar instead of pushing the page down; sticky headers stay pinned. */
.app-tablewrap { overflow: auto; max-height: 70vh; }
.app-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.app-table th, .app-table td {
  border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: middle;
}
.app-table th { background: var(--paper-2); position: sticky; top: 0; }
/* Pager: Prev / "1–25 of N" / Next, under the table. */
.app-pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 12px 0 0;
}
.app-pager-btn {
  padding: 7px 14px; font: inherit; font-weight: 650; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--cream); color: var(--ink);
}
.app-pager-btn:hover:not(:disabled) { background: var(--paper-2); }
.app-pager-btn:disabled { opacity: 0.4; cursor: default; }
.app-pageinfo { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 8em; text-align: center; }
.app-pagesize-wrap { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.app-pagesize {
  padding: 6px 8px; font: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: var(--cream); color: var(--ink);
}

.app-name { font-weight: 600; }
.app-num { text-align: right; font-variant-numeric: tabular-nums; }
.app-num.app-warn { color: var(--link); font-weight: 700; }

.app-badge {
  display: inline-block; padding: 1px 8px; border: 1px solid var(--line);
  border-radius: 20px; font-size: 12px; font-weight: 650; white-space: nowrap;
}
.app-badge-android { background: var(--sage); }
.app-badge-ios { background: var(--paper-2); }
.app-badge-track {
  background: var(--forest); color: var(--cream); border-color: var(--forest);
}

/* --- ToS;DR privacy grade badge (A best … E worst). The letter is real text,
   so the colour is a reinforcement, never the sole signal. The earthy red for
   D/E is defined here because the site palette is all-green. --- */
.app-grade-cell { text-align: center; }
.app-grade {
  display: inline-block; min-width: 1.5em; padding: 1px 7px; border-radius: 6px;
  border: 1px solid var(--line); font-weight: 800; font-family: var(--serif);
  font-size: 15px; line-height: 1.5; text-align: center;
}
.app-grade-good { background: var(--sage); border-color: var(--sage-2); color: var(--forest); }
.app-grade-mid  { background: var(--paper-2); border-color: var(--line); color: var(--ink); }
.app-grade-bad  { background: #f0d9d1; border-color: #c88a76; color: #7a2c19; }
.app-grade-link { text-decoration: none; }
.app-grade-link:hover .app-grade { filter: brightness(0.97); }

/* --- F-Droid AntiFeature flags under the app name --- */
.app-flags-wrap { display: block; margin-top: 3px; }
.app-flags { font-size: 12px; color: var(--muted); font-weight: 600; }

/* --- third-party data attribution --- */
.app-attribution {
  margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}

/* --- caveats --- */
.app-caveats {
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px;
  background: var(--paper-2); margin-top: 2.4rem;
}
.app-caveats h2 { margin-top: 0; }
.app-caveats ul { margin: 0; padding-left: 20px; }
.app-caveats li { margin: 8px 0; font-size: 15px; }

/* --- request an app --- */
.app-request {
  border: 1px solid var(--line); border-left: 4px solid var(--sage-2);
  border-radius: 12px; padding: 20px 22px; background: var(--paper-2); margin-top: 2.4rem;
}
.app-request h2 { margin-top: 0; }
.app-request-form { margin-top: 6px; max-width: 560px; }
.app-request-form label { display: block; font-weight: 650; margin: 12px 0 5px; }
.app-request-form input[type="text"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--cream); color: var(--ink); font: inherit;
}
.app-request-hint {
  margin: 0 0 6px; padding: 9px 12px; border-radius: 8px;
  background: var(--sage); border: 1px solid var(--line); font-size: 14px;
}
.app-request-actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px;
}
.app-request-actions button {
  padding: 10px 18px; border: 1px solid var(--forest); border-radius: 8px;
  background: var(--forest); color: var(--cream); font: inherit; font-weight: 650; cursor: pointer;
}
.app-request-actions button:disabled { opacity: .6; cursor: progress; }
.app-request-status { margin: 12px 0 0; font-size: 14px; min-height: 1.2em; }
.app-request-status[data-kind="ok"] { color: var(--forest); font-weight: 650; }
.app-request-status[data-kind="err"] { color: var(--link); font-weight: 650; }
.app-request-status[data-kind="pending"] { color: var(--muted); }
.app-request-status a { margin-left: 6px; }
/* Honeypot: off-screen for humans, present for bots. */
.app-hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}

/* --- Measured iOS evidence (ADR 0016 P3): the crowdsourced band on the index
   + the per-app evidence page. Same tokens as the rest of the page. --- */
.app-badge-measured {
  background: var(--sage); border-color: var(--forest); color: var(--ink, inherit);
}
.app-name-link { text-decoration: none; }
.app-name-link:hover { text-decoration: underline; }
.app-measured-band {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin: 26px 0 8px; background: var(--paper-2);
}
.app-measured-band h2 { margin-top: 0; }
.app-stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin: 14px 0;
}
.apm-crumbs { margin: 18px 0 0; font-size: 14px; }
.apm-domain code { font-size: 13px; word-break: break-all; }
.apm-table td { vertical-align: top; }

/* Sensitive-data (GDPR special-category) badge — earthy red family like the
   D/E grades; the WORD carries the meaning, colour only reinforces. */
.app-badge-sensitive { background: #f3e2df; border-color: #a45248; color: #7a2e2e; }
.app-research { color: var(--muted); max-width: 72ch; }
.app-research li { margin: 0 0 10px; }

/* SDK privacy reference (/app-privacy/sdks/): collapsible per-SDK cards. */
.sdk-card { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; background: var(--paper-2); }
.sdk-card > summary { padding: 12px 16px; cursor: pointer; }
.sdk-card[open] > summary { border-bottom: 1px solid var(--line); }
.sdk-card .app-tablewrap { padding: 4px 12px 12px; }
.sdk-table td, .sdk-table th { font-size: 14px; }

/* Dispute / request-an-edit form (ADR 0020 pages, migration 0046). */
.dispute form{display:grid;gap:12px;max-width:40rem}
.dispute textarea,.dispute input[type=email]{width:100%;font:inherit;padding:8px 10px;border:1px solid #c9c3b4;border-radius:8px;background:inherit;color:inherit}
.dispute button[type=submit]{justify-self:start}
.dispute .hp-field{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.dispute-status{min-height:1.2em}
.dispute-err{color:#b3372f;font-weight:600}
