/* Comparison pages. Two themes that follow the system setting, matching the
   landing page: warm paper in light, the gym-floor palette in dark. One accent,
   and the richness kept for the tables. */
:root {
  color-scheme: light dark;
  /* Light: the same warm paper as the landing page. */
  --bg: #f4eee2;
  --surface: #fbf7ee;
  --line: rgb(24 23 22 / 0.12);
  --text: #181716;
  --body: #3d3832;
  --muted: #6c6459;
  --accent: #b02c19;
  --button: #181716;
  --button-hover: #000000;
  --button-ink: #f4eee2;
  --sans: "DM Sans", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Dark: the gym-floor palette, unchanged. Follows the system setting. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #030712;
    --surface: #0d1320;
    --line: rgb(236 254 255 / 0.1);
    --text: #ecfeff;
    --body: #cbd5e1;
    --muted: #94a3b8;
    --accent: #22d3ee;
    --button: #22d3ee;
    --button-hover: #67e8f9;
    --button-ink: #031419;
    --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }
}

/* The same dark values when the visitor picked Dark with the theme switch. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #030712;
  --surface: #0d1320;
  --line: rgb(236 254 255 / 0.1);
  --text: #ecfeff;
  --body: #cbd5e1;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --button: #22d3ee;
  --button-hover: #67e8f9;
  --button-ink: #031419;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

.wrap { width: min(880px, 100% - 32px); margin-inline: auto; }

a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Header and footer */
header.site { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-size: 20px; font-weight: 600; text-decoration: none; }
header.site nav { display: flex; align-items: center; gap: 20px; }
header.site nav a:not(.button) { color: var(--muted); font-size: 14px; text-decoration: none; transition: color 0.15s ease; }
header.site nav a:not(.button):hover { color: var(--text); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--button); color: var(--button-ink);
  font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: var(--button-hover); }
.button:active { transform: scale(0.98); }

footer.site { margin-top: 96px; border-top: 1px solid var(--line); padding-block: 48px 32px; font-size: 14px; }
.cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer.site h2 { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 500; }
footer.site nav a { display: block; padding-block: 4px; color: var(--body); text-decoration: none; }
footer.site nav a:hover { color: var(--text); text-decoration: underline; }
footer.site p { margin: 12px 0 0; color: var(--muted); }
.fine { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; }

/* Article */
.crumbs { margin-top: 32px; color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

h1 {
  margin: 16px 0 20px; color: var(--text); font-family: var(--display);
  font-size: clamp(2rem, 5.2vw, 3.25rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600;
  text-wrap: balance;
}
article > h1:first-child { margin-top: 48px; }
.verdict { margin: 0; color: var(--text); font-size: 19px; line-height: 1.55; max-width: 44rem; }

/* The signature: every page says when its facts were read. */
.stamp { margin: 20px 0 0; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.stamp::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); }

article section { margin-top: 56px; }
h2 { margin: 0 0 16px; color: var(--text); font-family: var(--display); font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
h3 { margin: 28px 0 8px; color: var(--text); font-size: 18px; line-height: 1.3; font-weight: 600; }
h3 a { color: inherit; }
p { margin: 0 0 16px; max-width: 44rem; }
ul, ol { margin: 0 0 16px; padding-left: 20px; max-width: 44rem; }
li { margin-bottom: 8px; }
ol.steps { padding-left: 24px; }
ol.steps li { padding-left: 4px; }
ol.steps li::marker { color: var(--accent); font-family: var(--mono); }

.src { color: var(--muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.src:hover { color: var(--accent); }
.note { color: var(--muted); font-size: 13px; line-height: 1.6; }

/* Tables carry the comparison, so they get the surface and the mono figures. */
.table-wrap { margin: 0 0 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { color: var(--muted); font-size: 13px; font-weight: 500; }
tbody th { color: var(--text); font-weight: 500; width: 26%; }
.num { color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.term { color: var(--muted); font-size: 12px; }

/* One block per app. */
.app { margin: 0 0 16px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.app h3 { margin-top: 0; font-size: 20px; }
.app p { margin-bottom: 16px; }
.app dl { margin: 0; display: grid; gap: 12px; }
.app dl div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; }
.app dt { color: var(--muted); font-size: 14px; }
.app dd { margin: 0; }

.index { list-style: none; margin: 40px 0 0; padding: 0; max-width: none; }
.index li { margin: 0; padding: 24px 0; border-top: 1px solid var(--line); }
.index a { color: var(--text); font-size: 20px; font-weight: 600; text-decoration: none; }
.index a:hover { color: var(--accent); }
.index p { margin: 8px 0 0; color: var(--muted); }

.cta { margin-top: 72px; padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--muted); }

@media (max-width: 720px) {
  header.site nav { gap: 16px; }
  header.site nav a[href="/support"] { display: none; }
  .cols { grid-template-columns: 1fr 1fr; }
  .verdict { font-size: 17px; }
  h2 { font-size: 22px; }
  article section { margin-top: 44px; }
  .app { padding: 20px; }
  .app dl div { grid-template-columns: 1fr; gap: 4px; }
  .cta { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Theme switch (System / Light / Dark), wired by /theme.js. */
.theme-switch { display: inline-flex; gap: 2px; margin-top: 16px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.theme-switch button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.theme-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
