:root {
  --bg: #070a0f;
  --bg-grid: rgba(61, 139, 253, 0.03);
  --panel: #0f141c;
  --panel-hover: #141b26;
  --border: #1e2836;
  --text: #e8eef7;
  --muted: #8b9cb3;
  --accent: #3d8bfd;
  --accent-dim: rgba(61, 139, 253, 0.12);
  --accent-glow: rgba(61, 139, 253, 0.35);
  --shield: #5ce0a8;
  --shield-dim: rgba(92, 224, 168, 0.12);
  --warn: #f0b429;
  --success: #5ce0a8;
  --danger: #f07178;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 20px 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.92rem;
}

nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.hero {
  position: relative;
  padding: 32px 28px;
  background: linear-gradient(145deg, var(--panel) 0%, #0a1018 50%, #0d1520 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 32px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-compact {
  padding: 24px 24px;
}

.hero h1 {
  position: relative;
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  line-height: 1.25;
}

.hero p {
  position: relative;
  margin: 0;
  color: var(--muted);
  max-width: 640px;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: filter 0.15s, transform 0.15s;
}

.btn:hover {
  filter: brightness(1.1);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-shield {
  background: linear-gradient(135deg, #3a9d72, var(--shield));
  color: #0a0e14;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
  text-align: center;
}

section {
  margin-bottom: 40px;
}

.section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 14px;
}

h2 {
  font-size: 1.2rem;
  margin: 0 0 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color 0.15s, background 0.15s;
}

.card:hover {
  border-color: rgba(61, 139, 253, 0.35);
  background: var(--panel-hover);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card-featured {
  border-color: rgba(61, 139, 253, 0.45);
  box-shadow: 0 0 24px rgba(61, 139, 253, 0.08);
}

.price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 10px 0;
}

.card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag-shield {
  background: var(--shield-dim);
  color: var(--shield);
}

.status-badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.status-active {
  background: var(--shield-dim);
  color: var(--success);
}

.status-inactive {
  background: rgba(139, 156, 179, 0.15);
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.legal {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 48px;
}

.legal-page h1 {
  font-size: 1.5rem;
}

.legal-page h2 {
  margin-top: 28px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 18px;
}

.faq-item summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.step-list {
  color: var(--muted);
  padding-left: 1.2rem;
  margin: 0 0 24px;
}

.step-list li {
  margin-bottom: 8px;
}

.note {
  background: var(--accent-dim);
  border: 1px solid rgba(61, 139, 253, 0.25);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.note-warn {
  background: rgba(240, 180, 41, 0.08);
  border-color: rgba(240, 180, 41, 0.3);
}

.note code {
  font-size: 0.85em;
}

.cta-block {
  text-align: center;
  padding: 28px;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.cta-block p {
  color: var(--muted);
  margin: 0 0 16px;
}

.cta-block .btn {
  margin: 4px;
}

.download-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.download-meta {
  flex: 1;
  min-width: 200px;
}

.download-meta h3 {
  margin: 0 0 6px;
}

/* Cabinet */
.cabinet-form {
  max-width: 420px;
}

.cabinet-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.cabinet-form input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.cabinet-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.cabinet-form button[type="submit"] {
  width: 100%;
}

.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.dashboard-header h2 {
  margin: 0;
}

.account-meta {
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}

.sync-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.sync-section h3 {
  margin: 0 0 8px;
}

.sync-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.sync-row input {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

.text-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 8px;
}

.text-success {
  color: var(--success);
  font-size: 0.88rem;
  margin-top: 8px;
}

.logout-row {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.section-intro {
  margin: -6px 0 18px;
  max-width: 640px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.feature-card h3 {
  margin: 8px 0 8px;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.platform-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.platform-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.platform-card h3 {
  margin: 10px 0 8px;
  font-size: 1.05rem;
}

.platform-lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.platform-list {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  font-size: 0.92rem;
  color: var(--text);
}

.platform-list li {
  margin-bottom: 6px;
}

.platform-limit {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.platform-coming {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--accent, #6eb5ff);
}

.platform-pwa-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(110, 181, 255, 0.08);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.platform-why {
  margin: 0 0 14px;
  font-size: 0.9rem;
}

.platform-cta {
  margin-top: auto;
  align-self: flex-start;
}

.shield-benefits {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.shield-benefits li {
  font-size: 0.88rem;
  color: var(--muted);
  padding-left: 1.1rem;
  position: relative;
}

.shield-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.15);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table .yes {
  color: var(--success);
  font-weight: 700;
}

.compare-table .no {
  color: var(--muted);
}

.compare-note {
  margin-top: 14px;
  font-size: 0.9rem;
  max-width: 720px;
}

.ecosystem-footnote {
  font-size: 0.82rem;
  margin-top: 10px;
  max-width: 52em;
}

.tariffs-pay-note {
  margin-top: 14px;
  font-size: 0.88rem;
  max-width: 52em;
}

.card .btn-block {
  display: block;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 600px) {
  nav {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* Cabinet auth tabs */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.auth-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.auth-hint {
  margin-top: 12px;
  font-size: 0.85rem;
}

/* Cabinet tariff picker */
.subscriptions-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.subscriptions-block h3 {
  margin: 0 0 8px;
}

.subscriptions-current {
  margin: 0 0 14px;
}

.tariff-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.tariff-mini {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tariff-mini.featured {
  border-color: rgba(61, 139, 253, 0.45);
}

.tariff-mini.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.tariff-mini.current-free {
  opacity: 0.85;
}

.tariff-mini h4 {
  margin: 0;
  font-size: 1rem;
}

.tariff-mini-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tariff-mini-price {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.tariff-mini-note {
  margin: 0;
  font-size: 0.8rem;
}

.tariff-mini-features {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--muted);
}

.tariff-mini .btn-block {
  margin-top: auto;
  width: 100%;
}

.section-label {
  margin: 14px 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Cookie consent (152-ФЗ / GDPR-style notice) */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding: 12px 16px;
  background: rgba(10, 14, 20, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.cookie-consent-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-consent p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  flex: 1;
  min-width: 220px;
}

.cookie-consent .btn {
  flex-shrink: 0;
}

.captcha-box {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.captcha-question {
  margin: 4px 0 8px;
  font-weight: 600;
}

.captcha-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.captcha-row input {
  flex: 1;
}
