/*
 * Компонентный слой в духе Yandex UI. Единая система: токены — tokens.css.
 * Загружается последним, поэтому переопределяет базу site.css.
 * Одна «рецептура» для всех карточек, один жёлтый action-контрол, системные
 * отступы/радиусы/типографика.
 */

/* ── База ── */
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip; /* защита от горизонтального скролла из-за full-bleed плашки формы */
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
.header-inner, .container { max-width: 1120px; }
.container { padding-top: 8px; padding-bottom: 64px; }
.section { margin-bottom: 46px; }
h1, h2, h3 { letter-spacing: -0.02em; color: var(--text); }
h1 { font-weight: 600; }

/* ── Кнопки (единая система, action = жёлтый Яндекса) ── */
.btn, button.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: var(--control-l); padding: 0 22px;
    border: none; border-radius: var(--radius-m);
    background: var(--action); color: var(--on-action);
    font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1;
    text-decoration: none; cursor: pointer;
    transition: background .15s, box-shadow .15s, transform .05s;
}
.btn:hover, button.btn:hover { background: var(--action-hover); color: var(--on-action); }
.btn:active, button.btn:active { transform: translateY(1px); }
.btn:disabled, button.btn:disabled { opacity: .5; cursor: default; }
.btn-secondary, button.btn-secondary {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--line-strong);
}
.btn-secondary:hover, button.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-s); }
.link-btn {
    border: none; background: none; padding: 0; font: inherit;
    color: var(--link); cursor: pointer; text-decoration: none;
}
.link-btn:hover { color: var(--link-hover); text-decoration: underline; }

/* ── Шапка ── */
header { background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header .header-inner { align-items: center; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.logo-mark {
    width: 40px; height: 40px; border-radius: 11px;
    object-fit: cover; border: 1px solid var(--line); background: #fff; flex-shrink: 0;
}
.logo-text { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; line-height: 1.05; display: flex; flex-direction: column; }
.logo-text small { font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-top: 2px; }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav-link { text-decoration: none; color: var(--text-2); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: var(--radius-s); }
.header-nav-link:hover { color: var(--text); background: var(--surface-2); }
.header-cta {
    display: inline-flex; align-items: center; gap: 8px; margin-left: 6px;
    text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--text);
    padding: 8px 14px 8px 8px; border: none; border-radius: var(--radius-pill);
    background: transparent; transition: background .15s;
}
.header-cta:hover { background: var(--surface-2); }
.header-cta-icon {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--accent); font-size: 15px; line-height: 1;
}

/* ── Хлебные крошки ── */
.breadcrumbs { font-size: 13px; color: var(--text-3); margin: 20px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.breadcrumbs a { color: var(--text-3); text-decoration: none; }
.breadcrumbs a:hover { color: var(--link); }
.breadcrumbs .crumb-sep { color: var(--line-strong); }
.breadcrumbs .crumb-current { color: var(--text-2); }

/* ── Герой главной ── */
.hero-home {
    text-align: center; padding: 52px 0 20px; position: relative; isolation: isolate;
    /* Свечение ::before выходит на -20% по бокам и раздвигало страницу вправо
       на мобиле — клипаем по горизонтали (вертикальный ореол сохраняется). */
    overflow-x: clip;
}
.hero-home::before {
    content: ''; position: absolute; z-index: -1; inset: -10% -20% 20%;
    background: radial-gradient(60% 70% at 50% 30%, rgba(31,80,143,.16), rgba(31,80,143,0) 70%);
    pointer-events: none;
}
.hero-home-title {
    margin: 0 auto; max-width: 760px;
    font-size: clamp(30px, 4.8vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em;
}
/* Продающая фраза сразу под H1: раньше она была заголовком, теперь ведёт к нему. */
.hero-home-lead { margin: 14px auto 0; max-width: 640px; font-size: clamp(19px, 2.2vw, 23px); line-height: 1.35; font-weight: 600; color: var(--text); }
.hero-home-sub { margin: 12px auto 0; max-width: 600px; font-size: 17px; line-height: 1.5; color: var(--text-2); }

/* ── Герой посадочных ── */
.hero-route { padding: 6px 0 6px; }
.hero-route-title { margin: 0 0 10px; font-size: clamp(26px, 3.6vw, 36px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; }
.hero-route-facts { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-2); font-size: 14px; margin-bottom: 12px; }
.hero-route-intro { color: var(--text-2); font-size: 15.5px; line-height: 1.6; max-width: 780px; }
.hero-route-intro p { margin: 0 0 8px; }
.hero-route-intro strong { color: var(--text); }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.feat-ico { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.feat-text { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }

/* ── Поисковая строка-подписка ── */
/* Форма — на синей плашке во всю ширину экрана (как у aviasales): белая строка
   поиска чётко видна на насыщенном фоне. Full-bleed вырывает секцию из контейнера. */
.alert-form-section {
    width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    margin-top: 30px; margin-bottom: 48px; padding: 44px 20px;
    background: linear-gradient(125deg, #1c4a86 0%, #235391 55%, #2a63a6 100%);
}
.search-widget { max-width: 960px; margin: 0 auto; padding: 0; background: transparent; border: none; box-shadow: none; }
.search-widget .notify-card { border: none; border-radius: 0; padding: 0; background: transparent; }
/* Текст вокруг формы — светлый (на синем фоне) */
.alert-form-section .form-lead-tag {
    background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.30); color: #fff;
}
.alert-form-section .search-underbar { color: rgba(255,255,255,.88); }
.alert-form-section .route-alert-badge {
    background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: rgba(255,255,255,.92);
}
.alert-form-section .route-alert-badge::before { background: rgba(255,255,255,.6); }
.alert-form-section .route-alert-badge.is-active {
    background: rgba(255,255,255,.20); border-color: rgba(255,255,255,.4); color: #fff;
}
.alert-form-section .route-alert-badge.is-active::before { background: #86efac; }
.alert-form-section .search-status { color: rgba(255,255,255,.85); }
.search-bar {
    display: flex; align-items: stretch; gap: 0;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: var(--radius-l); box-shadow: var(--shadow-l);
    padding: 8px; max-width: 100%; margin: 0 auto;
}
/* Форма всегда по центру (как на главной). */
.alert-form-section .search-bar { margin: 0 auto; }
.search-field { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 10px 18px; border-radius: var(--radius-l); position: relative; min-width: 0; min-height: var(--control-xl); }
.search-field:hover { background: var(--surface-2); }
.search-field-price { flex: 0 0 196px; }
.search-field label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.search-input {
    border: none; background: transparent; padding: 0; margin: 0;
    font: inherit; font-size: 16px; font-weight: 600; color: var(--text); width: 100%;
}
.search-input:focus { outline: none; }
.search-input::placeholder { color: var(--text-3); font-weight: 400; opacity: .7; }
.search-sep { width: 1px; background: var(--line); margin: 12px 0; flex: 0 0 auto; }
.search-btn {
    flex: 0 0 auto; align-self: center; height: var(--control-l); border: none; border-radius: var(--radius-m);
    background: var(--action); color: var(--on-action); font-weight: 600; font-size: 15.5px;
    padding: 0 26px; cursor: pointer; transition: background .15s;
}
.search-btn:hover { background: var(--action-hover); }
.search-btn:active { transform: translateY(1px); }

.search-underbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; max-width: 960px; margin: 12px auto 0; font-size: 13.5px; color: var(--text-2); }
.search-status { max-width: 960px; margin: 8px auto 0; font-size: 13px; color: var(--text-3); }
.route-alert-badge { color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; }
.route-alert-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex: 0 0 auto; }
.route-alert-badge.is-active { color: var(--positive); font-weight: 600; }
.route-alert-badge.is-active::before { background: var(--positive); }

/* Ссылка «узнать текущую цену» внутри поля цены: подсказка ориентира лимита. */
.price-now-link { display: inline-block; margin-top: 2px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--link); white-space: nowrap; }
.price-now-link:hover { text-decoration: underline; }

/* Чекбокс согласия на обработку персональных данных (152-ФЗ) при вводе e-mail. */
.consent-check { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 12.5px; font-weight: 400; color: var(--text-2); line-height: 1.5; cursor: pointer; }
.consent-check input { margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--link); }
.consent-check a { color: var(--link); }
.consent-check.has-error span { color: var(--danger); }

/* Страница отписки из письма: список подписок с галочками. */
.unsubscribe-list { max-width: 640px; text-align: left; }
.unsubscribe-item { justify-content: flex-start; font-weight: 400; cursor: pointer; margin-bottom: 0; }
.unsubscribe-item input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--link); }
.unsubscribe-item .route-title { display: block; font-weight: 700; }

/* Раскрывающиеся доп.параметры */
.search-advanced { margin-left: auto; }
.search-advanced[open] { flex: 1 1 100%; margin-left: 0; }
.search-advanced-toggle {
    cursor: pointer; list-style: none; color: var(--link);
    font-weight: 600; font-size: 13.5px; user-select: none;
}
.search-advanced-toggle::-webkit-details-marker { display: none; }
.search-advanced-toggle::after { content: ' ▾'; font-size: 10px; }
.search-advanced[open] .search-advanced-toggle::after { content: ' ▴'; }
.search-advanced-body {
    margin-top: 14px; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-l); padding: 20px 22px; width: 100%;
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; box-shadow: var(--shadow-s);
}
.adv-group-dates { grid-column: 1 / -1; }
.email-subscribe-block { grid-column: 1 / -1; }
.adv-label { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.adv-optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-3); }
.channel-hint { font-size: 12.5px; color: var(--text-2); margin-top: 10px; line-height: 1.55; }
.channel-hint a { color: var(--link); }

/* Поля формы (email/date) под общий стиль */
.form-control {
    width: 100%; height: var(--control-m); padding: 0 14px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-m);
    background: var(--surface); font: inherit; font-size: 15px; color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px rgba(42,90,214,.12); }
.date-range-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input-help { font-size: 12.5px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }

/* Сегментный тумблер */
.segmented { display: inline-flex; background: var(--fill); border-radius: var(--radius-m); padding: 3px; gap: 2px; width: 100%; }
.seg-option { flex: 1; position: relative; text-align: center; cursor: pointer; }
.seg-option input { position: absolute; opacity: 0; pointer-events: none; }
.seg-option span {
    display: block; font-size: 13px; font-weight: 500; color: var(--text-2);
    padding: 9px 6px; border-radius: var(--radius-s); transition: background .12s, color .12s, box-shadow .12s;
}
.seg-option:has(input:checked) span { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-s); }

/* Автокомплит */
.geo-field { position: relative; }
.geo-suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
    box-shadow: var(--shadow-l); padding: 6px; max-height: 320px; overflow-y: auto; min-width: 260px;
}
.geo-suggest-item {
    display: block; width: 100%; text-align: left; padding: 11px 12px; border: none; background: none;
    font: inherit; font-size: 14.5px; color: var(--text); border-radius: var(--radius-s); cursor: pointer;
}
.geo-suggest-item:hover { background: var(--surface-2); }
/* Заголовок-страна в подсказках — не выбирается, только группирует города. */
.geo-suggest-head { padding: 9px 12px 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.geo-suggest-head:not(:first-child) { border-top: 1px solid var(--line); margin-top: 4px; }

/* Инлайн-ошибки полей (показываем рядом с полем, а не общим статусом). */
.field-error { font-size: 12.5px; line-height: 1.4; color: var(--danger); margin-top: 6px; font-weight: 500; }
.search-field.has-error .search-input { color: var(--danger); }
.search-field.has-error .search-input::placeholder { color: var(--danger); opacity: .7; }
.email-enter-step.has-error .form-control,
.email-code-step.has-error .form-control { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(214, 69, 69, .12); }

/* ── Единая рецептура карточек ── */
.geo-card, .approx-card, .how-item, .faq-item {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.geo-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.geo-card { display: flex; flex-direction: column; gap: 6px; padding: 17px 19px; text-decoration: none; color: var(--text); }
.geo-card:hover { border-color: transparent; box-shadow: var(--shadow-m); transform: translateY(-2px); }
.geo-card-title { font-size: 17px; font-weight: 600; }
.geo-card-meta { font-size: 12.5px; color: var(--text-3); }
.geo-card-country { flex-direction: row; align-items: center; gap: 14px; }
.geo-card-flag {
    font-size: 26px; line-height: 1; flex-shrink: 0; width: 44px; height: 44px;
    display: grid; place-items: center; background: var(--surface-2); border-radius: var(--radius-m);
}
.geo-card-country-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ── Чипы ── */
.route-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.route-chip {
    font-size: 13.5px; font-weight: 500; color: var(--text); text-decoration: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill);
    padding: 8px 15px; transition: border-color .15s, color .15s, background .15s;
}
.route-chip:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.route-chip-accent { color: var(--link); border-color: var(--blue-line); font-weight: 600; }
.route-chip-accent:hover { color: var(--link-hover); background: var(--blue-soft); }
.cities-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cities-strip-label { font-size: 13px; color: var(--text-3); margin-right: 4px; }

/* ── Примерные цены ── */
.approx-head { display: flex; align-items: baseline; gap: 12px; }
.approx-badge { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--fill); border-radius: var(--radius-pill); padding: 5px 11px; }
.approx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 16px 0 12px; max-width: 660px; }
.approx-card { padding: 18px 22px; }
.approx-card-label { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.approx-card-value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.approx-note { font-size: 12.5px; color: var(--text-3); line-height: 1.55; margin: 8px 0 0; max-width: 660px; }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { padding: 4px 20px; }
.faq-item[open] { box-shadow: var(--shadow-s); }
.faq-q { font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; padding: 15px 0; position: relative; padding-right: 28px; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 400; color: var(--text-3); }
.faq-item[open] .faq-q::after { content: '−'; }
.faq-a { font-size: 14.5px; line-height: 1.6; color: var(--text-2); padding: 0 0 16px; }

.section-title { font-size: clamp(20px, 3vw, 26px); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 18px; }

/* Срок жизни подписки */
.notify-expiry { margin-top: 4px; }
.notify-expiry-soon { color: var(--warn-text); font-weight: 600; }
.notify-expiry-over { color: var(--danger); font-weight: 600; }

/* ── Объяснялка «как работает / зачем» ── */
.explainer { margin-top: 8px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-item { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 24px; }
.how-num {
    width: 34px; height: 34px; border-radius: var(--radius-m);
    background: var(--accent); color: var(--on-accent);
    display: grid; place-items: center; font-weight: 700; font-size: 16px; margin-bottom: 6px;
}
.how-item-title { font-size: 16.5px; font-weight: 600; }
.how-item-text { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.why-block { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px 26px; }
.why-title { font-size: 17px; font-weight: 600; margin: 0 0 14px; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.why-item { font-size: 14.5px; color: var(--text); line-height: 1.55; padding-left: 28px; position: relative; }
.why-item::before {
    content: '✓'; position: absolute; left: 0; top: 1px; width: 19px; height: 19px;
    display: grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 700;
    background: var(--positive-bg); color: var(--positive);
}
.why-item strong { font-weight: 600; }
.channels-note { margin: 18px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.channels-note a { color: var(--link); }

/* ── Тёмный футер ── */
.site-footer { background: var(--ink); color: var(--ink-2); margin-top: 56px; }
.site-footer a { color: var(--ink-2); }
.site-footer .footer-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 30px 20px; }
.site-footer .footer-brand strong { color: #fff; }
.site-footer .footer-brand span { color: var(--ink-3); }
.site-footer .footer-links { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer .footer-link-chip { color: var(--ink-2); text-decoration: none; font-size: 13.5px; background: none; border: none; padding: 0; }
.site-footer .footer-link-chip:hover { color: #fff; }
.site-footer .footer-spoiler { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 20px 22px; }
.site-footer .footer-spoiler summary { color: var(--ink-2); font-size: 13.5px; cursor: pointer; }
.site-footer .footer-spoiler-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; }
.site-footer .footer-spoiler-col-title { color: var(--ink-3); font-size: 12px; font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.site-footer .footer-spoiler-col ul { list-style: none; padding: 0; margin: 0; }
.site-footer .footer-spoiler-col li { margin: 0 0 4px; }
.site-footer .footer-spoiler-col a { color: var(--ink-3); text-decoration: none; font-size: 12.5px; line-height: 1.7; }
.site-footer .footer-spoiler-col a:hover { color: var(--ink-2); }

/* ── Акцент «это не поиск, а подписка» ── */
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px;
    font-size: 13px; font-weight: 600; color: var(--accent-text);
    background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-pill); padding: 8px 16px;
}
.form-lead { display: flex; align-items: center; justify-content: center; gap: 12px 22px; flex-wrap: wrap; max-width: 960px; margin: 0 auto 16px; }
.form-lead-tag {
    display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--accent-text);
    background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-pill); padding: 7px 14px;
}
.form-lead-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 7px 20px; margin: 0; padding: 0; }
.form-lead-steps li { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.form-lead-steps li span {
    width: 21px; height: 21px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
    font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto;
}

/* ── Каналы уведомлений (визуальный блок) ── */
.channels-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 22px 0 12px; }
.channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.channel-card {
    display: flex; align-items: center; gap: 13px; padding: 15px 17px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
    text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.channel-card:hover { border-color: transparent; box-shadow: var(--shadow-m); transform: translateY(-2px); }
.channel-card-primary { border-color: var(--accent-line); background: var(--accent-soft); }
.channel-ico {
    width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center;
    font-size: 20px; border-radius: var(--radius-m); background: var(--surface-2);
}
.channel-card-primary .channel-ico { background: var(--accent); }
.channel-body { display: flex; flex-direction: column; min-width: 0; }
.channel-name { font-size: 14.5px; font-weight: 600; }
.channel-role { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.channel-role-primary { color: var(--accent-text); font-weight: 600; }

/* ── Модалка подписки ── */
html.modal-open { overflow: hidden; }
/* Выше залипающей шапки (body>header z-index:1000) и cookie-баннера (9999),
   иначе крестик/заголовок модалки прячутся под ними. */
/* --modal-kb поднимает модалку над мобильной клавиатурой (см. syncModalViewport в JS). */
.submodal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; padding-bottom: calc(20px + var(--modal-kb, 0px)); }
.submodal[hidden] { display: none; }
.submodal-backdrop { position: absolute; inset: 0; background: rgba(24, 20, 12, .5); backdrop-filter: blur(2px); }
.submodal-dialog {
    position: relative; width: 100%; max-width: 540px; overflow-y: auto;
    max-height: calc(100vh - 40px);
    /* Реальная видимая высота с учётом клавиатуры (fallback — 100vh). */
    max-height: calc(var(--modal-vh, 100vh) - 40px);
    background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow-l);
    animation: submodal-in .16s ease-out;
}
@keyframes submodal-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* Шапка липкая — крестик «Закрыть» всегда виден, даже когда контент проскроллен
   (важно на мобиле с открытой клавиатурой). */
.submodal-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 12px; background: var(--surface); border-bottom: 1px solid var(--line); border-radius: var(--radius-l) var(--radius-l) 0 0; }
.submodal-title { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.submodal-sub { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.submodal-editroute { border: none; background: none; padding: 0; margin-left: 8px; color: var(--link); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.submodal-editroute:hover { text-decoration: underline; }
.submodal-close {
    border: none; background: none; font-size: 26px; line-height: 1; color: var(--text-3);
    cursor: pointer; width: 36px; height: 36px; border-radius: var(--radius-s); flex: 0 0 auto;
}
.submodal-close:hover { background: var(--surface-2); color: var(--text); }
.submodal-body { padding: 16px 24px 6px; display: grid; gap: 20px; }
/* Подвал липкий — кнопка «Подписаться на цену» всегда видна, даже когда
   контент модалки проскроллен (шаг ввода e-mail/кода на маленьких экранах). */
.submodal-foot {
    position: sticky; bottom: 0; z-index: 3; padding: 16px 24px 24px;
    background: var(--surface); border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius-l) var(--radius-l);
}
.submodal-submit { width: 100%; height: var(--control-l); font-size: 15.5px; }
.submodal-status { font-size: 13px; line-height: 1.5; color: var(--text-2); margin-top: 12px; }
.submodal-status:empty { margin-top: 0; }
.submodal-status.error { color: var(--danger); }
.submodal-status.success { color: var(--positive); }

/* Экран «Подписка оформлена» */
.submodal-success { position: relative; padding: 40px 26px 30px; text-align: center; display: grid; gap: 14px; justify-items: center; }
/* display:grid перебивает UA-правило [hidden]{display:none} — возвращаем скрытие. */
.submodal-success[hidden] { display: none; }
.submodal-success .submodal-title { font-size: 22px; }
.submodal-close-abs { position: absolute; top: 14px; right: 14px; }
.success-badge { width: 60px; height: 60px; border-radius: 50%; background: var(--positive-bg); color: var(--positive); display: grid; place-items: center; font-size: 30px; font-weight: 700; }
.success-text { font-size: 14.5px; color: var(--text-2); line-height: 1.6; max-width: 340px; }
.success-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px; }
.success-actions .btn { width: 100%; height: var(--control-l); }

/* ── Адаптив ── */
@media (max-width: 900px) {
    .how-grid { grid-template-columns: 1fr; }
    .channels { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .header-nav-link { display: none; }
    .header-cta { margin-left: 0; }
    .alert-form-section { padding: 30px 14px 34px; }
    /* Разрежаем блок формы: убираем скученность тег/бейдж/статус */
    .alert-form-section .route-alert-badge { display: none; }
    .search-underbar { margin-top: 16px; }
    .search-status { margin-top: 12px; line-height: 1.5; }
    .search-bar { flex-direction: column; gap: 0; padding: 6px 14px; }
    .search-sep { display: none; }
    .search-field, .search-field-price { flex: 1 1 auto; }
    /* На мобиле поля идут в столбик — разделяем горизонтальными линиями */
    .search-field { border-radius: 0; border-bottom: 1px solid var(--line); padding: 12px 4px; }
    .search-field:hover { background: transparent; }
    .search-field-price { border-bottom: none; }
    .search-btn { align-self: stretch; height: auto; padding: 15px; margin-top: 8px; border-radius: var(--radius-m); }
    .search-advanced-body { grid-template-columns: 1fr; }
    .search-advanced { margin-left: 0; }
    .submodal { padding: 0; padding-bottom: var(--modal-kb, 0px); align-items: flex-end; }
    .submodal-dialog {
        max-width: none; border-radius: var(--radius-l) var(--radius-l) 0 0;
        max-height: 92vh;
        max-height: calc(var(--modal-vh, 100vh) * 0.92);
    }
    /* Нумерованные шаги в form-lead на мобиле рвутся неровно и дублируют блок
       «Как это работает» ниже — прячем, оставляем только плашку-акцент. */
    .form-lead { margin: 0 auto 18px; }
    .form-lead-steps { display: none; }
    .hero-home { padding: 36px 0 14px; }
    .hero-eyebrow { margin-bottom: 14px; }
    /* Заголовок секции + примечание: на мобиле в столбик, а не боком */
    .section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
    .site-footer .footer-spoiler-cols { grid-template-columns: 1fr; }
    .site-footer .footer-links { margin-left: 0; }
}

/* ─────────────────────────────────────────────────────────────────────
   Страница результата: цены, вердикт, календарь.
   Форма больше не спрашивает цену на входе — сначала показываем факты.
   ───────────────────────────────────────────────────────────────────── */

.search-field-dates { flex: 0 0 180px; }
.field-optional { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-3); opacity: .8; }
.btn-link-inline {
    border: none; background: none; padding: 0; cursor: pointer;
    font: inherit; font-size: 13.5px; font-weight: 600; color: var(--link);
}
.btn-link-inline:hover { text-decoration: underline; }
.alert-form-section .btn-link-inline { color: rgba(255,255,255,.92); }

.route-result { display: flex; flex-direction: column; gap: 18px; }

.result-head { display: flex; flex-direction: column; gap: 2px; }
.result-head-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.result-head-price { font-size: 34px; font-weight: 700; color: var(--text); line-height: 1.15; }
.result-head-sub { font-size: 14px; color: var(--text-2); }
.result-note { margin: 0; font-size: 14.5px; color: var(--text-2); }

.result-empty { padding: 20px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius-l); background: var(--surface-2); }
.result-empty-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.result-empty-text { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }

.verdict { padding: 16px 18px; border-radius: var(--radius-l); border: 1px solid var(--line); background: var(--surface-2); }
.verdict-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.verdict-text { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.verdict-saving { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.verdict-good { background: var(--positive-bg); border-color: var(--positive-line); }
.verdict-good .verdict-title { color: var(--positive); }
.verdict-fair { background: var(--blue-soft); border-color: var(--blue-line); }
.verdict-fair .verdict-title { color: var(--blue-dark); }
.verdict-high { background: var(--yellow-bg); border-color: var(--yellow-line); }
.verdict-high .verdict-title { color: var(--yellow-text); }

.nearby-hint { padding: 14px 16px; border-radius: var(--radius-m); border: 1px solid var(--blue-line); background: var(--blue-soft); }
.nearby-hint-warn { border-color: var(--yellow-line); background: var(--yellow-bg); }
.nearby-hint-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.nearby-hint-body { font-size: 14.5px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.nearby-hint-link { font-weight: 600; color: var(--link); text-decoration: none; white-space: nowrap; }
.nearby-hint-link:hover { text-decoration: underline; }

.result-months { display: flex; gap: 10px; flex-wrap: wrap; }
.result-month {
    flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px;
    padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-m);
    background: var(--surface); text-decoration: none; color: var(--text);
    transition: border-color .12s, box-shadow .12s;
}
.result-month:hover { border-color: var(--action); box-shadow: var(--shadow-s); color: var(--text); text-decoration: none; }
.result-month-label { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.result-month-price { font-size: 19px; font-weight: 700; color: var(--text); }
.result-month-date { font-size: 12.5px; color: var(--text-3); }

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result-buy { font-size: 16px; }
.result-disclaimer { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }

.result-calendar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.result-calendar-note { font-size: 12.5px; color: var(--text-3); }
.result-calendar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.rc-cell {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--radius-s);
    background: var(--surface); text-decoration: none; color: var(--text);
    transition: border-color .12s, background .12s;
}
.rc-cell:hover { border-color: var(--action); }
.rc-cheap { background: var(--green-bg); border-color: var(--green-line); }
.rc-cheap .rc-price { color: var(--green-text); }
.rc-selected { border-color: var(--action); border-width: 2px; }
.rc-date { font-size: 11.5px; color: var(--text-3); }
.rc-price { font-size: 14px; font-weight: 700; }
.rc-direct { font-size: 10px; color: var(--text-3); }

/* Пресеты порога подписки — вместо ручного ввода цены. */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.preset-option {
    display: flex; flex-direction: column; gap: 2px; cursor: pointer;
    padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-m);
    background: var(--surface); text-align: center;
}
.preset-option input { position: absolute; opacity: 0; pointer-events: none; }
.preset-option.is-active { border-color: var(--action); box-shadow: 0 0 0 1px var(--action) inset; }
.preset-label { font-size: 14.5px; font-weight: 700; color: var(--text); }
.preset-hint { font-size: 12.5px; color: var(--text-3); }
.price-row { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.price-row label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.modal-dates-summary { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

@media (max-width: 760px) {
    .search-field-dates { flex: 1 1 auto; }
    .result-head-price { font-size: 28px; }
    .result-calendar-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
    .result-actions .btn { flex: 1 1 100%; text-align: center; }
}

/* Правка подписки прямо в списке на /notifications/. */
.alert-edit { margin-top: 12px; padding: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.alert-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.alert-edit-field { display: flex; flex-direction: column; gap: 4px; }
.alert-edit-field > span { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.alert-edit-field[hidden] { display: none; }
.alert-edit-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.alert-edit-hint { font-size: 12.5px; color: var(--text-3); }

/* Перевозчики маршрута: коды IATA + за сколько дней дают лучшую цену. */
.airline-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.airline-chip { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.airline-code { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: .04em; }
.airline-meta { font-size: 12px; color: var(--text-3); }

/* Живые блоки главной: счётчики сервиса и карточки маршрутов. */
.service-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px auto 0; max-width: 860px; }
.service-stat { flex: 0 1 auto; min-width: 150px; padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.service-stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.service-stat-label { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.home-card {
    position: relative; display: flex; flex-direction: column; gap: 4px;
    padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-m);
    background: var(--surface); text-decoration: none; color: var(--text);
    transition: border-color .12s, box-shadow .12s;
}
.home-card:hover { border-color: var(--action); box-shadow: var(--shadow-s); color: var(--text); }
.home-card-route { font-size: 15.5px; font-weight: 600; }
.home-card-price { display: flex; align-items: baseline; gap: 8px; }
.home-card-now { font-size: 18px; font-weight: 700; color: var(--green-text); }
.home-card-was { font-size: 13px; color: var(--text-3); text-decoration: line-through; }
.home-card-watchers { font-size: 13px; color: var(--text-3); }
.home-card-badge {
    position: absolute; top: 12px; right: 12px;
    padding: 2px 8px; border-radius: var(--radius-pill);
    background: var(--green-bg); color: var(--green-text);
    font-size: 12px; font-weight: 700;
}

@media (max-width: 760px) {
    .service-stat { flex: 1 1 45%; min-width: 0; padding: 10px 12px; }
    .service-stat-value { font-size: 19px; }
}

/* Сравнительная таблица на посадочной «AirHint на русском». */
.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.compare-table th, .compare-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.compare-table td:first-child { font-weight: 600; }
.compare-yes { color: var(--green-text); font-weight: 600; }
.compare-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.compare-col { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.compare-col h3 { margin: 0 0 8px; font-size: 16.5px; }
.compare-col ul { margin: 0; padding-left: 18px; color: var(--text-2); line-height: 1.6; }

/* ─────────────────────────────────────────────────────────────────────
   Страница результата: блоки в порядке «подписка → цены → билет →
   расписание → динамика → авиакомпании».
   ───────────────────────────────────────────────────────────────────── */

.result-block { display: flex; flex-direction: column; gap: 12px; }
.result-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.result-block-note { font-size: 12.5px; color: var(--text-3); }

/* Призыв подписаться — главное действие страницы, поэтому заметный блок. */
.track-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    padding: 20px 22px; border-radius: var(--radius-l);
    background: linear-gradient(125deg, #1c4a86 0%, #235391 55%, #2a63a6 100%);
    color: #fff;
}
.track-cta-title { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.track-cta-text { margin: 0; font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,.9); max-width: 620px; }
.track-cta-btn { flex: 0 0 auto; font-size: 16px; }

/* Карточка конкретного билета. */
.ticket-card { border: 1px solid var(--line-strong); border-radius: var(--radius-l); background: var(--surface); overflow: hidden; }
.ticket-carrier { display: flex; align-items: baseline; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.ticket-airline { font-size: 15px; font-weight: 700; }
.ticket-flight { font-size: 12.5px; color: var(--text-3); }
.ticket-legs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 16px 18px; }
.ticket-legs-back { border-top: 1px dashed var(--line); }
.ticket-leg-end { text-align: right; }
.ticket-time { font-size: 22px; font-weight: 700; line-height: 1.1; }
.ticket-city { font-size: 14.5px; color: var(--text); }
.ticket-date { font-size: 12.5px; color: var(--text-3); }
.ticket-airport { font-size: 12px; color: var(--text-3); letter-spacing: .04em; }
.ticket-middle { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 130px; }
.ticket-duration, .ticket-transfers { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.ticket-line { width: 100%; height: 1px; background: var(--line-strong); position: relative; }
.ticket-line::after { content: '✈'; position: absolute; right: -2px; top: -8px; font-size: 11px; color: var(--text-3); }
.ticket-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.ticket-price-wrap { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ticket-badge { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--green-text); background: var(--green-bg); border-radius: var(--radius-pill); padding: 3px 9px; }
.ticket-price { font-size: 24px; font-weight: 700; }
.ticket-lite-note { font-size: 12.5px; color: var(--text-3); }
.ticket-btn { flex: 0 0 auto; }

/* Расписание прямых рейсов. */
.schedule-daily { margin: 0; font-size: 15.5px; color: var(--text-2); }
.schedule-table-wrap { overflow-x: auto; }
.schedule-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 420px; }
.schedule-table th, .schedule-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.schedule-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.schedule-day { font-weight: 600; white-space: nowrap; }
.schedule-price { font-weight: 700; white-space: nowrap; }

/* Динамика цен: столбики по дням, прокрутка вбок. */
.dyn-scroll { overflow-x: auto; padding-bottom: 4px; }
.dyn-chart { display: flex; align-items: flex-end; gap: 4px; min-width: max-content; height: 190px; padding-top: 22px; position: relative; }
.dyn-col {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    gap: 4px; width: 34px; flex: 0 0 34px; height: 100%;
    text-decoration: none; color: var(--text-3); position: relative;
}
.dyn-month { position: absolute; top: -20px; left: 0; white-space: nowrap; font-size: 12px; color: var(--text-3); border-left: 1px solid var(--line-strong); padding-left: 6px; height: 150px; }
.dyn-bar-wrap { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; }
.dyn-bar { width: 100%; border-radius: 5px 5px 0 0; background: var(--fill-strong); transition: background .12s; }
.dyn-col:hover .dyn-bar { background: var(--action); }
.dyn-cheap .dyn-bar { background: #22c55e; }
.dyn-selected .dyn-bar { outline: 2px solid var(--action); outline-offset: 1px; }
.dyn-day { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.dyn-weekday { font-size: 11px; letter-spacing: .03em; }
.dyn-weekend .dyn-day, .dyn-weekend .dyn-weekday { color: var(--danger); }

/* Авиакомпании и цены. */
.airline-list { display: flex; flex-direction: column; }
.airline-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.airline-row:last-child { border-bottom: none; }
.airline-name { font-size: 15px; font-weight: 600; }
.airline-meta { font-size: 13px; color: var(--text-3); }

/* Текст-описание маршрута внизу страницы: раньше он был в шапке и на
   мобильном занимал пол-экрана, отодвигая цены. */
.route-intro-bottom { color: var(--text-2); font-size: 15px; line-height: 1.65; }
.route-intro-bottom p { margin: 0 0 10px; }

@media (max-width: 760px) {
    .track-cta { flex-direction: column; align-items: stretch; text-align: left; }
    .track-cta-btn { width: 100%; }
    .ticket-legs { grid-template-columns: 1fr; gap: 10px; }
    .ticket-leg-end { text-align: left; }
    .ticket-middle { align-items: flex-start; min-width: 0; }
    .ticket-line { display: none; }
    .ticket-price { font-size: 21px; }
    .ticket-btn { width: 100%; }
    .dyn-col { width: 28px; flex: 0 0 28px; }
}

/* Индикатор поиска: страница результата строится живым запросом к API. */
body.is-search-loading { overflow: hidden; }
.search-loader {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px);
    animation: search-loader-in .18s ease-out;
}
@keyframes search-loader-in { from { opacity: 0; } to { opacity: 1; } }
.search-loader-card {
    background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow-l);
    padding: 26px 30px; text-align: center; max-width: 320px; width: calc(100% - 40px);
}
.search-loader-route { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; }
.search-loader-code { font-size: 15px; font-weight: 700; letter-spacing: .06em; color: var(--text-2); }
.search-loader-track {
    position: relative; flex: 1 1 auto; height: 20px; min-width: 90px;
    border-bottom: 2px dashed var(--line-strong);
}
.search-loader-plane {
    position: absolute; bottom: -3px; font-size: 16px; color: var(--action);
    animation: search-loader-fly 1.6s cubic-bezier(.45,.05,.55,.95) infinite;
}
@keyframes search-loader-fly {
    0%   { left: 0; opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { left: calc(100% - 14px); opacity: 0; }
}
.search-loader-title { font-size: 18px; font-weight: 700; color: var(--text); }
.search-loader-hint { margin-top: 5px; font-size: 13.5px; color: var(--text-3); min-height: 19px; }

@media (prefers-reduced-motion: reduce) {
    .search-loader-plane { animation-duration: 0s; left: 40%; opacity: 1; }
    .search-loader { animation: none; }
}

/* Кнопка обмена городов между полями «Откуда» и «Куда». */
.swap-cities {
    flex: 0 0 auto; align-self: center; width: 32px; height: 32px; margin: 0 -4px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-strong); border-radius: 50%;
    background: var(--surface); color: var(--action); cursor: pointer;
    transition: transform .2s, border-color .15s, background .15s;
}
.swap-cities:hover { border-color: var(--action); background: var(--surface-2); }
.swap-cities.is-swapped { transform: rotate(180deg); }
@media (max-width: 760px) {
    /* По центру и поверх линии-разделителя: иначе кнопка висела у правого
       края, а сквозь неё просвечивала граница поля. */
    .swap-cities {
        align-self: center; margin: -16px auto;
        position: relative; z-index: 2;
        background: var(--surface); box-shadow: 0 0 0 4px var(--surface);
    }
}

/* Фильтр «все рейсы / только прямые» над результатом. */
.result-filter { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--fill); align-self: flex-start; }
.result-filter-btn {
    padding: 7px 16px; border-radius: var(--radius-pill); text-decoration: none;
    font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.result-filter-btn:hover { color: var(--text); }
.result-filter-btn.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-s); }

/* Диаграмма динамики: стрелки по краям, мягкие затухания, тихий скроллбар. */
.dyn-viewport { position: relative; }
.dyn-viewport::before, .dyn-viewport::after {
    content: ''; position: absolute; top: 0; bottom: 26px; width: 42px; pointer-events: none; z-index: 2;
}
.dyn-viewport::before { left: 0; background: linear-gradient(90deg, var(--bg) 20%, transparent); }
.dyn-viewport::after { right: 0; background: linear-gradient(270deg, var(--bg) 20%, transparent); }
.dyn-nav {
    position: absolute; top: 40%; z-index: 3; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-strong); border-radius: 50%;
    background: var(--surface); color: var(--text-2); cursor: pointer;
    font-size: 20px; line-height: 1; box-shadow: var(--shadow-s);
    transition: border-color .15s, color .15s;
}
.dyn-nav:hover { border-color: var(--action); color: var(--text); }
.dyn-nav-prev { left: 0; }
.dyn-nav-next { right: 0; }
.dyn-scroll { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; scroll-behavior: smooth; }
.dyn-scroll::-webkit-scrollbar { height: 6px; }
.dyn-scroll::-webkit-scrollbar-track { background: transparent; }
.dyn-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.dyn-scroll::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* Авиакомпании: карточки вместо унылого списка строк. */
.airline-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.airline-card {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-m);
    background: var(--surface);
}
.airline-badge {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--radius-s);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--blue-soft); color: var(--blue-dark);
    font-size: 13px; font-weight: 800; letter-spacing: .04em;
}
.airline-body { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.airline-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.airline-meta { font-size: 12px; color: var(--text-3); }
.airline-price { flex: 0 0 auto; font-size: 15px; font-weight: 700; white-space: nowrap; }

@media (max-width: 760px) {
    .dyn-nav { display: none; }
    .dyn-viewport::before, .dyn-viewport::after { width: 20px; }
    .result-filter { align-self: stretch; }
    .result-filter-btn { flex: 1 1 0; text-align: center; }
}

/* Пометка «необяз.» у дат: подпись не должна переноситься на вторую строку. */
.search-field-dates label { white-space: nowrap; }
.field-optional { font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .7; }

/* Подсказка про необязательные даты: раньше терялась в строке мелким текстом. */
.route-alert-badge-hint { gap: 9px; padding: 8px 14px; border-radius: var(--radius-pill); font-size: 14px; }
.route-alert-badge-hint::before { display: none; }
.route-alert-badge-hint svg { flex: 0 0 auto; opacity: .9; }
.route-alert-badge-hint b { font-weight: 700; }
.alert-form-section .route-alert-badge-hint { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.34); color: #fff; }

/* Выбор даты в диаграмме: столбик становится кнопкой, под графиком — покупка. */
.dyn-col { border: none; background: none; padding: 0; cursor: pointer; font: inherit; }
.dyn-col.is-active .dyn-bar { background: var(--action); }
.dyn-col.is-active .dyn-day, .dyn-col.is-active .dyn-weekday { color: var(--text); font-weight: 700; }
.dyn-pick {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    margin-top: 12px; padding: 14px 18px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-m); background: var(--surface-2);
}
.dyn-pick-info { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dyn-pick-date { font-size: 15px; font-weight: 600; color: var(--text-2); }
.dyn-pick-price { font-size: 23px; font-weight: 700; color: var(--text); }
.dyn-pick-btn { flex: 0 0 auto; }

@media (max-width: 760px) {
    /* Пальцем в узкий столбик не попасть — активная дата берётся из центра
       экрана, поэтому по краям нужен запас прокрутки. */
    .dyn-chart { padding-left: 42vw; padding-right: 42vw; }
    .dyn-viewport::before, .dyn-viewport::after { display: none; }
    .dyn-pick { flex-direction: column; align-items: stretch; text-align: center; }
    .dyn-pick-info { justify-content: center; }
    .dyn-pick-btn { width: 100%; }
}
