/* The page language is explicit, crawlable and never selected automatically. */
.header-inner { gap: 20px; }
.header-inner > .brand { order: 1; }
.header-inner > .navbar { order: 2; margin-left: auto; gap: 21px; }
.header-inner > .language-switcher { order: 3; }
.header-inner > .menu-toggle { order: 4; }
.header-inner > .legal-back { order: 2; margin-left: auto; }
.language-switcher { position: relative; flex: 0 0 auto; font-family: var(--font-body); }
.language-switcher > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 76px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  transition: border-color .2s, background .2s;
}
.language-switcher > summary::-webkit-details-marker { display: none; }
.language-switcher > summary:hover,
.language-switcher[open] > summary { border-color: #859b91; background: #f7f9f4; }
.language-switcher > summary svg { flex-shrink: 0; }
.language-chevron { font-size: 15px; line-height: 1; transition: transform .2s; }
.language-switcher[open] .language-chevron { transform: rotate(180deg); }
.language-options {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  min-width: 190px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 35px #193d3b14;
}
.language-options > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
}
.language-options > a:hover { background: var(--sage); }
.language-options > a[aria-current="page"] { background: var(--sage); font-weight: 600; }
.language-options > a > span { color: var(--coral); }
/* Room for longer translated phrases without shrinking the text. */
.hero-copy, .method-copy, .contact-copy, .app-copy { min-width: 0; }
.hero h1 { overflow-wrap: anywhere; }
.course-top { flex-wrap: wrap; }
.course-body { display: flex; flex-direction: column; flex: 1; }
.course-card { display: flex; flex-direction: column; }
.course-body .text-link { margin-top: auto; }
.course-body p { margin-bottom: 18px; }
.method-caption p { min-width: 0; }
.contact-person > div { min-width: 0; }
.contact-person span { display: block; }
.legal-language-notice {
  grid-column: 2;
  align-self: start;
  padding: 15px 19px;
  border-left: 3px solid var(--coral);
  border-radius: 0 5px 5px 0;
  background: var(--sage);
  font-size: 13px;
  color: var(--muted);
}
.legal-language-notice + .legal-content { grid-column: 2; }
.legal-layout:has(.legal-language-notice) { row-gap: 28px; }
.legal-layout:has(.legal-language-notice) .legal-sidebar { grid-row: 1 / 3; }
html:lang(ru) h1, html:lang(uk) h1 { letter-spacing: -.055em; }
html:lang(ru) .hero h1, html:lang(uk) .hero h1 { font-size: clamp(42px, 4.1vw, 60px); }
html:not(:lang(de)) .hero-actions { flex-wrap: wrap; }
html:not(:lang(de)) .course-body p { min-height: 94px; }
@media (min-width: 1101px) and (max-width: 1300px) {
  .header-inner { gap: 14px; }
  .header-inner > .navbar { gap: 14px; font-size: 11px; }
  .header-inner .nav-app { margin-left: 0; }
  .header-inner .button-small { font-size: 11px; padding-inline: 12px; gap: 10px; }
  .header-inner .brand-name { font-size: 18px; }
  .header-inner .brand-mark { width: 40px; height: 40px; }
}
@media (max-width: 1100px) {
  .header-inner { min-height: 78px; flex-wrap: wrap; padding-block: 14px; gap: 0 14px; }
  .header-inner > .language-switcher { order: 2; margin-left: auto; }
  .header-inner > .menu-toggle { order: 3; }
  .header-inner > .navbar { order: 4; margin-left: 0; }
  .menu-toggle:not([hidden]) {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; border: 1px solid var(--line);
    border-radius: 6px; background: #fff; padding: 11px;
  }
  .menu-toggle span { height: 1.5px; width: 20px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(6.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6.5px) rotate(-45deg); }
  .header-inner > .navbar { width: 100%; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; padding-top: 16px; }
  .js .header-inner > .navbar { display: none; }
  .js .header-inner > .navbar.is-open { display: flex; flex-direction: column; align-items: stretch; padding-block: 15px 8px; gap: 2px; }
  .js .navbar.is-open > a:not(.button) { padding-block: 13px; border-bottom: 1px solid var(--line); }
  .header-inner .navbar .button-small { font-size: 13px; padding: 13px; margin-top: 8px; }
  .header-inner .navbar .nav-app { font-size: 13px; }
  .header-inner .navbar .nav-app::before { content: none; }
  .header-inner > .legal-back { order: 3; margin-left: 0; }
}
@media (max-width: 800px) {
  .header-inner { gap: 0 12px; }
  .language-switcher > summary { min-width: 72px; padding: 10px; }
  html:lang(ru) .hero h1, html:lang(uk) .hero h1 { font-size: clamp(32px, 5vw, 40px); }
  .method-caption p { font-size: 11px; }
  .caption-star { display: none; }
  .contact-person { flex-wrap: wrap; }
}
@media (max-width: 680px) {
  .legal-language-notice, .legal-language-notice + .legal-content { grid-column: 1; }
  .legal-layout:has(.legal-language-notice) .legal-sidebar { grid-row: auto; }
  .legal-page .header-inner > .legal-back { min-width: 44px; min-height: 44px; padding: 10px; }
  .legal-page .legal-back-label { display: none; }
}
@media (max-width: 600px) {
  .header-inner { padding-block: 12px; gap: 0 9px; }
  .header-inner .brand-name { font-size: 16px; }
  .header-inner .brand-mark { width: 32px; height: 34px; font-size: 27px; }
  .header-inner .brand-subtitle { font-size: 5px; letter-spacing: .12em; }
  .header-inner .brand { gap: 7px; }
  .language-switcher > summary { min-width: 64px; gap: 5px; padding: 10px 8px; font-size: 11px; }
  .language-switcher > summary svg { width: 16px; height: 16px; }
  .language-chevron { display: none; }
  .language-options { min-width: 185px; }
  html:lang(ru) .hero h1, html:lang(uk) .hero h1 { font-size: clamp(36px, 10vw, 56px); }
  html:lang(ru) .contact-copy h2 { font-size: clamp(34px, 9.5vw, 48px); }
  html:not(:lang(de)) .legal-hero h1 { font-size: clamp(40px, 8vw, 48px); }
  html:not(:lang(de)) .course-body p { min-height: 0; }
  .method-caption p { font-size: 12px; }
  .contact-person { flex-wrap: nowrap; }
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal-page .header-inner { min-height: 76px; gap: 0 9px; }
}
@media (max-width: 370px) {
  .header-inner { gap: 0 7px; }
  .legal-page .header-inner { gap: 0 7px; }
  .header-inner .brand-name { font-size: 14px; letter-spacing: -.6px; }
  .header-inner .brand-mark { width: 29px; height: 31px; font-size: 24px; border-radius: 9px 9px 9px 2px; }
  .header-inner .brand-mark > span { font-size: 18px; }
  .header-inner .brand-subtitle { display: none; }
  .language-switcher > summary { min-width: 58px; padding-inline: 7px; }
}
@media print { .language-switcher, .legal-language-notice { display: none; } }
