:root {
  --bg: #fbfbfa;
  --fg: #1d1f21;
  --muted: #5b6168;
  --line: #dfe1e3;
  --code-bg: #f0f1f2;
  --accent: #0b6e4f;
  --accent-fg: #ffffff;
  --note-bg: #fff8e1;
  --note-line: #e8c96b;
  --max: 46rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --fg: #e6e7e8;
    --muted: #9aa1a8;
    --line: #2c3035;
    --code-bg: #1f2226;
    --accent: #4cc497;
    --accent-fg: #0d1a14;
    --note-bg: #2a2516;
    --note-line: #6b5a24;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

header.site {
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
nav.site ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav.site a { color: var(--muted); text-decoration: none; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--fg); }

main { padding: 2rem 0 3rem; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.75rem; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }

.lede { font-size: 1.15rem; color: var(--muted); margin-top: 0; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code { background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 4px; }
pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  line-height: 1.45;
}
pre code { background: none; padding: 0; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }

.note {
  background: var(--note-bg);
  border: 1px solid var(--note-line);
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.tier {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.tier h3 { margin-top: 0.25rem; }
.tier .price { font-size: 1.4rem; font-weight: 700; margin: 0.25rem 0 0.75rem; }
.tier ul { padding-left: 1.2rem; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.55rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}
.button[aria-disabled="true"] {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
footer.site .wrap { padding-top: 1.25rem; padding-bottom: 2rem; }
footer.site ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}
footer.site a { color: var(--muted); }
footer.site p { margin: 0.25rem 0; }
