/* P1 navigation repair. Loaded after the existing page styles. */
header.wrap { gap: 20px; }
header.wrap nav {
  display: flex !important; flex-wrap: wrap !important; align-items: center !important;
  justify-content: flex-end !important; overflow: visible !important;
  white-space: normal !important; min-width: 0 !important; gap: 10px 16px !important;
}
header.wrap nav > a, header.wrap nav .lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; color: #d4d4d8;
}
header.wrap nav .lang-switch {
  display: inline-flex !important; align-items: center; flex: 0 0 auto;
  gap: 6px !important; margin-left: 0 !important;
}
header.wrap nav .lang-switch a.active {
  color: #09090b !important; background: #bef264 !important; border-color: #bef264 !important;
}
header.wrap nav a:focus-visible { outline: 2px solid #bef264; outline-offset: 3px; }
header.wrap nav > a[aria-current="page"] { color: #bef264 !important; }
html[lang="ru"] h1 { overflow-wrap: anywhere; hyphens: auto; }
.content-grid > *, .content-main, .content-card { min-width: 0; }
.content-card { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  html[lang="ru"] h1 { font-size: clamp(28px, 7.8vw, 36px) !important; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  html[lang="ru"] .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  header.wrap { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }
  header.wrap nav { width: 100% !important; justify-content: flex-start !important; gap: 6px !important; }
  header.wrap nav > a, header.wrap nav .lang-switch a {
    flex: 0 0 auto !important; white-space: nowrap !important; font-size: 13px !important;
    line-height: 1.2 !important; min-height: 36px !important; padding: 8px 10px !important;
    border: 1px solid rgba(255,255,255,.18) !important; border-radius: 999px !important;
    background: rgba(255,255,255,.035) !important;
  }
  header.wrap nav .lang-switch a.active { background: #bef264 !important; border-color: #bef264 !important; }
}

/* Shared P2 components. P1 navigation is prepended by the build script. */
:root { --muted: #c4c4cc; --muted2: #b8b8c4; }
.brand-sub, .small-note, .field-help, .optional, .card-label, .map-title,
.meta-label, .meta-note, .micro, .eyebrow { color: #b8b8c4 !important; }
.small-note, .field-help { font-size: 14px; line-height: 1.6; }
.btn-primary { color: #09090b !important; }
.lang-switch a.active { text-decoration: underline; text-underline-offset: 3px; }
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid #bef264 !important; outline-offset: 4px !important;
}
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1000;
  padding: 14px 20px; color: #09090b; background: #bef264; border-radius: 8px;
  transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.side-card h2 { margin: 0 0 15px; font-size: 20px !important; line-height: 1.3 !important; letter-spacing: -.02em; }
.cmk-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: baseline; gap: 20px; }
.cmk-footer .footer-links { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.cmk-footer a { display: inline-flex; align-items: center; min-height: 36px;
  color: #d4d4d8; text-decoration: underline; text-underline-offset: 4px; }
.cmk-footer a:hover { color: #bef264; }
.contact-page .page-hero { padding: 36px 0 24px !important; }
.contact-page .page-title { font-size: clamp(32px, 5vw, 64px) !important; margin-bottom: 16px !important; }
.contact-page .page-lead { margin-bottom: 0 !important; }
.contact-page .form-wrap { padding: 24px 0 64px !important; }
.contact-page .form-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
.contact-page .form-grid > * { min-width: 0; }
.contact-page .form-card > h2 { margin: 0 0 16px; font-size: 24px !important; line-height: 1.3 !important; }
.contact-page .form-card label:first-of-type { margin-top: 16px; }
.contact-page .field-help a, .contact-page .side-card a, .notice a {
  text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere;
}
.contact-page .side-card { position: static; }
.contact-page .field-help { margin: 8px 0 16px; }
.contact-page .notice:focus { outline: 3px solid #bef264; outline-offset: 4px; }
.contact-page .notice.error { color: #ffe4e6; border-color: #fda4af; }
.contact-page select, .contact-page input, .contact-page textarea { color-scheme: dark; font-size: 16px !important; }
.contact-page input::placeholder, .contact-page textarea::placeholder { color: #b8b8c4; opacity: 1; }
.contact-page .submit-button { margin-top: 22px; }
@media (max-width: 900px) { .contact-page .form-grid { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 560px) { .cmk-footer .wrap { flex-direction: column; align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
