/* ==========================================================================
   Академическая вычитка — система: бумажный грунт, Literata + Golos Text,
   прямой угол, один акцент. Направление: type-only statement (taste-skill).
   ========================================================================== */

:root {
  --paper: #f5f6f3;
  --surface: #ffffff;
  --surface-quiet: #ecefe8;
  --ink: #11161a;
  --ink-soft: #38424c;
  --muted: #5f6871;
  --line: #dbe0d6;
  --line-strong: #c4cbbc;
  --navy: #1e3a5f;
  --navy-dark: #162c48;
  --green: #1f7a4d;
  --accent: #16a34a;
  --alert-bg: #fbeae6;
  --alert-ink: #8f2c22;

  --heat-low: #3e8e5a;
  --heat-mid: #c9a227;
  --heat-high: #c4622d;
  --heat-crit: #a63028;
  --heat-skip: #d8dbd2;

  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-text: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(1.9rem, 3.2vw, 2.75rem);
  --step-5: clamp(2.4rem, 5.2vw, 4.4rem);

  /* Иерархия заголовков: H1 строго крупнее H2 на 375–1920. */
  --h1: clamp(2.2rem, 5vw, 4.2rem);
  --h1-hero: clamp(2.6rem, 6.5vw, 6rem);
  --h2: clamp(1.7rem, 3vw, 2.6rem);
  --h3: clamp(1.125rem, 1.6vw, 1.375rem);

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  /* --section-gap — расстояние между соседними секциями (каждая даёт половину). */
  --section-gap: clamp(56px, 9vw, 150px);
  --radius: 0;
  --focus: 2px solid var(--navy);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--navy);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0;
  line-height: 1.06;
}

h1 {
  font-size: var(--h1);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--h2);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--h3);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--navy);
  color: #fff;
}

.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-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.muted {
  color: var(--muted);
}

.note {
  color: var(--muted);
  font-size: var(--step--1);
  max-width: 56ch;
  margin-top: 14px;
}

.fineprint {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* ---------- шапка и подвал ---------- */

.site-header {
  position: relative;
  padding: 16px 0;
  background: var(--paper);
  z-index: 30;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong); /* taste-skill-ignore: icon button */
  cursor: pointer;
  flex: 0 0 auto;
}

.nav-toggle:hover {
  background: var(--surface-quiet);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.nav-toggle-bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  transition: transform 160ms ease, opacity 160ms ease, top 160ms ease;
}

.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 5px; }
.nav-toggle-bars span:nth-child(3) { top: 10px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  top: 5px;
  transform: rotate(-45deg);
}

.logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
}

.nav-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.nav-link.is-current,
.nav-link[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* внутренние страницы: ИИ-детектор и гуманизатор */

.page-hero {
  padding: clamp(40px, 6vw, 88px) 0 clamp(28px, 4vw, 52px);
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--h1);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 30ch;
}

.page-lead {
  margin-top: 20px;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.fineprint + .page-title {
  margin-top: 10px;
}

.page-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-soft);
  max-width: 46ch;
}

.step-note {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 10px;
}

.inline-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* бесплатная демо-проверка */

.free-form textarea {
  width: 100%;
  min-height: 200px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong); /* taste-skill-ignore: form field */
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.55;
  resize: vertical;
}

.free-form textarea:focus-visible {
  border-color: var(--navy);
  outline: var(--focus);
  outline-offset: 1px;
}

.free-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 0.875rem;
}

.free-side-card {
  background: var(--surface-quiet);
  padding: clamp(20px, 3vw, 32px);
}

.free-side-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.free-result {
  padding: clamp(20px, 3vw, 32px);
}

.free-stats {
  margin: 18px 0;
}

.free-heat {
  height: 42px;
  gap: 2px;
}

.free-list {
  list-style: none;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.free-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line); /* taste-skill-ignore: список результатов */
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.free-row-p {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.875rem;
}

.free-row-text {
  overflow-wrap: anywhere;
}

.free-meta .is-over {
  color: var(--red, #a63028);
  font-weight: 500;
}

.site-footer {
  margin-top: 0;
  background: var(--ink);
  color: #eef0ea;
  padding: clamp(48px, 7vw, 84px) 0 28px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.footer-tagline {
  color: #b9c0b4;
  max-width: 42ch;
  font-size: 0.9375rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9375rem;
}

.footer-title {
  font-family: var(--font-text);
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0;
  color: #8e978a;
  margin-bottom: 4px;
}

.footer-col a {
  color: #eef0ea;
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  margin-top: 48px;
  color: #8e978a;
  font-size: 0.8125rem;
}

.footer-note {
  color: #8e978a;
  font-size: 0.8125rem;
  margin-top: 10px;
}

/* ---------- кнопки и формы ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:hover {
  background: var(--navy-dark);
  text-decoration: none;
}

.btn:active {
  background: #10233a;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-quiet);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--navy);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-ghost:hover {
  background: transparent;
  color: var(--navy);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.875rem;
}

.btn-lg {
  min-height: 56px;
  padding: 0 28px;
  font-size: 1rem;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 0.875rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.input {
  min-height: 48px;
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong); /* taste-skill-ignore: form field */
  border-radius: var(--radius);
  font-size: 1rem;
}

.input:focus {
  outline: var(--focus);
  outline-offset: 1px;
  border-color: var(--navy);
}

.code-input {
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
}

.form {
  margin: 0;
}

.form-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 12px 0;
}

.form-note-error {
  color: var(--alert-ink);
}

.alert {
  padding: 12px 16px;
  background: var(--alert-bg);
  color: var(--alert-ink);
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--alert-bg);
  color: var(--alert-ink);
}

/* ---------- первый экран ---------- */

.hero {
  padding: clamp(32px, 5vw, 72px) 0 calc(var(--section-gap) / 2);
}

.hero-title {
  font-size: var(--h1-hero);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 6px;
}

.hero-lead {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.45;
  max-width: 34ch;
  color: var(--ink-soft);
}

.hero-facts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 40ch;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--muted);
}

.hero-facts li {
  position: relative;
  padding-left: 18px;
}

.hero-facts li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.hero-note {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 40ch;
}

.hero-action {
  width: 100%;
}

.dropzone {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line-strong); /* taste-skill-ignore: form field */
  padding: clamp(18px, 2.4vw, 28px);
}

.dropzone-hit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 18px;
  border: 1px dashed var(--line-strong);
  cursor: pointer;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.dropzone-hit:hover {
  background: var(--surface-quiet);
  border-color: var(--navy);
}

.dropzone-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.dropzone-hint {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
}

.dropzone-icon {
  display: none;
}

.dropzone input[type="file"]:focus-visible + .dropzone-hit {
  outline: var(--focus);
  outline-offset: 2px;
}

.upload-file,
.upload-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  font-size: 0.875rem;
}

.upload-status {
  color: var(--muted);
  font-size: 0.8125rem;
  margin-top: 6px;
}

.meter {
  flex: 1;
  height: 6px;
  background: var(--surface-quiet);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0;
  background: var(--navy);
  transition: width 240ms ease;
}

.meter-lg {
  height: 10px;
}

/* ---------- секции ---------- */

.section {
  padding-block: calc(var(--section-gap) / 2);
}

/* Короткий финальный призыв: не растягиваем пустоту вокруг него. */
.section-cta {
  padding-block: clamp(32px, 3vw, 48px);
}

.section-title {
  font-size: var(--h2);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 0;
  max-width: 26ch;
}

.section-title + .section-lead {
  margin-top: 20px;
}

.section-title + * {
  margin-top: 28px;
}

.section-title + .note {
  margin-top: 18px;
}

.section-lead + .note {
  margin-top: 14px;
}

.section-lead {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 48ch;
}

.section-head {
  margin-bottom: 32px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.split-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.split-copy > * + * {
  margin-top: 16px;
}

.split-copy .section-title + .section-lead {
  margin-top: 20px;
}

.split-copy .section-title + .note {
  margin-top: 18px;
}

.split-copy > .page-actions {
  margin-top: 24px;
}

.report-fragment {
  margin: 0;
  background: var(--surface);
  padding: clamp(18px, 2.4vw, 28px);
}

.report-fragment figcaption {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.heat-strip {
  display: flex;
  gap: 3px;
  height: 76px;
}

.heat-seg {
  flex: 1 1 0;
  min-width: 0;
  display: block;
}

.heat-low { background: var(--heat-low); }
.heat-mid { background: var(--heat-mid); }
.heat-high { background: var(--heat-high); }
.heat-crit { background: var(--heat-crit); }
.heat-skipped { background: var(--heat-skip); }

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
}

.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.heat-caption {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 12px;
}

/* как это работает */

.how-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.how-item h3 {
  font-size: var(--step-2);
  line-height: 1.08;
  margin-bottom: 12px;
}

.how-item p {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 40ch;
}

/* проверка и признаки */

.prose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 72px);
}

.prose-grid p {
  color: var(--ink-soft);
  max-width: 62ch;
}

.prose-grid p + p {
  margin-top: 16px;
}

.markers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 64px);
  margin-top: 8px;
}

.marker {
  padding: 20px 0;
}

.marker dt {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: 6px;
}

.marker dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  max-width: 52ch;
}

.preserve-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.preserve-grid h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.preserve-grid ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.preserve-grid li::before {
  content: "— ";
  color: var(--muted);
}

.limits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.limits li {
  position: relative;
  padding-left: 18px;
}

.limits li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.heat-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 8px;
}

.sample-report {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sample-row {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
}

.sample-bar {
  width: 6px;
  align-self: stretch;
  min-height: 42px;
}

.sample-text {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.sample-p {
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}

.sample-row.is-skipped .sample-text {
  color: var(--muted);
}

/* услуги */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.service {
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
}

.service-featured {
  background: var(--surface-quiet);
}

.service-name {
  font-size: var(--step-2);
  line-height: 1.08;
}

.service-price {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.service-price span {
  font-size: 0.45em;
  letter-spacing: 0;
}

.service-text {
  color: var(--ink-soft);
  max-width: 36ch;
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin: 4px 0 16px;
}

.service-list li::before {
  content: "— ";
  color: var(--muted);
}

.price-tiers {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

.service .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* замеры */

.measure-lead {
  margin-bottom: 28px;
}

.proof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin: 8px 0 20px;
  font-variant-numeric: tabular-nums;
}

.proof-table caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.8125rem;
  padding-bottom: 10px;
}

.proof-table th,
.proof-table td {
  text-align: left;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

.proof-table thead th {
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--muted);
  border-bottom-color: var(--line-strong);
}

.proof-table tbody th {
  font-weight: 500;
  color: var(--ink-soft);
}

.proof-table tbody tr:last-child th,
.proof-table tbody tr:last-child td {
  border-bottom: 0;
}

/* FAQ */

.faq {
  max-width: 860px;
}

.faq-item {
  padding: 26px 0;
}

.faq-item + .faq-item {
  padding-top: 34px;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-text);
  font-size: 1.25rem;
  color: var(--muted);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-body {
  padding-top: 12px;
  color: var(--ink-soft);
  max-width: 66ch;
}

/* финальный призыв */

.cta-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-top: 8px;
}

.cta-statement {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 22ch;
}

/* ---------- служебные страницы (app screens) ---------- */

.page {
  padding: clamp(32px, 4vw, 56px) 0 80px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.page-sub {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 12px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inline-form {
  margin: 0;
}

.label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line); /* taste-skill-ignore: app screen panel */
  padding: clamp(18px, 2.4vw, 28px);
}

.card + .card {
  margin-top: 16px;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.375rem;
  line-height: 1.2;
}

.card-text {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* отчёт */

.report-heat {
  margin-bottom: 20px;
}

.report-heat .heat-strip {
  height: 56px;
  gap: 0;
  overflow: hidden;
}

.report-list {
  margin-bottom: 20px;
}

.para-list {
  display: flex;
  flex-direction: column;
  max-height: 520px;
  overflow: auto;
}

.para-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: baseline;
  width: 100%;
  padding: 12px 8px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.para-item:nth-child(odd) {
  background: var(--paper);
}

.para-item:hover {
  background: var(--surface-quiet);
}

.para-item.is-skipped {
  color: var(--muted);
}

.para-index {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.8125rem;
}

.para-dot {
  display: none;
}

.para-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.para-text {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.para-meta {
  color: var(--muted);
  font-size: 0.8125rem;
}

.para-p {
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  background: var(--surface-quiet);
  padding: 0 16px;
  margin-bottom: 24px;
}

.stat {
  padding: 18px 20px 18px 0;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  font-size: 0.5em;
}

.stat-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--muted);
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.preview-panel {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-item {
  border-left: 2px solid var(--navy);
  padding-left: 14px;
}

.preview-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.preview-before {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.9375rem;
}

.preview-after {
  font-size: 0.9375rem;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.order-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 12px 0;
}

/* состояние оплаты, PDF и квота — только данные backend */

.pay-availability {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: var(--surface-quiet);
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.45;
}

.pay-availability[data-state="mock_test_mode"] {
  background: var(--surface-quiet);
}

.quota-note {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.quota-note.is-exhausted {
  padding: 10px 12px;
  background: var(--alert-bg);
  color: var(--alert-ink);
}

.quota-card {
  margin-bottom: 20px;
}

.download-actions {
  display: grid;
  gap: 10px;
  margin: 12px 0 10px;
}

[data-pdf-link][aria-busy="true"] {
  opacity: 0.65;
  pointer-events: none;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--surface-quiet);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.badge-warn {
  background: #f6e6d8;
  color: #7c4520;
}

.badge-ok {
  background: #dcece1;
  color: #1d5c3a;
}

.badge-muted {
  background: var(--surface-quiet);
  color: var(--muted);
}

/* прогресс */

.progress-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.progress-card {
  padding: clamp(24px, 3vw, 40px);
}

.progress-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
  flex: 0 0 auto;
  margin-top: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-title {
  font-size: var(--step-3);
  line-height: 1.1;
}

.progress-percent {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.progress-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.progress-stage {
  color: var(--muted);
  font-size: 0.9375rem;
}

.progress-warning {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--surface-quiet);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.progress-warning a {
  color: var(--navy);
}

/* результат */

.result-hero {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.result-check {
  width: 40px;
  height: 40px;
  background: var(--green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.result-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.result-metrics {
  margin-bottom: 16px;
}

.metric-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.8125rem;
  color: var(--muted);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-hint {
  font-size: 0.8125rem;
  color: var(--muted);
}

.metric-arrow,
.metric-share {
  display: none;
}

.changes {
  margin-top: 16px;
}

.change {
  padding: 16px 0;
}

.change + .change {
  margin-top: 18px;
}

.change-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.change-label {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.change-text {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.change-score {
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.change-fallback {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ttl-banner {
  background: var(--surface-quiet);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

/* кабинет */

.table-wrap {
  overflow-x: auto;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.docs-table th,
.docs-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.docs-table thead th {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.doc-name {
  font-weight: 500;
}

.status-pill {
  display: inline-block;
  padding: 3px 8px;
  background: var(--surface-quiet);
  font-size: 0.8125rem;
}

.status-pill.status-done {
  background: #dcece1;
  color: #1d5c3a;
}

.status-pill.status-failed {
  background: var(--alert-bg);
  color: var(--alert-ink);
}

.flags {
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.ttl {
  font-variant-numeric: tabular-nums;
}

.cell-action {
  text-align: right;
}

.empty-state {
  text-align: left;
  padding: 32px;
}

.empty-icon {
  display: none;
}

.empty-note {
  color: var(--muted);
  margin-top: 8px;
}

.telegram-card {
  margin-bottom: 20px;
}

/* вход */

.auth {
  padding: clamp(40px, 7vw, 96px) 0;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.auth-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-title {
  font-size: var(--step-4);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.auth-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.auth-points li::before {
  content: "— ";
  color: var(--muted);
}

.auth-card-title {
  font-size: var(--step-2);
  line-height: 1.15;
  margin-bottom: 16px;
}

.auth-alt {
  margin-top: 18px;
  font-size: 0.9375rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* модальное окно */

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 22, 26, 0.6);
  border: 0;
  cursor: pointer;
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--paper);
  padding: clamp(20px, 3vw, 36px);
  box-shadow: 0 18px 48px rgba(17, 22, 26, 0.28); /* taste-skill-ignore: dialog */
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: var(--surface-quiet);
  border: 0;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.modal-title {
  font-size: 1.5rem;
  margin: 4px 0 6px;
}

.modal-subtitle {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.modal-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.modal-text {
  font-size: 1rem;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.modal-preview {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface-quiet);
}

/* баннер демо и юридические страницы */

.demo-banner {
  background: var(--surface-quiet);
  font-size: 0.875rem;
  color: var(--ink-soft);
  padding: 10px 0;
}

.demo-banner-dot {
  display: none;
}

.legal {
  max-width: 780px;
}

.legal-title {
  font-size: var(--step-4);
  margin-bottom: 8px;
}

.legal-meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

.legal h2 {
  font-size: 1.375rem;
  line-height: 1.25;
  margin: 32px 0 10px;
}

.legal p,
.legal li {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 10px;
}

.legal ul {
  padding-left: 20px;
}

.legal-back {
  display: inline-block;
  margin-top: 28px;
  color: var(--navy);
}

/* ---------- движение ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .spinner { animation: none; }
  .btn, .meter-fill, .dropzone-hit { transition: none; }
}

/* ---------- адаптив ---------- */

@media (max-width: 1024px) {
  .hero-grid,
  .split,
  .auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cta-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 32px; }
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

@media (max-width: 940px) {
  .nav-toggle {
    display: inline-flex;
  }
  .header-inner {
    gap: 12px;
  }
  .header-actions {
    margin-left: auto;
  }
  .header-actions .btn {
    min-height: 44px;
  }
  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 18px 32px rgba(17, 22, 26, 0.12); /* taste-skill-ignore: mobile menu panel */
    z-index: 40;
  }
  .main-nav.is-open {
    display: flex;
  }
  .nav-link {
    display: flex;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 0;
    font-size: 1rem;
    white-space: normal;
    border-bottom: 1px solid var(--line);
  }
  .nav-link:last-child {
    border-bottom: 0;
  }
  .nav-link[aria-current="page"] {
    text-decoration: none;
    padding-left: 10px;
    border-left: 2px solid var(--navy);
  }
}

@media (max-width: 760px) {
  .services { grid-template-columns: minmax(0, 1fr); }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .prose-grid,
  .markers,
  .preserve-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-grid { grid-template-columns: minmax(0, 1fr); }
  .change-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-line { flex-direction: column; align-items: flex-start; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .metric-compare { grid-template-columns: minmax(0, 1fr); }

  /* кабинет: таблица документов превращается в карточки без горизонтального скролла */
  .table-wrap { overflow-x: visible; }
  .docs-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .docs-table,
  .docs-table tbody,
  .docs-table tr,
  .docs-table td { display: block; width: 100%; }
  .docs-table tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .docs-table tr:last-child { border-bottom: 0; }
  .docs-table th,
  .docs-table td {
    border: 0;
    padding: 3px 0;
  }
  .docs-table td[data-label] {
    display: grid;
    grid-template-columns: 40% minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
  }
  .docs-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.8125rem;
  }
  .doc-name { overflow-wrap: anywhere; }
  .cell-action { text-align: left; padding-top: 10px; }
  .proof-table th,
  .proof-table td { padding-right: 10px; }
  .proof-table { font-size: 0.9375rem; }

  /* страница результата: кнопки уходят под заголовок, без горизонтального скролла */
  .result-hero { flex-wrap: wrap; }
  .result-actions { width: 100%; margin-top: 4px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .logo-text { font-size: 1rem; }
  .header-inner { gap: 10px; }
  .btn-sm { padding: 0 12px; }
  .para-item { grid-template-columns: 34px 1fr auto; gap: 10px; }
  .service { padding: 20px; }
}


/* Рекламные слоты: контейнер появляется только при ADS_ENABLED */
.ad-slot {
  margin: clamp(24px, 4vw, 48px) 0;
  padding: 16px 20px;
  background: var(--surface-quiet);
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}
.ad-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ad-placeholder { margin: 0; }

.logo-img {
  display: block;
  width: auto;
  height: 46px;
  mix-blend-mode: multiply;
}

@media (max-width: 940px) {
  .logo-img { height: 38px; }
}

.auth-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.provider-icon {
  display: block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.auth-oauth {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
}
.auth-oauth .btn {
  min-height: 52px;
  background: #fff;
  border: 1px solid var(--line);
}
.auth-oauth .btn:hover {
  background: var(--surface-quiet);
}
