/* ========================================================================
   BuildBot landing — design system + sections
   Inspired by the Mini App palette: warm sand + teal + amber
   ======================================================================== */

:root {
  --bg: #f4eee6;
  --bg-2: #ebe3d8;
  --bg-deep: #10252a;
  --surface: rgba(255, 254, 250, 0.92);
  --surface-strong: #fffef9;
  --line: rgba(18, 37, 42, 0.1);
  --line-strong: rgba(18, 37, 42, 0.18);
  --text: #11242a;
  --text-soft: #4d5f66;
  --text-muted: #7a8a91;
  --text-inverse: #f5efe6;
  --teal: #0e656d;
  --teal-2: #0a4f56;
  --teal-3: #0d8189;
  --teal-soft: #d8f0ee;
  --amber: #c78529;
  --amber-2: #a96d18;
  --amber-soft: #fff1d3;
  --red: #b24a32;
  --red-soft: #ffe2d8;
  --green: #2d764f;
  --green-soft: #dff4e7;
  --violet: #5a4cad;
  --violet-soft: #ece7ff;
  --rose: #b9486f;
  --rose-soft: #ffe2ec;
  --shadow-sm: 0 6px 16px rgba(17, 36, 42, 0.08);
  --shadow: 0 18px 44px rgba(17, 36, 42, 0.12);
  --shadow-strong: 0 28px 70px rgba(17, 36, 42, 0.18);
  --shadow-deep: 0 40px 100px rgba(10, 30, 35, 0.28);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --container: min(1240px, calc(100vw - 32px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Concrete background presets (default = industrial) */
  --concrete-body-spot-1: rgba(255, 205, 111, 0.18);
  --concrete-body-spot-2: rgba(62, 70, 76, 0.22);
  --concrete-body-base-1: #c4c9cd;
  --concrete-body-base-2: #a6adb4;
  --concrete-body-base-3: #939ca4;

  --concrete-aurora-spot-1: rgba(255, 255, 255, 0.22);
  --concrete-aurora-spot-2: rgba(36, 44, 52, 0.24);

  --concrete-blob-1-a: rgba(52, 59, 66, 0.34);
  --concrete-blob-1-b: rgba(52, 59, 66, 0.1);
  --concrete-blob-2-a: rgba(224, 166, 71, 0.38);
  --concrete-blob-2-b: rgba(224, 166, 71, 0.11);
  --concrete-blob-3-a: rgba(42, 50, 58, 0.32);
  --concrete-blob-3-b: rgba(42, 50, 58, 0.1);

  --concrete-grid-strong: rgba(26, 31, 36, 0.16);
  --concrete-grid-soft: rgba(26, 31, 36, 0.07);
  --concrete-grain-dark: rgba(43, 47, 52, 0.09);
  --concrete-grain-light: rgba(255, 255, 255, 0.08);
  --concrete-survey-line-strong: rgba(57, 63, 70, 0.12);
  --concrete-survey-line-soft: rgba(255, 255, 255, 0.1);
  --concrete-corner-mark: rgba(238, 176, 84, 0.16);
}

body.theme-concrete-warm {
  --concrete-body-spot-1: rgba(255, 219, 156, 0.34);
  --concrete-body-spot-2: rgba(132, 114, 93, 0.16);
  --concrete-body-base-1: #e5ddd2;
  --concrete-body-base-2: #d2c6b6;
  --concrete-body-base-3: #beb3a4;

  --concrete-aurora-spot-1: rgba(255, 248, 234, 0.34);
  --concrete-aurora-spot-2: rgba(96, 79, 60, 0.2);

  --concrete-blob-1-a: rgba(121, 105, 88, 0.28);
  --concrete-blob-1-b: rgba(121, 105, 88, 0.08);
  --concrete-blob-2-a: rgba(238, 176, 84, 0.38);
  --concrete-blob-2-b: rgba(238, 176, 84, 0.11);
  --concrete-blob-3-a: rgba(98, 84, 68, 0.25);
  --concrete-blob-3-b: rgba(98, 84, 68, 0.08);

  --concrete-grid-strong: rgba(82, 66, 50, 0.13);
  --concrete-grid-soft: rgba(82, 66, 50, 0.05);
  --concrete-grain-dark: rgba(86, 69, 51, 0.08);
  --concrete-grain-light: rgba(255, 246, 228, 0.1);
  --concrete-survey-line-strong: rgba(101, 84, 64, 0.11);
  --concrete-survey-line-soft: rgba(255, 243, 219, 0.11);
  --concrete-corner-mark: rgba(233, 164, 67, 0.17);
}

body.theme-concrete-industrial {
  --concrete-body-spot-1: rgba(255, 205, 111, 0.18);
  --concrete-body-spot-2: rgba(62, 70, 76, 0.22);
  --concrete-body-base-1: #c4c9cd;
  --concrete-body-base-2: #a6adb4;
  --concrete-body-base-3: #939ca4;

  --concrete-aurora-spot-1: rgba(255, 255, 255, 0.22);
  --concrete-aurora-spot-2: rgba(36, 44, 52, 0.24);

  --concrete-blob-1-a: rgba(52, 59, 66, 0.34);
  --concrete-blob-1-b: rgba(52, 59, 66, 0.1);
  --concrete-blob-2-a: rgba(224, 166, 71, 0.38);
  --concrete-blob-2-b: rgba(224, 166, 71, 0.11);
  --concrete-blob-3-a: rgba(42, 50, 58, 0.32);
  --concrete-blob-3-b: rgba(42, 50, 58, 0.1);

  --concrete-grid-strong: rgba(26, 31, 36, 0.16);
  --concrete-grid-soft: rgba(26, 31, 36, 0.07);
  --concrete-grain-dark: rgba(43, 47, 52, 0.09);
  --concrete-grain-light: rgba(255, 255, 255, 0.08);
  --concrete-survey-line-strong: rgba(57, 63, 70, 0.12);
  --concrete-survey-line-soft: rgba(255, 255, 255, 0.1);
  --concrete-corner-mark: rgba(238, 176, 84, 0.16);
}

body.theme-concrete-night {
  --concrete-body-spot-1: rgba(255, 196, 92, 0.16);
  --concrete-body-spot-2: rgba(45, 53, 61, 0.26);
  --concrete-body-base-1: #a7afb7;
  --concrete-body-base-2: #8f98a2;
  --concrete-body-base-3: #7d8892;

  --concrete-aurora-spot-1: rgba(255, 255, 255, 0.18);
  --concrete-aurora-spot-2: rgba(27, 34, 41, 0.28);

  --concrete-blob-1-a: rgba(44, 51, 58, 0.35);
  --concrete-blob-1-b: rgba(44, 51, 58, 0.1);
  --concrete-blob-2-a: rgba(205, 145, 54, 0.34);
  --concrete-blob-2-b: rgba(205, 145, 54, 0.1);
  --concrete-blob-3-a: rgba(34, 41, 49, 0.32);
  --concrete-blob-3-b: rgba(34, 41, 49, 0.1);

  --concrete-grid-strong: rgba(18, 23, 28, 0.18);
  --concrete-grid-soft: rgba(18, 23, 28, 0.08);
  --concrete-grain-dark: rgba(32, 37, 43, 0.11);
  --concrete-grain-light: rgba(236, 240, 244, 0.06);
  --concrete-survey-line-strong: rgba(38, 44, 50, 0.13);
  --concrete-survey-line-soft: rgba(236, 240, 244, 0.08);
  --concrete-corner-mark: rgba(205, 145, 54, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

section[id],
.hero {
  scroll-margin-top: 96px;
}

body {
  min-height: 100vh;
  font-family: "Inter", "Manrope", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(
      circle at 16% 8%,
      var(--concrete-body-spot-1),
      transparent 30%
    ),
    radial-gradient(
      circle at 88% 18%,
      var(--concrete-body-spot-2),
      transparent 38%
    ),
    linear-gradient(
      180deg,
      var(--concrete-body-base-1) 0%,
      var(--concrete-body-base-2) 48%,
      var(--concrete-body-base-3) 100%
    );
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: "Manrope", "Inter", sans-serif;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
}

h3 {
  font-size: 1.18rem;
  font-weight: 800;
}

p {
  margin: 0;
  color: var(--text-soft);
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(14, 101, 109, 0.1);
  color: var(--teal-2);
}

/* ──────────────────────────────────────────────────────────────────────────
  Background — construction blueprint / concrete mood
  ────────────────────────────────────────────────────────────────────────── */

.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 20% 14%,
      var(--concrete-aurora-spot-1),
      transparent 42%
    ),
    radial-gradient(
      circle at 76% 84%,
      var(--concrete-aurora-spot-2),
      transparent 54%
    );
}

.bg-aurora::before,
.bg-aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bg-aurora::before {
  z-index: 0;
  background-image:
    radial-gradient(circle at 18% 24%, var(--concrete-grain-light) 0 1px, transparent 1px),
    radial-gradient(circle at 74% 62%, var(--concrete-grain-dark) 0 1px, transparent 1px),
    radial-gradient(circle at 42% 82%, var(--concrete-grain-dark) 0 1px, transparent 1px);
  background-size: 16px 16px, 22px 22px, 18px 18px;
  background-position: 0 0, 7px 11px, 3px 6px;
  opacity: 0.28;
}

.bg-aurora::after {
  z-index: 1;
  background-image:
    repeating-linear-gradient(
      -34deg,
      transparent 0,
      transparent 58px,
      var(--concrete-survey-line-strong) 58px,
      var(--concrete-survey-line-strong) 60px
    ),
    repeating-linear-gradient(
      56deg,
      transparent 0,
      transparent 72px,
      var(--concrete-survey-line-soft) 72px,
      var(--concrete-survey-line-soft) 73px
    ),
    linear-gradient(
      132deg,
      transparent 0,
      transparent 90%,
      var(--concrete-corner-mark) 90%,
      var(--concrete-corner-mark) 93%,
      transparent 93%
    );
  opacity: 0.34;
}

.bg-aurora__blob,
.bg-aurora__grid {
  z-index: 2;
}

.bg-aurora__blob {
  position: absolute;
  border-radius: 28px;
  opacity: 0.22;
  animation: drift 34s linear infinite alternate;
}

.bg-aurora__blob--1 {
  width: 460px;
  height: 460px;
  top: -110px;
  left: -120px;
  background: repeating-linear-gradient(
    -35deg,
    var(--concrete-blob-1-a) 0,
    var(--concrete-blob-1-a) 12px,
    var(--concrete-blob-1-b) 12px,
    var(--concrete-blob-1-b) 24px
  );
}

.bg-aurora__blob--2 {
  width: 520px;
  height: 320px;
  top: 12%;
  right: -170px;
  border-radius: 26px;
  background: repeating-linear-gradient(
    -35deg,
    var(--concrete-blob-2-a) 0,
    var(--concrete-blob-2-a) 14px,
    var(--concrete-blob-2-b) 14px,
    var(--concrete-blob-2-b) 28px
  );
  animation-duration: 40s;
  animation-delay: -8s;
}

.bg-aurora__blob--3 {
  width: 540px;
  height: 360px;
  bottom: -150px;
  left: 32%;
  border-radius: 26px;
  background: repeating-linear-gradient(
    -35deg,
    var(--concrete-blob-3-a) 0,
    var(--concrete-blob-3-a) 10px,
    var(--concrete-blob-3-b) 10px,
    var(--concrete-blob-3-b) 20px
  );
  animation-duration: 44s;
  animation-delay: -12s;
}

.bg-aurora__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--concrete-grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--concrete-grid-strong) 1px, transparent 1px),
    linear-gradient(var(--concrete-grid-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--concrete-grid-soft) 1px, transparent 1px);
  background-size:
    72px 72px,
    72px 72px,
    18px 18px,
    18px 18px;
  background-position:
    -1px -1px,
    -1px -1px,
    -1px -1px,
    -1px -1px;
  mask-image: radial-gradient(ellipse at center, #000 44%, transparent 92%);
  opacity: 0.72;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(50px, 80px, 0) scale(1.1);
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Navigation
   ────────────────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  width: var(--container);
  margin: 12px auto 0;
  padding: 10px 14px 10px 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 22px;
  background: rgba(255, 254, 250, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow:
    0 6px 18px rgba(17, 36, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.nav.is-scrolled {
  box-shadow: 0 14px 36px rgba(17, 36, 42, 0.12);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 auto;
}

.nav__logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

.nav__logo svg {
  width: 22px;
  height: 22px;
}

.nav__brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 2px;
}

.nav__brand-name {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav__brand-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 1px;
}

.nav__links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-weight: 600;
  font-size: 0.94rem;
}

.nav__links a {
  position: relative;
  padding: 6px 2px;
  color: var(--text);
  transition: color 0.2s;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__links a:hover {
  color: var(--teal);
}

.nav__links a:hover::after,
.nav__links a.is-current::after {
  transform: scaleX(1);
}

.nav__links a.is-current {
  color: var(--teal);
}

.nav__actions {
  display: flex;
  gap: 8px;
}

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.nav__burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav.is-open .nav__burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.is-open .nav__burger span:nth-child(2) {
  opacity: 0;
}
.nav.is-open .nav__burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 980px) {
  .nav__links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 12px;
    background: rgba(255, 254, 250, 0.96);
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    margin: 0;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
  }
  .nav__links a {
    padding: 12px 10px;
    border-radius: 12px;
  }
  .nav__links a:hover {
    background: rgba(14, 101, 109, 0.08);
  }
  .nav.is-open .nav__links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav__actions {
    margin-left: auto;
  }
  .nav__actions .btn--ghost {
    display: none;
  }
  .nav__burger {
    display: flex;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Buttons
   ────────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 14px;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.25s,
    color 0.25s, border-color 0.25s;
  white-space: nowrap;
  user-select: none;
}

.btn--lg {
  padding: 14px 22px;
  font-size: 1rem;
  border-radius: 16px;
}

.btn--full {
  width: 100%;
}

.btn--primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-3) 100%);
  color: #fff;
  box-shadow:
    0 12px 24px rgba(14, 101, 109, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(14, 101, 109, 0.4);
}

.btn--glass {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.btn--glass:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn--ghost:hover {
  background: rgba(14, 101, 109, 0.08);
  border-color: rgba(14, 101, 109, 0.3);
  color: var(--teal-2);
}

/* ──────────────────────────────────────────────────────────────────────────
   Analytics notice + privacy policy
   ────────────────────────────────────────────────────────────────────────── */

.analytics-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.analytics-notice.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.analytics-notice.is-hidden {
  display: none;
}

.analytics-notice__content {
  margin: 0 auto;
  max-width: 980px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(14, 101, 109, 0.28);
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(242, 250, 249, 0.96) 60%,
    rgba(232, 245, 243, 0.98) 100%
  );
  box-shadow:
    0 20px 40px rgba(10, 30, 35, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
}

.analytics-notice__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0a4f56;
}

.analytics-notice__text {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.45;
}

.analytics-notice__actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.policy-page {
  min-height: 100vh;
  padding: 24px 0 56px;
}

.policy-wrap {
  width: min(940px, calc(100vw - 32px));
  margin: 0 auto;
}

.policy-card {
  margin-top: 20px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  box-shadow: var(--shadow);
}

.policy-card h1,
.policy-card h2 {
  margin: 0;
}

.policy-card h2 {
  margin-top: 18px;
  font-size: 1.1rem;
}

.policy-card p,
.policy-card li {
  color: var(--text-soft);
  line-height: 1.6;
}

.policy-card ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.policy-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ──────────────────────────────────────────────────────────────────────────
   Common
   ────────────────────────────────────────────────────────────────────────── */

.section {
  width: var(--container);
  margin: 64px auto 0;
}

.section__head {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.section__head h2 {
  margin: 12px 0 12px;
}

.section__head p {
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-2);
  background: rgba(14, 101, 109, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
}

.eyebrow--inline {
  background: transparent;
  padding: 0;
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(14, 101, 109, 0.18);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(14, 101, 109, 0.18);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(14, 101, 109, 0);
  }
}

.grad-text {
  background: linear-gradient(
    135deg,
    var(--teal) 0%,
    var(--teal-3) 50%,
    var(--amber) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(17, 36, 42, 0.06);
  color: var(--text);
  white-space: nowrap;
}

.badge--success {
  background: var(--green-soft);
  color: #145333;
}
.badge--warning {
  background: var(--amber-soft);
  color: #8c5607;
}
.badge--danger {
  background: var(--red-soft);
  color: #802f17;
}
.badge--info {
  background: var(--teal-soft);
  color: #0f555b;
}
.badge--neutral {
  background: rgba(17, 36, 42, 0.06);
}

/* ──────────────────────────────────────────────────────────────────────────
   Hero
   ────────────────────────────────────────────────────────────────────────── */

.hero {
  width: var(--container);
  margin: 24px auto 0;
  padding-top: 24px;
  position: relative;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding: 32px 0 64px;
}

.hero__title {
  margin: 18px 0 16px;
}

.hero__lead {
  font-size: 1.08rem;
  max-width: 540px;
  margin-bottom: 26px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 580px;
}

.hero__phone {
  position: relative;
  filter: drop-shadow(0 40px 60px rgba(10, 30, 35, 0.28));
  animation: phoneFloat 8s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-14px) rotate(-1.4deg);
  }
}

.hero__phone-glow {
  position: absolute;
  inset: 8% -12% 8% -12%;
  background: radial-gradient(
    ellipse at center,
    rgba(14, 101, 109, 0.35) 0%,
    transparent 65%
  );
  filter: blur(60px);
  z-index: -1;
}

.hero__bubble {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  z-index: 2;
  animation: bubbleFloat 6s ease-in-out infinite;
}

.hero__bubble strong {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.hero__bubble small {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.hero__bubble-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(14, 101, 109, 0.1);
  font-size: 1.1rem;
}

.hero__bubble--1 {
  left: -10px;
  top: 16%;
  animation-delay: -1s;
}

.hero__bubble--2 {
  right: -10px;
  bottom: 16%;
  animation-delay: -3.5s;
}

@keyframes bubbleFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Phone frame */
.phone-frame {
  position: relative;
  width: 320px;
  height: 640px;
  border-radius: 48px;
  background: linear-gradient(160deg, #1c2f33 0%, #0a1518 100%);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 2px #000,
    inset 0 0 0 4px #20363c;
  overflow: hidden;
}

.phone-frame--lg {
  width: 360px;
  height: 720px;
}

.phone-frame__notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  border-radius: 999px;
  background: #000;
  z-index: 2;
}

.phone-frame__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at top left,
      rgba(14, 101, 109, 0.18),
      transparent 36%
    ),
    radial-gradient(
      circle at top right,
      rgba(199, 133, 41, 0.18),
      transparent 38%
    ),
    linear-gradient(180deg, #f4eee6 0%, #ebe3d8 100%);
  padding: 56px 14px 14px;
  font-size: 13.5px;
}

.phone-frame__shadow {
  position: absolute;
  inset: 70% 6% -10% 6%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(10, 30, 35, 0.42) 0%,
    transparent 70%
  );
  filter: blur(18px);
  z-index: -1;
}

/* Hero mock content (simplified preview) */
.hero-mock {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-mock__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(
    140deg,
    rgba(16, 37, 42, 0.98),
    rgba(14, 101, 109, 0.96)
  );
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}

.hero-mock__head::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  top: -30px;
  right: -20px;
  background: radial-gradient(
    circle,
    rgba(255, 198, 118, 0.34),
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero-mock__role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.85);
}

.hero-mock__role-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b6f1d4;
  box-shadow: 0 0 0 3px rgba(132, 222, 176, 0.3);
}

.hero-mock__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.hero-mock__greeting {
  padding: 6px 4px;
}

.hero-mock__greeting strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}

.hero-mock__greeting small {
  color: var(--text-soft);
}

.hero-mock__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.hero-mock__stat {
  padding: 10px 8px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  text-align: center;
}

.hero-mock__stat-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--teal-2);
  font-family: "Manrope", sans-serif;
}

.hero-mock__stat-lbl {
  display: block;
  font-size: 0.66rem;
  color: var(--text-soft);
  margin-top: 2px;
}

.hero-mock__card {
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.hero-mock__card strong {
  font-weight: 800;
}

.hero-mock__card small {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.hero-mock__card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-mock__card-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.hero-mock__card--ghost {
  background: rgba(255, 255, 255, 0.6);
  border-style: dashed;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.hero-mock__progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(14, 101, 109, 0.12);
  overflow: hidden;
}

.hero-mock__progress span {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-3) 100%);
  border-radius: 999px;
  animation: progressFill 2s var(--ease);
}

@keyframes progressFill {
  from {
    width: 0;
  }
}

.hero-mock__sub {
  font-size: 0.74rem;
  color: var(--text-soft);
}

/* Marquee */
.marquee {
  width: 100%;
  overflow: hidden;
  margin-top: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}

.marquee__track {
  display: inline-flex;
  gap: 26px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-soft);
  animation: marquee 32s linear infinite;
}

.marquee__track span {
  display: inline-block;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Stats
   ────────────────────────────────────────────────────────────────────────── */

.section--stats {
  margin-top: 32px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    rgba(13, 43, 47, 0.98) 0%,
    rgba(16, 86, 91, 0.94) 100%
  );
  color: var(--text-inverse);
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
}

.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 10% 30%,
      rgba(255, 210, 143, 0.18),
      transparent 36%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(132, 222, 214, 0.18),
      transparent 38%
    );
  pointer-events: none;
}

.stats__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px;
}

.stats__item + .stats__item {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.stats__num {
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}

.stats__suffix {
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  font-weight: 800;
  margin-left: 2px;
  color: #ffd693;
}

.stats__lbl {
  margin-top: 8px;
  font-size: 0.86rem;
  color: rgba(245, 239, 230, 0.8);
}

@media (max-width: 720px) {
  .stats {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 18px 20px;
  }
  .stats__item {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 16px;
    padding: 14px 0;
  }
  .stats__item + .stats__item {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  .stats__num {
    font-size: 2.2rem;
    flex: 0 0 auto;
    min-width: 48px;
    text-align: center;
  }
  .stats__lbl {
    margin-top: 0;
    font-size: 0.88rem;
    line-height: 1.35;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Features
   ────────────────────────────────────────────────────────────────────────── */

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

.features__swipe-hint {
  display: none;
  margin: 10px auto 0;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(14, 101, 109, 0.24);
  background: rgba(14, 101, 109, 0.07);
  color: #0a4f56;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.feature {
  position: relative;
  padding: 26px 24px 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s,
    border-color 0.35s;
  overflow: hidden;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    400px circle at var(--mx, 0) var(--my, 0),
    rgba(14, 101, 109, 0.08),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.feature::after {
  content: "";
  position: absolute;
  top: 0;
  right: -28px;
  width: 120px;
  height: 26px;
  transform: rotate(22deg);
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 205, 87, 0.52) 0,
    rgba(255, 205, 87, 0.52) 10px,
    rgba(15, 53, 78, 0.52) 10px,
    rgba(15, 53, 78, 0.52) 20px
  );
  opacity: 0.24;
  pointer-events: none;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.feature:hover::before {
  opacity: 1;
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal-2);
  margin-bottom: 14px;
}

.feature__icon[data-tone="amber"] {
  background: var(--amber-soft);
  color: var(--amber-2);
}
.feature__icon[data-tone="green"] {
  background: var(--green-soft);
  color: #1f5a3a;
}
.feature__icon[data-tone="violet"] {
  background: var(--violet-soft);
  color: #3d3284;
}
.feature__icon[data-tone="rose"] {
  background: var(--rose-soft);
  color: #8a2e54;
}

.feature h3 {
  margin-bottom: 8px;
}

.feature p {
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.feature__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature__list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.feature__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal-soft);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3.5 7.2l2.4 2.4 4.6-5' stroke='%230a4f56' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}

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

@media (max-width: 720px) {
  .features__swipe-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .features__swipe-hint::before {
    content: "";
    width: 16px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(14, 101, 109, 0.35), rgba(14, 101, 109, 0.95), rgba(14, 101, 109, 0.35));
    animation: swipePulse 1.6s var(--ease) infinite;
  }

  .features {
    --feature-card-w: min(86vw, 360px);
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: var(--feature-card-w);
    gap: 14px;
    overflow-x: auto;
    padding: 6px calc((100vw - var(--feature-card-w)) / 2) 18px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: calc((100vw - var(--feature-card-w)) / 2);
    overscroll-behavior-x: contain;
    overscroll-behavior-y: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
  }

  .features::-webkit-scrollbar {
    display: none;
  }

  .feature {
    scroll-snap-align: center;
    min-height: 100%;
    padding: 22px 20px 24px;
    border-radius: 24px;
    border: 1px solid rgba(14, 101, 109, 0.24);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 249, 248, 0.72) 100%),
      repeating-linear-gradient(0deg, rgba(16, 54, 68, 0.03) 0 1px, transparent 1px 22px);
    box-shadow:
      0 14px 28px rgba(11, 34, 40, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.78);
    transform: none;
  }

  .feature:hover {
    transform: none;
  }

  .feature:hover::before {
    opacity: 0;
  }
}

@keyframes swipePulse {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.7;
  }
  50% {
    transform: translateX(3px);
    opacity: 1;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Mini App demo
   ────────────────────────────────────────────────────────────────────────── */

.miniapp-demo {
  padding: 28px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 255, 255, 0.4) 100%
  );
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.miniapp-demo__role {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-weight: 600;
}

.role-switch {
  display: inline-flex;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}

.role-switch__btn {
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px;
  color: var(--text-soft);
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.role-switch__btn.is-active {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-3) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 101, 109, 0.3);
}

.miniapp-demo__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: start;
}

.miniapp-demo__device {
  position: relative;
  justify-self: center;
}

.miniapp-demo__device .phone-frame {
  filter: drop-shadow(0 30px 50px rgba(10, 30, 35, 0.22));
}

.miniapp-demo__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.miniapp-demo__side-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.miniapp-demo__side-head small {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.miniapp-intro {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.miniapp-intro__lead {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.miniapp-intro__note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(14, 101, 109, 0.22);
  background: linear-gradient(
    180deg,
    rgba(14, 101, 109, 0.09) 0%,
    rgba(14, 101, 109, 0.04) 100%
  );
  color: #0f555b;
  font-size: 0.95rem;
  line-height: 1.45;
}

.miniapp-intro__note strong {
  color: #0a4f56;
}

.miniapp-intro__hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.section-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.section-tab {
  position: relative;
  text-align: left;
  padding: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: transform 0.2s var(--ease), border-color 0.25s, background 0.25s,
    box-shadow 0.25s;
}

.section-tab:hover {
  border-color: rgba(14, 101, 109, 0.32);
  transform: translateY(-2px);
}

.section-tab.is-active {
  background: linear-gradient(180deg, #fffef9 0%, #eaf7f5 100%);
  border-color: rgba(14, 101, 109, 0.34);
  box-shadow: 0 8px 22px rgba(14, 101, 109, 0.12);
}

.section-tab__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.section-tab__icon svg {
  width: 18px;
  height: 18px;
}

.section-tab__title {
  font-weight: 800;
  font-size: 0.95rem;
}

.section-tab__cap {
  display: block;
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 2px;
}

@media (max-width: 980px) {
  .miniapp-demo__inner {
    grid-template-columns: 1fr;
  }
  .miniapp-demo__device {
    order: 1;
  }
  .miniapp-demo__side {
    order: 2;
  }
}

/* Mini App rendered screens */
.phone-frame__screen {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  contain: paint;
  scrollbar-width: none;
}

.phone-frame__screen::-webkit-scrollbar {
  display: none;
}

.ma {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.ma__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 18px;
  background: linear-gradient(
    140deg,
    rgba(16, 37, 42, 0.98),
    rgba(14, 101, 109, 0.96)
  );
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}

.ma__head::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  top: -50px;
  right: -30px;
  background: radial-gradient(
    circle,
    rgba(255, 198, 118, 0.32),
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.ma__name {
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.ma__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(245, 239, 230, 0.92);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.ma__pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  flex: 0 0 auto;
}

.ma__pill-icon svg {
  width: 13px;
  height: 13px;
}

/* Defensive: any SVG inside the Mini App without explicit sizing
   should not blow up to its 300x150 intrinsic default. */
.ma svg {
  display: inline-block;
  width: 1em;
  height: 1em;
}

.ma .ma__tab-icon svg,
.ma .ma__kpi-icon svg,
.ma .ma__sectionCard-icon svg,
.ma .ma__iconBtn svg,
.ma .ma__metaChip svg,
.ma .ma__voiceMic svg,
.ma .ma__empty-icon svg,
.ma .ma__pill-icon svg {
  width: var(--ic-w, 16px);
  height: var(--ic-h, 16px);
}

.ma .ma__tab-icon { --ic-w: 16px; --ic-h: 16px; }
.ma .ma__kpi-icon { --ic-w: 14px; --ic-h: 14px; }
.ma .ma__sectionCard-icon { --ic-w: 18px; --ic-h: 18px; }
.ma .ma__iconBtn { --ic-w: 16px; --ic-h: 16px; }
.ma .ma__metaChip { --ic-w: 12px; --ic-h: 12px; }
.ma .ma__voiceMic { --ic-w: 28px; --ic-h: 28px; }
.ma .ma__empty-icon { --ic-w: 18px; --ic-h: 18px; }
.ma .ma__pill-icon { --ic-w: 13px; --ic-h: 13px; }

.ma__pageHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.ma__pageHead h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
}

.ma__pageHead small {
  color: var(--text-muted);
  font-size: 0.74rem;
}

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

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

/* Section tabs (inside the phone, mirrors miniapp App.tsx) */
.ma__tabs {
  position: relative;
  overflow: hidden;
  padding: 2px 0;
}

.ma__tabs-track {
  display: inline-flex;
  align-items: stretch;
  gap: 6px;
  width: max-content;
  animation: maTabsLoop 44s linear infinite;
  will-change: transform;
}

.ma__tabs:hover .ma__tabs-track,
.ma__tabs:active .ma__tabs-track {
  animation-play-state: paused;
}

@keyframes maTabsLoop {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.ma__tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 10px 12px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  text-align: left;
  min-height: 88px;
  min-width: 156px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.ma__tab:hover {
  transform: translateY(-1px);
}

.ma__tab.is-active {
  background: linear-gradient(180deg, #fffef9 0%, #eaf7f5 100%);
  border-color: rgba(14, 101, 109, 0.28);
}

.ma__tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(17, 36, 42, 0.06);
  color: var(--teal-2);
}

.ma__tab-icon svg {
  width: 16px;
  height: 16px;
}

.ma__tab-title {
  font-weight: 800;
  font-size: 0.86rem;
  line-height: 1.1;
}

.ma__tab-cap {
  font-size: 0.7rem;
  line-height: 1.2;
  color: var(--text-soft);
}

@media (prefers-reduced-motion: reduce) {
  .ma__tabs-track {
    animation: none;
  }
}

/* KPI tile — wide, low-profile rectangular card with bottom accent bar */
.ma__kpi {
  position: relative;
  padding: 9px 12px 11px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-template-rows: auto auto auto;
  column-gap: 8px;
  row-gap: 1px;
}

.ma__kpi-icon {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(17, 36, 42, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  align-self: start;
}

.ma__kpi-num {
  grid-row: 1 / 2;
  grid-column: 3 / 4;
  justify-self: end;
  align-self: center;
  font-family: "Manrope", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.ma__kpi-num--accent {
  color: var(--amber-2);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.ma__kpi-title {
  grid-row: 2 / 3;
  grid-column: 1 / 4;
  font-weight: 800;
  font-size: 0.84rem;
  line-height: 1.15;
  margin-top: 1px;
}

.ma__kpi-cap {
  grid-row: 3 / 4;
  grid-column: 1 / 4;
  font-size: 0.66rem;
  line-height: 1.25;
  color: var(--text-soft);
}

.ma__kpi::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: var(--accent, var(--teal));
  opacity: 0.85;
}

.ma__kpi[data-tone="teal"] {
  --accent: var(--teal);
}
.ma__kpi[data-tone="amber"] {
  --accent: var(--amber);
}
.ma__kpi[data-tone="green"] {
  --accent: var(--green);
}
.ma__kpi[data-tone="red"] {
  --accent: var(--red);
}
.ma__kpi[data-tone="violet"] {
  --accent: var(--violet);
}

.ma__chip {
  padding: 10px 8px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  text-align: center;
}

.ma__chip strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--teal-2);
  font-family: "Manrope", sans-serif;
}

.ma__chip small {
  display: block;
  font-size: 0.66rem;
  color: var(--text-soft);
  margin-top: 2px;
}

/* Section card with header (icon + eyebrow + title + actions) */
.ma__sectionCard {
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ma__sectionCard-head {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
}

.ma__sectionCard-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(17, 36, 42, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
}

.ma__sectionCard-icon svg {
  width: 18px;
  height: 18px;
}

.ma__sectionCard-eyebrow {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1;
}

.ma__sectionCard-title {
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 2px;
  line-height: 1.1;
}

.ma__sectionCard-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ma__iconBtn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(17, 36, 42, 0.05);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: background 0.2s;
}

.ma__iconBtn:hover {
  background: rgba(14, 101, 109, 0.12);
  color: var(--teal-2);
}

.ma__iconBtn svg {
  width: 16px;
  height: 16px;
}

/* Inner task card */
.ma__taskCard {
  padding: 14px;
  border-radius: 18px;
  background: rgba(17, 36, 42, 0.025);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ma__taskCard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ma__taskCard-title {
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.ma__taskCard-desc {
  font-size: 0.86rem;
  color: var(--text-soft);
}

.ma__metaChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ma__metaChip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 36, 42, 0.05);
  font-size: 0.74rem;
  color: var(--text);
  font-weight: 600;
}

.ma__metaChip svg {
  width: 12px;
  height: 12px;
  color: var(--text-soft);
}

.ma__accordion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(17, 36, 42, 0.045);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text);
  cursor: pointer;
}

.ma__accordion-arrow {
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* Empty state — dashed card with sparkle icon */
.ma__empty {
  padding: 16px;
  border-radius: 18px;
  background: transparent;
  border: 1px dashed rgba(17, 36, 42, 0.16);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ma__empty-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(17, 36, 42, 0.05);
  color: var(--teal-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ma__empty-icon svg {
  width: 18px;
  height: 18px;
}

.ma__empty-title {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.ma__empty-text {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.4;
}

.ma__card {
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ma__card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.ma__card-title {
  font-weight: 800;
  font-size: 0.94rem;
}

.ma__card-meta {
  font-size: 0.74rem;
  color: var(--text-soft);
}

.ma__cardActions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.ma__btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal-2);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(14, 101, 109, 0.18);
}

.ma__btn--primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-3) 100%);
  color: #fff;
  border-color: transparent;
}

.ma__btn--ghost {
  background: rgba(17, 36, 42, 0.05);
  color: var(--text);
  border-color: var(--line);
}

.ma__progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(14, 101, 109, 0.12);
  overflow: hidden;
}

.ma__progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-3) 100%);
  border-radius: 999px;
}

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

.ma__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 4px 0 -2px;
}

.ma__divider::before,
.ma__divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.ma__voiceCard {
  position: relative;
  padding: 18px 14px;
  border-radius: 18px;
  background: linear-gradient(140deg, #112e33 0%, #0e656d 100%);
  color: var(--text-inverse);
  text-align: center;
  overflow: hidden;
}

.ma__voiceCard::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 215, 142, 0.22),
      transparent 50%
    );
  pointer-events: none;
}

.ma__voiceMic {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  color: #fff;
}

.ma__voiceMic svg {
  width: 28px;
  height: 28px;
}

.ma__voiceMic::before,
.ma__voiceMic::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: pulseRing 2.4s ease-out infinite;
}

.ma__voiceMic::after {
  animation-delay: -1.2s;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.ma__voiceTitle {
  font-weight: 800;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.ma__voiceCap {
  font-size: 0.8rem;
  color: rgba(245, 239, 230, 0.78);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.ma__voiceWave {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 3px;
  height: 26px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.ma__voiceWave span {
  width: 3px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}

.ma__voiceWave span:nth-child(1) {
  animation-delay: -0.1s;
  height: 40%;
}
.ma__voiceWave span:nth-child(2) {
  animation-delay: -0.3s;
  height: 70%;
}
.ma__voiceWave span:nth-child(3) {
  animation-delay: -0.5s;
  height: 90%;
}
.ma__voiceWave span:nth-child(4) {
  animation-delay: -0.7s;
  height: 60%;
}
.ma__voiceWave span:nth-child(5) {
  animation-delay: -0.9s;
  height: 80%;
}
.ma__voiceWave span:nth-child(6) {
  animation-delay: -1.1s;
  height: 50%;
}
.ma__voiceWave span:nth-child(7) {
  animation-delay: -1.3s;
  height: 75%;
}
.ma__voiceWave span:nth-child(8) {
  animation-delay: -1.5s;
  height: 40%;
}

@keyframes wave {
  0%,
  100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}

.ma__formField {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.ma__formField label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.ma__formField input,
.ma__formField textarea,
.ma__formField select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  padding: 0;
  outline: none;
}

.ma__bottomNav {
  position: sticky;
  bottom: 0;
  margin: auto -14px -14px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: rgba(255, 254, 250, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.ma__bottomBtn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  border-radius: 8px;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
}

.ma__bottomBtn.is-active {
  color: var(--teal-2);
  background: var(--teal-soft);
}

.ma__bottomBtn-icon {
  font-size: 1rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   Bot demo (Telegram & MAX)
   ────────────────────────────────────────────────────────────────────────── */

.bot-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.bot-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-soft);
  transition: transform 0.2s var(--ease), border-color 0.25s, color 0.25s,
    background 0.25s;
}

.bot-tab:hover {
  transform: translateY(-2px);
}

.bot-tab.is-active {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-3) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(14, 101, 109, 0.28);
}

.bot-tab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(14, 101, 109, 0.1);
  color: var(--teal-2);
}

.bot-tab.is-active .bot-tab__icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.bot-tab__icon--max {
  background: transparent;
  color: inherit;
  overflow: hidden;
}

.bot-tab.is-active .bot-tab__icon--max {
  background: transparent;
}

.bot-tab__icon--max .max-brand-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.bot-tabs__role {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--text-soft);
  font-weight: 600;
}

.role-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.role-pill.is-active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.bot-demo {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.bot-demo__chat {
  display: flex;
  flex-direction: column;
  height: 880px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: background 0.3s;
}

.bot-demo[data-platform="max"] .bot-demo__chat {
  background: #ffffff;
}

.bot-demo__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #229ed9 0%, #1d8fc7 100%);
  color: #fff;
}

.bot-demo[data-platform="max"] .bot-demo__head {
  background: #ffffff;
  color: #18181b;
  border-bottom: 1px solid rgba(120, 80, 200, 0.12);
}

.bot-demo[data-platform="max"] .bot-demo__avatar {
  background: transparent;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
}

.bot-demo[data-platform="max"] .bot-demo__avatar .max-brand-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.bot-demo[data-platform="max"] .bot-demo__title small {
  color: #71717a;
}

.bot-demo[data-platform="max"] .bot-demo__menu {
  background: rgba(120, 80, 200, 0.08);
  color: #5b3fa0;
}

.bot-demo__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.86rem;
}

.bot-demo__title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.bot-demo__title strong {
  font-size: 1rem;
  font-weight: 800;
}

.bot-demo__title small {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
}

.bot-demo__menu {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bot-demo__feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    radial-gradient(
      circle at 30% 10%,
      rgba(34, 158, 217, 0.06),
      transparent 50%
    ),
    #f0f4f6;
}

.bot-demo[data-platform="max"] .bot-demo__feed {
  background:
    radial-gradient(
      circle at 30% 0%,
      rgba(255, 192, 203, 0.35),
      transparent 60%
    ),
    radial-gradient(
      circle at 80% 60%,
      rgba(170, 140, 230, 0.32),
      transparent 60%
    ),
    radial-gradient(
      circle at 20% 90%,
      rgba(140, 180, 240, 0.28),
      transparent 60%
    ),
    #ede4ff;
  position: relative;
}

.bot-demo[data-platform="max"] .bot-demo__feed::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(120, 80, 200, 0.06) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(120, 80, 200, 0.05) 1px, transparent 1.4px);
  background-size: 36px 36px, 22px 22px;
  background-position: 0 0, 12px 12px;
  pointer-events: none;
}

.bot-demo[data-platform="max"] .bot-bubble--bot {
  background: rgba(255, 255, 255, 0.96);
  color: #18181b;
  box-shadow: 0 1px 3px rgba(60, 30, 110, 0.08);
}

.bot-demo__feed::-webkit-scrollbar {
  width: 6px;
}

.bot-demo__feed::-webkit-scrollbar-thumb {
  background: rgba(17, 36, 42, 0.18);
  border-radius: 999px;
}

.bot-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 1px 0 rgba(17, 36, 42, 0.04);
  white-space: pre-wrap;
  word-wrap: break-word;
  animation: bubbleIn 0.35s var(--ease);
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot-bubble--bot {
  align-self: flex-start;
  background: #fff;
  border-bottom-left-radius: 4px;
  color: var(--text);
}

.bot-bubble--user {
  align-self: flex-end;
  background: linear-gradient(135deg, #229ed9 0%, #1d8fc7 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bot-demo[data-platform="max"] .bot-bubble--user {
  background: rgba(255, 255, 255, 0.85);
  color: #18181b;
  box-shadow: 0 1px 3px rgba(60, 30, 110, 0.08);
}

.bot-demo[data-platform="max"] .bot-bubble--user::after {
  content: "✓";
  margin-left: 6px;
  font-size: 0.78rem;
  color: #5b3fa0;
}

.bot-bubble--system {
  align-self: center;
  background: rgba(17, 36, 42, 0.06);
  color: var(--text-soft);
  font-size: 0.78rem;
  text-align: center;
  border-radius: 999px;
  padding: 6px 14px;
}

.bot-bubble strong {
  font-weight: 800;
}

.bot-bubble code {
  background: rgba(14, 101, 109, 0.1);
  color: var(--teal-2);
  padding: 0 4px;
  border-radius: 4px;
}

.bot-bubble--user code {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.bot-bubble__inline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(17, 36, 42, 0.08);
}

.bot-bubble__inline button {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(34, 158, 217, 0.12);
  color: #1574a6;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(34, 158, 217, 0.25);
  flex: 1 1 auto;
  transition: background 0.2s, transform 0.15s;
}

.bot-demo[data-platform="max"] .bot-bubble__inline button {
  background: rgba(120, 80, 200, 0.12);
  color: #5b3fa0;
  border-color: rgba(120, 80, 200, 0.25);
}

.bot-bubble__inline button:hover {
  background: rgba(34, 158, 217, 0.22);
  transform: translateY(-1px);
}

.bot-bubble__voice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.bot-bubble__voice-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.bot-bubble__voice-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
}

.bot-bubble__voice-wave span {
  flex: 1;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.7;
}

.bot-bubble__photo {
  width: 100%;
  max-width: 240px;
  height: 140px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #2a3f44 0%, #1a2c30 100%),
    linear-gradient(45deg, #c78529 0%, #a96d18 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
}

.bot-bubble__photo::after {
  content: "🏗 фото с объекта";
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

.bot-typing {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}

.bot-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #229ed9;
  opacity: 0.5;
  animation: typing 1.2s ease-in-out infinite;
}

.bot-demo[data-platform="max"] .bot-typing span {
  background: #7c5dd1;
}

.bot-typing span:nth-child(2) {
  animation-delay: -0.4s;
}
.bot-typing span:nth-child(3) {
  animation-delay: -0.8s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.bot-demo__keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: #ddd5cc;
  border-top: 1px solid var(--line);
}

.bot-demo[data-platform="max"] .bot-demo__keyboard {
  background: #ffffff;
  padding: 10px 14px 12px;
  gap: 8px;
  border-top: 1px solid rgba(120, 80, 200, 0.1);
}

.bot-demo[data-platform="max"] .bot-key-row {
  gap: 8px;
}

.bot-demo[data-platform="max"] .bot-key {
  background: linear-gradient(180deg, #8a6fe0 0%, #7c5dd1 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 14px 10px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 2px 0 rgba(60, 30, 110, 0.18);
}

.bot-demo[data-platform="max"] .bot-key:hover {
  background: linear-gradient(180deg, #9379e6 0%, #8366d8 100%);
}

.bot-key-row {
  display: flex;
  gap: 6px;
}

.bot-key {
  flex: 1;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(17, 36, 42, 0.12);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-key:hover {
  background: #fff;
}

.bot-key:active {
  transform: scale(0.97);
}

.bot-demo__compose {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.bot-demo__compose input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f6f7;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
}

.bot-demo__compose input:focus {
  border-color: var(--teal);
}

.bot-demo__attach,
.bot-demo__voice {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f4f6f7;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.bot-demo__attach:hover,
.bot-demo__voice:hover {
  background: #e5e9ea;
}

.bot-demo__send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #229ed9 0%, #1d8fc7 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

.bot-demo[data-platform="max"] .bot-demo__compose {
  background: #ffffff;
  border-top: 1px solid rgba(120, 80, 200, 0.1);
  gap: 6px;
}

.bot-demo[data-platform="max"] .bot-demo__compose input {
  background: #f4f0fa;
  border-color: transparent;
}

.bot-demo[data-platform="max"] .bot-demo__compose input::placeholder {
  color: #a89bc4;
}

.bot-demo[data-platform="max"] .bot-demo__attach,
.bot-demo[data-platform="max"] .bot-demo__voice {
  background: transparent;
  color: #71717a;
}

.bot-demo[data-platform="max"] .bot-demo__attach:hover,
.bot-demo[data-platform="max"] .bot-demo__voice:hover {
  background: rgba(120, 80, 200, 0.08);
}

.bot-demo[data-platform="max"] .bot-demo__send {
  background: linear-gradient(180deg, #8a6fe0 0%, #7c5dd1 100%);
  box-shadow: 0 2px 8px rgba(120, 80, 200, 0.32);
}

/* MAX-style menu button on the left of the compose */
.bot-demo[data-platform="max"] .bot-demo__compose::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #8a6fe0 0%, #7c5dd1 100%)
    no-repeat center / 16px 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect x='1' y='1' width='6' height='6' rx='1' fill='white'/><rect x='9' y='1' width='6' height='6' rx='1' fill='white'/><rect x='1' y='9' width='6' height='6' rx='1' fill='white'/><rect x='9' y='9' width='6' height='6' rx='1' fill='white'/></svg>"), linear-gradient(180deg, #8a6fe0 0%, #7c5dd1 100%);
  background-position: center, 0 0;
  background-size: 16px 16px, cover;
  background-repeat: no-repeat, no-repeat;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(120, 80, 200, 0.28);
}

.bot-demo__send:hover {
  transform: scale(1.08);
}

.bot-demo__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(12px);
}

.bot-demo__panel h3 {
  margin: 0 0 6px;
}

.bot-demo__hints {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bot-demo__hints button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.bot-demo__hints button:hover {
  background: rgba(14, 101, 109, 0.08);
  border-color: rgba(14, 101, 109, 0.3);
  transform: translateX(2px);
}

.bot-demo__cmds {
  margin-top: 4px;
}

.bot-demo__cmds h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bot-demo__cmds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}

.bot-demo__cmds-grid div {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(17, 36, 42, 0.08);
}

.bot-demo__cmds-grid code {
  font-size: 0.82rem;
  padding: 0 4px;
}

.bot-demo__platforms {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.bot-demo__platform {
  flex: 1;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.bot-demo__platform small {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.bot-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.bot-tag--tg {
  background: rgba(34, 158, 217, 0.16);
  color: #1574a6;
}

.bot-tag--max {
  background: rgba(120, 80, 200, 0.16);
  color: #5b3fa0;
}

@media (max-width: 980px) {
  .bot-demo {
    grid-template-columns: 1fr;
  }
  .bot-demo__chat {
    height: 760px;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Steps
   ────────────────────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  right: 24px;
  height: 4px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--amber) 100%);
  border-radius: 0 0 8px 8px;
}

.step__num {
  font-family: "Manrope", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--teal);
  opacity: 0.32;
  margin-bottom: 8px;
}

.step h3 {
  margin-bottom: 10px;
}

.step p {
  font-size: 0.95rem;
}

.step code {
  font-size: 0.86em;
}

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

/* ──────────────────────────────────────────────────────────────────────────
   Pricing
   ────────────────────────────────────────────────────────────────────────── */

.billing-toggle {
  display: inline-flex;
  margin-top: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}

.billing-toggle__btn {
  padding: 8px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px;
  color: var(--text-soft);
  transition: background 0.25s, color 0.25s;
}

.billing-toggle__btn.is-active {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-3) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 101, 109, 0.3);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.plans--single {
  grid-template-columns: minmax(280px, 460px);
  justify-content: center;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(14px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.plan:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.plan--popular {
  background: linear-gradient(
    180deg,
    rgba(13, 43, 47, 0.98) 0%,
    rgba(16, 86, 91, 0.96) 100%
  );
  color: var(--text-inverse);
  border-color: transparent;
  transform: translateY(-8px);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}

.plan--popular::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(255, 198, 118, 0.34),
      transparent 40%
    ),
    radial-gradient(
      circle at 0% 100%,
      rgba(132, 222, 214, 0.18),
      transparent 50%
    );
  pointer-events: none;
}

.plan--popular h3,
.plan--popular .plan__amount,
.plan--popular .plan__period,
.plan--popular .plan__hint {
  color: #fff;
}

.plan--popular .plan__features li {
  color: rgba(245, 239, 230, 0.9);
}

.plan--popular .plan__features li::before {
  background: rgba(255, 215, 142, 0.22);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3.5 7.2l2.4 2.4 4.6-5' stroke='%23ffd693' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.plan__ribbon {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #ffc266 0%, #c78529 100%);
  color: #3d2308;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: 999px;
  z-index: 1;
}

.plan__head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 12px;
}

.plan__title h3 {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.plan__hint {
  display: block;
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 4px;
}

.plan__price {
  text-align: right;
}

.plan__amount {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}

.plan__period {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.plan__features {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan__features li {
  position: relative;
  padding-left: 26px;
  font-size: 0.94rem;
  color: var(--text-soft);
}

.plan__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal-soft);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3.5 7.2l2.4 2.4 4.6-5' stroke='%230a4f56' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}

.plan .btn {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.plan__cta-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.plan--popular .btn--primary {
  background: linear-gradient(135deg, #ffc266 0%, #c78529 100%);
  color: #3d2308;
  box-shadow:
    0 12px 24px rgba(199, 133, 41, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.plans-note {
  margin: 24px auto 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-soft);
}

@media (max-width: 980px) {
  .plans {
    grid-template-columns: 1fr;
  }
  .plan--popular {
    transform: none;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   FAQ
   ────────────────────────────────────────────────────────────────────────── */

.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 860px;
  margin: 0 auto;
}

.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  backdrop-filter: blur(12px);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.faq__item[open] {
  border-color: rgba(14, 101, 109, 0.24);
  box-shadow: 0 8px 22px rgba(14, 101, 109, 0.08);
}

.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}

.faq__item summary::-webkit-details-marker,
.faq__item summary::marker {
  display: none;
  content: "";
}

.faq__item summary::after {
  content: "+";
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--teal-2);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-soft);
  border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
  background: var(--amber-soft);
  color: var(--amber-2);
}

.faq__item p {
  margin-top: 12px;
  color: var(--text-soft);
}

/* ──────────────────────────────────────────────────────────────────────────
   CTA
   ────────────────────────────────────────────────────────────────────────── */

.section--cta {
  margin-top: 80px;
  margin-bottom: 60px;
}

.cta {
  position: relative;
  padding: 56px 44px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(
    135deg,
    rgba(13, 43, 47, 0.99) 0%,
    rgba(16, 86, 91, 0.96) 100%
  );
  color: var(--text-inverse);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-deep);
}

.cta__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta__bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
}

.cta__bg span:nth-child(1) {
  width: 360px;
  height: 360px;
  top: -100px;
  left: -80px;
  background: radial-gradient(circle, #ffd693 0%, transparent 70%);
}

.cta__bg span:nth-child(2) {
  width: 320px;
  height: 320px;
  bottom: -120px;
  right: -100px;
  background: radial-gradient(circle, #84ded6 0%, transparent 70%);
}

.cta__bg span:nth-child(3) {
  width: 480px;
  height: 480px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(199, 133, 41, 0.18) 0%,
    transparent 60%
  );
}

.cta__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.cta h2 {
  color: #fff;
  margin-bottom: 16px;
}

.cta p {
  color: rgba(245, 239, 230, 0.9);
  font-size: 1.08rem;
  margin-bottom: 28px;
}

.cta__actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.cta .btn--primary {
  background: linear-gradient(135deg, #ffc266 0%, #c78529 100%);
  color: #3d2308;
}

.cta .btn--glass {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}

.cta .btn--glass:hover {
  background: rgba(255, 255, 255, 0.24);
}

.cta__legal {
  display: block;
  font-size: 0.84rem;
  color: rgba(245, 239, 230, 0.6);
}

@media (max-width: 720px) {
  .cta {
    padding: 36px 22px;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────────────────────────────────── */

.footer {
  width: var(--container);
  margin: 24px auto 24px;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(12px);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 32px;
}

.footer__brand p {
  margin-top: 12px;
  font-size: 0.94rem;
}

.footer__col h4 {
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.footer__col a {
  display: block;
  padding: 4px 0;
  font-size: 0.94rem;
  color: var(--text);
  font-weight: 600;
  transition: color 0.2s;
}

.footer__col a:hover {
  color: var(--teal);
}

.footer__bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer__brand {
    grid-column: span 2;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Reveal animation
   ────────────────────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Hero responsive
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 0 36px;
  }
  .hero__visual {
    min-height: 540px;
  }
}

@media (max-width: 540px) {
  .phone-frame {
    width: 280px;
    height: 560px;
  }
  .phone-frame--lg {
    width: 300px;
    height: 600px;
  }
  .hero__bubble {
    display: none;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Mobile fit — eliminate horizontal scroll on small screens
   ────────────────────────────────────────────────────────────────────────── */

html,
body {
  max-width: 100%;
}

html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

/* Phones must never exceed their container */
.phone-frame {
  max-width: 100%;
}

.phone-frame__screen {
  max-width: 100%;
}

@media (max-width: 720px) {
  :root {
    --container: min(1240px, calc(100vw - 24px));
  }

  .nav {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 18px;
  }

  .nav__brand-tag {
    display: none;
  }

  .section {
    margin-top: 48px;
  }

  .section__head {
    margin-bottom: 24px;
  }

  .hero {
    margin: 16px auto 0;
  }

  .hero__inner {
    padding: 12px 0 24px;
    gap: 24px;
  }

  .hero__visual {
    min-height: 0;
  }

  .miniapp-demo,
  .bot-demo__panel,
  .footer {
    padding: 18px;
    border-radius: 22px;
  }

  .miniapp-demo__role,
  .bot-tabs {
    gap: 8px;
  }

  .bot-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .bot-tab {
    justify-content: center;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .bot-tab__icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }

  .bot-tabs__role {
    grid-column: 1 / -1;
    margin-left: 0;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    gap: 8px;
  }

  .bot-tabs__role::-webkit-scrollbar {
    display: none;
  }

  .bot-tabs__role > span {
    flex: 0 0 auto;
    margin-right: 2px;
  }

  .role-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .role-switch__btn,
  .billing-toggle__btn {
    padding: 7px 12px;
    font-size: 0.86rem;
  }

  .bot-demo__chat {
    height: 700px;
    border-radius: 22px;
  }

  .bot-demo__panel {
    display: none;
  }

  .bot-demo__cmds-grid {
    grid-template-columns: 1fr;
  }

  .feature,
  .step,
  .plan,
  .faq__item {
    padding: 20px 18px;
    border-radius: 22px;
  }

  .stats {
    padding: 18px 12px;
    border-radius: 22px;
  }

  .cta {
    padding: 32px 18px;
    border-radius: 24px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer__brand {
    grid-column: span 1;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Section titles and lead — compact */
  h1 {
    letter-spacing: -0.03em;
  }
  .hero__title,
  h2 {
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .hero__copy {
    text-align: center;
  }

  .hero__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__cta {
    justify-content: center;
  }

  .analytics-notice {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .analytics-notice__content {
    padding: 14px;
    border-radius: 16px;
  }

  .analytics-notice__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .policy-card {
    padding: 18px;
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  :root {
    --container: min(1240px, calc(100vw - 16px));
  }

  .nav {
    margin-top: 8px;
    padding: 6px 8px;
  }

  .nav__brand-name {
    font-size: 1rem;
  }

  .nav__logo {
    width: 34px;
    height: 34px;
  }

  .btn {
    padding: 9px 12px;
    font-size: 0.88rem;
  }

  .btn--lg {
    padding: 12px 16px;
    font-size: 0.94rem;
  }

  .miniapp-demo {
    padding: 14px;
  }

  .miniapp-demo__device .phone-frame--lg,
  .miniapp-demo__device .phone-frame {
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 9 / 18;
  }

  .hero__phone .phone-frame {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 9 / 18;
  }

  .phone-frame__screen {
    padding: 48px 10px 10px;
    font-size: 12.5px;
  }

  .ma {
    gap: 8px;
    padding-bottom: 8px;
  }

  .ma__head {
    padding: 8px 10px;
    gap: 6px;
  }

  .ma__pill {
    padding: 4px 8px 4px 4px;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .ma__tabs {
    padding: 1px 0;
  }

  .ma__tabs-track {
    gap: 5px;
    animation-duration: 38s;
  }

  .ma__tab {
    min-height: 80px;
    min-width: 144px;
    padding: 8px 8px 10px;
    border-radius: 14px;
  }

  .ma__tab-title {
    font-size: 0.8rem;
  }

  .ma__tab-cap {
    font-size: 0.66rem;
  }

  .ma__kpi {
    padding: 8px 10px 10px;
  }

  .ma__kpi-num {
    font-size: 1.2rem;
  }

  .ma__kpi-title {
    font-size: 0.8rem;
  }

  .ma__kpi-cap {
    font-size: 0.64rem;
  }

  .bot-demo__chat {
    height: 640px;
  }

  .bot-demo__compose input {
    font-size: 0.86rem;
  }

  .bot-key {
    font-size: 0.78rem;
    padding: 10px 6px;
  }

  .stats {
    grid-template-columns: 1fr;
    padding: 16px 10px;
  }

  .stats__item {
    border-left: none !important;
    padding: 10px 0;
  }

  .stats__num {
    font-size: 1.8rem;
  }

  .feature h3,
  .step h3,
  .plan h3 {
    font-size: 1.05rem;
  }

  .plan {
    padding: 22px 18px;
  }

  .plan__amount {
    font-size: 1.4rem;
  }

  .plan__ribbon {
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  .cta__actions {
    width: 100%;
  }

  .cta .btn {
    width: 100%;
  }

  .marquee__track {
    font-size: 0.86rem;
    gap: 18px;
  }

  /* FAQ summaries should wrap */
  .faq__item summary {
    font-size: 0.96rem;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .hero__phone .phone-frame {
    max-width: 240px;
  }
  .miniapp-demo__device .phone-frame {
    max-width: 280px;
  }
  .ma__tabs-track {
    animation-duration: 32s;
  }
  .ma__row.ma__row--2 {
    grid-template-columns: 1fr;
  }
}
