html {
  scroll-behavior: smooth;
}

body {
  animation: page-fade-in .32s ease both;
}

.app > .sidebar,
.dashboard > .sidebar {
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a,
button {
  transition:
    color .18s ease,
    background-color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

button:not(:disabled):hover {
  filter: brightness(1.04);
}

button:not(:disabled):active {
  transform: scale(.98);
}

button[aria-busy="true"]:not(.publish-button)::before {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  vertical-align: middle;
  animation: site-button-spinner .7s linear infinite;
}

@keyframes site-button-spinner {
  to { transform: rotate(360deg); }
}

img,
video,
iframe {
  max-width: 100%;
}

@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-column {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .header + .navigation {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: clamp(18px, 5vw, 32px);
    padding-inline: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .header + .navigation a {
    flex: 0 0 auto;
  }

  .footer-bottom {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .footer-bottom p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .page-shell,
  .main-container,
  .legal-shell {
    padding-inline: 16px;
  }

  .header-search {
    min-width: 0;
  }
}

  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

.site-language-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: inherit;
  font: inherit;
  white-space: nowrap;
}

.site-language-label {
  font-size: 11px;
  font-weight: 700;
}

.site-language-control select {
  max-width: 150px;
  min-height: 34px;
  padding: 5px 25px 5px 9px;
  border: 1px solid rgba(127, 139, 158, .45);
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.site-language-control-floating {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  padding: 7px 9px;
  border: 1px solid rgba(127, 139, 158, .3);
  border-radius: 9px;
  background: #fff;
  color: #172033;
  box-shadow: 0 4px 16px rgba(16, 28, 58, .14);
}

@media (max-width: 760px) {
  .site-language-control {
    gap: 0;
  }

  .site-language-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .site-language-control select {
    max-width: 112px;
    min-height: 32px;
    font-size: 11px;
  }
}

  .header-search.has-error {
    outline: 2px solid #e53935;
    outline-offset: 2px;
  }

  .header-search .header-search-icon.is-error {
    color: #dc2626;
    font-weight: 800;
  }

  .header-search.has-error input::placeholder {
    color: #dc2626;
    opacity: 1;
  }

@media (max-width: 600px) {
  .footer-main {
    gap: 20px 16px;
  }

  .footer-column h4 {
    font-size: .85rem;
    letter-spacing: .04em;
  }

  .footer-column a {
    font-size: .9rem;
    overflow-wrap: anywhere;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .header {
    gap: 12px;
  }

  .header .logo small {
    display: none;
  }

  .header-actions {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 767px) {
  .header {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: 40px 42px;
    align-items: center;
    column-gap: 8px;
    row-gap: 8px;
    width: 100%;
    height: 106px;
    min-height: 106px;
    padding: 8px 16px;
    overflow: hidden;
    transition: height .2s ease, min-height .2s ease, grid-template-rows .2s ease;
  }

  .header > .site-menu-toggle {
    display: grid;
    grid-area: 1 / 1;
    width: 40px;
    height: 40px;
    justify-self: start;
    margin: 0;
  }

  .header > .logo {
    grid-area: 1 / 2;
    justify-self: center;
    min-width: 0;
    max-width: 100%;
    font-size: clamp(18px, 5.2vw, 21px);
    letter-spacing: -1px;
    white-space: nowrap;
  }

  .header > .header-actions {
    grid-area: 1 / 3;
    justify-self: end;
    min-width: 0;
    margin: 0;
    gap: 0;
  }

  .header-actions > :not(.publish-btn) {
    display: none;
  }

  .header > .header-actions > .header-link,
  .header > .header-actions > .account-btn {
    display: none;
  }

  .header-actions > .publish-btn {
    display: none;
  }

  .header > .header-search-wrap,
  .header > .header-search {
    grid-area: 2 / 1 / 3 / 4;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
  }

  .header .header-search {
    height: 42px;
  }

  .header .header-search-icon,
  .header .header-search > span {
    flex: 0 0 34px;
    padding: 0 8px;
    font-size: 22px;
  }

  .header .header-search input {
    min-width: 0;
    padding: 0 6px;
    font-size: 13px;
  }

  .header .header-search button {
    flex: 0 0 auto;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .header + .navigation {
    display: none;
  }

}

.site-brand-name {
  display: inline-block;
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
  letter-spacing: inherit;
  line-height: 1;
  white-space: nowrap;
}

.logo .site-brand-name {
  color: inherit;
}

.site-brand-accent {
  color: var(--teal, var(--blue, #18b6a4));
}

.logo .site-brand-accent {
  color: var(--yellow, #ffd166);
}

.admin-brand .site-brand-accent {
  color: var(--admin-teal, #22c7b5);
}

.admin-brand-caption {
  color: #8ea2b6;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
}

