/* PD-Scan — оформление.
   Палитра задана токенами: смена темы делается здесь, компоненты ниже не трогаются. */

:root {
  /* примитивы */
  --c-white: #ffffff;
  --c-slate-50: #f6f8fb;
  --c-slate-100: #eef2f7;
  --c-slate-200: #e3e8ef;
  --c-slate-300: #cbd5e1;
  --c-slate-500: #5b6779;
  --c-slate-700: #334155;
  --c-slate-900: #0f172a;
  --c-blue-50: #eff5ff;
  --c-blue-600: #1f6feb;
  --c-blue-700: #1a5fd0;
  --c-green-50: #e7f7ee;
  --c-green-700: #17803d;
  --c-amber-50: #fef4e6;
  --c-amber-700: #9a5b06;
  --c-red-50: #fdecec;
  --c-red-700: #b41f1f;

  /* семантика */
  --bg: var(--c-slate-50);
  --card: var(--c-white);
  --line: var(--c-slate-200);
  --text: var(--c-slate-900);
  --muted: var(--c-slate-500);
  --accent: var(--c-blue-600);
  --accent-dark: var(--c-blue-700);
  --accent-soft: var(--c-blue-50);
  --ok: var(--c-green-700);
  --ok-soft: var(--c-green-50);
  --warn: var(--c-amber-700);
  --warn-soft: var(--c-amber-50);
  --fail: var(--c-red-700);
  --fail-soft: var(--c-red-50);
  --info: var(--c-slate-500);

  --radius: 12px;
  --radius-lg: 16px;
  --space: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------- шапка ---------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.logo img {
  width: 26px;
  height: 26px;
}

.top-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--text);
}

.top-cta {
  padding: 9px 16px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.top-cta:hover {
  background: var(--accent-dark);
}

/* ---------------- секции ---------------- */

section {
  padding: 56px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 28px;
}

h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 25px;
  line-height: 1.25;
  margin: 0 0 10px;
}

h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

.lead {
  font-size: 17px;
  color: var(--c-slate-700);
  margin: 0;
}

/* ---------------- первый экран ---------------- */

.hero {
  padding: 52px 0 44px;
  background: linear-gradient(180deg, #ffffff 0%, var(--c-slate-50) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: start;
}

.hero-note {
  font-size: 14px;
  color: var(--muted);
  margin: 14px 0 0;
}

.scan-form {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.scan-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--c-slate-300);
  background: #fff;
  color: var(--text);
  font-size: 16px;
}

.scan-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.scan-form button {
  padding: 14px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.scan-form button:hover {
  background: var(--accent-dark);
}

.scan-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.hint {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 0;
}

.link {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 20px 0 4px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--c-slate-700);
}

.trust li {
  display: inline-flex;
  align-items: baseline;
}

.trust li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 700;
  margin-right: 6px;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.hero-card h3 {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
}

.hero-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.hero-card li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.hero-card li:last-child {
  border-bottom: 0;
}

.hero-card .chip {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------------- статус и результат ---------------- */

.status {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
}

.status.error {
  color: var(--fail);
  border-color: #f3c9c9;
  background: var(--fail-soft);
}

.result {
  padding: 0 0 8px;
}

.score-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.score-top {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.score-value {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
}

.score-value small {
  font-size: 18px;
  color: var(--muted);
  font-weight: 400;
}

.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.badge.risk-низкий {
  background: var(--ok-soft);
  color: var(--ok);
}
.badge.risk-средний {
  background: var(--warn-soft);
  color: var(--warn);
}
.badge.risk-высокий {
  background: var(--fail-soft);
  color: var(--fail);
}

.tally {
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
}

.tally b {
  color: var(--text);
}

.checks {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.check-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-top: 8px;
}

.dot.ok {
  background: var(--ok);
}
.dot.warn {
  background: #d97706;
}
.dot.fail {
  background: var(--fail);
}
.dot.info {
  background: var(--c-slate-300);
}

.check-title {
  font-weight: 600;
  flex: 1;
}

.check-evidence {
  color: var(--muted);
  font-size: 14px;
  margin: 6px 0 0 20px;
}

.check-details {
  margin: 8px 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}

.check-details p {
  margin: 6px 0;
}

.check-details .risk {
  color: var(--fail);
}

.check-details .fix {
  color: var(--ok);
}

.locked {
  margin: 10px 0 0 20px;
  font-size: 13px;
  color: var(--muted);
  padding: 7px 11px;
  border-left: 3px solid var(--line);
  background: var(--c-slate-50);
  border-radius: 0 6px 6px 0;
}

/* ---------------- тарифы и оплата ---------------- */

.paywall {
  margin-top: 20px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent);
  background: var(--card);
  box-shadow: var(--shadow);
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.plan {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  display: flex;
  flex-direction: column;
}

.plan.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.plan h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.plan .price {
  font-size: 30px;
  font-weight: 700;
  margin: 8px 0 12px;
}

.plan .price small {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.plan ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15px;
}

.plan li {
  margin: 6px 0;
}

.plan button,
.paywall button,
.plan .btn {
  margin-top: auto;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.plan button:hover,
.paywall button:hover,
.plan .btn:hover {
  background: var(--accent-dark);
}

/* Вторичная кнопка: у бесплатного тарифа не должно быть веса платного. */
.btn-secondary {
  background: transparent !important;
  color: var(--text) !important;
  border: 1px solid var(--c-slate-300) !important;
}

.btn-secondary:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

.pay-hint,
.pay-legal {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.pay-legal {
  font-size: 12px;
}

.paid-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--c-green-200, #c7e8d3);
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 14px;
}

/* --- отчёт: скачивание в PDF и печатная версия --- */

.report-actions {
  display: flex;
  justify-content: flex-end;
  margin: 14px 0 0;
}

.btn-print {
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--c-slate-300);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-print:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.print-head {
  display: none;
}

/* ---------------- шаги ---------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
}

.step {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}

.step p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------------- что проверяем ---------------- */

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

.card {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------------- таблица штрафов ---------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}

th,
td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--c-slate-50);
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  font-weight: 500;
}

.fine {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fine.big {
  color: var(--fail);
  font-weight: 600;
}

.note {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}

/* ---------------- FAQ ---------------- */

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "–";
}

.faq p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

/* ---------------- подвал ---------------- */

.foot {
  margin-top: 8px;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

.foot h4 {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 10px;
}

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

.foot li {
  margin: 6px 0;
}

.foot a {
  color: var(--muted);
  text-decoration: none;
}

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

.foot-bottom {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------------- модальное окно ---------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}
.modal[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal-box h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.modal-text {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 16px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

#order-form {
  display: flex;
  gap: 8px;
}

#order-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 13px;
  border-radius: 10px;
  border: 1px solid var(--c-slate-300);
  font-size: 15px;
}

#order-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

#order-form button {
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}

.modal-status {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* Согласие на обработку персональных данных: unticked checkbox, не спрятанный в текст. */
.consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}

.consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.consent span {
  display: block;
  white-space: normal;
  width: auto;
  height: auto;
}

.modal-status.error {
  color: var(--fail);
}

.modal-status.ok {
  color: var(--ok);
}

/* ---------------- cookie-баннер ---------------- */

.cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 55;
  background: var(--c-slate-900);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
}

.cookie[hidden] {
  display: none;
}

.cookie p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  max-width: 640px;
}

.cookie a {
  color: #9dc1ff;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Пока баннер виден, он не должен перекрывать кнопки внизу страницы. */
body.has-cookie {
  padding-bottom: 96px;
}

.cookie button {
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.cookie .accept {
  background: #fff;
  color: var(--c-slate-900);
}

.cookie .decline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

/* ---------------- юридические страницы ---------------- */

.legal-page {
  padding: 32px 0 60px;
}

.legal-page h1 {
  font-size: 28px;
}

.legal-page h2 {
  font-size: 20px;
  margin-top: 30px;
}

.legal-page h3 {
  font-size: 16px;
  margin-top: 20px;
  color: var(--muted);
}

.legal-page p,
.legal-page li {
  font-size: 15px;
}

.legal-page ul,
.legal-page ol {
  padding-left: 22px;
}

.legal-meta {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
}

.legal-back {
  margin: 0 0 10px;
  font-size: 14px;
}

.requisites-block {
  margin-top: 36px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.requisites-block h2 {
  margin-top: 0;
}

.requisites-block p {
  margin: 6px 0;
}

/* ---------------- адаптив ---------------- */

@media (max-width: 900px) {
  .hero-grid,
  .plans,
  .grid-cards,
  .foot-grid {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .top-nav {
    display: none;
  }
}

@media (max-width: 560px) {
  section {
    padding: 40px 0;
  }
  .hero {
    padding: 36px 0 32px;
  }
  h1 {
    font-size: 26px;
  }
  h2 {
    font-size: 21px;
  }
  .score-value {
    font-size: 36px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .scan-form,
  #order-form {
    flex-direction: column;
  }
  .scan-form button,
  #order-form button {
    width: 100%;
  }
  .cookie {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  body.has-cookie {
    padding-bottom: 170px;
  }
}

/* ---------------- печать и сохранение в PDF ----------------
   Печатаем только отчёт: шапку, секции лендинга, формы и cookie-баннер убираем. */

@media print {
  .top,
  .cookie,
  .modal,
  .foot,
  .hero-card,
  .scan-form,
  .hint,
  .trust,
  .lead,
  .hero h1,
  .paywall,
  .report-actions,
  #how,
  #checks,
  #fines,
  #pricing,
  #faq {
    display: none !important;
  }

  html,
  body {
    background: #fff;
  }

  .hero {
    padding: 0;
    border: 0;
    background: #fff;
  }

  .hero-grid {
    display: block;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .print-head {
    display: block;
    margin: 0 0 14px;
  }

  .print-head h2 {
    margin: 0 0 2px;
  }

  .print-head p {
    margin: 0;
    font-size: 12px;
    color: #555;
  }

  .score-card,
  .check {
    border-color: #ccc;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .checks {
    gap: 6px;
  }

  .check-details .risk,
  .check-details .fix {
    color: #000;
  }

  .locked {
    font-size: 13px;
    color: #444;
    border-left-color: #ccc;
    background: transparent;
  }
}
