/* ============================================================
   GradeAI — промо-лендинг (gradeai.ru/promo/)
   Brand: navy #054274 · green #46B76B · white
   Type:  Unbounded (display) · Golos Text (body)
   ============================================================ */

:root {
  --navy:      #054274;
  --navy-700:  #0a4f88;
  --navy-900:  #042d4f;
  --green:     #46B76B;
  --green-600: #36a35b;
  --green-100: #e4f4ea;
  --ink:       #16242f;
  --muted:     #5d7180;
  --line:      #dfe3e0;
  --paper:     #f5f4ef;
  --card:      #ffffff;

  /* semantic text tokens — flip in dark mode */
  --heading:   #054274;   /* headings & text-accent (was hardcoded var(--navy)) */
  --body:      #3a4c5a;   /* soft body copy — softer than --ink, darker than --muted */
  --warn:      #c2410c;
  --warn-bg:   #fdf2ec;
  --surface-2: #fbfbf9;   /* zebra rows / inset bg */
  --field-bg:  var(--paper);
  --info-bg:   #eaf1f8;
  --info-bd:   #cfe0f0;
  --dots:      rgba(5,66,116,.05);
  --topbar-bg: rgba(245,244,239,.85);

  --r:    18px;
  --r-sm: 12px;
  --shadow:    0 1px 2px rgba(5,66,116,.06), 0 12px 28px -12px rgba(5,66,116,.18);
  --shadow-lg: 0 30px 70px -30px rgba(5,66,116,.45);

  --font-disp: "Unbounded", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, sans-serif;

  color-scheme: light;
}

/* ============================================================
   DARK THEME — brand "night-navy". Driven by [data-theme]; the
   no-JS @media block below mirrors it for prefers-color-scheme.
   ============================================================ */
:root[data-theme="dark"] {
  --navy:      #3f86c7;   /* brand brightened so surfaces/borders read on dark */
  --navy-700:  #4f93d0;
  --navy-900:  #0a2030;
  --green:     #46B76B;
  --green-600: #5cc77f;
  --green-100: rgba(70,183,107,.16);
  --ink:       #e8eef2;
  --muted:     #93a7b4;
  --line:      #243845;
  --paper:     #0c1a26;
  --card:      #14242f;

  --heading:   #e8eef2;
  --body:      #c4d2db;
  --warn:      #f6a86a;
  --warn-bg:   rgba(246,138,60,.12);
  --surface-2: rgba(255,255,255,.03);
  --field-bg:  #0f1f2b;
  --info-bg:   rgba(63,134,199,.14);
  --info-bd:   rgba(63,134,199,.32);
  --dots:      rgba(255,255,255,.035);
  --topbar-bg: rgba(12,26,38,.85);
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 12px 28px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 70px -30px rgba(0,0,0,.8);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #3f86c7; --navy-700: #4f93d0; --navy-900: #0a2030;
    --green: #46B76B; --green-600: #5cc77f; --green-100: rgba(70,183,107,.16);
    --ink: #e8eef2; --muted: #93a7b4; --line: #243845;
    --paper: #0c1a26; --card: #14242f;
    --heading: #e8eef2; --body: #c4d2db; --warn: #f6a86a; --warn-bg: rgba(246,138,60,.12);
    --surface-2: rgba(255,255,255,.03); --field-bg: #0f1f2b;
    --info-bg: rgba(63,134,199,.14); --info-bd: rgba(63,134,199,.32);
    --dots: rgba(255,255,255,.035); --topbar-bg: rgba(12,26,38,.85);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 28px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 30px 70px -30px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(circle at 1px 1px, var(--dots) 1px, transparent 0);
  background-size: 22px 22px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-disp);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0;
}
h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: clamp(24px, 3.4vw, 36px); }
p  { margin: 0; }
::selection { background: var(--green); color: #04261a; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; }
.accent { color: var(--green); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm  { padding: 9px 16px; font-size: 14px; }
.btn-lg  { padding: 15px 28px; font-size: 16px; }
/* full-width buttons carry long RU labels — let them wrap instead of
   overflowing their box (which caused horizontal page scroll on phones) */
.btn-block { display: flex; width: 100%; white-space: normal; }
.btn-primary { background: var(--green); color: #06351f; }
.btn-primary:hover { background: var(--green-600); color:#fff; box-shadow: 0 12px 26px -12px rgba(70,183,107,.8); }
.btn-ghost { background: transparent; color: var(--heading); border-color: rgba(5,66,116,.25); }
.btn-ghost:hover { border-color: var(--heading); background: rgba(5,66,116,.04); }
.btn-ghost-light { color:#fff; border-color: rgba(255,255,255,.5); }
.btn-ghost-light:hover { border-color:#fff; background: rgba(255,255,255,.1); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 22px; height: 70px; }
.topbar .spacer { flex: 1; }
.brand img { height: 46px; width: auto; display: block; }
.navlink { font-size: 15px; color: var(--muted); font-weight: 500; }
.navlink:hover { color: var(--heading); }
.nav-desktop { display: flex; align-items: center; gap: 22px; }
.login-btn { white-space: nowrap; }
.theme-slot { display: inline-flex; }

/* burger (mobile only) */
.burger {
  display: none; width: 42px; height: 42px; flex: none; padding: 0;
  background: transparent; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--heading); transition: transform .25s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* slide-in mobile side panel */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(5,20,35,.5);
  opacity: 0; transition: opacity .25s ease;
}
.nav-backdrop.show { opacity: 1; }
.mobile-nav {
  position: fixed; top: 0; right: 0; z-index: 80; height: 100%;
  width: min(82vw, 320px);
  background: var(--card); border-left: 1px solid var(--line);
  box-shadow: -16px 0 40px -20px rgba(0,0,0,.45);
  transform: translateX(100%); transition: transform .28s ease;
  display: flex; flex-direction: column; padding: 16px 18px 24px; overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; height: 54px; margin-bottom: 6px; }
.mnav-title { font-family: var(--font-disp); font-weight: 700; color: var(--heading); font-size: 17px; }
.mnav-close {
  width: 38px; height: 38px; border-radius: 10px; flex: none; padding: 0;
  background: transparent; border: 1.5px solid var(--line); color: var(--heading);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.mnav-close:hover { border-color: var(--navy); }
.mnav-links { display: flex; flex-direction: column; }
.mnav-links .navlink { font-size: 16px; padding: 13px 6px; border-bottom: 1px solid var(--line); }
.mnav-theme { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 14px 6px 0; }
.mnav-theme-label { font-size: 14px; color: var(--muted); font-weight: 500; }

/* lock background scroll while the panel is open */
html.nav-open, body.nav-open { overflow: hidden; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 56px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; color: var(--heading);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; margin-bottom: 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero .lead { font-size: 18px; color: var(--body); margin: 20px 0 28px; max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-center { justify-content: center; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 26px 0 0; }
.trust-row li { font-size: 14px; font-weight: 600; color: var(--heading); }

/* hero visual mock */
.hero-visual { position: relative; }
.mock {
  background: var(--navy); border-radius: var(--r); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-bar { display: flex; gap: 7px; padding: 13px 16px; background: var(--navy-900); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.25); }
.mock-body { display: grid; grid-template-columns: 56px 1fr; min-height: 290px; }
.mock-side { background: var(--navy-900); padding: 16px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ms-logo { font-family: var(--font-disp); font-weight: 800; color: var(--green); font-size: 16px; }
.ms-item { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.12); }
.ms-item.active { background: var(--green); }
.mock-main { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.bubble { border-radius: 12px; padding: 12px 14px; font-size: 13px; max-width: 90%; }
.bubble.user { align-self: flex-end; background: var(--green); color: #06351f; font-weight: 600; }
.bubble.ai { background: rgba(255,255,255,.1); color: #fff; display: flex; flex-direction: column; gap: 7px; }
.ai-tag { font-size: 11px; font-weight: 700; color: var(--green); letter-spacing: .02em; }
.ln { height: 7px; border-radius: 4px; background: rgba(255,255,255,.28); }
.ln.w90 { width: 90%; } .ln.w80 { width: 80%; } .ln.w70 { width: 70%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chips span { font-size: 11px; color: #cfe0ee; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 3px 9px; }
.float-card {
  position: absolute; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 600;
  color: var(--heading); box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 8px;
}
.float-card .fc-ic { width: 16px; height: 16px; color: var(--green-600); flex: none; }
.fc-1 { top: 8%; left: -22px; }
.fc-2 { bottom: 10%; right: -18px; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.tag {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--green-600);
  background: var(--green-100); border-radius: 999px; padding: 6px 14px; margin-bottom: 16px;
}
.tag-light { background: rgba(255,255,255,.18); color: #d7f0e0; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* ---------- pains ---------- */
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ps-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.section-alt .ps-card { background: var(--paper); }
.ps-bad { font-weight: 600; color: var(--heading); font-size: 15.5px; }
.ps-arrow { color: var(--green); font-weight: 800; font-size: 20px; margin: 8px 0; }
.ps-good { color: var(--body); font-size: 14.5px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding-top: 12px; }
.step-n {
  width: 46px; height: 46px; border-radius: 14px; background: var(--navy); color: #fff;
  font-family: var(--font-disp); font-weight: 700; font-size: 20px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.step h3 { font-size: 19px; color: var(--heading); margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- advantages ---------- */
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.adv { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .2s ease; }
.adv:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
/* icon badge — brand line-icons (replaces emoji); navy tint mirrors the step
   numbers and keeps green reserved as the action colour. Same badge concept as
   gptpromo's iris icons → shared iconography, per-page accent. */
.adv-i, .agent-i {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--heading); background: var(--info-bg); border: 1px solid var(--info-bd);
}
.adv-i svg { width: 24px; height: 24px; }
.agent-i svg { width: 25px; height: 25px; }
.adv h3 { font-size: 17px; color: var(--heading); margin: 12px 0 7px; }
.adv p { color: var(--muted); font-size: 14.5px; }

/* ---------- models ---------- */
.models-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.model { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.section-alt .model { background: var(--paper); }
.model b { color: var(--heading); font-size: 15.5px; }
.model span { color: var(--muted); font-size: 13.5px; }
.models-note { text-align: center; color: var(--muted); margin-top: 22px; font-size: 15px; }

/* ---------- agents ---------- */
.agents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.agent { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: var(--shadow); }
.agent h3 { font-size: 19px; color: var(--heading); margin: 14px 0 8px; }
.agent p { color: var(--muted); font-size: 15px; }

/* ---------- offer + form ---------- */
.offer { background: linear-gradient(135deg, var(--navy), var(--navy-900)); color: #fff; border: none; }
.offer-grid { display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center; }
.offer-copy h2 { color: #fff; margin-bottom: 14px; }
.offer-copy p { color: #cfe0ee; font-size: 17px; }
.offer-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.offer-list li { font-weight: 600; font-size: 15px; }

.form-card { background: var(--card); color: var(--ink); border-radius: var(--r); padding: 28px; box-shadow: var(--shadow-lg); }
.form-title { font-size: 21px; color: var(--heading); margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.field-hint { display: block; margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.field .opt { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); transition: border-color .15s ease, box-shadow .15s ease;
}
.field select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23054274' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-100); }
.field input.invalid, .field textarea.invalid { border-color: #d94848; box-shadow: 0 0 0 3px #fbe3e3; }
.field-err { display: block; margin-top: 5px; font-size: 12.5px; font-weight: 600; color: #d94848; }
/* consent checkbox (152-ФЗ) — required before any form submits */
.consent {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 9px;
  margin: 4px 0 14px; font-size: 12.5px; line-height: 1.45;
  color: var(--muted); text-align: left; cursor: pointer;
}
.consent input { flex: none; width: 17px; height: 17px; margin-top: 1px; accent-color: var(--green); cursor: pointer; }
.consent span { flex: 1; min-width: 0; }
.consent a { color: var(--green-600); }
.consent input.invalid { outline: 2px solid #d94848; outline-offset: 1px; border-radius: 4px; }
.consent .field-err { flex-basis: 100%; margin-top: 2px; }
.form-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; text-align: center; }
.form-note a { color: var(--green-600); }
.form-msg { margin-top: 14px; font-size: 14px; font-weight: 600; text-align: center; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { color: var(--green-600); }
.form-msg.err { color: #d94848; }
/* register button follows the unified green primary (action = green) */

/* ---------- tariffs ---------- */
/* Horizontal carousel: 4 cards visible, the rest reachable via the arrows /
   swipe. Flex row keeps the cards in one equal-height band (default stretch),
   scroll-snap aligns each card edge to the viewport. Native scrollbar hidden —
   the arrow controls (.tcar-nav) drive it. */
.tariffs {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 18px 4px 16px; margin: 0 -4px;
  scrollbar-width: none;
}
.tariffs::-webkit-scrollbar { display: none; }
.tariff {
  flex: 0 0 calc((100% - 48px) / 4); /* 4 visible; 3 gaps × 16px = 48px */
  scroll-snap-align: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px; display: flex; flex-direction: column; min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tariff:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cdd6d0; }
.tariff h3 { font-size: 18px; color: var(--heading); }
.tariff .price { font-family: var(--font-disp); font-weight: 700; font-size: 24px; color: var(--heading); margin: 12px 0; }
.tariff .price span { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-weight: 500; }
.tariff p { color: var(--muted); font-size: 14px; flex: 1; margin-bottom: 16px; }
.tariff-accent { background: var(--card); border: 2px solid var(--green); box-shadow: var(--shadow); position: relative; }
.tariff-accent:hover { box-shadow: var(--shadow-lg); border-color: var(--green); }
.tariff-accent .price { color: var(--green-600); }
.tariff-badge {
  display: inline-block; align-self: flex-start;
  font-size: 11.5px; font-weight: 700; color: #06351f;
  background: var(--green); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.tariff-badge-soft { background: var(--green-100); color: var(--green-600); }
.tariff-accent .tariff-badge { position: absolute; top: -13px; right: 20px; margin: 0; }

/* billing period segmented toggle */
.bill-toggle {
  display: flex; width: max-content; gap: 4px; margin: 0 auto 32px; padding: 5px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}
.bill-toggle button {
  font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--muted);
  border: none; background: transparent; cursor: pointer;
  padding: 9px 20px; border-radius: 999px; transition: background .15s ease, color .15s ease;
}
.bill-toggle button b { color: var(--green-600); }
.bill-toggle button.on { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.bill-toggle button.on b { color: #9ff0bd; }
/* control bar: billing toggle centered, carousel arrows pinned right */
.tariffs-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 4px; }
#tariffs .tariffs-bar .bill-toggle { grid-column: 2; margin: 0; }
.tcar-nav { grid-column: 3; justify-self: end; display: flex; gap: 8px; }
.tcar-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--heading);
  font-family: var(--font-disp); font-size: 22px; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow); transition: background .15s ease, color .15s ease, transform .15s ease, opacity .15s ease;
}
.tcar-btn:hover { background: var(--navy); color: #fff; }
.tcar-btn:active { transform: scale(.94); }
.tcar-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.tcar-btn:disabled:hover { background: var(--card); color: var(--heading); }
.tariffs + .models-note { margin-top: 24px; }

/* single-price presentation + annual savings */
/* NB: selectors are .tariff .price .X (3 classes) so they out-specify the
   generic ".tariff .price span" rule above (which otherwise forces every span
   to 14px — that bug made the price digits tiny and smaller than the ₽). */
.tariff .price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px; text-align: center; min-height: 34px; }
.tariff .price .price-num { font-family: var(--font-disp); font-weight: 700; font-size: 30px; line-height: 1; color: var(--heading); }
.tariff-accent .price .price-num { color: var(--green-600); }
.tariff .price .price-cur { font-family: var(--font-disp); font-weight: 700; font-size: 20px; line-height: 1; color: var(--heading); }
.tariff-accent .price .price-cur { color: var(--green-600); }
.tariff .price .price-per { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--muted); }
/* qualitative price (e.g. "Индивидуально") — a label, NOT a giant numeral, so
   it never stretches its grid column and squeezes the other cards. */
.tariff .price .price-note { font-family: var(--font-disp); font-weight: 700; font-size: 19px; line-height: 1.2; color: var(--heading); }
.tariff .price .price-old { color: var(--muted); text-decoration: line-through; font-family: var(--font-body); font-size: 16px; font-weight: 500; display: none; }
.tariff .price .price-disc {
  display: none; font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--green-600);
  background: var(--green-100); border-radius: 999px; padding: 2px 9px;
}
.tariff .price .price-sub { flex-basis: 100%; font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--muted); text-align: center; }

/* feature waterfall */
.tariff-feats { list-style: none; padding: 0; margin: 4px 0 20px; flex: 1; display: grid; gap: 9px; }
.tariff-feats li { position: relative; padding-left: 24px; color: var(--body); font-size: 14px; }
.tariff-feats li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: var(--green); font-weight: 800; }
.tariff-feats li b { color: var(--heading); }
.tariff-feats li.t-extra { color: var(--green-600); font-weight: 600; }
.tariff-feats li.t-extra::before { content: "★"; }
/* limitation row (cons) — muted text + amber "−" instead of the green check */
.tariff-feats li.t-con { color: var(--muted); }
.tariff-feats li.t-con::before { content: "−"; color: #d97706; font-weight: 800; }

/* ---------- trust ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; text-align: center; box-shadow: var(--shadow); }
.trust-item b { display: block; font-family: var(--font-disp); font-size: 17px; color: var(--heading); margin-bottom: 8px; }
.trust-item span { color: var(--muted); font-size: 14px; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 20px; }
.section-alt .faq details { background: var(--paper); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--heading); padding: 14px 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--green); transition: transform .2s ease; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--body); font-size: 15px; padding: 0 0 16px; }

/* ---------- final cta ---------- */
.final-cta { background: var(--navy); color: #fff; text-align: center; border: none; }
.final-cta h2 { color: #fff; margin-bottom: 12px; }
.final-cta p { color: #cfe0ee; font-size: 18px; margin-bottom: 26px; }

/* ---------- footer ---------- */
.footer { background: var(--navy-900); color: #cfe0ee; padding: 52px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand img { height: 40px; margin-bottom: 12px; }
.foot-brand p { color: #9bb6cc; font-size: 14px; max-width: 240px; }
.foot-col h4 { font-family: var(--font-disp); font-size: 14px; color: #fff; margin-bottom: 14px; }
.foot-col a { display: block; color: #b9cee0; font-size: 14.5px; margin-bottom: 10px; }
.foot-col a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: 13px; color: #8ba6bd; }

/* ---------- sticky mobile cta ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--topbar-bg); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: none;
}

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,45,79,.55); backdrop-filter: blur(3px); }
.modal-card { position: relative; background: var(--card); border-radius: var(--r); padding: 30px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); max-height: 92vh; overflow-y: auto; }
.modal-x { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-x:hover { color: var(--heading); }
.modal-card h3 { font-size: 22px; color: var(--heading); margin-bottom: 8px; padding-right: 24px; }
.modal-sub { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.order-summary { background: var(--green-100); color: var(--green-600); font-weight: 700; font-size: 15px; border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 12px; }
.order-summary:empty { display: none; }
/* billing-period radios inside the order modal */
.order-period { display: flex; gap: 10px; margin-bottom: 14px; }
.op-opt { flex: 1; display: flex; align-items: center; gap: 8px; cursor: pointer; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--ink); transition: border-color .15s ease, background .15s ease; }
.op-opt input { accent-color: var(--green); margin: 0; }
.op-opt b { color: var(--green-600); }
.op-opt.on { border-color: var(--green); background: var(--green-100); color: var(--green-600); }
.order-total { font-size: 16px; font-weight: 700; color: var(--heading); margin-bottom: 18px; }
.order-total small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.order-total:empty { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .offer-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .cards-4, .steps, .adv-grid, .models-grid, .trust-grid { grid-template-columns: repeat(2, 1fr); }
  /* carousel shows 2 cards per view on tablets */
  .tariff { flex-basis: calc((100% - 16px) / 2); }
  .agents { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .offer-grid { gap: 28px; }
}
@media (max-width: 620px) {
  /* desktop nav + header theme toggle move into the slide-in panel */
  .nav-desktop, #theme-slot-desktop { display: none; }
  .burger { display: inline-flex; }

  /* tighter vertical rhythm — a promo must read short & punchy on phones */
  .section { padding: 34px 0; }
  .section-head { margin-bottom: 22px; }
  .section-head p { font-size: 15px; }
  .hero { padding: 28px 0 22px; }
  .hero .lead { font-size: 16px; margin: 14px 0 20px; }
  .trust-row { gap: 12px; margin-top: 18px; }

  /* longer-copy sections stay single-column, just tighter */
  .cards-4, .agents { grid-template-columns: 1fr; }
  .ps-card { padding: 16px; }
  .agent { padding: 18px; }

  /* card-heavy sections go 2-up & compact — roughly halves their height.
     minmax(0,1fr) (not bare 1fr) lets columns shrink below their longest
     word so the grid never overflows the viewport (was clipping the right
     column under body{overflow-x:hidden}); break-word wraps long RU titles
     inside the narrow column instead of spilling out. */
  .steps, .adv-grid, .models-grid, .trust-grid, .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step, .adv, .model, .trust-item { min-width: 0; }
  /* long RU titles: hyphenate at syllable boundaries (lang=ru) instead of a
     hard mid-word chop; break-word stays as the last-resort fallback */
  .step h3, .adv h3, .model b, .trust-item b { overflow-wrap: break-word; hyphens: auto; }
  .steps { gap: 14px; }
  .step-n { width: 38px; height: 38px; font-size: 17px; border-radius: 11px; margin-bottom: 10px; }
  .step h3 { font-size: 16px; }
  .step p { font-size: 13.5px; }
  .adv-grid { gap: 12px; }
  .adv { padding: 16px; }
  .adv-i { font-size: 24px; }
  .adv h3 { font-size: 15px; margin: 8px 0 5px; }
  .adv p { font-size: 13px; }
  .models-grid { gap: 10px; }
  .model { padding: 12px 13px; }
  .model b { font-size: 14px; }
  .model span { font-size: 12px; }
  .trust-grid { gap: 12px; }
  .trust-item { padding: 16px; }
  .trust-item b { font-size: 15px; }
  .footer-grid { gap: 20px 16px; }

  /* carousel shows ~1 card + a peek of the next on phones */
  .tariff { flex-basis: 84%; }
  .tcar-nav { display: none; } /* swipe instead of arrows */
  .tariffs-bar { grid-template-columns: 1fr; justify-items: center; }
  #tariffs .tariffs-bar .bill-toggle { grid-column: 1; }
  .field-row { grid-template-columns: 1fr; }
  .cta .btn { width: 100%; white-space: normal; }
  .sticky-cta { display: block; }
  body { padding-bottom: 76px; }
  .topbar .wrap { gap: 12px; }
}

/* very narrow phones: drop advantages back to 1-up so the 2-line copy
   doesn't get cramped, but keep the short-text grids 2-up */
@media (max-width: 380px) {
  .adv-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   THEME TOGGLE (sun/moon) — shared chrome
   ============================================================ */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; cursor: pointer; padding: 0;
  background: var(--card); border: 1.5px solid var(--line); color: var(--heading);
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.theme-toggle:hover { border-color: var(--navy); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* theme-aware logo: dark-navy mark on light, light mark on dark */
.brand .lg-dark { display: none; }
:root[data-theme="dark"] .brand .lg-light { display: none; }
:root[data-theme="dark"] .brand .lg-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .lg-light { display: none; }
  :root:not([data-theme="light"]) .brand .lg-dark { display: block; }
}

/* ============================================================
   DARK-MODE residual fixes
   ============================================================ */
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea { background: var(--field-bg); }
:root[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e8eef2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
:root[data-theme="dark"] .tariff:hover { border-color: var(--navy); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .field input,
  :root:not([data-theme="light"]) .field select,
  :root:not([data-theme="light"]) .field textarea { background: var(--field-bg); }
  :root:not([data-theme="light"]) .field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e8eef2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
  }
  :root:not([data-theme="light"]) .tariff:hover { border-color: var(--navy); }
}
