/* Public header: desktop navigation, compact information menu, mobile drawer. */
#top .top-line { align-items: center; }
#top .logo { flex-direction: row; }
#top .logo img { display: block; width: 100%; height: auto; }
#top .logo > a { display: block; }
#top .top-r { flex-wrap: nowrap; }
#top .top-r > * { flex-shrink: 0; }
#top .link-account { background-size: 100% 100%; }
#top .link-account span { padding-left: 30px; }
#top .nav-information { display: none; }
#top .public-header-dropdown { position: relative; }
#top .public-header-dropdown > summary {
    cursor: pointer; list-style: none; padding: 0;
    background: transparent; border: 0;
}
#top .public-header-dropdown > summary::-webkit-details-marker { display: none; }
#top .public-header-dropdown > summary::after {
    content: ""; position: static; flex: 0 0 5px; width: 5px; height: 5px;
    margin-left: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
    background: none; transform: translateY(-2px) rotate(45deg);
}
#top .public-header-dropdown[open] > summary::after { transform: translateY(1px) rotate(225deg); }
#top .public-header-dropdown__panel {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 10;
    min-width: 100%; padding: 0; border: 0; background: transparent; box-shadow: none;
}
#top .public-header-dropdown__panel a {
    display: flex; align-items: center; gap: 7px; padding: 8px 0;
    color: #e2e5fc; font-size: 16px; line-height: 1.6; white-space: nowrap;
}
#top .public-header-dropdown__panel a img { width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; }
#top .public-header-dropdown__panel a:hover,
#top .public-header-dropdown__panel a[aria-current] { color: #ffb000; background: transparent; }
#top .public-realm-switch { position: relative; }
#top .public-realm-switch #serverSwitchForm { display: none; }
#top .public-realm-switch .rate-select { z-index: 20; }
#top .public-realm-switch .rate-selected:focus-visible,
#top .public-realm-switch .rate-option:focus-visible { outline: 2px solid #ffb000; outline-offset: 2px; }
#top .public-header-dropdown summary:focus-visible,
#top .public-header-dropdown a:focus-visible { outline: 2px solid #ffb000; outline-offset: 3px; }
@media (min-width: 1200px) {
    #top > .wrap { max-width: 1680px; padding-inline: 40px; }
    #top .top-line { display: grid; grid-template-columns: minmax(0,1fr) 190px minmax(0,1fr); gap: 24px; min-height: 64px; margin-top: 8px; }
    #top .top-l, #top .top-r, #top .logo { width: auto; min-width: 0; }
    #top .menu { gap: clamp(12px,1.2vw,24px); }
    #top .nav-link { gap: 7px; white-space: nowrap; }
    #top .nav-link img { width: 20px; height: 20px; object-fit: contain; }
    #top .top-r { gap: clamp(16px,1.7vw,30px); }
    #top .link-files { min-height: 40px; }
    #top .link-files::before { width: 38px; height: 38px; background-size: contain; }
    #top .link-files span { margin-left: 42px; }
    #top .mobile-realm-switch { display: none; }
    #top .nav-donate { order: 1; }
    #top .nav-forum { order: 2; }
    #top .nav-informer { order: 3; }
    #top .nav-support { order: 4; }
    #top .nav-statistics { order: 5; }
    #top .nav-information { order: 3; display: list-item; }
    #top .menu > .nav-informer, #top .menu > .nav-statistics, #top .menu > .nav-support { display: none; }
}
@media (min-width: 1200px) and (max-width: 1699px) {
    #top > .wrap { padding-inline: 24px; }
    #top .top-line { grid-template-columns: minmax(0,1fr) 170px minmax(0,1fr); gap: 18px; }
    #top .menu { gap: 16px; }
    #top .top-r { gap: 16px; }
}
@media (max-width: 1199px) {
    #top .menu .nav-statistics, #top .menu .mobile-files-nav { display: list-item !important; order: 7; }
    #top .menu .nav-support { display: list-item; }
    #top .menu .nav-information { display: none; }
    #top .menu .mobile-realm-switch { display: none; }
    #top .menu .mobile-files-nav { order: 4; }
    #top .top-line { min-height: 60px; margin-top: 0; }
    #top .top-l, #top .logo, #top .top-r { height: 40px; }
}
@media (min-width: 600px) and (max-width: 1199px) {
    #top .top-line { grid-template-columns: 40px minmax(150px, 202px) minmax(0, 1fr); gap: 20px; }
    #top .top-r { gap: 16px; }
}
@media (max-width: 599px) {
    #top .top-r .public-realm-switch { display: none; }
    #top .menu .mobile-realm-switch { display: block; order: 2; padding-top: 18px; }
    #top .mobile-realm-switch .public-realm-switch { display: block; width: max-content; margin-inline: auto; }
    #top .top-line { grid-template-columns: 32px minmax(0,1fr) 105px; gap: 12px; }
    #top .logo img { max-width: 170px; margin-inline: auto; }
}

/* Preserve the supplied Fairplay artwork proportions in both header locations. */
#top .logo img.header-logo--fairplay { object-fit: contain; max-height: 64px; }
#top .mobile-menu-brand img.header-logo--fairplay { object-fit: contain; max-height: 64px; }
@media (max-width: 1199px) {
    #top .logo img.header-logo--fairplay { max-height: 40px; }
}
