.pastel-home-header {
  --topbar-height: 26px;
  top: calc(10px + var(--pastel-admin-offset, 0px));
  left: clamp(12px, 3vw, 56px);
  right: clamp(12px, 3vw, 56px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  height: calc(var(--header) - 16px + var(--topbar-height));
  padding-inline: clamp(14px, 2vw, 30px);
  gap: 0 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--ivory) 94%, transparent);
  box-shadow: 0 8px 26px #27353b10;
}

body.admin-bar .pastel-home-header {
  --pastel-admin-offset: var(--wp-admin--admin-bar--height, 32px);
}

.pastel-home-header .brand { flex: 0 0 auto; width: clamp(100px, 8.5vw, 134px); height: auto; }
.pastel-home-header .brand img { display: block; width: 100%; height: auto; }
.pastel-home-header .header-actions { order: 2; gap: 12px; }
.pastel-home-header .menu-toggle { display: none; }
.pastel-menu-icon { flex: none; }
.pastel-menu-cross,
.menu-toggle[aria-expanded="true"] .pastel-menu-bars { display: none; }
.menu-toggle[aria-expanded="true"] .pastel-menu-cross { display: initial; }
.pastel-home-header #motion-toggle { min-width: 30px; min-height: 40px; }

.pastel-topbar {
  display: flex;
  grid-column: 1 / -1;
  order: -1;
  align-items: center;
  align-self: stretch;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.pastel-hours { margin-inline-end: auto; white-space: nowrap; }
.pastel-topbar nav,
.pastel-language-links { display: flex; align-items: center; }
.pastel-topbar a {
  display: grid;
  place-items: center;
  min-width: 25px;
  min-height: 24px;
  border-radius: var(--radius-button);
  font-weight: 600;
}
.pastel-topbar a:hover { background: var(--lilac); color: var(--violet); }
.pastel-topbar svg { width: 14px; height: 14px; }

.pastel-phone,
.footer-back-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-button);
  background: var(--sky);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pastel-phone:hover,
.footer-back-top:hover { background: var(--lilac); color: var(--violet); }

.pastel-navigation { display: flex; justify-self: center; align-items: center; gap: 12px; color: var(--ink); }
.pastel-menu-languages { display: none; }
.pastel-nav-list,
.pastel-nav-sublist { list-style: none; padding: 0; margin: 0; }
.pastel-navigation li::before { content: none; }
.pastel-nav-list { display: flex; align-items: center; gap: 2px; }
.pastel-nav-list > li { position: relative; }
.pastel-navigation a,
.pastel-navigation summary { line-height: 1.35; }

.pastel-nav-list > li > a,
.pastel-nav-list > li > details > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 9px;
  border-radius: 12px;
  font-size: 13px;
  white-space: nowrap;
}

.pastel-navigation summary { list-style: none; cursor: pointer; }
.pastel-navigation summary::-webkit-details-marker { display: none; }
.pastel-nav-chevron {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin: 0 2px 3px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.pastel-navigation details[open] > summary > .pastel-nav-chevron {
  margin: 3px 2px 0;
  transform: rotate(225deg);
}

.pastel-nav-list > li > details > .pastel-nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(430px, 42vw);
  max-height: min(68vh, 38rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--ivory);
  box-shadow: 0 14px 38px #27353b1d;
}
.pastel-nav-list > li:nth-last-child(-n+2) > details > .pastel-nav-panel { left: auto; right: 0; }
.pastel-nav-sublist a,
.pastel-nav-sublist summary,
.pastel-nav-overview { display: block; padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.pastel-nav-sublist summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pastel-nav-overview { font-weight: 600; color: var(--violet); }
.pastel-nav-sublist small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.pastel-nav-sublist .pastel-nav-panel { margin-inline-start: 12px; border-inline-start: 1px solid var(--line); }
.pastel-nav-list a:hover,
.pastel-navigation summary:hover,
.pastel-navigation details[open] > summary { background: var(--lilac); }

.footer-bottom .footer-back-top { margin-inline-start: auto; min-height: 44px; padding-inline: 16px; }
.footer-back-top span { font-size: 19px; line-height: 1; }

@media (max-width: 1360px) {
  .pastel-home-header { grid-template-columns: auto minmax(0, 1fr); }
  .pastel-home-header .header-actions { justify-self: end; }
  .pastel-home-header .menu-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
  .pastel-navigation {
    display: none;
    position: absolute;
    grid-column: 1 / -1;
    justify-self: stretch;
    top: calc(100% + 8px);
    inset-inline: 0;
    padding: 10px;
    max-height: calc(100dvh - var(--header) - var(--topbar-height) - var(--pastel-admin-offset, 0px) - 24px);
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--ivory);
    box-shadow: 0 14px 38px #27353b1d;
  }
  .pastel-navigation[data-open="true"],
  .pastel-nav-list { display: block; }
  .pastel-menu-languages {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 12px;
    border-block-end: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
  }
  .pastel-menu-languages a {
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-button);
    color: var(--ink);
    font-weight: 600;
  }
  .pastel-menu-languages a:hover { background: var(--lilac); }
  .pastel-menu-languages a[aria-current="true"] {
    color: var(--violet);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .pastel-nav-list > li > a,
  .pastel-nav-list > li > details > summary { justify-content: space-between; padding-inline: 12px; }
  .pastel-nav-list > li > details > .pastel-nav-panel {
    position: static;
    width: auto;
    max-height: none;
    padding: 4px 0 4px 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (min-width: 768px) {
  .pastel-home-header {
    max-width: 1280px;
    margin-inline: auto;
  }
}

@media (min-width: 768px) and (max-width: 1360px) {
  .pastel-navigation {
    inset-inline-start: auto;
    width: min(100%, 30rem);
  }
}

@media (width < 768px) {
  :root {
    --pastel-mobile-header-top: 10px;
    --pastel-mobile-header-height: 56px;
  }

  .pastel-home-header {
    --topbar-height: 0px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: minmax(0, 1fr);
    top: calc(var(--pastel-mobile-header-top) + var(--pastel-admin-offset, 0px));
    height: var(--pastel-mobile-header-height);
    column-gap: 8px;
    border-radius: 18px;
  }
  .site-header.pastel-home-header .brand {
    grid-area: 1 / 1;
    justify-self: start;
    width: min(100%, 120px);
  }
  .pastel-home-header .header-actions { grid-area: 1 / 3; }
  .pastel-home-header .header-actions :is(#motion-toggle, .pastel-phone) { display: none; }
  .pastel-topbar {
    grid-area: 1 / 2;
    border-bottom: 0;
    font-size: 11px;
  }
  .pastel-topbar a { min-width: 28px; min-height: 44px; }
  .pastel-languages [aria-current="true"] {
    color: var(--violet);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .pastel-topbar :is(.pastel-hours, .pastel-social) { display: none; }
  .pastel-home-header .menu-toggle {
    gap: 5px;
    padding-inline: 6px;
  }
  .pastel-nav-list > li + li { border-block-start: 1px solid var(--line); }
  .pastel-nav-list > li > a,
  .pastel-nav-list > li > details > summary { min-height: 44px; }
  .footer-bottom .footer-back-top { order: 4; margin-inline-start: 0; }
}

@media (width < 768px), (hover: none) and (pointer: coarse) {
  .hero-scroll-link,
  .pastel-section-cue,
  .pastel-prose :is(.ethet-section-next, .etch-nav-down-block) { display: none !important; }
}

@media (scripting: none) and (max-width: 1360px) {
  .pastel-home-header { display: flex; }
  body.admin-bar .pastel-home-header { --pastel-admin-offset: 0px; }
  .pastel-topbar { flex: 0 0 100%; }
  .pastel-navigation { order: 3; }
}

@media (scripting: none) and (width < 768px) {
  .pastel-topbar { flex: 0 0 auto; order: 0; }
}
