/* Shared docs and blog landing skeleton: header, hero, main, aside, footer.
   Byte-identical in every theme that ships it (validate-themes.py checks); each theme maps the --sk-* tokens in screen.css. */

/* Header: brand left, section links after it, then any other header widget; staff login sits at the right end. */
.site-header {
    position: relative;
    background: var(--sk-surface);
    border-bottom: 1px solid var(--sk-border);
}

.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1.25rem;
    min-height: var(--sk-bar-height);
    padding: 0 9rem 0 1.5rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    color: var(--sk-heading);
    text-decoration: none;
}

.site-brand:hover {
    color: var(--sk-heading);
    text-decoration: underline;
}

.site-brand-logo {
    height: 1.75rem;
    width: auto;
}

.site-brand-name {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.site-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav-item {
    display: flex;
    align-items: center;
}

.site-nav-item + .site-nav-item::before {
    content: "";
    width: 1px;
    height: 1rem;
    background: var(--sk-border);
}

.site-nav-item > a,
.site-nav-item > span {
    display: inline-flex;
    align-items: center;
    height: var(--sk-bar-height);
    padding: 0 0.75rem;
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    color: var(--sk-muted);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.site-nav-item > a:hover {
    color: var(--sk-heading);
}

.site-nav-item.is-current > a,
.site-nav-item.is-ancestor > a {
    color: var(--sk-heading);
    border-bottom-color: var(--sk-accent);
}

/* Built-in controls (the color mode switcher) sit at the right end of the row, left of staff login. */
.site-header-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.site-header-tools:empty {
    display: none;
}

body .staff-login-entry {
    position: absolute;
    top: 0;
    right: 1.5rem;
    height: var(--sk-bar-height);
    display: flex;
    align-items: center;
}

body .staff-login-entry__link {
    min-height: 2.75rem;
    padding: 0 0.25rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    color: var(--sk-muted) !important;
    font-size: 0.875rem;
    font-weight: 600;
}

body .staff-login-entry__link:hover,
body .staff-login-entry__link:focus {
    color: var(--sk-heading) !important;
    text-decoration: underline;
}

/* Landing: a hero band (title, one line, then the search or subscribe slot), then main beside an aside rail. */
.landing-inner {
    width: 100%;
    max-width: calc(72rem + var(--sk-gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--sk-gutter);
}

.landing-hero {
    padding: 3.5rem 0 3rem;
    background: var(--sk-ground);
    border-bottom: 1px solid var(--sk-line);
}

.landing-hero-inner {
    max-width: calc(48rem + var(--sk-gutter) * 2);
    text-align: center;
}

.landing-hero-text h1,
.landing-title {
    margin: 0;
    color: var(--sk-heading);
    font-size: 2.75rem;
    line-height: 1.15;
}

.landing-hero-text p,
.landing-lede {
    margin: 0.5rem 0 0;
    color: var(--sk-body);
    font-size: 1.1875rem;
    line-height: 1.55;
}

.landing-hero-slot {
    margin-top: 1.75rem;
    text-align: left;
}

.landing-hero-slot:empty {
    display: none;
}

.landing-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
}

.landing-body:has(> .landing-aside) {
    grid-template-columns: minmax(0, 1fr) 21rem;
    align-items: start;
}

.landing-main {
    min-width: 0;
}

.landing-aside {
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

/* Footer: brand and tagline left, links in the middle, copyright right. Widgets render straight into the row. */
.site-footer {
    background: var(--sk-ground);
    border-top: 1px solid var(--sk-border);
    color: var(--sk-muted);
    font-size: 0.9375rem;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.5rem 2.5rem;
    max-width: calc(72rem + var(--sk-gutter) * 2);
    margin: 0 auto;
    padding: 2.25rem var(--sk-gutter) 2rem;
}

.site-footer-inner > * {
    order: 2;
}

.site-footer-brand {
    order: 1;
    flex: 1 1 16rem;
    min-width: 0;
}

.site-footer-copy {
    order: 3;
    flex: 0 0 auto;
    margin: 0 0 0 auto;
    font-size: 0.875rem;
}

.site-footer-name {
    margin: 0 0 0.375rem;
    color: var(--sk-heading);
    font-size: 1.125rem;
    font-weight: 700;
}

.site-footer-tagline,
.site-footer-contact {
    max-width: 24rem;
    margin: 0;
}

.site-footer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-top: 0.5rem;
}

.site-footer-nav,
.site-footer-group {
    min-width: 9rem;
}

.site-footer-heading {
    margin: 0 0 0.5rem;
    color: var(--sk-heading);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
}

.site-footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    color: var(--sk-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer-links a:hover {
    color: var(--sk-heading);
}

@media (max-width: 64rem) {
    .landing-body:has(> .landing-aside) {
        grid-template-columns: minmax(0, 1fr);
    }

    .landing-aside {
        position: static;
    }
}

@media (max-width: 48rem) {
    .site-header-inner {
        gap: 0 1rem;
        padding: 0 7.5rem 0 1rem;
    }

    .site-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        margin: 0 -0.75rem;
    }

    body .staff-login-entry {
        right: 1rem;
    }

    .landing-inner,
    .site-footer-inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .landing-hero {
        padding: 2.25rem 0 2rem;
    }

    .landing-hero-text h1,
    .landing-title {
        font-size: 2.125rem;
    }

    .landing-body {
        padding-top: 1.75rem;
        padding-bottom: 2.5rem;
    }

    .site-footer-inner > * {
        flex-basis: 100%;
    }

    .site-footer-copy {
        margin-left: 0;
    }

    .site-footer-links a {
        min-height: 2.75rem;
    }
}
