/* Общие мелочи для всех демо: сброс, переключатель языка, плашка «Demo», уведомление */
*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; line-height: 1.6; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
section[id] { scroll-margin-top: 72px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Переключатель DE | RU */
.lang-switch { display: inline-flex; border: 1px solid currentColor; border-radius: 999px; overflow: hidden; font-size: .8rem; font-weight: 600; }
.lang-switch button { background: none; border: 0; padding: .3em .75em; cursor: pointer; opacity: .65; letter-spacing: .04em; }
.lang-switch button[aria-pressed="true"] { background: var(--ls-bg, #111); color: var(--ls-fg, #fff); opacity: 1; }

/* Плашка «Demo» внизу экрана */
.demo-bar {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 90;
  display: flex; gap: .75rem; align-items: center;
  background: rgba(20, 20, 24, .88); color: #fff; backdrop-filter: blur(6px);
  font: 500 .8rem/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: .5rem .6rem .5rem 1rem; border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  max-width: calc(100% - 24px);
}
.demo-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-preview .demo-bar, .is-preview .call-fab { display: none !important; }
.demo-bar a { background: #fff; color: #111; text-decoration: none; padding: .3rem .8rem; border-radius: 999px; white-space: nowrap; font-weight: 600; }

/* Всплывающее сообщение после отправки формы */
.toast {
  position: fixed; left: 50%; top: 20px; transform: translate(-50%, -150%); z-index: 100;
  background: #14532d; color: #fff; padding: .9rem 1.2rem; border-radius: 12px; width: max-content; max-width: min(92vw, 460px);
  font: 500 .95rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .35s ease;
}
.toast.show { transform: translate(-50%, 0); }
