/* Страницы направления В: главная и разделы с панелями.
   Файлов стилей четыре, а не один: ядро макета и страницы вместе дают
   больше трёхсот строк, а по конституции файл короче. Резать пришлось
   по границам самого макета — так проще сверяться с Astrой. */

/* Главная: первый экран, маршруты, шаги, площадка — из home.css макета. */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px 64px; align-items: center; padding-block: 56px 24px; }
.hero-copy h1 { font-size: clamp(2.5rem, 4vw, 3.625rem); line-height: 1.08; }
.hero-copy h1 span { color: var(--accent); }
.hero-description { font-size: 1.125rem; margin-top: 32px; color: var(--muted); max-width: 47ch; }
.hero-countries { margin-top: 32px; color: var(--muted); }
.hero-account { padding: 24px; }
.account-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; color: var(--muted); }
.account-symbol { color: var(--accent); background: var(--tint); width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; }
.hero-total { display: grid; gap: 8px; padding-block: 8px 24px; }
.hero-price { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.15; font-weight: 650; }
.hero-car { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--field); }
.hero-car img { height: 100%; }
.hero-car .badge { position: absolute; bottom: 16px; left: 16px; max-width: calc(100% - 32px); background: var(--paper); }
.account-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; }
.account-bottom > span { display: flex; gap: 8px; align-items: center; }
.account-bottom > span svg { color: var(--accent); }
[data-icon] { display: inline-flex; vertical-align: middle; }
.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; grid-column: 1 / -1; }
.route-card { padding: 32px; border-radius: 24px; display: flex; gap: 24px; align-items: center; background: var(--paper); box-shadow: var(--shadow); }
.route-card h2 { font-size: 1.5rem; }
.route-card p { color: var(--muted); margin-top: 8px; }
.route-card > [data-icon]:last-child { margin-left: auto; color: var(--accent); }
.route-icon { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; background: var(--tint); border-radius: 24px; color: var(--accent); }
.route-icon svg { width: 32px; height: 32px; }
.route-card:hover { background: var(--tint); }
.dealer-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-block: 48px; margin-top: 16px; border-bottom: 1px solid var(--line); }
.dealer-number { display: flex; align-items: center; gap: 24px; }
.dealer-number strong { font-size: 2.75rem; line-height: 1.2; font-weight: 600; white-space: nowrap; }
.dealer-number span { color: var(--muted); max-width: 17ch; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; list-style: none; margin: 0; padding: 0; }
.step-number { display: inline-block; font-size: 1.75rem; margin-bottom: 24px; color: var(--accent); }
.steps h3 { font-size: 1.25rem; }
.steps p { color: var(--muted); margin-top: 16px; }
.showroom { overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; }
.showroom figure { position: relative; min-height: 400px; }
.showroom img { height: 100%; position: absolute; }
.showroom figcaption { position: absolute; bottom: 16px; left: 16px; right: 16px; padding: 8px 16px; background: var(--paper); border-radius: 16px; color: var(--muted); }
.showroom-copy { padding: 48px; }
.showroom-copy p { margin-top: 24px; color: var(--muted); }
.showroom-copy .button { margin-top: 32px; }
@media (max-width: 1100px) {
  .hero { gap: 32px; }
  .account-bottom { align-items: start; flex-direction: column; gap: 0; }
  .route-card { padding: 24px; gap: 16px; }
  .route-icon { width: 48px; height: 48px; border-radius: 16px; }
  .dealer-number { gap: 16px; flex-direction: column; align-items: start; }
  .showroom-copy { padding: 32px; }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .hero-copy h1 { font-size: 3rem; }
  .hero-account { max-width: none; grid-row: 3; }
  .account-bottom { flex-direction: row; align-items: center; }
  .routes { gap: 16px; grid-row: 2; }
  .route-card { flex-wrap: wrap; }
  .route-card > div { width: 100%; order: 3; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showroom { grid-template-columns: 1fr; }
  .showroom figure { min-height: 320px; }
}
@media (max-width: 540px) {
  .hero-copy h1 { font-size: 2.5rem; }
  .hero-description { margin-top: 24px; }
  .hero-countries { margin-top: 24px; }
  .hero-account { padding: 24px; border-radius: 24px; }
  .hero-car { aspect-ratio: 1.15; border-radius: 16px; }
  .hero-car .badge { left: 8px; bottom: 8px; max-width: calc(100% - 16px); }
  .account-top { gap: 8px; }
  .account-symbol { flex-shrink: 0; }
  .account-bottom { flex-direction: column; align-items: start; gap: 8px; }
  .hero-total { padding-top: 16px; }
  .routes { grid-template-columns: 1fr; }
  .route-card { padding: 24px; }
  .route-card > div { width: auto; flex: 1; order: 0; }
  .route-icon { display: none; }
  .dealer-numbers { gap: 24px; grid-template-columns: 1fr; padding-block: 32px; }
  .dealer-number { flex-direction: row; align-items: center; gap: 24px; }
  .dealer-number strong { min-width: 112px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step-number { margin-bottom: 16px; }
  .showroom-copy { padding: 24px; }
  .showroom figure { min-height: 256px; }
  .showroom-copy .button { width: 100%; }
}

/* Контакты, политика, спасибо, расчёт: панели, списки, реквизиты — из extended.css макета. */
.page-intro { padding-block: 24px 40px; }
.page-intro h1 { max-width: 22ch; }
.page-intro > p { margin-top: 24px; color: var(--muted); font-size: 1.125rem; }
.split-panel { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.panel { padding: 40px; min-width: 0; }
.panel h2 { margin-bottom: 24px; font-size: 2rem; }
.panel > p + p { margin-top: 16px; }
.panel > .actions { margin-top: 24px; }
.stack { display: grid; gap: 24px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.notice { padding: 24px; background: var(--tint); border-radius: 24px; color: var(--muted); }
.notice strong { display: block; margin-bottom: 8px; color: var(--ink); }
.notice a { justify-content: start; }
.contact-list { display: grid; gap: 24px; margin: 0; }
.contact-list dt { color: var(--muted); }
.contact-list dd { margin: 8px 0 0; font-size: 1.25rem; font-weight: 600; }
.contact-list dd > a { min-height: 48px; display: inline-flex; align-items: center; color: var(--accent); }
.message-links { display: flex; flex-wrap: wrap; gap: 16px; }
.legal-details { display: grid; gap: 0; margin: 0; }
.legal-details > div { padding-block: 16px; border-bottom: 1px solid var(--line); }
.legal-details dt { color: var(--muted); }
.legal-details dd { margin: 8px 0 0; overflow-wrap: anywhere; }
.location-photo { overflow: hidden; }
.location-photo img { aspect-ratio: 16 / 10; }
.location-photo figcaption { padding: 24px; color: var(--muted); }
.numbered-steps { padding: 0; margin: 0; list-style: none; counter-reset: steps; }
.numbered-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding-block: 24px; counter-increment: steps; }
.numbered-steps li::before { content: '0' counter(steps); display: grid; place-items: center; align-self: start; height: 48px; border-radius: 16px; color: var(--accent); background: var(--tint); font-variant-numeric: tabular-nums; }
.numbered-steps h3 { margin-bottom: 8px; }
.numbered-steps p { color: var(--muted); }
.status-mark { width: 80px; height: 80px; display: grid; place-items: center; border-radius: 24px; background: var(--tint); color: var(--accent); margin-bottom: 32px; }
.status-mark svg { width: 40px; height: 40px; }
.status-copy h1 { max-width: 20ch; }
.status-copy > p { margin-top: 24px; color: var(--muted); font-size: 1.125rem; }
.status-copy .actions { margin-top: 32px; }
.status-copy { padding-block: 48px; }
.status-copy .large-code { font-size: clamp(5rem, 16vw, 10rem); line-height: 1; color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; margin-block: 0 24px; }
.service-card { display: grid; gap: 24px; }
.service-card h2 { margin-bottom: 0; }
.service-card .contact-phone { font-size: 1.5rem; justify-content: start; }
.inventory-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 32px; }
.inventory-summary .number { font-size: 2rem; font-weight: 650; }
.stock-condition { margin-top: 8px; color: var(--muted); }
.request-price { white-space: normal; font-size: 1.5rem; }
.empty-inventory { display: grid; gap: 24px; justify-items: start; padding: 48px; }
.empty-inventory h2 { max-width: 24ch; }
.empty-inventory p { color: var(--muted); }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.legal-navigation { display: grid; gap: 8px; }
.legal-navigation a { min-height: 48px; padding: 8px 16px; display: flex; align-items: center; color: var(--accent); border-radius: 16px; }
.legal-navigation a:hover { background: var(--tint); }
.legal-document { padding: 40px; }
.legal-document section + section { margin-top: 40px; }
.legal-document h2 { font-size: 1.75rem; margin-bottom: 24px; }
.legal-document p + p, .legal-document ul { margin-top: 16px; }
.legal-document ul { padding-left: 24px; }
.legal-document li + li { margin-top: 8px; }
.legal-document p, .legal-document li { line-height: 1.75; }
.legal-document a { min-height: 48px; display: inline-flex; align-items: center; color: var(--accent); overflow-wrap: anywhere; }
.spec-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.spec-table th, .spec-table td { padding: 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; text-align: left; }
.spec-table th { font-weight: 400; color: var(--muted); width: 52%; padding-right: 16px; }
.spec-table td { font-weight: 600; }
.own-price { font-size: clamp(2rem, 4vw, 3rem); font-weight: 650; line-height: 1.15; }
.own-price.request-price { font-size: 2rem; }
.own-details .estimate > p { margin-top: 24px; }
.own-details .estimate .actions { margin-top: 24px; }
.sold-summary { display: flex; align-items: center; gap: 24px; }
.sold-summary img { width: 160px; height: 112px; border-radius: 16px; }
.sold-summary h2 { font-size: 1.5rem; margin-bottom: 8px; }
.landing-feature { padding: 40px; background: var(--tint); border-radius: 32px; }
.landing-description { margin-top: 24px; color: var(--muted); font-size: 1.125rem; }
.landing-feature .number { font-size: 2.5rem; font-weight: 650; color: var(--accent); }
.landing-feature p { margin-top: 16px; }
.topic-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }
.faq { display: grid; gap: 16px; }
.faq details { background: var(--paper); border-radius: 24px; padding: 8px 24px; box-shadow: var(--shadow); }
.faq summary { min-height: 64px; display: flex; align-items: center; gap: 24px; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-left: auto; font-size: 1.5rem; color: var(--accent); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding-block: 8px 24px; color: var(--muted); }
.calculation-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.calculation-form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.calculation-form .full-field { grid-column: 1 / -1; }
.calculation-form .field select, .calculation-form .field input { background: var(--field); }
.calculation-form .button { width: 100%; }
.calculation-note { margin-top: 24px; }
.calculation-result h2 { font-size: 2rem; }
.calculation-result > p { margin-top: 16px; }
.calculation-result .button { width: 100%; margin-top: 24px; }
.calculation-result .estimate-total strong { font-size: clamp(1.75rem, 3vw, 2.75rem); white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .split-panel, .calculation-layout { gap: 24px; }
  .panel, .legal-document { padding: 32px; }
  .legal-layout { grid-template-columns: 192px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 800px) {
  .split-panel, .calculation-layout, .legal-layout { grid-template-columns: 1fr; }
  .legal-navigation { grid-template-columns: 1fr 1fr; }
  .status-copy { padding-block: 24px; }
}
@media (max-width: 540px) {
  .panel, .legal-document, .landing-feature, .empty-inventory { padding: 24px; border-radius: 24px; }
  .page-intro { padding-block: 16px 32px; }
  .panel h2 { font-size: 1.75rem; }
  .legal-navigation, .calculation-form { grid-template-columns: 1fr; }
  .actions { align-items: stretch; flex-direction: column; }
  .actions .button { width: 100%; }
  .sold-summary { align-items: start; flex-direction: column; }
  .sold-summary img { width: 100%; height: auto; aspect-ratio: 16 / 10; }
  .status-mark { margin-bottom: 24px; }
  .faq details { padding-inline: 16px; }
  .own-price { font-size: 2rem; }
}

/* --- Наши добавки к макету В. Каждая с причиной. --- */

/* Состояния отправки формы: показывает их скрипт. Без скрипта форма уходит
   обычной отправкой на /inquiry, и ни одно из состояний не нужно */
.form-state { display: none; }
.form-state.is-visible { display: block; }
.form-state--success { color: var(--accent); }
.form-state--error { color: #a3231f; }

/* Крошки: у макета это строка со ссылками, у нас nav и ol — семантика лучше,
   и терять её при перевёрстке незачем */
ol.breadcrumbs { list-style: none; padding-left: 0; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--muted); }

/* Пустая витрина: у макета такого состояния нет, а у дилера без машин
   страница обязана оставаться страницей, а не пустым местом */
.empty-state { padding: 48px; text-align: center; }
.empty-state p { margin: 16px auto 0; }

/* Всего в подборе: строка под сеткой карточек */
.catalog-total { margin-top: 24px; }
/* Кнопки пустого состояния стоят по центру вместе с текстом */
.actions-center { justify-content: center; }

/* Окно заявки и просмотр фотографий: разметка общая для всех тем
   (base/_lead_modal.html и base/_gallery_modal.html), а вид у каждой свой.
   В макете В окон нет вовсе — сделано в его языке: белая поверхность,
   крупные радиусы, тот же акцент */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: #1c273a99; }
.modal:target, .modal.is-open { display: grid; }
.modal__dialog { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 32px; border-radius: 32px; background: var(--paper); box-shadow: var(--shadow-raised); overscroll-behavior: contain; }
.modal__dialog h2 { margin-bottom: 8px; }
.modal__close { position: absolute; right: 16px; top: 16px; width: 48px; min-height: 48px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 16px; background: var(--clear); font-size: 1.5rem; }
.modal__close:hover { background: var(--tint); }
.lead-context { padding: 16px; margin-block: 16px; border-radius: 16px; background: var(--tint); }
.gallery-modal .modal__dialog { width: min(1100px, 100%); padding: 16px; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; grid-template-rows: 1fr auto; align-items: center; gap: 8px; }
.gallery-full { grid-column: 2; max-height: calc(100dvh - 160px); object-fit: contain; }
.gallery-arrow { min-width: 56px; min-height: 56px; border: 0; border-radius: 16px; background: var(--tint); color: var(--accent); font-size: 2rem; line-height: 1; }
.gallery-arrow--prev { grid-column: 1; }
.gallery-arrow--next { grid-column: 3; }
.gallery-position { grid-column: 1 / -1; text-align: center; color: var(--muted); }
@media (max-width: 800px) {
  .gallery-modal .modal__dialog { grid-template-columns: 1fr; }
  .modal { padding: 8px; }
  .modal__dialog { max-height: calc(100dvh - 16px); padding: 24px 16px; border-radius: 24px; }
}

/* Соседние направления подбора: короткое название вроде «ОАЭ» давало ссылку
   уже сорока четырёх пикселей — область нажатия держим полем */
.topic-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.topic-links a { min-width: 48px; justify-content: start; }
