:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #657080;
  --paper: #f5f7fb;
  --card: #ffffff;
  --line: #d9e0ea;
  --accent: #3154d4;
  --warning: #9a4b00;
}

* { box-sizing: border-box; }

body {
  background: radial-gradient(circle at top left, #e7edff 0, var(--paper) 35rem);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

header, main, footer { margin: 0 auto; max-width: 1500px; padding: 24px; }
header { padding-top: 54px; }
h1 { font-size: clamp(2rem, 6vw, 4.5rem); letter-spacing: -0.055em; line-height: 0.95; margin: 0; }
h2 { margin: 0; }
h3 { margin: 28px 0 10px; }
h4 { margin: 0 0 8px; }
.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lede { color: #354155; font-size: 1.08rem; max-width: 880px; }
.muted { color: var(--muted); }

.metrics { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); margin: 28px 0; }
.metric { background: #18212f; border-radius: 14px; color: white; padding: 17px; }
.metric span { color: #cbd4e4; display: block; font-size: 0.78rem; text-transform: uppercase; }
.metric strong { display: block; font-size: 1.65rem; margin-top: 3px; }

section { background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin: 18px 0; padding: 22px; }
.section-title { align-items: start; display: flex; gap: 20px; justify-content: space-between; }
.controls { align-items: end; display: flex; flex-wrap: wrap; gap: 12px; }
label { color: #465266; display: inline-grid; font-size: 0.8rem; font-weight: 650; gap: 4px; }
select, button {
  background: white;
  border: 1px solid #b9c4d4;
  border-radius: 8px;
  color: var(--ink);
  padding: 8px 10px;
}
button { cursor: pointer; font-weight: 650; }
button:hover { border-color: var(--accent); color: var(--accent); }

.table-wrap { margin: 12px 0; max-height: 460px; overflow: auto; }
table { border-collapse: collapse; font-size: 0.82rem; width: 100%; }
th { background: #eef2f8; position: sticky; text-align: left; top: 0; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
tr[data-selected="true"] { background: #edf2ff; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f1f4fa; }

.detail-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
article { min-width: 0; }
pre {
  background: #111827;
  border-radius: 10px;
  color: #e5e7eb;
  max-height: 440px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
details summary { color: var(--warning); cursor: pointer; font-weight: 700; margin-top: 14px; }
footer { color: var(--muted); font-size: 0.8rem; padding-bottom: 50px; }

@media (max-width: 800px) {
  .detail-grid { grid-template-columns: 1fr; }
  .section-title { display: block; }
  .controls { margin-top: 12px; }
}
