:root {
  --bg: #f8f7f5;
  --surface: #ffffff;
  --text: #1c2321;
  --muted: #5b6662;
  --border: #dde3df;
  --accent: #a84a12;
  --accent-strong: #7f370c;
  --accent-soft: #fbeee4;
  --warn: #9a5b00;
  --warn-soft: #fff4e0;
  --alt: #3b5bab;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121615;
    --surface: #1a201e;
    --text: #e6ebe8;
    --muted: #9aa6a1;
    --border: #2c3532;
    --accent: #f0995e;
    --accent-strong: #f6b98d;
    --accent-soft: #3a2619;
    --warn: #f0b45a;
    --warn-soft: #33281a;
    --alt: #8aa6f0;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.05rem; }
.brand span { color: var(--accent); }
nav.top a { margin-left: 16px; text-decoration: none; color: var(--muted); font-size: .95rem; }
nav.top a:hover { color: var(--text); }
main { padding: 28px 0 48px; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 1.35rem; margin: 36px 0 10px; }
h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.lede { color: var(--muted); font-size: 1.08rem; margin-top: 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tool-link { display: block; text-decoration: none; color: var(--text); }
.tool-link:hover { border-color: var(--accent); }
.tool-link strong { display: block; color: var(--accent); margin-bottom: 4px; }
label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
input, select {
  width: 100%;
  font: inherit;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
@media (prefers-color-scheme: dark) { .btn { color: #0d1411; } }
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent-strong); }
.row { display: grid; gap: 12px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
@media (max-width: 560px) {
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.stat .k { font-size: .82rem; color: var(--muted); }
.stat .v { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat.win { border-color: var(--accent); background: var(--accent-soft); }
.note { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 10px 12px; font-size: .93rem; }
.cta {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin: 28px 0;
}
.cta h2, .cta h3 { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.bar-chart { display: grid; gap: 6px; margin-top: 10px; }
.bar { display: grid; grid-template-columns: 110px 1fr 80px; gap: 8px; align-items: center; font-size: .88rem; }
.bar .track { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; height: 18px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); }
.bar .fill.alt { background: var(--alt); }
details { border-bottom: 1px solid var(--border); padding: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
footer.site { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: .88rem; }
footer.site a { color: var(--muted); margin-right: 14px; }
.hidden { display: none !important; }
