:root {
  color-scheme: dark;
  font: 16px/1.5 system-ui, sans-serif;
  background: #101817;
  color: #f1f5ed;
  --muted: #b3c2b7;
  --accent: #bce39a;
  --panel: #182321;
  --edge: #3b5148;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1180px; margin: auto; padding: clamp(16px, 4vw, 44px); }
header { padding: 14px 0 26px; }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(2.35rem, 6vw, 4rem); line-height: 1.1; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 1.25rem; }
p { margin: .55rem 0 0; color: var(--muted); }
.panel { padding: clamp(14px, 2vw, 22px); margin-bottom: 16px; background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; }
.actions { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
label { display: grid; gap: 5px; color: var(--muted); font-size: .88rem; min-width: 0; }
input, select, button { font: inherit; padding: 8px 11px; border: 1px solid var(--edge); border-radius: 8px; background: #101b18; color: #f1f5ed; min-width: 0; max-width: 100%; }
button, summary { cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.spells { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.spells button { color: var(--accent); font-size: .9rem; }
.spells button[aria-pressed="true"] { background: var(--accent); color: #16201a; }
.timeline-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
#count, #page { color: var(--muted); font-size: .9rem; }
.table-scroll { overflow: auto; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 660px; font-size: .92rem; }
th, td { padding: 9px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--edge); }
th { color: var(--accent); font-weight: 600; }
td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
tr[data-type="death"] td:nth-child(2) { color: #ffb5aa; }
tr[data-type="interrupt"] td:nth-child(2) { color: var(--accent); }
summary { color: var(--muted); }
details ul { padding-left: 20px; margin: .4rem 0 0; }
.pager { align-items: center; justify-content: end; margin-top: 14px; }
:root {
  color-scheme: light;
  font: 15px/1.5 Tahoma, Arial, sans-serif;
  color: #000;
  background: #fff;
  --muted: #595959;
  --accent: #000;
  --panel: #fff;
  --edge: #dedede;
}
main { width: min(1240px, calc(100% - 64px)); margin: 56px auto; padding: 0; }
header { padding: 0 0 28px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-size: 36px; font-weight: 600; letter-spacing: -.8px; }
.brand-link img { object-fit: contain; }
.header-links { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 6px; }
.header-links > * { display: inline-flex; align-items: center; min-height: 44px; }
a { color: inherit; text-decoration: none; }
a:hover, [aria-current], .download { text-decoration: underline; text-underline-offset: 4px; }
h1 { margin: 28px 0 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.25; font-weight: 600; letter-spacing: -.5px; }
.panel { border: 0; border-top: 1px solid var(--edge); border-radius: 0; padding: 18px 0; margin: 0; }
input, select, button { min-height: 38px; border-color: #aaa; border-radius: 2px; background: #fff; color: #000; }
input[type="file"] { padding: 6px; }
button:hover:not(:disabled) { background: #f3f3f3; }
.spells button[aria-pressed="true"] { background: #000; color: #fff; }
th { background: #f6f6f6; }
tr[data-type="death"] td:nth-child(2) { color: #922b21; }
tr[data-type="interrupt"] td:nth-child(2) { font-weight: 700; }
.logger a, .logger details { display: block; margin-top: 12px; }
.logger ol { padding-left: 24px; }
.logger li + li { margin-top: 8px; }
@media (max-width: 700px) {
  main { width: calc(100% - 32px); margin: 24px auto; }
  .brand-link { font-size: 32px; }
  .header-links { column-gap: 20px; }
}
header { padding-bottom: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px 15px; margin-top: 15px; }
.tabs button { border: 0; border-bottom: 2px solid transparent; padding-inline: 2px; }
.tabs button[aria-pressed="true"] { border-bottom-color: #000; font-weight: bold; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin: 16px 0; }
.metric { border-top: 1px solid var(--edge); padding-top: 6px; }
.metric b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.metric span { color: var(--muted); font-size: 13px; }
.short-field { max-width: 340px; margin-top: 12px; }
.data-table table { min-width: 520px; }
.text-button { min-height: auto; padding: 0; border: 0; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.analysis-card { padding: 12px 0; border-bottom: 1px solid var(--edge); }
.analysis-card h3 { margin: 0; }
.analysis-card ul { margin: 8px 0; padding-left: 22px; }
.analysis-card li + li { margin-top: 8px; }
.signal-kind { font-size: 12px; color: var(--muted); }
.map-filters { margin: 12px 0; }
#mapCanvas { display: block; width: 100%; height: auto; border: 1px solid var(--edge); }
.map-controls { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: end; margin-top: 10px; }
.map-controls input { width: 100%; }
#mapEvents { min-height: 2em; padding-left: 22px; }
#unlock { margin-top: 12px; }
.badge { display: inline-block; margin: 3px; padding: 2px 7px; border: 1px solid var(--edge); font-size: 12px; }
[hidden] { display: none !important; }
.brand-title { margin: 0; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; margin: 20px 0; }
.chart-panel { border: 1px solid var(--edge); padding: 14px; }
.chart-panel h3 { margin: 0; font-size: 16px; }
.chart-card { margin: 0; border: 1px solid var(--edge); padding: 10px; }
.chart-card > svg { display: block; width: 100%; height: auto; }
.chart-tick { font: 12px Tahoma, sans-serif; fill: #505050; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-card p, .chart-legend { padding-inline: 8px; }
.chart-pointer { cursor: crosshair; }
.stat-bars { list-style: none; padding: 0; margin: 10px 0 0; }
.stat-bars li + li { margin-top: 8px; }
.stat-bar-label { display: flex; gap: 6px; justify-content: space-between; align-items: baseline; font-size: 13px; }
.stat-bars meter { width: 100%; height: 11px; display: block; accent-color: #235cad; }
#chartBuckets { margin: 12px 0 22px; }
#chartsView h3 { margin-bottom: 5px; }
#chartsView .data-table { margin-bottom: 18px; }
.icon-label, .spec-badge, .icon-inline { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.stat-icon { flex: none; vertical-align: middle; width: 20px; height: 20px; }
