:root {
  --fg: #1d1b1b; --muted: #5f5a58; --bg: #f7f6f4; --panel: #ffffff; --line: #e2dfdb;
  --red: #b4282e; --ok: #1f7a4d; --bad: #b4282e; --grid: #ece9e5; --axis: #c9c4be;
  --van1: #1d1b1b; --van2: #b4282e;
  --r: 10px; --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 32px; }
.wrap > * { min-width: 0; }
.top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.logo { width: 160px; height: auto; }
h1 { margin: 0; font-size: 28px; font-weight: 600; }
h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.lede { margin: 2px 0 0; color: var(--muted); max-width: 64ch; }
.lede b { color: var(--fg); }
.who { margin-left: auto; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.alert { background: #fff4f2; border: 1px solid #f0c9c4; color: var(--bad); padding: 10px 14px; border-radius: var(--r); margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.big { font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.good { color: var(--ok); } .bad { color: var(--bad); }
.lines { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; margin: 0; font-variant-numeric: tabular-nums; }
.lines dt { color: var(--muted); } .lines dd { margin: 0; text-align: right; }
.chartbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-height: 280px; position: relative; }
.chartbox svg text { fill: var(--muted); font-size: 12px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.tablewrap { position: relative; overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:nth-child(-n+2), td:nth-child(-n+2) { text-align: left; }
th { font-size: 12px; font-weight: 600; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
td button { font: inherit; font-size: 12px; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; cursor: pointer; color: var(--muted); }
.form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.form input, .form select { font: inherit; color: var(--fg); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 38px; }
.form button { font: inherit; font-weight: 600; cursor: pointer; background: var(--fg); color: #fff; border: 0; border-radius: 8px; padding: 9px 14px; min-height: 40px; }
.form button:disabled { opacity: .6; cursor: default; }
.msg { grid-column: 1 / -1; margin: 0; font-size: 13px; min-height: 1em; }
.next { margin: 0; padding-left: 1.2em; color: var(--muted); }
.tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.12); border-radius: 8px; padding: 6px 10px; font-size: 12px; white-space: nowrap; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body:not(.can-edit) .edit-only { display: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
footer { font-size: 12px; }
