/* БотКрафт — redesigned layout & visual system (functional markup/IDs unchanged).
   Palette: #FED18B #ECB45B #C98C46 #192B35 #001820 */

:root {
  color-scheme: light only;
  --gold-light: #FED18B;
  --gold: #ECB45B;
  --bronze: #C98C46;
  --slate: #192B35;
  --navy: #001820;

  --bg: #FAF3E7;
  --surface: #FFFFFF;
  --surface-warm: #FDF8EF;
  --ink: #192B35;
  --muted: #647580;
  --line: #EADFCB;
  --line-strong: #D9C9A9;

  --on-dark: #F8EDD8;
  --on-dark-muted: rgba(248, 237, 216, 0.64);
  --dark-line: rgba(254, 209, 139, 0.16);

  --ok: #3E7C4F;
  --ok-bg: #EDF6EE;
  --ok-line: #CBE3D0;
  --err: #A63A2E;
  --err-bg: #FBEFEC;
  --err-line: #F0D3CC;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(25, 43, 53, 0.08);
  --shadow-gold: 0 10px 26px rgba(201, 140, 70, 0.32);
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "PT Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }
h1, h2, h3 { line-height: 1.16; margin: 0 0 12px; letter-spacing: -0.02em; }
h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; }
h2 { font-size: clamp(23px, 3vw, 30px); font-weight: 800; }
h3 { font-size: 17.5px; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: var(--bronze); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: rgba(25, 43, 53, 0.07); border-radius: 6px; padding: 1.5px 7px;
  font-size: 0.9em; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--slate);
}
.muted { color: var(--muted); }
.req { color: var(--err); }
section { scroll-margin-top: 84px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 1.5px solid transparent; cursor: pointer;
  border-radius: 999px; padding: 11px 22px; font-size: 15px; font-weight: 700;
  font-family: inherit; letter-spacing: 0.01em;
  text-align: center; text-decoration: none;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s, transform 0.16s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--navy); box-shadow: var(--shadow-gold); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy); }
.btn-outline { background: transparent; color: var(--bronze); border-color: var(--bronze); }
.btn-outline:hover { background: rgba(201, 140, 70, 0.1); color: var(--bronze); }
.btn-ghostlight { background: transparent; color: var(--gold-light); border-color: rgba(254, 209, 139, 0.4); }
.btn-ghostlight:hover { background: rgba(254, 209, 139, 0.1); color: var(--gold-light); }
.btn-dashed { background: transparent; color: var(--bronze); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); }
.btn-dashed:hover { background: rgba(236, 180, 91, 0.12); }
.btn-lg { padding: 15px 30px; font-size: 16.5px; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(0, 24, 32, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dark-line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo:hover { text-decoration: none; }
.logo-mark { display: block; flex-shrink: 0; }
.logo-text { font-weight: 800; font-size: 20px; color: var(--on-dark); letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 9px; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--on-dark-muted); font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--gold-light); text-decoration: none; }
.site-nav .nav-cta { color: var(--navy); }
.site-nav .nav-cta:hover { color: var(--navy); }

/* mobile menu (no JS: details/summary) */
.nav-drop { display: none; position: relative; }
.nav-drop summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--dark-line); }
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-burger { display: flex; flex-direction: column; gap: 5px; }
.nav-burger i { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--gold-light); transition: transform 0.15s; }
.nav-drop[open] .nav-burger i:first-child { transform: translateY(7px) rotate(45deg); }
.nav-drop[open] .nav-burger i:nth-child(2) { opacity: 0; }
.nav-drop[open] .nav-burger i:last-child { transform: translateY(-7px) rotate(-45deg); }
.nav-drop-panel {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px;
  background: var(--navy); border: 1px solid var(--dark-line); border-radius: 16px;
  padding: 12px; display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.nav-drop-panel a { color: var(--on-dark); font-weight: 600; padding: 10px 12px; border-radius: 10px; }
.nav-drop-panel a:hover { background: rgba(254, 209, 139, 0.1); text-decoration: none; }
.nav-drop-panel .btn { margin-top: 8px; color: var(--navy); }

/* ---------- Hero (dark band) ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  background:
    radial-gradient(60% 90% at 85% 0%, rgba(201, 140, 70, 0.28) 0%, rgba(201, 140, 70, 0) 60%),
    linear-gradient(160deg, var(--slate) 0%, var(--navy) 55%, #000D13 100%);
  border-bottom: 1px solid var(--dark-line);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-glow {
  position: absolute; width: 520px; height: 520px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 180, 91, 0.22) 0%, rgba(236, 180, 91, 0) 65%);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1fr; justify-items: center;
  gap: 44px; text-align: center;
  padding: clamp(52px, 8vw, 96px) 22px clamp(46px, 6vw, 80px);
}
.hero h1 { color: #FFFFFF; font-size: clamp(28px, 4.6vw, 52px); overflow-wrap: anywhere; }
.hero h1 em { font-style: normal; color: transparent;
  background: linear-gradient(100deg, var(--gold-light) 10%, var(--gold) 55%, var(--bronze) 100%);
  -webkit-background-clip: text; background-clip: text; }
.hero-kicker {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex-wrap: wrap;
  max-width: 100%; margin-bottom: 18px;
  border: 1px solid var(--dark-line); background: rgba(254, 209, 139, 0.07);
  color: var(--gold-light); border-radius: 999px; padding: 7px 16px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--on-dark-muted); max-width: 56ch; margin-left: auto; margin-right: auto; }
.hero-actions { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Strip (что внутри архива) ---------- */
.strip { background: var(--slate); border-bottom: 1px solid var(--dark-line); }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 20px 22px; }
.strip-item { display: flex; flex-direction: column; gap: 2px; }
.strip-item b { color: var(--gold-light); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 14.5px; }
.strip-item span { color: var(--on-dark-muted); font-size: 12.5px; }

.hero-flow {
  display: flex; flex-direction: row; align-items: stretch; gap: 10px;
  width: 100%; max-width: 860px;
  background: rgba(0, 24, 32, 0.45); border: 1px solid var(--dark-line);
  border-radius: 22px; padding: 20px; backdrop-filter: blur(6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.flow-node {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; flex: 1; text-align: center;
  background: linear-gradient(180deg, rgba(25, 43, 53, 0.9), rgba(13, 30, 38, 0.9));
  border: 1px solid var(--dark-line); border-radius: 16px; padding: 20px 14px;
}
.flow-ic { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px; background: rgba(254, 209, 139, 0.1); color: var(--gold-light); }
.flow-label { font-weight: 700; font-size: 15.5px; color: var(--on-dark); }
.flow-node small { display: block; font-weight: 400; font-size: 12.5px; color: var(--on-dark-muted); }
.flow-node-accent { border-color: rgba(236, 180, 91, 0.5); }
.flow-node-accent .flow-ic { background: linear-gradient(140deg, var(--gold-light), var(--bronze)); color: var(--navy); }
.flow-line { width: 30px; height: 2px; align-self: center; flex-shrink: 0;
  background: linear-gradient(90deg, var(--gold), transparent 95%); }

/* ---------- Section heads ---------- */
.section-head { margin-bottom: 8px; text-align: center; }
.section-sub { margin-top: -4px; }
.section-kicker {
  display: inline-block; margin-bottom: 10px; color: var(--bronze);
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
}
.section-kicker::after { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px;
  margin: 10px auto 0; background: linear-gradient(90deg, var(--gold-light), var(--bronze)); }

/* ---------- Тарифы ---------- */
.tariffs { padding: 58px 0 8px; }
.tariffs, .how { scroll-margin-top: 74px; }
.tariff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; align-items: stretch; }
.tariff-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 64px 26px 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
}
.tariff-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(25, 43, 53, 0.12); }.tariff-badge {
  position: absolute; top: 16px; right: 16px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--navy);
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em;
  border-radius: 999px; padding: 5px 13px; box-shadow: 0 4px 12px rgba(201, 140, 70, 0.35);
}
.tariff-badge-pro { background: var(--slate); color: var(--gold-light); box-shadow: none; }
.tariff-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tariff-head h3 { margin: 0; font-size: 18.5px; flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.tariff-price { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; color: var(--slate); margin: 10px 0 2px; flex-shrink: 0; white-space: nowrap; }
.tariff-currency { font-size: 22px; font-weight: 700; color: var(--bronze); }
.tariff-tagline { color: var(--muted); font-size: 14.5px; min-height: 44px; }
.tariff-features { list-style: none; padding: 0; margin: 16px 0 22px; flex-grow: 1;
  border-top: 1px solid var(--line); padding-top: 16px; }
.tariff-features li { position: relative; padding-left: 28px; margin-bottom: 10px; font-size: 14.5px; }
.tariff-features li::before {
  content: "✓"; position: absolute; left: 0; top: -1px; width: 19px; height: 19px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy); background: var(--gold); font-weight: 800; font-size: 12px; border-radius: 50%;
}
/* featured (dark) card */
.tariff-featured {
  background: linear-gradient(165deg, var(--slate), var(--navy));
  border-color: rgba(236, 180, 91, 0.35);
  box-shadow: 0 22px 50px rgba(0, 24, 32, 0.3);
}
.tariff-featured h3 { color: #fff; }
.tariff-featured .tariff-price { color: var(--gold-light); }
.tariff-featured .tariff-currency { color: var(--gold); }
.tariff-featured .tariff-tagline { color: var(--on-dark-muted); }
.tariff-featured .tariff-features { border-top-color: var(--dark-line); }
.tariff-featured .tariff-features li { color: var(--on-dark); }
.tariff-featured:hover { box-shadow: 0 26px 60px rgba(0, 24, 32, 0.42); }
@media (min-width: 981px) {
  .tariff-featured { transform: scale(1.035); }
  .tariff-featured:hover { transform: scale(1.035) translateY(-4px); }
}

/* ---------- Как это работает ---------- */
.how { padding: 54px 0 76px; }
.how-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.how-steps li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow); position: relative;
}
.step-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.step-top h3 { margin: 0; font-size: 17px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(145deg, var(--gold-light), var(--gold)); color: var(--navy);
  font-weight: 800; font-size: 18px; box-shadow: var(--shadow-gold); transform: rotate(-6deg);
}

.how-steps p { font-size: 14.5px; }

/* ---------- Форма заказа ---------- */
.order-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 28px; padding: 40px 0 66px; }
.order-layout-single { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin-inline: auto; }
.order-form-wrap { min-width: 0; }
.order-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.back-link { color: var(--muted); font-weight: 600; }
.back-link:hover { color: var(--bronze); text-decoration: none; }
.order-chip {
  background: rgba(25, 43, 53, 0.06); border: 1px solid var(--line); color: var(--slate);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.04em;
}
fieldset {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 22px 24px; margin: 0 0 20px; box-shadow: var(--shadow); min-width: 0;
}
legend { font-weight: 800; padding: 0 10px; display: flex; align-items: center; gap: 9px; font-size: 15.5px; }
.legend-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--slate); color: var(--gold-light);
  font-size: 13px; font-weight: 800;
}
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field-hint.center { text-align: center; margin-top: 12px; }
input[type="text"], textarea {
  width: 100%; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-warm);
  padding: 11px 14px; font-size: 16px; color: var(--ink); font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input::placeholder, textarea::placeholder { color: rgba(25, 43, 53, 0.36); }
input:focus, textarea:focus {
  outline: none; border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 4px rgba(236, 180, 91, 0.22);
}
textarea { resize: vertical; }
.command-row {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1.4fr) 44px; gap: 8px;
  margin-bottom: 10px; align-items: start;
}
.command-row .remove-cmd {
  border: none; background: transparent; color: var(--err); font-size: 22px;
  cursor: pointer; line-height: 1; padding: 9px 4px; min-height: 44px;
}
.check-field { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin: 4px 0 18px; }
.check-field input { margin-top: 3px; width: auto; accent-color: var(--bronze); }
.alert { border-radius: var(--radius-sm); padding: 13px 17px; margin-bottom: 16px; font-size: 14.5px; }
.alert-error { background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err); }

/* ---------- ИИ-помощник ---------- */
.assistant {
  position: sticky; top: 90px; align-self: start;
  background: linear-gradient(180deg, var(--slate) 0%, var(--navy) 100%);
  border: 1px solid rgba(236, 180, 91, 0.35); border-radius: var(--radius); padding: 22px;
  box-shadow: 0 22px 50px rgba(0, 24, 32, 0.35); color: var(--on-dark);
}
.assistant h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; color: var(--gold-light); }
.assistant .muted { color: var(--on-dark-muted); font-size: 13.5px; }
.assistant-disabled { opacity: 0.85; }
.assistant-messages {
  height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  background: rgba(0, 12, 18, 0.55); border: 1px solid var(--dark-line); border-radius: 14px; padding: 14px;
  margin-bottom: 12px;
}
.msg { max-width: 88%; padding: 9px 13px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.msg-user { align-self: flex-end; background: linear-gradient(145deg, var(--gold-light), var(--gold)); color: var(--navy); border-bottom-right-radius: 4px; font-weight: 600; }
.msg-assistant { align-self: flex-start; background: rgba(254, 209, 139, 0.1); border: 1px solid var(--dark-line); color: var(--on-dark); border-bottom-left-radius: 4px; }
.msg-error { align-self: center; background: var(--err-bg); color: var(--err); font-size: 13px; border-radius: 10px; }
.msg-typing { align-self: flex-start; color: var(--on-dark-muted); font-size: 13px; }
.assistant-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border: 1px solid rgba(236, 180, 91, 0.4); background: rgba(254, 209, 139, 0.06); color: var(--gold-light);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-family: inherit; cursor: pointer; transition: background 0.15s;
}
.chip:hover { background: rgba(254, 209, 139, 0.16); }
.assistant-input { display: flex; gap: 8px; }
.assistant-input input { flex: 1; background: rgba(255, 255, 255, 0.06); border-color: var(--dark-line); color: var(--on-dark); }
.assistant-input input::placeholder { color: var(--on-dark-muted); }
.assistant-input input:focus { background: rgba(255, 255, 255, 0.1); border-color: var(--gold); }
.assistant-input .btn { padding: 10px 16px; }

/* ---------- Статус оплаты / результат ---------- */
.result { display: flex; justify-content: center; padding: 66px 0 86px; }
.result-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); padding: clamp(28px, 5vw, 46px) clamp(22px, 5vw, 44px);
  max-width: 640px; width: 100%; text-align: center;
}
.result-card h1 { font-size: clamp(24px, 3.4vw, 30px); }
.result-success { border-top: 6px solid var(--ok); }
.result-fail { border-top: 6px solid var(--err); }
.result-next {
  text-align: left; background: var(--surface-warm); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 22px; margin: 24px 0 10px;
}
.result-next h2 { font-size: 17px; }
.result-next ul { margin: 8px 0 0; padding-left: 20px; }
.result-next li { margin-bottom: 6px; font-size: 14px; }
.spinner {
  width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Юридические страницы ---------- */
.legal { max-width: 820px; margin-inline: auto; padding: 44px 0 76px; overflow-wrap: anywhere; }
.legal h1 { font-size: clamp(24px, 3.4vw, 30px); }
.legal h2 { font-size: 18px; margin-top: 28px; }
.legal p { text-align: justify; }

/* ---------- Футер ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--slate) 0%, var(--navy) 100%);
  color: var(--on-dark); border-top: 1px solid var(--dark-line); margin-top: 10px;
}
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 40px; padding: 40px 22px 14px; }
.footer-brand { max-width: 400px; }
.footer-brand .logo-text { color: var(--gold-light); margin-bottom: 10px; }
.logo-mark-sm { transform: translateY(2px); }
.footer-tag { color: var(--on-dark-muted); font-size: 14px; }
.footer-contact { font-size: 14px; color: var(--on-dark-muted); }
.footer-contact a { color: var(--gold-light); }
.footer-nav { display: flex; flex-direction: column; gap: 9px; }
.footer-nav a { color: var(--on-dark-muted); font-size: 14px; }
.footer-nav a:hover { color: var(--gold-light); text-decoration: none; }
.footer-steps { display: flex; align-items: center; gap: 12px; align-self: center;
  border: 1px solid var(--dark-line); border-radius: 999px; padding: 12px 20px; }
.footer-steps span { font-size: 13px; font-weight: 700; color: var(--on-dark); }
.footer-steps b { color: var(--gold); }
.footer-note { padding: 10px 22px 30px; font-size: 13px; color: var(--on-dark-muted);
  border-top: 1px solid var(--dark-line); }
.footer-note p { margin: 0; }
.footer-note a { color: var(--gold-light); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .footer-inner { grid-template-columns: 1.2fr 1fr; }
  .footer-steps { display: none; }
}
@media (max-width: 980px) {
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .tariff-grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .order-layout { grid-template-columns: 1fr; }
  .assistant { position: static; }
  .how-steps { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-drop { display: block; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-inner { height: 62px; }
  .hero-inner { padding: 42px 0 40px; }
  .hero h1 br { display: none; }
  .hero-kicker { font-size: 11px; letter-spacing: 0.08em; padding: 6px 12px; }
  .hero-flow { padding: 16px; }
  .flow-node { padding: 16px 12px; }
  .hero-actions .btn { flex: 1; }
  .hero-stats { flex-wrap: wrap; gap: 14px 0; }
  .stat { padding-right: 18px; margin-right: 18px; }
  .hero-flow { flex-direction: column; }
  .flow-line { width: 2px; height: 18px; align-self: center;
    background: linear-gradient(180deg, var(--gold), transparent 90%); }
  .strip-inner { grid-template-columns: 1fr; gap: 12px; padding: 18px 16px; }
  .hero-stats { display: none; }
  .tariffs { padding-top: 44px; }
  .how { padding-bottom: 56px; }
  .command-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .command-row input:first-child { grid-column: 1; grid-row: 1; }
  .command-row input:nth-child(2), .command-row textarea { grid-column: 1 / -1; }
  .command-row .remove-cmd { grid-column: 2; grid-row: 1; justify-self: stretch; }
  .legal p { text-align: left; }
  fieldset { padding: 18px 16px; }
  h1 { font-size: 27px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .result { padding: 40px 0 60px; }
}
@media (max-width: 380px) {
  .logo-text { font-size: 17px; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .tariff-card:hover { transform: none; }
  .spinner { animation-duration: 1.8s; }
}

/* --- Обратная связь: кнопка-ссылка и модальное окно --- */
.link-btn {
  background: none; border: none; padding: 0; font: inherit; color: var(--bronze);
  cursor: pointer; border-bottom: 1px dashed var(--line-strong);
}
.link-btn:hover { color: var(--gold); text-decoration: none; }

.alert-success {
  background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: 14.5px;
}

.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 24, 32, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  position: relative; width: 100%; max-width: 520px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 26px 22px; max-height: 90vh; overflow-y: auto;
}
.modal h2 { font-size: 22px; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface-warm);
  color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--ink); border-color: var(--line-strong); }
body.modal-open { overflow: hidden; }
@media (max-width: 560px) {
  .modal { padding: 20px 18px; }
}

/* Атрибут hidden обязан побеждать любые display из классов
   (иначе модалка с display:flex видна даже при hidden). */
[hidden] { display: none !important; }

/* --- Пояснение про токен бота в форме заказа --- */
.token-note {
  background: var(--surface-warm); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 18px;
  font-size: 14px; color: var(--ink); line-height: 1.5;
}
.token-note b { color: var(--slate); }
