/* GitHub Checker — visual identity: a printed inspection dossier on cream paper.
   Type: Literata (display), Onest (text), JetBrains Mono (numbers, labels).
   All fonts are self-hosted in assets/fonts (OFL), no third-party requests. */

/* ---------- fonts ---------- */

@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/literata-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/literata-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- palette ---------- */

:root {
  --paper: #f2ebda;
  --paper-hi: #f8f2e4;
  --paper-lo: #e9dfc7;
  --ink: #17130e;
  --ink-2: #3a3227;
  --muted: #6d6252;
  --dim: #8a7d68;
  --rule: #c6b998;
  --rule-2: #a2957a;
  --red: #bd3310;
  --red-deep: #942408;
  --green: #1f6b47;
  --ochre: #9a6f0b;
  --petrol: #27586f;
  --shadow: 6px 6px 0 rgba(23, 19, 14, 0.9);
  --serif: "Literata", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Onest", "Trebuchet MS", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 460px at 6% -8%, rgba(189, 51, 16, 0.09), transparent 66%),
    radial-gradient(820px 520px at 102% -4%, rgba(39, 88, 111, 0.10), transparent 62%),
    radial-gradient(760px 620px at 62% 34%, rgba(248, 242, 228, 0.85), transparent 70%),
    repeating-linear-gradient(0deg, rgba(23, 19, 14, 0.045) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(23, 19, 14, 0.045) 0 1px, transparent 1px 26px);
  background-attachment: fixed;
}

::selection { background: var(--red); color: var(--paper-hi); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* paper grain + print registration wash */
.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.26'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(23, 19, 14, 0.055);
  border: 1px solid rgba(23, 19, 14, 0.12);
  padding: 0 4px;
  color: var(--ink);
}

strong, b { font-weight: 650; }

/* ---------- header ---------- */

.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px clamp(18px, 4vw, 46px) 14px;
  max-width: 1240px;
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
  animation: rule-in 0.7s cubic-bezier(.2, .8, .2, 1) both;
  transform-origin: left center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.015em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper-hi);
  box-shadow: 2.5px 2.5px 0 var(--red);
}

.brand-text { font-size: 17px; }
.brand-text::after {
  content: "/ inspection";
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-left: 8px;
  text-transform: uppercase;
}

.top-right { display: flex; align-items: center; gap: 8px; }

.rate {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--rule);
  padding: 4px 7px;
  white-space: nowrap;
  text-transform: uppercase;
}
.rate.low { color: #7f5a06; border-color: #7f5a06; }
.rate.out { color: var(--red); border-color: var(--red); }

.ghost {
  appearance: none;
  border: 1px solid var(--rule-2);
  background: transparent;
  color: var(--ink);
  padding: 8px 11px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-hi);
  text-decoration: none;
}
.ghost:active { transform: translateY(1px); }
.ghost.icon { padding: 8px 9px; line-height: 0; }

/* ---------- layout ---------- */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 46px) 70px;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  align-items: start;
  gap: clamp(28px, 4.5vw, 58px);
  padding: clamp(34px, 5.6vw, 70px) 0 10px;
}

.hero-main { min-width: 0; max-width: 780px; }

.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .dot {
  width: 7px;
  height: 7px;
  background: var(--red);
  flex: none;
}

h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: clamp(37px, 5.4vw, 64px);
  line-height: 0.99;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}
h1 em {
  font-style: normal;
  color: var(--red);
  box-shadow: inset 0 -0.1em 0 rgba(189, 51, 16, 0.22);
}

.lead {
  margin: 0 0 26px;
  max-width: 560px;
  color: var(--ink-2);
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.5;
}

/* margin note — a field annotation next to the headline */
.margin-note {
  position: relative;
  margin-top: 42px;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--red);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.45;
}
.mn-head {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.mn-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.margin-note ol {
  list-style: none;
  counter-reset: q;
  margin: 0;
  padding: 0;
}
.margin-note li {
  counter-increment: q;
  position: relative;
  padding-left: 22px;
  margin-bottom: 7px;
}
.margin-note li::before {
  content: counter(q) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
}
.mn-foot {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- search ---------- */

.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 620px;
  border: 1.5px solid var(--ink);
  background: var(--paper-hi);
  box-shadow: var(--shadow);
  transition: box-shadow 0.16s, border-color 0.16s;
}
.search:focus-within {
  border-color: var(--red);
  box-shadow: 5px 5px 0 var(--red);
}

.field {
  position: relative;
  min-width: 0;
}
.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rule-2);
  pointer-events: none;
}

.field input {
  width: 100%;
  height: 56px;
  padding: 0 14px 0 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: -0.01em;
  outline: none;
}
.field input::placeholder { color: var(--muted); }
.field input:focus { outline: none; }

.primary {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper-hi);
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s;
}
.primary:hover { background: var(--red); border-color: var(--red); }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: 0.6; cursor: default; }

.search .primary {
  height: 100%;
  min-height: 56px;
  padding: 0 26px;
  border: 0;
  border-left: 1.5px solid var(--ink);
  background: var(--red);
  color: var(--paper-hi);
  white-space: nowrap;
}
.search .primary:hover { background: var(--red-deep); }

.spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(248, 242, 228, 0.4);
  border-top-color: var(--paper-hi);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.primary.busy .spinner { display: inline-block; }
.primary.busy .primary-label { opacity: 0.75; }

@keyframes spin { to { transform: rotate(360deg); } }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 16px;
}
.chip {
  appearance: none;
  border: 0;
  border-bottom: 1px dashed var(--rule-2);
  background: none;
  color: var(--muted);
  padding: 2px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s;
}
.chip::before { content: "→ "; color: var(--red); }
.chip:hover { color: var(--ink); border-bottom-color: var(--red); border-bottom-style: solid; }

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

/* ---------- audit mode switch ---------- */

.modes {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  margin: 0 0 9px;
  border: 1.5px solid var(--ink);
  background: var(--paper-hi);
  box-shadow: 4px 4px 0 rgba(23, 19, 14, 0.14);
}

.mode {
  appearance: none;
  border: 0;
  border-left: 1px solid var(--rule-2);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 196px;
  padding: 8px 15px 9px;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.mode:first-child { border-left: 0; }
.mode-name {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-2);
  line-height: 1.2;
}
.mode-sub {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.mode:hover { background: rgba(23, 19, 14, 0.05); }
.mode:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.mode.is-on { background: var(--ink); }
.mode.is-on .mode-name { color: var(--paper-hi); }
.mode.is-on .mode-sub { color: #d9c79a; }

.mode-blurb {
  margin: 0 0 24px;
  max-width: 560px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* ---------- status ---------- */

.status {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--ink);
  border-left-width: 4px;
  background: var(--paper-hi);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  box-shadow: 3px 3px 0 rgba(23, 19, 14, 0.14);
}
.status.error { border-color: var(--red); color: var(--red-deep); background: #f6e2d8; }
.status .pulse {
  width: 8px;
  height: 8px;
  background: var(--red);
  animation: pulse 1.1s ease-in-out infinite;
  flex: none;
}
.status.error .pulse { background: var(--red); animation: none; }
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ---------- report ---------- */

.result { margin-top: 34px; }

.repo-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding-bottom: 9px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ink);
}
.repo-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: anywhere;
}
.repo-name img {
  border-radius: 50%;
  filter: grayscale(1) contrast(1.1);
  border: 1px solid var(--ink);
}
.repo-name .muted { color: var(--muted); font-size: 14px; font-weight: 400; font-family: var(--sans); }
.repo-name a { color: var(--ink); }
.repo-name a:hover { color: var(--red); text-decoration: none; }
.repo-meta {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.repo-meta b { color: var(--ink); font-weight: 600; }
.mode-flag {
  color: var(--red);
  border: 1px solid currentColor;
  padding: 1px 5px 0;
  letter-spacing: 0.1em;
}

/* ---------- project profile ---------- */

.profile-card {
  margin-bottom: 18px;
  padding: 12px 16px 13px;
  border: 1px solid var(--ink);
  border-left: 4px solid var(--ink);
  background: var(--paper-hi);
  box-shadow: 3px 3px 0 rgba(23, 19, 14, 0.13);
}
.profile-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--rule-2);
}
.profile-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-kind {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
}
.profile-desc {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 86ch;
}
.profile-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 26px;
}
.profile-facts li {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.profile-facts b {
  display: inline-block;
  margin-right: 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-note {
  margin: 9px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- file safety brief (download mode) ---------- */

.safety-card {
  margin-top: 20px;
  padding: 16px 20px 14px;
  border: 1.5px solid var(--ink);
  background: var(--paper-hi);
  box-shadow: 5px 5px 0 rgba(23, 19, 14, 0.15);
}
.safety-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.safety-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.safety-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.safety-list li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 92ch;
}
.safety-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ochre);
  font-weight: 600;
}
.safety-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--rule-2);
}
.safety-vt { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.safety-not {
  margin: 9px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* live file check */
.live-card {
  margin-top: 14px;
  padding: 12px 14px 10px;
  border: 1px solid var(--rule-2);
  background: var(--paper);
}

.live-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--rule);
}
.live-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.live-src {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid currentColor;
  padding: 1px 5px;
}
.live-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.live-beta {
  margin-left: 0;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ochre);
  border: 1px solid currentColor;
  padding: 1px 5px;
  line-height: 1.5;
  white-space: nowrap;
}
.live-progress {
  margin-left: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}

.live-note {
  margin: 8px 0 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 92ch;
}

.live-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.live-file { border-top: 1px solid var(--rule); padding-top: 8px; }
.live-file:first-child { border-top: 0; padding-top: 0; }

.live-name { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.live-name b { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.live-size { font-family: var(--mono); font-size: 10px; color: var(--dim); }

.live-chip {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 2px 5px;
  border: 1px solid currentColor;
  line-height: 1.5;
  white-space: nowrap;
}
.live-chip.threat { color: var(--red); }
.live-chip.clean { color: var(--green); }
.live-chip.pulse { color: var(--ochre); }
.live-chip.unknown { color: var(--muted); }
.live-chip.waiting { color: var(--dim); border-style: dashed; }
.live-chip.failed { color: var(--petrol); }

.live-summary {
  margin: 9px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  background: var(--paper-hi);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}
.live-summary.clean { border-color: var(--green); color: var(--green); }
.live-summary.threat { border-color: var(--red); color: var(--red-deep); }
.live-summary.pulse { border-color: var(--ochre); color: var(--ochre); }
.live-summary.unknown { color: var(--ink-2); }
.live-summary.failed { border-color: var(--petrol); color: var(--petrol); }

.live-result {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.live-file.threat .live-result { color: var(--red-deep); }

.live-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}
.live-links a { color: var(--petrol); }
.live-links a:hover { color: var(--red); }
.linkish {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.linkish:hover { color: var(--red); }

.live-retry { margin-top: 10px; }
.live-retry-note {
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--muted);
}
.live-foot {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}
.live-coverage,
.live-cache-note {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--muted);
}
.live-cache-note { color: var(--ochre); }
.live-empty {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
.live-actions .ghost { font-size: 11px; }


.scoreboard {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  border: 1.5px solid var(--ink);
  background: var(--paper-hi);
  box-shadow: 7px 7px 0 rgba(23, 19, 14, 0.16);
}

.card { background: transparent; }

.score-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 11px;
  padding: 18px 22px 22px;
}

.score-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.score-label span:last-child { color: var(--muted); }

.score-figure {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-family: var(--serif);
  font-size: clamp(66px, 8vw, 86px);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.055em;
  color: var(--ink);
  margin: 4px 0 2px;
}
.score-figure .score-of {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 7px;
  white-space: nowrap;
}

.stamp {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1.5px solid currentColor;
  outline: 1px solid currentColor;
  outline-offset: 2px;
  transform: rotate(-2.5deg);
  line-height: 1.4;
}

.gauge {
  position: relative;
  height: 16px;
  margin-top: 8px;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.gauge-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 0;
  background: currentColor;
  transition: width 1s cubic-bezier(.2, .8, .2, 1);
}
.gauge::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(23, 19, 14, 0.55) 0 1px, transparent 1px 10%),
    repeating-linear-gradient(90deg, rgba(23, 19, 14, 0.22) 0 1px, transparent 1px 5%);
  background-position: 0 100%, 0 100%;
  background-size: 100% 9px, 100% 4px;
  background-repeat: no-repeat;
}
.gauge-note {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  border-left: 1px dashed var(--rule-2);
}

.summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule);
}
.summary-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.summary-head .counts {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.summary-head .counts b { color: var(--red); font-weight: 600; }

.bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 28px;
}
.bar-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
}
.bar-name {
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-track {
  position: relative;
  height: 9px;
  background:
    repeating-linear-gradient(90deg, rgba(23, 19, 14, 0.28) 0 1px, transparent 1px 12.5%),
    var(--paper);
  border-bottom: 1px solid var(--rule-2);
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.85s cubic-bezier(.2, .8, .2, 1);
}
.bar-val {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  text-align: right;
  letter-spacing: 0.02em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
}
.actions .ghost { font-size: 10px; padding: 6px 9px; }

/* ---------- issues: numbered ledger ---------- */

.issues { margin-top: 34px; }
.issues-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 2px;
}
.issues-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.legend {
  display: flex;
  gap: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; }
.legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
}

.issue-list { display: block; }

.issue {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 14px;
  padding: 15px 10px 16px 8px;
  border-bottom: 1px solid var(--rule);
  transition: background 0.16s;
}
.issue:hover { background: rgba(189, 51, 16, 0.035); }
.issue-empty { display: block; }
.issue-empty p { max-width: 70ch; }

.issue-no {
  grid-row: 1 / -1;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding-top: 3px;
  letter-spacing: 0.03em;
}
.issue > :not(.issue-no) { grid-column: 2; }
.issue:hover .issue-no { color: var(--red); }

.issue-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.sev {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border: 1px solid currentColor;
  line-height: 1.5;
}
.sev.critical { color: var(--red); }
.sev.high { color: #7f5a06; }
.sev.medium { color: var(--petrol); }
.sev.low { color: var(--muted); }

.issue-cat {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.issue h3 {
  margin: 7px 0 3px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.issue p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 78ch;
}
.issue-actions { margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }

.issue-action {
  margin: 10px 0 0;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--ochre);
}
.action-label {
  display: block;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.issue-action p { color: var(--ink); }

.copy {
  appearance: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: var(--red);
  padding: 1px 0 2px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s;
}
.copy::after { content: " ↓"; }
.copy:hover { color: var(--red-deep); }

.show-all {
  margin: 18px auto 0;
  display: block;
}

.skipped {
  margin: 16px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--rule-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  max-width: 92ch;
}
.skipped b { color: var(--ink-2); font-weight: 600; }

/* ---------- star CTA ---------- */

.cta {
  margin-top: 30px;
  padding: 16px 18px;
  border: 1px dashed var(--rule-2);
  background: rgba(248, 242, 228, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
}
.cta p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  max-width: 640px;
}
.cta .ghost {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-hi);
  padding: 9px 14px;
  white-space: nowrap;
}
.cta .ghost:hover { background: var(--red); border-color: var(--red); }

/* ---------- modal / toast ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 19, 14, 0.45);
}
.modal-card {
  width: min(520px, 100%);
  border: 1.5px solid var(--ink);
  background: var(--paper-hi);
  padding: 24px;
  box-shadow: 9px 9px 0 rgba(23, 19, 14, 0.85);
}
.modal-card h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.lbl {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.modal-card input {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--rule-2);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  outline: none;
}
.modal-card input:focus { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.small {
  font-size: 11.5px;
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.55;
}
.modal-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.modal-row .small { margin: 0; }
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--paper-hi);
  padding: 9px 15px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  box-shadow: 4px 4px 0 rgba(189, 51, 16, 0.9);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 60;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- explainer ---------- */

.explain {
  margin-top: 84px;
  padding-top: 26px;
  border-top: 2px solid var(--ink);
  max-width: 1020px;
}
.explain h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 46px 0 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule);
}
.explain h2:first-child { margin-top: 0; }
.explain h2::before {
  content: "§";
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.ex {
  padding: 14px 16px 15px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.ex h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.ex h3 span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.03em;
}
.ex p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
  color: var(--ink-2);
  font-size: 14px;
  max-width: 820px;
}
.steps li {
  counter-increment: s;
  position: relative;
  padding: 10px 0 10px 48px;
  border-bottom: 1px dotted var(--rule);
}
.steps li::before {
  content: "0" counter(s);
  position: absolute;
  left: 0;
  top: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  letter-spacing: 0.05em;
}
.steps b { color: var(--ink); font-weight: 650; }

.privacy {
  color: var(--muted);
  font-size: 13.5px;
  max-width: 760px;
  margin: 0;
  padding-left: 16px;
  border-left: 2px solid var(--rule-2);
}

/* ---------- footer ---------- */

.foot {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px clamp(18px, 4vw, 46px) 34px;
  display: flex;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  border-top: 3px double var(--ink);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.foot a { color: var(--ink); border-bottom: 1px solid var(--red); }
.foot a:hover { text-decoration: none; color: var(--red); }

/* language blocks */
body.lang-ru [data-lang="en"] { display: none; }
body.lang-en [data-lang="ru"] { display: none; }

/* ---------- entrance choreography (one scenario, staggered) ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes rule-in {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}
@keyframes note-in {
  from { opacity: 0; transform: translateY(-10px) rotate(-1.5deg); }
  to { opacity: 1; transform: rotate(-0.5deg); }
}

.hero-main > * {
  animation: rise 0.62s cubic-bezier(.2, .75, .25, 1) both;
}
.hero-main > *:nth-child(1) { animation-delay: 0.04s; }
.hero-main > *:nth-child(2) { animation-delay: 0.10s; }
.hero-main > *:nth-child(3) { animation-delay: 0.17s; }
.hero-main > *:nth-child(4) { animation-delay: 0.24s; }
.hero-main > *:nth-child(5) { animation-delay: 0.31s; }
.hero-main > *:nth-child(6) { animation-delay: 0.38s; }
.hero-main > *:nth-child(7) { animation-delay: 0.45s; }
.hero-main > *:nth-child(8) { animation-delay: 0.5s; }

.margin-note {
  transform-origin: left top;
  animation: note-in 0.55s 0.42s cubic-bezier(.2, .8, .25, 1) both;
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-main { max-width: none; }
  .margin-note {
    margin-top: 6px;
    max-width: 520px;
    display: grid;
    grid-template-columns: 1fr;
  }
  .scoreboard { grid-template-columns: 258px minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .scoreboard { grid-template-columns: 1fr; }
  .summary-card { border-left: 0; border-top: 1px dashed var(--rule-2); }
  .bars { grid-template-columns: 1fr; }
  .repo-bar { align-items: flex-start; flex-direction: column; }
  .issue { grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; padding: 14px 4px 15px 4px; }
  .issue h3 { font-size: 17px; }
}

@media (max-width: 640px) {
  .search { grid-template-columns: 1fr; }
  .search .primary {
    min-height: 48px;
    border-left: 0;
    border-top: 1.5px solid var(--ink);
    padding: 0 16px;
  }
  .grid { grid-template-columns: 1fr; }
  .modes { display: grid; grid-template-columns: 1fr; width: 100%; }
  .mode { border-left: 0; border-top: 1px solid var(--rule-2); width: auto; }
  .mode:first-child { border-top: 0; }
  .profile-facts { grid-template-columns: 1fr; }
  .safety-card { padding: 14px 15px 12px; }
}

@media (max-width: 560px) {
  .top { padding-bottom: 12px; }
  .brand-text::after { content: ""; }
  .rate { display: none; }
  h1 { letter-spacing: -0.025em; }
  .kicker { font-size: 9.5px; letter-spacing: 0.11em; }
  .scoreboard { box-shadow: 4px 4px 0 rgba(23, 19, 14, 0.16); }
  .score-card { padding: 16px 18px 18px; }
  .summary-card { padding: 16px 18px; }
  .bar-row { grid-template-columns: 96px minmax(0, 1fr) 40px; gap: 8px; }
  .explain { margin-top: 60px; }
  .explain h2 { font-size: 21px; margin-top: 36px; }
  .foot { flex-direction: column; }
  .live-card { padding: 11px 11px 9px; }
  .live-progress { margin-left: 0; }
  .live-chip { font-size: 9px; }
  .live-links { gap: 10px; }
  .live-actions { display: grid; grid-template-columns: 1fr; }
  .live-actions .ghost { text-align: center; }
}

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