:root {
  --sm-bg: #07091a;
  --sm-bg-soft: #0f1330;
  --sm-card: #151a3d;
  --sm-card-2: #1d2454;
  --sm-text: #eef3ff;
  --sm-muted: #a8b3d6;
  --sm-line: rgba(255, 255, 255, 0.12);
  --sm-blue: #2b5cff;
  --sm-cyan: #23d9ff;
  --sm-pink: #ff4fb8;
  --sm-orange: #ffb84d;
  --sm-green: #43f0a4;
  --sm-red: #ff5d6c;
  --sm-radius: 24px;
  --sm-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.sm-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(43, 92, 255, 0.25), transparent 32rem),
    radial-gradient(circle at top right, rgba(255, 79, 184, 0.22), transparent 28rem),
    var(--sm-bg);
  color: var(--sm-text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.sm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 76px;
  padding: 14px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(7, 9, 26, 0.82);
  border-bottom: 1px solid var(--sm-line);
  backdrop-filter: blur(18px);
}

.sm-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.sm-logo__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sm-blue), var(--sm-pink));
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  box-shadow: 0 0 28px rgba(43, 92, 255, 0.55);
}

.sm-logo__text {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  font-size: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.sm-nav a {
  color: var(--sm-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.sm-nav a:hover {
  color: var(--sm-text);
}

.sm-header__cta {
  margin-left: auto;
  padding: 11px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sm-cyan), var(--sm-blue));
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(35, 217, 255, 0.25);
}

.sm-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--sm-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.sm-burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 999px;
}

.sm-mobile-nav {
  position: fixed;
  top: 76px;
  left: 16px;
  right: 16px;
  z-index: 60;
  padding: 14px;
  border: 1px solid var(--sm-line);
  border-radius: 20px;
  background: rgba(15, 19, 48, 0.96);
  box-shadow: var(--sm-shadow);
}

.sm-mobile-nav a {
  display: block;
  padding: 14px;
  color: var(--sm-text);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
}

.sm-mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sm-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.sm-hero {
  min-height: calc(100vh - 76px);
  padding: clamp(56px, 8vw, 96px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.sm-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 13px;
  border: 1px solid rgba(35, 217, 255, 0.35);
  border-radius: 999px;
  background: rgba(35, 217, 255, 0.09);
  color: var(--sm-cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sm-hero h1,
.sm-section h2,
.sm-final-cta h2 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.sm-hero h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 86px);
}

.sm-hero h1 span {
  display: block;
  background: linear-gradient(135deg, var(--sm-cyan), var(--sm-pink), var(--sm-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sm-hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--sm-muted);
  font-size: 18px;
}

.sm-hero__actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.sm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  border: 1px solid transparent;
}

.sm-btn--primary {
  background: linear-gradient(135deg, var(--sm-pink), var(--sm-blue));
  color: white;
  box-shadow: 0 20px 45px rgba(255, 79, 184, 0.28);
}

.sm-btn--secondary {
  border-color: var(--sm-line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--sm-text);
}

.sm-btn--light {
  background: white;
  color: #11142a;
}

.sm-hero__stats {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sm-hero__stats div {
  padding: 16px;
  border: 1px solid var(--sm-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.sm-hero__stats strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
}

.sm-hero__stats span {
  color: var(--sm-muted);
  font-size: 13px;
}

.sm-hero__card {
  position: relative;
  min-height: 520px;
  border-radius: 36px;
  background:
    linear-gradient(145deg, rgba(35, 217, 255, 0.18), rgba(255, 79, 184, 0.2)),
    rgba(255, 255, 255, 0.06);
  border: 1px solid var(--sm-line);
  box-shadow: var(--sm-shadow);
  overflow: hidden;
}

.sm-hero__card::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 20%, rgba(67, 240, 164, 0.3), transparent 14rem),
    radial-gradient(circle at 80% 30%, rgba(255, 184, 77, 0.25), transparent 13rem),
    linear-gradient(180deg, #10194a, #090c25);
}

.sm-game-preview {
  position: absolute;
  inset: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sm-game-preview__top,
.sm-game-preview__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--sm-line);
  border-radius: 20px;
  background: rgba(7, 9, 26, 0.52);
  backdrop-filter: blur(12px);
}

.sm-game-preview__top span,
.sm-game-preview__bottom span {
  color: var(--sm-muted);
  font-size: 13px;
}

.sm-game-preview__top strong,
.sm-game-preview__bottom strong {
  font-family: "Space Grotesk", sans-serif;
}

.sm-game-preview__screen {
  position: relative;
  z-index: 2;
  height: 250px;
}

.sm-fish,
.sm-coin {
  position: absolute;
  border-radius: 999px;
  filter: blur(0.2px);
}

.sm-fish::before {
  content: "";
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 24px solid currentColor;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
}

.sm-fish--one {
  width: 92px;
  height: 48px;
  left: 30px;
  top: 40px;
  background: var(--sm-cyan);
  color: var(--sm-cyan);
  box-shadow: 0 0 32px rgba(35, 217, 255, 0.55);
}

.sm-fish--two {
  width: 130px;
  height: 64px;
  right: 36px;
  top: 105px;
  background: var(--sm-pink);
  color: var(--sm-pink);
  box-shadow: 0 0 32px rgba(255, 79, 184, 0.55);
}

.sm-fish--three {
  width: 82px;
  height: 42px;
  left: 88px;
  bottom: 28px;
  background: var(--sm-green);
  color: var(--sm-green);
  box-shadow: 0 0 32px rgba(67, 240, 164, 0.45);
}

.sm-coin {
  width: 78px;
  height: 78px;
  right: 88px;
  bottom: 18px;
  background: linear-gradient(135deg, var(--sm-orange), #fff1a8);
  box-shadow: 0 0 34px rgba(255, 184, 77, 0.55);
}

.sm-section {
  padding: 72px 0;
}

.sm-section--compact {
  padding-top: 0;
}

.sm-section__head {
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
}

.sm-section__head h2,
.sm-section h2,
.sm-final-cta h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
}

.sm-section__head p {
  max-width: 420px;
  margin: 0;
  color: var(--sm-muted);
}

.sm-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.sm-trust-card,
.sm-game-card,
.sm-bonus-box,
.sm-content,
.sm-faq details {
  border: 1px solid var(--sm-line);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
}

.sm-trust-card {
  padding: 26px;
  border-radius: var(--sm-radius);
}

.sm-trust-card span {
  color: var(--sm-cyan);
  font-weight: 900;
  font-size: 13px;
}

.sm-trust-card strong {
  display: block;
  margin-top: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
}

.sm-trust-card p {
  margin: 10px 0 0;
  color: var(--sm-muted);
}

.sm-games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.sm-game-card {
  overflow: hidden;
  border-radius: var(--sm-radius);
}

.sm-game-card__image {
  min-height: 190px;
  display: grid;
  place-items: center;
  font-size: 64px;
}

.sm-game-card__image--blue {
  background: linear-gradient(135deg, #1b65ff, #23d9ff);
}

.sm-game-card__image--purple {
  background: linear-gradient(135deg, #6c45ff, #ff4fb8);
}

.sm-game-card__image--orange {
  background: linear-gradient(135deg, #ff814d, #ffce52);
}

.sm-game-card__image--green {
  background: linear-gradient(135deg, #0bbf7a, #43f0a4);
}

.sm-game-card__image--cyan {
  background: linear-gradient(135deg, #00a5ff, #23d9ff);
}

.sm-game-card__image--red {
  background: linear-gradient(135deg, #ff335f, #7c2cff);
}

.sm-game-card__body {
  padding: 22px;
}

.sm-game-card__type {
  color: var(--sm-cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sm-game-card h3 {
  margin: 8px 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
}

.sm-game-card p {
  margin: 0;
  color: var(--sm-muted);
}

.sm-game-card__meta {
  margin: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--sm-muted);
  font-size: 13px;
}

.sm-game-card a {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sm-cyan), var(--sm-blue));
  color: white;
  text-decoration: none;
  font-weight: 900;
}

.sm-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 22px;
  align-items: stretch;
}

.sm-split__content {
  padding: 38px;
  border-radius: var(--sm-radius);
  background: linear-gradient(135deg, rgba(43, 92, 255, 0.2), rgba(255, 79, 184, 0.1));
  border: 1px solid var(--sm-line);
}

.sm-split__content p {
  color: var(--sm-muted);
}

.sm-check-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.sm-check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--sm-text);
}

.sm-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--sm-green);
  font-weight: 900;
}

.sm-bonus-box {
  padding: 38px;
  border-radius: var(--sm-radius);
  background:
    radial-gradient(circle at top right, rgba(255, 184, 77, 0.3), transparent 16rem),
    rgba(255, 255, 255, 0.07);
}

.sm-bonus-box__label {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 184, 77, 0.14);
  color: var(--sm-orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sm-bonus-box strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.sm-bonus-box p {
  color: var(--sm-muted);
  margin: 18px 0 28px;
}

.sm-content {
  padding: clamp(24px, 5vw, 44px);
  border-radius: var(--sm-radius);
}

.sm-content h2,
.sm-content h3 {
  font-family: "Space Grotesk", sans-serif;
}

.sm-content h2 {
  margin-top: 0;
}

.sm-content h3 {
  margin-top: 30px;
  color: var(--sm-cyan);
}

.sm-content p {
  color: var(--sm-muted);
}

.sm-section--cms {
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.sm-cms-content {
  contain: layout paint style;
  isolation: isolate;
  position: relative;
  z-index: 0;
  min-width: 0;
}

.sm-cms-content,
.sm-cms-content *,
.sm-cms-content *::before,
.sm-cms-content *::after {
  box-sizing: border-box;
}

.sm-cms-content :where(img, video, iframe, svg, canvas) {
  max-width: 100%;
}

.sm-cms-content :where(.sm-header, .sm-mobile-nav, .sm-footer) {
  display: none !important;
}

.sm-faq {
  display: grid;
  gap: 14px;
}

.sm-faq .sm-section__head {
  margin-bottom: 16px;
}

.sm-faq details {
  border-radius: 18px;
  padding: 20px 24px;
}

.sm-faq summary {
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.sm-faq p {
  color: var(--sm-muted);
  margin-bottom: 0;
}

.sm-final-cta {
  margin: 40px 0 80px;
  padding: clamp(28px, 5vw, 46px);
  border-radius: 32px;
  background: linear-gradient(135deg, var(--sm-blue), var(--sm-pink));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--sm-shadow);
}

.sm-final-cta span {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
}

.sm-final-cta h2 {
  max-width: 720px;
  margin-top: 8px;
}

.sm-footer {
  padding: clamp(42px, 6vw, 72px) clamp(16px, 4vw, 48px) 30px;
  border-top: 1px solid var(--sm-line);
  background:
    linear-gradient(180deg, rgba(15, 19, 48, 0.92), #050617 42%),
    #050617;
  position: relative;
  overflow: hidden;
}

.sm-footer__top {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 0.72fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: start;
}

.sm-footer__logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--sm-text);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.sm-footer__logo::before {
  content: "S";
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sm-blue), var(--sm-pink));
  color: white;
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sm-footer p {
  max-width: 590px;
  margin: 22px 0 0;
  color: var(--sm-muted);
  font-size: 16px;
  line-height: 1.75;
}

.sm-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sm-footer__links a {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 12px;
  color: rgba(238, 243, 255, 0.78);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.sm-footer__links a:hover {
  background: rgba(35, 217, 255, 0.1);
  color: white;
  transform: translateY(-1px);
}

.sm-footer__bottom {
  width: min(1200px, 100%);
  margin: clamp(34px, 5vw, 54px) auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--sm-muted);
  font-size: 13px;
}

.sm-footer__bottom span:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(238, 243, 255, 0.82);
}

@media (max-width: 960px) {
  .sm-nav {
    display: none;
  }

  .sm-header__cta {
    margin-left: auto;
    padding: 9px 14px;
    font-size: 13px;
  }

  .sm-burger {
    display: block;
    margin-left: 8px;
  }

  .sm-hero,
  .sm-split,
  .sm-footer__top {
    grid-template-columns: 1fr;
  }

  .sm-hero {
    min-height: auto;
  }

  .sm-hero__card {
    min-height: 420px;
  }

  .sm-games-grid,
  .sm-trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sm-section__head,
  .sm-final-cta,
  .sm-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .sm-footer__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sm-main {
    width: min(100% - 24px, 1200px);
  }

  .sm-header {
    min-height: 68px;
    padding: 10px 10px;
    gap: 10px;
  }

  .sm-logo {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    gap: 10px;
  }

  .sm-logo__mark {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .sm-logo__text {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-size: clamp(11px, 3vw, 14px);
    letter-spacing: 0;
  }

  .sm-header__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(35, 217, 255, 0.22);
  }

  .sm-burger {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin-left: 0;
    padding: 0;
  }

  .sm-hero {
    padding-top: 44px;
  }

  .sm-hero__stats,
  .sm-games-grid,
  .sm-trust-grid {
    grid-template-columns: 1fr;
  }

  .sm-hero__card {
    min-height: 340px;
    border-radius: 24px;
  }

  .sm-hero__card::before {
    inset: 18px;
  }

  .sm-game-preview {
    inset: 34px;
  }

  .sm-section {
    padding: 48px 0;
  }

  .sm-footer {
    padding-inline: 16px;
  }

  .sm-footer__links {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .sm-footer__links a {
    min-height: 38px;
  }

  .sm-split__content,
  .sm-bonus-box,
  .sm-content {
    padding: 24px;
  }
}

/*
 * Smash Casino — служебные страницы (/privacy/, /terms/, /cookies/,
 * /betting-rules/, /responsible-gaming/, /contacts/, /about/).
 * Шаблон casino_reviews/legal.html на брендовых темах рендерит
 * `<main class="container"><div class="rich-text">page.body</div></main>`.
 * Без явных стилей контент липнет к sticky-header сверху и к sm-footer
 * снизу — поэтому даём контейнеру max-width, padding, normal-flow
 * spacing перед футером и читаемые типографические значения.
 */
.sm-body main.container {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 32px) clamp(56px, 8vw, 96px);
  color: var(--sm-text);
}

.sm-body main.container .rich-text,
.sm-body main.container > .card,
.sm-body main.container > section {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  color: var(--sm-text);
  line-height: 1.7;
  font-size: 16px;
}

.sm-body main.container h1,
.sm-body main.container h2,
.sm-body main.container h3,
.sm-body main.container h4 {
  font-family: "Space Grotesk", sans-serif;
  color: var(--sm-text);
  line-height: 1.25;
}

.sm-body main.container h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 18px; }
.sm-body main.container h2 { font-size: clamp(22px, 3vw, 28px); margin: 32px 0 14px; color: var(--sm-cyan); }
.sm-body main.container h3 { font-size: 20px; margin: 24px 0 10px; }

.sm-body main.container p {
  color: var(--sm-muted);
  margin: 0 0 16px;
}

.sm-body main.container a {
  color: var(--sm-cyan);
  text-decoration: underline;
}

.sm-body main.container a:hover {
  color: var(--sm-text);
}

.sm-body main.container ul,
.sm-body main.container ol {
  color: var(--sm-muted);
  padding-left: 22px;
  margin: 0 0 18px;
}

.sm-body main.container li { margin: 6px 0; }

.sm-body main.container .lead {
  color: var(--sm-text);
  font-size: 17px;
}

/* На брендовых темах site_footer.html уже не рендерится (см. шаблон),
   но если контентный блок очень короткий — sm-footer всё равно
   подпирается снизу normal flow. Гарантируем дистанцию. */
.sm-body main.container + .sm-footer,
.sm-body main + .sm-footer {
  margin-top: 0;
}

.sm-body .sm-footer {
  position: relative;
  z-index: 1;
}

@media (max-width: 420px) {
  .sm-logo__text {
    font-size: 10px;
    letter-spacing: 0;
  }

  .sm-header__cta {
    padding-inline: 12px;
    font-size: 12px;
  }
}

/* === Smash: hide duplicated CMS chrome ===
   Контентщики кладут в LandingPage.body самодостаточный HTML с собственным
   <header>/<nav>/<footer>, дублирующим темовую шапку и подвал. Pipeline
   сохраняет CMS-<style>, но дубль DOM остаётся видимым. Усиливаем
   специфичность префиксом .sm-section--cms, чтобы перебить CMS-правила
   (которые подключаются позже через inline <style>) без !important. */
.sm-section--cms .sm-cms-content > header,
.sm-section--cms .sm-cms-content > nav,
.sm-section--cms .sm-cms-content > footer {
  display: none;
}

/* === Smash: hide duplicated CMS hero ===
   CMS body contains its own full-page hero before .page-wrap.
   The themed Smash template already renders the page hero above .sm-cms-content,
   so we hide only the direct CMS hero and keep useful content in .page-wrap.
   Префикс .sm-section--cms даёт специфичность 0,3,0 — перебиваем
   inline CMS-правила (.sm-cms-content .hero = 0,2,0) без !important. */
.sm-section--cms .sm-cms-content > .hero {
  display: none;
}

/* === Smash: polish CMS .page-wrap content ===
   Все селекторы строго под .sm-section--cms .sm-cms-content .page-wrap …
   (specificity 0,3,X), что перебивает CMS-правила .sm-cms-content .X (0,2,X)
   без !important. Theme-переменные имеют fallback на CMS-переменные и hardcoded
   значения, чтобы patch работал и там, где доступен только один из источников. */

/* Steps wrapper — на /login/ CMS даёт пустое {}, на /bonus/ только counter-reset,
   на /app/ правила вовсе нет. Даём ритм между шагами. */
.sm-section--cms .sm-cms-content .page-wrap .steps {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

/* Каждый шаг — карточка-row: бейдж | контент. На /app/ CMS не задаёт ничего,
   на login/bonus задаёт только display:flex без фона/рамки — оба случая лечим. */
.sm-section--cms .sm-cms-content .page-wrap .step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 14px 18px;
  margin-bottom: 0;
  background: var(--sm-card, var(--card-bg, #131f3a));
  border: 1px solid var(--sm-line, var(--border, #1e2f52));
  border-radius: 14px;
}

/* Полная геометрия+типографика бейджа: covers /app/ where CMS даёт 0 правил. */
.sm-section--cms .sm-cms-content .page-wrap .step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  margin-top: 2px;
}

/* Фон/цвет бейджа — через :where() с нулевой специфичностью, чтобы CMS-овский
   page-specific gradient (purple на login, gold/orange на bonus) выиграл каскад,
   а на /app/, где CMS-правил нет, сработал наш темовый fallback. */
:where(.sm-section--cms .sm-cms-content .page-wrap .step-num) {
  background: linear-gradient(135deg,
    var(--sm-cyan, var(--cyan, #23d9ff)),
    var(--sm-blue, var(--accent, #2b5cff)));
  color: var(--sm-text, var(--white, #f0f4ff));
}

.sm-section--cms .sm-cms-content .page-wrap .step-content > *:first-child {
  margin-top: 0;
}

/* Generic h4 fallback — идёт ПЕРЕД step-specific h4, чтобы более специфичное
   правило для .step-content h4 могло его переопределить. */
.sm-section--cms .sm-cms-content .page-wrap h4 {
  font-family: "Exo 2", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  margin: 12px 0 8px;
  color: var(--sm-text, var(--white, #f0f4ff));
}

/* Step-specific h4 — после общего, перебивает его внутри шагов. */
.sm-section--cms .sm-cms-content .page-wrap .step-content h4 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.3;
}

.sm-section--cms .sm-cms-content .page-wrap .step-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--sm-muted, var(--muted, #8899bb));
}

/* FAQ: CMS прячет .faq-a через display:none в расчёте на JS-аккордеон,
   которого нет. Показываем ответы и убираем ложную интерактивность. */
.sm-section--cms .sm-cms-content .page-wrap .faq-item {
  margin-bottom: 10px;
}

.sm-section--cms .sm-cms-content .page-wrap .faq-q {
  cursor: default;
  border-radius: 12px 12px 0 0;
}

.sm-section--cms .sm-cms-content .page-wrap .faq-q::after {
  content: none;
}

.sm-section--cms .sm-cms-content .page-wrap .faq-a {
  display: block;
  border-radius: 0 0 12px 12px;
  margin-bottom: 0;
}

/* Section rhythm внутри .page-wrap */
.sm-section--cms .sm-cms-content .page-wrap > section {
  margin: 32px 0;
}

.sm-section--cms .sm-cms-content .page-wrap > section:first-of-type {
  margin-top: 0;
}

@media (max-width: 720px) {
  .sm-section--cms .sm-cms-content .page-wrap .step {
    padding: 12px 14px;
    gap: 12px;
  }
}
