:root {
  color-scheme: light dark;
  --canvas: #ffffff; --rail: #f7f8fa; --chrome: #f7f8fa; --surface: #ffffff; --panel-raised: #f1f3f6;
  --line: #e5e7eb; --control-line: #d1d5db;
  --text: #111827; --muted: #6b7280;
  --accent: #2563eb; --accent-strong: #1d4ed8; --accent-ink: #ffffff;
  --link: #1d4ed8; --warning: #92400e; --danger: #b91c1c;
  --chart-original: #16a34a; --chart-fec: #0284c7; --chart-nack: #d97706; --chart-miss: #dc2626;
  --chart-tx: #2563eb; --chart-rx: #059669;
  --floating-shadow: 0 2px 6px #0002, 0 10px 28px #0003;
  --hover: #ebedf0; --radius: 8px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #141619; --rail: #101215; --chrome: #101215; --surface: #1a1d22; --panel-raised: #1e2228;
    --line: #23272f; --control-line: #343a46;
    --text: #eceff4; --muted: #8b94a3;
    --accent: #2563eb; --accent-strong: #3b82f6; --accent-ink: #ffffff;
    --link: #93c5fd; --warning: #f5cf8b; --danger: #fca5a5;
    --chart-original: #4ade80; --chart-fec: #38bdf8; --chart-nack: #fbbf24; --chart-miss: #f87171;
    --chart-tx: #60a5fa; --chart-rx: #34d399;
    --hover: #252a32;
  }
}
* { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; margin: 0; background: var(--canvas); color: var(--text); font-family: var(--font); font-size: 13px; line-height: 1.45; font-weight: 400; }
button, input, select, textarea { font: inherit; }
button, summary, input[type=checkbox], input[type=range] { cursor: pointer; }
button { border: 0; border-radius: 5px; padding: 5px 8px; background: transparent; color: var(--text); font-weight: 500; }
button:hover:not(:disabled) { background: var(--hover); }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid var(--control-line); background: var(--surface); color: var(--text); border-radius: 4px; padding: 6px 8px; }
textarea { resize: vertical; }
input[readonly], textarea[readonly] { font-family: var(--mono); font-size: 12px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
input[type=range] { padding: 0; accent-color: var(--accent); }
label { display: block; font-weight: 500; margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; line-height: 1.3; }
h1 { font-size: 16px; font-weight: 600; }
h2 { font-size: 14px; font-weight: 600; }
h3 { font-size: 13px; font-weight: 600; }
a { color: var(--link); }
pre { font: 12px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; }
summary { color: var(--muted); padding: 8px 0; }
summary:hover { color: var(--text); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.muted, .hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.hint:empty, .muted:empty { display: none; }
