* { box-sizing: border-box }
body {
  margin: 0; font-family: -apple-system, system-ui, sans-serif;
  color: #1a1a1a; line-height: 1.5;
}
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid #eee;
}
.brand { font-weight: 700; color: #c8102e; text-decoration: none }
nav a { margin-left: 16px; color: #666; text-decoration: none; font-size: 14px }
main { max-width: 680px; margin: 0 auto; padding: 24px }
.hero h1 { font-size: 28px; line-height: 1.3; margin: 24px 0 12px }
.hero p { font-size: 17px; color: #444 }
.cta {
  display: inline-block; background: #c8102e; color: #fff;
  padding: 14px 24px; border-radius: 8px; text-decoration: none;
  font-weight: 600; margin: 16px 0;
}
.check form { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 }
.check input { padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px }
.check button {
  padding: 14px; background: #1a1a1a; color: #fff; border: 0;
  border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer;
}
#result { padding: 16px; background: #faf7f0; border-radius: 8px; margin-top: 12px }
.pricing .plans { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 16px 0 }
@media (min-width: 600px) { .pricing .plans { grid-template-columns: 1fr 1fr } }
.plan { border: 1px solid #eee; padding: 20px; border-radius: 10px }
.plan .price { font-size: 22px; font-weight: 700; margin: 8px 0 }
.plan ul { padding-left: 18px }
.plan ul li { margin: 4px 0; color: #444 }
.small { color: #888; font-size: 13px }
.prose h2 { margin-top: 28px }
.prose ul { padding-left: 20px }
footer {
  padding: 24px; text-align: center; font-size: 13px; color: #888;
  border-top: 1px solid #eee; margin-top: 40px;
}
footer a { color: #666; margin: 0 6px }

/* Auth forms (signup/login/reset) */
.auth-wrap { max-width: 440px; margin: 40px auto; padding: 24px }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 }
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #444 }
.auth-form label.inline { flex-direction: row; align-items: flex-start; gap: 8px }
.auth-form label.inline input { margin-top: 3px }
.auth-form input, .auth-form select {
  padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px;
}
.auth-form button {
  padding: 14px; background: #c8102e; color: #fff; border: 0;
  border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer;
  margin-top: 8px;
}
.auth-form button:disabled { opacity: .6; cursor: wait }
.auth-form .err {
  padding: 10px 12px; background: #fdecea; border: 1px solid #f5c6cb;
  color: #a02020; border-radius: 6px; font-size: 14px;
}
/* Honeypot — невидимое для человека, бот увидит и заполнит */
.auth-form label.hp {
  position: absolute; left: -9999px; opacity: 0; pointer-events: none;
  height: 0; width: 0; overflow: hidden;
}
.deep-link { text-align: center; margin: 24px 0; padding: 20px; background: #faf7f0; border-radius: 10px }
.checklist li { margin: 6px 0 }
nav a.brand-link, .brand a { color: inherit; text-decoration: none }

/* FAQ */
.faq { margin-top: 32px }
.faq details {
  border: 1px solid #eee; border-radius: 8px; padding: 12px 16px;
  margin: 8px 0; cursor: pointer;
}
.faq details[open] { background: #faf7f0 }
.faq summary { font-weight: 600; color: #1a1a1a; outline: none }
.faq details p { margin: 10px 0 4px 0; color: #444 }

/* Header CTA */
.cta-sm { padding: 8px 14px; font-size: 14px; margin-left: 8px }

/* Dashboard account-management dialogs */
.linklike {
  background: none; border: none; padding: 0; color: #c8102e;
  cursor: pointer; font: inherit; text-decoration: underline;
}
.linklike:hover { color: #9b0c23 }
.linklike[disabled] { color: #999; cursor: not-allowed; text-decoration: none }
.linklike.danger { color: #9b0c23 }
.muted { color: #666; font-size: 14px; margin-top: 6px }
.warning {
  background: #fff3cd; border-left: 4px solid #c8102e; padding: 10px 14px;
  border-radius: 4px; margin: 8px 0 14px 0; color: #4a2e00;
}
dialog {
  border: 1px solid #ccc; border-radius: 8px; padding: 24px;
  min-width: 320px; max-width: 480px;
}
dialog::backdrop { background: rgba(0,0,0,0.4) }
dialog h3 { margin-top: 0 }
dialog label { display: block; margin: 12px 0 }
dialog label.inline { display: flex; align-items: center; gap: 8px }
dialog label.inline input { width: auto }
dialog input[type=password] {
  width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px;
  font-size: 16px; margin-top: 4px;
}
.dlg-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px;
}
.dlg-actions button {
  padding: 8px 16px; border-radius: 4px; border: 1px solid #ccc;
  background: #f5f5f5; cursor: pointer; font-size: 15px;
}
.dlg-actions button.cta { background: #c8102e; color: #fff; border-color: #c8102e }
.dlg-actions button.cta.danger { background: #9b0c23; border-color: #9b0c23 }

/* Progress-bar for onboarding checklist */
.progress {
  background: #eee; border-radius: 4px; height: 8px;
  overflow: hidden; margin: 8px 0;
}
.progress-bar {
  background: #c8102e; height: 100%; width: 0;
  transition: width .4s ease;
}

/* Sessions dialog — wider + readable rows */
#dlg-sessions { max-width: 560px; min-width: 300px }
#sessions-list li {
  padding: 10px 0; border-bottom: 1px solid #f0f0f0;
  display: flex; flex-direction: column; gap: 2px;
}
#sessions-list li:last-child { border-bottom: none }
#sessions-list li .linklike { align-self: flex-start; margin-top: 4px }

/* Deep-link card variants */
.deep-link.warning {
  background: #fff3cd; border-left: 4px solid #c8102e;
  text-align: left;
}
.deep-link.warning .cta {
  background: #c8102e; color: #fff; padding: 8px 16px; font-size: 14px;
  margin-top: 8px; text-decoration: none; border: none; cursor: pointer;
  border-radius: 6px;
}

/* ========== Mobile (360-420px) ========== */
@media (max-width: 480px) {
  header { padding: 12px 16px }
  main { padding: 16px }
  .auth-wrap { padding: 16px; margin: 16px auto }
  .hero h1 { font-size: 24px }
  .hero p { font-size: 16px }
  .cta { padding: 12px 18px; width: 100%; text-align: center }
  dialog {
    min-width: 0;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin: 16px auto;
    padding: 18px;
  }
  .dlg-actions { flex-direction: column-reverse }
  .dlg-actions button { width: 100% }
  .plan { padding: 16px }
  .faq details { padding: 10px 12px }
  nav a { margin-left: 8px; font-size: 13px }
  nav a.cta-sm { padding: 6px 10px }
  #sessions-list li { padding: 8px 0 }
}

/* ========== Very narrow (≤360px — iPhone SE 1st gen, old Android) ========== */
@media (max-width: 360px) {
  .brand { font-size: 14px }
  .hero h1 { font-size: 22px }
  main { padding: 12px }
}
