/* Прототип страницы «Вопрос риэлтору онлайн».
   Стили самостоятельные: макет открывается двойным щелчком и не зависит от сборки Django.
   Палитра и шрифты повторяют публичный сайт АРКИ: Playfair Display + Lato, тёплый песочный фон. */

:root {
  --ink: #172033;
  --ink-soft: #344054;
  --muted: #667085;
  --muted-2: #8b8175;
  --paper: #fffdf9;
  --cream: #f7f2e9;
  --cream-2: #efe6d8;
  --line: #e7ddce;
  --line-strong: #d8cbb8;
  --gold: #c5a065;
  --gold-dark: #9d7a41;
  --gold-soft: #f3e7d2;
  --navy: #16243a;
  --navy-2: #223552;
  --green: #1f7a55;
  --green-soft: #e6f4ed;
  --red: #b42318;
  --red-soft: #fef0ef;
  --amber: #a15c07;
  --amber-soft: #fff4e5;
  --shadow-sm: 0 1px 2px rgba(23, 32, 51, .06), 0 2px 8px rgba(23, 32, 51, .04);
  --shadow-md: 0 12px 32px rgba(23, 32, 51, .09), 0 2px 6px rgba(23, 32, 51, .04);
  --shadow-lg: 0 30px 70px rgba(23, 32, 51, .16), 0 8px 20px rgba(23, 32, 51, .06);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1180px;
  --font-sans: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.is-modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; flex: 0 0 auto; }
::selection { background: var(--gold-soft); color: var(--navy); }

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

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --- Шапка --- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 253, 249, .88);
  border-bottom: 1px solid rgba(231, 221, 206, .8);
  backdrop-filter: blur(14px);
}
.header-inner {
  min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy); color: var(--gold); font-family: var(--font-serif);
  font-size: 21px; letter-spacing: -.04em; box-shadow: var(--shadow-sm);
}
.brand-name {
  display: block; font-family: var(--font-serif); font-size: 18px; letter-spacing: .01em;
  line-height: 1.05; white-space: nowrap;
}
.brand-sub { display: block; font-size: 10px; letter-spacing: .18em; color: var(--muted-2); text-transform: uppercase; margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { font-size: 14px; color: var(--ink-soft); transition: color .2s; }
.site-nav a:hover { color: var(--gold-dark); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone { font-size: 14px; font-weight: 700; white-space: nowrap; }
.header-phone span { display: block; font-size: 10px; font-weight: 400; color: var(--muted); letter-spacing: .05em; }

/* --- Кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 12px 20px; border: 1px solid transparent; border-radius: 12px;
  font-size: 14px; font-weight: 700; line-height: 1.2; letter-spacing: .01em;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, color .2s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(197, 160, 101, .55); outline-offset: 2px;
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(22, 36, 58, .18); }
.btn-primary:hover { background: var(--navy-2); box-shadow: 0 10px 24px rgba(22, 36, 58, .24); }
.btn-gold { background: var(--gold); color: #1f1a13; box-shadow: 0 8px 20px rgba(197, 160, 101, .25); }
.btn-gold:hover { background: #d0ad75; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn-ghost:hover { background: var(--cream); border-color: var(--gold); color: var(--ink); }
.btn-light { background: #fff; color: var(--navy); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-light:hover { border-color: var(--gold); }
.btn-sm { min-height: 38px; padding: 9px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; }

/* --- Hero --- */
.hero { position: relative; padding: 54px 0 36px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 620px; z-index: -1;
  background:
    radial-gradient(680px 360px at 15% 10%, rgba(197, 160, 101, .12), transparent 70%),
    radial-gradient(520px 300px at 92% 4%, rgba(22, 36, 58, .06), transparent 70%),
    linear-gradient(180deg, #fbf7f0 0%, var(--paper) 86%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr); gap: 52px; align-items: start; }
.hero-copy { padding-top: 14px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px;
  padding: 7px 12px 7px 9px; border-radius: 999px; background: rgba(197, 160, 101, .12);
  color: var(--gold-dark); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(197,160,101,.16); }
h1, .h1 {
  margin: 0 0 20px; font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(42px, 5.2vw, 66px); line-height: 1.03; letter-spacing: -.035em; color: var(--navy);
}
h1 .accent { position: relative; z-index: 0; white-space: nowrap; color: var(--gold-dark); }
h1 .accent::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 4px; height: 9px; z-index: -1;
  background: rgba(197, 160, 101, .18); border-radius: 2px;
}
.hero-lead { max-width: 540px; margin: 0 0 26px; font-size: 18px; line-height: 1.62; color: var(--ink-soft); }
.hero-benefits { display: grid; gap: 11px; margin: 0 0 30px; padding: 0; list-style: none; }
.hero-benefits li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: var(--ink-soft); }
.check {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green-soft); color: var(--green);
  font-size: 12px; font-weight: 900;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.hero-note {
  max-width: 540px; margin: 0; padding: 13px 15px; border: 1px solid var(--line);
  border-radius: 12px; background: rgba(255, 255, 255, .55); color: var(--muted);
  font-size: 12.5px; line-height: 1.55;
}
.hero-note strong { color: var(--ink-soft); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-stat strong { display: block; font-family: var(--font-serif); font-size: 26px; font-weight: 400; color: var(--navy); line-height: 1; }
.hero-stat span { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); }

/* --- Карточка чата --- */
.chat-shell { position: relative; }
.chat-card {
  position: relative; display: flex; flex-direction: column;
  min-height: 620px; max-height: calc(100vh - 170px);
  background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.chat-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), #e7d2ad, var(--gold));
}
.chat-top {
  display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px;
  background: linear-gradient(180deg, #fff 0%, #fffdf9 100%);
  border-bottom: 1px solid var(--line);
}
.agent-avatar {
  position: relative; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px;
  overflow: hidden; background: var(--cream); border: 1px solid var(--line);
}
.agent-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.agent-avatar__initials {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--cream-2), var(--cream));
  color: var(--gold-dark); font-family: var(--font-serif); font-size: 20px; letter-spacing: -.04em;
}
.agent-avatar__initials--lg { font-size: 34px; }
.agent-avatar--sm { width: 38px; height: 38px; border-radius: 12px; }
.agent-avatar--lg { width: 82px; height: 82px; border-radius: 20px; }
.status-dot {
  position: absolute; right: 3px; bottom: 3px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--green); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(31,122,85,.15);
}
.status-dot.is-offline { background: #98a2b3; }
.chat-agent-name { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--navy); }
.chat-agent-role { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.chat-status {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
  font-size: 11px; font-weight: 700; color: var(--green);
}
.chat-status.is-offline { color: var(--muted); }
.chat-top-actions { margin-left: auto; display: flex; gap: 6px; }
.chat-icon-btn {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink-soft); display: grid; place-items: center; font-size: 14px;
}
.chat-icon-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.chat-context {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 9px 18px; background: var(--cream); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 11px;
}
.chat-context b { color: var(--ink-soft); font-weight: 700; }
.chat-context .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 18px; background:
    radial-gradient(circle at 12px 12px, rgba(197,160,101,.055) 1px, transparent 1px) 0 0 / 24px 24px,
    #fffdf9;
  scroll-behavior: smooth;
  min-height: 260px;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: #ddd2c1; border-radius: 6px; }
.chat-day { text-align: center; margin: 0 0 16px; }
.chat-day span { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(22,36,58,.06); color: var(--muted); font-size: 10.5px; }
.chat-message { display: flex; gap: 9px; margin-bottom: 14px; animation: msg-in .24s ease-out both; }
.chat-message.is-user { justify-content: flex-end; }
.chat-message.is-system { justify-content: center; margin: 10px 0 16px; }
.chat-message.is-system .chat-bubble {
  background: var(--amber-soft); color: #7a4a0a; border: 1px solid #f0d7b5;
  font-size: 11.5px; text-align: center; padding: 8px 12px;
}
.chat-bubble-wrap { max-width: 82%; }
.chat-message.is-user .chat-bubble-wrap { display: flex; flex-direction: column; align-items: flex-end; }
.chat-author { margin: 0 0 4px 2px; font-size: 10.5px; color: var(--muted); }
.chat-message.is-user .chat-author { margin: 0 2px 4px 0; }
.chat-bubble {
  padding: 11px 13px; border-radius: 15px 15px 15px 4px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); white-space: pre-wrap;
}
.chat-message.is-user .chat-bubble {
  border-radius: 15px 15px 4px 15px; background: var(--navy); color: #fff;
  border-color: var(--navy); box-shadow: 0 6px 16px rgba(22,36,58,.16);
}
.chat-time { display: block; margin-top: 4px; font-size: 9.5px; color: var(--muted-2); }
.chat-message.is-user .chat-time { color: rgba(255,255,255,.55); }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; padding: 0 2px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

.quick-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 15px 31px; }
.quick-chip {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-soft); font-size: 11px; line-height: 1.2;
  transition: border-color .15s, background .15s, color .15s;
}
.quick-chip:hover { border-color: var(--gold); background: var(--gold-soft); color: var(--navy); }

/* Крюк за контактом */
.hook-card {
  margin: 4px 0 14px 31px; padding: 14px; border: 1px solid #ead7b5; border-radius: 15px;
  background: linear-gradient(180deg, #fffaf0 0%, #fff 100%); box-shadow: var(--shadow-sm);
  animation: msg-in .3s ease-out both;
}
.hook-card[hidden] { display: none; }
.hook-kicker { display: flex; align-items: center; gap: 7px; margin: 0 0 4px; color: var(--gold-dark); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.hook-title { margin: 0 0 3px; font-family: var(--font-serif); font-size: 18px; line-height: 1.15; color: var(--navy); }
.hook-text { margin: 0 0 11px; font-size: 11.5px; color: var(--muted); }
.hook-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 9px; background: #fff; color: var(--ink); font-size: 12.5px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197,160,101,.16);
}
.hook-actions { display: flex; gap: 8px; align-items: center; }
.hook-actions .btn { min-height: 36px; padding: 8px 12px; font-size: 12px; border-radius: 9px; }
.hook-skip { border: 0; background: transparent; color: var(--muted); font-size: 10.5px; text-decoration: underline; text-underline-offset: 2px; padding: 6px 2px; }
.hook-skip:hover { color: var(--ink-soft); }
.hook-saved {
  display: flex; align-items: flex-start; gap: 9px; padding: 12px;
  border: 1px solid #cfe8db; border-radius: 13px; background: var(--green-soft);
  color: #135c40; font-size: 12px; line-height: 1.45; animation: msg-in .25s ease-out both;
}
.hook-saved b { display: block; font-size: 12.5px; }
.hook-saved[hidden] { display: none; }

.chat-footer { border-top: 1px solid var(--line); background: #fff; padding: 12px 14px 13px; }
.chat-composer { display: flex; gap: 8px; align-items: flex-end; }
.chat-input {
  flex: 1; min-height: 44px; max-height: 110px; resize: none; padding: 11px 12px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: #fff;
  color: var(--ink); font-size: 13px; line-height: 1.4; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.chat-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197,160,101,.14); }
.chat-send {
  flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 16px;
  box-shadow: 0 6px 14px rgba(22,36,58,.2); transition: background .15s, transform .15s;
}
.chat-send:hover { background: var(--gold); color: var(--navy); transform: translateY(-1px); }
.chat-send:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.chat-consent { display: flex; gap: 7px; align-items: flex-start; margin-top: 8px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.chat-consent input { margin: 2px 0 0; accent-color: var(--gold-dark); flex: 0 0 auto; }
.chat-consent a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 2px; }
.chat-legal-line { margin: 7px 0 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.4; }
.chat-error { display: none; margin: 7px 0 0; padding: 7px 9px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 11px; }
.chat-error.is-visible { display: block; }
.chat-offline-note {
  display: none; margin: 0 0 8px; padding: 9px 10px; border-radius: 10px;
  background: var(--amber-soft); color: #7a4a0a; font-size: 11px; line-height: 1.45;
}
.chat-card.is-offline .chat-offline-note { display: block; }
.chat-card.is-offline .chat-send { background: #98a2b3; }
.chat-card.is-offline .chat-card::before { background: #98a2b3; }

.chat-under { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding: 0 4px; color: var(--muted); font-size: 11px; }
.chat-under a { color: var(--gold-dark); font-weight: 700; }

/* --- Юридическая плашка --- */
.legal-banner { padding: 0 0 34px; }
.legal-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 22px 24px; border: 1px solid #e8d5b6; border-radius: var(--radius);
  background: linear-gradient(120deg, #fffaf0 0%, #fdf5e7 55%, #fbf1df 100%);
  box-shadow: var(--shadow-sm);
}
.legal-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: #fff; border: 1px solid #ead7b5; color: var(--gold-dark); font-size: 21px;
}
.legal-kicker { margin: 0 0 4px; color: var(--gold-dark); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.legal-title { margin: 0 0 5px; font-family: var(--font-serif); font-size: 22px; line-height: 1.2; color: var(--navy); }
.legal-text { margin: 0; max-width: 780px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; }
.legal-text a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 2px; }
.legal-cta { white-space: nowrap; }

/* --- Секции --- */
.section { padding: 68px 0; }
.section--cream { background: var(--cream); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.section-kicker {
  display: inline-block; margin-bottom: 10px; color: var(--gold-dark);
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.section-title {
  margin: 0 0 12px; font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.02em; color: var(--navy);
}
.section-sub { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }

.topics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.topic-card {
  position: relative; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.topic-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.topic-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--cream); color: var(--gold-dark); font-size: 18px; margin-bottom: 14px;
}
.topic-card h3 { margin: 0 0 7px; font-family: var(--font-serif); font-size: 21px; font-weight: 400; color: var(--navy); }
.topic-card p { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.topic-ask {
  margin-top: auto; align-self: flex-start; border: 0; background: transparent;
  color: var(--gold-dark); font-size: 12px; font-weight: 800; padding: 4px 0;
}
.topic-ask:hover { color: var(--navy); }
.topic-ask::after { content: " →"; }

.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step-card { position: relative; padding: 26px 22px 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.step-num {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--gold); font-family: var(--font-serif); font-size: 19px;
  margin-bottom: 15px;
}
.step-card h3 { margin: 0 0 7px; font-family: var(--font-serif); font-size: 21px; font-weight: 400; color: var(--navy); }
.step-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* --- Дежурный --- */
.duty-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 26px; align-items: stretch; }
.duty-card {
  display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 20px; align-items: center;
  padding: 26px; border-radius: 24px; background: var(--navy); color: #fff;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.duty-card::after {
  content: "АРКА"; position: absolute; right: -18px; bottom: -38px;
  font-family: var(--font-serif); font-size: 120px; color: rgba(197,160,101,.08); pointer-events: none;
}
.duty-card .agent-avatar { width: 108px; height: 132px; border-radius: 18px; border-color: rgba(255,255,255,.16); }
.duty-card .agent-avatar img { object-position: center 15%; }
.duty-card .status-dot { width: 14px; height: 14px; right: 6px; bottom: 6px; border-width: 3px; border-color: var(--navy); }
.duty-name { margin: 0 0 3px; font-family: var(--font-serif); font-size: 28px; font-weight: 400; line-height: 1.1; }
.duty-role { margin: 0 0 10px; color: rgba(255,255,255,.62); font-size: 12px; }
.duty-online { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 4px 8px; border-radius: 999px; background: rgba(31,122,85,.22); color: #8fe0ba; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.duty-online.is-offline { background: rgba(255,255,255,.1); color: rgba(255,255,255,.6); }
.duty-meta { margin: 0 0 14px; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.5; }
.duty-contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.duty-contacts .btn { min-height: 36px; padding: 8px 11px; font-size: 11.5px; border-radius: 9px; }
.duty-contacts .btn-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); box-shadow: none; }
.duty-contacts .btn-light:hover { background: rgba(255,255,255,.16); }
.schedule-card { padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-sm); }
.schedule-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.schedule-title { margin: 0; font-family: var(--font-serif); font-size: 24px; font-weight: 400; color: var(--navy); }
.schedule-note { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.schedule-badge { padding: 5px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 800; white-space: nowrap; }
.schedule-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.schedule-table th, .schedule-table td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.schedule-table th { color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.schedule-table tr:last-child td { border-bottom: 0; }
.schedule-table td:last-child { text-align: right; color: var(--muted); white-space: nowrap; }
.schedule-table .is-today { color: var(--gold-dark); font-weight: 800; }
.schedule-foot { display: flex; gap: 8px; align-items: center; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.45; }
.schedule-foot i { color: var(--gold-dark); }

/* --- FAQ --- */
.faq-wrap { max-width: 860px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  position: relative; list-style: none; cursor: pointer; padding: 20px 44px 20px 0;
  font-family: var(--font-serif); font-size: 19px; line-height: 1.3; color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 16px; width: 28px; height: 28px;
  border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center;
  color: var(--gold-dark); font-family: var(--font-sans); font-size: 18px; font-weight: 400;
  transition: transform .2s, background .2s;
}
.faq-item[open] summary::after { content: "−"; background: var(--gold-soft); transform: rotate(180deg); }
.faq-answer { padding: 0 44px 20px 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.faq-answer p { margin: 0 0 8px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 2px; }

/* --- SEO текст --- */
.seo-block { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: start; }
.seo-block h2 { margin: 0 0 14px; font-family: var(--font-serif); font-size: clamp(28px, 3.2vw, 38px); font-weight: 400; line-height: 1.12; color: var(--navy); }
.seo-block p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.seo-links { display: grid; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); }
.seo-links h3 { margin: 0 0 8px; font-family: var(--font-serif); font-size: 21px; font-weight: 400; color: var(--navy); }
.seo-links a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 12.5px; }
.seo-links a:last-child { border-bottom: 0; }
.seo-links a span { color: var(--gold-dark); }

/* --- Финальный CTA --- */
.final-cta { padding: 0 0 74px; }
.final-card {
  position: relative; overflow: hidden; padding: 46px min(5vw, 60px);
  border-radius: 28px; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center;
}
.final-card::before {
  content: ""; position: absolute; width: 420px; height: 420px; right: -100px; top: -160px;
  border-radius: 50%; border: 1px solid rgba(197,160,101,.22);
  box-shadow: 0 0 0 60px rgba(197,160,101,.045), 0 0 0 120px rgba(197,160,101,.025);
}
.final-card h2 { position: relative; margin: 0 0 8px; font-family: var(--font-serif); font-size: clamp(28px, 3.4vw, 42px); font-weight: 400; line-height: 1.08; }
.final-card p { position: relative; margin: 0; color: rgba(255,255,255,.66); font-size: 14px; }
.final-actions { position: relative; display: flex; flex-wrap: wrap; gap: 10px; }
.final-actions .btn-light { background: var(--gold); border-color: var(--gold); color: #1f1a13; box-shadow: 0 10px 24px rgba(197,160,101,.25); }
.final-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.26); }
.final-actions .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }

/* --- Подвал --- */
.site-footer { padding: 30px 0; border-top: 1px solid var(--line); background: #fbf8f2; color: var(--muted); font-size: 11.5px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a:hover { color: var(--gold-dark); }

/* --- Демо-панель прототипа --- */
.demo-bar {
  position: fixed; z-index: 80; right: 18px; bottom: 18px;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid rgba(22,36,58,.16); border-radius: 14px;
  background: rgba(22,36,58,.92); color: #fff; box-shadow: 0 16px 40px rgba(22,36,58,.28);
  backdrop-filter: blur(10px); font-size: 11px; max-width: calc(100vw - 24px);
}
.demo-label { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; color: rgba(255,255,255,.65); white-space: nowrap; }
.demo-label b { color: var(--gold); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 9.5px; }
.demo-sep { width: 1px; height: 22px; background: rgba(255,255,255,.16); }
.demo-btn {
  border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(255,255,255,.06);
  color: #fff; padding: 7px 9px; font-size: 10.5px; white-space: nowrap;
}
.demo-btn:hover { background: rgba(255,255,255,.14); }
.demo-btn.is-active { background: var(--gold); border-color: var(--gold); color: #1f1a13; font-weight: 800; }
.demo-state { display: inline-flex; align-items: center; gap: 5px; padding: 0 5px; color: rgba(255,255,255,.66); white-space: nowrap; }
.demo-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.demo-state.is-empty i { background: #98a2b3; }
.demo-state.is-contact i { background: var(--gold); }
.demo-panel {
  position: fixed; z-index: 79; right: 18px; bottom: 74px; transform: translateY(8px);
  width: min(360px, calc(100vw - 24px)); padding: 12px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.demo-panel.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.demo-panel h3 { margin: 0 0 6px; font-size: 12px; color: var(--navy); }
.demo-panel p { margin: 0 0 8px; font-size: 11px; line-height: 1.45; color: var(--muted); }
.demo-panel .demo-row { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-panel .demo-btn { background: var(--cream); border-color: var(--line); color: var(--ink-soft); }
.demo-panel .demo-btn:hover { background: var(--gold-soft); }
.demo-panel .demo-btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

.toast {
  position: fixed; z-index: 90; right: 18px; bottom: 78px; max-width: 340px;
  padding: 12px 14px; border-radius: 12px; background: var(--navy); color: #fff;
  box-shadow: var(--shadow-lg); font-size: 12px; line-height: 1.45;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }

/* --- Адаптив --- */
@media (max-width: 1080px) {
  .hero-grid { gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr); }
  .site-nav { gap: 18px; }
  .header-phone { display: none; }
  .topics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .site-nav { display: none; }
  .hero { padding-top: 36px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .chat-card { position: static; min-height: 590px; max-height: none; }
  .hero-copy { padding-top: 0; }
  .duty-grid, .seo-block { grid-template-columns: 1fr; }
  .final-card { grid-template-columns: 1fr; }
  .legal-card { grid-template-columns: auto 1fr; }
  .legal-cta { grid-column: 1 / -1; justify-self: start; }
  .steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, var(--container)); }
  .header-inner { min-height: 66px; }
  .brand-name { font-size: 15px; }
  .brand-sub { font-size: 8.5px; }
  .brand-mark { width: 38px; height: 38px; }
  .header-actions .btn { display: none; }
  h1 { font-size: clamp(38px, 12vw, 52px); }
  .hero-lead { font-size: 16px; }
  .hero-stats { gap: 18px; }
  .hero-stat strong { font-size: 22px; }
  .chat-card { border-radius: 20px; min-height: 560px; }
  .chat-top { padding: 14px; }
  .chat-messages { padding: 14px; }
  .quick-chips { margin-left: 0; }
  .hook-card { margin-left: 0; }
  .hook-grid { grid-template-columns: 1fr; }
  .legal-card { padding: 18px; grid-template-columns: 1fr; gap: 12px; }
  .legal-icon { width: 40px; height: 40px; }
  .legal-title { font-size: 20px; }
  .section { padding: 48px 0; }
  .topics-grid { grid-template-columns: 1fr; }
  .duty-card { grid-template-columns: 84px 1fr; padding: 20px; gap: 15px; }
  .duty-card .agent-avatar { width: 84px; height: 104px; }
  .duty-name { font-size: 23px; }
  .schedule-card { padding: 18px; }
  .schedule-table { font-size: 11.5px; }
  .final-card { padding: 32px 22px; border-radius: 22px; }
  .demo-bar { left: 10px; right: 10px; bottom: 10px; justify-content: center; gap: 6px; padding: 7px 8px; }
  .demo-label span { display: none; }
  .demo-state { display: none; }
  .demo-btn { padding: 6px 7px; font-size: 10px; }
  .demo-panel { left: 10px; right: 10px; bottom: 62px; width: auto; }
  .toast { left: 14px; right: 14px; bottom: 74px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Cookie banner на лендинге: оставляем обязательный выбор, но не закрываем пол-экрана. */
.rq-page .cookie-banner .container { padding-top: 8px; padding-bottom: 8px; }
.rq-page .cookie-banner .cookie-banner-text { max-width: 54rem; font-size: 11px; line-height: 1.35; }
.rq-page .cookie-banner .btn { min-height: 30px; padding: 5px 10px; font-size: 10.5px; }
