:root {
  color-scheme: dark;
  --bg: #080b09;
  --bg-2: #0b0f0c;
  --surface: #10140f;
  --surface-2: #161c17;
  --surface-3: #1a211b;
  --line: #232b24;
  --line-soft: #1b221c;
  --text: #f3f6f1;
  --body: #c7d0c6;
  --muted: #8c978d;
  --muted-2: #69736a;
  --green: #4ade68;
  --green-bright: #6ef08a;
  --green-deep: #12331f;
  --green-soft: rgba(74, 222, 104, 0.12);
  --green-line: rgba(74, 222, 104, 0.32);
  --green-glow: rgba(74, 222, 104, 0.45);
  --warn: #e0a458;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 50px -30px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  /* страховка от случайного горизонтального скролла; источники overflow
     дополнительно устранены точечно (min-width:0, overflow-wrap).
     hidden — fallback для iOS Safari < 16, который не знает clip
     (без него страница на старых iPhone «ездила» влево-вправо). */
  overflow-x: hidden;
  overflow-x: clip;
}

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

body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Фон: мягкое зелёное свечение сверху + тонкая сетка + виньетка снизу. */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(74, 222, 104, 0.10), transparent 55%),
    radial-gradient(90% 60% at 85% 5%, rgba(58, 170, 255, 0.05), transparent 50%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
}

.bg-decor::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 62%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 62%);
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.page {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(14px, 2.5vh, 24px) 0 clamp(24px, 3vh, 36px);
}

.app-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- шапка ---- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(16px, 3.5vh, 30px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}

/* Логотип — самостоятельная картинка (assets/logo.svg), рамка и подложка ей
   больше не нужны: они есть внутри самого знака. */
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: block;
  flex: 0 0 auto;
}


.brand-text {
  font-size: 14.5px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.login-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 9px 20px;
  border-radius: 999px;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}

.login-link:hover {
  color: var(--green);
  border-color: var(--green-line);
  background: var(--green-soft);
}

/* ---- hero ---- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: rise 0.6s var(--ease) both;
}

/* report view: после анализа страница сворачивает hero в компактную шапку */
.is-report .hero-intro,
.is-report .stats,
.is-report .advantages {
  display: none;
}

.is-report .hero {
  justify-content: flex-start;
}

.is-report .topbar {
  margin-bottom: 24px;
}

.is-report .search-shell {
  margin-top: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--green-line);
  background: linear-gradient(var(--green-soft), var(--green-soft)) padding-box,
    var(--surface);
  border-radius: 999px;
  padding: 7px 15px;
  box-shadow: 0 10px 30px -18px var(--green-glow);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 2.4s ease-in-out infinite;
}

.hero-head {
  text-align: center;
  max-width: 800px;
  margin-top: clamp(14px, 2.5vh, 22px);
}

.hero-head h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.06;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.hero-head h1 .accent {
  color: var(--green);
  position: relative;
  white-space: nowrap;
}

.hero-head p {
  margin: 16px auto 0;
  max-width: 540px;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.55;
}

/* ---- форма ---- */

.search-shell {
  margin-top: clamp(20px, 3.5vh, 32px);
  width: min(720px, 100%);
  display: grid;
  gap: 14px;
  justify-items: center;
  animation: rise 0.6s var(--ease) 0.08s both;
}

.search-box {
  position: relative;
  width: 100%;
  min-width: 0;
}

.search-pill {
  width: 100%;
  min-height: 66px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.search-pill:focus-within {
  border-color: var(--green-line);
  box-shadow: var(--shadow-card), 0 0 0 4px rgba(74, 222, 104, 0.1), 0 30px 60px -30px var(--green-glow);
}

/* Бейдж авто-определённого типа ввода (адрес / кадастр) слева в строке:
   лёгкая подпись без рамки, отделена от поля тонкой вертикальной чертой. */
.type-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  justify-content: center;
  padding: 4px 14px 4px 2px;
  margin-right: 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 560;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.type-badge.is-cadastral {
  color: var(--green);
  border-right-color: var(--green-line);
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  min-height: 44px;
  color: var(--text);
  font-size: 16px;
}

.search-input:focus {
  outline: none;
}

.search-input::placeholder,
.note-input::placeholder {
  color: var(--muted-2);
}

/* выпадающие подсказки адреса */
.suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-width: 100%;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}

.suggest li {
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.4;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: background 0.12s var(--ease);
}

.suggest li:hover,
.suggest li.is-active {
  background: var(--surface-3);
  color: var(--text);
}

.suggest li small {
  color: var(--muted-2);
  font-size: 12.5px;
}

/* Видимая подпись + невидимый нативный select поверх всей зоны:
   выпадающий список гарантированно открывается по клику в любом браузере. */
.intent-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  flex-shrink: 0;
  padding: 12px 12px 12px 16px;
  border-left: 1px solid var(--line);
  cursor: pointer;
}

.intent-current {
  color: var(--green);
  font-size: 14.5px;
  font-weight: 620;
  white-space: nowrap;
}

.intent-select-wrap > svg {
  color: var(--muted-2);
  transition: color 0.18s var(--ease);
}

.intent-select-wrap:hover > svg,
.intent-select-wrap:focus-within > svg {
  color: var(--green);
}

.intent-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  cursor: pointer;
}

.intent-select option {
  background: var(--surface);
  color: var(--text);
}

.pill-submit {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  border: 0;
  flex: 0 0 auto;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--green-bright), var(--green));
  color: #06120a;
  cursor: pointer;
  box-shadow: 0 10px 26px -10px var(--green-glow);
  transition: transform 0.18s var(--ease), filter 0.18s var(--ease), opacity 0.18s var(--ease), box-shadow 0.18s var(--ease);
  position: relative;
}

.pill-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 16px 34px -12px var(--green-glow);
}

.pill-submit:active {
  transform: translateY(0);
}

.pill-submit:disabled {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}

.pill-submit.is-loading svg {
  visibility: hidden;
}

.pill-submit.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(6, 18, 10, 0.35);
  border-top-color: #06120a;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.search-pill[aria-invalid="true"] {
  border-color: #c25b3f;
  box-shadow: var(--shadow-card), 0 0 0 4px rgba(194, 91, 63, 0.14);
}

.note-input {
  width: min(540px, 100%);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 11px 4px;
  text-align: center;
  font-size: 14px;
  transition: border-color 0.18s var(--ease);
}

.note-input:focus {
  outline: none;
  border-bottom-color: var(--green-line);
}

.status {
  color: var(--muted);
  font-size: 13px;
}

[data-tone="good"] {
  color: var(--green);
}

[data-tone="warn"] {
  color: var(--warn);
}

/* ---- статистика (преимущества-цифры) ---- */

.stats {
  margin-top: clamp(26px, 5vh, 48px);
  display: flex;
  align-items: center;
  gap: clamp(22px, 6vw, 60px);
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  animation: rise 0.6s var(--ease) 0.16s both;
}

.stats div:not(.stats-divider) {
  display: grid;
  gap: 6px;
}

.stats strong {
  font-size: clamp(34px, 4.4vw, 48px);
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1;
  background: linear-gradient(180deg, var(--green-bright), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 22px rgba(74, 222, 104, 0.28));
}

.stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.stats-divider {
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--line), transparent);
  background: var(--line);
}

/* ---- преимущества (карточки) ---- */

.advantages {
  margin-top: clamp(40px, 8vh, 72px);
  animation: rise 0.6s var(--ease) 0.2s both;
}

.advantages-head {
  text-align: center;
  display: grid;
  gap: 8px;
  margin-bottom: clamp(20px, 3vh, 30px);
}

.section-eyebrow {
  justify-self: center;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

.advantages-head h2 {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 740;
  letter-spacing: -0.02em;
}

.advantage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.advantage-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 90% 70% at 20% 0%, rgba(74, 222, 104, 0.06), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

/* Тонкая зелёная линия сверху — оживает на hover. */
.advantage-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 40%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--green-line), transparent);
  opacity: 0.55;
  transition: right 0.3s var(--ease), opacity 0.3s var(--ease);
}

.advantage-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-line);
  box-shadow: var(--shadow-card), 0 26px 54px -28px var(--green-glow);
}

.advantage-card:hover::before {
  right: 0;
  opacity: 1;
}

.advantage-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  box-shadow: 0 0 0 0 rgba(74, 222, 104, 0);
  transition: box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}

.advantage-card:hover .advantage-icon {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px var(--green-glow);
}

.advantage-icon svg {
  width: 24px;
  height: 24px;
}

.advantage-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.advantage-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---- стадии загрузки ---- */

.flow {
  width: min(680px, 100%);
  margin-top: 34px;
  display: grid;
  gap: 18px;
}

.progress {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.progress li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 13px;
  transition: color 0.2s ease;
}

.progress li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  flex: 0 0 auto;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.progress li.is-active {
  color: var(--text);
}

.progress li.is-active::before {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.1s ease-in-out infinite;
}

.progress li.is-done {
  color: var(--muted);
}

.progress li.is-done::before {
  background: var(--green);
}

@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}

/* ---- консультация (report view) ---- */

.consult {
  text-align: left;
  display: grid;
  gap: 28px;
  min-width: 0;
  animation: fade-in 0.35s ease;
}

.consult-section,
.consult-section p,
.consult-section li,
.report-block,
.report-part,
.report-part p,
.report-part li {
  min-width: 0;
  overflow-wrap: anywhere;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.consult-hero {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 70% 90% at 20% 0%, rgba(74, 222, 104, 0.07), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-card);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: 0 0 auto;
}

.status-chip.is-ok::before {
  background: var(--green);
  box-shadow: 0 0 6px rgba(74, 222, 104, 0.6);
}

.status-chip.is-warn::before {
  background: var(--warn);
}

.status-chip.is-intent {
  border-color: var(--green-line);
  background: var(--green-soft);
  color: var(--green);
}

.status-chip.is-intent::before {
  background: var(--green);
}

/* Шапка отчёта: вердикт и адрес одной строкой. Раньше здесь был ещё вводный
   абзац-«крючок», который пересказывал выводы глав своими словами и не добавлял
   ни одного факта — от него отказались: у отчёта о недвижимости доверие держится
   на данных, а вода в первом же экране его подрывает. */
.consult-address {
  margin: 0;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 640;
  letter-spacing: -0.012em;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.verdict-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.verdict-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 16px;
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  color: var(--green);
  font-size: 14px;
  font-weight: 650;
}

.verdict-line p {
  margin: 0;
  color: var(--body);
  font-size: clamp(15.5px, 2vw, 17px);
  line-height: 1.6;
  font-weight: 480;
  overflow-wrap: anywhere;
}

.consult-section {
  display: grid;
  gap: 10px;
}

.consult-section h3 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.consult-section h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 620;
  color: var(--muted);
}

.consult-section p {
  margin: 0;
  color: var(--body);
  font-size: 15.5px;
  line-height: 1.65;
}

.inline-label {
  color: var(--text);
  font-weight: 620;
}

.consult-section ul,
.consult-section ol {
  margin: 0;
  padding-left: 20px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.6;
  display: grid;
  gap: 7px;
  align-content: start;
}

.consult-columns .consult-section {
  align-content: start;
}

.consult-section ol li::marker {
  color: var(--green);
  font-weight: 700;
}

.consult-section ul li::marker {
  color: var(--muted-2);
}

.facts {
  margin: 6px 0 0;
  display: grid;
  gap: 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.facts div:first-child {
  border-top: 1px solid var(--line-soft);
}

.facts dt {
  color: var(--muted-2);
  font-size: 13px;
  flex: 0 0 auto;
}

.facts dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 560;
  text-align: right;
  overflow-wrap: anywhere;
}

.cadastre-warnings {
  color: var(--muted-2) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.unconfirmed {
  margin-top: 4px;
}

.reference-block {
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.reference-block h4 {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 620;
  color: var(--muted);
}

.reference-block .facts {
  margin: 0;
}

.reference-disclaimer {
  margin: 8px 0 0 !important;
  color: var(--muted-2) !important;
  font-size: 12.5px !important;
  font-style: italic;
  line-height: 1.45 !important;
}

.market-note {
  color: var(--warn) !important;
  font-size: 13.5px !important;
}

.market-ranges {
  color: var(--text) !important;
  font-weight: 560;
}

.data-disclaimer {
  color: var(--muted-2) !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
}

.comps {
  list-style: none;
  padding-left: 0 !important;
  margin: 0;
  display: grid;
  gap: 8px;
}

.comps li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.comps li:first-child {
  border-top: 1px solid var(--line-soft);
}

.comp-title {
  color: var(--body);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.comp-title a {
  color: var(--green);
  text-decoration: none;
}

.comp-title a:hover {
  text-decoration: underline;
}

.comp-price {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 560;
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 620px) {
  .comps li {
    flex-direction: column;
    gap: 2px;
  }

  .comp-price {
    text-align: left;
    white-space: normal;
  }
}

/* ---- макро-блоки отчёта: Место → Анализ → Выводы ---- */

.report-block {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-card);
}

.block-label {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

.report-part {
  display: grid;
  gap: 10px;
  align-content: start;
}

.report-part h3 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.report-part p {
  margin: 0;
  color: var(--body);
  font-size: 15.5px;
  line-height: 1.65;
}

.report-part ul,
.report-part ol {
  margin: 0;
  padding-left: 20px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.6;
  display: grid;
  gap: 7px;
  align-content: start;
}

.report-part ol li::marker {
  color: var(--green);
  font-weight: 700;
}

.report-part ul li::marker {
  color: var(--muted-2);
}

/* --- Семь глав отчёта: Квартира → Дом → Квартал → Район → Рынок → Анализ → Заключение --- */

/* Переход по якорю из оглавления — плавный средствами браузера, без скрипта:
   так ссылка на главу работает, даже если app.js не выполнился. */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Оглавление: липкая полоса без рамок и подложек у пунктов. Двигается ровно один
   элемент — линия индикатора, — и поэтому читается как «вы здесь», а не как ряд
   кнопок. Полоса прогресса внизу показывает, сколько отчёта пройдено. */
.chapter-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  /* Без min-width:0 элемент грида не сжимается ниже своего min-content, и ширина
     непереносимого списка глав растягивала всю колонку отчёта: главы уезжали за
     край экрана, а последние пункты меню становились недоступны. */
  min-width: 0;
  margin: 0 -4px;
  padding: 0 4px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-track {
  position: relative;
  display: flex;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.nav-track::-webkit-scrollbar {
  display: none;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 0 0 auto;
  padding: 13px 12px 12px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.22s ease;
}

.nav-num {
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.5;
  transition: opacity 0.22s ease, color 0.22s ease;
}

.nav-text {
  display: inline-block;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item:hover {
  color: var(--text);
}

.nav-item:hover .nav-text {
  transform: translateY(-1px);
}

.nav-item:hover .nav-num,
.nav-item.is-active .nav-num {
  opacity: 1;
  color: var(--green);
}

.nav-item.is-active {
  color: var(--text);
  font-weight: 600;
}

.nav-item:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -4px;
}

/* Индикатор — единственная движущаяся деталь. Прямоугольная линия, без скруглений. */
.nav-indicator {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--green);
  transform: translateX(0);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), width 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

/* Прогресс чтения: тонкая линия во всю ширину, растёт слева направо */
.nav-progress {
  display: block;
  height: 1px;
  background: var(--green);
  opacity: 0.35;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.12s linear;
}

@media (prefers-reduced-motion: reduce) {
  .nav-indicator,
  .nav-text,
  .nav-progress,
  .nav-track {
    transition: none;
    scroll-behavior: auto;
  }
}

.report-chapters {
  display: grid;
  gap: 14px;
}

.chapter {
  scroll-margin-top: 80px;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface);
}

.chapter-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chapter-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid var(--green-line);
}

.chapter-icon svg {
  width: 17px;
  height: 17px;
}

.chapter-index {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
  opacity: 0.7;
}

.chapter-title {
  margin: 0;
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

/* Бейджи источников — считает сервер, не модель: видно, чем глава подтверждена */
.chapter-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.src-badge {
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Вердикт главы — ведущая строка, читается первой */
.chapter-summary {
  margin: 0;
  color: var(--text);
  font-size: clamp(15.5px, 2vw, 17px);
  line-height: 1.55;
  font-weight: 460;
}

.chapter-body {
  display: grid;
  gap: 12px;
  align-content: start;
}

/* Квартал: факты слева, схема справа; на узком экране схема уходит вниз */
.block-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.block-facts {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.block-map {
  margin: 0;
  display: grid;
  gap: 6px;
  justify-items: center;
  width: 240px;
  color: var(--text);
}

.block-map svg {
  width: 240px;
  height: 240px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-3);
}

.block-map figcaption {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted-2);
  text-align: center;
  max-width: 240px;
}

@media (max-width: 720px) {
  .block-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .block-map {
    width: 100%;
    justify-self: center;
  }
}

/* Кривая рынка по годам — данные Росстата */
.market-curve {
  margin: 0;
  display: grid;
  gap: 6px;
  padding: 12px 14px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface-3);
  color: var(--green);
}

.market-curve svg {
  width: 100%;
  height: auto;
  max-height: 96px;
  display: block;
}

.market-curve figcaption {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

/* Медальон: число получает воздух и круглую рамку. Дуга рисуется только там,
   где доля осмысленна — иначе кольцо остаётся рамкой, а не датчиком. */
.stat {
  position: relative;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.stat-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.5;
}

.ring-arc {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
  stroke-linecap: round;
}

.stat-inner {
  position: relative;
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
  padding: 0 22px;
}

.stat-value {
  font-size: 27px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
}

.stat-note {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted-2);
}

/* Заключение: медальон слева, выводы справа. Самая короткая глава отчёта. */
.conclusion-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.conclusion-main {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

/* Служебный слой проверяемости не должен спорить с выводом за внимание,
   но и прятать его насовсем нельзя — он свёрнут, а не удалён. */
.conclusion-fineprint {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.conclusion-fineprint > summary {
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  transition: color 0.2s ease;
}

.conclusion-fineprint > summary::-webkit-details-marker {
  display: none;
}

.conclusion-fineprint > summary::before {
  content: '+';
  display: inline-block;
  width: 14px;
  color: var(--green);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.conclusion-fineprint[open] > summary::before {
  content: '−';
}

.conclusion-fineprint > summary:hover {
  color: var(--text);
}

.fineprint-body {
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

@media (max-width: 620px) {
  .conclusion-layout {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .conclusion-main {
    width: 100%;
  }
}

/* Проза вторична: мельче и приглушённее, чем вердикт и чипы */
.chapter-detail {
  margin: 0;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.65;
}

@media (max-width: 560px) {
  .chapter {
    padding: 14px;
  }

  .chapter-title {
    font-size: 13.5px;
  }

  .chapter-sources {
    width: 100%;
  }
}

/* Быстрые факты — чипы */
.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qf-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-3);
}

.qf-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.qf-value {
  font-size: 13.5px;
  font-weight: 620;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Место — сетка мини-карточек с иконками */
/* Акцентная строка вердикта (оставлена для отчётов старого формата) */
.market-verdict {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--green-line);
  background: var(--green-soft);
  color: var(--text) !important;
  font-size: 15px !important;
  font-weight: 560;
  line-height: 1.5 !important;
}

/* Выводы — акцентный список ключевых пунктов */
.key-points {
  list-style: none;
  padding-left: 0 !important;
  display: grid;
  gap: 10px;
  margin: 0;
}

.key-points li {
  position: relative;
  padding-left: 26px;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.5;
  font-weight: 520;
}

.key-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-soft);
  border: 1.5px solid var(--green);
}

.key-points li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 5px;
  height: 8px;
  border: solid var(--green);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.risk-list {
  list-style: none;
  padding-left: 0 !important;
}

.risk-list li {
  display: grid;
  gap: 7px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.risk-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 11px;
}

.risk-meta > span:not(.risk-cat) {
  border-left: 1px solid var(--line);
  padding-left: 7px;
}

.risk-list p {
  margin: 0;
}

.risk-list small {
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.5;
}

.risk-cat {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  position: relative;
  top: -1px;
}

.data-quality {
  border-left: 2px solid var(--warn);
  padding-left: 16px;
}

.evidence-list {
  list-style: none;
  padding-left: 0 !important;
}

.evidence-list li {
  display: grid;
  grid-template-columns: minmax(120px, 170px) 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.evidence-list li > span {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.consult-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.advice {
  margin: 0;
  border-left: 2px solid var(--green);
  padding: 4px 0 4px 18px;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.6;
  font-style: italic;
}

.cta-row {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding-top: 6px;
}

.cta-button {
  border: 0;
  border-radius: 13px;
  background: linear-gradient(160deg, var(--green-bright), var(--green));
  color: #06120a;
  font-size: 15px;
  font-weight: 680;
  padding: 15px 36px;
  cursor: pointer;
  box-shadow: 0 12px 30px -12px var(--green-glow);
  transition: transform 0.18s var(--ease), filter 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.cta-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px -14px var(--green-glow);
}

.cta-note {
  color: var(--muted);
  font-size: 13px;
}

.reset-button {
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.15s ease;
}

.reset-button:hover {
  color: var(--green);
}

/* ---- футер ---- */

.footer {
  margin-top: clamp(32px, 6vh, 60px);
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 0;
  color: var(--muted-2);
  font-size: 13px;
}

.toplinks {
  display: flex;
  gap: 18px;
}

.toplinks a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.toplinks a:hover {
  color: var(--green);
}

/* ---- документы (privacy / consent) ---- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  padding: 5px 12px;
}

.doc {
  max-width: 720px;
  margin: 0 auto;
}

.doc h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 14px 0 10px;
  letter-spacing: -0.01em;
}

.doc > p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.doc section {
  margin-top: 28px;
}

.doc h2 {
  font-size: 19px;
  margin: 0 0 8px;
}

.doc p,
.doc li {
  color: var(--body);
  line-height: 1.65;
  font-size: 15px;
}

.doc ul {
  margin: 0;
  padding-left: 20px;
}

/* ---- анимации входа ---- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

/* ---- адаптив ---- */

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

/* Мобильная строка поиска: всегда одна строка — input сжимается (min-width:0),
   селектор и кнопка не переносятся (flex-shrink:0). */
@media (max-width: 620px) {
  .topbar {
    margin-bottom: 30px;
  }

  .search-pill {
    padding: 7px 7px 7px 8px;
    gap: 6px;
  }

  .type-badge {
    min-width: 0;
    padding: 6px 8px;
    font-size: 11px;
  }

  .search-input {
    font-size: 15px;
    min-width: 0;
  }

  .intent-select-wrap {
    padding: 10px 8px 10px 10px;
    gap: 4px;
  }

  .intent-current {
    font-size: 13px;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pill-submit {
    width: 46px;
    height: 46px;
  }

  .stats {
    gap: 20px;
  }

  .stats-divider {
    display: none;
  }

  .facts div {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .facts dd {
    text-align: left;
  }

  .consult-hero {
    padding: 16px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- лид-форма под CTA (заявка на консультацию) ---- */

.lead-form {
  width: min(560px, 100%);
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-card);
}

.lead-title {
  margin: 0;
  color: var(--body);
  font-size: 14.5px;
  text-align: center;
}

.lead-fields {
  width: 100%;
  display: flex;
  gap: 8px;
}

.lead-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14.5px;
  transition: border-color 0.18s var(--ease);
}

.lead-input:focus {
  outline: none;
  border-color: var(--green-line);
}

.lead-input::placeholder {
  color: var(--muted-2);
}

.lead-submit {
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--green-bright), var(--green));
  color: #06120a;
  font-size: 14px;
  font-weight: 660;
  padding: 12px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.18s var(--ease);
}

.lead-submit:hover {
  filter: brightness(1.05);
}

.lead-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.lead-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
}

.lead-note a {
  color: var(--muted);
}

.lead-status {
  margin: 0;
  color: var(--warn);
  font-size: 13px;
  text-align: center;
}

/* «Дополните разбор района» — коллапс-форма под блоком «Район» */
.district-note {
  margin-top: 4px;
  display: grid;
  gap: 8px;
}

.district-note-toggle {
  justify-self: start;
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.district-note-toggle:hover {
  color: var(--text);
}

.district-note-form {
  display: grid;
  gap: 8px;
}

.district-note-input {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.5;
}

.district-note-input:focus {
  outline: none;
  border-color: var(--green-line);
}

.district-note-input::placeholder {
  color: var(--muted-2);
}

.district-note-form .lead-submit {
  justify-self: start;
}

/* 👍/👎 на отчёте */




.feedback-btn:disabled {
  opacity: 0.6;
  cursor: default;
}


.lead-done {
  margin: 0;
  color: var(--green);
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
}

/* ---- paywall: лимит исчерпан, email в wait-list ---- */

.paywall {
  display: grid;
  gap: 14px;
  justify-items: center;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(74, 222, 104, 0.07), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.paywall h2 {
  margin: 0;
  font-size: clamp(19px, 3vw, 24px);
  letter-spacing: -0.01em;
}

.paywall p {
  margin: 0;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.6;
}

.paywall-form {
  width: 100%;
  display: flex;
  gap: 8px;
}

.paywall-retry {
  margin-top: 4px;
}

/* Карточка плана на paywall — тест-режим оплаты (см. api/_lib/subscription.js):
   клик активирует план сразу и бесплатно, без реальной оплаты. */
.plan-card {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--green-line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--green-soft), transparent), var(--surface-2);
  text-align: left;
}

.plan-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.plan-card-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
}

.plan-card-price {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}

.plan-card-desc {
  margin: 0 !important;
  text-align: left !important;
}

/* ---- завершающие действия отчёта ----
   Раньше «поделиться» и «полезен ли отчёт» были двумя обведёнными коробками
   друг под другом: две рамки ради двух действий, и квадрат вокруг оценки
   выглядел случайной деталью. Теперь это одна спокойная полоса — слева
   действие, справа оценка, разделитель сверху вместо рамок. */
.report-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}

.report-actions .feedback-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 0;
  padding: 0;
  background: transparent;
}

.report-actions .feedback-label {
  font-size: 13.5px;
  color: var(--muted-2);
}

/* Оценка — только иконка, подложка появляется при наведении */
.report-actions .feedback-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}

.report-actions .feedback-btn:hover:not(:disabled) {
  color: var(--green);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.report-actions .feedback-status {
  font-size: 13px;
  color: var(--green);
}

@media (max-width: 620px) {
  .report-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .report-actions .share-button {
    justify-content: center;
  }

  .report-actions .feedback-row {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .report-actions .feedback-btn,
  .share-button {
    transition: none;
  }
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: transparent;
  color: var(--muted-2);
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 20px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}

.share-button:hover {
  color: var(--green);
  border-color: var(--green-line);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.share-button.is-copied {
  color: var(--green);
  border-color: var(--green-line);
}

/* ---- шапка: вход / регистрация / кабинет ---- */

.auth-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.register-link {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--green-bright), var(--green));
  color: #06120a;
  font-size: 14px;
  font-weight: 660;
  cursor: pointer;
  padding: 10px 20px;
  box-shadow: 0 10px 26px -12px var(--green-glow);
  transition: filter 0.18s var(--ease), transform 0.18s var(--ease);
}

.register-link:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.cabinet-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 14px;
  font-weight: 620;
  text-decoration: none;
  padding: 9px 20px;
  transition: filter 0.18s var(--ease);
}

.cabinet-link:hover {
  filter: brightness(1.1);
}

.cabinet-email {
  color: var(--muted);
  font-size: 13px;
}

/* ---- модал «Вход / Регистрация» ---- */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 5, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.auth-card {
  position: relative;
  width: min(400px, 100%);
  display: grid;
  gap: 18px;
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-card), 0 40px 90px -30px rgba(0, 0, 0, 0.8);
  animation: rise 0.3s var(--ease) both;
}

.auth-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}

.auth-close:hover {
  color: var(--text);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.auth-tab {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 620;
  padding: 9px 6px;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.auth-tab.is-active {
  background: var(--green-soft);
  color: var(--green);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.auth-field input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  transition: border-color 0.18s var(--ease);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--green-line);
}

.auth-status {
  margin: 0;
  color: var(--warn);
  font-size: 13px;
}

.auth-submit {
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--green-bright), var(--green));
  color: #06120a;
  font-size: 15px;
  font-weight: 680;
  padding: 13px 18px;
  cursor: pointer;
  transition: filter 0.18s var(--ease);
}

.auth-submit:hover {
  filter: brightness(1.05);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.auth-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* ---- личный кабинет ---- */

.cabinet {
  flex: 1;
  width: min(760px, 100%);
  margin: 0 auto;
  padding-top: clamp(20px, 4vh, 40px);
}

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

.cabinet-head h1 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.02em;
}

.cabinet-new {
  color: var(--green);
  font-size: 14px;
  font-weight: 620;
  text-decoration: none;
}

.cabinet-new:hover {
  text-decoration: underline;
}

.cabinet-status {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.cabinet-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.cabinet-item {
  display: grid;
  gap: 4px;
  padding: 14px 4px;
  border-top: 1px solid var(--line-soft);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.cabinet-list li:last-child .cabinet-item {
  border-bottom: 1px solid var(--line-soft);
}

.cabinet-item:hover {
  background: linear-gradient(90deg, var(--green-soft), transparent 70%);
}

.cabinet-item-query {
  font-size: 15.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.cabinet-item-meta {
  color: var(--muted-2);
  font-size: 12.5px;
}

/* ---- футер: дисклеймер в самом низу ---- */

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

.footer-disclaimer {
  margin: 10px 0 0;
  color: var(--muted-2);
  font-size: 12px;
}

@media (max-width: 560px) {
  .lead-fields,
  .paywall-form {
    flex-direction: column;
  }

  .lead-submit {
    width: 100%;
  }

  .auth-links {
    gap: 6px;
  }

  .login-link,
  .register-link,
  .cabinet-link {
    padding: 8px 13px;
    font-size: 13px;
  }
}

/* ---- компактный лендинг ----
   Визуальный слой главной изолирован классом landing-page: кабинет,
   юридические страницы и развёрнутый отчёт сохраняют свои компоненты. */

@keyframes landing-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes search-sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(300%);
  }
}

.landing-page {
  isolation: isolate;
  position: relative;
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 20px 56px 16px;
  overflow: hidden;
  background: #07100b;
  color: #eef5f0;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
}

.landing-page.is-report {
  overflow: visible;
}

.landing-page::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -260px;
  left: 50%;
  width: 900px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 232, 155, 0.13) 0%, transparent 68%);
  transform: translateX(-50%);
  pointer-events: none;
}

.landing-page::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 112px 100%;
  pointer-events: none;
}

.landing-page > * {
  position: relative;
  z-index: 1;
}

.landing-page > .topbar {
  flex-shrink: 0;
  margin: 0;
  animation: landing-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.landing-page .brand {
  gap: 11px;
}

.landing-page .brand-mark {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(140deg, #1fe89b, #0aa96f);
  color: #06170f;
  box-shadow: none;
}

.landing-page 
.landing-page .brand-text {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.landing-page .auth-links {
  gap: 8px;
}

.landing-page .login-link {
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: transparent;
  color: #cfe4d9;
  font-size: 13px;
  font-weight: 600;
}

.landing-page .login-link:hover {
  border-color: rgba(31, 232, 155, 0.4);
  background: transparent;
  color: #eef5f0;
}

.landing-page .register-link,
.landing-page .cabinet-link {
  padding: 9px 20px;
  border: 0;
  border-radius: 10px;
  background: #1fe89b;
  color: #06170f;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.landing-page .register-link:hover,
.landing-page .cabinet-link:hover {
  background: #3af0ac;
  filter: none;
  transform: none;
}

.landing-page .hero {
  flex: 1;
  min-height: 0;
  justify-content: center;
  gap: 44px;
  padding: 24px 0;
}

.landing-page .hero-intro {
  animation: landing-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
}

.landing-page .hero-head {
  max-width: 780px;
  margin: 0;
}

.landing-page .hero-head h1 {
  margin: 0;
  color: #eef5f0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}

.landing-page .hero-head h1 .accent {
  color: #1fe89b;
  white-space: normal;
}

.landing-page .search-shell {
  width: min(660px, 100%);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: landing-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.14s both;
}

.landing-page .search-pill {
  position: relative;
  min-height: 0;
  gap: 0;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: #0d1611;
  box-shadow: 0 28px 70px -28px rgba(0, 0, 0, 0.8);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.landing-page .search-pill::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 33%;
  height: 1px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, transparent, #1fe89b, transparent);
  animation: search-sweep 3.6s linear infinite;
  pointer-events: none;
}

.landing-page .search-pill:focus-within {
  border-color: rgba(31, 232, 155, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 232, 155, 0.1), 0 28px 70px -28px rgba(0, 0, 0, 0.8);
}

.landing-page .search-input {
  min-height: 44px;
  padding: 13px 18px;
  color: #eef5f0;
  font-size: 15px;
  font-weight: 500;
}

.landing-page .search-input::placeholder {
  color: #586a60;
}

.landing-page .intent-select-wrap {
  gap: 7px;
  padding: 11px 16px;
  border-left-color: rgba(255, 255, 255, 0.08);
}

.landing-page .intent-current {
  max-width: none;
  color: #cfe4d9;
  font-size: 13.5px;
  font-weight: 600;
}

.landing-page .intent-select-wrap > svg {
  width: 11px;
  height: 11px;
  color: #78897f;
}

.landing-page .intent-select-wrap:hover .intent-current,
.landing-page .intent-select-wrap:hover > svg,
.landing-page .intent-select-wrap:focus-within .intent-current,
.landing-page .intent-select-wrap:focus-within > svg {
  color: #1fe89b;
}

.landing-page .pill-submit {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #1fe89b;
  color: #06170f;
  box-shadow: none;
}

.landing-page .pill-submit:hover {
  background: #3af0ac;
  box-shadow: none;
  filter: none;
  transform: none;
}

.landing-page .suggest {
  border-color: rgba(255, 255, 255, 0.09);
  background: #0d1611;
}

.landing-page .hero-lead {
  max-width: 560px;
  margin: 0;
  align-self: center;
  color: #8ea297;
  font-size: 14.5px;
  line-height: 1.55;
}

.landing-page .hero-lead strong {
  color: #eef5f0;
  font-weight: 600;
}

.landing-page .status {
  margin-top: -8px;
  color: #8ea297;
}

.landing-page .how-it-works {
  width: min(840px, 100%);
  animation: landing-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.26s both;
}

.landing-page .how-it-works h2 {
  margin: 0 0 22px;
  color: #4e5e55;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.landing-page .steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-page .steps::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 16.6%;
  left: 16.6%;
  height: 1px;
  background: linear-gradient(90deg, rgba(31, 232, 155, 0.45), rgba(31, 232, 155, 0.12), rgba(31, 232, 155, 0.45));
}

.landing-page .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  text-align: center;
}

.landing-page .step-number {
  position: relative;
  z-index: 1;
  width: 27px;
  height: 27px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1.5px solid rgba(31, 232, 155, 0.8);
  border-radius: 50%;
  background: #07100b;
  color: #1fe89b;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
}

.landing-page .step-body {
  display: contents;
}

.landing-page .step-body strong {
  color: #eef5f0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.landing-page .step-body > span {
  color: #78897f;
  font-size: 12px;
  line-height: 1.45;
}

.landing-page .flow {
  width: min(680px, 100%);
}

.landing-page.is-report .hero-intro,
.landing-page.is-report .hero-lead,
.landing-page.is-report .how-it-works {
  display: none;
}

.landing-page.is-report .hero {
  justify-content: flex-start;
  gap: 0;
  padding-top: 24px;
}

.landing-page.is-report .search-shell {
  margin: 0;
}

.landing-page.is-report .flow {
  margin-top: 34px;
}

.landing-page .landing-footer {
  flex-shrink: 0;
  margin: 0;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: #4e5e55;
  font-size: 11px;
  animation: landing-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both;
}

.landing-page.is-report .landing-footer {
  margin-top: 48px;
}

.landing-page .landing-footer .toplinks {
  gap: 18px;
}

.landing-page .landing-footer .toplinks a {
  color: #9fb3a8;
  font-size: 11px;
  font-weight: 400;
}

.landing-page .landing-footer .toplinks a:hover {
  color: #1fe89b;
}

@media (max-width: 720px) {
  .landing-page {
    min-height: 100dvh;
    padding: 18px 20px;
    overflow: visible;
  }

  .landing-page .hero {
    gap: 34px;
    padding: 30px 0;
  }

  .landing-page .hero-head h1 {
    font-size: 29px;
    letter-spacing: -0.03em;
  }

  .landing-page .search-pill {
    flex-wrap: wrap;
  }

  .landing-page .search-input {
    flex: 1 1 100%;
    padding: 12px 14px 8px;
  }

  .landing-page .intent-select-wrap {
    flex: 1;
    justify-content: flex-start;
    padding-left: 14px;
    border-left: 0;
  }

  .landing-page .pill-submit {
    width: 44px;
    height: 44px;
  }

  .landing-page .hero-lead {
    font-size: 14px;
  }

  .landing-page .steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .landing-page .steps::before {
    display: none;
  }

  .landing-page .step {
    flex-direction: row;
    align-items: flex-start;
    gap: 13px;
    padding: 0;
    text-align: left;
  }

  .landing-page .step-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .landing-page .login-link {
    display: none;
  }

  .landing-page .landing-footer {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* --- Печать и сохранение в PDF ---------------------------------------------
   Отчёт живёт по ссылке /r/<id>: его пересылают, печатают и показывают юристу
   или супругу. На бумаге интерфейс не нужен — нужен документ: чёрное по белому,
   без навигации и форм, и главы не должны разрываться посреди страницы. */
@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-3: #fff;
    --text: #000;
    --body: #1a1a1a;
    --muted-2: #555;
    --line: #bbb;
    --line-soft: #ddd;
    --green: #0a6b2a;
    --green-soft: #f2f7f3;
    --green-line: #9ec4a9;
  }

  html,
  body {
    background: #fff !important;
    color: #000;
  }

  /* Всё, что нельзя нажать на бумаге */
  .bg-decor,
  .topbar,
  .chapter-nav,
  .cta-row,
  .district-note,
  .feedback-row,
  .share-row,
  .lead-form,
  .auth-modal,
  .suggest-list,
  .search-shell,
  .intent-row,
  .reset-button {
    display: none !important;
  }

  /* Свёрнутые основания на бумаге раскрываем: сложить лист обратно нельзя */
  .conclusion-fineprint > summary {
    display: none;
  }

  .conclusion-fineprint[open] .fineprint-body,
  .conclusion-fineprint .fineprint-body {
    display: grid !important;
  }

  .chapter {
    border: 1px solid #ccc;
    background: #fff;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .stat,
  .block-map,
  .market-curve,
  .comps,
  .risk-list li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ring-track {
    fill: #fff;
    stroke: #999;
  }

  /* Ссылки на бумаге бесполезны без адреса — печатаем его рядом */
  .comps a::after {
    content: ' (' attr(href) ')';
    font-size: 9px;
    color: #555;
    word-break: break-all;
  }

  .consult {
    max-width: none;
  }

  @page {
    margin: 14mm;
  }
}
