:root { --bg: #f6f7f9; --card: #fff; --ink: #1d2330; --muted: #5d6676; --line: #dde1e8; --accent: #2457c5; --bad: #b42318; --chart: #2457c5; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { --bg: #11151c; --card: #1a2029; --ink: #e8ebf0; --muted: #9aa4b2; --line: #2c3440; --accent: #7aa2f7; --bad: #f97066; --chart: #7aa2f7; color-scheme: dark; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
header, main, footer { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header { padding-top: 24px; }
h1 { margin: 0; font-size: 1.6rem; }
h2 { margin: 16px 0 2px; font-size: 1.15rem; }
.sub, .meta, .credits { color: var(--muted); margin: 4px 0 12px; }
.credits { font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 16px 0; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.check { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.row { display: flex; gap: 8px; align-items: flex-end; }
.wrap { flex-wrap: wrap; }
.field { display: flex; flex-direction: column; min-width: 0; }
select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
.grow { flex: 1 1 220px; }
.end { flex-direction: row; gap: 8px; }
input, select, button { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); min-height: 40px; }
#key { flex: 1; min-width: 0; }
button { background: var(--accent); color: #fff; border-color: var(--accent); cursor: pointer; }
button.ghost { background: transparent; color: var(--accent); }
button.link { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 0; min-height: 0; }
.msg { min-height: 1.3em; margin: 8px 0 0; }
.msg.bad { color: var(--bad); }
#chart { width: 100%; height: 260px; display: block; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }
#chart .line { fill: none; stroke: var(--chart); stroke-width: 2; vector-effect: non-scaling-stroke; }
#chart text { fill: var(--muted); font-size: 12px; }
#chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tablewrap { overflow-x: auto; max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { position: sticky; top: 0; background: var(--card); }
footer { padding-bottom: 32px; }
@media (max-width: 600px) { .end { width: 100%; } .end button { flex: 1; } }
