:root {
  --bg: #0a0a0c;
  --panel: #111114;
  --raised: #17171b;
  --line: #232329;
  --line-strong: #2e2e36;
  --text: #ececef;
  --muted: #8b8b94;
  --faint: #55555e;
  --accent: #3b82f6;
  --accent-dim: rgba(59, 130, 246, 0.14);
  --ok: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { color-scheme: dark; }

body.mono26 {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
}

body.mono26::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, var(--bg) 0%, transparent 220px),
    linear-gradient(to top, var(--bg) 0%, transparent 180px);
  z-index: -1;
}

.display-font { letter-spacing: -0.04em; }
.mono-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.raised { background: var(--raised); }
.hover-lift { transition: border-color .16s var(--ease), background-color .16s var(--ease); }
.hover-lift:hover { border-color: var(--line-strong); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
}
a.chip:hover, button.chip:hover { color: var(--text); border-color: var(--line-strong); cursor: pointer; }

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background-color .16s var(--ease), transform .16s var(--ease);
}
.btn-primary:hover { background: #2f76ee; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.55; cursor: wait; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  padding: 8px 16px;
  min-width: 72px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease);
}
.flex > .btn-ghost { flex: 1 1 0; }
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }
.btn-ghost:disabled { opacity: 0.45; cursor: wait; }
.btn-ghost.danger:hover { color: var(--bad); border-color: rgba(248, 81, 73, 0.4); }
.btn-ghost.warn:hover { color: var(--warn); border-color: rgba(210, 153, 34, 0.4); }
.btn-ghost.ok:hover { color: var(--ok); border-color: rgba(63, 185, 80, 0.4); }

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--muted);
  flex: none;
}
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

input.aur-input, textarea.aur-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 0.95rem;
  color: var(--text);
  outline: 0;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input.aur-input:focus, textarea.aur-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
input.aur-input::placeholder { color: var(--faint); }

.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  color: var(--muted);
}

.shimmer {
  animation: sk-pulse 1.6s ease-in-out infinite;
  background: var(--raised);
  border-radius: 8px;
}
@keyframes sk-pulse { 50% { opacity: 0.55; } }

.shake { animation: sh-shake 0.4s var(--ease); }
@keyframes sh-shake {
  20% { transform: translateX(-8px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(2px); }
}

.sparkline { display: block; width: 100%; height: 34px; }

#toasts {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
}
.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.35;
  animation: t-in .22s var(--ease);
}
.toast.out { opacity: 0; transition: opacity .25s ease; }
.toast .t-dot { margin-top: 5px; width: 8px; height: 8px; border-radius: 999px; flex: none; }
.toast.ok .t-dot { background: var(--ok); }
.toast.err .t-dot { background: var(--bad); }
.toast.info .t-dot { background: var(--accent); }
@keyframes t-in { from { opacity: 0; transform: translateY(8px); } }

#palette-overlay {
  position: fixed; inset: 0;
  z-index: 13000;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 13vh;
}
#palette-overlay.open { display: flex; }
#palette {
  width: min(600px, calc(100vw - 40px));
  border-radius: 16px;
  overflow: hidden;
  animation: pal-in .18s var(--ease);
}
@keyframes pal-in { from { opacity: 0; transform: translateY(-6px); } }
#palette-input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 15px 18px;
  font-size: 0.95rem;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
#palette-list { max-height: 330px; overflow-y: auto; padding: 6px; }
.pal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--text);
}
.pal-item img { width: 22px; height: 22px; object-fit: contain; margin-right: 10px; vertical-align: middle; }
.pal-item .pal-hint {
  font-size: 0.62rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pal-item.active { background: var(--accent-dim); outline: 1px solid rgba(59, 130, 246, 0.35); }
.pal-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 0.82rem; }

details.acc {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}
details.acc > summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 18px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color .16s ease;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc[open] > summary { color: var(--accent); border-bottom: 1px solid var(--line); }
details.acc > summary .chev { transition: transform .2s var(--ease); }
details.acc[open] > summary .chev { transform: rotate(180deg); }
details.acc .acc-body { padding: 16px 18px; font-size: 0.72rem; color: #9a9aa3; line-height: 1.55; }
details.acc .acc-body table, details.acc .acc-body p { color: inherit; }

/* Legal notice stack (inside accordion) */
.legal-h {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}
.legal-text, .legal-stack {
  font-size: 0.78rem;
  line-height: 1.65;
  color: #b4b5bd;
}
.legal-stack p { margin-bottom: 8px; }
.legal-stack p:last-child { margin-bottom: 0; }
.legal-note {
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--muted);
}
.border-top { border-top: 1px solid var(--line); padding-top: 14px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(35, 35, 41, 0.55);
  color: #c9c9d1;
}
.data-table tbody tr { transition: background-color .12s ease; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #26262c; border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #33333b; }
* { scrollbar-width: thin; scrollbar-color: #26262c transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
