/* ============================================================
   SMP — "Night Clinical" theme
   Deep navy canvas matching the in-app onboarding screens, with
   vivid per-category colors (green / pink / blue / red / purple)
   pulled straight from the app's own icon palette.
   Russian only — no i18n hooks here (by design, see README).
   ============================================================ */

[data-app="smp"] {
  --bg: #16294e;
  --bg-2: #24447e;
  --panel: rgba(255,255,255,.06);
  --panel-solid: #1e3260;
  --border: rgba(255,255,255,.12);
  --ink: #f3f6fc;
  --ink-soft: #9fadd0;
  --font-display: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --accent: #4f8cff;
  --accent-deep: #2a4fb0;
  --accent-light: #8fb4ff;
  --accent-shadow: rgba(79,140,255,.38);

  --cat-profile: #4f8cff;
  --cat-protocols: #e2543c;
  --cat-knowledge: #2fa66a;
  --cat-calc: #2bb3a3;
  --cat-drugs: #b34fd1;
  --cat-library: #e2a83c;
  --cat-ob: #e2749c;
  --cat-diag: #8f93a6;

  --btn-grad: linear-gradient(120deg, #4f8cff, #7c6bff);
  --btn-ink: #ffffff;
  --ghost-bg: rgba(255,255,255,.07);
  --appbar-bg: rgba(20,36,66,.94);
  --switch-bg: rgba(20,36,66,.92);
  --switch-border: rgba(255,255,255,.14);
  --mark-bg: linear-gradient(135deg, #4f8cff, #2a4fb0);
  --lang-bg: rgba(255,255,255,.06);
  --chip-bg: rgba(30,50,96,.94);
  --phone-shell: #0a1226;
  --phone-shadow: 0 34px 80px -34px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);
  --pill-bg: rgba(255,255,255,.06);
  --pill-hi-bg: rgba(79,140,255,.2);
  --pill-hi-border: rgba(79,140,255,.42);

  background: radial-gradient(120% 90% at 50% -10%, var(--bg-2), var(--bg) 60%);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
}
[data-app="smp"] h1, [data-app="smp"] h2, [data-app="smp"] h3 { font-family: var(--font-display); }
[data-app="smp"] .mono { font-family: var(--font-mono); }

/* ---------- Category dots (Профиль / Протоколы / База знаний / Калькуляторы / ЛС) ---------- */
.cat-profile { background: var(--cat-profile); } .cat-profile-ink { color: var(--cat-profile); }
.cat-protocols { background: var(--cat-protocols); } .cat-protocols-ink { color: var(--cat-protocols); }
.cat-knowledge { background: var(--cat-knowledge); } .cat-knowledge-ink { color: var(--cat-knowledge); }
.cat-calc { background: var(--cat-calc); } .cat-calc-ink { color: var(--cat-calc); }
.cat-drugs { background: var(--cat-drugs); } .cat-drugs-ink { color: var(--cat-drugs); }
.cat-library { background: var(--cat-library); } .cat-library-ink { color: var(--cat-library); }
.cat-ob { background: var(--cat-ob); } .cat-ob-ink { color: var(--cat-ob); }
.cat-diag { background: var(--cat-diag); } .cat-diag-ink { color: var(--cat-diag); }

/* ---------- Hero ---------- */
.sm-hero { padding: 58px 0 10px; position: relative; overflow: hidden; }
.sm-hero::before {
  content: ""; position: absolute; top: -220px; right: -160px; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(79,140,255,.16), transparent 72%); pointer-events: none;
}
.sm-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(79,140,255,.14); color: var(--accent-light);
  font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 100px; margin-bottom: 20px;
  border: 1px solid rgba(79,140,255,.3);
}
.sm-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-light); animation: sm-pulse 1.6s ease-in-out infinite; }
@keyframes sm-pulse { 0%,100%{ opacity:1; } 50%{ opacity:.25; } }
.sm-hero-grid { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; position: relative; z-index: 1; }
@media(min-width: 960px){ .sm-hero-grid { grid-template-columns: 1.05fr .95fr; gap: 36px; } }
.sm-hero h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.sm-hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--accent), var(--accent-light)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sm-hero .lead { margin-top: 20px; font-size: 17px; line-height: 1.62; color: var(--ink-soft); max-width: 480px; }
.sm-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center; }
.sm-note { font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-top: 14px; }
.sm-stats { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.sm-stat b { display: block; font-family: var(--font-mono); font-weight: 700; font-size: 24px; background: linear-gradient(120deg, var(--accent-light), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sm-stat span { font-size: 12.5px; color: var(--ink-soft); font-weight: 700; }

/* ---------- ECG heartbeat line (signature hero graphic) ---------- */
.sm-ecg { margin-top: 34px; width: 100%; max-width: 420px; opacity: .9; }
.sm-ecg svg { width: 100%; height: auto; display: block; }
.sm-ecg-line {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 620; stroke-dashoffset: 620;
  animation: sm-ecg-draw 3.2s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(79,140,255,.5));
}
@keyframes sm-ecg-draw {
  0% { stroke-dashoffset: 620; }
  55% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -620; }
}

/* ---------- Audience grid (colored icon circles, like the in-app category tiles) ---------- */
.sm-audience { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media(min-width: 720px){ .sm-audience { grid-template-columns: repeat(4, 1fr); } }
.sm-aud-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 22px 18px; }
.sm-aud-card .ico {
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.sm-aud-card b { font-size: 14.5px; font-weight: 700; display: block; margin-bottom: 4px; }
.sm-aud-card span { font-size: 13px; color: var(--ink-soft); }

/* ---------- Country / region strip ---------- */
.sm-regions { display: flex; flex-wrap: wrap; gap: 12px; }
.sm-region {
  display: inline-flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 100px; padding: 9px 16px; font-size: 13.5px; font-weight: 700;
}
.sm-region .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- Pricing ---------- */
.sm-pricing-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media(min-width: 700px){ .sm-pricing-grid { grid-template-columns: 1fr 1fr; } }
@media(min-width: 1080px){ .sm-pricing-grid { grid-template-columns: repeat(4, 1fr); } }
.sm-plan { background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 28px 24px; display: flex; flex-direction: column; position: relative; }
.sm-plan.hi { background: linear-gradient(160deg, #1c2f52, #101d38); border: 1px solid rgba(79,140,255,.4); overflow: hidden; }
.sm-plan.hi::before { content: ""; position: absolute; top: -40px; right: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(closest-side, rgba(79,140,255,.35), transparent 70%); }
.sm-plan-name { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 6px; }
.sm-plan.hi .sm-plan-name { color: var(--accent-light); }
.sm-plan-badge {
  position: absolute; top: 16px; right: 16px; background: var(--accent); color: var(--btn-ink);
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 100px;
}
.sm-plan h3 { font-family: var(--font-display); font-size: 19px; margin: 0 0 6px; }
.sm-plan .price { font-family: var(--font-mono); font-size: 22px; font-weight: 700; margin: 4px 0 16px; position: relative; z-index: 1; }
.sm-plan .price span { font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.sm-plan ul { list-style: none; margin: 0 0 auto; padding: 0; display: flex; flex-direction: column; gap: 11px; position: relative; z-index: 1; }
.sm-plan li { font-size: 13.5px; font-weight: 600; display: flex; gap: 9px; align-items: flex-start; color: var(--ink); }
.sm-plan li::before { content: "✓"; color: var(--accent); font-weight: 800; flex: none; }
.sm-plan.hi li::before { color: var(--accent-light); }
.sm-plan .btn { margin-top: 22px; width: 100%; justify-content: center; position: relative; z-index: 1; }

/* ---------- Module launcher preview (mirrors in-app "Модули" grid) ---------- */
.sm-modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media(min-width: 560px){ .sm-modules { grid-template-columns: repeat(3, 1fr); } }
.sm-module { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 16px 14px; text-align: center; }
.sm-module .ico { width: 38px; height: 38px; border-radius: 11px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.sm-module span { font-size: 12.5px; font-weight: 700; display: block; }

/* ---------- Contact section: intro + form card ---------- */
.sm-contact-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
@media(min-width: 960px){ .sm-contact-grid { grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: center; } }

.sm-contact-intro h2 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 32px); line-height: 1.18; margin: 0 0 14px; letter-spacing: -.005em; }
.sm-contact-intro p { font-size: 15.5px; line-height: 1.68; color: var(--ink-soft); margin: 0 0 28px; max-width: 420px; }

.sm-contact-direct {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink);
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.sm-contact-direct:hover { border-color: rgba(79,140,255,.4); transform: translateY(-3px); background: rgba(255,255,255,.08); }
.sm-contact-direct .ico {
  width: 40px; height: 40px; border-radius: 12px; flex: none; background: rgba(79,140,255,.16); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.sm-contact-direct .ico svg { width: 19px; height: 19px; }
.sm-contact-direct span:last-child { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.sm-contact-direct b { font-size: 14.5px; color: var(--ink); }

.sm-contact-card {
  background: linear-gradient(160deg, rgba(79,140,255,.09), rgba(255,255,255,.03));
  border: 1px solid var(--border); border-radius: 26px; padding: 34px; position: relative; overflow: hidden;
}
.sm-contact-card::before {
  content: ""; position: absolute; top: -60px; right: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(79,140,255,.28), transparent 70%); pointer-events: none;
}

/* ---------- Contact form ---------- */
.sm-contact-form { position: relative; z-index: 1; max-width: none; display: flex; flex-direction: column; gap: 18px; }
.sm-contact-field { display: flex; flex-direction: column; gap: 8px; }
.sm-contact-field label { font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.sm-contact-field select,
.sm-contact-field textarea,
.sm-contact-field input {
  background: rgba(10,18,38,.55); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 16px; font-family: inherit; font-size: 15px; color: var(--ink);
  transition: border-color .2s ease, background .2s ease;
}
.sm-contact-field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.sm-contact-field select:focus,
.sm-contact-field textarea:focus,
.sm-contact-field input:focus {
  outline: none; border-color: rgba(79,140,255,.55); background: rgba(10,18,38,.75);
}
.sm-contact-field select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fadd0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px;
}
.sm-contact-field select option { background: var(--panel-solid); color: var(--ink); }
.sm-contact-form .btn { align-self: stretch; justify-content: center; margin-top: 4px; }
.sm-contact-status { font-size: 14px; font-weight: 600; margin: 0; min-height: 1.4em; }
.sm-contact-status.ok { color: var(--cat-knowledge); }
.sm-contact-status.err { color: var(--cat-protocols); }
/* ---------- Lightbox: click any phone to view it large ---------- */
[data-app="smp"] .phone { cursor: zoom-in; transition: transform .25s cubic-bezier(.22,1,.36,1); }
[data-app="smp"] .phone:hover { transform: translateY(-4px); }

.sm-lightbox {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 70px 20px; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.sm-lightbox.is-open { opacity: 1; pointer-events: auto; }
.sm-lightbox-backdrop { position: absolute; inset: 0; background: rgba(6,11,22,.88); backdrop-filter: blur(8px); }
.sm-lightbox-inner { position: relative; z-index: 1; max-width: 880px; width: 100%; max-height: 100%; }
.sm-lightbox-content {
  display: flex; flex-direction: column; align-items: center; gap: 30px;
  max-height: calc(100vh - 140px); overflow-y: auto; padding: 4px;
}
@media(min-width: 760px){
  .sm-lightbox-content { flex-direction: row; align-items: center; justify-content: center; gap: 52px; }
}
.sm-lightbox-phone { flex: none; }
.sm-lightbox-phone .phone { width: min(72vw, 300px); cursor: default; }
.sm-lightbox-phone .phone:hover { transform: none; }
.sm-lightbox-text { max-width: 380px; text-align: center; }
@media(min-width: 760px){ .sm-lightbox-text { text-align: left; } }
.sm-lightbox-text h3 { font-family: var(--font-display); font-size: 21px; margin: 0 0 12px; color: var(--ink); }
.sm-lightbox-text p { font-size: 15px; line-height: 1.68; color: var(--ink-soft); margin: 0; }

.sm-lightbox-close, .sm-lightbox-nav {
  position: fixed; z-index: 1002; border-radius: 50%; background: var(--chip-bg); border: 1px solid var(--border);
  color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color .2s ease, transform .2s ease;
}
.sm-lightbox-close:hover, .sm-lightbox-nav:hover { border-color: rgba(79,140,255,.45); }
.sm-lightbox-close { top: 20px; right: 20px; width: 44px; height: 44px; }
.sm-lightbox-close svg { width: 18px; height: 18px; }
.sm-lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.sm-lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.sm-lightbox-nav.prev { left: 18px; }
.sm-lightbox-nav.next { right: 18px; }
.sm-lightbox-nav svg { width: 20px; height: 20px; }
@media(max-width: 640px){
  .sm-lightbox-nav { width: 42px; height: 42px; }
  .sm-lightbox-nav.prev { left: 8px; }
  .sm-lightbox-nav.next { right: 8px; }
  .sm-lightbox-close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .sm-lightbox, [data-app="smp"] .phone { transition: none !important; }
}
/* ---------- CTA ---------- */
.sm-cta { text-align: center; padding: 80px 0; }
.sm-cta-icon { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 22px; display: block; box-shadow: 0 20px 40px -18px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); }
.sm-cta h2 { font-size: clamp(26px, 4vw, 38px); margin: 0; }
.sm-cta p { color: var(--ink-soft); font-size: 15.5px; margin-top: 14px; max-width: 440px; margin-left: auto; margin-right: auto; }
.sm-cta .btn { margin-top: 26px; }

@media (prefers-reduced-motion: reduce) {
  .sm-eyebrow .dot, .sm-ecg-line { animation: none !important; }
}

/* ---------- Section-head signature animations ---------- */
.section-head .kicker-with-sig { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-head .kicker-with-sig .kicker { margin-bottom: 0; }

.sm-sig { position: relative; display: inline-flex; flex: none; }
.sm-sig-pulse { width: 15px; height: 15px; align-items: center; justify-content: center; }
.sm-sig-pulse span { position: absolute; border-radius: 50%; background: var(--accent); }
.sm-sig-pulse span:first-child { inset: 0; animation: sm-ping 2.4s cubic-bezier(0,.5,.5,1) infinite; }
.sm-sig-pulse span:last-child { width: 7px; height: 7px; top: 4px; left: 4px; }
@keyframes sm-ping { 0% { transform: scale(1); opacity: .75; } 100% { transform: scale(2.8); opacity: 0; } }

.sm-sig-bars { gap: 3px; align-items: flex-end; height: 15px; }
.sm-sig-bars i { width: 4px; background: var(--accent); border-radius: 2px; display: block; transform-origin: bottom; animation: sm-bar 1.1s ease-in-out infinite; }
.sm-sig-bars i:nth-child(1) { height: 6px; animation-delay: 0s; }
.sm-sig-bars i:nth-child(2) { height: 15px; animation-delay: .15s; }
.sm-sig-bars i:nth-child(3) { height: 10px; animation-delay: .3s; }
@keyframes sm-bar { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }

.sm-region-line { height: 2px; border-radius: 2px; margin-top: 22px; background: linear-gradient(90deg, transparent, var(--accent) 35%, var(--accent-light) 50%, var(--accent) 65%, transparent); background-size: 250% 100%; animation: sm-shimmer 3.6s linear infinite; opacity: .55; }
@keyframes sm-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .sm-sig-pulse span:first-child, .sm-sig-bars i, .sm-region-line, .sm-plan.hi::before { animation: none !important; }
}

/* ---------- Card hover-lift ---------- */
.sm-aud-card, .sm-plan, .sm-module {
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s ease, border-color .28s ease;
}
.sm-aud-card:hover, .sm-plan:hover, .sm-module:hover {
  transform: translateY(-5px);
  border-color: rgba(79,140,255,.4);
  box-shadow: 0 24px 46px -26px rgba(0,0,0,.55);
}
.sm-plan.hi::before { animation: sm-glow-pulse 3.6s ease-in-out infinite; }
@keyframes sm-glow-pulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }

/* ---------- Wave divider between hero and next section ---------- */
.sm-wave { display: block; width: 100%; height: 64px; margin-top: -2px; }
.sm-wave path { fill: var(--panel-solid); opacity: .5; }

/* ---------- Phone / card reveal-on-scroll ---------- */
[data-app="smp"] .reveal { opacity: 0; transform: translateY(32px) scale(.96); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
[data-app="smp"] .reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }
[data-app="smp"] .feature-media .reveal:nth-child(2) { transition-delay: .12s; }
[data-app="smp"] .sm-audience .reveal:nth-child(2) { transition-delay: .08s; }
[data-app="smp"] .sm-audience .reveal:nth-child(3) { transition-delay: .16s; }
[data-app="smp"] .sm-audience .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- Screenshot showcase: text left (synced), phone carousel right ---------- */
.sm-showcase-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media(min-width: 960px){ .sm-showcase-grid { grid-template-columns: 1fr .95fr; gap: 36px; } }
.sm-showcase-text h3 {
  font-family: var(--font-display); font-size: 23px; margin: 0 0 14px; letter-spacing: -.005em;
  transition: opacity .25s ease; min-height: 1.3em;
}
.sm-showcase-text p {
  font-size: 15.5px; line-height: 1.72; color: var(--ink-soft); margin: 0; max-width: 460px;
  transition: opacity .25s ease; min-height: 6em;
}
.sm-showcase-text.is-switching h3,
.sm-showcase-text.is-switching p { opacity: .35; }

/* ---------- Screenshot gallery: swipeable single-slide carousel ---------- */
.sm-gallery-wrap { margin: -36px 0 40px; padding-top: 18px; }
.sm-gallery-wrap .sm-gallery-hint {
  text-align: center; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink-soft);
  margin: 0 0 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.sm-gallery-wrap .sm-gallery-hint svg { width: 14px; height: 14px; opacity: .7; }
.sm-gallery { position: relative; max-width: 300px; margin: 0 auto; }
.sm-gallery .carousel-track { position: relative; touch-action: pan-y; cursor: grab; }
.sm-gallery .carousel-track:active { cursor: grabbing; }
.sm-gallery-arrow {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--chip-bg); color: var(--ink); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.sm-gallery-arrow:hover { border-color: rgba(79,140,255,.45); transform: translateY(-50%) scale(1.06); }
.sm-gallery-arrow.prev { left: -14px; }
.sm-gallery-arrow.next { right: -14px; }
.sm-gallery-arrow svg { width: 18px; height: 18px; }
@media(max-width: 640px){
  .sm-gallery-arrow.prev { left: -6px; }
  .sm-gallery-arrow.next { right: -6px; }
}

/* ---------- Help / FAQ accordion (smp-help.html) ---------- */
.help-list { display: flex; flex-direction: column; gap: 12px; }
.help-item { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: border-color .2s ease; }
.help-item[open] { border-color: rgba(79,140,255,.35); }
.help-item summary {
  list-style: none; cursor: pointer; padding: 19px 22px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; font-weight: 700; font-size: 15.5px; color: var(--ink);
  font-family: var(--font-display);
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary .chev { flex: none; color: var(--ink-soft); transition: transform .25s ease; }
.help-item[open] summary .chev { transform: rotate(180deg); color: var(--accent); }
.help-item[open] summary { border-bottom: 1px solid var(--border); }
.help-answer { padding: 18px 22px 22px; font-size: 14.5px; line-height: 1.72; color: var(--ink-soft); }
.help-answer p { margin: 0 0 12px; }
.help-answer p:last-child { margin-bottom: 0; }
.help-answer a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* editor note banner shown at the top of the Help page */
.help-note {
  background: rgba(226,168,60,.12); border: 1px solid rgba(226,168,60,.35); border-radius: 14px;
  padding: 16px 20px; font-size: 13.5px; line-height: 1.6; color: #f0d9a8; margin-bottom: 32px;
}
.help-note strong { color: #f7e6bc; }

/* ---------- Site-level additions ---------- */
/* Apple glyph rendered from <img>: force white so it reads on the gradient button */
.btn-appstore-ico { filter: brightness(0) invert(1); }
/* Hero carousel phones are always visible (no scroll-reveal) */
.hero-carousel .phone, .sm-gallery .phone { opacity: 1; transform: none; }
/* Lightbox phone is filled by JS */
.sm-lightbox-phone .phone .shot { min-height: 100%; }
/* Help note banner is an editor hint; hidden on the public site */
.help-note { display: none; }

/* ---------- Layout fixes ---------- */
/* .sm-hero shorthand padding zeroed the .wrap side gutters -> keep them aligned with other sections */
.sm-hero.wrap { padding-left: 24px; padding-right: 24px; }
@media (max-width: 640px) { .sm-hero.wrap { padding-left: 20px; padding-right: 20px; } }
/* hero glow: let it bleed to the viewport edge instead of being clipped by the centred .wrap */
.sm-hero { overflow: visible; }
.sm-hero::before { right: -120px; }
body[data-app="smp"] { overflow-x: clip; }
/* ECG: the dash animation ran past the visible length; draw once fully, then fade */
.sm-ecg-line { stroke-dasharray: 700; stroke-dashoffset: 700; animation: sm-ecg-draw 3.6s ease-in-out infinite; }
@keyframes sm-ecg-draw {
  0%   { stroke-dashoffset: 700; opacity: 1; }
  60%  { stroke-dashoffset: 0;   opacity: 1; }
  85%  { stroke-dashoffset: 0;   opacity: 1; }
  100% { stroke-dashoffset: 0;   opacity: 0; }
}

/* Media groups: keep 2–3 phones on one row (scale down instead of wrapping) */
.feature-media { flex-wrap: nowrap; gap: 16px; }
.feature-media .phone { flex: 0 1 210px; width: auto; min-width: 0; }
.feature-media.single .phone { flex: 0 1 250px; }
.feature-media .phone:nth-last-child(3):first-child,
.feature-media:has(.phone:nth-child(3)) .phone { flex-basis: 170px; }
.shot.placeholder b { font-size: 12.5px; }
.feature-media:has(.phone:nth-child(3)) .shot.placeholder { padding: 16px 10px; }
.feature-media:has(.phone:nth-child(3)) .shot.placeholder b { font-size: 11.5px; }
.feature-media:has(.phone:nth-child(3)) .shot.placeholder small { display: none; }
@media (max-width: 480px) {
  .feature-media { gap: 10px; }
  .feature-media .shot.placeholder small { display: none; }
  .feature-media .shot.placeholder b { font-size: 11px; }
}

/* ---------- Mobile overflow guard ---------- */
/* floaters live inside position:relative bands; clip them to the band so they never widen the page */
.band { position: relative; }
.bg-floaters { overflow: clip; }
html { overflow-x: clip; }
@media (max-width: 640px) { .bg-floaters svg { max-width: 24px; } }

/* ---------- Background: paint on <html> so it always covers the full scroll height ---------- */
html { background: #16294e; }
[data-app="smp"] { background: radial-gradient(120% 90% at 50% -10%, var(--bg-2), var(--bg) 60%) no-repeat; background-attachment: scroll; min-height: 100vh; }

/* ---------- Pricing card polish ---------- */
.sm-plan h3 { margin-bottom: 20px; min-height: 2.5em; line-height: 1.25; position: relative; z-index: 1; }
.sm-plan-name { position: relative; z-index: 1; }
.sm-plan.hi .sm-plan-name { padding-right: 96px; }

/* ============================================================
   New: категории, «Обновления», «Описание локального статуса»
   ============================================================ */
:root, [data-app="smp"] { --cat-diseases: #e2543c; --cat-status: #4f8cff; }
[data-app="smp"] { --cat-diseases: #f0708a; --cat-status: #7c6bff; }
.cat-diseases { background: var(--cat-diseases); }
.cat-status { background: var(--cat-status); }

.sm-new-tag {
  margin-left: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: #0e1b38; background: linear-gradient(120deg, #8fb4ff, #b7a8ff); padding: 3px 9px; border-radius: 100px;
}

/* ---------- Локальный статус: интерактивный выбор ---------- */
.feature-media.single .sm-ls { width: 100%; max-width: 440px; }
.sm-ls {
  background: linear-gradient(160deg, rgba(79,140,255,.10), rgba(255,255,255,.03)); border: 1px solid var(--border);
  border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 20px;
}
.sm-ls-label { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.sm-ls-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-ls-chip {
  background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--ink); cursor: pointer;
  font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: 100px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.sm-ls-chip:hover { border-color: rgba(79,140,255,.5); transform: translateY(-1px); }
.sm-ls-chip.is-active { background: var(--btn-grad); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -12px var(--accent-shadow); }
.sm-ls-chip:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.sm-ls-out { background: rgba(10,18,38,.55); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; min-height: 130px; transition: opacity .2s ease; }
.sm-ls-out.is-switching { opacity: .4; }
.sm-ls-out-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; margin-bottom: 8px; color: var(--accent-light); }
.sm-ls-out-text { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); }

/* ---------- Плашка-анонс обновления (над первым экраном) ---------- */
.sm-banner-wrap { padding-top: 22px; padding-bottom: 0; position: relative; z-index: 2; }
.sm-banner {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  background: linear-gradient(110deg, rgba(79,140,255,.20), rgba(124,107,255,.14));
  border: 1px solid rgba(79,140,255,.40); border-radius: 16px; padding: 9px 10px 9px 12px;
  transition: transform .25s cubic-bezier(.22,1,.36,1), border-color .25s ease, box-shadow .25s ease;
}
.sm-banner:hover { transform: translateY(-2px); border-color: rgba(143,180,255,.7); box-shadow: 0 16px 34px -20px var(--accent-shadow); }
.sm-banner-icon { width: 32px; height: 32px; border-radius: 9px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.sm-banner-badge { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0e1b38; background: linear-gradient(120deg, #8fb4ff, #b7a8ff); padding: 4px 10px; border-radius: 100px; }
.sm-banner-text { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft); }
.sm-banner-text b { color: var(--ink); font-weight: 700; }
.sm-banner-btn { flex: none; display: inline-flex; align-items: center; gap: 7px; background: var(--btn-grad); color: #fff; font-size: 13.5px; font-weight: 700; padding: 9px 15px; border-radius: 11px; }
.sm-banner-btn svg { width: 15px; height: 15px; transition: transform .25s ease; }
.sm-banner:hover .sm-banner-btn svg { transform: translateX(3px); }
.sm-banner-wrap + .sm-hero { padding-top: 34px; }
@media (max-width: 720px) {
  .sm-banner { flex-wrap: wrap; padding: 12px; row-gap: 10px; }
  .sm-banner-text { flex-basis: 100%; order: 3; font-size: 14px; }
  .sm-banner-btn { margin-left: auto; }
}

/* ---------- Страница «Обновления» ---------- */
.rel-list { display: flex; flex-direction: column; gap: 22px; }
.rel {
  background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 30px 32px; position: relative; overflow: hidden;
}
.rel.is-latest { background: linear-gradient(160deg, rgba(79,140,255,.13), rgba(255,255,255,.04)); border-color: rgba(79,140,255,.4); }
.rel.is-latest::before {
  content: ""; position: absolute; top: -80px; right: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(79,140,255,.28), transparent 70%); pointer-events: none;
}
.rel > * { position: relative; }
.rel-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 12px; }
.rel-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--btn-ink); background: var(--accent); padding: 4px 10px; border-radius: 100px; }
.rel-version { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--accent-light); }
.rel-date { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.legal-body .rel h2 { font-size: 24px; margin: 0 0 8px; }
.rel-lead { margin: 0 0 6px !important; }
.rel h3 { font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-light); margin: 26px 0 12px; }
.rel h3.is-fix { color: #f0d9a8; }
.rel-items { list-style: none; padding: 0 !important; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rel-items li { position: relative; padding-left: 20px; }
.rel-items li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.rel-items b { color: var(--ink); }
.rel-cta { text-align: center; margin-top: 44px; }
.rel-cta p { color: var(--ink-soft) !important; }
@media (max-width: 560px) { .rel { padding: 24px 20px; } }

/* buttons inside legal/updates pages: keep button colours (was overridden by .legal-body a) */
.legal-body a.btn { color: var(--btn-ink); text-decoration: none; }
.legal-body a.btn-ghost { color: var(--ink); }
