@layer site-reading {
  body > .shared-site-header[data-compact-header] {
    min-block-size: 64px !important;
    gap: 10px !important;
    padding-block: 5px !important;
    padding-inline: max(16px, calc((100% - 1440px) / 2)) !important;
  }

  body > .shared-site-header[data-compact-header] .shared-language {
    display: flex !important;
    align-items: center;
    gap: 3px !important;
    background: transparent;
  }

  body > .shared-site-header[data-compact-header] #site-language-caption {
    margin-inline-end: 4px;
    white-space: nowrap;
  }

  body > .shared-site-header[data-compact-header] .shared-language button {
    min-block-size: 44px !important;
    min-inline-size: 44px;
    padding-inline: 4px;
  }

  body > .shared-site-header[data-compact-header] #shared-navigation a {
    white-space: nowrap;
  }

  @media (max-width: 1199px) {
    body > .shared-site-header[data-compact-header] .shared-menu-toggle {
      display: inline-grid !important;
      place-items: center;
      border-color: var(--site-control-rule) !important;
      background: var(--site-raised) !important;
      color: var(--site-title) !important;
    }

    body > .shared-site-header[data-compact-header] #shared-navigation {
      display: none !important;
      position: absolute !important;
      z-index: 1000;
      inset: calc(100% + 4px) 0 auto auto !important;
      min-inline-size: 210px !important;
      padding: 6px;
      background: #0b1a2a;
      border: 1px solid var(--site-control-rule);
      border-radius: var(--site-radius-control);
    }

    body > .shared-site-header[data-compact-header] .shared-menu[data-open="true"] #shared-navigation {
      display: grid !important;
    }
  }

  @media (max-width: 720px) {
    body > .shared-site-header[data-compact-header] {
      min-block-size: 58px !important;
      gap: 5px !important;
      padding-inline: 8px !important;
    }
  }

  @media (max-width: 520px) {
    body > .shared-site-header[data-compact-header] #site-language-caption {
      position: absolute;
      inline-size: 1px;
      block-size: 1px;
      margin: 0;
      overflow: hidden;
      clip-path: inset(50%);
    }

    body > .shared-site-header[data-compact-header] .shared-language-caption-compact {
      display: none !important;
    }
  }

  @media (max-width: 420px) {
    body > .shared-site-header[data-compact-header] :is(.shared-post,.shared-post:hover) {
      inline-size: 60px !important;
    }
  }

  @media (max-width: 340px) {
    body > .shared-site-header[data-compact-header] .site-brand-mark {
      display: none;
    }
  }
}
