/* Первый вопрос: правила ограничены лендингом и не меняют кабинет. */
.mobile-menu { display: none; }

@media (max-width: 767px) {
.hero-section .hero-content {
  margin-top: clamp(20px, 4vh, 48px) !important;
}
.hero-section .hero-eyebrow {
  margin: 0;
  color: rgba(23, 24, 26, 0.7);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.hero-section .hero-title {
  max-width: 24ch !important;
  margin-top: 12px !important;
  font-size: clamp(40px, 4.5vw, 60px) !important;
  line-height: 1.08 !important;
}
.hero-section .hero-lead {
  margin-top: 16px !important;
  color: rgba(23, 24, 26, 0.78) !important;
  text-shadow: none !important;
}

.hero-section #intake.first-question {
  width: min(640px, 100%);
  box-sizing: border-box;
  margin-top: 24px !important;
  padding: 20px;
  border: 1px solid rgba(23, 24, 26, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 12px 32px rgba(23, 24, 26, 0.08);
}
.first-question .question-label {
  display: block;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #17181a;
}
.first-question .question-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
}
.first-question .question-examples .macro {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(23, 24, 26, 0.13);
  border-radius: 10px;
  background: #f2f1ee;
  color: #17181a;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  opacity: 1;
}
.first-question .question-examples .macro:hover {
  border-color: #3b8250;
  background: #edf5ee;
}
.first-question .question-examples .macro[aria-pressed="true"] {
  border-color: #3b8250;
  background: #edf5ee;
}
.first-question textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 180px;
  max-height: max(180px, min(280px, 40dvh));
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(23, 24, 26, 0.22);
  border-radius: 10px;
  resize: vertical;
  background: #fff;
  color: #17181a;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  overflow-y: auto;
}
.first-question textarea::placeholder {
  color: rgba(23, 24, 26, 0.6);
}
.first-question .question-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #17181a;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
}
.first-question .question-submit:hover { background: #000; }
.first-question .question-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}
.first-question .question-status {
  margin: 10px 0 0;
  color: #17181a;
  font-size: 14px;
  line-height: 1.4;
}
.first-question .question-status:empty { display: none; }
.first-question .question-note {
  margin: 10px 0 0;
  color: rgba(23, 24, 26, 0.75);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}
.first-question .question-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-section .hero-content > .question-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 8px;
  color: #17181a;
  font-size: 14px;
  line-height: 1.4;
}
.hero-section .hero-content > .question-secondary a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}
.first-question :is(button, textarea, a):focus-visible,
.conversation-resume :is(button, a):focus-visible,
.mobile-menu :is(summary, a):focus-visible {
  outline: 2px solid #3b8250;
  outline-offset: 3px;
}

.conversation-resume {
  margin-top: 8px;
}
.conversation-resume[hidden] { display: none; }
.conversation-resume button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid rgba(23, 24, 26, 0.2);
  border-radius: 10px;
  background: transparent;
  color: #17181a;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
.conversation-resume button:hover { background: #f2f1ee; }
.conversation-resume button:disabled { opacity: 0.65; cursor: wait; }
.conversation-resume .question-status { margin: 8px 0 0; font-size: 14px; line-height: 1.5; }
.conversation-resume .question-status:empty { display: none; }

}

@media (max-width: 900px) {
  .hero-section .hero-nav { position: relative; z-index: 2; }
  .hero-section .hero-nav,
  #sticky-nav {
    height: 64px !important;
    min-height: 64px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
  }
  .hero-section .hero-nav .nav-actions,
  #sticky-nav .nav-actions {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
  }
  .hero-section #nav-links,
  #sticky-nav #sticky-links { display: none !important; }
  .hero-section .hero-nav .nav-cabinet,
  #sticky-nav .nav-cabinet {
    order: 0;
    margin-left: 0;
    min-height: 44px;
    padding: 0 12px;
    background: transparent;
    color: #17181a;
    font-size: 14px !important;
  }
  .mobile-menu {
    display: block;
    position: relative;
    color: #17181a;
    font-size: 14px;
  }
  .mobile-menu > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid rgba(23, 24, 26, 0.2);
    border-radius: 10px;
    list-style: none;
    cursor: pointer;
  }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu > :not(summary) {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid rgba(23, 24, 26, 0.12);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(23, 24, 26, 0.12);
  }
  .mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 12px;
    color: #17181a;
    line-height: 1.4;
  }
  .mobile-menu a:hover { background: #f2f1ee; }
}

@media (max-width: 767px) {
  .hero-section .hero-content {
    margin-top: 12px !important;
  }
  .hero-section .hero-title {
    max-width: 24ch !important;
    margin-top: 8px !important;
    font-size: clamp(28px, 7.5vw, 40px) !important;
    line-height: 1.12 !important;
  }
  .hero-section .hero-eyebrow { font-size: 13px; }
  .hero-section #intake.first-question {
    margin-top: 16px !important;
    padding: 14px;
    border-radius: 16px;
  }
  .first-question .question-examples .macro {
    padding: 6px 8px;
    font-size: 13px;
  }
  .first-question .question-label {
    margin-bottom: 8px;
    font-size: 14px;
  }
  .first-question textarea {
    min-height: 160px;
    max-height: max(160px, min(240px, 40dvh));
    resize: none;
  }
}

@media (max-width: 360px) {
  .hero-section .hero-nav { height: 60px !important; min-height: 60px !important; }
  .hero-section .hero-content { margin-top: 8px !important; }
  .hero-section .hero-title { font-size: 26px !important; }
  .hero-section #intake.first-question { margin-top: 12px !important; padding: 12px; }
  .first-question .question-examples { gap: 6px; margin-bottom: 8px; }
  .first-question .question-examples .macro { padding: 6px; }
  .first-question .question-submit { margin-top: 8px; }
}

/* Приветствие VC меняет набор примеров и вторичных ссылок атрибутом hidden;
   display: grid у примеров иначе его перебивает. */
.first-question .question-examples[hidden],
.hero-section .question-secondary[hidden] { display: none; }

/* Документ рядом с вопросом (пакет seller_v2, 17.10). Кнопку показывает скрипт, когда
   чат на сайте включён: в Telegram файл отсюда не передать. */
.first-question .question-attach { margin: 8px 0 0; }
.first-question .question-attach-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid rgba(23, 24, 26, 0.16); border-radius: 10px; background: transparent;
  color: #17181a; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.first-question .question-attach-btn[hidden], .first-question .ce-preview[hidden] { display: none; }
.first-question .question-attach .ce-preview { margin-top: 8px; text-align: left; }
@media (max-width: 767px) {
  /* Три строки с ростом по содержимому: большое пустое поле на телефоне отодвигало кнопку. */
  .first-question textarea { min-height: 104px; }
}

/* Desktop restored from the layout before d908018. Phone changes never reach it. */
.mobile-only { display: none !important; }
@media (min-width: 768px) {
  .hero-section .hero-eyebrow { display: none; }
  .hero-section #intake { margin-top: 28px; width: min(640px, 90vw); box-sizing: border-box; background: rgba(18,26,18,.42); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 22px; padding: 8px; box-shadow: 0 24px 60px -16px rgba(15,25,15,.35); text-align: left; }
  .question-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px 10px; color: #fff; font-size: 12.5px; font-weight: 500; }
  .question-eta { opacity: .75; }
  .question-surface { background: #fff; border-radius: 16px; overflow: hidden; }
  #intake textarea { display: block; width: 100%; box-sizing: border-box; border: 0; resize: none; padding: 20px; font: 16px/1.5 Onest, sans-serif; color: #17181a; background: transparent; overflow-y: auto; min-height: 112px; max-height: 232px; }
  #intake .question-actions { display: flex; align-items: center; gap: 10px; padding: 12px; }
  .question-telegram { display: inline-flex; align-items: center; padding: 12px 14px; font-size: 14px; font-weight: 500; }
  #intake .question-submit { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 14px; color: #fff; cursor: pointer; margin-left: auto; }
  #intake .question-attach { margin: 0; }
  #intake .question-attach-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; padding: 0; min-height: 44px; border: 0; background: transparent; border-radius: 14px; }
  #intake .question-note, #intake .question-status { margin: 10px 8px 4px; color: #fff; font: 13px/1.45 Onest, sans-serif; }
  #intake .question-status:empty { display: none; }
  #intake .question-note a { color: inherit; text-decoration: underline; }
  #intake .question-note { font-size: 12px; opacity: .85; }
  #intake .conversation-resume { margin: 10px 8px 4px; }
  #intake .conversation-resume button { border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 8px 14px; background: transparent; color: #fff; font: inherit; cursor: pointer; }
  .hero-start-wrap { margin-top: 24px; }
  .hero-start { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; font-size: 16px; font-weight: 500; }
  .hero-free-note { margin: 10px 0 0; color: #fff; font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
  .hero-disclaimer { margin: 14px 0 0; font-size: 13px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.55); }
}
@media (max-width: 767px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: initial !important; }
  .hero-section .hero-content > .question-secondary.mobile-only { display: flex !important; }
  .question-surface { display: flex; flex-direction: column; }
  .first-question .question-examples { order: 0; }
  .first-question textarea { order: 1; }
  .first-question .question-attach { order: 2; }
  .first-question .question-actions { order: 3; display: flex; flex-direction: column; align-items: stretch; }
  .first-question .question-attach-btn { justify-content: center; min-height: 48px; margin-top: 8px; }
  .first-question textarea { min-height: 104px; }
}
.first-question [hidden] { display: none !important; }

@media (max-width: 767px) {
  .home-text-toggle { order: 1; min-height: 48px; border: 1px solid rgba(23,24,26,.2); border-radius: 10px; background: #fff; color: #17181a; font: 500 16px Onest, sans-serif; cursor: pointer; }
  #intake[data-text-open="false"] textarea { display: none; }
  #intake[data-text-open="true"] .home-text-toggle { display: none !important; }
}
