/* ============================================================
   NexterFingerprint — лист досье
   Светлая плоскость, чёрные линейки, цифра вместо карточки.
   Unbounded — заголовок и балл. Golos Text — текст.
   JetBrains Mono — данные.
   ============================================================ */
:root {
  color-scheme: light;
  --bg: #efefec;
  --bg-soft: #e4e4e0;
  --card: transparent;
  --card-2: transparent;
  --ink: #111111;
  --border: #111111;
  --border-soft: rgba(17, 17, 17, 0.14);
  --text: #111111;
  --muted: #5c5c58;
  --faint: #6f6f6a;
  --accent: #111111;
  --accent-strong: #111111;
  --accent-soft: rgba(17, 17, 17, 0.06);
  --ok: #0d6b3d;
  --ok-soft: rgba(13, 107, 61, 0.1);
  --warn: #8a5a00;
  --warn-soft: rgba(138, 90, 0, 0.1);
  --bad: #9f1d14;
  --bad-soft: rgba(159, 29, 20, 0.1);
  --radius: 0px;
  --radius-sm: 0px;
  --shadow: none;
  --font: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --display: "Unbounded", "Golos Text", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --topbar: 57px;
  --measure: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #111 var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.5 var(--font);
  background: var(--bg);
  color: var(--ink);
}
::selection { background: #111; color: var(--bg); }
:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }

/* ---------------- masthead ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-top: 4px solid transparent;
  border-bottom: 1px solid var(--ink);
}
html[data-verdict="human"] .topbar { border-top-color: var(--ok); }
html[data-verdict="suspicious"] .topbar { border-top-color: var(--warn); }
html[data-verdict="bot"] .topbar { border-top-color: var(--bad); }
.topbar-inner {
  max-width: var(--measure); height: 52px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 22px; height: 22px; flex: none;
  display: grid; place-items: center; background: none;
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-name { font-family: var(--display); font-size: 13px; font-weight: 500; letter-spacing: -0.03em; }
.brand-name b { font-weight: 700; color: inherit; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  color: var(--muted); text-decoration: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.01em;
  padding: 6px 8px;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: 10px; padding: 4px 8px;
  border: 1px solid var(--ink); border-radius: 0;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink); background: transparent; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; background: var(--ink); }
.pill-server::before { background: var(--ok); }
.pill-client::before { background: var(--ink); }

/* ---------------- page ---------------- */
.wrap { max-width: var(--measure); width: 100%; margin: 0 auto; padding: 36px 28px 48px; flex: 1; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  grid-template-areas: "copy score" "stats stats";
  gap: 36px 48px;
  align-items: start;
  margin: 0 0 8px;
  padding-bottom: 8px;
}
.hero-copy { grid-area: copy; padding: 0; }
.hero-right { grid-area: score; }
.stat-row { grid-area: stats; }
.eyebrow {
  margin: 0 0 16px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: none; }
.hero h1, .panel h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(40px, 5vw, 64px); line-height: 0.96;
  letter-spacing: -0.045em; margin: 0 0 18px; max-width: 11ch;
}
.hero .sub, .panel .sub { color: var(--muted); margin: 0 0 28px; max-width: 42ch; font-size: 16px; }
.cta-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 15px var(--font); padding: 12px 18px; cursor: pointer;
  border-radius: 0; border: 1px solid var(--ink); background: transparent; color: var(--ink);
}
.btn svg { display: none; }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover:not(:disabled) { background: #000; }
.btn.primary:disabled { opacity: 0.35; cursor: wait; }
.btn.ghost, .btn.sm {
  background: transparent; color: var(--ink); border-color: var(--ink);
  font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 6px 10px;
}
.btn.ghost:hover { background: var(--ink); color: var(--bg); }

.stat-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0; margin: 8px 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.stat-row li { padding: 14px 18px 14px 0; border-right: 1px solid var(--border-soft); }
.stat-row li:last-child { border-right: 0; padding-right: 0; }
.stat-row li + li { padding-left: 18px; }
.stat-row b { display: block; font-family: var(--display); font-size: 18px; font-weight: 500; letter-spacing: -0.03em; }
.stat-row span { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------------- score ---------------- */
.hero-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  border: 0; background: none; padding: 0; text-align: right;
}
.meter { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.ring-wrap { position: relative; width: 72px; height: 72px; flex: none; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(17, 17, 17, 0.16); stroke-width: 4; }
.ring-val {
  fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: butt;
  stroke-dasharray: 364.42; stroke-dashoffset: 364.42;
  transition: stroke-dashoffset 0.8s cubic-bezier(.22, 1, .36, 1), stroke 0.3s;
}
.score {
  font-family: var(--display); font-size: clamp(72px, 8vw, 104px);
  font-weight: 500; line-height: 0.9; letter-spacing: -0.06em;
}
.score.is-idle { color: rgba(17, 17, 17, 0.22); }
.ring-cap { margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.verdict {
  padding: 4px 8px; border-radius: 0; border: 1px solid var(--ink);
  font-family: var(--display); font-weight: 500; font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; background: transparent; color: var(--ink);
}
.v-idle { color: var(--muted); border-color: var(--border-soft); }
.v-human { color: var(--ok); border-color: var(--ok); }
.v-suspicious { color: var(--warn); border-color: var(--warn); }
.v-bot { color: var(--bg); background: var(--bad); border-color: var(--bad); }
.fsid {
  width: 100%; max-width: 280px; color: var(--muted); font-size: 11px; line-height: 1.45;
  word-break: break-all; padding: 8px 0 0; border-top: 1px solid var(--border-soft);
  background: none; border-radius: 0;
}
.fsid:empty { display: none; }
.fsid:not(:empty)::before {
  content: "FSID"; display: block; font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 3px;
}
.scale {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end;
  margin: 0; padding: 0; list-style: none;
  color: var(--muted); font-family: var(--mono); font-size: 11px;
}
.scale li { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 0; display: inline-block; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

/* ---------------- progress ---------------- */
.progress { margin-top: 22px; }
.progress-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 8px; }
.step {
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; background: none;
}
.step.active { color: var(--ink); border-bottom: 2px solid var(--ink); }
.step.done { color: var(--ok); border-bottom-color: var(--ok); }
.progress-bar { height: 2px; border-radius: 0; background: var(--border-soft); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--ink); transition: width 0.3s ease; }

/* ---------------- dossier ---------------- */
.dossier, .dossier-body, .jump, .card, .hero { min-width: 0; }
.dossier:has(#jumpNav:not([hidden])) {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  column-gap: 36px;
  align-items: start;
}
.jump {
  position: sticky; top: 76px;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 0;
  margin: 28px 0 0; padding: 0 0 0 12px;
  background: none; border: 0; border-left: 1px solid var(--ink); border-radius: 0;
  overflow: visible;
}
.jump a {
  color: var(--muted); text-decoration: none;
  font-family: var(--mono); font-size: 12px; padding: 5px 0;
}
.jump a:hover { color: var(--ink); }

.card {
  background: none; border: 0; border-radius: 0; box-shadow: none;
  padding: 28px 0 8px; margin: 0;
  border-top: 1px solid var(--ink);
  scroll-margin-top: 84px;
}
.card-head { display: flex; align-items: flex-end; gap: 16px; margin: 0 0 18px; }
.head-copy { flex: 1; min-width: 0; }
.kicker {
  margin: 0 0 4px; font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.card-head h2 {
  font-family: var(--display); font-size: 26px; font-weight: 500;
  letter-spacing: -0.04em; margin: 0; line-height: 1.05;
}
.ico { display: none; }

h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 500; margin: 0 0 8px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--ink); padding-bottom: 6px;
}

/* atlas */
.atlas-grid { counter-reset: atlas; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.atlas-item {
  counter-increment: atlas;
  display: grid; grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas: "n title" "n text";
  gap: 2px 8px; min-height: 0;
  padding: 12px 0; border-top: 1px solid var(--border-soft);
  background: none; border-radius: 0;
}
.atlas-item::before {
  content: counter(atlas, decimal-leading-zero); grid-area: n;
  font-family: var(--display); font-size: 13px; color: var(--muted); padding-top: 2px;
}
.atlas-item b { grid-area: title; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.atlas-item span { grid-area: text; color: var(--muted); font-size: 13px; line-height: 1.4; }

/* findings */
.findings { list-style: none; margin: 0; padding: 0; display: block; }
.findings li {
  padding: 14px 0; border: 0; border-bottom: 1px solid var(--border-soft);
  border-radius: 0; background: none;
}
.findings li:has(.bad) { box-shadow: inset 3px 0 0 var(--bad); padding-left: 12px; }
.findings li:has(.good) { box-shadow: inset 3px 0 0 var(--ok); padding-left: 12px; }
.findings li.hint { color: var(--muted); border-bottom-style: dashed; box-shadow: none; padding-left: 0; }
.f-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.findings code {
  font-family: var(--mono); font-size: 13px; background: none; color: var(--ink);
  border-radius: 0; padding: 0;
}
.findings .bad, .findings .good {
  margin-left: auto; font-family: var(--display); font-weight: 500; font-size: 16px;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.findings .bad { color: var(--bad); }
.findings .good { color: var(--ok); }
.findings .ev { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 72ch; }
.cat {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 1px 6px; border-radius: 0; border: 1px solid currentColor; font-weight: 500;
}
.cat-automation { background: none; color: var(--bad); }
.cat-coherence, .cat-spoofing { background: none; color: var(--warn); }
.cat-connection, .cat-context { background: none; color: var(--ink); }
.cat-behavior { background: none; color: var(--ink); }
.cat-extras, .cat-reference { background: none; color: var(--muted); }

.count-chip {
  flex: none; font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--ok); background: none; border: 1px solid var(--ok);
  border-radius: 0; padding: 4px 8px;
}
.count-chip.warn { color: var(--warn); background: none; border-color: var(--warn); }

/* tables */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; }
.grid2 > div, .grid3 > div { background: none; border: 0; border-radius: 0; padding: 0; min-width: 0; }

table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kv td { padding: 8px 0; border-bottom: 1px solid var(--border-soft); vertical-align: top; background: none; }
table.kv tr:hover td { background: none; }
table.kv td.k {
  color: var(--muted); width: 38%; padding-right: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em;
}
table.kv td.v { word-break: break-word; font-family: var(--mono); font-size: 12.5px; line-height: 1.45; color: var(--ink); }
td.v.copyable { cursor: pointer; }
td.v.copyable:hover { text-decoration: underline; text-underline-offset: 3px; }
td.v.v-warn { color: var(--warn); }
td.v.v-ok { color: var(--ok); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; padding-bottom: 8px; }
.chip {
  background: none; border: 1px solid var(--border-soft); color: var(--ink);
  border-radius: 0; padding: 3px 7px; font-size: 11px; font-family: var(--mono);
}
.chip.warn { background: none; border-color: var(--warn); color: var(--warn); }

.entity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 10px; }
.entity {
  border: 0; border-top: 2px solid var(--ink); border-radius: 0;
  background: none; padding: 10px 0 0; min-width: 0;
}
.entity.suspicious { border-top-color: var(--warn); box-shadow: none; }
.e-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }
.e-hash { font-size: 13px; margin: 8px 0 4px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-hash:hover { text-decoration: underline; text-underline-offset: 3px; }
.e-meta { font-size: 12px; color: var(--muted); }
.entity.suspicious .e-meta { color: var(--warn); }

pre {
  background: #111; color: #efefec; border: 0; border-radius: 0;
  padding: 16px 18px; overflow: auto; max-height: 440px; font-size: 12px;
  font-family: var(--mono); margin: 0; line-height: 1.55;
}
pre.small { max-height: 200px; background: var(--bg-soft); color: var(--ink); }
details { margin-top: 16px; }
summary { cursor: pointer; color: var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
summary:hover { text-decoration: underline; text-underline-offset: 3px; }

.j-key { color: #f0d7a2; }
.j-str { color: #d5e4c4; }
.j-num { color: #ffffff; }
.j-bool { color: #f0b4ae; }

.toast {
  position: fixed; bottom: 20px; left: 28px; transform: none;
  background: var(--ink); color: var(--bg); border-radius: 0; padding: 10px 14px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  opacity: 0; transition: opacity 0.2s; z-index: 100;
}
.toast.show { opacity: 1; transform: none; }

.footer {
  width: 100%; max-width: var(--measure); margin: 0 auto; padding: 18px 28px 28px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px; border-top: 1px solid var(--ink); background: var(--bg);
}
.footer-brand { display: grid; gap: 4px; max-width: 46ch; }
.footer .brand-name { font-family: var(--display); }
.footer nav { display: flex; gap: 14px; }
.footer nav a { color: var(--ink); text-decoration: none; font-family: var(--mono); font-size: 12px; }
.footer nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
#verFooter:empty { display: none; }
#verFooter {
  font-size: 12px; padding: 0; border: 0; border-radius: 0; color: var(--muted);
}

/* captcha */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr); gap: 48px; align-items: start; }
.split .card { border-top: 0; padding-top: 0; }
.split .card + .card { border-left: 1px solid var(--ink); padding-left: 32px; }
.fields { display: grid; gap: 18px; margin-bottom: 18px; }
.field-label { display: grid; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field {
  width: 100%; background: transparent; border: 0; border-bottom: 1.5px solid var(--ink);
  border-radius: 0; color: var(--ink); padding: 8px 0 10px; font: 16px var(--font);
}
.field:focus { outline: none; border-bottom-width: 2px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.steps em {
  width: 28px; height: 28px; display: grid; place-items: center; font-style: normal;
  font-family: var(--display); font-size: 12px; border-radius: 0;
  background: none; border: 1px solid var(--ink); color: var(--ink);
}
.steps b { display: block; font-family: var(--display); font-weight: 500; font-size: 16px; letter-spacing: -0.03em; margin-bottom: 2px; }
.steps span { color: var(--muted); font-size: 14px; }
#result:not(:empty) { margin-top: 14px; }
#submit { margin-top: 18px; }

@media (max-width: 980px) {
  .grid3, .atlas-grid { grid-template-columns: 1fr 1fr; }
  .hero, .split { grid-template-columns: 1fr; }
  .hero { grid-template-areas: "copy" "score" "stats"; align-items: start; }
  .hero-right, .meter, .scale { align-items: flex-start; justify-content: flex-start; text-align: left; }
  .hero h1, .panel h1 { max-width: none; }
  .split .card + .card { border-left: 0; padding-left: 0; border-top: 1px solid var(--ink); padding-top: 28px; }
  .dossier:has(#jumpNav:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .jump { position: static; width: 100%; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; border-left: 0; border-bottom: 1px solid var(--ink); padding: 0 0 10px; margin-top: 20px; }
}
@media (max-width: 720px) {
  .topbar-inner { height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 8px 12px; }
  .nav { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .pill { margin-left: 0; }
  .wrap { padding: 24px 16px 40px; }
  .grid2, .grid3, .atlas-grid, .entity-grid, .stat-row, .progress-steps { grid-template-columns: 1fr; }
  .stat-row li, .stat-row li + li { border-right: 0; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .stat-row { border-bottom: 0; }
  .cta-row .btn.primary, #submit { width: 100%; }
  table.kv, table.kv tbody, table.kv tr, table.kv td { display: block; width: 100%; }
  table.kv td.k { width: auto; border-bottom: 0; padding-bottom: 0; }
  table.kv td.v { padding-top: 2px; }
  .score { font-size: 80px; }
  .footer { align-items: flex-start; padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
