/* Eve PvP analytics — dark navy / gunmetal / electric blue */
:root {
  color-scheme: dark;
  --page:        #0a0f18;
  --surface-1:   #121b2a;   /* panel / chart surface */
  --surface-2:   #0e1522;
  --border:      rgba(130, 170, 230, 0.14);
  --text-primary:   #e8eef7;
  --text-secondary: #9fb0c8;
  --text-muted:     #64748f;
  --grid:        #1c2840;
  --baseline:    #2a3a58;
  --accent:      #3987e5;   /* electric blue — series 1 */
  --accent-hi:   #62a5f5;
  --series-1:    #3987e5;
  --series-2:    #008300;
  --status-good:     #0ca30c;
  --status-warning:  #fab219;
  --status-critical: #d03b3b;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  background-image:
    radial-gradient(1200px 500px at 70% -10%, rgba(57, 135, 229, 0.08), transparent 60%),
    radial-gradient(900px 400px at 10% 110%, rgba(57, 135, 229, 0.05), transparent 60%);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 48px; }

/* ---- header ---- */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 15, 24, 0.85);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 20;
}
.site-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.logo {
  font-weight: 700; letter-spacing: 0.18em; font-size: 15px;
  text-transform: uppercase; color: var(--text-primary);
}
.logo .tick { color: var(--accent); }
nav.main { display: flex; gap: 4px; flex: 1; }
nav.main a {
  color: var(--text-secondary); padding: 6px 12px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px;
}
nav.main a:hover { color: var(--text-primary); background: var(--surface-1); text-decoration: none; }
nav.main a.active { color: var(--accent-hi); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border); }
.eve-clock { font-size: 12px; color: var(--text-muted); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.eve-clock b { color: var(--text-secondary); font-weight: 600; }

/* ---- page heading / meta line ---- */
h1.page { font-size: 20px; font-weight: 650; margin: 26px 0 4px; letter-spacing: 0.02em; }
.meta-line { color: var(--text-muted); font-size: 12.5px; margin-bottom: 22px; }
.meta-line b { color: var(--text-secondary); font-weight: 600; }

/* ---- panels & tiles ---- */
.panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px 16px;
  margin-bottom: 20px;
}
.panel h2 {
  margin: 0 0 2px; font-size: 13px; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-secondary);
}
.panel .sub { color: var(--text-muted); font-size: 12px; margin: 0 0 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 18px;
}
.tile .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }
.tile .value { font-size: 26px; font-weight: 650; margin-top: 2px; color: var(--text-primary); }
.tile .hint { font-size: 12px; color: var(--text-secondary); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- legend ---- */
.legend { display: flex; gap: 18px; margin: 0 0 10px; flex-wrap: wrap; }
.legend .key { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-secondary); }
.legend .chip { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---- charts ---- */
.chart { position: relative; }
.chart svg { display: block; }
.viz-tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  background: #0c1320; border: 1px solid var(--baseline); border-radius: 6px;
  padding: 8px 11px; font-size: 12.5px; color: var(--text-primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  min-width: 130px; display: none;
}
.viz-tooltip .tt-title { color: var(--text-muted); font-size: 11.5px; margin-bottom: 4px; letter-spacing: 0.04em; }
.viz-tooltip .tt-row { display: flex; align-items: center; gap: 7px; padding: 1px 0; }
.viz-tooltip .tt-row .chip { width: 9px; height: 9px; border-radius: 2px; }
.viz-tooltip .tt-row .v { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---- tables ---- */
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); font-weight: 600; padding: 8px 10px;
  border-bottom: 1px solid var(--baseline); white-space: nowrap;
}
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--text-secondary); }
table.data th .arrow { color: var(--accent-hi); font-size: 10px; }
table.data td { padding: 7px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.data tr:hover td { background: rgba(57, 135, 229, 0.06); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.type-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.type-cell img { width: 32px; height: 32px; border-radius: 4px; background: var(--surface-2); flex: none; }
.type-cell .tn { font-weight: 550; color: var(--text-primary); }
.type-cell .tg { font-size: 11.5px; color: var(--text-muted); }
.rankbar { height: 6px; border-radius: 3px; background: var(--accent); opacity: 0.85; min-width: 2px; }
.rankbar-track { background: var(--surface-2); border-radius: 3px; width: 100%; }

/* ---- status badges (icon + label, never color alone) ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid;
}
.badge .ic { font-size: 10px; line-height: 1; }
.badge.scarce    { color: #ff8a8a; border-color: rgba(208, 59, 59, 0.55); background: rgba(208, 59, 59, 0.12); }
.badge.moderate  { color: #ffd679; border-color: rgba(250, 178, 25, 0.45); background: rgba(250, 178, 25, 0.10); }
.badge.plentiful { color: #6fdc6f; border-color: rgba(12, 163, 12, 0.5);  background: rgba(12, 163, 12, 0.10); }

/* ---- category chips / sections ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chips a {
  font-size: 12px; color: var(--text-secondary); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px; background: var(--surface-1);
  letter-spacing: 0.04em;
}
.chips a:hover { color: var(--accent-hi); border-color: var(--accent); text-decoration: none; }
.cat-count { color: var(--text-muted); font-size: 11px; margin-left: 5px; }

/* ---- loading / status ---- */
.loading {
  text-align: center; padding: 70px 20px; color: var(--text-secondary);
}
.loading .pulse {
  width: 40px; height: 40px; margin: 0 auto 18px; border-radius: 50%;
  border: 2px solid var(--baseline); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading .big { font-size: 15px; color: var(--text-primary); letter-spacing: 0.06em; }

footer.site {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px;
}
