.rail-language {
  position: relative;
  flex: 0 0 auto;
  padding: 0 8px 7px;
}

.language-picker {
  position: relative;
  color: var(--on-surface);
}

.language-picker--app-bar {
  display: none;
}

.language-picker > summary {
  list-style: none;
}

.language-picker > summary::-webkit-details-marker {
  display: none;
}

.language-picker__summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 14px;
  color: var(--on-surface-variant);
  cursor: pointer;
  user-select: none;
}

.language-picker__summary:hover,
.language-picker[open] .language-picker__summary {
  background: var(--surface-low);
  color: var(--on-surface);
}

.language-picker__summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 42%, transparent);
  outline-offset: 2px;
}

.language-picker__summary > .material-symbols-rounded:first-child {
  font-size: 22px;
}

.language-picker__label {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.language-picker__code {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.language-picker__chevron {
  font-size: 19px;
  transition: transform 160ms ease;
}

.language-picker[open] .language-picker__chevron {
  transform: rotate(180deg);
}

.language-picker__menu {
  position: absolute;
  z-index: 40;
  display: grid;
  width: 210px;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--outline-variant);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgb(0 0 0 / 24%);
}

.language-picker--rail .language-picker__menu {
  right: 0;
  bottom: calc(100% + 7px);
}

.language-picker--app-bar .language-picker__menu {
  top: calc(100% + 7px);
  right: 0;
}

.language-picker__menu a {
  display: grid;
  min-height: 46px;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border-radius: 11px;
  color: var(--on-surface);
  text-decoration: none;
}

.language-picker__menu a:hover {
  background: var(--surface-low);
}

.language-picker__menu a[aria-current='page'] {
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.language-picker__language {
  font-size: 14px;
  font-weight: 600;
}

.language-picker__short {
  color: var(--on-surface-variant);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.language-picker__menu a[aria-current='page'] .language-picker__short {
  color: currentColor;
  opacity: 0.8;
}

.language-picker__menu .material-symbols-rounded {
  justify-self: end;
  font-size: 19px;
}

.document-app-bar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  margin-inline-end: 10px;
}

.document-app-bar__actions .document-app-bar__appearance {
  margin-inline-end: 0;
}

.language-picker--app-bar .language-picker__summary {
  display: grid;
  width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
}

.language-picker--app-bar .language-picker__summary > .material-symbols-rounded {
  font-size: 23px;
}

/* Keep the compact title unchanged, but make the expanded page titles larger
   and place them lower in the expanded app bar. */
.page-with-app-bar {
  --turp-title-shift: 68px;
  --turp-title-expanded-scale: 1.34;
}

.home-shell.page-with-app-bar {
  --turp-title-shift: 70px;
  --turp-title-expanded-scale: 2.08;
}

/* Main landing headings get a little more visual weight while their content
   starts lower, leaving a clearer gap under the expanded app-bar title. */
.home-page .home-hero {
  padding-top: 34px;
}

.home-page .home-hero__title {
  font-size: clamp(40px, 4.45vw, 64px);
  line-height: 1.02;
}

html[lang='tr'] .home-page .home-hero__title {
  font-size: clamp(38px, 4.15vw, 60px);
}

.home-page .home-section__title {
  font-size: clamp(30px, 3vw, 42px);
}

html[lang='tr'] .home-page .home-section__title {
  font-size: clamp(29px, 2.85vw, 40px);
}

/* Lower and enlarge the live branding inside the 2:1 banner too. */
html .home-hero__brand-card {
  inset: 55% 24px auto;
}

html .home-hero__brand-copy strong {
  font-size: clamp(31px, 3.9vw, 48px);
}

@media (max-width: 820px) {
  .language-picker--app-bar {
    display: block;
  }

  .document-app-bar__row {
    grid-template-columns: 104px minmax(0, 1fr) 104px;
  }

  .document-app-bar__menu {
    justify-self: start;
    margin-inline-start: 12px;
  }

  .document-app-bar__actions {
    margin-inline-end: 6px;
  }

  .page-with-app-bar {
    --turp-title-shift: 70px;
    --turp-title-expanded-scale: 1.36;
  }

  .home-shell.page-with-app-bar {
    --turp-title-shift: 74px;
    --turp-title-expanded-scale: 2.18;
  }

  .home-page .home-hero {
    padding-top: 20px;
  }

  .home-page .home-hero__title {
    font-size: clamp(37px, 9.4vw, 48px);
  }

  html[lang='tr'] .home-page .home-hero__title {
    font-size: clamp(35px, 8.9vw, 45px);
  }

  .home-page .home-section__title,
  html[lang='tr'] .home-page .home-section__title {
    font-size: clamp(27px, 7vw, 35px);
  }

  html .home-hero__brand-card {
    inset: 56% 16px auto;
  }

  html .home-hero__brand-copy strong {
    font-size: 32px;
  }
}

@media (max-width: 520px) {
  .home-page .home-hero {
    padding-top: 18px;
  }

  .home-page .home-hero__title {
    font-size: clamp(35px, 9.6vw, 44px);
  }

  html[lang='tr'] .home-page .home-hero__title {
    font-size: clamp(33px, 9vw, 42px);
  }

  html .home-hero__brand-card {
    inset: 57% 16px auto;
  }

  html .home-hero__brand-copy strong {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-picker__chevron {
    transition: none;
  }
}
