/* AdPrune site.
   Two systems do the work: an 8pt spacing scale and an integer type scale.
   Every margin, padding and gap below is a token - no arbitrary values.
   Borders are rare on purpose; grouping is done with space and tint, and
   exactly one element on the page is elevated. */

:root {
  color-scheme: light;

  --accent: #2e7d32;
  --accent-hover: #256428;
  --accent-soft: #edf5ee;
  --on-accent: #ffffff;

  --ink: #1b241c;
  --ink-hover: #2a352b;
  --on-ink: #ffffff;

  --bg: #ffffff;
  --surface: #f4f7f4;
  --surface-2: #e9efea;
  --hairline: #e2e8e3;

  --fg: #10190f;
  --fg-2: #3c4a3f;
  --muted: #66746a;

  --warn: #8a5a00;
  --warn-soft: #fdf6e6;

  /* 8pt spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Type scale; line-heights stay on multiples of 4. */
  --t-xs: 12px;
  --t-sm: 14px;
  --t-base: 16px;
  --t-md: 18px;
  --t-lg: 20px;
  --t-xl: 24px;
  --t-2xl: 32px;
  --t-3xl: 40px;
  --t-4xl: 56px;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --radius: 12px;
  --radius-lg: 16px;
  --ease: 160ms cubic-bezier(0.2, 0, 0.2, 1);

  /* The one elevation on the page, reserved for the product itself. */
  --shadow-product:
    0 2px 4px rgb(16 25 15 / 0.04), 0 12px 24px -8px rgb(16 25 15 / 0.1),
    0 40px 72px -24px rgb(16 25 15 / 0.18);
  --shadow-btn: 0 1px 2px rgb(16 25 15 / 0.16);

  --page: 1080px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 9vw, 112px);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    /* #2e7d32 fails contrast on a dark ground, so the accent lightens rather
       than staying "on brand" at the cost of legibility. */
    --accent: #7cc47f;
    --accent-hover: #96d398;
    --accent-soft: #18251a;
    --on-accent: #0b140c;

    --ink: #e6ece6;
    --ink-hover: #ffffff;
    --on-ink: #101210;

    --bg: #101210;
    --surface: #171a17;
    --surface-2: #1f241f;
    --hairline: #272d27;

    --fg: #eaeee9;
    --fg-2: #c2cbc3;
    --muted: #8e9a90;

    --warn: #e8c268;
    --warn-soft: #221d11;

    --shadow-product:
      0 2px 4px rgb(0 0 0 / 0.4), 0 16px 32px -8px rgb(0 0 0 / 0.5),
      0 56px 96px -32px rgb(0 0 0 / 0.7);
    --shadow-btn: 0 1px 2px rgb(0 0 0 / 0.4);
  }
}

/* ── reset & base ───────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* The hero's tint promoted to the page ground: one continuous background for
   every section, instead of alternating white and grey bands. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      62% 46% at 10% -4%,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent 72%
    ),
    radial-gradient(
      46% 38% at 94% 10%,
      color-mix(in srgb, var(--accent) 9%, transparent),
      transparent 72%
    ),
    var(--bg);
}

body {
  margin: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 640;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--fg-2);
  white-space: nowrap;
}

/* WCAG 1.4.11 wants 3:1 against adjacent colours; the offset keeps the ring
   visible on filled shapes as well as flat text. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -64px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--ease);
}

.skip-link:focus {
  top: var(--s-3);
}

/* ── layout ─────────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: 760px;
}

.section {
  padding-block: var(--section);
}

[id] {
  scroll-margin-top: var(--s-9);
}

/* ── section headings ───────────────────────────────────────────────────── */

.eyebrow {
  display: block;
  margin-bottom: var(--s-4);
  font-size: var(--t-xs);
  line-height: 16px;
  font-weight: 660;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-head {
  margin-bottom: var(--s-8);
}

/* Measures are set per element: a headline wants a short line, its supporting
   paragraph wants a readable one. Capping the wrapper would squeeze both. */
.section-head h2 {
  max-width: 20ch;
  font-size: clamp(28px, 3.6vw, var(--t-3xl));
  line-height: 1.12;
}

.section-head p {
  max-width: 54ch;
  margin-top: var(--s-4);
  font-size: var(--t-md);
  line-height: 28px;
  color: var(--muted);
}

/* ── header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: var(--s-8);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  flex: none;
  font-size: var(--t-md);
  font-weight: 660;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin-left: auto;
  font-size: var(--t-sm);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease);
}

.nav a:hover {
  color: var(--fg);
}

@media (max-width: 760px) {
  .nav a:not(.nav-keep) {
    display: none;
  }
}

/* ── buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: var(--s-7);
  padding-inline: var(--s-5);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: var(--t-base);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease),
    transform var(--ease);
}

/* Exactly one of these is visible at a time - the isolation effect only pays
   out while the highlighted element is genuinely the only one. */
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--secondary {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-btn);
}

.btn--secondary:hover {
  background: var(--ink-hover);
}

.btn--quiet {
  background: transparent;
  color: var(--fg-2);
  padding-inline: var(--s-3);
}

.btn--quiet:hover {
  color: var(--fg);
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 88px) clamp(64px, 9vw, 112px);
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: clamp(48px, 6vw, 80px);
  align-items: center;
}

@media (max-width: 940px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .product {
    justify-self: start;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: var(--s-6);
  padding-inline: var(--s-3);
  margin-bottom: var(--s-5);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--t-xs);
  font-weight: 620;
}

.pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* The message has about three seconds to land, so it takes the largest type
   on the page by a wide margin and shares its line with nothing. */
.hero h1 {
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 680;
}

.hero h1 em {
  font-style: normal;
  color: var(--muted);
}

.hero-sub {
  max-width: 42ch;
  margin-top: var(--s-5);
  font-size: var(--t-lg);
  line-height: 32px;
  color: var(--fg-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-7);
}

/* ── product shot ───────────────────────────────────────────────────────── */

/* The only elevated object on the page, so it reads unambiguously as the
   thing being sold. */
.product {
  justify-self: center;
  width: 340px;
  max-width: 100%;
  padding: var(--s-3);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-product);
  font-size: var(--t-sm);
  line-height: 20px;
}

.pm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-1) var(--s-1) var(--s-3);
}

.pm-brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: 640;
  letter-spacing: -0.01em;
}

.pm-brand svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.pm-switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex: none;
  border-radius: 999px;
  background: var(--accent);
}

.pm-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
}

.pm-stat {
  padding: var(--s-4) var(--s-3) var(--s-3);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
}

.pm-status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  margin-bottom: var(--s-2);
  padding: 2px var(--s-2);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  line-height: 16px;
  font-weight: 660;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pm-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pm-total {
  font-size: var(--t-3xl);
  line-height: 44px;
  font-weight: 680;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.pm-total + span {
  display: block;
  font-size: var(--t-xs);
  line-height: 16px;
  color: var(--muted);
}

.pm-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--hairline);
  text-align: left;
}

.pm-split b {
  display: block;
  font-size: var(--t-sm);
  font-weight: 640;
  font-variant-numeric: tabular-nums;
}

.pm-split span {
  font-size: 10px;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.pm-rows {
  margin-top: var(--s-3);
}

.pm-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-1);
}

.pm-row + .pm-row {
  border-top: 1px solid var(--hairline);
}

.pm-row > span:not(.pm-switch) {
  min-width: 0;
  font-size: var(--t-xs);
  line-height: 20px;
}

.pm-row .pm-switch {
  margin-left: auto;
}

/* ── tables ─────────────────────────────────────────────────────────────── */

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  text-align: left;
}

thead th {
  padding: 0 var(--s-5) var(--s-3) 0;
  border-bottom: 1px solid var(--hairline);
  font-size: var(--t-xs);
  line-height: 16px;
  font-weight: 660;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

tbody td {
  padding: var(--s-4) var(--s-5) var(--s-4) 0;
  border-bottom: 1px solid var(--hairline);
  font-size: var(--t-base);
  line-height: 24px;
  vertical-align: top;
}

thead th:last-child,
tbody td:last-child {
  padding-right: 0;
}

td:first-child {
  width: 1%;
  white-space: nowrap;
}

/* ── with / without comparison ──────────────────────────────────────────── */

/* The AdPrune column is tinted end to end so the eye reads it as one block
   rather than eight separate wins. */
.compare table {
  min-width: 640px;
}

.compare thead td {
  width: 22%;
}

.compare th[scope='col'] {
  padding: var(--s-2) var(--s-5);
  text-align: left;
}

.compare .col-ours {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px 8px 0 0;
}

.compare tbody th {
  width: 22%;
  padding: var(--s-4) var(--s-5) var(--s-4) 0;
  border-bottom: 1px solid var(--hairline);
  font-size: var(--t-base);
  line-height: 24px;
  font-weight: 620;
  text-align: left;
  vertical-align: top;
}

.compare tbody td {
  padding: var(--s-4) var(--s-5);
  color: var(--muted);
}

.compare .cell-ours {
  background: var(--accent-soft);
  border-bottom-color: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--fg);
  font-weight: 560;
}

.compare tbody tr:last-child .cell-ours {
  border-bottom: 0;
  border-radius: 0 0 8px 8px;
}

/* Opt-out for cells whose first column is too long to hold one line. */
td.wrap-cell:first-child {
  width: auto;
  white-space: normal;
}

td .sub {
  display: block;
  margin-top: var(--s-1);
  font-size: var(--t-sm);
  line-height: 20px;
  color: var(--muted);
}

/* ── deny list ──────────────────────────────────────────────────────────── */

.deny-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-3) var(--s-6);
  margin-top: var(--s-7);
}

.deny-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  font-size: var(--t-base);
  line-height: 24px;
  color: var(--muted);
}

.deny-list svg {
  width: 15px;
  height: 15px;
  margin-top: 6px;
  flex: none;
  color: var(--accent);
}

/* ── limitations ────────────────────────────────────────────────────────── */

.limits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-7) var(--s-8);
}

.limit h3 {
  font-size: var(--t-md);
  line-height: 24px;
}

.limit p {
  margin-top: var(--s-2);
  font-size: var(--t-base);
  line-height: 24px;
  color: var(--muted);
}

/* ── install ────────────────────────────────────────────────────────────── */

.install {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-6) var(--s-8);
}

.step-n {
  display: grid;
  place-items: center;
  width: var(--s-6);
  height: var(--s-6);
  margin-bottom: var(--s-4);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--t-sm);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.install h3 {
  font-size: var(--t-md);
  line-height: 24px;
}

.install p {
  margin-top: var(--s-2);
  font-size: var(--t-base);
  line-height: 24px;
  color: var(--muted);
}

pre {
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  overflow-x: auto;
  border-radius: 8px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: var(--t-sm);
  line-height: 24px;
  color: var(--fg-2);
}

pre code {
  padding: 0;
  background: none;
  font-size: inherit;
  white-space: pre;
}

/* ── footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  padding-block: var(--s-7);
  border-top: 1px solid var(--hairline);
  font-size: var(--t-sm);
  line-height: 20px;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-6);
}

.site-footer p {
  max-width: 52ch;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  margin-left: auto;
}

.site-footer a {
  text-decoration: none;
  transition: color var(--ease);
}

.site-footer a:hover {
  color: var(--fg);
}

/* ── privacy page ───────────────────────────────────────────────────────── */

.doc-header {
  padding-block: var(--s-9) 0;
}

.doc-header h1 {
  font-size: clamp(32px, 5vw, var(--t-4xl));
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 680;
}

.doc-dates {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-5);
  margin-top: var(--s-5);
  font-size: var(--t-sm);
  line-height: 20px;
  color: var(--muted);
}

/* The whole policy in one paragraph, above the legal prose, because that is
   where it will actually be read. */
.summary-box {
  margin-top: var(--s-7);
  padding: var(--s-6);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.summary-box h2 {
  font-size: var(--t-lg);
  line-height: 28px;
}

.summary-box > p {
  margin-top: var(--s-2);
  font-size: var(--t-base);
  line-height: 24px;
  color: var(--fg-2);
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-2) var(--s-6);
  margin-top: var(--s-5);
}

.summary-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  font-size: var(--t-sm);
  line-height: 24px;
}

.summary-list svg {
  width: 15px;
  height: 15px;
  margin-top: 5px;
  flex: none;
  color: var(--accent);
}

.toc {
  margin-top: var(--s-6);
}

.toc h2 {
  font-size: var(--t-xs);
  line-height: 16px;
  font-weight: 660;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  columns: 2;
  column-gap: var(--s-7);
  margin-top: var(--s-3);
  padding-left: var(--s-5);
  list-style: decimal;
  font-size: var(--t-sm);
  line-height: 24px;
}

.toc li {
  break-inside: avoid;
  padding-left: var(--s-1);
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 620px) {
  .toc ol {
    columns: 1;
  }
}

.doc {
  padding-block: var(--s-9);
}

.doc section + section {
  margin-top: var(--s-8);
}

.doc h2 {
  padding-top: var(--s-6);
  border-top: 1px solid var(--hairline);
  font-size: var(--t-xl);
  line-height: 32px;
}

.doc section:first-child h2 {
  padding-top: 0;
  border-top: 0;
}

.doc h3 {
  margin-top: var(--s-5);
  font-size: var(--t-md);
  line-height: 24px;
}

.doc p {
  margin-top: var(--s-4);
  font-size: var(--t-base);
  line-height: 28px;
  color: var(--fg-2);
}

.doc a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.doc ul {
  margin-top: var(--s-4);
  padding-left: var(--s-5);
  list-style: disc;
}

.doc li {
  font-size: var(--t-base);
  line-height: 28px;
  color: var(--fg-2);
}

.doc li + li {
  margin-top: var(--s-2);
}

.doc li::marker {
  color: var(--accent);
}

.doc .table-scroll {
  margin-top: var(--s-5);
}

.doc table {
  min-width: 560px;
}

.callout {
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  border-left: 3px solid var(--warn);
  border-radius: 0 8px 8px 0;
  background: var(--warn-soft);
  font-size: var(--t-sm);
  line-height: 24px;
}

.callout strong {
  color: var(--warn);
}

/* ── motion ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
