:root {
  --bg: #0b0f14;
  --surface: #121821;
  --surface-2: #18212d;
  --border: #243142;
  --text: #e8eef5;
  --muted: #8ea0b5;
  --accent: #5eead4;
  --human: #38bdf8;
  --agent: #a78bfa;
  --script: #f59e0b;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(255,255,255,0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #101720 0%, var(--bg) 100%);
  padding: 28px 0 22px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.brand-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}

h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 640px;
}

.header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.meta-badge {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 11px;
  border-radius: 6px;
}

.header-links {
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
}

.notice-banner {
  margin: 20px 0;
  padding: 12px 16px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  color: #cfe9f8;
  font-size: 13px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}

.kpi-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.kpi-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  margin: 6px 0 4px;
}

.kpi-sub {
  font-size: 12px;
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.share-bar-wrap { margin-bottom: 16px; }
.share-bar-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.share-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}

.share-seg-human { background: var(--human); }
.share-seg-agent { background: var(--agent); }
.share-seg-script { background: var(--script); }

.class-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.class-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.class-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.class-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.class-stat-row span:first-child { color: var(--muted); }
.class-stat-row span:last-child { font-family: var(--mono); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-human { background: rgba(56, 189, 248, 0.16); color: var(--human); border: 1px solid rgba(56, 189, 248, 0.35); }
.badge-agent { background: rgba(167, 139, 250, 0.16); color: var(--agent); border: 1px solid rgba(167, 139, 250, 0.35); }
.badge-script { background: rgba(245, 158, 11, 0.16); color: var(--script); border: 1px solid rgba(245, 158, 11, 0.35); }

.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.segmented button {
  background: var(--surface-2);
  color: var(--muted);
  border: 0;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.segmented button.active {
  background: rgba(94, 234, 212, 0.16);
  color: var(--accent);
  font-weight: 600;
}

.legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot-human { background: var(--human); }
.dot-agent { background: var(--agent); }
.dot-script { background: var(--script); }

.chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.chart-wrap svg {
  width: 100%;
  height: 230px;
  display: block;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #0d131b;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  z-index: 10;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: top;
}

.data-table th.num, .data-table td.num {
  text-align: right;
  font-family: var(--mono);
  white-space: nowrap;
}

.addr {
  font-family: var(--mono);
  font-size: 12px;
}

.mini-bar {
  display: flex;
  width: 90px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filters select, .filters input {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
}

.reason-list {
  font-size: 12px;
  color: var(--muted);
  max-width: 310px;
}

.table-footer {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.method-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rule-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.rule-card p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-cards, .grid-2, .method-grid, .rules-grid { grid-template-columns: 1fr; }
  .header-meta { align-items: flex-start; }
}
