:root { color-scheme: light dark; --fg:#1d1d1f; --bg:#fdfdfc; --mute:#5f6368;
  --line:#dcdcd8; --soft:#f2f2ee; --flag:#8a5a00; --fail:#a8321e; --link:#1d4f91;
  --s1:#2a78d6; --s2:#eb6834; --grid:#e6e6e2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --fg:#e8e8e3; --bg:#18181a;
  --mute:#a0a0a0; --line:#3a3a3d; --soft:#232326; --flag:#e0b050; --fail:#f08a74; --link:#9cc3f5;
  --s1:#3987e5; --s2:#d95926; --grid:#2c2c2f; } }
:root[data-theme="dark"] { --fg:#e8e8e3; --bg:#18181a; --mute:#a0a0a0; --line:#3a3a3d; --soft:#232326;
  --flag:#e0b050; --fail:#f08a74; --link:#9cc3f5; --s1:#3987e5; --s2:#d95926; --grid:#2c2c2f; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; background:var(--bg); color:var(--fg);
  font:16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 64rem; margin: 0 auto; padding: 1.5rem 16px 4rem; }
h1 { font-size: 1.6rem; line-height:1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; border-bottom: 1px solid var(--line); padding-bottom:.25rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .3rem; }
p, li { overflow-wrap: anywhere; }
a { color: var(--link); }
.mute { color: var(--mute); font-size: .9rem; }
.skip { position:absolute; left:-999px; top:0; }
.skip:focus { left: 8px; top: 8px; background: var(--bg); padding: .3rem .6rem; z-index: 10; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.tabs { display:flex; flex-wrap:wrap; gap:.4rem; margin:1rem 0 .5rem; }
.tabs button { font:inherit; font-size:.95rem; color:var(--fg); background:var(--soft); border:1px solid var(--line);
  border-radius:6px; padding:.35rem .7rem; cursor:pointer; }
.tabs button[aria-pressed="true"] { background:var(--fg); color:var(--bg); border-color:var(--fg); }

.controls { display:flex; flex-wrap:wrap; gap:.5rem .9rem; align-items:flex-end; margin:.5rem 0 1rem;
  padding:.6rem .7rem; background:var(--soft); border-radius:6px; }
.controls-inner { display:contents; }
.controls label { display:flex; flex-direction:column; font-size:.8rem; color:var(--mute); gap:.15rem; min-width:0; max-width:100%; }
.controls label.wide { flex: 1 1 16rem; }
.controls label.check { flex-direction:row; align-items:center; gap:.35rem; font-size:.9rem; color:var(--fg); }
select, input, button { font:inherit; }
select { font-size:.95rem; color:var(--fg); background:var(--bg); border:1px solid var(--line); border-radius:4px;
  padding:.3rem .35rem; max-width:100%; min-width:0; }
.controls label:not(.wide) select { max-width: 22rem; }
.btn { font-size:.9rem; color:var(--fg); background:var(--bg); border:1px solid var(--line); border-radius:4px;
  padding:.3rem .6rem; cursor:pointer; text-decoration:none; display:inline-block; }
.btn:hover { border-color: var(--fg); }
.actions { display:flex; flex-wrap:wrap; gap:.5rem; margin:.5rem 0 1rem; align-items:center; }

.note { border-left:3px solid var(--flag); background:var(--soft); padding:.45rem .7rem; margin:.6rem 0; font-size:.92rem; border-radius:0 6px 6px 0; }
.note.fail { border-left-color: var(--fail); }
.src { font-size:.88rem; color:var(--mute); margin:.2rem 0 .6rem; }

.scroll { overflow-x:auto; max-width:100%; -webkit-overflow-scrolling: touch; margin:.3rem 0 1rem; }
table { border-collapse: collapse; width:100%; font-size:.9rem; margin:.3rem 0 .6rem; }
.scroll table { margin:0; }
caption { text-align:left; font-weight:600; padding:.2rem 0 .3rem; caption-side: top; }
th, td { text-align:left; vertical-align:top; padding:.28rem .4rem; border-bottom:1px solid var(--line); }
thead th { font-weight:600; font-size:.82rem; color:var(--mute); vertical-align:bottom; }
td.n, th.n { text-align:right; font-variant-numeric: tabular-nums; white-space:nowrap; }
tr.grp th { background:var(--soft); font-size:.82rem; color:var(--fg); padding-top:.4rem; }
tr.sel td, tr.sel th { background: color-mix(in srgb, var(--s1) 12%, transparent); }
table.wide { width:auto; min-width:100%; font-size:.82rem; }
table.wide th, table.wide td { padding:.2rem .3rem; }
table.wide th[scope=row] { white-space:nowrap; position:sticky; left:0; background:var(--bg); z-index:1; }
.sub { display:block; font-size:.78rem; color:var(--mute); }
.cause-l { white-space: normal !important; min-width: 9rem; }

.fz { color:var(--mute); }
.fn { color:var(--flag); font-style: italic; }
.fx { outline:1px solid var(--fail); outline-offset:-1px; }
sup.ck a { color:var(--fail); font-weight:700; text-decoration:none; font-size:.72rem; margin-left:.1rem; }
.legend { font-size:.82rem; color:var(--mute); margin:.2rem 0 1rem; }
.legend span { margin-right:.8rem; display:inline-block; }
.key { display:inline-block; width:1.1rem; height:.2rem; vertical-align:middle; margin-right:.3rem; border-radius:2px; }

.checks { font-size:.88rem; }
.checks li { margin:.35rem 0; }
.checks li:target { background: color-mix(in srgb, var(--fail) 12%, transparent); }

th button.sort { font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer; text-decoration:underline dotted; }
th[aria-sort] button.sort::after { content:" \2195"; }
th[aria-sort="ascending"] button.sort::after { content:" \2191"; }
th[aria-sort="descending"] button.sort::after { content:" \2193"; }

.chart { width:100%; max-width:100%; display:block; margin:.3rem 0 .4rem; overflow:visible; }
.chart text { fill: var(--mute); font-size: 11px; font-family: inherit; }
.chart .lbl { fill: var(--fg); }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .ln1 { stroke: var(--s1); stroke-width: 2; fill: none; }
.chart .ln2 { stroke: var(--s2); stroke-width: 2; fill: none; stroke-dasharray: 5 3; }
.chart .dt1 { fill: var(--s1); stroke: var(--bg); stroke-width: 2; }
.chart .dt2 { fill: var(--s2); stroke: var(--bg); stroke-width: 2; }
.chart .bar { fill: var(--s1); }
.chart .bar.flagged { fill: var(--flag); }
.chart .hit { fill: transparent; }
.chart .hit:hover + .bar, .chart g.row:hover .bar { opacity: .75; }
.tip { position:fixed; pointer-events:none; background:var(--fg); color:var(--bg); font-size:.8rem; padding:.25rem .45rem;
  border-radius:4px; z-index:20; max-width:18rem; display:none; }

#a-out td, #a-out th { overflow-wrap:anywhere; word-break:break-word; }
dl.kv { display:grid; grid-template-columns: max-content 1fr; gap:.2rem .8rem; font-size:.9rem; }
dl.kv dt { color:var(--mute); }
dl.kv dd { margin:0; overflow-wrap:anywhere; }
.stats { display:flex; flex-wrap:wrap; gap:.5rem; margin:1rem 0; padding:0; list-style:none; }
.stats li { background:var(--soft); border-radius:6px; padding:.4rem .7rem; }
.stats b { font-variant-numeric: tabular-nums; }
blockquote { margin:.5rem 0; padding:.3rem .8rem; border-left:3px solid var(--line); }
footer { margin-top:3rem; border-top:1px solid var(--line); }

@media (max-width: 480px) {
  body { font-size:15px; }
  h1 { font-size:1.35rem; }
  table { font-size:.82rem; }
  th, td { padding:.25rem .2rem; }
  .controls label { flex: 1 1 calc(50% - .9rem); }
  .controls label.wide { flex: 1 1 100%; }
  .controls label:not(.wide) select { max-width:100%; width:100%; }
  .controls label.wide select { width:100%; }
}
@media print { .tabs, .controls, .actions, footer { display:none; } }

/* search */
.search { position:relative; margin:.8rem 0 .2rem; max-width:32rem; }
.search label { display:block; font-size:.8rem; color:var(--mute); margin-bottom:.15rem; }
.search input { width:100%; font-size:1rem; color:var(--fg); background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:.4rem .6rem; }
.search ul { position:absolute; z-index:30; left:0; right:0; margin:.2rem 0 0; padding:.2rem 0; list-style:none; background:var(--bg);
  border:1px solid var(--line); border-radius:6px; box-shadow:0 4px 16px rgba(0,0,0,.15); max-height:22rem; overflow-y:auto; }
.search li { padding:.35rem .6rem; cursor:pointer; }
.search li[aria-selected="true"] { background:var(--soft); outline:2px solid var(--link); outline-offset:-2px; }
/* captions shown above scrolling tables */
.vh { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
p.cap { font-weight:600; font-size:.9rem; margin:.8rem 0 .2rem; }
h4 { font-size:.95rem; margin:1rem 0 .2rem; }
.key.sq { width:.7rem; height:.7rem; background:var(--s2); border-radius:1px; }
.chart .sq2 { fill: var(--s2); stroke: var(--bg); stroke-width: 1.5; }
tr.src-a td, tr.src-a th { background: color-mix(in srgb, var(--s2) 9%, transparent); }
.note ul { margin:.3rem 0; padding-left:1.2rem; }
.note p { margin:.3rem 0; }
@media (max-width: 480px) {
  main { padding-top: .8rem; }
  h1 { font-size: 1.2rem; margin-bottom: .3rem; }
  main > p:first-of-type { font-size: .88rem; line-height: 1.4; margin: .3rem 0; }
  .search { margin: .5rem 0 0; }
  .search label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .tabs { margin: .5rem 0 .3rem; gap: .3rem; }
  .tabs button { font-size: .85rem; padding: .25rem .5rem; }
  h2 { font-size: 1.05rem; margin: .7rem 0 .4rem; }
}
