/* ==========================================================================
   CheckUrl.uz — styles
   Paper + ink + one cobalt accent. Verdict colours are used only for results.
   ========================================================================== */

/* ---------- Fonts (self-hosted, OFL — see /fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  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: 400 700;
  font-display: swap;
  src: url("/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 700;
  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: 400 600;
  font-display: swap;
  src: url("/fonts/jbmono-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: 400 600;
  font-display: swap;
  src: url("/fonts/jbmono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jbmono-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;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f3f0e8;
  --paper-2: #e9e5d9;
  --card: #fbfaf6;
  --ink: #16181b;
  --ink-2: #43474e;
  --ink-3: #62666d;
  --rule: #d6d1c3;
  --accent: #2b3fd6;
  --accent-ink: #ffffff;
  --accent-soft: #dfe3fb;
  --safe: #146c3c;
  --safe-soft: #dcede2;
  --warn: #8f5b00;
  --warn-soft: #f4e6c9;
  --danger: #b0281b;
  --danger-soft: #f6dcd7;
  --unknown: #5a5f67;
  --unknown-soft: #e6e3dc;
  --shadow: 0 1px 0 rgba(22, 24, 27, 0.04), 0 18px 40px -24px rgba(22, 24, 27, 0.35);
  --grain: 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --hdr-h: 64px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #111315;
  --paper-2: #1a1d20;
  --card: #181b1e;
  --ink: #ece8df;
  --ink-2: #c4c0b7;
  --ink-3: #9d998f;
  --rule: #2d3136;
  --accent: #93a0ff;
  --accent-ink: #0c0f22;
  --accent-soft: #252b52;
  --safe: #5fd394;
  --safe-soft: #132a1d;
  --warn: #f2bd57;
  --warn-soft: #2f2612;
  --danger: #ff8270;
  --danger-soft: #361a15;
  --unknown: #aaa69c;
  --unknown-soft: #24272b;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  --grain: 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-feature-settings: "zero" 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s;
}

.skip:focus {
  top: 12px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  border: 1.5px solid transparent;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:active:not([disabled]) {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-lg {
  padding: 15px 22px;
  font-size: 1rem;
}

.btn-sm {
  padding: 7px 11px;
  font-size: 0.85rem;
  border-radius: 7px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover:not([disabled]) {
  background: color-mix(in srgb, var(--accent) 86%, var(--ink));
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover:not([disabled]) {
  background: color-mix(in srgb, var(--ink) 85%, var(--paper));
}

.btn-ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink);
}

.btn-ghost:hover:not([disabled]) {
  border-color: var(--ink);
}

.btn-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  transition: border-color 0.15s, background-color 0.15s;
}

.icon-btn:hover {
  border-color: var(--ink);
}

/* ---------- Header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

@supports (background: color-mix(in srgb, red 50%, blue)) {
  .hdr {
    background: color-mix(in srgb, var(--paper) 94%, transparent);
  }
}

.hdr-in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--hdr-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
}

.brand-mark .m-oct {
  fill: var(--ink);
}

.brand-mark .m-chk {
  fill: none;
  stroke: var(--paper);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-tld {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav a {
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.94rem;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}

.nav a:hover {
  color: var(--ink);
  background: var(--paper-2);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.nav .nav-bot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 6px;
  border: 1px solid var(--rule);
  color: var(--ink);
}

.hdr-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 9px;
}

.lang a {
  min-width: 34px;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.lang a:hover {
  color: var(--ink);
}

.lang a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
}

.menu-btn {
  display: none;
}

.theme-btn .i-moon {
  display: none;
}

[data-theme="dark"] .theme-btn .i-sun {
  display: none;
}

[data-theme="dark"] .theme-btn .i-moon {
  display: block;
}

/* ---------- Generic blocks ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.section {
  padding: clamp(56px, 8vw, 104px) 0;
  border-top: 1px solid var(--rule);
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 20px 48px;
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.sec-no {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-3);
}

.sec-title {
  margin-top: 10px;
  font-size: clamp(1.9rem, 1.25rem + 2.3vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.sec-lede {
  color: var(--ink-2);
  font-size: 1.05rem;
  max-width: 54ch;
}

.note {
  color: var(--ink-3);
  font-size: 0.86rem;
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--v-soft, var(--paper-2));
  color: var(--v, var(--ink-2));
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.v-safe {
  --v: var(--safe);
  --v-soft: var(--safe-soft);
}

.v-warn {
  --v: var(--warn);
  --v-soft: var(--warn-soft);
}

.v-danger {
  --v: var(--danger);
  --v-soft: var(--danger-soft);
}

.v-unknown,
.v-pending {
  --v: var(--unknown);
  --v-soft: var(--unknown-soft);
}

/* ---------- Hero + scanner ---------- */
.hero {
  padding: clamp(36px, 6vw, 88px) 0 clamp(36px, 5vw, 64px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.hero-title {
  margin: 18px 0 22px;
  font-size: clamp(2.5rem, 1.15rem + 5.2vw, 5.1rem);
  line-height: 0.96;
  letter-spacing: -0.048em;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-lede {
  max-width: 36ch;
  color: var(--ink-2);
  font-size: clamp(1.04rem, 0.98rem + 0.3vw, 1.18rem);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 520px;
  margin-top: 34px;
  border-top: 1px solid var(--ink);
}

.fact {
  padding: 14px 16px 0 0;
}

.fact + .fact {
  padding-left: 16px;
  border-left: 1px solid var(--rule);
}

.fact b {
  display: block;
  font-family: var(--font);
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.fact span {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 0.86rem;
  line-height: 1.35;
}

.scanner {
  padding: 18px 20px 20px;
  box-shadow: var(--shadow);
}

.scanner-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

.tabs {
  display: flex;
  gap: 20px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 8px 1px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 0.97rem;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.ticket {
  padding-bottom: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.74rem;
  white-space: nowrap;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  background: var(--paper);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field.is-invalid {
  border-color: var(--danger);
}

.field input {
  flex: 1;
  min-width: 0;
  padding: 15px 14px;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
}

.field input::placeholder {
  color: var(--ink-3);
  font-family: var(--font);
  font-weight: 400;
}

.field-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.82rem;
}

.field-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.field-msg {
  min-height: 1.5em;
  margin-top: 8px;
  color: var(--danger);
  font-size: 0.9rem;
  line-height: 1.45;
}

.field-msg:empty {
  min-height: 0;
  margin: 0;
}

.scanner-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.scanner-actions .btn-primary {
  min-width: 170px;
}

/* live URL anatomy */
.anatomy {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

.anatomy-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--ink-3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.anatomy-url {
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.75;
  word-break: break-all;
}

.seg {
  border-radius: 4px;
}

.seg-scheme,
.seg-path,
.seg-query,
.seg-hash {
  color: var(--ink-3);
}

.seg-sub {
  color: var(--ink-2);
}

.seg-user {
  padding: 1px 3px;
  background: var(--danger-soft);
  color: var(--danger);
}

.seg-reg {
  padding: 1px 5px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

.seg-port {
  color: var(--warn);
}

.anatomy-domain {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.88rem;
}

.anatomy-domain b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
}

.signals {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.sig {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 9px;
  color: var(--ink-2);
  font-size: 0.89rem;
  line-height: 1.45;
}

.sig::before {
  content: "";
  width: 8px;
  height: 8px;
  margin: 0.42em 0 0 3px;
  border-radius: 2px;
  background: var(--ink-3);
  transform: rotate(45deg);
}

.sig-ok::before {
  background: var(--safe);
}

.sig-info::before {
  background: var(--ink-3);
}

.sig-warn::before {
  background: var(--warn);
}

.sig-danger::before {
  background: var(--danger);
}

.sig-danger {
  color: var(--ink);
}

/* file pane */
.drop {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 30px 18px;
  border: 1.5px dashed var(--ink-3);
  border-radius: 12px;
  background: var(--paper);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.drop:hover,
.drop.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop .icon {
  width: 30px;
  height: 30px;
  color: var(--ink-2);
}

.drop-title {
  font-weight: 600;
}

.drop-sub {
  color: var(--ink-3);
  font-size: 0.9rem;
}

.drop-sub u {
  color: var(--accent);
  text-underline-offset: 3px;
}

.file-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  background: var(--paper);
}

.file-card .icon {
  width: 26px;
  height: 26px;
}

.file-name {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  color: var(--ink-3);
  font-size: 0.82rem;
}

.privacy {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--warn-soft);
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.45;
}

.privacy .icon {
  margin-top: 2px;
  color: var(--warn);
}

/* ---------- Report area ---------- */
.report-area {
  scroll-margin-top: calc(var(--hdr-h) + 16px);
}

.report-area:empty {
  display: none;
}

.report-area:focus {
  outline: none;
}

.report {
  margin-bottom: clamp(36px, 5vw, 64px);
  padding: clamp(18px, 3vw, 30px);
  box-shadow: var(--shadow);
  animation: cu-rise 0.35s ease-out both;
}

@keyframes cu-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.rep-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rep-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px 0 20px;
}

.seal {
  width: 104px;
  height: 104px;
  color: var(--v);
  animation: cu-stamp 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}

.seal .s-out {
  fill: var(--v-soft);
  stroke: var(--v);
  stroke-width: 2.5;
}

.seal .s-in {
  fill: none;
  stroke: var(--v);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
}

.seal .s-ico {
  fill: none;
  stroke: var(--v);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes cu-stamp {
  from {
    opacity: 0;
    transform: scale(1.35) rotate(-14deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(-4deg);
  }
}

.verdict-title {
  color: var(--v);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.verdict-text {
  margin-top: 10px;
  color: var(--ink-2);
  max-width: 62ch;
}

.target {
  display: grid;
  gap: 4px;
  margin: 4px 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.target-label {
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.target-value {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-all;
}

.strip-wrap {
  margin-bottom: 18px;
}

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
}

.tick {
  width: 6px;
  height: 26px;
  border-radius: 2px;
  background: var(--rule);
  animation: cu-tick 0.4s ease-out both;
  animation-delay: calc(var(--i, 0) * 7ms);
}

@keyframes cu-tick {
  from {
    transform: scaleY(0.2);
    opacity: 0;
  }
}

.t-mal {
  background: var(--danger);
}

.t-sus {
  background: var(--warn);
}

.t-ok {
  background: var(--safe);
}

.t-und {
  background: var(--ink-3);
  opacity: 0.4;
}

.t-oth {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--ink-3);
  opacity: 0.6;
}

.strip-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.8rem;
}

.strip-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.strip-legend i {
  width: 6px;
  height: 12px;
  border-radius: 2px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.stat {
  padding: 12px 12px 12px 0;
}

.stat + .stat {
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}

.stat b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--ink-3);
  font-size: 0.82rem;
}

.stat.s-mal b {
  color: var(--danger);
}

.stat.s-sus b {
  color: var(--warn);
}

.stat.s-ok b {
  color: var(--safe);
}

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 14px 24px;
  margin: 18px 0 0;
}

.meta dt {
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta dd {
  font-size: 0.93rem;
  word-break: break-word;
}

.meta dd.mono {
  font-size: 0.86rem;
  word-break: break-all;
}

.stale {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--warn-soft);
  color: var(--ink-2);
  font-size: 0.9rem;
}

.rep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.rep-sub {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.rep-sub-title {
  margin-bottom: 12px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.eng-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.2;
}

.chip:hover {
  border-color: var(--ink);
}

.chip[aria-pressed="true"],
.chip:has(input:checked) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.chip .n {
  font-family: var(--mono);
  font-size: 0.78rem;
  opacity: 0.75;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
}

.search:focus-within {
  border-color: var(--accent);
}

.search input {
  width: 190px;
  padding: 7px 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 0.88rem;
}

.eng-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  column-gap: 28px;
  max-height: 460px;
  overflow: auto;
  border-top: 1px solid var(--rule);
}

.eng {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}

.eng-name {
  font-weight: 500;
}

.eng-res {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: right;
  word-break: break-word;
}

.eng.c-mal .eng-res {
  color: var(--danger);
}

.eng.c-sus .eng-res {
  color: var(--warn);
}

.eng.c-ok .eng-res {
  color: var(--safe);
}

.eng-empty {
  padding: 16px 0;
  color: var(--ink-3);
}

/* progress */
.progress-card {
  margin-bottom: clamp(36px, 5vw, 64px);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow);
}

.prog-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}

.prog-title {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem);
  letter-spacing: -0.025em;
}

.prog-target {
  margin-top: 6px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.86rem;
  word-break: break-all;
}

.timer {
  font-family: var(--mono);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.timer small {
  display: block;
  margin-top: 6px;
  color: var(--ink-3);
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 16px;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding-top: 12px;
  color: var(--ink-3);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
}

.step::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 2px;
  background: var(--rule);
}

.step.is-done {
  color: var(--ink-2);
}

.step.is-done::before {
  background: var(--ink);
}

.step.is-active {
  color: var(--ink);
  font-weight: 600;
}

.step.is-active::before {
  background: linear-gradient(90deg, var(--accent) 0 40%, var(--accent-soft) 40% 100%);
  background-size: 250% 100%;
  animation: cu-bar 1.4s linear infinite;
}

@keyframes cu-bar {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -150% 0;
  }
}

.prog-msg {
  color: var(--ink-2);
  font-size: 0.93rem;
}

.prog-msg.is-quota {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--warn-soft);
}

.prog-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 0.86rem;
}

.alert {
  margin-bottom: clamp(36px, 5vw, 64px);
  padding: 20px 22px;
  border-left: 4px solid var(--v, var(--danger));
}

.alert h2 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}

.alert p {
  margin-top: 6px;
  color: var(--ink-2);
}

.alert .rep-actions {
  margin-top: 14px;
}

/* ---------- History ---------- */
.history {
  padding-bottom: clamp(40px, 6vw, 72px);
}

.hist-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.hist-head h2 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.hist-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.hist-item button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  text-align: left;
}

.hist-item button:hover .hist-target {
  text-decoration: underline;
}

.hist-item .icon {
  color: var(--ink-3);
}

.hist-target {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hist-time {
  color: var(--ink-3);
  font-size: 0.8rem;
  white-space: nowrap;
}

.hist-empty {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.92rem;
}

/* ---------- How it works ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}

.how-step {
  padding: 22px 26px 0 0;
}

.how-step + .how-step {
  padding-left: 26px;
  border-left: 1px solid var(--rule);
}

.how-num {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.how-step h3 {
  margin: 14px 0 10px;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.how-step p {
  color: var(--ink-2);
}

.source-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 40px;
  padding: 18px 20px;
  max-width: 820px;
}

.source-note .icon {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent);
}

.source-note p {
  color: var(--ink-2);
}

/* ---------- Quiz + checklist ---------- */
.practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.quiz {
  padding: clamp(18px, 3vw, 28px);
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.quiz-dots {
  display: flex;
  gap: 5px;
}

.quiz-dots i {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: var(--rule);
}

.quiz-dots i.is-ok {
  background: var(--safe);
}

.quiz-dots i.is-bad {
  background: var(--danger);
}

.quiz-dots i.is-now {
  background: var(--ink);
}

.quiz-count {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.quiz-ctx {
  font-size: 1.08rem;
  line-height: 1.5;
}

.quiz-q {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiz-opts {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 0;
  list-style: none;
}

.qopt {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  text-align: left;
  transition: border-color 0.15s, background-color 0.15s;
}

.qopt:hover:not([disabled]) {
  border-color: var(--ink);
}

.qopt[disabled] {
  cursor: default;
}

.qopt-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--ink-3);
  border-radius: 6px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.qopt-url {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-all;
}

.qopt-why {
  grid-column: 2;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.87rem;
  line-height: 1.45;
}

.qopt.is-real {
  border-color: var(--safe);
  background: var(--safe-soft);
}

.qopt.is-real .qopt-mark {
  border-color: var(--safe);
  background: var(--safe);
  color: var(--card);
}

.qopt.is-wrong {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.qopt.is-wrong .qopt-mark {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--card);
}

.quiz-feedback {
  margin-top: 14px;
  font-weight: 600;
}

.quiz-feedback.is-ok {
  color: var(--safe);
}

.quiz-feedback.is-bad {
  color: var(--danger);
}

.quiz-nav {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.quiz-final {
  text-align: left;
}

.quiz-score {
  font-family: var(--mono);
  font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.quiz-final p {
  margin: 12px 0 18px;
  color: var(--ink-2);
}

.checklist {
  padding: clamp(18px, 3vw, 26px);
}

.checklist h3 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.checklist > p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.93rem;
}

.check-meter {
  height: 4px;
  margin: 16px 0 6px;
  border-radius: 2px;
  background: var(--rule);
  overflow: hidden;
}

.check-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--safe);
  transition: width 0.25s;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li + li {
  border-top: 1px solid var(--rule);
}

.check-list label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  font-size: 0.93rem;
  line-height: 1.45;
}

.check-list input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border: 1.5px solid var(--ink-3);
  border-radius: 6px;
  background: var(--paper) no-repeat center / 14px;
  cursor: pointer;
}

.check-list input:checked {
  border-color: var(--safe);
  background-color: var(--safe);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E");
}

.check-list input:checked + span {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.faq-side {
  position: sticky;
  top: calc(var(--hdr-h) + 24px);
}

.faq-side .sec-lede {
  margin-top: 16px;
}

.faq-side .btn {
  margin-top: 22px;
}

.faq-list {
  border-top: 1px solid var(--ink);
}

.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-item summary {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: start;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.04rem;
  line-height: 1.4;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover .faq-q {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.faq-n {
  padding-top: 0.2em;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.faq-item summary .icon {
  margin-top: 2px;
  transition: transform 0.2s;
}

.faq-item[open] summary .icon {
  transform: rotate(45deg);
}

.faq-a {
  padding: 0 32px 20px 3.05rem;
  color: var(--ink-2);
  animation: cu-fade 0.25s ease-out;
}

.faq-a p + p {
  margin-top: 10px;
}

@keyframes cu-fade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---------- Telegram band ---------- */
.band {
  padding: clamp(40px, 6vw, 64px) 0;
  background: var(--ink);
  color: var(--paper);
}

.band-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: center;
}

.band h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  letter-spacing: -0.03em;
}

.band p {
  margin-top: 10px;
  color: color-mix(in srgb, var(--paper) 75%, var(--ink));
  max-width: 56ch;
}

.band .btn {
  background: var(--paper);
  color: var(--ink);
}

.band .btn:hover {
  background: color-mix(in srgb, var(--paper) 88%, var(--ink));
}

.band .kicker {
  color: color-mix(in srgb, var(--paper) 65%, var(--ink));
}

/* ---------- Footer ---------- */
.ftr {
  padding: 44px 0 26px;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.92rem;
}

.ftr-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.ftr-about p {
  margin-top: 12px;
  max-width: 40ch;
}

.ftr h2 {
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ftr ul {
  display: grid;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.ftr a {
  text-decoration: none;
}

.ftr a:hover {
  text-decoration: underline;
}

.ftr-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.82rem;
}

/* ---------- Contact ---------- */
.page-hero {
  padding: clamp(36px, 6vw, 80px) 0 clamp(24px, 4vw, 40px);
}

.page-hero .hero-title {
  font-size: clamp(2.3rem, 1.2rem + 4.2vw, 4.2rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
  padding-bottom: clamp(56px, 8vw, 104px);
}

.cform {
  padding: clamp(18px, 3vw, 30px);
  box-shadow: var(--shadow);
}

.cform fieldset {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.cform legend,
.flabel {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topics .chip {
  position: relative;
  cursor: pointer;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.topics .chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.topics .chip:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.frow {
  margin-bottom: 18px;
}

.finput {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--ink-3);
  border-radius: 10px;
  outline: none;
  background: var(--paper);
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.finput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.finput[aria-invalid="true"] {
  border-color: var(--danger);
}

textarea.finput {
  min-height: 150px;
  resize: vertical;
  line-height: 1.5;
}

.finput.mono {
  font-size: 0.95rem;
}

.fmeta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  min-height: 1.4em;
  font-size: 0.85rem;
}

.ferr {
  color: var(--danger);
}

.fcount {
  margin-left: auto;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.78rem;
  white-space: nowrap;
}

.fcount.is-near {
  color: var(--warn);
}

.fhint {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 0.85rem;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 6px;
}

.form-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--ink);
  font-size: 0.92rem;
}

.sent {
  padding: clamp(22px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.sent .seal {
  margin-bottom: 18px;
}

.sent h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  letter-spacing: -0.03em;
}

.sent p {
  margin: 10px 0 20px;
  color: var(--ink-2);
}

.side {
  display: grid;
  gap: 16px;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin-bottom: 12px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.dlink {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}

.dlink + .dlink {
  border-top: 1px solid var(--rule);
}

.dlink-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--paper-2);
}

.dlink-ico .icon {
  width: 18px;
  height: 18px;
}

.dlink b {
  display: block;
  font-size: 0.95rem;
}

.dlink span {
  display: block;
  overflow: hidden;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dlink-acts {
  display: flex;
  gap: 6px;
}

.dev {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.mono-seal {
  width: 72px;
  height: 72px;
}

.mono-seal .s-out {
  fill: var(--ink);
}

.mono-seal text {
  fill: var(--paper);
  font-family: var(--font);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -1px;
}

.dev-name {
  font-size: 1.1rem;
}

.dev-role {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
}

.dev-bio {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.tips {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tip;
}

.tips li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  color: var(--ink-2);
  font-size: 0.92rem;
  counter-increment: tip;
}

.tips li::before {
  content: "0" counter(tip);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding-top: 0.15em;
}

/* ---------- 404 ---------- */
.nf {
  padding: clamp(48px, 9vw, 120px) 0;
}

.nf-code {
  font-family: var(--mono);
  font-size: clamp(4rem, 3rem + 6vw, 8rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--accent);
}

.nf h1 {
  margin: 18px 0 12px;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem);
  letter-spacing: -0.035em;
}

.nf p {
  max-width: 52ch;
  color: var(--ink-2);
}

.nf-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 620px;
  margin-top: 28px;
}

.nf-form .field {
  flex: 1 1 280px;
}

.nf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- AI note ---------- */
.ai-note {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--paper);
}

.ai-note .icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
}

.ai-note.is-loading .icon {
  animation: cu-spin 1.6s linear infinite;
}

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

.ai-head {
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-text {
  margin-top: 4px;
  font-size: 1rem;
  line-height: 1.55;
}

.ai-foot,
.ai-loading {
  color: var(--ink-3);
  font-size: 0.82rem;
}

.ai-foot {
  margin-top: 6px;
}

/* ---------- install card ---------- */
.install-card {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 250;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  max-width: 460px;
  margin-inline: auto;
  padding: 14px;
  box-shadow: var(--shadow);
  animation: cu-rise 0.3s ease-out both;
}

.install-card .brand-mark {
  width: 34px;
  height: 34px;
}

.install-title {
  font-weight: 700;
}

.install-text {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.45;
}

.install-acts {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---------- home teaser + faq buttons ---------- */
.teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
}

.teaser .sec-lede {
  margin-top: 12px;
}

.faq-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.faq-side .faq-btns .btn {
  margin-top: 0;
}

/* ---------- how it works ---------- */
.demo-sec {
  padding-bottom: clamp(40px, 6vw, 72px);
}

.demo {
  padding: clamp(14px, 2.5vw, 24px);
  box-shadow: var(--shadow);
}

.demo-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo-samples,
.demo-ctrl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.demo-stage {
  display: grid;
  place-items: center;
  min-height: 240px;
  margin: 18px 0 14px;
  padding: clamp(14px, 3vw, 28px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}

.dv {
  width: 100%;
  max-width: 760px;
  animation: cu-fade 0.3s ease-out both;
}

.urlbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  background: var(--card);
  font-family: var(--mono);
  font-size: clamp(0.82rem, 0.7rem + 0.6vw, 1.05rem);
  word-break: break-all;
}

.urlbar .icon {
  color: var(--ink-3);
}

.caret {
  width: 2px;
  height: 1.2em;
  margin-left: -6px;
  background: var(--accent);
  animation: cu-blink 1s steps(2) infinite;
}

@keyframes cu-blink {
  50% {
    opacity: 0;
  }
}

.pop {
  animation: cu-pop 0.35s ease-out both;
  animation-delay: calc(var(--i, 0) * 180ms);
}

@keyframes cu-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.dv-parse .anatomy-url {
  font-size: clamp(0.85rem, 0.75rem + 0.5vw, 1.05rem);
}

.dv-id {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.dv-id code {
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: clamp(0.78rem, 0.7rem + 0.4vw, 0.95rem);
  word-break: break-all;
}

.id-src {
  background: var(--paper-2);
  color: var(--ink-2);
}

.id-out {
  background: var(--ink);
  color: var(--paper);
  min-height: 2.2em;
}

.id-arrow .icon {
  transform: rotate(90deg);
  color: var(--accent);
}

.net-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.net-node {
  display: grid;
  justify-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: clamp(76px, 18vw, 120px);
  padding: 12px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: var(--card);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

.net-node .icon {
  width: 22px;
  height: 22px;
}

.n-srv {
  border-color: var(--accent);
  color: var(--accent);
}

.net-line {
  position: relative;
  flex: 1 1 auto;
  height: 2px;
  min-width: 20px;
  background: repeating-linear-gradient(90deg, var(--ink-3) 0 6px, transparent 6px 11px);
}

.net-dot {
  position: absolute;
  top: -5px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  animation: cu-travel 1.4s ease-in-out 0.2s both;
}

.net-dot.d2 {
  animation-delay: 1.2s;
}

.still .net-dot {
  left: calc(100% - 12px);
  animation: none;
}

@keyframes cu-travel {
  from {
    left: 0;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  to {
    left: calc(100% - 12px);
    opacity: 1;
  }
}

.net-key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 600;
}

.net-key .icon {
  color: var(--safe);
}

.eng-label {
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.eng-grid {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 4px;
  max-width: 560px;
  margin-inline: auto;
}

.eng-grid .cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--rule);
  transition: background-color 0.2s, transform 0.2s;
}

.eng-grid.is-queued .cell {
  animation: cu-pulse 1s ease-in-out infinite;
}

@keyframes cu-pulse {
  50% {
    opacity: 0.4;
  }
}

.eng-grid .cell.t-mal {
  background: var(--danger);
}

.eng-grid .cell.t-sus {
  background: var(--warn);
}

.eng-grid .cell.t-ok {
  background: var(--safe);
}

.eng-grid .cell.t-und {
  background: var(--ink-3);
  opacity: 0.45;
}

.dv-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 24px;
}

.mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 0.86rem;
}

.mini-stats b {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--ink);
}

.mini-stats .s-mal b {
  color: var(--danger);
}

.mini-stats .s-sus b {
  color: var(--warn);
}

.mini-stats .s-ok b {
  color: var(--safe);
}

.demo-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-steps button {
  display: grid;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 10px 2px 0;
  border: 0;
  border-top: 3px solid var(--rule);
  background: none;
  color: var(--ink-3);
  font-size: 0.8rem;
  line-height: 1.3;
  text-align: left;
}

.demo-steps button:hover {
  color: var(--ink);
}

.demo-steps button.is-done {
  border-top-color: var(--ink);
  color: var(--ink-2);
}

.demo-steps button.is-active {
  border-top-color: var(--accent);
  color: var(--ink);
  font-weight: 600;
}

.ds-n {
  font-family: var(--mono);
  font-size: 0.72rem;
}

.demo-caption {
  min-height: 3em;
  margin-top: 14px;
  color: var(--ink-2);
}

.stage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.stage-list li {
  padding: 20px 24px 22px 0;
  border-bottom: 1px solid var(--rule);
}

.stage-list h2 {
  margin: 10px 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.stage-list p:not(.how-num) {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.how-facts {
  margin-top: 24px;
}

.outro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: clamp(32px, 5vw, 56px);
  padding: clamp(18px, 3vw, 28px);
}

.outro h2 {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  letter-spacing: -0.03em;
}

.outro p {
  margin-top: 6px;
  color: var(--ink-2);
  max-width: 56ch;
}

/* ---------- guide ---------- */
.rules-sec {
  padding-bottom: clamp(40px, 6vw, 72px);
}

.rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: rule;
  border-top: 1px solid var(--ink);
}

.rules li {
  padding: 16px 20px 18px 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  counter-increment: rule;
}

.rules li::before {
  content: "0" counter(rule);
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.scam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 16px;
  margin-top: 24px;
}

.scam {
  padding: 20px;
}

.scam-no {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.scam h3 {
  margin: 6px 0 14px;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.scam dt {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scam dd {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 0.93rem;
}

.scam dd ul {
  margin: 0;
  padding-left: 18px;
}

.scam dd li + li {
  margin-top: 3px;
}

/* ---------- author ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.about-role {
  margin-top: -6px;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
}

.about-grid .note {
  margin-top: 8px;
}

.about-bio {
  max-width: 62ch;
  margin: 20px 0 6px;
  color: var(--ink-2);
  font-size: 1.04rem;
}

.about-bio p + p {
  margin-top: 12px;
}

.about-card {
  padding: 22px;
}

.about-card .mono-seal {
  width: 88px;
  height: 88px;
  margin-bottom: 14px;
}

.about-card h2 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.about-card .meta {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.dev-name a {
  text-decoration: none;
}

.dev-name a:hover {
  text-decoration: underline;
}

/* ---------- stats (admin) ---------- */
.stats-login {
  display: grid;
  gap: 10px;
  max-width: 420px;
  padding: 20px;
}

.stats-login .field input {
  font-family: var(--mono);
}

#statsOut {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin: 24px 0 64px;
}

.stats-card {
  padding: 18px;
}

.stats-card h2 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.stats-table th,
.stats-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-weight: 400;
}

.stats-table td {
  font-family: var(--mono);
  text-align: right;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 300;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav a {
    padding: 8px 8px;
    font-size: 0.9rem;
  }
}

@media (max-width: 980px) {
  :root {
    --hdr-h: 58px;
  }

  .menu-btn {
    display: inline-grid;
  }

  .nav {
    position: absolute;
    top: var(--hdr-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 6px var(--gutter) 16px;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 13px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--rule);
    font-size: 1rem;
  }

  .nav a:hover {
    background: transparent;
  }

  .nav .nav-bot {
    margin: 12px 0 0;
    justify-content: center;
    border-radius: 9px;
  }

  .hdr-tools {
    margin-left: auto;
  }

  .hero-grid,
  .practice-grid,
  .faq-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-side {
    position: static;
  }

  .sec-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .hero-lede {
    max-width: 52ch;
  }
}

@media (max-width: 760px) {
  .how-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .how-step,
  .how-step + .how-step {
    padding: 20px 0;
    border-left: 0;
  }

  .how-step + .how-step {
    border-top: 1px solid var(--rule);
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

  .stat:nth-child(n + 4) {
    border-top: 1px solid var(--rule);
  }

  .band-in,
  .ftr-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-list,
  .demo-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .eng-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .search {
    width: 100%;
    margin-left: 0;
  }

  .search input {
    width: 100%;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 14px;
  }
}

@media (max-width: 520px) {
  .brand-word {
    font-size: 1.02rem;
  }

  .lang a {
    min-width: 30px;
    padding: 5px 5px;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    border-top: 0;
  }

  .fact,
  .fact + .fact {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .fact span {
    margin: 0;
  }

  .scanner {
    padding: 14px 14px 16px;
  }

  .kbd-hint {
    display: none;
  }

  .scanner-actions .btn-primary {
    width: 100%;
  }

  .rep-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .seal {
    width: 84px;
    height: 84px;
  }

  .hist-item button {
    grid-template-columns: 18px minmax(0, 1fr) auto;
  }

  .hist-time {
    display: none;
  }

  .faq-a {
    padding-left: 0;
    padding-right: 0;
  }

  .faq-item summary {
    grid-template-columns: 2rem minmax(0, 1fr) 22px;
  }

  .dlink {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .stage-list,
  .demo-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .demo-steps button {
    grid-template-columns: 2rem minmax(0, 1fr);
    padding: 8px 2px;
    border-top: 0;
    border-left: 3px solid var(--rule);
    padding-left: 10px;
  }

  .demo-steps button.is-done {
    border-left-color: var(--ink);
  }

  .demo-steps button.is-active {
    border-left-color: var(--accent);
  }

  .net-node {
    width: 74px;
    padding: 10px 4px;
    font-size: 0.72rem;
  }

  .demo-top {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-ctrl {
    justify-content: space-between;
  }

  .dlink-acts {
    grid-column: 2;
  }
}

@media (max-width: 440px) {
  .field-btn-text {
    display: none;
  }

  .field-btn {
    padding: 8px;
  }
}

@media (max-width: 400px) {
  .ticket {
    display: none;
  }

  .tabs {
    gap: 16px;
  }
}

@media (hover: none) {
  .kbd-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .hdr,
  .band,
  .ftr,
  .scanner,
  .history,
  .rep-actions,
  .eng-tools {
    display: none !important;
  }

  body {
    background: #fff;
  }
}
