/* SecondPage blog article. Brand palette: Ink #1a1614, Paper #fffefa,
   Mineral Lilac #5a3d6e (light accent), Dusk #bda2cf (dark accent).
   The site header and footer are added around this page by secondpage.cc. */

:root {
  color-scheme: light dark;
  --paper: #fffefa;
  --ink: #1a1614;
  --text: #2a2420;
  --muted: #625951;
  --rule: #e6dfd6;
  --accent: #5a3d6e;
  --accent-hover: #432c53;
  --tint: #f4eff7;
  --tint-rule: #e2d6ea;
  --code-bg: #f3efe9;
  --end-bg: #1a1614;
  --end-text: #f4efe9;
  --end-muted: #c9bfb5;
  --end-accent: #bda2cf;

  --serif: "Iowan Old Style", "Source Serif 4", "Source Serif Pro", Charter, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151312;
    --ink: #f1ebe4;
    --text: #e2dbd3;
    --muted: #a69c92;
    --rule: #2e2925;
    --accent: #bda2cf;
    --accent-hover: #d4c1e1;
    --tint: #231d27;
    --tint-rule: #3a2f42;
    --code-bg: #24201d;
    --end-bg: #26202b;
    --end-text: #f1ebe4;
    --end-muted: #b5aab9;
    --end-accent: #bda2cf;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Anchor jumps land below the site header. */
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.article-shell {
  padding: 40px 20px 80px;
}

.article {
  max-width: 42rem;
  margin: 0 auto;
}

/* Heading block */

.kicker,
.option-label {
  margin: 0 0 0.5rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.125rem, 7vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.dek {
  margin: 1.25rem 0 0;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.byline {
  margin: 1.75rem 0 2.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

.byline span { padding: 0 0.35em; }

/* Body copy */

p { margin: 0 0 1.15em; text-wrap: pretty; }

h2 {
  margin: 3rem 0 1rem;
  font-size: clamp(1.5rem, 4.5vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.option-label { margin-top: 3.5rem; }
.option-label + h2 { margin-top: 0; }

h3 {
  margin: 2rem 0 0.6rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

b, strong { font-weight: 600; color: var(--ink); }

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

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

code {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--ink);
}

q { quotes: "\201C" "\201D"; font-style: italic; }

/* Table of contents */

.toc {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 0.9375rem;
}

.toc-title {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin: 0.3rem 0; padding-left: 0.25rem; }
.toc li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Aside note */

.note {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--tint);
  border-radius: 0 10px 10px 0;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.note p { margin: 0; }

/* Good for / not so good for */

.verdict {
  display: grid;
  gap: 1px;
  margin: 1.75rem 0 0;
  border: 1px solid var(--tint-rule);
  border-radius: 12px;
  overflow: hidden;
  background: var(--tint-rule);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.verdict > div { padding: 1rem 1.25rem; background: var(--tint); }
.verdict dt {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.verdict dd { margin: 0; color: var(--text); }

@media (min-width: 640px) {
  .verdict { grid-template-columns: 1fr 1fr; }
}

/* Numbered steps */

.steps {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0 0 1rem;
  padding-left: 2.75rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 999px;
  border: 1px solid var(--tint-rule);
  background: var(--tint);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Comparison table */

.table-wrap { margin: 1.5rem 0 1.75rem; }

.compare {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.5;
}

.compare caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.compare th, .compare td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.compare thead th {
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}

.compare tbody th { font-weight: 600; color: var(--ink); }

.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom-color: var(--accent); }

.compare tbody tr:last-child { background: var(--tint); }
.compare tbody tr:last-child th { padding-left: 0.75rem; }

@media (min-width: 900px) {
  .table-wrap { margin-left: -4rem; margin-right: -4rem; }
}

/* Small screens: each row becomes a card with labelled lines. */
@media (max-width: 639px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .compare, .compare caption, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr {
    margin: 0 0 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 12px;
  }
  .compare tbody tr:last-child { border-color: var(--accent); }
  .compare th, .compare td { padding: 0.2rem 0; border: 0; }
  .compare tbody tr:last-child th { padding-left: 0; }
  .compare tbody th { font-size: 0.9375rem; margin-bottom: 0.35rem; }
  .compare td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

/* Checklist */

.checklist {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin: 0 0 1rem;
  padding-left: 1.75rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.6em;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* Closing call to action */

.end-note {
  margin: 3rem 0;
  padding: 1.75rem;
  border-radius: 16px;
  background: var(--end-bg);
  color: var(--end-muted);
  font-family: var(--sans);
  font-size: 0.9375rem;
}

.end-note-title {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--end-text);
}

.end-note-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.25rem 0 0;
}

.end-note a { color: var(--end-accent); text-decoration-color: color-mix(in srgb, var(--end-accent) 50%, transparent); }
.end-note a:focus-visible { outline-color: var(--end-accent); }

.end-note .end-note-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--end-text);
  color: var(--end-bg);
  font-weight: 600;
  text-decoration: none;
}

.end-note .end-note-cta:hover { background: var(--end-accent); color: var(--end-bg); }

/* Sources */

.sources {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

.sources h2 {
  margin: 0 0 0.5rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sources ul { margin: 0; padding-left: 1.1rem; }
.sources li { margin: 0.35rem 0; }

/* Larger screens */

@media (min-width: 640px) {
  body { font-size: 1.1875rem; }
  .article-shell { padding: 64px 32px 112px; }
  .dek { font-size: 1.375rem; }
}
