*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Georgia, "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  color: #1c1917;
  background: #fafaf9;
  line-height: 1.5;
}

img,
video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button[data-action] {
  display: block;
  width: fit-content;
}

section {
  display: flow-root;
}

hr {
  border: 0;
}

form {
  display: grid;
  gap: 14px;
  max-width: 440px;
}

form label {
  display: grid;
  gap: 6px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
}

form input,
form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  background: #fff;
  color: inherit;
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form button[type="submit"] {
  justify-self: start;
  border: 0;
  background: #0f766e;
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
}

.img-ph {
  min-height: 200px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e7e5e4, #f5f5f4);
}

.site-missing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

#site-toast[hidden] {
  display: none;
}

details.c-collapse,
.c-accordion details {
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  padding: 12px 16px;
  background: #fff;
}

.c-accordion {
  display: grid;
  gap: 8px;
}

.c-accordion details {
  margin: 0;
}

summary {
  cursor: pointer;
  font-weight: 650;
}

details > :not(summary) {
  margin-top: 10px;
}

.c-dropdown {
  display: inline-block;
  min-width: 200px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  background: #fff;
}

.c-dropdown summary {
  padding: 12px 16px;
}

.c-dropdown > a {
  display: block;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
}

.c-dropdown > a:hover {
  background: #f5f5f4;
}

#site-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(90vw, 420px);
  background: #1c1917;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  z-index: 5;
}

/* RU / EN: html[data-lang] + .c-ru/.c-en and legacy .ru/.en */
html[data-lang="ru"] .c-en,
html[data-lang="ru"] .en,
html[data-lang="en"] .c-ru,
html[data-lang="en"] .ru {
  display: none !important;
}

/* Soft defaults via :where() — page CSS must win (custom pill/toggle designs). */
:where(.c-lang-switch) {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  background: #fff;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

:where(.c-lang-switch) :where([data-c-set-lang]) {
  border: 0;
  background: transparent;
  color: #57534e;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

:where(.c-lang-switch) :where([data-c-set-lang][aria-pressed="true"]) {
  background: #0f766e;
  color: #fff;
}
