:root {
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: #eeeef8;
  background: #000;
  color-scheme: dark;
  font-synthesis: none;
  --surface: #232323;
  --border: #3a3a42;
  --muted: #9ca3af;
  --accent: #6f42c1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #d0c2e9;
  outline-offset: 3px;
}
header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 50px;
  padding: 5px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eeeef8;
  text-decoration: none;
  font-size: 20px;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
}
.badge {
  color: #d0c2e9;
  border: 1px solid #412771;
  border-radius: 8px;
  font-size: 11px;
  padding: 5px 9px;
}
#refresh {
  margin-left: auto;
}
button {
  background: #1e1e24;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 13px;
  color: #eeeef8;
}
button:hover {
  background: var(--surface);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
main {
  padding: 0 16px;
}
h1 {
  font-size: 18px;
  margin: 16px 0;
}
h2 {
  color: #f5f5ff;
  font-size: 24px;
  margin: 8px 0 10px;
}
h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
p {
  line-height: 1.5;
}
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.workspace {
  display: grid;
  grid-template-columns: 298px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
aside {
  min-width: 0;
}
.library-tab {
  padding: 12px 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--accent);
  font-size: 14px;
  font-weight: 600;
}
#library-total {
  font-size: 11px;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
}
.filters {
  padding: 0 0 12px;
}
label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}
input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface);
  margin-bottom: 12px;
  color: #eeeef8;
  font-size: 13px;
}
input::placeholder {
  color: var(--muted);
}
#count {
  color: var(--muted);
  margin: 0;
  font-size: 11px;
}
#library {
  max-height: calc(100vh - 315px);
  min-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a3a42 #000;
}
.strategy {
  width: 100%;
  text-align: left;
  background: #000;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 4px;
  color: #eeeef8;
}
.strategy[aria-current="true"] {
  background: var(--accent);
}
.strategy strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: block;
}
.strategy small {
  display: flex;
  gap: 14px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}
.strategy[aria-current="true"] small {
  color: #eeeef8;
}
#detail {
  padding: 18px 20px 0;
  min-width: 0;
}
.detail-heading > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
  max-width: 900px;
}
.statistics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 24px;
}
.stat span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat strong {
  font-size: 24px;
  font-weight: 500;
}
.positive {
  color: #22c55e;
}
.negative {
  color: #ef4444;
}
.strategy[aria-current="true"] .positive {
  color: #bbf7d0;
}
.strategy[aria-current="true"] .negative {
  color: #fecaca;
}
.detail-tab {
  display: inline-block;
  padding: 8px 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--accent);
  font-size: 14px;
}
.panel {
  background: #0f0f12;
  padding: 20px;
  border: 1px solid var(--surface);
  border-radius: 8px;
  margin-bottom: 16px;
  min-width: 0;
}
#empty-detail {
  margin-top: 0;
  padding: 24px;
  background: var(--surface);
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.segments {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.segments button {
  background: transparent;
  border: 0;
  font-size: 12px;
  padding: 7px 10px;
}
.segments button:hover {
  background: var(--surface);
}
.segments button[aria-pressed="true"] {
  background: var(--surface);
  font-weight: 700;
}
#sources button[aria-pressed="true"] {
  background: var(--accent);
}
.chart-summary {
  display: flex;
  gap: 16px;
  align-items: baseline;
  margin: 24px 0 8px;
  min-height: 28px;
}
.chart-summary strong {
  font-size: 28px;
  font-weight: 500;
}
.chart-summary span {
  font-size: 12px;
  color: var(--muted);
}
.chart {
  min-height: 280px;
  position: relative;
}
.chart svg {
  width: 100%;
  height: 280px;
  display: block;
  overflow: visible;
  touch-action: pan-y;
}
.chart text {
  fill: #9ca3af;
  font-size: 10px;
}
.chart .empty {
  padding: 90px 25px;
  text-align: center;
  color: var(--muted);
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.lower-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
dl {
  margin: 0;
}
dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface);
  font-size: 13px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  text-align: right;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
td,
th {
  text-align: left;
  padding: 9px 5px;
  border-bottom: 1px solid var(--surface);
}
th {
  color: var(--muted);
  font-weight: 400;
}
td:last-child,
th:last-child {
  text-align: right;
}
footer {
  padding: 16px 24px 24px 350px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
#status {
  font-size: 11px;
  min-height: 17px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 12px;
  }
  #detail {
    padding: 18px 8px 0;
  }
  .statistics {
    grid-template-columns: repeat(2, 1fr);
  }
  .lower-panels {
    grid-template-columns: 1fr;
    gap: 0;
  }
  footer {
    padding-left: 286px;
  }
}
@media (max-width: 720px) {
  header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
  }
  .brand {
    font-size: 17px;
  }
  .badge {
    font-size: 10px;
  }
  #refresh {
    padding: 7px 9px;
    font-size: 12px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  #library {
    max-height: 240px;
    min-height: 0;
  }
  #detail {
    padding: 16px 0 0;
  }
  .panel {
    padding: 16px;
  }
  h2 {
    font-size: 22px;
  }
  footer {
    padding: 16px;
  }
}
