/*
 * OneTab Delivery — визуальная система.
 * Идея: посылка и накладная. Синий — небо и степь, жёлтый — упаковочный скотч.
 * Жёлтый только для главного действия, не для украшений.
 */
:root {
  --paper: #ffffff;
  --mist: #eef3f6;      /* фон секций */
  --ink: #11263a;       /* текст и тёмные плашки */
  --ink-soft: #4a5f73;  /* второстепенный текст */
  --sky: #0b7fa6;       /* ссылки, акценты */
  --tape: #ffc629;      /* скотч: главная кнопка */
  --tape-dark: #f0b400;
  --line: #d3dee6;

  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Golos Text', system-ui, sans-serif;

  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-secondary-color: var(--ink-soft);
  --bs-border-color: var(--line);
  --bs-link-color: var(--sky);
  --bs-link-color-rgb: 11, 127, 166;
  --bs-link-hover-color: #075f7d;
  --bs-link-hover-color-rgb: 7, 95, 125;
  --bs-focus-ring-color: rgba(11, 127, 166, .35);
}

body { background: var(--paper); font-size: 1.0625rem; line-height: 1.55; }
/* Подвал всегда внизу экрана, даже на коротких страницах */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }

h1, h2, h3, .display-font {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.15;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); }
h3 { font-size: 1.125rem; }
.lead { font-size: 1.1875rem; color: var(--ink-soft); max-width: 34em; }
.measure { max-width: 42em; }

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

/* --- Кнопки -------------------------------------------------------------- */
.btn-accent {
  --bs-btn-bg: var(--tape);
  --bs-btn-border-color: var(--tape);
  --bs-btn-color: var(--ink);
  --bs-btn-hover-bg: var(--tape-dark);
  --bs-btn-hover-border-color: var(--tape-dark);
  --bs-btn-hover-color: var(--ink);
  --bs-btn-active-bg: var(--tape-dark);
  --bs-btn-active-border-color: var(--tape-dark);
  --bs-btn-active-color: var(--ink);
  font-weight: 600;
}
.btn-ink {
  --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-color: #fff;
  --bs-btn-hover-bg: #1d3a55; --bs-btn-hover-border-color: #1d3a55; --bs-btn-hover-color: #fff;
  font-weight: 600;
}

/* --- Шапка и подвал ------------------------------------------------------ */
.site-nav { border-bottom: 1px solid var(--line); background: var(--paper); }
.brand {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-size: 1.15rem; line-height: 1; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 1.75em; height: 1.75em; flex: none; }
.brand-word { font-weight: 400; }
.brand-word b { font-weight: 700; }
@media (max-width: 359.98px) { .brand { font-size: 1rem; } }
.site-nav .nav-link { color: var(--ink); font-weight: 500; white-space: nowrap; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--sky); }

/* Справа от разделов — действия: вход в кабинет и главная кнопка, отделены тонкой чертой. */
.nav-actions { display: flex; align-items: center; gap: .625rem; }
.nav-actions .btn { white-space: nowrap; }
@media (min-width: 1200px) {
  .nav-actions { margin-left: 1.25rem; padding-left: 1.25rem; border-left: 1px solid var(--line); }
  /* Такая же черта отделяет разделы от логотипа. */
  .site-nav .navbar-nav { padding-left: 1.25rem; border-left: 1px solid var(--line); }
}
/* Ноутбуки 1200–1400: шапка в одну строку — разделы теснее, у кабинета только значок
   (подпись — во всплывающей подсказке и для экранного диктора): иначе казахская и английская шапка не влезает. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .btn-cabinet { --bs-btn-padding-x: .6rem; }
  .btn-cabinet-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-actions { gap: .45rem; }
  .site-nav .navbar-nav { gap: 0 !important; padding-left: .75rem; }
  .site-nav .brand { margin-right: 1.25rem; }
  .site-nav .nav-link { padding-left: .5rem; padding-right: .5rem; font-size: 1rem; }
  .nav-actions { margin-left: .75rem; padding-left: .75rem; }
}
@media (max-width: 1199.98px) {
  .nav-actions { flex-direction: column; align-items: stretch; margin: .5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
  .nav-actions .btn { justify-content: center; }
}
/* Кабинет — контур, как у накладной; при наведении «коробка» с жёсткой тенью, как у калькулятора. */
.btn-cabinet {
  --bs-btn-color: var(--ink); --bs-btn-bg: var(--paper); --bs-btn-border-color: var(--ink);
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--paper); --bs-btn-hover-border-color: var(--ink);
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: var(--mist); --bs-btn-active-border-color: var(--ink);
  --bs-btn-border-width: 2px;
  --bs-btn-padding-y: calc(.375rem - 1px);
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; white-space: nowrap;
}
.btn-cabinet svg { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Обе кнопки шапки на наведение ведут себя одинаково: приподнимаются и дают жёсткую тень, цвет не меняется. */
.nav-actions .btn { transition: transform .12s ease, box-shadow .12s ease; }
.nav-actions .btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.nav-actions .btn:active { transform: none; box-shadow: none; }
.nav-actions .btn-accent { --bs-btn-hover-bg: var(--tape); --bs-btn-hover-border-color: var(--tape); }
@media (prefers-reduced-motion: reduce) { .nav-actions .btn { transition: none; } .nav-actions .btn:hover { transform: none; } }

/* Язык сайта. В шапке — короткая подпись (RU / KZ / EN), по нажатию — список; без скриптов (details). */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem;
  padding: .4rem .5rem; border-radius: 6px; font-weight: 600; font-size: .9375rem; color: var(--ink); user-select: none;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after { content: ''; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.lang-switch summary:hover, .lang-switch[open] summary { background: var(--mist); }
.lang-switch ul {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 1030; min-width: 10rem; margin: 0; padding: .35rem;
  list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 28px -12px rgba(17, 38, 58, .35);
}
.lang-switch a { display: block; padding: .45rem .7rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.lang-switch a:hover { background: var(--mist); }
.lang-switch a[aria-current] { font-weight: 600; background: #fff8df; }
/* В мобильном меню — три кнопки в ряд под действиями. */
.lang-row { display: flex; gap: .5rem; }
.lang-row a { flex: 1; text-align: center; padding: .5rem; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 500; }
.lang-row a.on { border-color: var(--ink); background: #fff8df; font-weight: 600; }
/* В подвале — ссылками рядом с копирайтом: язык находится и там, где его ищут по привычке. */
.site-footer .footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }
.footer-langs { display: flex; gap: 1rem; }
.site-footer .footer-langs a { color: #9fb2c3; }
.site-footer .footer-langs a[aria-current] { color: #fff; font-weight: 600; text-decoration: none; }

/* На телефоне и планшете — круглая кнопка звонка рядом с меню. */
.nav-call {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.75rem; height: 2.75rem; margin-left: auto; margin-right: .5rem;
  border: 1px solid var(--line); border-radius: 50%; color: var(--ink);
}
.nav-call svg { width: 1.2rem; height: 1.2rem; }
.nav-call:hover, .nav-call:active { color: var(--sky); border-color: var(--sky); }

.site-footer { background: var(--ink); color: #c9d6e1; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .footer-title { color: #fff; font-weight: 600; margin-bottom: .5rem; }
.site-footer .footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .8125rem; color: #9fb2c3; }

/* --- Накладная: главный элемент сайта ------------------------------------ */
.waybill {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 2rem 1.25rem 1.25rem;
  box-shadow: 8px 8px 0 var(--ink);
}
/* Полоса скотча через верх накладной */
.waybill::before {
  content: '';
  position: absolute; top: -14px; left: 12%; right: 12%; height: 28px;
  background: var(--tape);
  opacity: .92;
  transform: rotate(-1.2deg);
}
@media (min-width: 576px) { .waybill { padding: 2.25rem 1.75rem 1.75rem; } }

.route { display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 576px) {
  /* Сетка: строка подписей, строка полей, строка ошибок. Стрелка в строке полей,
     поэтому всегда ровно по их центру, при любом шрифте и масштабе. */
  .route { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: .5rem; column-gap: .75rem; }
  .route > .route-side { display: contents; }
  .route > .route-side > * { grid-column: 1; }
  .route > .route-side ~ .route-side > * { grid-column: 3; }
  .route > .route-side > .field-label { grid-row: 1; margin-bottom: 0; }
  .route > .route-side > .place { grid-row: 2; }
  .route > .route-side > .invalid-feedback { grid-row: 3; margin-top: 0; }
}
.field-label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }
@media (min-width: 576px) { .route > .route-side > .field-note { grid-row: 3; } }

/* Незаполненное поле калькулятора — пометка «красной ручкой», как правка на бумажной накладной
   (site.js, form[data-check]). Красный — только здесь и в ошибках накладной. */
.waybill { --mark: #c0392b; }
.field-note {
  display: flex; align-items: center; gap: .45rem; margin-top: .5rem;
  font-size: .875rem; font-weight: 600; line-height: 1.3; color: var(--mark);
}
.route .field-note { margin-top: 0; }
.field-note[hidden] { display: none; }
.field-note::before {
  content: '!'; flex: none; display: grid; place-items: center;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--mark); color: #fff; font-size: .75rem; font-weight: 700; line-height: 1;
}
.waybill .invalid-feedback { color: var(--mark); font-size: .875rem; font-weight: 600; }
.is-missing .place { border-color: var(--mark); box-shadow: 0 0 0 .2rem rgba(192, 57, 43, .14); }
.is-missing .place:focus-within { border-color: var(--mark); box-shadow: 0 0 0 .2rem rgba(192, 57, 43, .28); }
.is-missing .size-card { border-style: dashed; border-color: rgba(192, 57, 43, .6); }
.is-missing .size-card:hover { border-color: var(--mark); }
/* Короткий толчок при нажатии «Сравнить цены»: показывает, какое поле держит. */
.nudge > .place, .nudge > .sizes { animation: field-nudge .32s ease-out; }
@keyframes field-nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) { .nudge > .place, .nudge > .sizes { animation: none; } }
.route-side { display: grid; gap: .5rem; min-width: 0; }

/* Стрелка «откуда → куда»: обводка как у знака, пунктир как у накладной */
.route-arrow {
  width: 3.25rem; height: 1rem; justify-self: center; margin: -.25rem 0;
  fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  transform: rotate(90deg);
}
@media (max-width: 575.98px) {
  /* Повёрнутая стрелка выше своего блока: добираем место отступами */
  .route-arrow { width: 2.25rem; margin: .6rem 0; }
}
@media (min-width: 576px) {
  .route-arrow { grid-column: 2; grid-row: 2; align-self: center; transform: none; margin: 0; }
}

/* Поле «страна | город» — в css/places.css (его подключает и панель оператора) */

.hero { padding: 3rem 0 4rem; background: var(--mist); }
@media (min-width: 992px) { .hero { padding: 5rem 0 6rem; } }

/* --- Выбор размера: коробки нарисованы в масштабе ------------------------ */
.sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
@media (max-width: 575.98px) { .sizes { grid-template-columns: repeat(2, 1fr); } }
.sizes label { position: relative; display: block; min-width: 0; }
.sizes input { position: absolute; opacity: 0; }
.size-card {
  display: flex; flex-direction: column; align-items: center; height: 100%;
  border: 2px solid var(--line); border-radius: 6px; padding: .75rem .5rem; text-align: center; cursor: pointer;
}
.size-card:hover { border-color: var(--ink-soft); }
.sizes input:checked + .size-card { border-color: var(--ink); background: #fff8df; }
.sizes input:focus-visible + .size-card { outline: 3px solid var(--sky); outline-offset: 2px; }
.size-stage { height: 60px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: .4rem; }
.size-box { min-height: 3px; background: #d9a75f; border: 2px solid var(--ink); border-radius: 2px; }
.size-name { font-weight: 600; }
.size-hint { font-size: .8125rem; color: var(--ink-soft); line-height: 1.3; }

/* --- Секции главной ------------------------------------------------------ */
.section { padding: 4rem 0; }
.section-mist { background: var(--mist); }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 2rem; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before {
  content: counter(step);
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin-bottom: .5rem; color: var(--sky);
}

/* Кто за что отвечает */
.split { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; } }
.split-side { padding: 1.5rem; border-radius: 6px; }
.split-partner { border: 2px dashed var(--ink-soft); }
.split-us { background: var(--ink); color: #fff; }
.split-us .text-secondary { color: #c9d6e1 !important; }
.split ul { margin: 0; padding-left: 1.1rem; }
.split li + li { margin-top: .4rem; }

.partners { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; padding: 0; margin: 0; }
.partners li { border: 1px solid var(--line); border-radius: 6px; padding: .6rem 1rem; font-weight: 600; background: var(--paper); }

/* Вопросы и ответы */
.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); color: var(--sky); }
.faq details[open] summary::after { content: '−'; }
.faq details > div { margin-top: .6rem; color: var(--ink-soft); max-width: 42em; }

.draft-note { border-left: 4px solid var(--tape); background: #fff8df; padding: .75rem 1rem; }

/* --- Варианты доставки и заказ ------------------------------------------- */
.quote { border: 1px solid var(--line); border-radius: 6px; padding: 1rem; background: var(--paper); }
.quote + .quote { margin-top: .75rem; }
.quote-price { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; white-space: nowrap; }
.htmx-request .quotes-loading { display: inline-block !important; }

/* Сегменты: эконом и экспресс — два раздела, внутри строки одного списка. */
.segment + .segment { margin-top: 2rem; }
.segment-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .25rem 1rem;
  padding-bottom: .6rem; border-bottom: 2px solid var(--ink);
}
.segment-title { margin: 0; font-size: 1.25rem; }
.segment-hint { color: var(--ink-soft); font-size: .9375rem; }
.segment-summary { display: flex; align-items: baseline; gap: .75rem; white-space: nowrap; }
.segment-from { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; }
.segment-days { color: var(--ink-soft); font-size: .9375rem; }
.segment-list { list-style: none; margin: 0; padding: 0; }
/* Строка варианта: метка | служба, дата, детали | цена | кнопка. На телефоне — см. ниже. */
.quote-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; column-gap: 1.25rem;
  grid-template-areas: "mark name price btn" "mark when price btn" "mark meta price btn";
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.quote-row > .partner-mark { grid-area: mark; }
.quote-name { grid-area: name; font-weight: 600; }
.quote-when { grid-area: when; font-weight: 500; }
.quote-meta { grid-area: meta; color: var(--ink-soft); font-size: .875rem; }
.quote-row > .quote-price { grid-area: price; }
.quote-row > .btn { grid-area: btn; }
/* Метка службы: логотип партнёра или, пока его нет, инициалы в фирменном цвете. */
.partner-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 96px; height: 40px; border-radius: 4px;
  background: var(--brand, var(--ink)); color: var(--brand-ink, #fff);
  font-family: var(--font-display); font-weight: 600; font-size: .9375rem; letter-spacing: .02em;
}
.partner-mark-logo { background: var(--paper); border: 1px solid var(--line); padding: 4px 6px; }
.partner-mark-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.partner-mark-logo .brand-mark { width: 28px; height: 28px; }
.quotes-note { margin: 1rem 0 0; color: var(--ink-soft); font-size: .875rem; }
/* Окна забора — плашками, как выбор коробки. */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; }
.chip {
  display: inline-block; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); cursor: pointer; white-space: nowrap;
}
.chips input:checked + .chip { border-color: var(--ink); background: #fff8df; font-weight: 600; }
.chips input:focus-visible + .chip { outline: 3px solid var(--sky); outline-offset: 2px; }

/* --- Оформление: шаги слева, сводка-накладная справа ----------------------- */
.checkout-grid { display: grid; gap: 2.5rem; }
@media (min-width: 992px) {
  .checkout-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; align-items: start; }
  .checkout-aside { position: sticky; top: 1.5rem; }
}
.checkout-head .small { white-space: nowrap; }
.checkout-head {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem;
  padding: .75rem; border: 1px solid var(--line); border-radius: 6px;
}
.min-w-0 { min-width: 0; }
.checkout-errors { border-left: 4px solid var(--bs-danger); background: #fdf0f0; padding: .75rem 1rem; margin-bottom: 1.5rem; font-weight: 600; }

.step + .step { margin-top: 2.25rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.step-title { display: flex; align-items: center; gap: .65rem; font-size: 1.125rem; margin-bottom: 1.1rem; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: .875rem;
}

/* Календарь забора: неделя пн–вс, недоступные дни видны, но не выбираются. */
.cal { max-width: 30rem; }
.cal-head { font-weight: 600; margin-bottom: .5rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.cal-wd { text-align: center; font-size: .8125rem; color: var(--ink-soft); }
.cal-wd.is-weekend { color: #9fb0bf; }
.cal-day { position: relative; margin: 0; }
.cal-day input { position: absolute; opacity: 0; }
.cal-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 3.25rem; border: 1px solid var(--line); border-radius: 6px; background: var(--paper);
  cursor: pointer; line-height: 1.1;
}
.cal-num { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; }
.cal-note { font-size: .6875rem; color: var(--ink-soft); margin-top: .1rem; }
.cal-day:hover .cal-cell { border-color: var(--ink-soft); }
.cal-day input:checked + .cal-cell { border: 2px solid var(--ink); background: #fff8df; }
.cal-day input:focus-visible + .cal-cell { outline: 3px solid var(--sky); outline-offset: 2px; }
.cal-cell.is-off { background: transparent; border-style: dashed; color: #9fb0bf; cursor: not-allowed; }
.cal-cell.is-off .cal-num { font-weight: 400; }
.cal-cell.is-off .cal-note { color: inherit; }
.cal-legend { margin: .6rem 0 0; font-size: .8125rem; color: var(--ink-soft); }

.package-limit { border-left: 4px solid var(--tape); background: #fff8df; padding: .75rem 1rem; font-size: .9375rem; }
.volumetric-note { margin: -.25rem 0 1rem; font-size: .9375rem; color: var(--ink); }

/* Сводка — накладная, как форма калькулятора: тот же главный элемент сайта. */
.summary-route { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.2; }
.summary-service { display: flex; align-items: center; gap: .75rem; margin: 1rem 0 1.1rem; }
.summary-facts { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0 0 1rem; font-size: .9375rem; }
.summary-facts dt { font-weight: 400; color: var(--ink-soft); }
.summary-facts dd { margin: 0; font-weight: 600; }
.summary-window { font-weight: 400; }
/* «в т.ч. НДС» — под итогом, мелко: сумма окончательная, НДС уже внутри. */
.summary-vat { margin: -.35rem 0 1rem; text-align: right; font-size: .8125rem; color: var(--ink-soft); }
.summary-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 2px dashed var(--line); padding-top: 1rem; margin-bottom: 1rem;
}
.summary-consent { font-size: .875rem; margin-bottom: 1rem; }
.summary-note { margin: .75rem 0 0; font-size: .8125rem; color: var(--ink-soft); }
.quotes-note + .quotes-note { margin-top: .25rem; }
/* Международная отправка: то, что не входит в цену, клиент видит до оформления. */
.customs-note { border-left: 4px solid var(--sky); background: var(--mist); padding: .75rem 1rem; margin-bottom: 1.5rem; font-size: .9375rem; }
.customs-note-title { font-weight: 600; margin-bottom: .25rem; }
.quote-tags { display: inline-flex; flex-wrap: wrap; gap: .4rem; margin-left: .35rem; vertical-align: 1px; }
.quote-tag {
  font-size: .8125rem; font-weight: 600; color: var(--sky);
  border: 1px solid currentColor; border-radius: 3px; padding: 0 .4rem;
}
.segment-empty { margin: 0; padding: 1rem 0; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
@media (max-width: 575.98px) {
  /* Телефон: служба и цена в одну строку, ниже дата и детали, кнопка во всю ширину. */
  .quote-row {
    grid-template-columns: auto minmax(0, 1fr) auto; column-gap: .75rem; row-gap: .15rem;
    grid-template-areas: "mark name price" "mark when when" "meta meta meta" "btn btn btn";
  }
  .quote-row > .quote-price { font-size: 1.25rem; }
  .quote-meta { margin-top: .35rem; }
  .quote-row > .btn { margin-top: .75rem; }
  .partner-mark { width: 64px; height: 32px; font-size: .8125rem; }
}
.form-heading { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--ink-soft); margin: 1rem 0 .75rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* --- Страница заказа ------------------------------------------------------ */
.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
/* Цвет статуса — что делать клиенту: жёлтый — действие, тёмный — готово, красный — проблема. */
.status-pill {
  display: inline-block; padding: .2rem .75rem; border-radius: 999px;
  font-weight: 600; font-size: .875rem; border: 1.5px solid currentColor; color: var(--sky);
}
.status-pill.is-action { background: var(--tape); border-color: var(--tape); color: var(--ink); }
.status-pill.is-done { background: var(--ink); border-color: var(--ink); color: #fff; }
.status-pill.is-warning { color: #b42318; }
.flash { padding: .75rem 1rem; border-left: 4px solid var(--sky); background: var(--mist); margin-bottom: 1.5rem; }
.flash.is-error { border-color: #b42318; background: #fdf0f0; }

.stages { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; }
/* Линия от предыдущего этапа к этому */
.stage::before { content: ''; position: absolute; top: calc(.625rem - 1.5px); left: -50%; right: 50%; height: 3px; background: var(--line); }
.stage:first-child::before { display: none; }
.stage.is-done::before, .stage.is-current::before { background: var(--ink); }
.stage-dot { position: relative; z-index: 1; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--paper); border: 3px solid var(--line); }
.stage.is-done .stage-dot { background: var(--ink); border-color: var(--ink); }
.stage.is-current .stage-dot { background: var(--tape); border-color: var(--ink); }
.stages.is-problem .stage.is-current .stage-dot { background: #b42318; border-color: #b42318; }
.stages.is-cancelled .stage.is-current .stage-dot { background: var(--line); border-color: var(--ink-soft); }
.stage-label { font-weight: 600; font-size: .9375rem; line-height: 1.2; }
.stage.is-todo .stage-label { font-weight: 400; color: var(--ink-soft); }
.stage-when { font-size: .75rem; color: var(--ink-soft); }
@media (max-width: 575.98px) {
  .stages { grid-template-columns: 1fr; }
  .stage { display: grid; grid-template-columns: 1.25rem 1fr; column-gap: .75rem; row-gap: 0; align-items: start; text-align: left; padding-bottom: 1rem; }
  .stage-dot { grid-row: 1 / 3; }
  .stage::before { display: none; }
  /* Вертикальная линия к следующему этапу */
  .stage:not(:last-child)::after { content: ''; position: absolute; left: calc(.625rem - 1.5px); top: 1.25rem; bottom: 0; width: 3px; background: var(--line); }
  .stage.is-done:not(:last-child)::after { background: var(--ink); }
}

/* Страница по номеру: только ход доставки — короткое пояснение под шапкой, без рамки, чтобы не спорить со статусом. */
.limited-note { margin: -.75rem 0 1.5rem; max-width: 42em; font-size: .9375rem; color: var(--ink-soft); }
.next { padding: 1.25rem; border-radius: 6px; background: var(--mist); border-left: 4px solid var(--sky); margin-bottom: 2rem; }
.next.is-action { background: #fff8df; border-color: var(--tape); }
.next.is-done { border-color: var(--ink); }
.next.is-warning { background: #fdf0f0; border-color: #b42318; }
.next-title { font-size: 1.125rem; margin-bottom: .4rem; }
.next-contact { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: 1rem; }
.next-call { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.next-call svg { width: 1.05em; height: 1.05em; flex: none; }
.next-hours { font-size: .875rem; color: var(--ink-soft); }

.parties { display: grid; gap: 1rem; }
@media (min-width: 576px) { .parties { grid-template-columns: 1fr 1fr; } }
.party { border: 1px solid var(--line); border-radius: 6px; padding: 1rem; }
.party-role { font-size: .8125rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.history-when { color: var(--ink-soft); font-size: .875rem; }
.tracking-number { font-family: var(--font-display); letter-spacing: .02em; }

/* --- Как это работает ------------------------------------------------------ */
.how-hero { padding: 3rem 0 3.5rem; }
@media (min-width: 992px) { .how-hero { padding: 4rem 0 4.5rem; } }

/* Путь посылки: та же линия с точками, что на странице заказа. На телефоне — вертикально. */
.journey { list-style: none; padding: 0; margin: 0; display: grid; }
.journey li { position: relative; padding: 0 0 1.75rem 2.25rem; }
.journey li::before {
  content: ''; position: absolute; left: 0; top: .15rem; z-index: 1;
  width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink);
}
.journey li:last-child::before { background: var(--tape); }
.journey li:not(:last-child)::after {
  content: ''; position: absolute; left: calc(.625rem - 1.5px); top: 1.4rem; bottom: 0; width: 3px; background: var(--ink);
}
.journey h3 { font-size: 1.0625rem; margin-bottom: .4rem; }
.journey p { margin: 0; color: var(--ink-soft); }
@media (min-width: 992px) {
  .journey { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 1.75rem; }
  .journey li { padding: 2.25rem 0 0; }
  .journey li::before { top: 0; }
  .journey li:not(:last-child)::after { top: calc(.625rem - 1.5px); left: 1.25rem; right: -1.75rem; bottom: auto; width: auto; height: 3px; }
}

.segments-explain { display: grid; gap: 1rem; }
@media (min-width: 768px) { .segments-explain { grid-template-columns: 1fr 1fr; } }
.segment-card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem; }
.segment-card h3 { margin-bottom: .6rem; }

.package-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 768px) { .package-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.package-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 2px solid var(--line); border-radius: 6px; padding: .9rem .5rem;
}
.package-charge { margin-top: .5rem; font-size: .875rem; font-weight: 600; }
.formula { margin-top: 1.5rem; max-width: 46rem; border-left: 4px solid var(--tape); background: #fff8df; padding: 1rem 1.25rem; }
.formula-line { font-size: 1.0625rem; margin: .25rem 0 .6rem; }

.facts-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .facts-grid { grid-template-columns: repeat(3, 1fr); } }
.facts-grid h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.facts-grid p { margin: 0; color: var(--ink-soft); }

/* --- Для бизнеса ----------------------------------------------------------- */
.benefits { display: grid; gap: 1rem; }
@media (min-width: 768px) { .benefits { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .benefits { grid-template-columns: repeat(4, 1fr); } }
.benefits h3 { font-size: 1.0625rem; }
@media (min-width: 992px) { .journey.journey-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.contact-split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 768px) { .contact-split { grid-template-columns: 1fr 1fr; gap: 3rem; } }
/* Контакты — тёмная плашка, как «OneTab» в блоке «Кто за что отвечает» на главной. */
.contact-card { background: var(--ink); color: #fff; border-radius: 6px; padding: 1.75rem; }
.contact-card h2 { color: #fff; }
.contact-card .contact-lead { color: #c9d6e1; }
.contact-card a { color: #fff; font-weight: 600; }
.contact-card li + li { margin-top: .35rem; }

/* Блок контактов на тёмном фоне. Главное — номер: крупно, шрифтом заголовков, жёлтый значок — «позвонить» здесь основное действие. */
.support-phone { display: inline-flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.support-phone:hover { color: #fff; text-decoration: none !important; }
.support-phone-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: var(--support-icon); height: var(--support-icon); border-radius: 6px; background: var(--tape); color: var(--ink);
  transition: transform .12s ease;
}
.support-phone-icon svg { width: 1.2rem; height: 1.2rem; }
.support-phone:hover .support-phone-icon { transform: rotate(-12deg); }
.support-phone-number {
  font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .25em; text-decoration-thickness: 2px;
  transition: text-decoration-color .12s ease;
}
.support-phone:hover .support-phone-number { text-decoration-color: var(--tape); }
.support-hours { margin: .4rem 0 0; color: #9fb2c3; font-size: .9rem; }
.support-phone + .support-more, .support-hours + .support-more { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid rgba(255, 255, 255, .14); }
.support-more li + li { margin-top: .55rem; }
/* WhatsApp и почта — вторым рядом: значок в контурном квадрате той же ширины, что жёлтый у телефона, текст встаёт под номер. */
.support { --support-icon: 2.5rem; }
.site-footer .support { --support-icon: 2.25rem; }
.support-link { display: inline-flex; align-items: center; gap: .75rem; color: #fff; font-weight: 500; text-decoration: none; }
.support-link-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: var(--support-icon); height: 2rem; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .22); color: #c9d6e1;
  transition: border-color .12s ease, color .12s ease, background-color .12s ease;
}
.support-link-icon svg { width: 1.1rem; height: 1.1rem; }
.support-link.is-wa .support-link-icon { color: #4fd17f; }
.support-link.is-mail .support-link-icon { color: #7cc6e0; }
.support-link.is-wa:hover .support-link-icon { border-color: #4fd17f; background: rgba(79, 209, 127, .1); }
.support-link.is-mail:hover .support-link-icon { border-color: #7cc6e0; background: rgba(124, 198, 224, .1); }
.support-link:hover { text-decoration: underline !important; text-underline-offset: .25em; text-decoration-color: rgba(255, 255, 255, .45) !important; }
@media (prefers-reduced-motion: reduce) { .support-link-icon { transition: none; } }
.site-footer .support-phone-number { font-size: 1.15rem; }
.contact-card .support-phone-number { font-size: 1.3rem; }
@media (prefers-reduced-motion: reduce) { .support-phone-icon, .support-phone-number { transition: none; } .support-phone:hover .support-phone-icon { transform: none; } }
.contact-side { padding-top: .5rem; }

/* --- Помощь ---------------------------------------------------------------- */
.help-track { margin-top: 1.75rem; max-width: 34rem; }
.help-track-row { display: flex; gap: .5rem; }
.help-track-row .form-control { min-width: 0; }
.help-track-row .btn { flex: none; white-space: nowrap; }
@media (max-width: 575.98px) { .help-track-row { flex-direction: column; } }

.help-grid { display: grid; gap: 2.5rem; }
@media (min-width: 992px) {
  .help-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 3.5rem; align-items: start; }
  .help-aside { position: sticky; top: 1.5rem; }
}
.help-topics { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.help-topics a {
  padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: .9375rem;
}
.help-topics a:hover { border-color: var(--ink); }
.help-topic { scroll-margin-top: 1.5rem; }
.help-topic + .help-topic { margin-top: 2.5rem; }
.help-topic h2 { font-size: 1.25rem; margin-bottom: .25rem; }

/* --- Где моя посылка ------------------------------------------------------- */
.track-hero { padding: 3rem 0 4rem; }
@media (min-width: 992px) { .track-hero { padding: 4.5rem 0 6rem; } }
.track-grid { display: grid; gap: 2rem; }
/* На телефоне: заголовок → форма → подсказки. На компьютере форма справа на всю высоту. */
@media (min-width: 992px) {
  .track-grid { grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "head form" "tips form"; column-gap: 4rem; row-gap: 0; }
  .track-head { grid-area: head; }
  .track-form { grid-area: form; align-self: center; }
  .track-tips { grid-area: tips; margin-top: 2rem; }
}
.track-tips { list-style: none; padding: 0; margin: 0; max-width: 34rem; }
.track-tips li { padding: .75rem 0; border-top: 1px solid var(--line); color: var(--ink-soft); }
.track-tips b { color: var(--ink); }
.track-form .flash { margin-bottom: 1rem; }

/* --- Телефоны -------------------------------------------------------------- */
/* Сенсорный экран: кнопки, поля и плашки не меньше 44 px — попадать пальцем. */
@media (pointer: coarse) {
  .btn, .form-control, .form-select { min-height: 44px; }
  .chip { padding: .65rem .95rem; }
  .help-topics a { padding: .55rem .9rem; }
}
/* Вопрос в FAQ нажимается всей строкой, а не только текстом. */
.faq details { padding: 0; }
.faq summary { padding: .95rem 0; }
.faq details > div { margin: -.2rem 0 1rem; }

/* Оформление: на телефоне главное действие всегда внизу экрана. */
.checkout-bar {
  position: sticky; bottom: 0; z-index: 20; margin: .5rem -.75rem 0; padding: .65rem .75rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--paper); border-top: 2px solid var(--ink);
  transition: transform .2s ease;
}
.checkout-bar.is-hidden { transform: translateY(110%); }
.checkout-bar-label { font-size: .8125rem; color: var(--ink-soft); line-height: 1.1; }
.checkout-bar .quote-price { font-size: 1.25rem; line-height: 1.2; }

@media (max-width: 575.98px) {
  h1 { font-size: clamp(1.625rem, 1.2rem + 3vw, 2rem); }
  .order-head h1 { font-size: 1.625rem; }

  /* Выбор коробки — списком: рисунок слева, подписи справа. Вдвое короче сетки 2×2. */
  .sizes { grid-template-columns: 1fr; gap: .4rem; }
  .size-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: .85rem; align-items: center; text-align: left; padding: .55rem .8rem; }
  .size-stage { grid-row: 1 / span 3; height: 44px; margin: 0; align-items: center; }
  .size-name, .size-hint { grid-column: 2; }

  /* Календарь: семь колонок на 360 px — подписи компактнее, у закрытых дней скрыты. */
  .cal-grid { gap: .25rem; }
  .cal-cell { height: 3rem; }
  .cal-num { font-size: 1rem; }
  .cal-note { font-size: .625rem; }
  .cal-cell.is-off .cal-note { display: none; }

  .step-title { font-size: 1.0625rem; }
  .waybill { padding: 1.75rem 1rem 1.1rem; }
  .segment-summary { white-space: normal; flex-wrap: wrap; gap: .1rem .75rem; }
}
@media (prefers-reduced-motion: reduce) { .checkout-bar { transition: none; } }
#quotes, #checkout-summary { scroll-margin-top: 1rem; }
@media (pointer: coarse) {
  /* Флажок согласия и ссылка «назад» — тоже под палец. */
  .summary-consent .form-check-input { width: 1.35em; height: 1.35em; margin-top: .1em; }
  .summary-consent { padding-left: 2em; }
  .summary-consent .form-check-input { margin-left: -2em; }
  a.link-secondary.small { display: inline-block; padding: .6rem 0; }
}

/* --- Договор оферты: длинный документ — спокойный заголовок, абзацы с воздухом, реквизиты в две колонки --- */
.offer h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem); }
.offer h2 { font-family: var(--font-body); font-weight: 700; letter-spacing: 0; margin-bottom: .6rem; }
.offer p, .offer ul { margin-bottom: .65rem; }
.offer-req { display: grid; grid-template-columns: minmax(9em, auto) 1fr; gap: .35rem 1.25rem; margin: 0; }
.offer-req dt { font-weight: 600; }
.offer-req dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .offer-req { grid-template-columns: 1fr; } .offer-req dd { margin-bottom: .5rem; } }
