:root {
  --bg: #fbfbf9;
  --fg: #1d1f21;
  --muted: #62666b;
  --line: #e1e2de;
  --card: #ffffff;
  --accent: #0b6e4f;
  --accent-fg: #ffffff;
  --hl: #eef7f2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141517;
    --fg: #e8e8e6;
    --muted: #a0a4a8;
    --line: #2c2e31;
    --card: #1b1d20;
    --accent: #3fb68b;
    --accent-fg: #0d1a14;
    --hl: #18261f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
header.site, main, footer.site { max-width: 960px; margin: 0 auto; padding: 0 16px; }
header.site { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; padding-top: 14px; padding-bottom: 6px; }
.brand { font-weight: 700; text-decoration: none; color: var(--fg); font-size: 18px; }
header nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
header nav a { color: var(--muted); text-decoration: none; }
header nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }
h1 { font-size: 26px; line-height: 1.25; margin: 14px 0 6px; }
h2 { font-size: 20px; margin: 32px 0 8px; }
h3 { font-size: 16px; margin: 20px 0 6px; }
.lede { margin: 0 0 14px; color: var(--muted); }
.calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.calc label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 4px; }
.calc input, .calc select { font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; width: 100%; min-width: 0; }
.calc select { padding-right: 4px; text-overflow: ellipsis; }
.calc .more { grid-column: 1 / -1; }
.calc .more summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.calc .more[open] { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.calc .more[open] summary { grid-column: 1 / -1; }
.focus { margin: 12px 0 0; padding: 12px; background: var(--hl); border-radius: 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.focus-text { margin: 0; flex: 1 1 280px; }
.summary { margin: 12px 0 2px; }
.disclosure, .checked { font-size: 13px; color: var(--muted); margin: 4px 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
.results { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 6px; }
.results th, .results td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.results thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.results tbody th { font-weight: 400; }
.results .tool { font-weight: 600; }
.results small { display: block; color: var(--muted); font-size: 12px; }
.results .rank { width: 28px; color: var(--muted); }
.results .cost strong { font-size: 17px; }
.results .per { color: var(--muted); font-size: 13px; }
.results .unit { white-space: nowrap; font-size: 14px; }
.results tr.partner { background: var(--hl); }
.results tr.na td.cost { font-size: 13px; }
.results .act { text-align: right; white-space: nowrap; }
.tag { font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 6px; color: var(--muted); }
.muted { color: var(--muted); }
.btn { display: inline-block; padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; font-size: 14px; color: var(--fg); background: var(--bg); }
.btn-go { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
.plain { margin: 8px 0; font-size: 15px; }
.plain th, .plain td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.plain thead th { font-size: 13px; color: var(--muted); }
.body { max-width: 760px; }
.body li { margin: 4px 0; }
footer.site { margin-top: 48px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  h1 { font-size: 22px; }
  .calc { grid-template-columns: 1fr 1fr; }
  .calc > label:first-child { grid-column: 1 / -1; }
  .calc .more[open] { grid-template-columns: 1fr 1fr; }
  .results thead { display: none; }
  .results tr { display: grid; grid-template-columns: 22px 1fr auto; grid-template-areas: "rank tool act" "rank cost cost"; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .results td, .results th { border: 0; padding: 4px 8px; }
  .results .rank { grid-area: rank; }
  .results tbody th { grid-area: tool; }
  .results .cost { grid-area: cost; }
  .results .unit { display: none; }
  .results .act { grid-area: act; }
}
