/* =====================================================================
   Базовая нейтральная тема. Весь внешний вид меняется здесь —
   начните с переменных в :root. Разметка шаблонов от стилей не зависит.
   ===================================================================== */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1b1f24;
  --muted: #667085;
  --line: #e3e6ea;
  --accent: #2557d6;
  --accent-text: #ffffff;
  --ok: #1f7a4d;
  --ok-bg: #e7f5ee;
  --warn: #9a5b00;
  --warn-bg: #fff4e0;
  --err: #b42318;
  --err-bg: #fdecea;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1040px;
}

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 1.8rem; line-height: 1.2; margin: .2em 0 .6em; }
h2 { font-size: 1.25rem; margin: 0 0 .6em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.main { padding-top: 24px; padding-bottom: 96px; min-height: 70vh; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { text-align: right; white-space: nowrap; }

/* шапка / подвал */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 700; text-decoration: none; color: var(--text); }
.nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .875rem; }
.footer-row { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-row a { color: var(--muted); }

/* кнопки */
.btn { display: inline-block; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-text);
       padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-big { padding: 14px 26px; font-size: 1.05rem; }
.btn-small { padding: 6px 12px; font-size: .875rem; }
.btn-ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.btn-danger { background: var(--err); }
.link-btn { border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }

/* сообщения */
.flashes { display: grid; gap: 8px; margin-bottom: 16px; }
.flash { padding: 12px 14px; border-radius: var(--radius); }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--err-bg); color: var(--err); }

/* карточки и формы */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 440px; margin: 40px auto; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 500; }
.form label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
input, textarea, select { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
input[type=checkbox] { width: auto; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table tr.total td { font-weight: 700; border-bottom: 0; }
.prose p { max-width: 70ch; }

/* главная */
.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 2.2rem; max-width: 20ch; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 60ch; }
.subjects { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 24px 0; }
.subjects a { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); height: 100%; }
.subjects span { color: var(--muted); font-size: .9rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 40px 0; }
.step { background: var(--surface); border-radius: var(--radius); padding: 16px; border: 1px solid var(--line); }
.step b { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-text); }
.step h3 { margin: 10px 0 4px; font-size: 1rem; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }

.course { margin: 40px 0; scroll-margin-top: 16px; }
.tasks { display: grid; gap: 8px; }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.task.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.task-head { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.task-check { width: 20px; height: 20px; flex: none; }
.task-title { flex: 1; }
.task-title em { font-style: normal; color: var(--muted); }
.task-price { font-weight: 700; white-space: nowrap; }
.task-desc { margin: 6px 0 0 32px; color: var(--muted); font-size: .9rem; }
.task-fields { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0 0 32px; }
.task-fields label { display: grid; gap: 2px; font-size: .85rem; color: var(--muted); }
.task-fields input { width: 140px; padding: 6px 9px; }

.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line);
            display: flex; justify-content: center; align-items: center; gap: 20px; padding: 12px 16px;
            transform: translateY(110%); transition: transform .2s; z-index: 10; }
.cart-bar.is-visible { transform: none; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }

/* оформление и оплата */
.checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pay-options { display: grid; gap: 16px; }
.pay-steps { padding-left: 20px; display: grid; gap: 18px; }
.card-number { display: flex; gap: 10px; align-items: center; margin: 8px 0 4px; flex-wrap: wrap; }
.card-number code { font-size: 1.4rem; letter-spacing: .06em; font-weight: 700; }
.amount { font-size: 1.4rem; color: var(--text); }

/* кабинет */
.cab-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.order-head h2 { margin: 0; }
.items { display: grid; gap: 4px; margin-top: 8px; }
.item { border-top: 1px solid var(--line); padding: 12px 0; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.remark { background: var(--warn-bg); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.remark p { margin: 4px 0; }
.remark-answered { background: var(--bg); }
.reply { margin-top: 6px; }
.remark-form { margin-top: 8px; }
.remark-form summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.remark-form form { margin-top: 8px; max-width: 520px; }

.badge { display: inline-block; font-size: .8rem; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); font-weight: 600; }
.badge-paid, .badge-in_work, .badge-payment_check { background: var(--warn-bg); color: var(--warn); }
.badge-done, .badge-ready { background: var(--ok-bg); color: var(--ok); }
.badge-revision, .badge-cancelled { background: var(--err-bg); color: var(--err); }

@media (max-width: 760px) {
  .hero h1 { font-size: 1.7rem; }
  .checkout { grid-template-columns: 1fr; }
  .task-desc, .task-fields { margin-left: 0; }
  .task-fields input { width: 120px; }
}

/* =====================================================================
   v2: продающая главная, методички, выбор кнопками, шаги, оплата
   ===================================================================== */
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--accent); margin: 0; }
.hero { padding: 32px 0 16px; }
.hero h1 { font-size: 2.4rem; max-width: 22ch; margin-top: .3em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.trust li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: .95rem; }
.counter { margin-top: 16px; color: var(--muted); }
.landing section { margin: 56px 0; }
.landing section.hero { margin-top: 0; }
.landing h2 { font-size: 1.6rem; }

.manual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.manual-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; text-decoration: none; color: var(--text); transition: box-shadow .15s, transform .15s; }
.manual-card:hover { box-shadow: 0 8px 24px rgba(16, 24, 40, .1); transform: translateY(-2px); }
.manual-cover { aspect-ratio: 16 / 9; background: var(--bg); }
.manual-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-placeholder { height: 100%; display: grid; place-items: center; padding: 20px; text-align: center;
  background: linear-gradient(135deg, var(--accent), #1b3a8f); color: #fff; font-weight: 700; font-size: 1.15rem; }
.manual-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.manual-body h3 { margin: 0; font-size: 1.15rem; }
.manual-body p { margin: 0; }
.manual-body .btn { margin-top: auto; align-self: flex-start; }
.topics { color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 6px 0; display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.facts b { color: var(--text); }
.price-row { display: grid; gap: 2px; margin: 4px 0 12px; }
.deal { color: var(--ok); font-weight: 600; }
.deal s, s { color: var(--muted); font-weight: 400; }
.cart-note { margin-top: 16px; }

.how-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.how-steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.how-steps b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-text); }
.how-steps h3 { margin: 10px 0 4px; }
.how-steps p { margin: 0; color: var(--muted); }
.inside-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.samples { display: grid; gap: 10px; justify-items: start; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.g-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.g-grid h3 { margin: 0 0 6px; }
.g-grid p { margin: 0; color: var(--muted); }
.final-cta { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 40px 16px; }

/* шаги */
.stepper { list-style: none; padding: 0; margin: 0 0 20px; display: flex; gap: 8px; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: .9rem; }
.stepper b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); flex: none; }
.stepper .is-current { border-color: var(--accent); color: var(--text); }
.stepper .is-current b { background: var(--accent); color: var(--accent-text); }
.stepper .is-done b { background: var(--ok); color: #fff; }

/* страница методички */
.manual-info { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.manual-info h1 { margin-top: 0; }
.small-cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 4; }
.small-cover .cover-placeholder { font-size: 1rem; }
.manual-meta { color: var(--muted); margin-top: -6px; }
.pick { display: grid; gap: 16px; padding-bottom: 80px; }
.pick-block { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 16px; margin: 0; }
.pick-block legend { font-weight: 700; font-size: 1.1rem; padding: 0 6px; display: flex; gap: 12px; align-items: baseline; }
.grid-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.num-btn, .task-chip { position: relative; }
.num-btn input, .task-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.num-btn span { display: grid; place-items: center; height: 48px; border: 1px solid var(--line); border-radius: 10px;
  font-weight: 700; cursor: pointer; user-select: none; background: #fff; transition: background .1s, border-color .1s; }
.num-btn span:hover { border-color: var(--accent); }
.num-btn input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.num-btn input:focus-visible + span, .task-chip input:focus-visible ~ .chip-num { outline: 2px solid var(--accent); outline-offset: 2px; }
.task-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.task-chip { position: relative; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 12px;
  align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; background: #fff; user-select: none; }
.task-chip:hover { border-color: var(--accent); }
.chip-num { grid-row: 1 / 3; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--bg);
  font-weight: 800; font-size: 1.2rem; }
.chip-title { font-size: .92rem; line-height: 1.3; }
.chip-price { font-weight: 700; font-size: .9rem; }
.task-chip:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #f3f6ff; }
.task-chip input:checked ~ .chip-num { background: var(--accent); color: var(--accent-text); }
.cart-bar { justify-content: space-between; max-width: var(--wrap); margin: 0 auto; box-shadow: 0 -6px 20px rgba(16, 24, 40, .06); }
.cart-sum { display: grid; line-height: 1.25; }
.cart-sum b { font-size: 1.2rem; }
.cart-actions { display: flex; gap: 8px; align-items: center; }

/* шаг 2 */
.checkout { grid-template-columns: 3fr 2fr; }
.summary .sum-block { border-bottom: 1px solid var(--line); padding: 10px 0; }
.sum-head { display: flex; justify-content: space-between; gap: 10px; }
.sum-tasks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: .92rem; }
.sum-tasks li { display: flex; justify-content: space-between; gap: 12px; }
.sum-tasks li > span:last-child { white-space: nowrap; }
.sum-total { display: flex; justify-content: space-between; font-size: 1.2rem; padding: 12px 0; }
.more summary { cursor: pointer; color: var(--accent); }
.more textarea { margin-top: 8px; }

/* шаг 3 */
.pay h1 { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.amount { font-size: 1.8rem; font-weight: 800; }
.pay-buttons { display: grid; gap: 10px; max-width: 420px; margin: 16px 0; }
.btn-sbp { background: linear-gradient(90deg, #5b2a86, #1d6fd1 50%, #12a150); display: flex; justify-content: center; align-items: center; gap: 10px; }
.sbp-mark { width: 22px; height: 22px; border-radius: 4px; background: conic-gradient(#ff8a00 0 25%, #12a150 0 50%, #1d6fd1 0 75%, #8e2bc4 0); }
.hint { margin: -2px 0 8px; color: var(--muted); font-size: .88rem; }
.pay-trust { padding-left: 18px; }
.center { text-align: center; }
.spinner { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  margin: 8px auto 12px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-bank .badge { background: var(--warn-bg); color: var(--warn); }

/* кабинет */
.item-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.badge-solving, .badge-review, .badge-manual { background: var(--warn-bg); color: var(--warn); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px;
  vertical-align: middle; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

@media (max-width: 760px) {
  .hero h1 { font-size: 1.75rem; }
  .landing section { margin: 40px 0; }
  .inside-grid, .manual-info { grid-template-columns: 1fr; }
  .small-cover { aspect-ratio: 16 / 7; }
  .stepper span { font-size: .8rem; }
  .stepper li { padding: 8px; gap: 6px; }
  .grid-buttons { grid-template-columns: repeat(6, 1fr); }
  .task-chips { grid-template-columns: 1fr; }
  .cart-bar { padding: 10px 12px; gap: 10px; }
  .cart-actions .btn-ghost { display: none; }
}

/* =====================================================================
   v3: предметы, рост базы, вариант на шаге 2, предпросмотр, перевод по СБП
   ===================================================================== */
.subjects-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.subject-card .cover-placeholder { font-size: 1.35rem; }
.subject-card.is-soon { opacity: .6; }
.growing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; background: linear-gradient(135deg, #f3f6ff, #fff); }
.growing h2 { margin-top: 0; }
.crumbs { margin: -8px 0 12px; color: var(--muted); }
.rgr { font-size: .95rem; color: var(--muted); margin: 14px 0 8px; font-weight: 600; }
.rgr:first-of-type { margin-top: 4px; }
.instant { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 0 7px; }
.variant-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0; display: grid; gap: 10px; }
.variant-block legend { font-weight: 700; padding: 0 6px; }
.variant-input { font-size: 1.6rem; letter-spacing: .35em; font-weight: 700; max-width: 220px; text-align: center; font-variant-numeric: tabular-nums; }
.pay-layout { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; align-items: start; }
.pay-layout .pay { position: sticky; top: 16px; }
.preview-card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.preview-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.preview-pages img { width: 100%; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 14px rgba(16, 24, 40, .08); display: block; }
.copy-row { display: flex; gap: 10px; align-items: center; margin: 6px 0 2px; flex-wrap: wrap; }
.copy-row code { font-size: 1.25rem; font-weight: 700; }
@media (max-width: 760px) {
  .growing, .pay-layout { grid-template-columns: 1fr; }
  .pay-layout .pay { position: static; }
  .variant-input { max-width: 100%; }
}

.chip-num small { display: block; font-size: .55rem; font-weight: 700; letter-spacing: .05em; opacity: .7; line-height: 1; margin-bottom: 2px; }
.chip-num { flex-direction: column; }
.footer-legal { margin-top: 8px; font-size: .8125rem; }
.price-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; }
.price-table td, .price-table th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.price-table td.num { text-align: right; white-space: nowrap; }
.req-list { list-style: none; padding: 0; }
.req-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo img { width: 44px; height: 44px; flex: none; }
.landing .hero { position: relative; }
.hero-logo { float: right; width: 260px; height: 260px; margin: 0 0 16px 24px; }
@media (max-width: 720px) {
  .hero-logo { float: none; display: block; width: 160px; height: 160px; margin: 0 auto 8px; }
  .logo span { font-size: .95rem; }
}
.hero::after { content: ""; display: block; clear: both; }
.pay-alt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.pay-alt .btn { padding-left: 6px; padding-right: 6px; }
.sum-lines { list-style: none; padding: 0; margin: 4px 0 8px; }
.sum-lines li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.promo-box { margin: 8px 0 14px; }
.promo-box summary { cursor: pointer; color: var(--accent, #2457d6); }
.promo-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.promo-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.bonus { color: #b5560b; }
.sum-tasks li.bonus span:last-child { font-weight: 600; }
.ref-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 16px 0; }
.ref-kpi div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.ref-kpi b { font-size: 1.5rem; }
.ref-kpi span { color: var(--muted); font-size: .85rem; }
.promo-open { border: 1.5px dashed var(--accent, #2457d6); border-radius: 12px; padding: 10px 12px; background: #f5f8ff; }
.promo-open .promo-label { width: 100%; font-weight: 600; font-size: .9rem; }
.promo-open input { font-size: 1rem; padding: 10px 12px; }
.promo-row input::placeholder { text-transform: none; }
.preview-slot { position: relative; display: block; min-height: 220px; background: #f3f5f9; border-radius: 8px; }
.preview-slot .preview-wait { display: none; }
.preview-slot.is-loading .preview-wait { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center;
  gap: 10px; color: var(--muted); font-size: .9rem; }
.preview-slot.is-loading .preview-wait::before { content: ""; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid #cfd8ea; border-top-color: var(--accent, #2457d6); animation: spin 0.9s linear infinite; }
.preview-slot.is-loading img { opacity: 0; }
.preview-slot.is-failed { min-height: 0; }
.preview-slot.is-failed img { display: none; }
.pay-hold { display: flex; gap: 10px; align-items: flex-start; background: #fff7e6; border: 1px solid #f3d38b;
  border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: .9rem; }
.pay-hold[hidden] { display: none; }
.spinner { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 3px solid #f3d38b;
  border-top-color: #c27c0e; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
button.is-waiting, .btn.is-waiting { opacity: .45; cursor: wait; }
.file-drop input[type=file] { padding: 10px; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff; }
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 50; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 16px; padding: 20px; max-width: 460px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box h2 { margin-top: 0; font-size: 1.2rem; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.modal-actions .btn { flex: 1 1 160px; }
.price-banner { display: flex; gap: 10px; align-items: flex-start; background: #eef6ff; border: 1px solid #c9dcfb;
  border-radius: 14px; padding: 12px 14px; margin: 12px 0 16px; font-size: .95rem; }
.price-banner.is-hot { background: #fff4ec; border-color: #f7c9a6; }
.price-banner .pb-icon { font-size: 1.3rem; line-height: 1; }
.price-banner .pb-left { font-weight: 600; }
.price-next { display: block; font-weight: 400; color: #b5560b; font-size: .75rem; }
.chip-price small.price-next { margin-top: 2px; }
.services-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: linear-gradient(135deg, #f3f7ff, #fff8f1); border: 1px solid #dbe5f7; }
.services-card h2 { margin: 0 0 6px; font-size: 1.15rem; }
.services-card p { margin: 0 0 10px; color: var(--muted); }
.services-card .sc-text { flex: 1 1 380px; }
.sc-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-link { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  text-decoration: none; color: var(--text); font-size: .9rem; }
.chip-link:hover { border-color: var(--accent, #2457d6); }
.kind-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kind-pick legend { font-weight: 500; margin-bottom: 6px; }
.kind-chip { display: inline-flex !important; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; font-weight: 400 !important; }
.kind-chip input { margin: 0; }
.kind-chip:has(input:checked) { border-color: var(--accent, #2457d6); background: #eef3ff; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
.narrow-wide { max-width: 720px; margin: 0 auto; }
.form .kind-pick label.kind-chip { display: inline-flex !important; width: auto; white-space: nowrap; padding: 8px 14px; gap: 8px; }
.form .kind-pick label.kind-chip input { width: auto; }

/* переписка в MAX */
.btn-max { background: #6a3df0; color: #fff; }
.btn-max:hover { background: #5428d6; color: #fff; }
.order-head .order-chat { margin-left: auto; }
.max-offer { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); background: #f1ecff; display: flex;
  gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.max-offer p { margin: 0; }
.max-go .code { font-family: ui-monospace, monospace; background: var(--bg); padding: 1px 6px; border-radius: 4px; }
