/* ============================================================
   ЧИКЕН РОУД ФАН-ХАБ — стиль "Retro Route-66 Roadside Postcard"
   Материя: состаренная крафт-бумага + эмалевые таблички у шоссе
   Палитра: крем-бумага / кадмиевый красный / пыльно-голубой / желтая разметка
   Типографика: Alfa Slab One (заголовки) + Libre Franklin (текст)
   Карточки: толстая рамка, жёсткая offset-тень, лёгкие наклоны
   ============================================================ */

:root {
  --paper: #F6EEDC;
  --paper-deep: #EFE2C9;
  --card: #FCF8EE;
  --ink: #262119;
  --ink-soft: #6B6355;
  --ink-faint: #9A9080;
  --red: #C3401C;
  --red-deep: #8F2B10;
  --blue: #2F5D7C;
  --blue-deep: #22455C;
  --sand: #D9C7A2;
  --road-yellow: #E8B33A;
  --shadow: rgba(38, 33, 25, 0.16);
  --hard-shadow: 5px 5px 0 var(--ink);
  --hard-shadow-sm: 3px 3px 0 var(--ink);
  --font-display: "Alfa Slab One", "Arial Black", Impact, serif;
  --font-body: "Libre Franklin", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
  --measure: 68ch;
  --header-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* длинные слова DE/PT не должны раздувать grid/flex-колонки за экран */
.hero__grid > *, .asym-grid > *, .tips-grid > *, .stats-grid > *,
.glossary-grid > *, .edit-grid > *, .footer-grid > *, .stats-band .wrap > *,
.badges-row > *, .sim__controls > *, .contact-split > * { min-width: 0; }

/* переносы в местах, где текст плотный */
.site-footer a, .site-footer p, .mode-table td, .mode-table th,
.btn, .stamp, .rail-note, .cookie-banner p, .form-status {
  overflow-wrap: break-word;
}
.site-footer li a { hyphens: auto; }

html {
  scroll-behavior: smooth;
  /* clip (а не hidden) — горизонтальный пан на мобильных становится невозможен в принципе */
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(38,33,25,0.045) 31px 32px);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--blue-deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-transform: none;
}

h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }

.wrap { width: min(1160px, 92vw); margin: 0 auto; }
.measure { max-width: var(--measure); }

/* --- kicker с красной закладкой --- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-deep);
  margin-bottom: 14px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 10px;
  background: var(--red);
  transform: skewX(-14deg);
}

/* --- разделитель «дорога»: асфальт с прерывистой осевой --- */
.road-divider {
  height: 26px;
  margin: 0;
  background: var(--ink);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background-image: repeating-linear-gradient(90deg, var(--road-yellow) 0 42px, transparent 42px 76px);
  background-size: 26px 6px;
  background-repeat: repeat-x;
  background-position: center;
}

.section-pad { padding: clamp(48px, 8vw, 92px) 0; }

/* ============================ TICKER ============================ */
.ticker {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  border-bottom: 3px solid var(--red);
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  height: 38px;
  display: flex;
  align-items: center;
}
.ticker__track {
  display: inline-flex;
  gap: 0;
  animation: ticker-roll 46s linear infinite;
  will-change: transform;
}
.ticker__track span { padding: 0 26px; position: relative; }
.ticker__track span::after {
  content: "✚";
  position: absolute;
  right: -8px;
  color: var(--road-yellow);
}
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================ HEADER ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--shadow);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: var(--blue);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--hard-shadow-sm);
  transform: rotate(-3deg);
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.brand__name em { font-style: normal; color: var(--red); }
.brand__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 13px;
  border-radius: 6px;
  border: 2px solid transparent;
}
.nav a:hover { color: var(--red-deep); background: var(--paper-deep); }
.nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  transform: rotate(-1deg);
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--hard-shadow-sm);
}
.burger:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* --- переключатель языков --- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 14px;
  padding: 4px;
  background: var(--paper-deep);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--hard-shadow-sm);
}
.lang-switch__btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 5px 9px;
  cursor: pointer;
}
.lang-switch__btn:hover { color: var(--ink); }
.lang-switch__btn.is-active {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-2deg);
}
/* мобильный выпадающий вариант переключателя */
.lang-switch__select {
  display: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23262119'/%3E%3C/svg%3E")
    no-repeat right 9px center;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 7px 28px 7px 11px;
  cursor: pointer;
}

/* --- мобильный drawer --- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}
.drawer__panel {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--paper);
  border-left: 3px solid var(--ink);
  padding: 26px 22px;
  transform: translateX(105%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__panel a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  padding: 13px 10px;
  border-bottom: 2px dashed var(--sand);
}
.drawer__panel a:hover { color: var(--red); }
.drawer__close {
  align-self: flex-end;
  width: 42px; height: 42px;
  font-size: 1.1rem;
  border: 2px solid var(--ink);
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 8px;
}
.drawer__backdrop {
  position: absolute; inset: 0;
  background: rgba(38, 33, 25, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.drawer.is-open .drawer__backdrop { opacity: 1; }

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 13px 24px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn--primary {
  background: var(--red);
  color: #FFF8EC;
  box-shadow: var(--hard-shadow);
}
.btn--primary:hover { background: var(--red-deep); color: #FFF8EC; }
.btn--ghost {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--hard-shadow);
}
.btn--ghost:hover { background: var(--sand); color: var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--sm { padding: 9px 16px; font-size: 0.85rem; }

/* ============================ HERO ============================ */
.hero {
  position: relative;
  padding: clamp(44px, 7vw, 84px) 0 clamp(40px, 6vw, 70px);
  background:
    radial-gradient(circle at 88% 8%, rgba(47,93,124,0.10) 0 22%, transparent 23%),
    radial-gradient(circle at 6% 92%, rgba(195,64,28,0.09) 0 18%, transparent 19%);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.9rem);
  margin-bottom: 20px;
}
.hero h1 .mark {
  color: var(--red);
  position: relative;
  white-space: nowrap;
}
.hero h1 .mark::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--road-yellow) 0 14px, transparent 14px 24px);
}
.hero__lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 56ch; margin-bottom: 28px; }
.hero__stamps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stamp {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
}
.stamp--blue { background: var(--blue); color: var(--paper); }
.stamp--red { background: var(--red); color: #FFF8EC; }

/* фото в заглушке-рамке */
.photo-frame {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard-shadow);
  padding: 10px;
  position: relative;
}
.photo-frame img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--sand), var(--blue) 130%);
  min-height: 240px;
}
.photo-frame figcaption {
  font-size: 0.8rem;
  color: var(--ink-soft);
  padding: 9px 4px 2px;
  letter-spacing: 0.02em;
}
.photo-frame--tilt { transform: rotate(1.4deg); }
.photo-frame--square img { height: 300px; }

.hero__side { display: grid; gap: 26px; }

/* ============================ SIMULATOR ============================ */
.sim {
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard-shadow);
  padding: 20px;
  transform: rotate(-1.2deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
}
.sim__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  gap: 10px;
}
.sim__title { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.03em; }
.sim__mult {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--road-yellow);
  font-variant-numeric: tabular-nums;
}
.sim__lanes { display: grid; gap: 7px; margin-bottom: 16px; }
.lane {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(246, 238, 220, 0.07);
  border: 1px dashed rgba(246, 238, 220, 0.35);
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 0.85rem;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.lane__num { font-weight: 700; color: var(--road-yellow); min-width: 46px; }
.lane__score { margin-left: auto; color: rgba(246,238,220,0.75); font-variant-numeric: tabular-nums; }
.lane--passed { background: rgba(232, 179, 58, 0.14); border-color: var(--road-yellow); }
.lane--current { background: rgba(47, 93, 124, 0.5); border: 1px solid var(--paper); transform: translateX(4px); }
.lane--crash { background: rgba(195, 64, 28, 0.55); border-color: var(--red); }
.sim__msg {
  min-height: 44px;
  font-size: 0.88rem;
  color: var(--paper);
  margin-bottom: 14px;
  opacity: 0.85;
}
.sim__controls { display: flex; gap: 10px; flex-wrap: wrap; }
.sim__controls .btn--ghost { background: var(--paper); }
.sim__controls .btn--danger { background: var(--red); color: #FFF8EC; }
.sim__controls .btn--danger:hover { background: var(--red-deep); }
.sim__note { margin-top: 12px; font-size: 0.72rem; color: rgba(246,238,220,0.55); letter-spacing: 0.06em; text-transform: uppercase; }

/* ============================ STATS ============================ */
.stats-band {
  background: var(--blue-deep);
  color: var(--paper);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background-image:
    radial-gradient(rgba(246,238,220,0.14) 1.4px, transparent 1.5px);
  background-size: 14px 14px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: clamp(40px, 6vw, 64px) 0;
}
.stat { text-align: center; position: relative; }
.stat + .stat::before {
  content: "";
  position: absolute;
  left: -12px; top: 12%;
  height: 76%;
  width: 2px;
  background: repeating-linear-gradient(180deg, rgba(246,238,220,0.5) 0 8px, transparent 8px 16px);
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  color: var(--road-yellow);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat__label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.85;
}

/* ============================ MODE TABLE ============================ */
.modes { position: relative; }
.modes__note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-left: 4px solid var(--road-yellow);
  padding: 8px 14px;
  background: var(--paper-deep);
  max-width: 640px;
  margin: 18px 0 34px;
}
.table-wrap {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--hard-shadow);
  background: var(--card);
}
.mode-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.mode-table th {
  background: var(--ink);
  color: var(--paper);
  text-align: left;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.05em;
  font-size: 0.82rem;
  padding: 14px 18px;
}
.mode-table th:not(:first-child) { border-left: 1px solid rgba(246,238,220,0.25); }
.mode-table td {
  padding: 15px 18px;
  border-top: 2px dashed var(--sand);
  vertical-align: top;
}
.mode-table tr:nth-child(even) td { background: rgba(232, 179, 58, 0.07); }
.mode-table td:first-child { font-family: var(--font-display); color: var(--red-deep); white-space: nowrap; }
.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 12px;
  border: 2px solid currentColor;
}
.pill--easy { color: #35672A; }
.pill--medium { color: var(--road-yellow); }
.pill--hard { color: var(--blue-deep); }
.pill--hardcore { color: var(--red); }

/* ============================ ASYMMETRIC CARD GRID ============================ */
.asym-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 26px;
  align-items: stretch;
}
.asym-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard-shadow);
  padding: 24px;
  position: relative;
}
.asym-card h3 { display: flex; gap: 10px; align-items: baseline; }
.asym-card .ico { font-size: 1.5rem; }
.asym-card p { color: var(--ink-soft); margin-top: 10px; font-size: 0.96rem; }
.asym-card--big { grid-column: span 3; font-size: 1.02rem; }
.asym-card--big h3 { font-size: 1.45rem; }
.asym-card--small { grid-column: span 2; }
.asym-card--photo { padding: 10px 10px 20px; }
.asym-card--tilt-l { transform: rotate(-1deg); }
.asym-card--tilt-r { transform: rotate(1deg); }
.asym-card--flat { transform: none; }
.tab-num {
  position: absolute;
  top: -14px; right: 18px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--yellow, var(--road-yellow));
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: var(--hard-shadow-sm);
}

/* ============================ QUIZ ============================ */
.quiz-band {
  background: var(--paper-deep);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.quiz-box {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard-shadow);
  padding: clamp(24px, 4vw, 40px);
}
.quiz-progress {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 10px;
}
.quiz-question { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 18px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt {
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.98rem;
  background: var(--paper);
  border: 2px dashed var(--ink-faint);
  border-radius: 8px;
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.quiz-opt:hover { border-color: var(--ink); border-style: solid; transform: translateX(3px); }
.quiz-opt.is-right { border: 2px solid #35672A; background: rgba(53, 103, 42, 0.12); font-weight: 700; }
.quiz-opt.is-wrong { border: 2px solid var(--red); background: rgba(195, 64, 28, 0.1); }
.quiz-result { text-align: center; }
.quiz-verdict { font-family: var(--font-display); font-size: 1.4rem; margin: 10px 0; }

/* ============================ TIPS ============================ */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 26px;
  align-items: start;
}
.tip-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 4px 18px 4px 14px;
  box-shadow: var(--hard-shadow-sm);
  padding: 24px 22px;
  position: relative;
}
.tip-card::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  width: 74px; height: 20px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(195, 64, 28, 0.35);
  border: 1px solid rgba(143, 43, 16, 0.3);
}
.tip-card--tilt-l { transform: rotate(-1.6deg); }
.tip-card--tilt-r { transform: rotate(1.3deg); }
.tip-card--flat { transform: rotate(0); }
.tip-card h3 { margin-top: 6px; display: flex; gap: 9px; align-items: baseline; }
.tip-card p { color: var(--ink-soft); margin-top: 10px; font-size: 0.95rem; }
.tip-card--wide { grid-column: span 2; border-radius: 14px 4px 18px 4px; }

/* ============================ FAQ ============================ */
.faq-list { max-width: 820px; margin-right: auto; }
.acc {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--hard-shadow-sm);
}
.acc__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  padding: 17px 20px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}
.acc__head:hover { background: var(--paper-deep); }
.acc__head .chev {
  font-family: var(--font-display);
  color: var(--red);
  transition: transform 0.25s ease;
  font-size: 1.1rem;
}
.acc.is-open .acc__head .chev { transform: rotate(45deg); }
.acc__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.acc__body-inner {
  padding: 0 20px 18px;
  color: var(--ink-soft);
  font-size: 0.96rem;
  border-top: 2px dashed var(--sand);
  padding-top: 14px;
  margin: 0 0;
}

/* ============================ BADGES ============================ */
.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}
.badge {
  flex: 1 1 220px;
  max-width: 300px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 2px solid var(--blue-deep);
  border-radius: 8px;
  padding: 14px 16px;
}
.badge .b-ico {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: grid; place-items: center;
  font-size: 1.2rem;
  background: var(--blue);
  color: var(--paper);
  border-radius: 50%;
  border: 2px solid var(--blue-deep);
}
.badge b { display: block; font-size: 0.9rem; }
.badge span { font-size: 0.78rem; color: var(--ink-soft); }

/* ============================ CTA ============================ */
.cta {
  position: relative;
  background: var(--red);
  color: #FFF6E8;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, transparent 0 22px, rgba(38,33,25,0.08) 22px 44px);
}
.cta .wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(38px, 5vw, 60px) 0;
}
.cta h2 { color: #FFF6E8; }
.cta p { opacity: 0.9; margin-top: 8px; max-width: 52ch; }
.cta .btn--ghost { background: var(--paper); }
.cta .btn--ghost:hover { background: var(--road-yellow); }

/* ============================ FOOTER ============================ */
.site-footer {
  background: var(--ink);
  color: rgba(246, 238, 220, 0.82);
  padding: clamp(44px, 6vw, 70px) 0 30px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.footer-brand .brand__name { color: var(--paper); font-size: 1.3rem; }
.footer-brand p { margin: 14px 0 18px; opacity: 0.75; max-width: 34ch; }
.site-footer h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  color: var(--road-yellow);
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer ul a { color: rgba(246, 238, 220, 0.85); text-decoration: none; }
.site-footer ul a:hover { color: var(--road-yellow); text-decoration: underline; }
.footer-disclaimer {
  margin-top: 40px;
  padding: 18px 20px;
  border: 2px dashed rgba(246, 238, 220, 0.35);
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.6;
  opacity: 0.8;
}
.footer-bottom {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  opacity: 0.6;
  letter-spacing: 0.04em;
}

/* ============================ COOKIE BANNER ============================ */
.cookie-banner {
  position: fixed;
  left: 18px; right: 18px; bottom: 18px;
  z-index: 90;
  max-width: 520px;
  margin: 0 auto;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 rgba(38, 33, 25, 0.35);
  padding: 20px 22px;
  transform: translateY(130%);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; margin-bottom: 8px; }
.cookie-banner p { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 16px; }
.cookie-banner .btn + .btn { margin-left: 10px; }
.cookie-link { font-size: 0.82rem; }

/* ============================ SUBPAGE HEADS ============================ */
.page-head {
  padding: clamp(40px, 6vw, 72px) 0 clamp(30px, 4vw, 48px);
  border-bottom: 2px dashed var(--sand);
  position: relative;
}
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin-bottom: 16px; }
.page-head .lede { color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; }
.page-head--blue { background: linear-gradient(180deg, rgba(47,93,124,0.08), transparent); }
.page-head--red { background: linear-gradient(180deg, rgba(195,64,28,0.07), transparent); }

.edit-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.edit-grid__main .section-pad { padding-left: 0; padding-right: 0; }
.side-rail {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard-shadow-sm);
  padding: 22px;
  font-size: 0.9rem;
}
.side-rail h4 { font-family: var(--font-display); font-weight: 400; margin-bottom: 12px; font-size: 1rem; }
.side-rail ul { list-style: none; display: grid; gap: 8px; }
.side-rail ul a { text-decoration: none; font-weight: 600; }
.side-rail .rail-note { margin-top: 16px; padding-top: 14px; border-top: 2px dashed var(--sand); color: var(--ink-soft); font-size: 0.8rem; }

.prose h2 { margin: 40px 0 14px; }
.prose h3 { margin: 26px 0 10px; }
.prose p { margin-bottom: 14px; color: #3E3A2F; }
.prose ul, .prose ol { margin: 0 0 16px 22px; display: grid; gap: 8px; color: #3E3A2F; }
.prose li::marker { color: var(--red); font-weight: 700; }

.step-list { list-style: none; margin: 20px 0; counter-reset: steps; display: grid; gap: 16px; }
.step-list li {
  counter-increment: steps;
  position: relative;
  padding: 18px 20px 18px 68px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--hard-shadow-sm);
}
.step-list li::before {
  content: counter(steps);
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%) rotate(-4deg);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--road-yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 800;
}
.step-list b { display: block; margin-bottom: 4px; }
.step-list p { color: var(--ink-soft); font-size: 0.94rem; margin: 0; }

.callout {
  border: 2px solid var(--blue-deep);
  border-left: 8px solid var(--blue);
  background: rgba(47, 93, 124, 0.07);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 22px 0;
  font-size: 0.95rem;
}
.callout b { color: var(--blue-deep); }

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}
.gloss-card {
  background: var(--card);
  border: 2px dashed var(--ink-faint);
  border-radius: 8px;
  padding: 18px;
  transition: border-color 0.2s ease, border-style 0.2s ease;
}
.gloss-card:hover { border: 2px solid var(--ink); box-shadow: var(--hard-shadow-sm); }
.gloss-card dt { font-family: var(--font-display); color: var(--red-deep); margin-bottom: 6px; }
.gloss-card dd { font-size: 0.9rem; color: var(--ink-soft); }

/* ============================ CONTACT FORM ============================ */
.form-card {
  max-width: 640px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard-shadow);
  padding: clamp(24px, 4vw, 38px);
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 12px 14px;
  background: var(--paper);
  border: 2px solid var(--ink-faint);
  border-radius: 8px;
  color: var(--ink);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
}
.form-row .err { color: var(--red-deep); font-size: 0.8rem; margin-top: 5px; display: none; }
.form-row.has-error input, .form-row.has-error textarea, .form-row.has-error select { border-color: var(--red); }
.form-row.has-error .err { display: block; }
.form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 18px;
  border: 2px dashed #35672A;
  background: rgba(53, 103, 42, 0.1);
  border-radius: 8px;
  font-size: 0.9rem;
}
.form-status.is-visible { display: block; }

/* legal small text */
.legal p, .legal li { font-size: 0.95rem; }
.legal h2 { font-size: 1.5rem; }

/* ============================ REVEAL ============================ */
.reveal {
  opacity: 0;
  transform: translateY(26px) rotate(-0.4deg);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1020px) {
  /* навбар + переключатель + бренд не помещаются в одну строку — включаем бургер раньше */
  .nav { display: none; }
  .burger { display: grid; place-items: center; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__side { order: -1; }
  .asym-grid { grid-template-columns: repeat(2, 1fr); }
  .asym-card--big, .asym-card--small { grid-column: span 2; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .stat + .stat::before { display: none; }
  .edit-grid { grid-template-columns: 1fr; }
  .side-rail { position: static; }
}
@media (max-width: 760px) {
  /* переключатель языков -> выпадающий список */
  .lang-switch__btn { display: none; }
  .lang-switch__select { display: block; }

  /* наклонённые карточки на узких экранах: ровно, без запаса ширины за краями */
  .photo-frame--tilt, .photo-frame--tilt.photo-frame--square,
  .asym-card--tilt-l, .asym-card--tilt-r,
  .tip-card--tilt-l, .tip-card--tilt-r {
    transform: none;
  }

  /* длинные слова DE/PT в заголовках и тексте */
  h1, h2, h3, .prose p, .lede, .hero__lede, .acc__body-inner,
  .tip-card p, .asym-card p, .rail-note {
    overflow-wrap: break-word;
    hyphens: auto;
  }
  .hero h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
  .page-head h1 { font-size: clamp(1.75rem, 7.6vw, 2.5rem); }

  /* кнопки героя на всю ширину */
  .hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }

  /* инлайновые грид-стили страниц не должны ломать мобильную сетку */
  .prose .asym-grid { grid-template-columns: 1fr !important; }
  .contact-split { grid-template-columns: 1fr !important; }

  /* таблицы со множеством текста: принудительная прокрутка */
  .mode-table { min-width: 460px; }

  .tips-grid { grid-template-columns: 1fr; }
  .tip-card--wide { grid-column: span 1; }
  .asym-grid { grid-template-columns: 1fr; }
  .asym-card--big, .asym-card--small { grid-column: span 1; }
  .mode-table { font-size: 0.86rem; }
  .mode-table th, .mode-table td { padding: 11px 12px; }
  .table-wrap { overflow-x: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cookie-banner { left: 12px; right: 12px; }
  .cookie-banner .btn + .btn { margin-left: 0; margin-top: 10px; }
  .sim__controls .btn { flex: 1; justify-content: center; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 15.5px; }
  /* компактная шапка */
  .site-header .wrap { height: 62px; }
  .brand { gap: 9px; }
  .brand__mark { width: 36px; height: 36px; font-size: 1.1rem; }
  .brand__name { font-size: 1rem; }
  .brand__sub { display: none; }
  .lang-switch { margin-left: 0; padding: 3px; }
  .lang-switch__select { padding: 5px 24px 5px 9px; font-size: 0.75rem; }
  .burger { width: 40px; height: 40px; font-size: 1.05rem; }
  /* кнопки — на всю ширину ряда */
  .hero__actions .btn, .cta .btn { width: 100%; justify-content: center; }
  .footer-brand .brand__name { font-size: 1.1rem; }
}

/* ужатие навбара на узких десктопах, где он ещё виден */
@media (min-width: 1021px) and (max-width: 1250px) {
  .nav a { padding: 8px 9px; font-size: 0.86rem; }
  .lang-switch { margin-left: 8px; }
}
