:root {
  color-scheme: light;
  --bg: #ffffff;
  --sidebar: #f7f8fa;
  --ink: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #2563eb;
  --soft: #f3f4f6;
  font-family:
    ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

p {
  line-height: 1.45;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 26px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand h1 {
  font-size: 25px;
  line-height: 1.1;
  margin-bottom: 26px;
  font-weight: 700;
}

.eyebrow {
  color: var(--muted);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.control-group {
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
}

.control-group:first-of-type {
  border-top: 0;
}

.control-group h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

.control-group label,
.toolbar label {
  display: block;
  color: var(--muted);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 5px;
}

select,
input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 9px;
  font: inherit;
  margin-bottom: 10px;
}

select:focus,
input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  border-color: var(--accent);
}

.check-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.check-row {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 8px;
  align-items: start;
  color: #374151;
  font-size: 13px;
  line-height: 1.25;
}

.check-row input {
  width: auto;
  min-height: auto;
  margin: 2px 0 0;
}

.subtle {
  display: none;
}

.app {
  min-width: 0;
  max-width: 1500px;
  padding: 34px 42px 56px;
}

.topbar {
  display: block;
  margin-bottom: 18px;
}

.topbar h2 {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
  margin-bottom: 10px;
}

.status {
  display: inline-block;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 15px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 20px 0 22px;
}

.metrics.compact {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  border: 0;
  gap: 14px;
}

.metric {
  background: transparent;
  border-right: 1px solid var(--line);
  padding: 14px 18px 14px 0;
  margin-right: 18px;
}

.metric:last-child {
  border-right: 0;
  margin-right: 0;
}

.metrics.compact .metric {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 13px 14px;
  margin: 0;
}

.metric .label {
  color: var(--muted);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}

.metric .value {
  font-size: 25px;
  font-weight: 700;
}

.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow-x: auto;
  white-space: nowrap;
}

.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 0 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.section-heading {
  max-width: 980px;
  margin-bottom: 22px;
}

.section-heading h3 {
  font-size: 27px;
  margin-bottom: 8px;
}

.section-heading p {
  color: var(--muted);
  font-size: 18px;
}

.grid {
  display: grid;
  gap: 28px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart {
  min-height: 420px;
  padding: 0;
  margin-bottom: 28px;
  background: transparent;
  border: 0;
}

.chart.tall {
  min-height: 540px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(120px, 0.6fr);
  gap: 10px 16px;
  align-items: end;
  max-width: 760px;
  margin: 8px 0 22px;
}

.toolbar.wrap {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  max-width: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: transparent;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.table-wrap {
  overflow: auto;
  max-height: 560px;
  margin: 0 0 28px;
  background: transparent;
  border: 0;
}

.note,
.method-block {
  border-left: 3px solid var(--line-strong);
  padding: 4px 0 4px 16px;
  color: var(--muted);
  line-height: 1.45;
  background: transparent;
}

button.primary {
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 4px;
  padding: 9px 13px;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 18px;
}

details {
  border-top: 1px solid var(--line);
  padding: 13px 0;
  margin: 0;
  background: transparent;
}

.dictionary-details {
  border-top: 0;
  padding: 4px 0 0;
  color: #374151;
  font-size: 13px;
}

.dictionary-details summary {
  color: var(--muted);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

code {
  display: block;
  white-space: pre-wrap;
  color: #374151;
  background: var(--soft);
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

@media (max-width: 980px) {
  body {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .app {
    padding: 26px 18px 42px;
  }

  .metrics,
  .metrics.compact,
  .grid.two,
  .toolbar,
  .toolbar.wrap {
    grid-template-columns: 1fr;
  }

  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    margin-right: 0;
  }

  .topbar h2 {
    font-size: 29px;
  }
}
