:root {
  --bg: #f5f7fb;
  --surface: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #eff6ff;
  --accent: #059669;
  --danger: #dc2626;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --header: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, 1120px);
  margin: 0 auto;
}

.mode-bar {
  text-align: center;
  padding: 0.5rem;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 500;
  border-bottom: 1px solid #bfdbfe;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header);
  display: flex;
  align-items: center;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #3b82f6);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.logo span {
  color: var(--brand);
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  align-items: center;
}

.nav a:hover {
  color: var(--brand);
}

.nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 0.55rem 1rem;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--brand-dark);
}

@media (max-width: 640px) {
  .nav a:not(.nav-cta) {
    display: none;
  }
}

.hero {
  padding: 1.75rem 0 2.5rem;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 920px;
}

.hero-copy {
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: clamp(1.65rem, 3.8vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 auto 1.25rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stat strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.stat span {
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-check {
  margin-top: 0;
  width: 100%;
}

.hero-check .check-head {
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.hero-check .check-head h2 {
  font-size: 1.25rem;
}

.hero-check .check-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.id-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.id-tab {
  border: 1.5px solid var(--border);
  background: #fafbfc;
  border-radius: 10px;
  padding: 0.55rem 0.4rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.id-tab:hover {
  border-color: #cbd5e1;
  color: var(--text);
}

.id-tab.active {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-dark);
}

.hero-visual {
  background: linear-gradient(145deg, #1e3a8a, #1e40af);
  border-radius: 24px;
  padding: 1.75rem;
  color: #e2e8f0;
  box-shadow: var(--shadow);
}

.car-mock {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.car-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.car-field {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.car-field b {
  display: block;
  color: #fff;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}

.pill.ok {
  background: rgba(5, 150, 105, 0.25);
  color: #6ee7b7;
}

.pill.warn {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

.features {
  padding: 2rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 860px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.feat:hover {
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

.feat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.feat h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feat p {
  font-size: 0.8rem;
  color: var(--muted);
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.section-title p {
  color: var(--muted);
  font-size: 0.95rem;
}

.benefits {
  padding: 2.5rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

.benefits-list {
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.benefits-list li {
  display: flex;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.benefits-list li::before {
  content: "✓";
  color: var(--brand);
  font-weight: 800;
  flex-shrink: 0;
}

.check-section {
  padding: 2rem 0 3rem;
}

.check-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  /* overflow:hidden ломает sticky-кнопку оплаты на мобилке */
  overflow: visible;
}

.check-head {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbfc, #fff);
  border-radius: 20px 20px 0 0;
}

.check-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.check-head p {
  color: var(--muted);
  font-size: 0.9rem;
}

.check-body {
  padding: 1.75rem;
}

.field {
  margin-bottom: 0.85rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.label {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.65rem;
}

.services-wrap {
  margin-bottom: 1.25rem;
}

.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

@media (max-width: 720px) {
  .services {
    grid-template-columns: 1fr;
  }
}

.service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: #fafbfc;
  cursor: pointer;
  font: inherit;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.service:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.service.active {
  border-color: var(--brand);
  background: var(--brand-light);
}

.service.bundle.active {
  border-color: var(--brand-dark);
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.service-info strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.1rem;
}

.service-info span {
  font-size: 0.8rem;
  color: var(--muted);
}

.service-price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand);
  white-space: nowrap;
}

.service-price small {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--muted);
}

.pop-tag {
  font-size: 0.68rem;
  background: var(--brand);
  color: #fff;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
  font-weight: 600;
}

.bundle-tag {
  font-size: 0.68rem;
  background: var(--accent);
  color: #fff;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
  font-weight: 600;
}

.checkout-bar {
  margin: 0.35rem 0 1.35rem;
  padding: 0.85rem 0 0;
  border-top: 1px solid var(--border);
}

.btn-main {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
}

.btn-main:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-main:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.trust-inline {
  margin: 0.75rem 0 0;
  padding-top: 0;
  border-top: 0;
  justify-content: center;
}

/* Мобилка/планшет: кнопка оплаты закреплена внизу экрана */
@media (max-width: 860px) {
  .checkout-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    margin: 0;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.12);
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  body.pay-docked .checkout-bar,
  .checkout-bar.is-docked {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .checkout-bar .trust-inline {
    display: none;
  }

  .checkout-bar .err {
    margin-top: 0.5rem;
    margin-bottom: 0;
  }

  /* место под fixed-бар */
  .check-body {
    padding-bottom: 5.5rem;
  }
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.trust-item svg {
  flex-shrink: 0;
  color: var(--accent);
}

.err {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #fef2f2;
  border-radius: 10px;
  border: 1px solid #fecaca;
}

.steps {
  padding: 2rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

@media (max-width: 640px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin: 0 auto 0.75rem;
}

.step h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.step p {
  font-size: 0.82rem;
  color: var(--muted);
}

.faq {
  padding: 2.5rem 0;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.faq-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.faq-item p {
  font-size: 0.88rem;
  color: var(--muted);
}

.cta-bottom {
  padding: 2.5rem 0 3rem;
  text-align: center;
}

.cta-bottom h2 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  margin-bottom: 0.5rem;
}

.cta-bottom p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.btn-outline {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 2px solid var(--brand);
  color: var(--brand);
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}

.btn-outline:hover {
  background: var(--brand);
  color: #fff;
}

.footer {
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--brand);
}

.hidden {
  display: none !important;
}

.loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 0.4rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Order page */
.order-wrap {
  width: min(100% - 2rem, 820px);
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.order-header {
  margin: 1.5rem 0 1rem;
}

.order-header h1 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  margin-bottom: 0.35rem;
}

.order-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-top: 0.5rem;
}

.order-status.processing {
  background: #fef3c7;
  color: #92400e;
}

.order-status.completed {
  background: #d1fae5;
  color: #065f46;
}

.order-status.failed {
  background: #fee2e2;
  color: #991b1b;
}

.result-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 1.25rem;
}

.result-head {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-bottom: 1px solid #a7f3d0;
}

.result-head.warn {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-bottom-color: #fecaca;
}

.result-head h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #065f46;
}

.result-head.warn h2 {
  color: #991b1b;
}

.result-head p {
  font-size: 0.85rem;
  color: #047857;
  margin-top: 0.2rem;
}

.result-head.warn p {
  color: #b91c1c;
}

.result-body {
  padding: 0;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.result-row:last-child {
  border-bottom: 0;
}

.result-row:nth-child(even) {
  background: #fafbfc;
}

.result-row.section-header {
  background: var(--brand-light);
  font-weight: 700;
  color: var(--brand-dark);
}

.result-key {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  flex: 1;
}

.result-val {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  flex: 1;
  word-break: break-word;
}

.result-row-photo {
  align-items: flex-start;
}

.result-photo-wrap {
  display: block;
  max-width: 220px;
  margin-left: auto;
}

.result-photo {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8ecef;
}

.val-good {
  color: var(--accent);
}

.val-bad {
  color: var(--danger);
}

.val-warn {
  color: #d97706;
}

.result-foot {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}

.report-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

@media (min-width: 560px) {
  .report-actions {
    grid-template-columns: repeat(4, 1fr);
  }
}

.btn-action {
  border: 1.5px solid var(--border);
  background: #fafbfc;
  color: var(--text);
  border-radius: 12px;
  padding: 0.7rem 0.6rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.btn-action:hover {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-dark);
}

.btn-action.primary {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.btn-action.primary:hover {
  opacity: 0.95;
  color: #fff;
}

.share-hint {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--accent);
  text-align: center;
}

@media print {
  .header,
  .mode-bar,
  .report-actions,
  .share-hint,
  .btn-ghost,
  .order-status {
    display: none !important;
  }
  .order-wrap {
    padding: 0;
    width: 100%;
  }
  .result-card {
    box-shadow: none;
    border: 0;
  }
}

.btn-ghost {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
  transform: none;
}

.spinner-block {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
