:root {
  --ink: #1b2430;
  --muted: #5b6573;
  --line: #e3e7ec;
  --bg: #ffffff;
  --soft: #f5f7f9;
  --brand: #0f5e4f;
  --brand-soft: #e6f2ef;
  --avoid: #b42318;
  --avoid-soft: #fdecea;
  --caution: #a15c00;
  --caution-soft: #fff4e0;
  --ok: #4b5563;
  --ok-soft: #eef0f3;
  --best: #0f7a3d;
  --best-soft: #e3f5ea;
  --radius: 10px;
  --max: 760px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

img, svg { max-width: 100%; height: auto; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap-wide { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--brand); }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; margin-left: 22px; }
.site-nav a:hover { color: var(--ink); }

/* Type */
h1 { font-size: 40px; line-height: 1.15; letter-spacing: -0.025em; margin: 40px 0 12px; }
h2 { font-size: 27px; line-height: 1.25; letter-spacing: -0.015em; margin: 48px 0 12px; }
h3 { font-size: 21px; line-height: 1.3; margin: 32px 0 8px; }
p { margin: 0 0 18px; }
ul, ol { padding-left: 22px; margin: 0 0 18px; }
li { margin-bottom: 8px; }

.meta { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.lede { font-size: 20px; color: #2c3644; }

/* Quick answer box */
.answer {
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0 8px;
}
.answer p:last-child { margin-bottom: 0; }

/* Table */
.table-wrap { overflow-x: auto; margin: 20px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.year { font-weight: 700; white-space: nowrap; }

.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.pill.avoid { color: var(--avoid); background: var(--avoid-soft); }
.pill.caution { color: var(--caution); background: var(--caution-soft); }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.best { color: var(--best); background: var(--best-soft); }

/* Chart */
figure { margin: 24px 0; }
figure.chart { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 10px; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* Checklist */
ul.checklist { list-style: none; padding-left: 0; }
ul.checklist li { position: relative; padding-left: 32px; }
ul.checklist li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px;
  border: 2px solid var(--brand); border-radius: 4px;
}

.note { background: var(--soft); border-radius: var(--radius); padding: 16px 20px; font-size: 16px; color: #3a4452; }

/* Home */
.hero { padding: 56px 0 24px; }
.hero h1 { font-size: 46px; margin-top: 0; max-width: 720px; }
.hero p { font-size: 20px; color: #3a4452; max-width: 640px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin: 24px 0 8px; }
.card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  text-decoration: none; color: var(--ink); background: var(--bg);
}
a.card:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(15, 94, 79, 0.08); }
.card h3 { margin: 6px 0 6px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .tag { font-size: 13px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.05em; }
.card.soon { background: var(--soft); }
.card.soon .tag { color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 20px 0; }
.step { padding: 4px 0; }
.step b { display: block; font-size: 17px; margin-bottom: 4px; }
.step span { color: var(--muted); font-size: 16px; }
.section { padding: 16px 0 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer a { color: var(--muted); margin-right: 18px; }
.site-footer p { margin: 10px 0 0; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  h1 { font-size: 31px; margin-top: 28px; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 34px; }
  h2 { font-size: 23px; }
  .site-nav a { margin-left: 14px; font-size: 14px; }
  table.verdicts thead { display: none; }
  table.verdicts tr { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.verdicts tr:last-child { border-bottom: 0; }
  table.verdicts td { padding: 0; border: 0; font-size: 16px; }
  table.verdicts td.year { align-self: center; }
  table.verdicts td.problem { grid-column: 1 / -1; color: var(--muted); margin-top: 4px; }
  .chart-wide { display: none; }
  .chart-narrow { display: block; }
}
@media (min-width: 641px) {
  .chart-narrow { display: none; }
}
