/* Queen Buyer — система стилей.
   Один источник токенов на весь сайт. Светлая тема выбрана из сцены:
   клиентка открывает сайт с телефона днём, чтобы проверить, настоящая ли
   это фирма; проверяющий из банка — с рабочего стола. Обоим нужен свет. */

:root {
  /* Земля и чернила */
  --qb-bg:        #ffffff;
  --qb-tint:      #f8f4f7;
  --qb-tint-2:    #f1e9ef;
  --qb-ink:       #241b26;
  --qb-ink-soft:  #6b5f70;
  --qb-line:      #e7dfe6;

  /* Поле бренда — тёмная слива, держит шапку, подвал и полосу героя */
  --qb-field:     #2e1a2e;
  --qb-field-2:   #3d2440;

  /* Единственный цвет действия */
  --qb-act:       #b4275f;
  --qb-act-hi:    #98204f;
  --qb-act-tint:  #fbeef3;

  /* Служебные значения */
  --qb-ok:        #1f7a5c;
  --qb-warn:      #8a5a06;

  --qb-r:         12px;
  --qb-r-sm:      10px;
  --qb-r-pill:    999px;

  /* Тени со смещением и мягким размытием — не цветной ореол */
  --qb-sh-1: 0 1px 2px rgba(36,27,38,.06), 0 1px 1px rgba(36,27,38,.04);
  --qb-sh-2: 0 8px 24px -8px rgba(36,27,38,.18), 0 2px 6px rgba(36,27,38,.06);
  --qb-sh-3: 0 24px 56px -16px rgba(36,27,38,.22), 0 4px 12px rgba(36,27,38,.08);

  --qb-ease: cubic-bezier(.16, 1, .3, 1);

  --qb-shell: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--qb-bg);
  color: var(--qb-ink);
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Поверхности браузера: их тоже рисуем, а не оставляем по умолчанию ── */
::selection { background: var(--qb-act); color: #fff; }
input, textarea, select { caret-color: var(--qb-act); }
:focus-visible {
  outline: 2px solid var(--qb-act);
  outline-offset: 2px;
  border-radius: 4px;
}
a { color: var(--qb-act); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--qb-act-hi); }
.qb-num { font-variant-numeric: tabular-nums; }
@supports (scrollbar-color: auto) {
  html { scrollbar-color: #c9bcc7 var(--qb-tint); scrollbar-width: thin; }
}

/* ── Типографика ────────────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h1 {
  font-family: 'Unbounded', 'Onest', sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 5.2vw, 54px);
  letter-spacing: -0.035em;
}
h2 { font-size: clamp(23px, 3.2vw, 33px); font-weight: 700; }
h3 { font-size: clamp(17px, 2vw, 20px); font-weight: 650; }
p  { text-wrap: pretty; }

/* Мера строки: длинный текст читается, только если строка не бесконечная.
   Ограничение в ch не даёт блоку сжаться ниже своей меры внутри грид-колонки —
   на узком экране это выносило страницу цен за край. Отсюда min() и min-width. */
.qb-prose { max-width: min(62ch, 100%); }
.qb-prose p + p,
.qb-prose ul + p,
.qb-prose p + ul { margin-top: 14px; }
.qb-prose h2 { margin: 40px 0 14px; }
.qb-prose h3 { margin: 28px 0 10px; }
.qb-prose ul, .qb-prose ol { padding-left: 22px; }
.qb-prose li + li { margin-top: 7px; }
.qb-prose strong { font-weight: 650; }

.qb-lead { font-size: clamp(16px, 1.9vw, 19px); color: var(--qb-ink-soft); max-width: min(58ch, 100%); }
.qb-muted { color: var(--qb-ink-soft); }
.qb-small { font-size: 13px; }

/* ── Каркас ─────────────────────────────────────────────────────────── */
.qb-shell { max-width: var(--qb-shell); margin: 0 auto; padding: 0 20px; }
.qb-section { padding: 68px 0; }
.qb-section--tint { background: var(--qb-tint); }
.qb-section-head { margin-bottom: 34px; }
.qb-section-head p { margin-top: 10px; }

/* ── Шапка ──────────────────────────────────────────────────────────── */
.qb-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--qb-field);
  color: #fff;
}
.qb-header-in {
  display: flex; align-items: center; gap: 22px;
  height: 62px;
}
.qb-logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700; font-size: 18px; letter-spacing: -0.04em;
  color: #fff; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 9px;
}
.qb-logo:hover { color: #fff; }
.qb-logo-mark { width: 26px; height: 26px; flex-shrink: 0; }
.qb-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.qb-nav a {
  color: rgba(255,255,255,.82); text-decoration: none;
  font-size: 14px; padding: 8px 11px; border-radius: var(--qb-r-sm);
  transition: background .15s var(--qb-ease), color .15s var(--qb-ease);
  white-space: nowrap;
}
.qb-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.qb-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.14); }
.qb-burger {
  display: none; margin-left: auto;
  background: rgba(255,255,255,.1); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: var(--qb-r-sm); cursor: pointer;
  align-items: center; justify-content: center;
}

/* ── Кнопки ─────────────────────────────────────────────────────────── */
.qb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border-radius: var(--qb-r-sm); border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s var(--qb-ease), border-color .15s var(--qb-ease),
              color .15s var(--qb-ease), box-shadow .15s var(--qb-ease);
}
.qb-btn--primary { background: var(--qb-act); color: #fff; box-shadow: var(--qb-sh-1); }
.qb-btn--primary:hover { background: var(--qb-act-hi); color: #fff; box-shadow: var(--qb-sh-2); }
.qb-btn--ghost { background: transparent; color: var(--qb-ink); border-color: var(--qb-line); }
.qb-btn--ghost:hover { background: var(--qb-tint); color: var(--qb-ink); border-color: #d6c9d4; }
.qb-btn--onfield { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.26); }
.qb-btn--onfield:hover { background: rgba(255,255,255,.22); color: #fff; }
.qb-btn[disabled] { opacity: .5; cursor: not-allowed; }
.qb-btn--wide { width: 100%; }

/* ── Герой ──────────────────────────────────────────────────────────── */
.qb-hero { background: var(--qb-field); color: #fff; overflow: hidden; }
.qb-hero-in {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding: 66px 0 74px;
}
.qb-hero h1 { color: #fff; }
.qb-hero .qb-lead { color: rgba(255,255,255,.78); margin-top: 18px; max-width: 46ch; }
.qb-hero-acts { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.qb-hero-trust {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 32px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 13.5px; color: rgba(255,255,255,.74);
}
.qb-hero-trust span { display: inline-flex; align-items: center; gap: 7px; }

/* Единственный поставленный момент движения на сайте: маршрут посылки
   прочерчивается один раз при загрузке. Не набор ховеров. */
.qb-route { width: 100%; height: auto; }
.qb-route .qb-route-path {
  stroke-dasharray: 520; stroke-dashoffset: 520;
  animation: qb-draw 1.9s var(--qb-ease) .25s forwards;
}
.qb-route .qb-route-dot { opacity: 0; animation: qb-pop .5s var(--qb-ease) 1.75s forwards; }
.qb-route .qb-route-dot--b { animation-delay: 2.05s; }
@keyframes qb-draw { to { stroke-dashoffset: 0; } }
@keyframes qb-pop  { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .qb-route .qb-route-path { animation: none; stroke-dashoffset: 0; }
  .qb-route .qb-route-dot  { animation: none; opacity: 1; }
}

/* ── Шаги «як це працює» — нумерация несёт смысл, порядок обязателен ── */
.qb-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.qb-step { padding: 0 26px 0 0; position: relative; }
.qb-step + .qb-step { padding-left: 26px; border-left: 1px solid var(--qb-line); }
.qb-step-n {
  display: block; font-family: 'Unbounded', sans-serif;
  font-size: 13px; font-weight: 600; color: var(--qb-act);
  letter-spacing: 0; margin-bottom: 12px;
}
.qb-step h3 { margin-bottom: 7px; }
.qb-step p { font-size: 14.5px; color: var(--qb-ink-soft); }

/* ── Таблица тарифов ────────────────────────────────────────────────── */
.qb-table-wrap { overflow-x: auto; border: 1px solid var(--qb-line); border-radius: var(--qb-r); }
.qb-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.qb-table th, .qb-table td { padding: 14px 18px; text-align: left; }
.qb-table thead th {
  background: var(--qb-tint); font-size: 12.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .04em; color: var(--qb-ink-soft);
  border-bottom: 1px solid var(--qb-line);
}
.qb-table tbody tr + tr td { border-top: 1px solid var(--qb-line); }
.qb-table td:last-child, .qb-table th:last-child { text-align: right; }

/* ── Раскладка стоимости: ни одна сумма без своих слагаемых ─────────── */
.qb-calc {
  background: #fff; border: 1px solid var(--qb-line);
  border-radius: var(--qb-r); box-shadow: var(--qb-sh-2);
  padding: 22px;
}
.qb-calc-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; font-size: 15px;
}
.qb-calc-row + .qb-calc-row { border-top: 1px dashed var(--qb-line); }
.qb-calc-row span:first-child { color: var(--qb-ink-soft); }
.qb-calc-total {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 12px; padding-top: 14px; border-top: 2px solid var(--qb-ink);
  font-size: 19px; font-weight: 700;
}

/* ── Форма ──────────────────────────────────────────────────────────── */
.qb-field { margin-bottom: 16px; }
.qb-label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.qb-input, .qb-textarea, .qb-select {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--qb-line); border-radius: var(--qb-r-sm);
  background: #fff; color: var(--qb-ink); font: inherit; font-size: 15px;
  transition: border-color .15s var(--qb-ease), box-shadow .15s var(--qb-ease);
}
.qb-textarea { min-height: 96px; resize: vertical; }
.qb-input:hover, .qb-textarea:hover, .qb-select:hover { border-color: #d6c9d4; }
.qb-input:focus, .qb-textarea:focus, .qb-select:focus {
  outline: none; border-color: var(--qb-act);
  box-shadow: 0 0 0 3px var(--qb-act-tint);
}
.qb-input::placeholder, .qb-textarea::placeholder { color: #9a8d99; }
.qb-hint { font-size: 12.5px; color: var(--qb-ink-soft); margin-top: 6px; }
.qb-error { font-size: 12.5px; color: #b3261e; margin-top: 6px; display: none; }
.qb-field--invalid .qb-input,
.qb-field--invalid .qb-textarea { border-color: #b3261e; }
.qb-field--invalid .qb-error { display: block; }
.qb-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.qb-check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--qb-act); flex-shrink: 0; }

.qb-formnote {
  margin-top: 14px; padding: 13px 15px;
  background: var(--qb-tint); border-radius: var(--qb-r-sm);
  font-size: 13.5px; color: var(--qb-ink-soft);
}
.qb-formstate { display: none; padding: 16px; border-radius: var(--qb-r-sm); font-size: 14.5px; }
.qb-formstate--ok   { background: #eaf6f1; color: #14543f; }
.qb-formstate--err  { background: #fdecea; color: #8c1d18; }



/* ── Знімки ─────────────────────────────────────────────────────────── */
.qb-band { position: relative; overflow: hidden; background: var(--qb-field); }
.qb-band img {
  width: 100%; height: clamp(220px, 34vw, 380px);
  object-fit: cover; display: block; opacity: .88;
}
.qb-band-cap {
  position: absolute; right: 14px; bottom: 12px;
  font-size: 11px; color: rgba(255,255,255,.7);
  background: rgba(36,27,38,.55); padding: 3px 9px; border-radius: var(--qb-r-pill);
}
.qb-band-over {
  position: absolute; inset: 0; display: flex; align-items: center;
  /* Текст лежить у лівій третині, а фото під ним світле — тримаємо там
     щільну заливку, інакше білий по світлих коробках втрачає контраст. */
  background: linear-gradient(90deg, rgba(46,26,46,.94) 0%, rgba(46,26,46,.80) 45%, rgba(46,26,46,.25) 100%);
}
.qb-band-over p {
  color: #fff; font-size: clamp(18px, 2.6vw, 26px); font-weight: 700;
  line-height: 1.3; max-width: 22ch;
}

.qb-split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: center; }
.qb-split-img { position: relative; border-radius: var(--qb-r); overflow: hidden; }
.qb-split-img img {
  width: 100%; height: 100%; max-height: 420px; object-fit: cover; display: block;
}
.qb-split-cap {
  position: absolute; left: 10px; bottom: 10px;
  font-size: 11px; color: rgba(255,255,255,.85);
  background: rgba(36,27,38,.55); padding: 3px 9px; border-radius: var(--qb-r-pill);
}

.qb-panel--img { padding: 0; overflow: hidden; }
.qb-panel--img img { width: 100%; height: 150px; object-fit: cover; display: block; }
.qb-panel--img .qb-panel-body { padding: 18px 22px 22px; }

@media (max-width: 900px) { .qb-split { grid-template-columns: 1fr; gap: 24px; } }

/* ── Товары в заявке: повторяющиеся строки ──────────────────────────── */
.qb-item {
  border: 1px solid var(--qb-line); border-radius: var(--qb-r);
  padding: 18px; background: #fff;
}
.qb-item + .qb-item { margin-top: 12px; }
.qb-item-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.qb-item-n {
  font-size: 12.5px; font-weight: 650; text-transform: uppercase;
  letter-spacing: .04em; color: var(--qb-ink-soft);
}
.qb-item-del {
  background: none; border: none; cursor: pointer; font: inherit;
  font-size: 13px; color: var(--qb-act); padding: 6px 8px;
  border-radius: var(--qb-r-sm); min-height: 32px;
}
.qb-item-del:hover { background: var(--qb-act-tint); color: var(--qb-act-hi); }
.qb-item-two { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
#qbItemsError { margin-top: 10px; }
@media (max-width: 560px) { .qb-item-two { grid-template-columns: 1fr; } }

/* ── Вопрос-ответ ───────────────────────────────────────────────────── */
.qb-qa { border-top: 1px solid var(--qb-line); }
.qb-qa details { border-bottom: 1px solid var(--qb-line); }
.qb-qa summary {
  cursor: pointer; padding: 17px 40px 17px 0; position: relative;
  font-weight: 600; font-size: 16px; list-style: none;
}
.qb-qa summary::-webkit-details-marker { display: none; }
.qb-qa summary::after {
  content: ''; position: absolute; right: 8px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--qb-act); border-bottom: 2px solid var(--qb-act);
  transform: rotate(45deg); transition: transform .2s var(--qb-ease);
}
.qb-qa details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.qb-qa .qb-qa-body { padding: 0 0 18px; color: var(--qb-ink-soft); max-width: 68ch; }


/* ── Панель владельца ───────────────────────────────────────────────── */
.qb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--qb-line); flex-wrap: wrap; }
.qb-tabs a {
  padding: 11px 16px; text-decoration: none; color: var(--qb-ink-soft);
  font-size: 14.5px; font-weight: 600; border-bottom: 2px solid transparent;
  margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px;
}
.qb-tabs a:hover { color: var(--qb-ink); }
.qb-tabs a.qb-tab--on { color: var(--qb-act); border-bottom-color: var(--qb-act); }
.qb-badge {
  background: var(--qb-act); color: #fff; font-size: 11.5px; font-weight: 700;
  border-radius: var(--qb-r-pill); padding: 1px 7px; min-width: 20px; text-align: center;
}

.qb-req-card {
  border: 1px solid var(--qb-line); border-radius: var(--qb-r);
  background: #fff; padding: 18px; margin-bottom: 14px;
}
.qb-req-card--done { background: var(--qb-tint); opacity: .72; }
.qb-req-top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--qb-line); margin-bottom: 14px;
}
.qb-req-id { font-weight: 700; font-size: 15px; }
.qb-req-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; }
.qb-req-body .qb-label { color: var(--qb-ink-soft); font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.qb-req-item { padding: 9px 0; font-size: 14px; }
.qb-req-item + .qb-req-item { border-top: 1px dashed var(--qb-line); }
.qb-req-item a { word-break: break-all; font-size: 13px; }
@media (max-width: 720px) { .qb-req-body { grid-template-columns: 1fr; gap: 18px; } }

/* ── Подвал с реквизитами ───────────────────────────────────────────── */
.qb-footer { background: var(--qb-field); color: rgba(255,255,255,.72); margin-top: 0; }
.qb-footer-in { padding: 46px 0 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.qb-footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 13px; }
.qb-footer a { color: rgba(255,255,255,.72); text-decoration: none; font-size: 14px; }
.qb-footer a:hover { color: #fff; text-decoration: underline; }
.qb-footer li { list-style: none; margin-bottom: 8px; }
.qb-req { font-size: 13px; line-height: 1.75; }
.qb-req b { color: #fff; font-weight: 600; }
.qb-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 0 26px; font-size: 12.5px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ── Служебные ──────────────────────────────────────────────────────── */
.qb-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--qb-r-pill);
  background: var(--qb-act-tint); color: var(--qb-act-hi);
  font-size: 12.5px; font-weight: 600;
}
.qb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.qb-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.qb-grid-2 > *, .qb-grid-3 > *, .qb-hero-in > * { min-width: 0; }
.qb-panel {
  background: #fff; border: 1px solid var(--qb-line);
  border-radius: var(--qb-r); padding: 24px;
}
.qb-ico { width: 22px; height: 22px; flex-shrink: 0; }

/* Заготовка під комерційну цифру, якої ще немає. Видно навмисно: такий сайт
   не можна подавати на еквайринг, поки жодного «—» не лишилось. */
.qb-todo {
  background: #fff4dd; color: var(--qb-warn);
  border-radius: 5px; padding: 0 7px;
  outline: 1px dashed #d8a83a; outline-offset: 0;
}
.qb-skip {
  position: absolute; left: -9999px;
  background: #fff; color: var(--qb-ink); padding: 10px 16px; z-index: 100;
}
.qb-skip:focus { left: 12px; top: 12px; position: fixed; }

/* ── Адаптация ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .qb-hero-in { grid-template-columns: 1fr; gap: 34px; padding: 44px 0 52px; }
  .qb-steps { grid-template-columns: 1fr 1fr; gap: 26px 0; }
  .qb-step { padding-right: 20px; }
  .qb-step:nth-child(odd) { padding-left: 0; border-left: none; }
  .qb-step:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--qb-line); }
  .qb-grid-2, .qb-grid-3 { grid-template-columns: 1fr; }
  .qb-footer-in { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .qb-nav {
    display: none; position: absolute; left: 0; right: 0; top: 62px;
    background: var(--qb-field-2); flex-direction: column; gap: 0;
    padding: 8px; box-shadow: var(--qb-sh-3);
  }
  .qb-nav--open { display: flex; }
  .qb-nav a { padding: 12px 14px; min-height: 44px; display: flex; align-items: center; }
  .qb-burger { display: inline-flex; }
  .qb-section { padding: 48px 0; }
  .qb-steps { grid-template-columns: 1fr; }
  .qb-step, .qb-step + .qb-step { padding: 0 0 0 0; border-left: none; }
  .qb-step + .qb-step { padding-top: 22px; border-top: 1px solid var(--qb-line); }
  .qb-hero-acts .qb-btn { width: 100%; }
}
