/* Basis Desk — стили лендинга. RTL/LTR безопасные logical properties.
   Цветовая система: тёплый off-white фон, графит, охра-акцент, темно-зелёный hunter. */

:root {
  --bg: #f6f2ea;
  --paper: #fffdf8;
  --paper-2: #f1eadc;
  --ink: #15201a;
  --ink-soft: #2c382f;
  --muted: #6b736b;
  --muted-2: #94978c;
  --line: #ddcfb8;
  --line-strong: #c9b893;
  --accent: #1e4d3a;
  --accent-soft: #285c46;
  --accent-2: #9b6a2f;
  --accent-3: #b58a4c;
  --danger: #7b2f2a;
  --shadow-card: 0 24px 60px -28px rgba(43, 35, 23, .35);
  --shadow-soft: 0 12px 32px -16px rgba(43, 35, 23, .22);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --max: 1180px;
  --header-h: 76px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ar-sans: "IBM Plex Sans Arabic", "Noto Naskh Arabic", "Tajawal", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(23, 33, 27, .04) 1px, transparent 1px),
    linear-gradient(rgba(23, 33, 27, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), rgba(0,0,0,.04) 55%, transparent);
  z-index: -1;
}

/* Арабский — другая шрифтовая семья */
html[lang="ar"] body { font-family: var(--ar-sans); }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-family: "IBM Plex Serif Arabic", "Noto Naskh Arabic", var(--ar-sans); letter-spacing: 0; }

a { color: inherit; text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent); }
img, svg { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

.container {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: 20px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  border-radius: 10px;
}
.skip-link:focus { inset-block-start: 20px; }

/* HEADER */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  border-block-end: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.header-inner {
  width: min(1280px, calc(100% - 36px));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 22px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; min-width: 200px; }
.logo-mark {
  width: 40px; height: 40px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 17px;
  letter-spacing: -.08em;
}
.logo-text { display: grid; line-height: 1.05; }
.logo-text > span:first-child { font-size: 15px; font-weight: 600; letter-spacing: -.012em; }
.logo-text small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; margin-block-start: 4px; }

.nav { margin-inline-start: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--ink-soft); }
.nav a { padding-block: 6px; }
.nav a:hover { color: var(--accent); }
.nav-extras { display: none; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: 6px; }

.menu-btn {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
}
.menu-btn span { display: block; height: 1px; background: var(--ink); margin: 6px 0; }

/* LANG SWITCHER */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255,253,248,.4);
}
.lang-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 30px; padding-inline: 8px;
  font-size: 12px; font-weight: 600;
  border-radius: var(--radius-pill);
  color: var(--muted);
  letter-spacing: .04em;
}
.lang-pill:hover { color: var(--ink); }
.lang-pill.is-active { background: var(--ink); color: var(--paper); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding-inline: 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink); color: var(--ink); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { color: var(--paper); background: #25342b; box-shadow: var(--shadow-soft); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-small { min-height: 38px; padding-inline: 14px; font-size: 13px; }
.btn-text { border-color: transparent; background: transparent; padding-inline: 4px; }
.btn-text:hover { background: rgba(0,0,0,.03); transform: none; }
.btn-block { width: 100%; }

/* TYPOGRAPHY */
h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -.04em; font-weight: 500; }
h1 { font-family: var(--serif); font-size: clamp(48px, 7.6vw, 108px); font-variation-settings: "opsz" 96; max-width: 14ch; }
h1.display { letter-spacing: -.045em; }
h2 { font-family: var(--serif); font-size: clamp(32px, 4.8vw, 60px); }
h3 { font-size: 22px; letter-spacing: -.025em; font-weight: 600; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
  font-family: var(--sans);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; }
.eyebrow-light { color: color-mix(in srgb, var(--accent-3) 75%, white); }

.lead {
  margin: 24px 0 0;
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
}
.small { font-size: 13.5px; color: var(--muted); }
.consent { color: var(--muted); }

/* HERO */
.hero { padding-block: clamp(56px, 9vw, 110px) 50px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: end;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 34px; }
.micro-row { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 28px; color: var(--muted); font-size: 13.5px; }
.micro-row span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
}

.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 18px;
  pointer-events: none;
}
.card-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 14px;
}
html[lang="ar"] .card-label { letter-spacing: 0; }
.checks { display: grid; gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; }
.checks li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--ink-soft);
}
.checks li::before {
  content: "";
  width: 9px; height: 9px;
  margin-block-start: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.note {
  margin-block-start: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--paper-2);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  color: var(--ink-soft);
  font-size: 14px;
}

.strip {
  margin-block-start: clamp(40px, 6vw, 64px);
  border-block: 1px solid var(--line);
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.strip-item {
  padding: 20px 22px;
  border-inline-start: 1px solid var(--line);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.strip-item:first-child { border-inline-start: 0; }
.strip-item strong {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: -.04em;
  margin-block-end: 4px;
}
.strip-item span { color: var(--muted); font-size: 13.5px; }

/* SECTIONS */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-sm { padding-block: clamp(40px, 6vw, 64px); }
.section-soft { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--paper-2) 80%, transparent) 30%, transparent); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, .55fr);
  gap: 40px;
  align-items: end;
  margin-block-end: 38px;
}
.section-head .lead { margin: 0; font-size: 17px; }
.kicker {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 700;
}
html[lang="ar"] .kicker { letter-spacing: 0; }

/* PROBLEM */
.problem-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
  align-items: stretch;
}
.problem-main {
  padding: 36px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}
.problem-main h2 { color: var(--paper); }
.problem-main p { color: color-mix(in srgb, var(--paper) 80%, transparent); max-width: 60ch; }
.quote {
  margin: 36px 0 0;
  padding-inline-start: 24px;
  border-inline-start: 2px solid color-mix(in srgb, var(--paper) 30%, transparent);
  font-family: var(--serif);
  font-size: clamp(20px, 2.3vw, 25px);
  line-height: 1.32;
  letter-spacing: -.02em;
  color: color-mix(in srgb, var(--paper) 92%, transparent);
}

.problem-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: color-mix(in srgb, var(--paper) 60%, transparent);
}
.problem-row {
  padding: 24px 26px;
  border-block-start: 1px solid var(--line);
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
}
.problem-row:first-child { border-block-start: 0; }
.problem-row p { margin: 8px 0 0; color: var(--muted); }

/* USE-CASES */
.use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.use-card {
  min-height: 196px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--paper) 65%, transparent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.use-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.use-card:nth-child(2n) { background: color-mix(in srgb, var(--paper-2) 70%, transparent); }
.use-card p { margin: 14px 0 0; color: var(--muted); }

/* COUNTRY LISTING */
.country-listing {
  display: grid;
  gap: 0;
  border-block: 1px solid var(--line);
}
.country-line {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.3fr) minmax(0, 1fr) 130px 28px;
  gap: 24px;
  align-items: center;
  padding-block: 22px;
  padding-inline: 4px;
  border-block-end: 1px solid var(--line);
  transition: background .2s ease, padding .2s ease;
}
.country-line:last-child { border-block-end: 0; }
.country-line:hover { background: color-mix(in srgb, var(--paper) 60%, transparent); padding-inline: 16px; }
.country-code {
  font-family: var(--serif);
  font-size: 44px;
  letter-spacing: -.06em;
  color: var(--accent);
}
.country-line-body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -.025em;
}
.country-line-body p { margin: 6px 0 0; color: var(--ink-soft); }
.country-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.country-tags span {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 50%, transparent);
}
.country-line-meta { font-size: 13px; color: var(--muted); }
.country-line-meta strong { display: block; color: var(--ink); font-size: 16px; font-family: var(--serif); margin-block-start: 2px; }
.country-arrow { font-family: var(--serif); font-size: 22px; color: var(--accent); transition: transform .2s ease; }
.country-line:hover .country-arrow { transform: translateX(4px); }
html[dir="rtl"] .country-line:hover .country-arrow { transform: translateX(-4px) scaleX(-1); }
html[dir="rtl"] .country-arrow { transform: scaleX(-1); }

/* PROCESS */
.process { counter-reset: step; border-block-start: 1px solid var(--line); }
.process-step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 96px 1fr .8fr;
  gap: 30px;
  padding-block: 28px;
  border-block-end: 1px solid var(--line);
  align-items: start;
}
.process-step::before {
  content: "0" counter(step);
  font-family: var(--serif);
  font-size: 44px;
  color: var(--accent-2);
  line-height: 1;
}
.process-step p { margin: 0; color: var(--muted); }
.process-step h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.7vw, 30px); }

/* SELECTOR */
.selector {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 18px;
  align-items: start;
}
.form-panel, .result-panel, .lead-panel, .page-card, .memo {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field-label, label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
input, textarea, select {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--line-strong) 70%, var(--line));
  border-radius: 13px;
  background: #fffaf1;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 124px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.check-option {
  display: flex; align-items: center; gap: 9px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffaf1;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.check-option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--paper));
}
.check-option input { width: auto; min-height: auto; accent-color: var(--accent); }
.result-panel { position: sticky; inset-block-start: calc(var(--header-h) + 16px); padding: 28px; }
.result-country {
  margin-block-start: 8px;
  font-family: var(--serif);
  font-size: 46px;
  letter-spacing: -.05em;
  line-height: 1;
}
.result-subtitle { margin: 10px 0 14px; color: var(--ink-soft); font-weight: 600; }
.result-list { padding-inline-start: 18px; color: var(--muted); margin: 14px 0 0; }
.result-list li { margin-block: 10px; }
.alt {
  margin-block-start: 14px;
  padding-block-start: 14px;
  border-block-start: 1px solid var(--line);
  color: var(--accent-2);
  font-size: 14px;
}

/* SPLIT, MEMO */
.split {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 28px;
  align-items: start;
}
.memo h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.2vw, 36px); }
.memo-list { margin: 24px 0 0; padding: 0; list-style: none; }
.memo-list li {
  padding-block: 14px;
  border-block-start: 1px solid var(--line);
  color: var(--ink-soft);
}
.memo-list li:first-child { border-block-start: 0; }
.memo-warning { background: color-mix(in srgb, #f5e4d9 80%, transparent); border-color: #d7b9a9; }

.case-stack { display: grid; gap: 14px; }
.case-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--paper) 60%, transparent);
}
.case-card p { margin: 12px 0 0; color: var(--muted); }

/* LIMITS */
.no-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.no-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #efe3d4;
}
.no-card strong { color: var(--danger); display: block; }
.no-card p { color: #625646; margin: 12px 0 0; }

/* LEAD */
.section-lead { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--paper-2) 60%, transparent)); }
.lead-layout {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 24px;
  align-items: start;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  padding: 30px;
  box-shadow: var(--shadow-card);
}
.contact-card h2 { color: var(--paper); }
.contact-card p, .contact-card .small { color: color-mix(in srgb, var(--paper) 78%, transparent); }
.contact-methods { margin-block-start: 26px; display: grid; gap: 0; }
.contact-methods a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 16px;
  border-block-start: 1px solid color-mix(in srgb, var(--paper) 22%, transparent);
}
.contact-methods a:last-child { border-block-end: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.contact-methods span { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.contact-methods a:hover { color: color-mix(in srgb, var(--paper) 80%, var(--accent-3)); }
.form-status {
  min-height: 22px;
  margin-block-start: 14px;
  color: var(--accent);
  font-size: 14px;
}
.form-status[data-state="error"] { color: var(--danger); }
.form-status[data-state="offline"] { color: var(--accent-2); }

/* FAQ */
.faq { border-block-start: 1px solid var(--line); }
details {
  border-block-end: 1px solid var(--line);
  padding-block: 22px;
}
summary {
  cursor: pointer;
  font-size: clamp(18px, 2vw, 21px);
  font-weight: 600;
  letter-spacing: -.025em;
  list-style: none;
  position: relative;
  padding-inline-end: 32px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 0;
  font-size: 22px;
  color: var(--accent-2);
  transition: transform .2s ease;
}
details[open] summary::after { content: "−"; }
details p { max-width: 80ch; color: var(--muted); margin-block-start: 12px; }

/* FOOTER */
.site-footer {
  padding-block: 48px;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  background: color-mix(in srgb, var(--bg) 80%, var(--paper-2));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, .8fr);
  gap: 28px;
  align-items: start;
}
.footer-brand strong { display: block; font-family: var(--serif); font-size: 22px; letter-spacing: -.025em; color: var(--ink); margin-block-end: 8px; }
.footer-brand p { margin: 0 0 8px; }
.footer-head {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-soft);
  font-weight: 600;
}
html[lang="ar"] .footer-head { letter-spacing: 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-col a:hover { color: var(--accent); }

/* CHAT WIDGET */
.chat-widget {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-end: 22px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease;
}
.chat-toggle:hover { transform: translateY(-2px); }
.chat-toggle-mark {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-3);
  color: var(--ink);
  font-size: 13px;
}
.chat-panel {
  width: min(380px, calc(100vw - 32px));
  max-height: 70vh;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-block-end: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 60%, var(--paper));
}
.chat-head strong { font-family: var(--serif); font-weight: 500; font-size: 20px; letter-spacing: -.02em; }
.chat-head .small { margin: 4px 0 0; color: var(--muted); }
.chat-close {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: var(--muted);
}
.chat-body {
  padding: 18px 20px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14.5px;
}
.chat-message {
  padding: 12px 14px;
  border-radius: 14px;
  max-width: 90%;
  line-height: 1.45;
}
.chat-message-bot {
  background: var(--paper-2);
  align-self: flex-start;
  color: var(--ink-soft);
}
.chat-message-user {
  background: var(--ink);
  color: var(--paper);
  align-self: flex-end;
  margin-inline-start: auto;
}
.chat-form {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-block-start: 1px solid var(--line);
  background: var(--paper);
}
.chat-form input { min-height: 42px; }
.chat-foot { padding: 0 16px 14px; color: var(--muted); }

/* Источники под ответом бота */
.chat-sources {
  margin-block-start: 10px;
  padding-block-start: 10px;
  border-block-start: 1px dashed color-mix(in srgb, var(--line) 90%, transparent);
  font-size: 12.5px;
  color: var(--muted);
}
.chat-sources strong {
  display: block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10.5px;
  color: var(--ink-soft);
  margin-block-end: 6px;
}
html[lang="ar"] .chat-sources strong { letter-spacing: 0; }
.chat-sources ul { padding-inline-start: 16px; margin: 0; }
.chat-sources li { line-height: 1.4; }

/* Кнопка "к консультанту" в шапке чата */
.chat-head-actions { display: flex; align-items: center; gap: 6px; }
.chat-handoff {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}
.chat-handoff:hover { background: color-mix(in srgb, var(--accent) 8%, var(--paper)); }

/* Форма передачи консультанту */
.chat-handoff-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-block-start: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 60%, var(--paper));
}
.chat-handoff-form .small { margin: 0 0 4px; color: var(--ink-soft); }
.chat-handoff-form input { min-height: 40px; font-size: 14px; }
.chat-handoff-actions { display: flex; gap: 8px; justify-content: flex-end; }
.chat-handoff-form .form-status { font-size: 12.5px; }

@media (max-width: 540px) {
  .chat-widget { inset-block-end: 14px; inset-inline-end: 14px; }
  .chat-panel { max-height: 80vh; }
}

/* COUNTRY PAGE */
.page-hero { padding-block: clamp(48px, 7vw, 72px) 40px; }
.breadcrumbs { color: var(--muted); font-size: 14px; margin-block-end: 28px; }
.breadcrumbs a { border-block-end: 1px solid var(--line); }
.breadcrumbs a:hover { border-color: var(--accent); }

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 40px;
  align-items: start;
}
.page-card { padding: 28px; }
.page-card h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.6vw, 28px); }
.page-card p { margin: 12px 0 0; color: var(--ink-soft); }
.page-card ul { padding-inline-start: 18px; color: var(--muted); margin: 14px 0 0; }
.page-card ul li { margin-block: 8px; }

.fact-table { border-block-start: 1px solid var(--line); margin-block-start: 18px; }
.fact-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  padding-block: 14px;
  border-block-end: 1px solid var(--line);
  font-size: 14px;
}
.fact-row strong { color: var(--ink-soft); font-weight: 600; }
.fact-row span { color: var(--muted); }

.columns-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.text-block { max-width: 720px; }
.text-block .lead { margin-block-start: 18px; }

/* RESPONSIVE */
@media (max-width: 1080px) {
  .hero-grid, .problem-layout, .selector, .split, .lead-layout, .page-grid {
    grid-template-columns: 1fr;
  }
  .result-panel { position: static; }
  .country-line { grid-template-columns: 72px 1fr; }
  .country-line .country-tags,
  .country-line .country-line-meta,
  .country-line .country-arrow { grid-column: 2; }
  .process-step { grid-template-columns: 90px 1fr; }
  .process-step p { grid-column: 2; }
  .strip-grid, .use-grid, .columns-2 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .lead { margin-block-start: 0; }
}

/* Tablet & ниже: десктоп-нав уже не влезает — переходим на бургер. */
@media (max-width: 1024px) {
  .header-inner { gap: 12px; }
  .nav {
    position: fixed;
    inset: 64px 12px auto 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow-card);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; border-block-end: 1px solid var(--line); }
  .nav > a:last-of-type { border-block-end: 0; }
  .nav-extras {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-block-start: 12px;
    padding-block-start: 12px;
    border-block-start: 1px solid var(--line);
    align-items: stretch;
  }
  .nav-extras .lang-switch { align-self: center; }
  .header-actions .btn-small { display: none; }
  .menu-btn { display: block; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 26px, var(--max)); }
  .header-inner { width: min(100% - 22px, 1280px); min-height: 64px; }
  .header-actions .lang-switch { display: none; }
  .logo { min-width: 0; }
  .logo-text small { display: none; }

  h1 { font-size: clamp(40px, 12vw, 64px); }
  h2 { font-size: clamp(28px, 9vw, 44px); }
  .hero { padding-block: 44px; }
  .section { padding-block: 56px; }
  .strip-grid, .use-grid, .no-grid, .form-grid, .check-grid { grid-template-columns: 1fr; }
  .strip-item { border-inline-start: 0; border-block-start: 1px solid var(--line); }
  .strip-item:first-child { border-block-start: 0; }
  .country-line { grid-template-columns: 1fr; gap: 12px; padding-inline: 0; }
  .country-line .country-tags,
  .country-line .country-line-meta,
  .country-line .country-arrow { grid-column: auto; }
  .country-line:hover { padding-inline: 0; }
  .process-step { grid-template-columns: 1fr; gap: 12px; }
  .process-step p { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .fact-row { grid-template-columns: 1fr; gap: 4px; }

  /* AI-кнопка не должна перекрывать контент — компактный режим */
  body { padding-block-end: 80px; }
  .chat-toggle { padding: 10px 14px; font-size: 13px; }
  .chat-toggle-text { display: none; }
  .chat-widget { inset-block-end: 14px; inset-inline-end: 14px; }
}

/* Доступность: фокус */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
