/* botstop.io — compact, technical UI. Monospace chrome, zinc greys,
   one green accent; semantic colours only on the verdict. */
:root {
  --bg: #0b0b0c;
  --bg-2: #111113;
  --panel: #121214;
  --panel-2: #19191c;
  --border: #2a2a2e;
  --border-2: #3a3a40;
  --text: #d8d8dc;
  --muted: #8b8b93;
  --muted-2: #63636b;
  --accent: #3dd68c;
  --accent-2: #2aa86a;
  --human: #3dd68c;
  --suspicious: #d4a017;
  --automated: #e24b54;
  --unknown: #8b8b93;
  --radius: 2px;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --font: var(--mono);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
html { font-size: 13px; }
[hidden] { display: none !important; }

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

.mono { font-family: var(--mono); }
.small { font-size: 12px; }
.break { word-break: break-all; }
.muted { color: var(--muted); }
.ml { margin-left: 0.5rem; }
.right { text-align: right; }
.center { text-align: center; }

/* ---- header / footer ---- */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-prompt { color: var(--accent); font-weight: 500; }
.brand-name { font-size: 13px; }
.site-nav a { color: var(--muted); margin-left: 1rem; font-size: 12px; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

.site-header, .site-main, .site-footer { max-width: 640px; }
body:has(.session) .site-header,
body:has(.session) .site-main,
body:has(.session) .site-footer { max-width: 1080px; }
.site-main { margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
  color: var(--muted-2);
  font-size: 12px;
  border-top: 1px solid var(--border);
}
.site-footer p { margin: 0.9rem 0 0; }

/* ---- hero ---- */
.hero { padding: 0; }
.kicker {
  margin: 0 0 0.35rem;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 0.35rem;
  letter-spacing: 0;
  color: var(--text);
}
.hero-sub { margin: 0; color: var(--muted); font-size: 13px; max-width: 46em; }

/* ---- checker ---- */
.checker {
  position: relative;
  margin: 1.15rem 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 0;
}
.report-kv { display: grid; gap: 0; }
.report-row,
.refine {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.refine { color: var(--muted); font-size: 13px; }
.refine.done { color: var(--muted-2); }
.scan-val { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

.check-pending { padding: 0.7rem 0; }
.term {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.7rem;
  font-size: 13px;
  color: var(--muted);
}
.term-prompt { color: var(--accent); }
.check-status { color: var(--muted); }
.term-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .term-cursor { animation: none; } }

.progress {
  width: 100%;
  height: 2px;
  background: var(--panel-2);
  overflow: hidden;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.12s linear;
}
.checker[data-state="error"] .term-cursor { background: var(--automated); animation: none; }
.checker[data-state="error"] .check-status { color: var(--automated); }

/* result report */
.check-result { width: 100%; }
.k {
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.verdict-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}
.verdict-score { margin: 0; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 0.7rem; }
.verdict-score strong { color: var(--text); font-weight: 600; }
.verdict-score .unit { color: var(--muted-2); }

.is-human { color: var(--human); }
.is-suspicious { color: var(--suspicious); }
.is-automated { color: var(--automated); }
.is-unknown { color: var(--unknown); }
.report.is-human .verdict-label,
.report.is-suspicious .verdict-label,
.report.is-automated .verdict-label,
.report.is-unknown .verdict-label { color: currentColor; }

.scoremeter {
  display: inline-block;
  width: 7.5rem;
  height: 2px;
  margin: 0;
  background: var(--panel-2);
  overflow: hidden;
  vertical-align: middle;
}
.scoremeter-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--human), var(--suspicious) 55%, var(--automated));
  transition: width 0.5s ease-out;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: var(--radius);
  padding: 0.32rem 0.65rem;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text);
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn-primary { color: var(--accent); border-color: var(--accent); background: transparent; }
.btn-ghost { background: transparent; }
.btn-ghost.active { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 0.2rem 0.45rem; font-size: 11px; }

/* ---- explainer ---- */
.explainer { margin-top: 0; }
.facts { margin: 0; padding: 0; border-top: 0; }
.fact {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.fact dt {
  margin: 0;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
}
.fact dd { margin: 0; color: var(--muted); font-size: 13px; }
@media (max-width: 520px) {
  .report-row, .refine, .fact { grid-template-columns: 1fr; gap: 0.15rem; }
  .scoremeter { width: 5.5rem; }
}

/* ---- session detail / sessions list ---- */
.session { margin: 0; }
.session-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.session-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.session-meta { margin: 0.2rem 0 0; color: var(--muted); font-size: 12px; }

.verdict-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: var(--panel);
}
.verdict-icon {
  width: 22px;
  height: 22px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid currentColor;
  flex-shrink: 0;
}
.verdict-banner .verdict-icon { width: 22px; height: 22px; font-size: 12px; }
.verdict-banner h2 { margin: 0; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.verdict-banner p { margin: 0.15rem 0 0; color: var(--muted); font-size: 12px; }
.verdict-banner.is-human .verdict-icon::before { content: '\2713'; }
.verdict-banner.is-suspicious .verdict-icon::before { content: '!'; }
.verdict-banner.is-automated .verdict-icon::before { content: '\2715'; }
.verdict-banner.is-unknown .verdict-icon::before { content: '?'; }
.verdict-banner.is-human h2 { color: var(--human); }
.verdict-banner.is-suspicious h2 { color: var(--suspicious); }
.verdict-banner.is-automated h2 { color: var(--automated); }
.verdict-banner.is-unknown h2 { color: var(--unknown); }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.85rem;
}
.panel.no-pad { padding: 0; overflow: auto; }
.panel.center { text-align: center; padding: 1.6rem; }
.panel-title { margin: 0 0 0.65rem; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }

.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.flag {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.55rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
}
.flag-level {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius);
  color: #0a0a0a;
}
.flag-label { flex: 1; }
.flag-weight { color: var(--muted-2); font-family: var(--mono); font-size: 12px; }
.flag.lvl-strong .flag-level { background: var(--automated); }
.flag.lvl-medium .flag-level { background: var(--suspicious); }
.flag.lvl-weak .flag-level { background: #52525b; color: #e4e4e7; }
.flag.lvl-info .flag-level { background: #2c2c30; color: #e4e4e7; }

/* leftover landing-signal styles (unused on public page, kept for safety) */
.signals { margin-top: 1rem; }
.signals-title { font-size: 12px; margin: 0 0 0.5rem; color: var(--muted); font-weight: 600; }
.signals-empty { color: var(--muted); font-size: 12px; margin: 0.75rem 0 0; }
.signals-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.sig {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.55rem;
  font-size: 12px;
}
.sig-level {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius);
  color: #0a0a0a;
}
.sig-label { flex: 1; }
.sig-weight { color: var(--muted-2); font-size: 12px; }
.lvl-strong .sig-level { background: var(--automated); }
.lvl-medium .sig-level { background: var(--suspicious); }
.lvl-weak .sig-level { background: #52525b; color: #e4e4e7; }
.lvl-info .sig-level { background: #2c2c30; color: #e4e4e7; }

/* tables */
table { width: 100%; border-collapse: collapse; }
.kv td, .kv th, .hist td, .sessions td, .sessions th {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 12px;
}
.kv th, .sessions th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kv-key { color: var(--muted); width: 190px; border-bottom: 1px dotted var(--border-2); cursor: help; }
.kv-val { color: var(--text); }
.kv-val.bad { color: var(--automated); }
tr:last-child td { border-bottom: none; }

.hist-name { width: 110px; font-size: 12px; color: #b6b6bd; }
.hist-count { width: 44px; text-align: right; font-size: 12px; }
.hist-barcell { width: auto; }
.bar { background: var(--panel-2); height: 8px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: transparent; }
.bar-fill.on { background: var(--accent); }

.pill {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill-ok { background: transparent; color: var(--human); border: 1px solid rgba(61,214,140,0.4); }
.pill-bad { background: transparent; color: var(--automated); border: 1px solid rgba(226,75,84,0.4); }
.pill-warn { background: transparent; color: var(--suspicious); border: 1px solid rgba(212,160,23,0.4); }
.v-human { background: transparent; color: var(--human); border: 1px solid rgba(61,214,140,0.4); }
.v-suspicious { background: transparent; color: var(--suspicious); border: 1px solid rgba(212,160,23,0.4); }
.v-automated { background: transparent; color: var(--automated); border: 1px solid rgba(226,75,84,0.4); }
.v-unknown { background: transparent; color: var(--unknown); border: 1px solid rgba(139,139,147,0.4); }

.sessions td { border-bottom: 1px solid var(--border); }
.sessions tbody tr:hover { background: var(--panel-2); }
.sessions thead th { background: var(--bg-2); }
.sessions td.when time { white-space: nowrap; cursor: help; border-bottom: 1px dotted var(--border-2); }

.raw { margin-top: 0.5rem; }
.raw summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.raw pre {
  font-family: var(--mono);
  font-size: 11px;
  max-height: 420px;
  overflow: auto;
  background: #09090a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem;
  color: #d4d4d8;
}

/* honeypot: invisible + unreachable to real users */
.hpo { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
