/* Biznesbot Premium V7: final page composition and legal document styling. */

.hero-shell {
  padding-bottom: 62px;
}

.hero-product-links {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-product-links a {
  min-height: 54px;
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.hero-product-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 255, 90, 0.48);
  background: rgba(255, 255, 255, 0.12);
}

.hero-product-links span {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}

.hero-product-links small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.2;
}

@media (max-width: 520px) {
  .hero-product-links a {
    flex-basis: 120px;
  }
}

@media (max-width: 350px) {
  .hero-product-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .hero-product-links a {
    min-height: 46px;
    align-items: center;
    border-radius: 12px;
    padding: 8px 4px;
    text-align: center;
  }

  .hero-product-links span {
    font-size: 11px;
  }

  .hero-product-links small {
    display: none;
  }
}

.demo-preview {
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: none;
  gap: 24px;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.demo-device-stage {
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.demo-device-stage::before {
  display: none;
}

.demo-preview-copy {
  width: 100%;
  border: 1px solid rgba(7, 17, 31, 0.09);
  border-radius: 20px;
  padding: 28px 26px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(7, 17, 31, 0.12);
}

.demo-preview-copy h3 {
  margin-top: 14px;
  font-family: var(--bb-font-display);
  font-size: 34px;
  line-height: 0.98;
}

.demo-preview-copy p {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.demo-preview-copy ul {
  gap: 8px;
  margin-top: 20px;
}

.demo-preview-copy li {
  font-size: 14px;
}

.demo-actions {
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 24px;
}

.demo-actions .btn {
  width: 100%;
}

.seo-section {
  background: var(--bb-cream);
}

.seo-card {
  gap: 64px;
  padding: 54px 0;
}

.seo-copy > p:not(.eyebrow) {
  max-width: 690px;
  font-size: 17px;
  line-height: 1.55;
}

.seo-details {
  margin-top: 22px;
}

.seo-details summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  width: auto;
  border-bottom: 1px solid rgba(7, 17, 31, 0.18);
  color: var(--bb-ink);
  font-size: 14px;
}

.seo-details summary::marker {
  content: "";
}

.seo-details summary::after {
  content: "+";
  color: var(--bb-cobalt);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.seo-details[open] summary::after {
  content: "−";
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
}

.seo-links a {
  border: 0;
  border-right: 1px solid rgba(7, 17, 31, 0.16);
  border-radius: 0;
  padding: 3px 16px;
  background: transparent;
  font-size: 13px;
}

.seo-links a:first-child {
  padding-left: 0;
}

.seo-links a:last-child {
  border-right: 0;
}

.seo-aside {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 28px 30px;
  background: var(--bb-ink);
  color: #ffffff;
  box-shadow: 0 24px 64px rgba(7, 17, 31, 0.16);
}

.seo-aside-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 18px;
}

.seo-aside-head span {
  color: var(--bb-lime);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.seo-aside-head strong {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.seo-aside p {
  grid-template-columns: 34px 1fr;
  border-bottom-color: rgba(255, 255, 255, 0.11);
  padding: 17px 0;
  color: #ffffff;
}

.seo-aside p:first-of-type {
  padding-top: 20px;
}

.seo-aside p > span {
  color: var(--bb-lime);
  font-size: 11px;
}

.seo-aside p > strong {
  color: #ffffff;
  font-size: 16px;
}

.seo-aside p > small {
  color: rgba(255, 255, 255, 0.56);
}

.seo-aside > b {
  margin-top: 24px;
  color: #ffffff;
  font-family: var(--bb-font-display);
  font-size: 24px;
  font-weight: 650;
}

.legal-document {
  min-height: 100vh;
  background: var(--bb-cream);
}

.legal-document main {
  display: block;
}

.legal-page {
  padding: 34px 0 76px;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: clamp(34px, 6vw, 68px);
  background:
    linear-gradient(115deg, rgba(5, 14, 27, 0.98), rgba(7, 24, 45, 0.9)),
    var(--bb-ink);
  color: #ffffff;
  box-shadow: 0 28px 82px rgba(7, 17, 31, 0.18);
}

.legal-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -140px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(200, 255, 90, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.legal-back {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 54px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
}

.legal-back::before {
  content: "←";
  color: var(--bb-lime);
  font-size: 18px;
}

.legal-hero .eyebrow {
  position: relative;
  z-index: 1;
  color: var(--bb-lime);
}

.legal-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 650;
  line-height: 0.94;
  text-wrap: balance;
}

.legal-hero h1 > span {
  display: block;
}

.legal-lead {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 18px;
  line-height: 1.55;
}

.legal-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 38px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.legal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legal-meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bb-lime);
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.legal-card {
  min-height: 238px;
  border: 1px solid rgba(7, 17, 31, 0.09);
  border-radius: 18px;
  padding: 28px;
  background: #ffffff;
}

.legal-card > span {
  display: block;
  margin-bottom: 42px;
  color: var(--bb-emerald);
  font-size: 12px;
  font-weight: 800;
}

.legal-card h2 {
  margin: 0;
  color: var(--bb-ink);
  font-size: 28px;
  font-weight: 650;
  line-height: 1;
}

.legal-card p {
  margin: 14px 0 0;
  color: #66717e;
  font-size: 15px;
  line-height: 1.55;
}

.legal-card a {
  color: var(--bb-cobalt);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-contact-section {
  padding: 0 0 76px;
}

.legal-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
  border-radius: 20px;
  padding: 36px 40px;
  background: var(--bb-cobalt);
  color: #ffffff;
  box-shadow: 0 24px 64px rgba(23, 105, 255, 0.2);
}

.legal-contact .eyebrow {
  color: var(--bb-lime);
}

.legal-contact h2 {
  max-width: 720px;
  margin: 0;
  color: #ffffff;
  font-size: 38px;
  font-weight: 650;
  line-height: 1;
}

.legal-contact p {
  max-width: 620px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.legal-contact-actions {
  display: grid;
  gap: 9px;
  min-width: 240px;
}

.legal-contact .btn-primary {
  background: #ffffff;
  color: var(--bb-ink);
  box-shadow: none;
}

.legal-contact .btn-secondary {
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #ffffff;
}

@media (min-width: 1024px) {
  .hero-shell {
    min-height: 640px;
    padding-bottom: 62px;
  }

  .demo-section {
    min-height: calc(100svh - var(--header-height));
    padding: 34px 0;
  }

  .demo-lab {
    grid-template-columns: minmax(330px, 0.9fr) minmax(610px, 1.5fr);
    align-items: center;
    gap: 36px;
  }

  .demo-copy {
    align-self: center;
  }

  .demo-preview {
    grid-template-columns: minmax(230px, 260px) minmax(300px, 1fr);
    align-items: center;
    gap: 30px;
    min-height: 560px;
  }

  .demo-device-stage {
    height: 560px;
    min-height: 560px;
  }

  .demo-phone {
    width: clamp(230px, 18vw, 252px);
    margin: 0 auto;
  }

  .demo-preview-copy {
    min-height: 462px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    padding: 32px 30px;
  }

  .seo-card {
    grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
    align-items: center;
  }
}

@media (max-width: 1023px) {
  .demo-phone {
    width: min(374px, calc(100vw - 16px));
  }
}

/* V16: structured footer shared by the landing and service pages. */
.footer {
  padding: 48px 0 28px;
}

.footer-table {
  display: grid;
  grid-template-columns: minmax(250px, 1.3fr) repeat(3, minmax(150px, 0.75fr));
  gap: 34px;
}

.footer-brand-cell {
  min-width: 0;
}

.footer-brand-cell .brand-copy span {
  white-space: normal;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-column h2 {
  margin: 0 0 5px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
}

.footer-column a {
  width: fit-content;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.35;
}

.footer-column a:hover,
.footer-meta a:hover {
  color: #ffffff;
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-meta a {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

@media (max-width: 800px) {
  .footer-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand-cell,
  .footer-meta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .footer {
    padding-bottom: 82px;
  }

  .footer-table {
    gap: 30px 20px;
  }

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

@media (min-width: 1280px) {
  .hero-shell {
    min-height: 650px;
  }
}

@media (min-width: 1024px) and (max-height: 820px) {
  .hero-shell {
    min-height: 590px;
    padding-bottom: 48px;
  }

  .demo-section {
    padding-block: 24px;
  }

  .demo-preview,
  .demo-device-stage {
    min-height: 520px;
    height: 520px;
  }

  .demo-phone {
    width: 236px;
  }

  .demo-preview-copy {
    min-height: 430px;
    padding: 26px;
  }
}

@media (max-width: 1023px) {
  .demo-phone {
    margin-inline: auto;
  }

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

  .legal-contact {
    grid-template-columns: 1fr;
  }

  .legal-contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .hero-shell {
    min-height: 620px;
    padding-bottom: 34px;
  }

  .demo-phone {
    width: min(250px, 100%);
  }

  .seo-card {
    gap: 34px;
    padding: 36px 0;
  }

  .seo-copy > p:not(.eyebrow) {
    font-size: 15px;
  }

  .seo-links {
    row-gap: 12px;
  }

  .seo-links a {
    padding-inline: 12px;
  }

  .seo-links a:first-child {
    padding-left: 0;
  }

  .seo-aside {
    border-radius: 16px;
    padding: 22px;
  }

  .legal-page {
    padding: 16px 0 52px;
  }

  .legal-hero {
    border-radius: 18px;
    padding: 28px 22px 32px;
  }

  .legal-hero::after {
    right: -180px;
  }

  .legal-back {
    margin-bottom: 42px;
  }

  .legal-hero h1 {
    font-size: clamp(31px, 8.3vw, 34px);
    overflow-wrap: normal;
  }

  .legal-hero h1 .legal-long-word {
    font-size: clamp(24px, 7.2vw, 31px);
    white-space: nowrap;
  }

  .legal-lead {
    font-size: 16px;
  }

  .legal-meta {
    gap: 12px;
    margin-top: 28px;
  }

  .legal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .legal-card {
    min-height: 0;
    border-radius: 15px;
    padding: 22px;
  }

  .legal-card > span {
    margin-bottom: 28px;
  }

  .legal-card h2 {
    font-size: 25px;
  }

  .legal-contact-section {
    padding-bottom: 52px;
  }

  .legal-contact {
    border-radius: 16px;
    padding: 26px 22px;
  }

  .legal-contact h2 {
    font-size: 31px;
  }

  .legal-contact-actions {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

@media (max-width: 350px) {
  .demo-tab-card,
  .demo-tab-card.is-active {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 2px;
    min-height: 92px;
    padding: 9px 10px;
  }

  .demo-tab-card small {
    grid-column: 1;
    grid-row: 1;
  }

  .demo-tab-card strong {
    grid-column: 1;
    grid-row: 2;
    font-size: 13px;
    line-height: 1.1;
  }

  .demo-tab-card em {
    grid-column: 1;
    grid-row: 3;
    font-size: 9px;
  }
}

@media (min-width: 1024px) and (max-width: 1100px) {
  .demo-copy h2 {
    font-size: 40px;
    text-wrap: wrap;
  }

  .demo-tab-card,
  .demo-tab-card.is-active {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 2px;
    min-height: 88px;
    padding: 9px 10px;
  }

  .demo-tab-card small {
    grid-column: 1;
    grid-row: 1;
  }

  .demo-tab-card strong {
    grid-column: 1;
    grid-row: 2;
    font-size: 14px;
    line-height: 1.1;
  }

  .demo-tab-card em {
    grid-column: 1;
    grid-row: 3;
    font-size: 9px;
  }
}

/* Bot V9: a real Telegram conversation, not another Mini App surface. */
.demo-phone {
  aspect-ratio: 429 / 844;
}

.demo-phone iframe {
  width: 429px;
  height: 844px;
}

.bot-simulator {
  grid-template-rows: auto minmax(0, 1fr) auto;
  --bot-accent: #168acd;
  --bot-accent-soft: rgba(22, 138, 205, 0.10);
  background: #dce7ee;
}

.bot-chat {
  position: relative;
  display: block;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 8px 12px;
  background-color: #dce7ee;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.20) 1px, transparent 1px);
  background-size: 28px 28px;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

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

.bot-chat-date {
  display: block;
  width: max-content;
  margin: 0 auto 8px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(77, 103, 121, 0.55);
  color: #ffffff;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
}

.bot-chat-stream {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.bot-message {
  position: relative;
  width: max-content;
  max-width: 88%;
  min-width: 64px;
  margin: 0;
  border-radius: 13px;
  padding: 8px 34px 8px 9px;
  color: #10202e;
  font-size: 10.5px;
  line-height: 1.36;
  box-shadow: 0 4px 12px rgba(31, 54, 69, 0.10);
}

.bot-message > span {
  white-space: pre-line;
}

.bot-message time {
  position: absolute;
  right: 7px;
  bottom: 5px;
  color: #7d8b95;
  font-size: 6.5px;
  line-height: 1;
}

.bot-message-bot {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: #ffffff;
}

.bot-message-user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: #d5f7c9;
  color: #10202e;
}

.bot-message-user time {
  color: #5f8262;
}

.bot-media-message {
  width: min(90%, 224px);
  max-width: 90%;
  overflow: hidden;
  padding: 3px 3px 21px;
}

.bot-media-message > img {
  display: block;
  width: 100%;
  height: 116px;
  border-radius: 10px 10px 7px 7px;
  object-fit: cover;
  object-position: center;
}

.bot-media-message.has-image-error::before {
  content: "Фото загружается";
  display: grid;
  place-items: center;
  height: 116px;
  border-radius: 10px;
  background: #e8eef2;
  color: #71808c;
  font-size: 9px;
}

.bot-media-message.has-image-error > img {
  display: none;
}

.bot-media-message > div {
  display: grid;
  gap: 2px;
  padding: 7px 6px 0;
}

.bot-media-message small {
  color: var(--bot-accent);
  font-size: 7.5px;
  font-weight: 800;
  line-height: 1.1;
}

.bot-media-message strong {
  color: #10202e;
  font-size: 11px;
  line-height: 1.12;
}

.bot-media-message p,
.bot-location-message p {
  margin: 0;
  color: #667783;
  font-size: 8.5px;
  line-height: 1.25;
}

.bot-summary-message {
  display: grid;
  gap: 7px;
  width: min(88%, 220px);
  padding: 10px 10px 20px;
}

.bot-summary-message > strong {
  color: #10202e;
  font-size: 11px;
  line-height: 1.2;
}

.bot-summary-message dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  margin: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(16, 32, 46, 0.09);
}

.bot-summary-message dt,
.bot-summary-message dd {
  margin: 0;
  font-size: 8px;
  line-height: 1.2;
}

.bot-summary-message dt {
  color: #72808b;
}

.bot-summary-message dd {
  color: #10202e;
  font-weight: 750;
  text-align: right;
}

.bot-location-message {
  width: min(88%, 220px);
  overflow: hidden;
  padding: 3px 3px 21px;
}

.bot-location-map {
  position: relative;
  height: 96px;
  overflow: hidden;
  border-radius: 10px 10px 7px 7px;
  background-color: #dbe7dc;
  background-image:
    linear-gradient(34deg, transparent 43%, rgba(255, 255, 255, 0.90) 44% 49%, transparent 50%),
    linear-gradient(142deg, transparent 47%, rgba(255, 255, 255, 0.82) 48% 53%, transparent 54%);
  background-size: 62px 62px, 78px 78px;
}

.bot-location-map i {
  position: absolute;
  top: 38px;
  left: 50%;
  width: 15px;
  height: 15px;
  border: 4px solid var(--bot-accent);
  border-radius: 50% 50% 50% 0;
  background: #ffffff;
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow: 0 4px 10px rgba(16, 32, 46, 0.20);
}

.bot-location-message > div:last-of-type {
  display: grid;
  gap: 2px;
  padding: 7px 6px 0;
}

.bot-location-message strong {
  font-size: 10.5px;
  line-height: 1.15;
}

.bot-typing {
  width: max-content;
  margin: 7px 0 0;
  box-shadow: 0 4px 12px rgba(31, 54, 69, 0.09);
}

.bot-replies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 7px;
  border: 0;
  padding: 0;
  background: transparent;
}

.bot-replies[hidden] {
  display: none;
}

.bot-replies[data-layout="stack"] {
  grid-template-columns: minmax(0, 1fr);
}

.bot-replies[data-layout="calendar"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bot-replies button {
  min-width: 0;
  min-height: 31px;
  border: 1px solid rgba(22, 138, 205, 0.18);
  border-radius: 8px;
  padding: 6px 7px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--bot-accent);
  box-shadow: 0 3px 9px rgba(31, 54, 69, 0.07);
  font-size: 8.5px;
  font-weight: 760;
  line-height: 1.15;
}

.bot-replies button.is-primary {
  border-color: var(--bot-accent);
  background: var(--bot-accent);
  color: #ffffff;
}

.bot-replies .bot-lead-button {
  grid-column: 1 / -1;
}

.bot-composer {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  border-top: 1px solid rgba(16, 32, 46, 0.08);
  padding: 7px 8px;
  background: #f7f9fa;
}

.bot-composer > span {
  overflow: hidden;
  color: #87949e;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-composer button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: #7b8994;
  font-size: 18px;
  opacity: 1;
}

.bot-composer button:last-child {
  background: var(--bot-accent);
  color: #ffffff;
  font-size: 13px;
}

@media (min-width: 1024px) {
  .demo-preview {
    grid-template-columns: minmax(253px, 277px) minmax(300px, 1fr);
  }

  .demo-phone {
    width: clamp(253px, 19.8vw, 277px);
  }
}

@media (min-width: 1024px) and (max-height: 820px) {
  .demo-phone {
    width: 260px;
  }
}

@media (max-width: 1023px) {
  .demo-phone {
    width: min(275px, 100%);
  }
}

/* V10: precise phone geometry and a restrained metallic frame. */
.demo-phone {
  box-sizing: border-box;
  aspect-ratio: 522 / 1000;
  border: 7px solid transparent;
  border-radius: 34px;
  background:
    linear-gradient(#09111c, #09111c) padding-box,
    linear-gradient(145deg, #eef2f5 0%, #77818b 28%, #c8cfd5 52%, #525c65 78%, #aeb6bd 100%) border-box;
  box-shadow:
    0 30px 70px rgba(7, 17, 31, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    inset 0 -1px 0 rgba(0, 0, 0, 0.36);
}

.demo-phone-screen {
  border-radius: 26px;
  clip-path: inset(0 round 26px);
}

/* V10: product-based pricing with compact, comparable rows. */
.price-card {
  min-height: 0;
}

.price-body > p {
  font-size: 14px;
  line-height: 1.5;
}

.price-body .price-options {
  display: grid;
  gap: 0;
  margin: 20px 0 22px;
  border-top: 1px solid rgba(7, 17, 31, 0.10);
  padding: 0;
  list-style: none;
}

.price-body .price-options li {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  border-bottom: 1px solid rgba(7, 17, 31, 0.10);
  padding: 14px 0;
}

.price-body .price-options li::before {
  display: none;
}

.price-options li > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.price-options li strong {
  color: inherit;
  font-size: 14px;
  line-height: 1.25;
}

.price-options li span {
  color: #6d7884;
  font-size: 12px;
  line-height: 1.4;
}

.price-options li b {
  color: var(--bb-emerald);
  font-size: 13px;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}

.price-card.is-featured .price-options {
  border-top-color: rgba(255, 255, 255, 0.14);
}

.price-card.is-featured .price-options li {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.price-card.is-featured .price-options li span {
  color: rgba(255, 255, 255, 0.58);
}

.price-card.is-featured .price-options li b {
  color: var(--bb-lime);
}

.support-strip {
  color: #586573;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

@media (min-width: 1024px) {
  .price-card {
    min-height: 0;
  }

  .price-toggle span {
    font-size: 25px;
  }

  .price-toggle strong {
    font-size: 22px;
  }
}

/* V11: six-direction Demo Lab with product-specific color systems. */
.demo-section[data-demo-theme] {
  --demo-band: #07111f;
  --demo-accent: #48d9ff;
  --demo-stage: #dbe9f4;
  background: var(--demo-band);
  transition: background-color 280ms ease;
}

.demo-section[data-demo-theme="clinic"] {
  --demo-band: #07332f;
  --demo-accent: #67e2c5;
  --demo-stage: #daf4ee;
}

.demo-section[data-demo-theme="tourism"] {
  --demo-band: #17283c;
  --demo-accent: #f0c878;
  --demo-stage: #f3eadb;
}

.demo-section[data-demo-theme="estate"] {
  --demo-band: #103029;
  --demo-accent: #95d7ad;
  --demo-stage: #e3efe8;
}

.demo-section[data-demo-theme="coffee"] {
  --demo-band: #2b2130;
  --demo-accent: #f3c58d;
  --demo-stage: #eee3da;
}

.demo-section[data-demo-theme="education"] {
  --demo-band: #211f52;
  --demo-accent: #d7ff45;
  --demo-stage: #eeeaff;
}

.demo-section[data-demo-theme] .demo-copy .eyebrow,
.demo-section[data-demo-theme] .demo-label {
  color: var(--demo-accent);
}

.demo-section[data-demo-theme] .demo-device-stage {
  background: var(--demo-stage);
  transition: background-color 280ms ease;
}

.demo-section[data-demo-theme] .demo-device-stage::before {
  display: none;
}

.bot-simulator[data-bot-theme="coffee"] {
  --bot-accent: #8b4d63;
  --bot-accent-soft: rgba(139, 77, 99, 0.11);
}

.bot-simulator[data-bot-theme="education"] {
  --bot-accent: #4d46a8;
  --bot-accent-soft: rgba(77, 70, 168, 0.11);
}

@media (min-width: 1024px) {
  .demo-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 14px;
  }

  .demo-tab-card,
  .demo-tab-card:last-child,
  .demo-tab-card.is-active,
  .demo-tab-card.is-active:last-child {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 2px;
    min-height: 78px;
    padding: 9px 10px;
  }

  .demo-tab-card small,
  .demo-tab-card strong,
  .demo-tab-card em {
    grid-column: 1;
    min-width: 0;
  }

  .demo-tab-card small {
    grid-row: 1;
  }

  .demo-tab-card strong {
    grid-row: 2;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.1;
  }

  .demo-tab-card em {
    grid-row: 3;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 1023px) {
  .demo-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* V13: larger frameless live phone and accessible theme labels. */
.demo-section[data-demo-theme] .demo-device-stage {
  background: transparent;
}

.demo-section[data-demo-theme="education"] .demo-label {
  border: 1px solid rgba(63, 57, 127, 0.12);
  color: #3f397f;
  background: rgba(215, 255, 69, 0.48);
}

@media (min-width: 1024px) {
  .demo-preview {
    --demo-stage-height: clamp(560px, calc(100svh - var(--header-height) - 48px), 740px);
    --demo-phone-height: clamp(562px, 82.773vh, 746px);
    grid-template-columns: minmax(300px, 386px) minmax(280px, 1fr);
    gap: 24px;
    height: var(--demo-stage-height);
    min-height: var(--demo-stage-height);
  }

  .demo-device-stage {
    height: var(--demo-stage-height);
    min-height: var(--demo-stage-height);
  }

  .demo-phone {
    width: clamp(292px, 43vh, 386px);
    height: auto;
    max-width: 100%;
  }

  .demo-preview-copy {
    box-sizing: border-box;
    align-self: center;
    height: var(--demo-phone-height);
    min-height: var(--demo-phone-height);
  }
}

@media (max-width: 1023px) {
  .demo-phone {
    width: min(320px, calc(100vw - 32px));
  }
}
/* V18: mobile header keeps language access visible beside the menu. */
@media (max-width: 767px) {
  body:not(.service-page) .header-inner {
    gap: 8px;
  }

  body:not(.service-page) .brand {
    min-width: 0;
  }

  body:not(.service-page) .brand-copy {
    min-width: 0;
  }

  body:not(.service-page) .header-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  body:not(.service-page) .header-lang {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 13px;
  }

  body:not(.service-page) .header-cta {
    display: none;
  }
}

@media (max-width: 359px) {
  body:not(.service-page) .brand-copy span {
    display: none;
  }

  body:not(.service-page) .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}

/* V20: tidy mobile geometry for Demo Lab, pricing and service links. */
@media (max-width: 767px) {
  .demo-tabs {
    gap: 10px;
  }

  .demo-tab-card,
  .demo-tab-card:last-child,
  .demo-tab-card.is-active,
  .demo-tab-card.is-active:last-child {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(28px, auto);
    align-content: center;
    align-items: start;
    gap: 4px;
    min-width: 0;
    min-height: 104px;
    padding: 13px 14px;
    overflow: hidden;
  }

  .demo-tab-card small,
  .demo-tab-card strong,
  .demo-tab-card em {
    grid-column: 1;
    min-width: 0;
    max-width: 100%;
  }

  .demo-tab-card small {
    grid-row: 1;
  }

  .demo-tab-card strong {
    grid-row: 2;
    font-size: clamp(14px, 4.15vw, 16px);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .demo-tab-card em {
    grid-row: 3;
    margin-top: 1px;
    font-size: 10.5px;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .price-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 38px;
    align-items: center;
    gap: 10px;
    padding: 22px 18px 22px 22px;
  }

  .price-toggle span,
  .price-toggle strong {
    min-width: 0;
  }

  .price-toggle span {
    font-size: 21px;
    line-height: 1.15;
  }

  .price-toggle strong {
    font-size: 16px;
    line-height: 1.15;
  }

  .price-toggle::after {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    border: 1px solid rgba(36, 107, 254, 0.18);
    border-radius: 50%;
    background: rgba(36, 107, 254, 0.08);
    font-size: 20px;
    line-height: 1;
  }

  .price-card.is-featured .price-toggle::after {
    border-color: rgba(200, 255, 90, 0.24);
    background: rgba(200, 255, 90, 0.10);
    color: var(--bb-lime);
  }

  .seo-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(7, 17, 31, 0.14);
    border-bottom: 1px solid rgba(7, 17, 31, 0.14);
  }

  .seo-links a,
  .seo-links a:first-child,
  .seo-links a:last-child {
    min-width: 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(7, 17, 31, 0.14);
    border-bottom: 1px solid rgba(7, 17, 31, 0.14);
    padding: 10px 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .seo-links a:nth-child(even) {
    border-right: 0;
  }

  .seo-links a:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 359px) {
  .demo-tab-card strong {
    font-size: 13px;
  }

  .demo-tab-card em {
    font-size: 9.5px;
  }

  .price-toggle {
    grid-template-columns: minmax(0, 1fr) auto 34px;
    gap: 8px;
    padding-inline: 18px 14px;
  }

  .price-toggle strong {
    font-size: 14px;
  }

  .price-toggle::after {
    width: 34px;
    height: 34px;
  }
}
