/* Правовой офис — оформление. Светлая тема, изумрудные и бирюзовые акценты. */

:root {
  --bg: #f4f8f7;
  --bg-2: #eaf3f1;
  --surface: #ffffff;
  --surface-2: #f7faf9;
  --ink: #0b1f1c;
  --ink-2: #33504b;
  --muted: #5d7570;
  --line: #dbe7e4;
  --line-2: #c9dbd7;
  --emerald: #0f9d7a;
  --emerald-dark: #0a7c60;
  --teal: #14b8c4;
  --mint: #e3f6f0;
  --teal-soft: #e2f6f8;
  --warn: #9a5b00;
  --warn-bg: #fff4dc;
  --danger: #b4232f;
  --grad: linear-gradient(135deg, #0f9d7a 0%, #12aa9c 55%, #14b8c4 100%);
  --grad-soft: radial-gradient(1200px 500px at 85% -10%, rgba(20, 184, 196, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(15, 157, 122, 0.14), transparent 60%);
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 28, 0.05), 0 2px 8px rgba(11, 31, 28, 0.04);
  --shadow: 0 2px 6px rgba(11, 31, 28, 0.04), 0 12px 32px rgba(11, 31, 28, 0.07);
  --shadow-lg: 0 24px 64px rgba(11, 31, 28, 0.14);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --t-fast: 200ms;
  --t: 300ms;
  --t-slow: 400ms;
  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--grad-soft);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p {
  margin: 0 0 0.8em;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(20, 184, 196, 0.55);
  outline-offset: 2px;
  border-radius: 8px;
}

[tabindex='-1']:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow {
  max-width: 520px;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.875rem;
}

/* ===== Отметка демонстрационной версии ===== */
.demo-ribbon {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 16px;
  font-size: 0.82rem;
  color: #5b3b00;
  background: linear-gradient(90deg, #fff1cf, #ffe9b8);
  border-bottom: 1px solid #f2d48f;
  text-align: center;
}
.demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e39b00;
  box-shadow: 0 0 0 4px rgba(227, 155, 0, 0.18);
  flex: none;
}

/* ===== Шапка ===== */
.topbar {
  position: sticky;
  top: 33px;
  z-index: 30;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: rgba(244, 248, 247, 0.78);
  border-bottom: 1px solid rgba(219, 231, 228, 0.7);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: flex;
  transition: transform var(--t) var(--ease);
}
.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.05);
}
.topnav {
  display: flex;
  gap: 4px;
}
.topnav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.94rem;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.topnav a:hover {
  background: var(--mint);
  color: var(--emerald-dark);
}
.tag {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--warn-bg);
  color: var(--warn);
  vertical-align: 1px;
}

/* ===== Кнопки ===== */
.btn {
  --lift: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  text-decoration: none;
  transform: translateY(var(--lift));
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  --lift: -1px;
}
.btn:active {
  --lift: 0px;
  transform: translateY(0) scale(0.98);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  color: #fff;
  background: var(--grad);
  background-size: 140% 140%;
  background-position: 0% 50%;
  box-shadow: 0 6px 18px rgba(15, 157, 122, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 10px 26px rgba(15, 157, 122, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-ghost {
  color: var(--emerald-dark);
  background: var(--surface);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  border-color: var(--emerald);
  background: var(--mint);
}
.btn-soft {
  color: var(--emerald-dark);
  background: var(--mint);
}
.btn-soft:hover {
  background: #d3f0e6;
}
.btn-lg {
  min-height: 54px;
  padding: 0 26px;
  font-size: 1.02rem;
  border-radius: 16px;
}
.btn-block {
  width: 100%;
}
.btn-icon {
  width: 46px;
  padding: 0;
  flex: none;
}
.link-btn {
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  color: var(--emerald-dark);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(15, 157, 122, 0.35);
  text-underline-offset: 3px;
}
.link-btn:hover {
  text-decoration-color: currentColor;
}
.back {
  margin: 0 0 14px;
  text-decoration: none;
  font-weight: 500;
}
.icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.icon-btn:hover {
  background: var(--mint);
  transform: rotate(90deg);
}

/* ===== Карточки и мелочи ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: 2px;
}
.pill-soft {
  background: var(--mint);
  color: var(--emerald-dark);
}
.pill-warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--emerald);
  margin-bottom: 14px;
}
.note {
  background: var(--teal-soft);
  border: 1px solid #c4ebee;
  color: #12505a;
  border-radius: var(--r-sm);
  padding: 10px 14px;
}
.note-warn {
  background: var(--warn-bg);
  border-color: #f1d79a;
  color: #5b3b00;
  margin-bottom: 18px;
}
.sim-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--warn);
  background: var(--warn-bg);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.sim-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e39b00;
}

/* ===== Виды (экраны) и анимации появления ===== */
.view {
  padding-bottom: 56px;
}
.view.is-enter {
  animation: viewIn var(--t-slow) var(--ease) both;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.view-center {
  padding-top: 40px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ===== Первый экран ===== */
.hero {
  padding: 64px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  font-weight: 800;
  margin-bottom: 18px;
  background: linear-gradient(180deg, #0b1f1c 30%, #1d4a43 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead {
  font-size: 1.13rem;
  color: var(--ink-2);
  max-width: 560px;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.ai-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 560px;
  font-size: 0.92rem;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.ai-ico {
  color: var(--teal);
  flex: none;
  margin-top: 2px;
}
.paid-note {
  margin-top: 14px;
  color: var(--emerald-dark);
  font-weight: 500;
}

.hero-visual {
  position: relative;
  min-height: 380px;
}
.glass-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.preview-card {
  position: relative;
  padding: 20px;
  margin: 64px 0 40px 30px;
  max-width: 400px;
}
.preview-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.preview-head div {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.3;
}
.avatar-ai {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex: none;
}
.preview-bubble {
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 0.93rem;
  margin-bottom: 10px;
  max-width: 88%;
  animation: bubbleIn var(--t-slow) var(--ease) both;
}
.preview-user {
  margin-left: auto;
  background: var(--grad);
  color: #fff;
  border-bottom-right-radius: 6px;
  animation-delay: 300ms;
}
.preview-ai {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
  animation-delay: 700ms;
}
.preview-typing,
.typing {
  display: inline-flex;
  gap: 5px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.preview-typing span,
.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: dot 1.1s infinite var(--ease);
}
.preview-typing span:nth-child(2),
.typing span:nth-child(2) {
  animation-delay: 150ms;
}
.preview-typing span:nth-child(3),
.typing span:nth-child(3) {
  animation-delay: 300ms;
}
@keyframes dot {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
.mini-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  line-height: 1.3;
  animation: float 6s ease-in-out infinite;
}
.mini-card div {
  display: flex;
  flex-direction: column;
}
.mini-1 {
  right: 0;
  top: 0;
}
.mini-2 {
  left: 0;
  bottom: 10px;
  animation-delay: -3s;
}
.mini-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--mint);
  color: var(--emerald-dark);
  font-weight: 700;
}
.mini-ico-teal {
  background: var(--teal-soft);
  color: #0c7f88;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ===== Секции ===== */
.section {
  padding-top: 56px;
  scroll-margin-top: 60px;
}
.section-title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin-bottom: 24px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step {
  padding: 26px;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.step h3 {
  font-size: 1.15rem;
  margin-top: 14px;
}
.step p {
  color: var(--ink-2);
  margin: 0;
}
.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--mint);
  color: var(--emerald-dark);
  font-weight: 800;
}

.price-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
}
.price-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.price-main {
  background: linear-gradient(160deg, #ffffff 0%, #effaf6 100%);
  border-color: #cdebe1;
}
.price-main p:not(.eyebrow):not(.price-value):not(.price-sub) {
  color: var(--ink-2);
}
.price-main .btn {
  margin-top: auto;
}
.price-sub {
  font-weight: 600;
  color: var(--emerald-dark);
  margin-bottom: 14px;
}
.price-value {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.price-list {
  padding: 28px;
}
.price-rows {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
.price-rows li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line-2);
}
.price-rows li:last-child {
  border-bottom: 0;
}
.price-rows strong {
  white-space: nowrap;
  font-size: 1.05rem;
}
.price-rows span {
  color: var(--ink-2);
}
.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.info {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}
.info p {
  margin: 0;
  color: var(--ink-2);
}
.info-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: #0c7f88;
  font-weight: 700;
}
.honest {
  padding: 30px;
  background: linear-gradient(160deg, #ffffff, #f2faf8);
}
.honest p {
  max-width: 820px;
  color: var(--ink-2);
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 40px;
  font-size: 0.86rem;
  color: var(--muted);
}
.footer p {
  margin: 0;
}
.footer a {
  color: var(--emerald-dark);
}

/* ===== Оплата ===== */
.pay-card {
  padding: 28px;
  text-align: center;
  overflow: hidden;
}
.pay-steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  position: relative;
  font-size: 0.8rem;
  color: var(--muted);
}
.pay-steps::before {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  top: 9px;
  height: 2px;
  background: var(--line);
}
.pay-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  transition: color var(--t) var(--ease);
}
.pay-steps li span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-2);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.pay-steps li.is-current {
  color: var(--ink);
  font-weight: 600;
}
.pay-steps li.is-current span {
  border-color: var(--emerald);
  transform: scale(1.12);
  box-shadow: 0 0 0 5px rgba(15, 157, 122, 0.14);
}
.pay-steps li.is-done span {
  background: var(--emerald);
  border-color: var(--emerald);
}
.pay-pane.is-active {
  animation: paneIn var(--t) var(--ease) both;
}
@keyframes paneIn {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.pay-amount {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 4px 0 8px;
}
.pay-method {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  font-size: 0.88rem;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin: 18px 0 20px;
}
.pay-method-ico {
  color: var(--emerald);
  flex: none;
}
.spinner {
  width: 64px;
  height: 64px;
  margin: 18px auto 20px;
  border-radius: 50%;
  border: 4px solid var(--mint);
  border-top-color: var(--emerald);
  border-right-color: var(--teal);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.checkmark {
  width: 78px;
  height: 78px;
  margin: 8px auto 16px;
  display: block;
}
.checkmark-circle {
  fill: var(--mint);
  stroke: var(--emerald);
  stroke-width: 2.5;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 400ms var(--ease) forwards;
}
.checkmark-check {
  fill: none;
  stroke: var(--emerald);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: draw 300ms var(--ease) 300ms forwards;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ===== Консультация ===== */
.chat-wrap {
  max-width: 820px;
  padding-top: 24px;
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  margin-bottom: 12px;
}
.chat-head-main {
  display: flex;
  gap: 12px;
  align-items: center;
}
.chat-head h1 {
  font-size: 1.2rem;
  margin: 0 0 2px;
}
.chat-head p {
  margin: 0;
}
.chat-meta {
  text-align: left;
}
.chat-meta p {
  margin: 4px 0 0;
}
.meter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}
.meter-label {
  color: var(--muted);
}
.meter-value {
  font-weight: 600;
}
.meter-dots {
  display: inline-flex;
  gap: 4px;
}
.meter-dots i {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  transition: background var(--t) var(--ease);
}
.meter-dots i.is-used {
  background: var(--grad);
}
#integration-note {
  margin-bottom: 14px;
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 0 16px;
}
.bubble,
.typing {
  scroll-margin-top: 120px;
  scroll-margin-bottom: 300px;
}
.bubble {
  max-width: 86%;
  padding: 14px 16px;
  border-radius: 20px;
  animation: bubbleIn var(--t) var(--ease) both;
}
.bubble p {
  margin: 0;
  white-space: pre-wrap;
}
.bubble .kicker {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 4px;
  opacity: 0.8;
}
.bubble-assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.bubble-assistant .kicker {
  color: var(--emerald-dark);
}
.bubble-user {
  align-self: flex-end;
  color: #fff;
  background: var(--grad);
  border-bottom-right-radius: 6px;
}
.bubble-answer {
  max-width: 100%;
  border-color: #cdebe1;
  background: linear-gradient(180deg, #ffffff, #f6fcfa);
}
.bubble-answer h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}
.bubble-answer p + p {
  margin-top: 10px;
}
.verify {
  display: block;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 10px;
  padding: 8px 12px;
}
.bubble-system {
  align-self: center;
  max-width: 100%;
  font-size: 0.85rem;
  color: var(--muted);
  background: transparent;
  padding: 4px 8px;
  text-align: center;
}
.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  animation: bubbleIn var(--t) var(--ease) both;
}
.chat-actions .btn {
  min-height: 42px;
}
.composer {
  position: sticky;
  bottom: 12px;
  padding: 14px;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
}
.script-row {
  margin-bottom: 10px;
}
.script-row:empty {
  display: none;
}
.composer-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.composer-form textarea {
  flex: 1;
  min-height: 46px;
  max-height: 160px;
  resize: none;
}
.composer > p {
  margin: 8px 2px 0;
}

/* ===== Поля формы ===== */
input[type='text'],
input[type='email'],
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
input[type='text']:hover,
textarea:hover {
  border-color: var(--line-2);
}
input[type='text']:focus,
textarea:focus {
  outline: none;
  border-color: var(--emerald);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 157, 122, 0.13);
}
.is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px rgba(180, 35, 47, 0.1) !important;
}
textarea {
  resize: vertical;
}
.field {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field > label,
.field > legend,
.label {
  display: block;
  font-weight: 600;
  font-size: 0.93rem;
  margin-bottom: 8px;
  padding: 0;
}
.label-sm {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-2);
  margin: 12px 0 6px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.req,
.opt {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 6px;
}
.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 6px 0 10px;
}
.error {
  font-size: 0.85rem;
  color: var(--danger);
  margin: 6px 0 0;
  animation: shakeIn var(--t) var(--ease) both;
}
@keyframes shakeIn {
  0% {
    opacity: 0;
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(3px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.choice-list {
  display: grid;
  gap: 10px;
}
.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 13px 44px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.choice:hover {
  border-color: var(--line-2);
}
.choice:active {
  transform: scale(0.99);
}
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: #fff;
  transition: border var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.choice:has(input:checked) {
  border-color: var(--emerald);
  background: var(--mint);
}
.choice:has(input:checked)::before {
  border: 6px solid var(--emerald);
}
.choice:has(input:focus-visible) {
  box-shadow: 0 0 0 4px rgba(20, 184, 196, 0.3);
}
.choice-title {
  font-size: 0.93rem;
  font-weight: 500;
}
.choice-meta {
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.93rem;
}
.choice-meta.is-free {
  color: var(--emerald-dark);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font: inherit;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.chip:hover {
  border-color: var(--emerald);
}
.chip:active {
  transform: scale(0.96);
}
.chip[aria-pressed='true'] {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
}
.chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#followup-chips {
  margin-bottom: 10px;
}
#followup-chips .chip {
  background: var(--mint);
  border-color: transparent;
  color: var(--emerald-dark);
}

.slot-days {
  display: grid;
  gap: 12px;
}
.slot-day p {
  margin: 0 0 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-2);
}
.slot-day p::first-letter {
  text-transform: uppercase;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  font-size: 0.92rem;
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--emerald);
  flex: none;
}

.field > .file-drop,
.file-drop {
  position: relative;
  margin: 0;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px dashed var(--line-2);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink-2);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.file-drop:hover {
  border-color: var(--emerald);
  background: var(--mint);
}
.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-drop:has(input:focus-visible) {
  box-shadow: 0 0 0 4px rgba(20, 184, 196, 0.3);
}
.file-drop-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--emerald);
  font-size: 1.2rem;
  flex: none;
}

/* ===== Диалоги ===== */
dialog.sheet {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: auto;
  overscroll-behavior: contain;
}
dialog.sheet-sm {
  width: min(500px, calc(100vw - 32px));
}
dialog.sheet[open] {
  animation: sheetIn var(--t) var(--ease) both;
}
dialog.sheet::backdrop {
  background: rgba(8, 28, 25, 0.38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade var(--t) var(--ease) both;
}
dialog.sheet.is-closing {
  animation: sheetOut var(--t-fast) var(--ease) both;
}
@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes sheetOut {
  to {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.sheet form {
  padding: 24px 26px 22px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.sheet-head h2 {
  font-size: 1.35rem;
  margin: 0 0 4px;
}
.sheet-head p {
  margin: 0;
}
.form-steps {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  counter-reset: fs;
}
.form-steps li {
  flex: 1;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 10px;
  border-top: 3px solid var(--line);
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.form-steps li.is-current {
  color: var(--ink);
  font-weight: 600;
  border-color: var(--emerald);
}
.form-steps li.is-done {
  border-color: var(--teal);
}
.form-step.is-enter {
  animation: paneIn var(--t) var(--ease) both;
}
.form-step.is-enter-back {
  animation: paneBack var(--t) var(--ease) both;
}
@keyframes paneBack {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sheet-foot {
  position: sticky;
  bottom: 0;
  margin: 0 -26px -22px;
  padding: 12px 26px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), #fff 18px);
  border-top: 1px solid var(--line);
  z-index: 2;
}
.quote {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 10px 16px;
  border-radius: var(--r);
  background: linear-gradient(135deg, #effaf6, #e9f8fa);
  border: 1px solid #cdebe1;
  margin: 0 0 12px;
}
.quote p {
  margin: 0 0 2px;
  font-size: 0.88rem;
}
.quote-service {
  font-weight: 600;
}
.quote .quote-timeline {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 4px;
}
.quote-total {
  font-size: 1.25rem;
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
  letter-spacing: -0.01em;
  transition: transform var(--t-fast) var(--ease);
}
.quote-total.is-bump {
  animation: bump var(--t) var(--ease);
}
@keyframes bump {
  40% {
    transform: scale(1.06);
  }
}
.quote-credit-on {
  color: var(--emerald-dark);
  font-weight: 600;
}
.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.result {
  text-align: center;
  animation: paneIn var(--t) var(--ease) both;
}
.result-list {
  text-align: left;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 16px 0 20px;
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}
.result-list dt {
  color: var(--muted);
}
.result-list dd {
  margin: 0;
  font-weight: 500;
}

/* ===== Администратор ===== */
#view-admin .wrap {
  padding-top: 28px;
}
.admin-head h1 {
  font-size: 1.8rem;
}
.admin-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.table-card {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th {
  text-align: left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
  padding: 14px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-table tr:last-child td {
  border-bottom: 0;
}
.admin-table tbody tr {
  animation: bubbleIn var(--t) var(--ease) both;
  transition: background var(--t-fast) var(--ease);
}
.admin-table tbody tr:hover {
  background: #f9fcfb;
}
.admin-table .num {
  font-weight: 700;
  white-space: nowrap;
}
.admin-table .amount {
  font-weight: 700;
  white-space: nowrap;
}
.status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #0c6b73;
}
.type-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  white-space: nowrap;
}
.type-private {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.type-business {
  background: #0c3f37;
  color: #c9f3e9;
}
.status-free {
  background: var(--mint);
  color: var(--emerald-dark);
}
.row-new {
  background: #fbfff9;
}
.row-new .num::after {
  content: 'новая';
  margin-left: 6px;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--emerald);
  color: #fff;
  vertical-align: 2px;
}
.sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

/* ===== Всплывающее уведомление ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  max-width: calc(100vw - 32px);
  animation: toastIn var(--t) var(--ease) both;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}

/* ===== Навигация: «Для бизнеса» ===== */
.topnav a.nav-business {
  color: #fff;
  background: linear-gradient(135deg, #0b3d36, #0f6b5c);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(11, 61, 54, 0.22);
}
.topnav a.nav-business:hover {
  color: #fff;
  background: linear-gradient(135deg, #0d4a41, #12806e);
}

/* ===== Переключатель сценария (демо) ===== */
.client-mode {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.client-mode-label {
  font-size: 0.85rem;
  color: var(--muted);
}
.segmented {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.seg {
  position: relative;
  z-index: 1;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.seg[aria-pressed='true'] {
  background: #fff;
  color: var(--emerald-dark);
  box-shadow: var(--shadow-sm);
}
.price-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--emerald-dark);
}
.price-caption-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px rgba(15, 157, 122, 0.15);
  flex: none;
}
.pay-terms {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--emerald-dark);
}

/* ===== Блок «Для бизнеса» ===== */
.business {
  position: relative;
  overflow: hidden;
  padding: 36px;
  color: #e8f6f2;
  border: 0;
  background: radial-gradient(700px 300px at 100% 0%, rgba(20, 184, 196, 0.35), transparent 60%),
    linear-gradient(150deg, #0a2f2a 0%, #0c3f37 55%, #0d4f45 100%);
  box-shadow: 0 24px 60px rgba(10, 47, 42, 0.28);
}
.business h2,
.business h3 {
  color: #fff;
}
.business h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
}
.eyebrow-light {
  color: #7fe3cf;
}
.business-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 28px;
}
.business-lead {
  max-width: 600px;
  color: #c7e7df;
  font-size: 1.05rem;
  margin: 0;
}
.business-cta {
  flex: none;
  max-width: 300px;
}
.business-cta p {
  margin: 10px 0 0;
  color: #a9d6cc;
}
.btn-light {
  color: #0a2f2a;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.btn-light:hover {
  background: #e9fbf6;
}
.business-sub {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9fd9cc !important;
  margin: 0 0 12px;
}
.business-areas {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.business-areas li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.business-areas li:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}
.business-areas li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d3b0, #22c3d0);
  flex: none;
}
.business-formats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.business-formats li {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(127, 227, 207, 0.4);
  color: #c9f3e9;
  font-size: 0.9rem;
}
.quote-total-sm {
  font-size: 0.95rem !important;
  white-space: normal !important;
  max-width: 260px;
}
.error-consent {
  margin: -8px 0 14px;
}

/* ===== Приветствие со световыми частицами ===== */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(600px 400px at 50% 50%, rgba(20, 184, 196, 0.18), transparent 70%),
    linear-gradient(160deg, #f7fbfa, #e7f5f1);
  animation: fade 300ms var(--ease) both;
}
.welcome.is-leaving {
  animation: welcomeOut 400ms var(--ease) both;
}
@keyframes welcomeOut {
  to {
    opacity: 0;
    transform: scale(1.03);
  }
}
.welcome-core {
  position: relative;
  text-align: center;
  padding: 0 24px;
}
.welcome-orb {
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #9ff0dc 25%, #14b8c4 60%, #0f9d7a 100%);
  box-shadow: 0 0 40px rgba(20, 184, 196, 0.55), 0 0 90px rgba(15, 157, 122, 0.35);
  animation: orbIn 700ms var(--ease) both, orbPulse 1.6s ease-in-out 700ms infinite;
}
@keyframes orbIn {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}
@keyframes orbPulse {
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 60px rgba(20, 184, 196, 0.7), 0 0 120px rgba(15, 157, 122, 0.4);
  }
}
.welcome-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  animation: bubbleIn 400ms var(--ease) 250ms both;
}
.welcome-sub {
  color: var(--ink-2);
  margin: 0;
  animation: bubbleIn 400ms var(--ease) 400ms both;
}
.welcome-particles {
  position: absolute;
  inset: 0;
}
.particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--s, 6px);
  height: var(--s, 6px);
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, rgba(52, 211, 176, 0.9) 45%, rgba(20, 184, 196, 0) 70%);
  box-shadow: 0 0 10px rgba(20, 184, 196, 0.7);
  opacity: 0;
  animation: particle var(--d, 1400ms) var(--ease) var(--delay, 0ms) both;
}
@keyframes particle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1);
  }
}

/* ===== Заставка: частицы собираются в знак весов ===== */
.intro {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: radial-gradient(900px 600px at 50% 42%, #0d4a40 0%, #08332d 45%, #04201c 100%);
  opacity: 1;
  transition: opacity var(--leave, 700ms) cubic-bezier(0.4, 0, 0.2, 1);
}
html.intro-pending .intro {
  display: block;
  /* Запасной вариант: если скрипт не запустился, заставка исчезнет сама. */
  animation: introFailsafe 1ms linear 7s forwards;
}
html.intro-active .intro {
  animation: none;
}
html.intro-pending body {
  overflow: hidden;
}
@keyframes introFailsafe {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
.intro.is-leaving {
  opacity: 0;
  pointer-events: none;
}
.intro-canvas {
  position: absolute;
  inset: 0;
  display: block;
}
.intro-name {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--title-top, 72%);
  margin: 0;
  padding: 0 16px;
  text-align: center;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  font-size: clamp(1.8rem, 4.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: 0.015em;
  /* Объём: световой градиент по буквам, тонкий блик и мягкая тень. */
  color: transparent;
  background: linear-gradient(105deg, #a8efdc 0%, #e9fff8 30%, #ffffff 42%, #e9fff8 54%, #8de6d0 78%, #c9f7ea 100%);
  background-size: 240% 100%;
  background-position: 95% 0;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 1px rgba(2, 30, 26, 0.55)) drop-shadow(0 0 16px rgba(52, 211, 176, 0.32));
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 650ms var(--ease), transform 650ms var(--ease);
}
.intro.is-title .intro-name {
  opacity: 1;
  transform: none;
  animation: introShine 1500ms cubic-bezier(0.45, 0, 0.25, 1) 120ms both;
}
@keyframes introShine {
  from {
    background-position: 95% 0;
  }
  to {
    background-position: 8% 0;
  }
}
.intro-skip {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 243, 233, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #d9f7ef;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.intro-skip:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(201, 243, 233, 0.6);
}

/* ===== Бизнес: две кнопки, условия, сценарий ===== */
.business-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 330px;
}
.btn-outline-light {
  color: #e8fff8;
  background: transparent;
  border-color: rgba(201, 243, 233, 0.5);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #c9f3e9;
}
.business-terms {
  margin: -8px 0 26px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.business-terms p {
  margin: 0;
  color: #c7e7df;
  font-size: 0.93rem;
}
.client-mode-dark .client-mode-label {
  color: #a9d6cc;
}
.client-mode-dark .segmented {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.12);
}
.client-mode-dark .seg {
  color: #c9f3e9;
}
.client-mode-dark .seg[aria-pressed='true'] {
  background: #fff;
  color: #0a2f2a;
}
.status-chips {
  margin-bottom: 10px;
}
.status-chips .chip {
  border-color: var(--emerald);
  color: var(--emerald-dark);
  font-weight: 600;
}
.footer-links {
  display: inline-flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-btn {
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration-color: rgba(93, 117, 112, 0.35);
}

/* ===== Платформа: общие элементы ===== */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-support {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn-support:hover {
  border-color: var(--emerald);
  color: var(--emerald-dark);
}
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 1.1rem;
  cursor: pointer;
}
.topnav a.nav-lawyers {
  border: 1px solid var(--line-2);
}
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
  vertical-align: 1px;
}
.badge-soft {
  background: var(--teal-soft);
  border-color: #c4ebee;
  color: #0c6b73;
}
.badge-warn {
  background: var(--warn-bg);
  border-color: #f1d79a;
  color: var(--warn);
}
.badge-danger {
  background: #fde8ea;
  border-color: #f5c2c7;
  color: var(--danger);
}
.badge-ok {
  background: var(--mint);
  border-color: #bfe8da;
  color: var(--emerald-dark);
}
.badge-ai,
.badge-human {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.badge-ai {
  background: #eef2ff;
  color: #3b4a9a;
  border: 1px solid #d6dcfa;
}
.badge-human {
  background: var(--mint);
  color: var(--emerald-dark);
  border: 1px solid #bfe8da;
}
.note-danger {
  background: #fde8ea;
  border-color: #f5c2c7;
  color: #7a1720;
}
.warn-text {
  color: var(--warn);
}
.ok-text {
  color: var(--emerald-dark);
}
.page {
  padding-top: 28px;
}
.page-head {
  margin-bottom: 18px;
}
.page-head h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 6px;
}
.page-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.page h2 {
  font-size: 1.2rem;
  margin: 26px 0 12px;
}
select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}
input[type='number'] {
  width: 100%;
  font: inherit;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.row-actions textarea {
  flex: 1 1 260px;
}
.plain-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
}
.list-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--r);
}
.side-card {
  padding: 20px;
  border-radius: var(--r);
  align-self: start;
}
.side-card h3 {
  font-size: 1.05rem;
}
.side-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 14px;
  margin: 10px 0;
  font-size: 0.92rem;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
/* Колонки сетки не должны растягиваться содержимым (полосы вкладок, длинные строки). */
.tools-layout > *,
.desk-grid > *,
.apply-layout > *,
.mod-layout > *,
.lawyers-grid > * {
  min-width: 0;
}
.history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.counter {
  font-size: 0.95rem;
  margin: 8px 0 4px;
}
.counter strong {
  font-size: 1.15rem;
  color: var(--emerald-dark);
}

/* Аудитории под первым экраном */
.audiences {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.audience {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.audience:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.audience-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald);
}

/* Тарифы */
.plans-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.plans-head .business-sub {
  margin: 0;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 12px 0 10px;
}
.plan-grid-single {
  grid-template-columns: 1fr;
  margin-top: 0;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.plan:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.plan-current {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(15, 157, 122, 0.18);
}
.plan-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.plan-top h4 {
  margin: 0;
  font-size: 1.05rem;
}
.plan-price {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
.plan-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}
.plan-facts {
  margin: 0 0 6px;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--ink-2);
  flex: 1;
}
.plan-note {
  font-size: 0.86rem;
  color: #a9d6cc;
  margin: 4px 0 0;
}
.lawyers .plan-note {
  color: var(--muted);
}
.sub-status {
  margin-top: 14px;
}
.sub-box {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.sub-box p {
  margin: 6px 0;
}
.sub-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.sub-meter {
  height: 8px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
  margin-top: 8px;
}
.sub-meter-fill {
  display: block;
  height: 100%;
  background: var(--grad);
  transition: width var(--t-slow) var(--ease);
}

/* Для юристов */
.lawyers {
  padding: 32px;
  background: linear-gradient(160deg, #ffffff, #eef8fb);
}
.lawyers-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 22px;
}
.lawyers-head h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
}
.lawyers-lead {
  max-width: 640px;
  color: var(--ink-2);
  font-size: 1.05rem;
}
.lawyers-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: none;
}
.lawyers-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.tool-list li {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.tool-list span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Конфиденциальность и типы ответов */
.privacy {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 28px;
}
.privacy p {
  max-width: 760px;
  color: var(--ink-2);
}
.answer-kinds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.answer-kind {
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.answer-kind p {
  margin: 0;
  font-size: 0.93rem;
}
.toggle-list {
  display: grid;
  gap: 4px;
}

/* Вкладки */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}
.tab {
  flex: none;
  font: inherit;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.tab[aria-selected='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.tab-count:not(:empty) {
  display: inline-block;
  min-width: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 0.75rem;
  font-weight: 700;
}
.admin-panel {
  display: grid;
  gap: 12px;
}
.admin-panel h4 {
  margin: 14px 0 6px;
}

/* Задания, модерация */
.task-card {
  padding: 18px 20px;
  border-radius: var(--r);
  margin-bottom: 12px;
  animation: bubbleIn var(--t) var(--ease) both;
}
.task-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.task-top h3 {
  margin: 0;
  font-size: 1.05rem;
}
.deadline {
  margin: 4px 0;
}
.due-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  margin: 6px 0;
}
.model-answer {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f5f7ff;
  border: 1px solid #e0e5fb;
  font-size: 0.92rem;
}
.lawyer-answer,
.specialist-answer,
.specialist-msg {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4fbf8;
  border: 1px solid #cdebe1;
}
.specialist-answer,
.specialist-msg {
  margin-top: 10px;
}
.editor {
  margin-top: 12px;
}
.checklist {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 8px;
}
.checklist legend {
  font-weight: 600;
  padding: 0 6px;
}
.checklist .check {
  background: transparent;
  border: 0;
  padding: 6px 4px;
  margin: 0;
}
.mod-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}
.queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.queue-item {
  width: 100%;
  display: grid;
  gap: 2px;
  text-align: left;
  font: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.queue-item.is-active {
  border-color: var(--emerald);
  background: var(--mint);
}
.mod-detail {
  padding: 20px;
}
.mod-actions {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 14px 0;
}
.versions {
  padding-left: 20px;
}
.version-text {
  white-space: pre-wrap;
  color: var(--ink-2);
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0 14px;
}
.settings-table input {
  min-width: 90px;
}

/* Инструменты, анкета, кабинет, каталог */
.tools-layout,
.desk-grid,
.apply-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
  align-items: start;
}
.desk-grid {
  grid-template-columns: 290px 1fr;
}
.tool-card {
  padding: 22px;
}
.tool-result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--warn-bg);
  border: 1px solid #f1d79a;
  animation: bubbleIn var(--t) var(--ease) both;
}
.tool-result-title {
  font-weight: 700;
}
.form-section {
  padding: 18px 20px;
  margin: 0 0 14px;
  border-radius: var(--r);
}
.form-section legend {
  font-weight: 700;
  padding: 0 6px;
}
fieldset.plain {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.field-row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.checks {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.checks-grid {
  grid-template-columns: 1fr 1fr;
}
.checks .check {
  margin: 0;
}
.verify-box {
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
}
.status-card {
  padding: 18px;
  border-radius: var(--r);
  margin-bottom: 12px;
}
.status-big {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 8px;
}
.status-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
  color: var(--muted);
}
.status-steps li.is-current {
  color: var(--emerald-dark);
  font-weight: 700;
}
.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border-radius: var(--r);
  margin-bottom: 16px;
}
.filters .field,
.filters .check {
  margin: 0;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.spec-card {
  padding: 18px;
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.spec-card p {
  margin: 2px 0;
}
.spec-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}
.spec-top h3 {
  margin: 0;
  font-size: 1.05rem;
}
.spec-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
}
.confirm-form {
  padding: 24px 26px 22px;
}
.confirm-form h2 {
  font-size: 1.25rem;
}
.confirm-body p {
  color: var(--ink-2);
}

/* ===== Шапка: основные разделы всегда видны ===== */
.topbar-inner {
  flex-wrap: wrap;
  height: auto;
  min-height: 64px;
  row-gap: 0;
}
.mainnav {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.mainnav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.mainnav a:hover {
  background: var(--mint);
  color: var(--emerald-dark);
}
.lbl-short {
  display: none;
}
.btn-cabinet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn-cabinet:hover {
  background: #163a34;
}
.btn-cabinet:active {
  transform: scale(0.97);
}
.mobile-menu {
  display: grid;
  gap: 2px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--line);
  animation: bubbleIn var(--t) var(--ease) both;
}
.mobile-menu a,
.mobile-menu .link-btn {
  padding: 10px 4px;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  font-size: 1rem;
}
@media (max-width: 1100px) {
  .mainnav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    padding: 0 0 8px;
    margin-left: -12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topbar-actions {
    margin-left: auto;
  }
}
@media (min-width: 601px) {
  .menu-toggle,
  .mobile-menu {
    display: none !important;
  }
}
@media (max-width: 600px) {
  .lbl-full {
    display: none;
  }
  .lbl-short {
    display: inline;
  }
  .mainnav .nav-secondary {
    display: none;
  }
  .mainnav {
    margin-left: -8px;
  }
  .mainnav a {
    padding: 7px 8px;
    font-size: 0.92rem;
  }
  .btn-cabinet span {
    display: none;
  }
  .btn-cabinet {
    padding: 0 10px;
  }
}

/* ===== Вход и регистрация ===== */
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
input[type='email'],
input[type='password'] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
input[type='email']:focus,
input[type='password']:focus {
  outline: none;
  border-color: var(--emerald);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 157, 122, 0.13);
}
.btn:disabled {
  cursor: progress;
}

/* ===== Консультация через сервер ===== */
.consult-page {
  max-width: 860px;
}
.consult-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.consult-thread .bubble {
  max-width: 100%;
}
.consult-thread .bubble p + p {
  margin-top: 10px;
}
.bubble-user.is-failed {
  opacity: 0.7;
}
.consult-ask,
.consult-follow {
  padding: 18px 20px;
  margin-bottom: 12px;
  animation: bubbleIn var(--t) var(--ease) both;
}
.consult-ask-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.consult-ask-row .field {
  margin: 0;
  flex: 1 1 220px;
}
.consult-wait {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  margin-bottom: 12px;
  animation: bubbleIn var(--t) var(--ease) both;
}
.loader-canvas {
  width: 200px;
  height: 150px;
  flex: none;
}
.wait-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.wait-stage {
  margin: 0 0 6px;
  color: var(--emerald-dark);
  font-size: 0.92rem;
  animation: bubbleIn var(--t) var(--ease) both;
}
.wait-long {
  font-size: 0.88rem;
  color: var(--ink-2);
}
.sources {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.sources ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}
.sources a {
  color: var(--emerald-dark);
  overflow-wrap: anywhere;
}
.src-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}
.src-ok {
  background: var(--mint);
  color: var(--emerald-dark);
}
.src-warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.src-bad {
  background: #fde8ea;
  color: var(--danger);
}
.sources p {
  margin: 8px 0 0;
}
.bubble-answer p a {
  color: var(--emerald-dark);
  overflow-wrap: anywhere;
}
.integration-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 320px;
}
.integration-text .small {
  overflow-wrap: anywhere;
}
.integration-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cabinet-panel {
  display: grid;
  gap: 12px;
}
@media (max-width: 600px) {
  .consult-wait {
    flex-direction: column;
    text-align: center;
  }
  .loader-canvas {
    width: 180px;
    height: 135px;
  }
}

/* ===== Мобильная версия ===== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero-visual {
    min-height: 0;
  }
  .preview-card {
    margin: 0;
    max-width: none;
  }
  .mini-card {
    display: none;
  }
  .business-areas {
    grid-template-columns: 1fr 1fr;
  }
  .business {
    padding: 26px 22px;
  }
  .audiences,
  .plan-grid,
  .lawyers-grid,
  .answer-kinds,
  .tools-layout,
  .desk-grid,
  .apply-layout,
  .mod-layout {
    grid-template-columns: 1fr;
  }
  .lawyers-head,
  .privacy {
    flex-direction: column;
    align-items: stretch;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  /* Меню в шапке на узких экранах */
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }
  .topnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    flex-direction: column;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
  }
  .topnav.is-open {
    display: flex;
    animation: bubbleIn var(--t) var(--ease) both;
  }
  .topbar-inner {
    position: relative;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .price-grid,
  .info-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .admin-table thead {
    display: none;
  }
  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }
  .admin-table tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  .admin-table tr:last-child {
    border-bottom: 0;
  }
  .admin-table td {
    border: 0;
    padding: 4px 0;
  }
  .admin-table td[data-label]::before {
    content: attr(data-label) ': ';
    color: var(--muted);
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }
  .demo-ribbon-text {
    display: none;
  }
  .topbar {
    top: 31px;
  }
  .topbar-inner {
    height: 56px;
  }
  .btn-support span {
    display: none;
  }
  .kv {
    grid-template-columns: 1fr;
  }
  .kv dd {
    margin-bottom: 6px;
  }
  .field-row3,
  .checks-grid,
  .filters {
    grid-template-columns: 1fr;
  }
  .topnav {
    gap: 2px;
  }
  .topnav a {
    padding: 7px 9px;
    font-size: 0.84rem;
    white-space: nowrap;
  }
  .topnav .tag {
    display: none;
  }
  .brand {
    gap: 8px;
    white-space: nowrap;
  }
  .brand-mark svg {
    width: 28px;
    height: 28px;
  }
  .brand-name {
    font-size: 0.95rem;
  }
  .seg {
    font-size: 0.82rem;
    white-space: nowrap;
  }
  .business-head {
    flex-direction: column;
    align-items: stretch;
  }
  .business-cta {
    max-width: none;
  }
  .business-cta .btn {
    width: 100%;
  }
  .client-mode-dark .seg {
    font-size: 0.8rem;
    white-space: normal;
    line-height: 1.2;
    min-height: 42px;
    padding: 4px 8px;
  }
  .business-areas {
    grid-template-columns: 1fr;
  }
  .segmented {
    width: 100%;
  }
  .seg {
    flex: 1;
    padding: 0 8px;
  }
  .hero {
    padding: 32px 0 16px;
  }
  .lead {
    font-size: 1.02rem;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .section {
    padding-top: 40px;
  }
  .step,
  .price-card,
  .price-list,
  .honest {
    padding: 20px;
  }
  .price-rows li {
    flex-direction: column;
    gap: 2px;
  }
  .choice-grid,
  .field-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .field-row {
    gap: 0;
  }
  dialog.sheet {
    width: 100vw;
    max-width: 100vw;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }
  dialog.sheet[open] {
    animation-name: sheetUp;
  }
  @keyframes sheetUp {
    from {
      transform: translateY(40px);
      opacity: 0;
    }
  }
  .sheet form {
    padding: 20px 16px 18px;
  }
  .sheet-foot {
    margin: 0 -16px -18px;
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  }
  .quote {
    padding: 10px 14px;
    gap: 4px;
  }
  .quote {
    flex-direction: column;
    align-items: stretch;
  }
  .quote-total {
    text-align: left;
  }
  .sheet-actions .btn {
    flex: 1;
  }
  .chat-head {
    padding: 14px 16px;
  }
  .chat-meta {
    text-align: left;
  }
  .bubble {
    max-width: 94%;
  }
  .pay-card {
    padding: 22px 18px;
  }
  .chat-actions {
    gap: 8px;
  }
  .chat-actions .btn {
    flex: 1 1 auto;
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.88rem;
  }
  .result-list {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .result-list dd {
    margin-bottom: 8px;
  }
}

/* ===== Уменьшение движения ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .mini-card,
  .preview-typing span,
  .typing span {
    animation: none !important;
  }
  .spinner,
  .welcome-orb,
  .particle {
    animation: none !important;
  }
  /* Заставка: статичный знак и короткий плавный переход. */
  .intro,
  .intro-name {
    transition-duration: 300ms !important;
  }
  html.intro-pending .intro {
    animation: introFailsafe 1ms linear 5s forwards !important;
  }
  html.intro-active .intro {
    animation: none !important;
  }
  .checkmark-circle,
  .checkmark-check {
    stroke-dashoffset: 0;
  }
}
