:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1c2024;
  --muted: #5b6470;
  --line: #dfe3e8;
  --accent: #14664a;
  --accent-text: #ffffff;
  --warn-bg: #fff4d6;
  --warn-line: #e0b84a;
  --warn-text: #5a4300;
  --test-bg: #ffe3e0;
  --test-line: #d9544a;
  --test-text: #6e1610;
  --code-bg: #f0f2f4;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --surface: #1c2025;
    --text: #e8eaed;
    --muted: #a3acb8;
    --line: #333a43;
    --accent: #4cc496;
    --accent-text: #08261b;
    --warn-bg: #3a3010;
    --warn-line: #8a6d1c;
    --warn-text: #f5e3a6;
    --test-bg: #45191a;
    --test-line: #b3524c;
    --test-text: #ffd5d1;
    --code-bg: #262b31;
  }
}

* { box-sizing: border-box; }

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

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

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

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

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
header.site .brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
header.site nav a {
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
}
header.site nav a:hover,
header.site nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

main { padding: 32px 0 56px; }

h1 {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 16px;
  text-wrap: balance;
}
h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 44px 0 12px;
}
h3 { font-size: 1.08rem; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 16px; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 6px; }

.lead { font-size: 1.15rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 20px;
}
.card > :last-child { margin-bottom: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.grid .card { margin: 0; }

.price {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.price small { font-size: 1rem; font-weight: 400; color: var(--muted); }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: var(--radius);
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.button:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 20px;
}
.notice > :last-child { margin-bottom: 0; }
.notice a { color: inherit; }

.banner-test {
  background: var(--test-bg);
  border: 2px solid var(--test-line);
  color: var(--test-text);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 20px;
  font-weight: 700;
}

.tbc {
  display: inline-block;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-text);
  border-radius: 4px;
  padding: 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.error {
  color: var(--test-text);
  background: var(--test-bg);
  border: 1px solid var(--test-line);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 12px 0;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}
legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
label.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--surface);
  cursor: pointer;
}
label.choice input { margin-top: 6px; }
label.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.key {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem;
  background: var(--code-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-wrap: anywhere;
  user-select: all;
}

dl.plain dt { font-weight: 600; margin-top: 12px; }
dl.plain dd { margin: 0; }

address { font-style: normal; white-space: pre-line; }
/* An address block that stands by itself in the text keeps a paragraph's distance below. */
.wrap > address { margin-bottom: 16px; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 12px;
}
footer.site p { margin-bottom: 8px; }

[hidden] { display: none !important; }
