:root {
  --bg: #08080a; --surface: #121216; --surface-2: #1a1a20; --line: #2a2a32;
  --ink: #f2f2f5; --ink-2: #b9b9c3; --ink-3: #8a8a94;
  --red: #f53b3b; --red-ink: #ff6b6b; --green: #3dff8b; --amber: #ffb84d;
  --radius: 14px; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px 32px; flex: 1; }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0 0 10px; }
a { color: var(--red-ink); }
.muted { color: var(--ink-3); } .small { font-size: 13px; }
.top { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; width: 100%; margin: 0 auto; padding: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.12em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand em { font-style: normal; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 16px; min-width: 0; }
.narrow { max-width: 440px; width: calc(100% - 32px); margin: 8vh auto auto; flex: 0 0 auto; }
label { display: block; font-size: 13px; color: var(--ink-2); margin: 12px 0 6px; }
input, select { width: 100%; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; min-width: 0; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
#code { font: 600 20px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; }
button { font: inherit; border-radius: 10px; padding: 10px 14px; cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); white-space: nowrap; }
button.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; width: 100%; margin-top: 14px; }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }
button.ghost:hover { border-color: var(--ink-3); }
form > button.ghost { margin-top: 10px; }
.row { display: flex; gap: 8px; }
.error { color: var(--red-ink); min-height: 1.5em; margin: 10px 0 0; }
.ok { color: var(--green); } .warn { color: var(--amber); }
.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.hello .link { flex: 1 1 340px; max-width: 520px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; min-width: 0; }
.tile span { font-size: 13px; color: var(--ink-2); }
.tile b { font-size: 28px; font-variant-numeric: tabular-nums; margin: 4px 0 2px; overflow-wrap: anywhere; }
.tile small { color: var(--ink-3); font-size: 12px; }
.tile.accent { border-color: var(--red); }
.charts, .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart { margin: 16px 0 0; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plot { position: relative; height: 200px; }
.plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.plot .grid { stroke: var(--line); stroke-width: 1; }
.plot .axis { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.plot .series { fill: none; stroke: var(--red); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .area { fill: var(--red); opacity: 0.08; }
.plot .cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.plot .dot { fill: var(--red); stroke: var(--surface); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px; color: var(--ink); }
.tip b { font-variant-numeric: tabular-nums; }
details { margin-top: 10px; } summary { cursor: pointer; color: var(--ink-3); font-size: 13px; }
.tablewrap { overflow-x: auto; max-height: 420px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--ink-3); font-weight: 600; font-size: 12px; position: sticky; top: 0; background: var(--surface); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--ink-2); }
.pill.completed { color: var(--green); border-color: rgba(61, 255, 139, 0.4); }
.pill.rejected, .pill.failed { color: var(--red-ink); border-color: rgba(245, 59, 59, 0.5); }
footer { text-align: center; padding: 24px 16px; }
@media (max-width: 860px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts, .two { grid-template-columns: minmax(0, 1fr); }
  .tile b { font-size: 22px; }
}
@media (forced-colors: active) { .plot .series { stroke: CanvasText; } .plot .dot { fill: CanvasText; } }
