:root {
  --ink: #1d1b16;
  --muted: #6b6559;
  --line: #e4ded2;
  --paper: #faf8f3;
  --card: #ffffff;
  --accent: #8a3b12;
  --accent-soft: #f6e9df;
  --good: #2f6b3a;
  --bad: #a3271d;
  font-family: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--card);
}
.brand { font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.brand small { font-size: .8rem; color: var(--muted); font-weight: 400; margin-left: .3rem; }
nav { display: flex; gap: 1.1rem; align-items: baseline; flex-wrap: wrap; font-family: system-ui, sans-serif; font-size: .95rem; }
main { max-width: 960px; margin: 0 auto; padding: 1.5rem; }
footer { text-align: center; color: var(--muted); font: .8rem system-ui, sans-serif; padding: 2rem 1rem; }
h1 { font-size: 1.7rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 .8rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 40em; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.3rem; margin: 1rem 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .7rem 1rem; }
.stat b { display: block; font-size: 1.5rem; font-family: system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.big { font-size: 2.6rem; font-weight: 700; font-family: system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 .8rem system-ui, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; font-family: system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .85em; word-break: break-all; }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
input[type=text], textarea {
  font: inherit; font-family: system-ui, sans-serif; padding: .55rem .7rem; border: 1px solid var(--line);
  border-radius: 6px; width: 100%; background: #fff;
}
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row input[type=text] { flex: 1; min-width: 14em; }
button, .button {
  font: 600 .95rem system-ui, sans-serif; padding: .55rem 1.1rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; display: inline-block;
}
button.secondary { background: #fff; color: var(--accent); }
button.lang { padding: .25rem .6rem; font-size: .8rem; }
button:disabled { opacity: .5; cursor: default; }
.notice { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: .7rem 1rem; border-radius: 4px; margin: 1rem 0; }
.error { background: #fbe9e7; border-left: 3px solid var(--bad); padding: .7rem 1rem; border-radius: 4px; margin: 1rem 0; }
.pill { font: 600 .75rem system-ui, sans-serif; padding: .1rem .5rem; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.formula { font-family: system-ui, sans-serif; background: var(--card); border: 1px dashed var(--line); padding: .6rem 1rem; border-radius: 6px; display: inline-block; }
ol li, ul li { margin: .3rem 0; }
