:root {
  --bg: #0b1220;
  --surface: #121a2b;
  --surface-2: #1a2438;
  --text: #e8edf7;
  --muted: #9aa8c0;
  --accent: #3b82f6;
  --accent-2: #22c55e;
  --border: #243049;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top, #15213a 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.5;
}

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

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 700px) {
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.logo-accent {
  color: #60a5fa;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero {
  padding: 56px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 16px;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.badge {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.9rem;
}

.card {
  background: rgba(18, 26, 43, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 { margin-top: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px 0 64px;
}

@media (max-width: 900px) {
  .features { grid-template-columns: 1fr; }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.feature h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); }

.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .pricing { grid-template-columns: 1fr; }
}

.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.price-card-accent {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.06);
}

.price-card-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.price-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 16px;
  flex-grow: 1;
}

.price-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  margin: 4px 0 12px;
  line-height: 1.2;
}

.price-period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

/* Card sections: .section padding must not zero out horizontal inset */
.section.card,
.card.section,
#pricing,
#why-us {
  padding: 32px 28px;
  margin: 48px 0;
}

#pricing h2,
#why-us .section-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

#pricing .section-lead,
#why-us .section-lead {
  margin-bottom: 20px;
}

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 24px 0 40px;
  font-size: 0.95rem;
}

.footer-note {
  margin: 0 0 20px;
}

.footer-requisites-title {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-requisites-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

@media (max-width: 700px) {
  .footer-requisites-list {
    grid-template-columns: 1fr;
  }
}

.footer-requisites-list div {
  margin: 0;
}

.footer-requisites-list dt {
  margin: 0 0 2px;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-requisites-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
}

/* App layout */
.app-shell {
  min-height: 100vh;
  padding: 24px 0 48px;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
}

@media (max-width: 1000px) {
  .app-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font: inherit;
}

textarea { min-height: 96px; resize: vertical; }

.result {
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  min-height: 120px;
}

.score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 12px;
  font-weight: 600;
}

.status {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

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

.analyze-actions {
  align-items: center;
}

.analyze-actions .score {
  margin-bottom: 0;
}

.ask-actions {
  align-items: center;
}

.ask-inline-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.92rem;
  line-height: 1.3;
}

.markdown-report {
  max-height: 480px;
  overflow: auto;
  font-size: 0.95rem;
}

.hidden { display: none !important; }

.progress-panel {
  margin: 16px 0;
  padding: 18px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.progress-percent {
  color: #93c5fd;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #22c55e);
  border-radius: 999px;
  transition: width 0.45s ease;
}

.progress-label {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.progress-steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.progress-step.done {
  color: #86efac;
}

.progress-step.active {
  color: var(--text);
  font-weight: 600;
}

.progress-step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.progress-step.done .progress-step-icon {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.progress-step.active .progress-step-icon {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
  animation: progress-pulse 1.4s ease-in-out infinite;
}

@keyframes progress-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
}

.rich-text {
  line-height: 1.55;
}

.rich-text a {
  color: #60a5fa;
  font-weight: 500;
  word-break: break-word;
}

.rich-text a:hover {
  color: #93c5fd;
}

.rich-text b,
.rich-text strong {
  color: var(--text);
}

.rich-text pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
  font-size: 0.88rem;
  white-space: pre-wrap;
}

.rich-text blockquote.verdict {
  margin: 8px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(59, 130, 246, 0.08);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
}

.rich-text details.doc-spoiler {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.rich-text details.doc-spoiler summary {
  cursor: pointer;
  color: #93c5fd;
  font-weight: 500;
}

.brief-documents {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.brief-documents h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.brief-documents ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brief-documents li {
  font-size: 0.9rem;
}

.brief-documents a {
  color: #60a5fa;
  text-decoration: none;
}

.brief-documents a:hover {
  text-decoration: underline;
}

.brief-documents .doc-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Landing sections */
.section {
  padding: 48px 0;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 0 28px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
}

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

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  font-weight: 700;
  margin-bottom: 12px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

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

.audience {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 700px) {
  .audience { grid-template-columns: 1fr; }
}

.audience-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.audience-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.audience-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.scoring {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.factor {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.factor-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-weight: 700;
}

.factor h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.factor p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.compare {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 700px) {
  .compare { grid-template-columns: 1fr; }
}

.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.compare-card-accent {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.06);
}

.compare-card h3 {
  margin: 0 0 8px;
}

.compare-tag {
  display: inline-block;
  font-size: 0.85rem;
  color: #93c5fd;
  margin-bottom: 16px;
}

.compare-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.compare-card li {
  margin-bottom: 8px;
}

.channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .channels { grid-template-columns: 1fr; }
}

.channel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.channel-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.channel-card h3 {
  margin: 0 0 8px;
}

.channel-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.why-us .section-title {
  margin-bottom: 12px;
}

.why-us-content {
  max-width: 720px;
}

.why-us-content p {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 1.02rem;
}

.why-us-content p:last-child {
  margin-bottom: 0;
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
}

.faq summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  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 details p {
  margin: 0;
  padding: 0 20px 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.cta-banner {
  margin: 48px 0;
  padding: 40px 32px;
  text-align: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(34, 197, 94, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius);
}

.cta-banner h2 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.cta-banner p {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 20px;
}

.cta-banner .actions {
  justify-content: center;
}

.pain-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .pain-points { grid-template-columns: 1fr; }
}

.pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.pain-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #fca5a5;
}

.pain-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.pain-solution {
  margin-bottom: 0 !important;
  max-width: 100% !important;
}

.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table th {
  background: var(--surface-2);
  font-weight: 600;
}

.compare-table th:last-child {
  color: #93c5fd;
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table td {
  color: var(--muted);
}

.compare-table td:last-child {
  color: var(--text);
}

.legal-page {
  padding-bottom: 48px;
}

.legal-content {
  padding: 32px 40px;
  max-width: 800px;
  margin: 24px auto;
}

.legal-content h1 {
  margin-top: 0;
}

.legal-content h2 {
  margin-top: 28px;
  font-size: 1.15rem;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
  line-height: 1.65;
}

.legal-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}

.legal-table th,
.legal-table td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: var(--surface-2);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  margin-bottom: 12px;
}

.footer-legal a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--text);
}

.privacy-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.privacy-consent:hover {
  border-color: #3b5f8f;
  background: var(--surface-2);
}

.privacy-consent:has(.privacy-consent-input:disabled) {
  cursor: default;
  opacity: 0.75;
}

.privacy-consent-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.privacy-consent-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.privacy-consent-input:focus-visible + .privacy-consent-box {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
  border-color: var(--accent);
}

.privacy-consent-input:checked + .privacy-consent-box {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #2563eb;
}

.privacy-consent-input:checked + .privacy-consent-box::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.privacy-consent-input:disabled + .privacy-consent-box {
  opacity: 0.65;
}

.privacy-consent-text {
  flex: 1;
  min-width: 0;
}

.privacy-consent-text a {
  color: #60a5fa;
  font-weight: 500;
}

.privacy-consent-text a:hover {
  color: var(--accent);
}

.pack-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.pack-block h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.pack-status {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .legal-content {
    padding: 20px 16px;
  }
}
