:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1a1c1e;
  --muted: #5d636b;
  --border: #e3e3de;
  --accent: #2357d9;
  --accent-text: #ffffff;
  --accent-soft: #e8eefc;
  --bar: #2357d9;
  --bar-dim: #c9d3e8;
  --radius: 10px;
  --max: 1040px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --surface: #191c1f;
    --text: #e9eaec;
    --muted: #a0a6ae;
    --border: #2b3035;
    --accent: #7ea2ff;
    --accent-text: #0d1117;
    --accent-soft: #1d2740;
    --bar: #7ea2ff;
    --bar-dim: #36404f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

a { color: var(--accent); }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; }

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

header.site {
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo { font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: 15px; }
nav a:hover { color: var(--text); }

section { padding: 64px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: 0; }

h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 20px; max-width: 18ch; }
h2 { font-size: 26px; letter-spacing: -0.015em; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 6px; }
.lead { font-size: 19px; color: var(--muted); max-width: 62ch; margin: 0 0 28px; }
.sub { color: var(--muted); max-width: 62ch; margin: 0 0 28px; }

.buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card p { margin: 0; color: var(--muted); }
.card .q { font-style: italic; color: var(--text); margin: 10px 0; }
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 10px;
}
.price { font-size: 22px; font-weight: 700; margin: 6px 0 10px; color: var(--text); }
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }

.example { max-width: 640px; }
.bars { display: grid; gap: 10px; margin: 18px 0 8px; }
.bar-row { display: grid; grid-template-columns: 80px 1fr 44px; align-items: center; gap: 12px; font-size: 15px; }
.bar-track { background: var(--bar-dim); border-radius: 4px; height: 12px; overflow: hidden; }
.bar-fill { background: var(--bar); height: 100%; }
.bar-row .v { text-align: right; font-variant-numeric: tabular-nums; }
.note { font-size: 13px; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 40px; }
.prose li { margin-bottom: 6px; }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { display: inline; padding: 0; border: 0; }
  table.stack td:nth-child(2), table.stack td:nth-child(3) { color: var(--muted); }
  table.stack td:nth-child(2)::before, table.stack td:nth-child(3)::before { content: " · "; }
  table.stack td:last-child { display: block; margin-top: 4px; }
}

@media (max-width: 560px) {
  section { padding: 44px 0; }
  .lead { font-size: 17px; }
  nav a { margin-left: 14px; }
}
