:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1c1d21;
  --muted: #5d6170;
  --border: #e3e3df;
  --accent: #2f5bea;
  --accent-hover: #2148c4;
  --accent-text: #ffffff;
  --chip: #eef1fb;
  --keep-bg: #e3f4e8;
  --keep-text: #17613a;
  --stop-bg: #fbe7e4;
  --stop-text: #a02c1e;
  --partly-bg: #fbf1d9;
  --partly-text: #7a5a00;
  --radius: 12px;
  --ad-width: 300px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417;
    --surface: #1b1d22;
    --text: #ececef;
    --muted: #a2a6b3;
    --border: #2c2f37;
    --accent: #6d8dff;
    --accent-hover: #8aa3ff;
    --accent-text: #0d1020;
    --chip: #232838;
    --keep-bg: #17331f;
    --keep-text: #8fdba8;
    --stop-bg: #3d1f1b;
    --stop-text: #f5a79b;
    --partly-bg: #352c12;
    --partly-text: #e9cd7c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

a { color: var(--accent); }

.site-header, .site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
}
.site-header nav a:hover { color: var(--text); }

/* One column, or two on pages with an ad: the single ad slot on the left, content on the right. */
.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.layout.has-ad { grid-template-columns: var(--ad-width) minmax(0, 1fr); }

.ad-rail {
  position: sticky;
  top: 16px;
}

.cite { font-size: 0.72em; line-height: 0; white-space: nowrap; }
.cite a { text-decoration: none; padding: 0 1px; }
.sources { padding-left: 1.6em; overflow-wrap: anywhere; }
.sources li { margin-bottom: 6px; scroll-margin-top: 16px; }
.sources li:target { background: var(--surface); outline: 2px solid var(--border); border-radius: 4px; }

.ad-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.ad-slot {
  width: var(--ad-width);
  min-height: 600px;
}

main section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 12px;
}

.hero p.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 24px;
  max-width: 60ch;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 26px;
  border-radius: 10px;
}
.download-btn:hover { background: var(--accent-hover); }

.download-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 10px;
}

h2 { margin-top: 0; font-size: 1.4rem; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.features h3 { margin: 0 0 4px; font-size: 1rem; }
.features p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 18px; }
.chips span {
  background: var(--chip);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
  font-family: Consolas, "Cascadia Mono", monospace;
}

ol.steps li { margin-bottom: 6px; }

details {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
details:last-of-type { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 0; }

.site-footer {
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); margin-left: 16px; }

/* The card keeps the full width so cards line up; only the text inside is held to a readable measure. */
.prose > * { max-width: 75ch; }

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.app-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.app-card h3 { margin: 0 0 6px; }
.app-card ul { color: var(--muted); padding-left: 20px; margin: 8px 0 18px; }
.app-card .download-btn { font-size: 0.98rem; padding: 12px 20px; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.tool-grid a {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text);
}
.tool-grid a:hover { border-color: var(--accent); }
.tool-grid span { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 2px; }

.crumb { font-size: 0.9rem; margin: 0 0 10px; }
.crumb a { color: var(--muted); }

/* Format guides */
.verdict {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 11px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.verdict-keep { background: var(--keep-bg); color: var(--keep-text); }
.verdict-discontinue { background: var(--stop-bg); color: var(--stop-text); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 24px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.facts dt { color: var(--muted); font-size: 0.85rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.facts dd a { font-weight: 400; font-size: 0.9rem; margin-left: 6px; }

.proscons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 28px;
}
.proscons h3 { margin: 0 0 6px; font-size: 1rem; }
.proscons ul { margin: 0; padding-left: 20px; }
.proscons li, .prose li { margin-bottom: 6px; }

.prose h2:not(:first-child) { margin-top: 26px; }
.fine-print { color: var(--muted); font-size: 0.9rem; margin-bottom: 0; }
.section-intro { color: var(--muted); margin-top: -6px; }
.section-action:not(:empty) { margin-top: 20px; }
.text-action { font-weight: 600; }

.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a {
  background: var(--chip);
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 0.92rem;
  text-decoration: none;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.format-grid a {
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text);
}
.format-grid a:hover { border-color: var(--accent); }
.format-grid strong { display: block; margin-bottom: 5px; }
.format-grid .verdict { font-size: 0.76rem; padding: 1px 9px; }
.format-grid span:not(.verdict) { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 7px; }

.tests li { margin-bottom: 10px; }

.format-sketch {
  background: var(--chip);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font: 0.86rem/1.6 Consolas, "Cascadia Mono", monospace;
}

/* Wide tables scroll inside their own box, never the whole page. */
.table-scroll { overflow-x: auto; }
.table-scroll table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
.table-scroll th, .table-scroll td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.table-scroll thead th { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.table-scroll tbody th { font-weight: 600; }
.scorecard { min-width: 680px; }
.scorecard td { text-align: center; font-size: 0.84rem; font-weight: 600; }
.scorecard thead th:not(:first-child) { text-align: center; }
.score-yes { background: var(--keep-bg); color: var(--keep-text); }
.score-partly { background: var(--partly-bg); color: var(--partly-text); }
.score-no { background: var(--stop-bg); color: var(--stop-text); }

/* Phones and narrow tablets: content first, the ad moves below it. */
@media (max-width: 860px) {
  .layout.has-ad { grid-template-columns: minmax(0, 1fr); }
  .ad-rail { position: static; order: 2; display: flex; flex-direction: column; align-items: center; }
  .ad-slot { width: 300px; max-width: 100%; min-height: 250px; height: 250px; }
  main section { padding: 20px; }
  .site-header { flex-wrap: wrap; row-gap: 8px; }
  .site-header nav a { margin-left: 0; margin-right: 14px; }
}
