/* Separate from the theme's generated stylesheet. */
:root { --site-header-height: 72px; }
#header {
    display: flex;
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
    height: var(--site-header-height);
    padding: 0 24px 0 60px;
    background: #fff;
}
#header #btn-open-sidebar {
    top: 0;
    left: 8px;
    width: 44px;
    height: 72px;
    padding: 0;
    background: transparent;
    border: 0;
    color: #555;
    cursor: pointer;
}
#header .header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    line-height: 1.4;
    text-align: left;
    white-space: nowrap;
    flex-shrink: 0;
}
#header .header-title-link { font-size: 16px; }
#header #header-lang-btn {
    padding: 5px 8px;
    color: #555;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
}
#header #header-lang-btn span { color: inherit !important; }
#header .top-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    height: 100%;
    margin-left: auto;
}
#header .top-navigation a {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: #555;
    font-size: 16px;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}
#header .top-navigation a:hover,
#header .top-navigation a[aria-current="page"] {
    color: #187ca2;
    border-bottom-color: #187ca2;
}
#header a:focus-visible, #header button:focus-visible {
    outline: 2px solid #187ca2;
    outline-offset: 3px;
}
#header.header-up:not(.pushed) { transform: none; }
#main:not(.hasCover) { padding-top: calc(var(--site-header-height) + 20px); }
.post-header-cover { margin-top: var(--site-header-height); }
html { scroll-padding-top: calc(var(--site-header-height) + 20px); }
/* Keep all five tabs usable on small screens without shrinking their text. */
@media (max-width: 1000px) {
    :root { --site-header-height: 120px; }
    #header { flex-wrap: wrap; gap: 0; padding: 0 16px; }
    #header .header-title { width: 100%; height: 64px; padding-left: 40px; box-sizing: border-box; }
    #header #btn-open-sidebar { height: 64px; }
    #header .top-navigation { height: 56px; width: 100%; gap: 20px; }
}
@media (max-width: 540px) {
    #header { padding: 0 10px; }
    #header .header-title { gap: 8px; }
    #header .header-title-link { font-size: 14px; white-space: normal; }
    #header #header-lang-btn { flex-shrink: 0; }
    #header .top-navigation { justify-content: flex-start; gap: 16px; overflow-x: auto; }
    #header .top-navigation a { font-size: 14px; flex-shrink: 0; }
}
@media print {
    #header { display: none; }
    #main:not(.hasCover) { padding-top: 0; }
    .post-header-cover { margin-top: 0; }
}
