:root {
  --ink: #1c1915;
  --muted: #5c564c;
  --paper: #f6f1e7;
  --card: #fffdf8;
  --line: #e0d8c8;
  --accent: #9c3d1e;
  --accent-dark: #7a2e16;
  --link: #1f4d6d;
  --green: #1f6b3a;
  --yellow: #8a6a12;
  --orange: #9a4b12;
  --red: #9b1c1c;
  --green-bg: #e7f4eb;
  --yellow-bg: #f8f0d4;
  --orange-bg: #f8e6d4;
  --red-bg: #f8e0e0;
  --shadow: 0 1px 2px rgba(28, 25, 21, 0.06), 0 8px 24px rgba(28, 25, 21, 0.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
}
a { color: var(--link); }
a:hover { color: var(--accent-dark); }
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: 0.5rem 1rem; z-index: 10; }
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.wrap { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; }
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0; flex-wrap: wrap;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); letter-spacing: 0; }
nav { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
nav a { text-decoration: none; color: var(--ink); font-size: 0.95rem; }
nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: 0.25em; }
.lang {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
main { padding: 2.2rem 0 4rem; }
h1, h2, h3, .serif { font-family: var(--serif); letter-spacing: -0.02em; line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.6rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 0.4rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }
.disclaimer, .note {
  background: var(--yellow-bg);
  border: 1px solid #ead9a0;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  color: #4d3f14;
  font-size: 0.95rem;
}
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}
.card h2 { margin-top: 0; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.hero { padding: 0.4rem 0 1.5rem; }
.kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--accent); font-weight: 700; margin: 0 0 0.5rem; }
article.prose { max-width: 42rem; }
article.prose p, article.prose li { max-width: 42rem; }
ul.plain { padding-left: 1.2rem; }
footer.site {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site a { color: var(--muted); }
.form-grid { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; }
label span.hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
input[type="date"], input[type="text"], select {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.check { flex-direction: row; align-items: center; font-weight: 500; gap: 0.5rem; }
.check input { width: 1.05rem; height: 1.05rem; }
.jobs { display: flex; flex-direction: column; gap: 0.8rem; }
.job {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  align-items: end;
  padding: 0.8rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #faf7f0;
}
@media (max-width: 800px) {
  .job { grid-template-columns: 1fr 1fr; }
}
.result {
  margin-top: 1.2rem;
  padding: 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
}
.result.green { background: var(--green-bg); border-color: #b7d8c2; }
.result.yellow { background: var(--yellow-bg); border-color: #ead9a0; }
.result.orange { background: var(--orange-bg); border-color: #ecc9a4; }
.result.red { background: var(--red-bg); border-color: #e8b4b4; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.8rem; margin: 0.8rem 0 0; }
.metric { background: rgba(255,255,255,0.7); border-radius: 10px; padding: 0.7rem 0.8rem; }
.metric b { display: block; font-family: var(--serif); font-size: 1.6rem; }
.metric span { color: var(--muted); font-size: 0.85rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); }
.hidden { display: none !important; }
[lang="zh"] body, body.zh { font-size: 1.05rem; }
