:root {
  --bg: #ffffff;
  --surface: #f5f6f8;
  --border: #e3e5ea;
  --text: #15171c;
  --muted: #5b6170;
  --accent: #2f6bff;
  --accent-soft: #e8efff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #1a1c20;
    --border: #2a2d33;
    --text: #eceef2;
    --muted: #a0a6b3;
    --accent: #6d97ff;
    --accent-soft: #1d2740;
  }
}

* { box-sizing: border-box; }

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

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

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.brand img { flex: none; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 15px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { padding: 40px 0 24px; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

h1 {
  margin: 16px 0 12px;
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  max-width: 36em;
  color: var(--muted);
  font-size: 18px;
}

/* Home tool cards */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 16px 0 48px;
  margin: 0;
  list-style: none;
}
.tool {
  display: block;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
a.tool:hover { border-color: var(--accent); }
.tool svg { color: var(--accent); }
.tool h2 { margin: 12px 0 6px; font-size: 18px; }
.tool p { margin: 0; color: var(--muted); font-size: 15px; }

/* Callouts */
.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--accent-soft);
}
.note svg { flex: none; color: var(--accent); margin-top: 3px; }
.note p { margin: 0; }

/* Article content */
.content { max-width: 720px; padding-bottom: 16px; }
.content h2 {
  margin: 40px 0 8px;
  font-size: 24px;
  line-height: 1.25;
}
.content h3 {
  margin: 24px 0 4px;
  font-size: 18px;
}
.content p,
.content li { color: var(--text); }
.content ul,
.content ol { padding-left: 22px; }
.content li { margin: 4px 0; }
.small { color: var(--muted); font-size: 14px; }

/* Tables */
.table-wrap {
  margin: 12px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
thead th {
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tbody th {
  background: var(--surface);
  font-weight: 700;
}
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 40px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.site-footer a { color: var(--muted); }
