:root {
  --bg: #f3efe6;
  --paper: #fffcf7;
  --ink: #1b1713;
  --muted: #5e574e;
  --line: #d8d0c4;
  --line-strong: #c3baad;
  --teal: #0e5c4d;
  --teal-soft: #dcebe6;
  --amber: #8a4b12;
  --amber-soft: #f3e4d4;
  --shadow: 0 1px 0 rgba(27, 23, 19, 0.04), 0 12px 32px rgba(27, 23, 19, 0.06);
  --radius: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #efe6d4 0%, transparent 55%),
    var(--bg);
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.hero { margin-bottom: 36px; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--muted);
}
h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.lede {
  margin: 0 0 22px;
  max-width: 36em;
  color: var(--muted);
  font-size: 1.02rem;
}

.stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.stats li {
  display: flex;
  flex-direction: column;
  min-width: 112px;
  padding: 12px 16px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stats .k {
  font-size: 12px;
  color: var(--muted);
}
.stats .v {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.cards {
  display: grid;
  gap: 18px;
}
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 20px;
  min-width: 0;
}
.card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.card h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.tagline {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.02em;
  background: var(--teal-soft);
  color: var(--teal);
  border: 1px solid rgba(14, 92, 77, 0.18);
}
.badge.warn {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(138, 75, 18, 0.22);
}
.badge.idle {
  background: #eeeae3;
  color: #5a544c;
  border-color: var(--line);
}

.intro, .model {
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.model {
  color: var(--muted);
  font-size: 0.88rem;
}
.model strong { color: var(--ink); font-weight: 600; }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0 16px;
}
.metric {
  padding: 10px 10px 9px;
  background: #f6f1e8;
  border-radius: 10px;
}
.metric .label {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.metric .value {
  display: block;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.metric .note {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
}
.btn.ghost:hover { background: #f0ebe2; filter: none; }

.section-head { margin: 44px 0 14px; }
.section-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 760px;
}
.compare th, .compare td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.compare th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #f6f1e8;
  white-space: nowrap;
}
.compare tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 700; white-space: nowrap; }

.howto {
  margin-top: 36px;
  padding: 18px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 252, 247, 0.55);
}
.howto h2 { margin: 0 0 6px; font-size: 1.05rem; }
.howto p { margin: 0; color: var(--muted); font-size: 0.92rem; }
code, .file {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: #efe9dd;
  padding: 0 5px;
  border-radius: 4px;
}

.foot {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
.foot p { margin: 0 0 8px; }
.meta { font-size: 0.8rem; }

.error {
  padding: 16px 18px;
  border: 1px solid #e2b8b0;
  background: #fbf0ec;
  border-radius: 12px;
  color: #7a2e22;
}

@media (max-width: 640px) {
  .page { width: calc(100% - 24px); padding-top: 28px; }
  .stats li { min-width: calc(50% - 6px); flex: 1 1 140px; }
  .metrics { grid-template-columns: 1fr 1fr; }
}
