:root {
  --capy-accent: #39ff14;
  --bg: #09090b;
  --bg-card: rgba(24, 24, 27, 0.5);
  --border: #27272a;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }

.ar-boot {
  padding: 3rem 1.5rem; text-align: center; color: var(--muted);
}
.ar-boot strong { color: var(--capy-accent); }

.demo-banner {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(57, 255, 20, 0.25);
  background: rgba(9, 20, 9, 0.94);
  padding: 0.4rem 1rem; text-align: center;
  font-size: 0.7rem; color: #bbf7d0;
}
.demo-banner a { color: #86efac; }

.ar-layout { display: flex; min-height: calc(100vh - 2rem); }
.ar-sidebar {
  display: none; width: 14rem; flex-shrink: 0;
  flex-direction: column; border-right: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.85);
  position: fixed; top: 2rem; bottom: 0; left: 0; z-index: 20;
}
.ar-sidebar-head { border-bottom: 1px solid var(--border); padding: 1rem; }
.ar-brand { font-weight: 600; color: var(--capy-accent); text-decoration: none; }
.ar-email { margin-top: 0.25rem; font-size: 0.75rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-sidebar nav { flex: 1; padding: 0.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.125rem; }
.ar-sidebar-foot { border-top: 1px solid var(--border); padding: 0.5rem; }

.ar-main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-bottom: 4rem; }
.ar-mobile-head { display: block; border-bottom: 1px solid var(--border); background: rgba(9, 9, 11, 0.9); }
.ar-mobile-title { padding: 0.75rem 1rem; font-weight: 500; color: var(--capy-accent); }
.ar-mobile-nav { display: flex; gap: 0.25rem; overflow-x: auto; padding: 0 0.5rem 0.5rem; font-size: 0.75rem; }
.ar-content { flex: 1; padding: 1rem; }

@media (min-width: 768px) {
  .ar-sidebar { display: flex; }
  .ar-main-wrap { margin-left: 14rem; padding-bottom: 0; }
  .ar-mobile-head { display: none; }
  .ar-content { padding: 2rem; }
}

.nav-item {
  display: block; border-radius: 0.375rem;
  padding: 0.5rem 0.75rem; font-size: 0.875rem;
  color: var(--muted); text-decoration: none;
}
.nav-item:hover { background: #27272a; color: #e4e4e7; }
.nav-active { background: #27272a; color: #fff; }

.page-stack { display: flex; flex-direction: column; gap: 2rem; max-width: 64rem; }
.page-title { font-size: 1.5rem; font-weight: 700; margin: 0; }
.page-sub { margin-top: 0.25rem; font-size: 0.875rem; color: var(--dim); }
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.panel {
  border-radius: 0.75rem; border: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.5); padding: 1rem;
}
.panel-muted { background: rgba(24, 24, 27, 0.4); }
.panel-amber { border-color: rgba(120, 53, 15, 0.4); background: rgba(69, 26, 3, 0.2); }
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.5rem; }
.row-between { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.gap-3 { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.list-stack { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.grid-cards { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
.grid-2col { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .grid-2col { grid-template-columns: 1fr 280px; } }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; font-weight: 500; }
.text-muted { color: var(--dim); }
.text-dim { color: var(--muted); }
.text-light { color: #e4e4e7; }
.text-amber { color: #fcd34d; }
.text-red { color: #f87171; }
.text-green { color: var(--capy-accent); }
.font-mono { font-family: ui-monospace, monospace; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.break-words { word-break: break-word; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }
.uppercase { text-transform: uppercase; letter-spacing: 0.05em; }
.tabular { font-variant-numeric: tabular-nums; }
.stat-num { margin-top: 0.25rem; font-size: 1.5rem; font-weight: 600; }
ol.steps { margin: 0.5rem 0 0; padding-left: 1.25rem; }
ol.steps li { margin-top: 0.375rem; }

.btn-accent {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.5rem; padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 500;
  background: var(--capy-accent); color: #09090b;
  border: none; cursor: pointer; text-decoration: none;
}
.btn-accent:hover { background: #4ade80; }
.btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline {
  display: inline-flex; align-items: center;
  border-radius: 0.5rem; padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 500;
  background: transparent; color: #e4e4e7;
  border: 1px solid #3f3f46; cursor: pointer; text-decoration: none;
}
.btn-outline:hover { background: #18181b; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.875rem; }

.stat-card {
  border-radius: 0.5rem; border: 1px solid var(--border);
  background: var(--bg-card); padding: 0.75rem;
}
.event-card {
  border-radius: 0.5rem; border: 1px solid var(--border);
  background: var(--bg-card); padding: 0.75rem;
}
.signal-card {
  display: flex; flex-direction: column;
  border-radius: 0.5rem; border: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.4); padding: 0.75rem;
}
.signal-card .card-actions { margin-top: auto; display: flex; gap: 0.75rem; padding-top: 0.75rem; }
.tag-early {
  border-radius: 0.25rem; background: #052e16;
  padding: 0.125rem 0.375rem; font-size: 10px;
  text-transform: uppercase; color: #4ade80; flex-shrink: 0;
}
.sev-high { color: #f87171; }
.sev-medium { color: var(--dim); }
.score-badge {
  border-radius: 0.25rem; background: #052e16;
  padding: 0.125rem 0.375rem; font-size: 0.75rem;
  font-weight: 500; color: #6ee7b7;
}
.link-accent { color: var(--capy-accent); text-decoration: none; }
.link-accent:hover { text-decoration: underline; }
.track-btn { background: none; border: none; padding: 0; font: inherit; color: #d4d4d8; cursor: pointer; }
.track-btn:hover { color: #fff; }

.input {
  width: 100%; border-radius: 0.375rem; border: 1px solid #3f3f46;
  background: var(--bg); color: var(--text);
  padding: 0.5rem 0.75rem; font-size: 0.875rem; font-family: inherit;
}
.input:focus { outline: none; border-color: var(--capy-accent); }
select.input { cursor: pointer; }
.table-wrap { overflow-x: auto; border-radius: 0.75rem; border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.875rem; text-align: left; }
table.data th { padding: 0.75rem 1rem; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); }
table.data td { padding: 0.75rem 1rem; border-top: 1px solid var(--border); vertical-align: top; }
table.data input, table.data select { min-width: 0; }

.roadmap-phase { border-left: 3px solid var(--capy-accent); padding-left: 1rem; }
.roadmap-done { opacity: 0.9; }
.roadmap-done .roadmap-phase { border-color: #22c55e; }
.roadmap-next .roadmap-phase { border-color: #fbbf24; }
.badge { border-radius: 0.25rem; padding: 0.125rem 0.5rem; font-size: 0.75rem; }
.badge-green { background: #052e16; color: #86efac; }
.badge-amber { background: #422006; color: #fcd34d; }
.badge-zinc { background: #27272a; color: var(--muted); }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block; width: 0.875rem; height: 0.875rem;
  border-radius: 9999px; border: 2px solid var(--capy-accent);
  border-top-color: transparent; animation: spin 0.7s linear infinite; vertical-align: middle;
}
