
:root {
  --bg: #000;
  --ink: #d9e7ff;
  --muted: #8aa0b7;
  --accent: #3be3ff;
  --accent-2: #ff365f;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: .2px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, .03),
    rgba(255, 255, 255, .03) 1px,
    transparent 2px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  z-index: 0;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin: 18px 0 8px;
  background: radial-gradient(800px 400px at 20% -10%, #0f1923 0%, #000 55%) no-repeat;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--accent-2), var(--accent) 45%, #1e2935 60%, var(--accent-2));
  box-shadow: inset 0 0 0 3px #0b1117, 0 0 40px rgba(59, 227, 255, .25);
  position: relative;
  isolation: isolate;
}

.logo::after {
  content: "K";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #00131a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .15);
}

h1 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 38px);
  letter-spacing: .8px;
}

.sub { color: var(--muted); margin-top: 4px; }

.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.glitch::before { transform: translate(1px, 0);  color: var(--accent); }
.glitch::after  { transform: translate(-1px, 0); color: var(--accent-2); }

.btn {
  display: inline-block;
  padding: 6px 12px;
  margin-top: 6px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  background: rgba(59, 227, 255, 0.05);
  font-size: 12px;
}

.btn:hover,
.btn:focus {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 12px var(--accent);
}

section { margin: 28px 0; }
section h2 {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin: 0 0 12px;
}

.card {
  background: #000;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.summary {
  font-size: 13px;
  color: var(--muted);
}

.summary strong { color: var(--ink); }

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

.chart-canvas {
  width: 100%;
  height: 320px;
}

.table-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.table-controls input {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: #05080d;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
}

.table-wrapper {
  max-height: 420px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #020308;
}

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

thead {
position: sticky;
  top: 0;
  background: #05080d;
  z-index: 1;
}

th, td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  text-align: left;
  white-space: nowrap;
}

th {
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 10px;
  color: var(--muted);
}

tbody tr:nth-child(even):not(.group-separator) {
  background: rgba(255, 255, 255, 0.03);
}

tbody tr:hover:not(.group-separator) {
  background: rgba(59, 227, 255, 0.06);
}

.cell-cat { color: var(--accent); }

.group-separator td {
  padding: 8px 4px;
  border-bottom: none;
  background: transparent;
}

.group-divider {
  height: 2px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59,227,255,0.9) 0, rgba(59,227,255,0.3) 30%, transparent 70%);
  box-shadow: 0 0 12px rgba(59,227,255,0.7);
}

footer {
  margin: 26px 0 60px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: radial-gradient(800px 400px at 20% 120%, #0f1923 0%, #000 55%) no-repeat;
  padding: 20px;
  border-radius: var(--radius);
}