/* Shared affiliate chrome — same shell + header on every page.
   Narrow content uses .panel inside .shell; never shrink .shell itself. */

:root {
    --aff-shell: 960px;
    --aff-gutter: 48px;
    --aff-gutter-lg: 96px;
    --aff-header-mb: 48px;
    --aff-pad-top: 48px;
    --aff-pad-bottom: 80px;

    --bg: #2A2724;
    --text: rgba(250, 250, 249, 0.90);
    --text-muted: rgba(250, 250, 249, 0.58);
    --text-faint: rgba(250, 250, 249, 0.38);
    --heading: #FAFAF9;
    --accent: #DCC99C;
    --link: #A8B89C;
    --link-hover: #C8D6BE;
    --line: rgba(255, 255, 255, 0.08);
    --btn: #FAFAF9;
    --btn-text: #2A2724;
    --error: #E8A598;
    --success: #A8B89C;
}

.shell {
    position: relative;
    width: min(var(--aff-shell), calc(100% - var(--aff-gutter)));
    margin: 0 auto;
    padding: var(--aff-pad-top) 0 var(--aff-pad-bottom);
    min-height: 100vh;
    box-sizing: border-box;
}

@media (min-width: 900px) {
    .shell {
        width: min(var(--aff-shell), calc(100% - var(--aff-gutter-lg)));
    }
}

/* Fixed header band — logo always in the same place */
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: var(--aff-header-mb);
    min-height: 36px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--heading);
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: block;
}

.brand span {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.top-link,
.top-action {
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-faint);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    white-space: nowrap;
}

.top-link:hover,
.top-action:hover {
    color: var(--link);
}

/* Optional narrower content column — left-aligned with brand, not a new page width */
.panel {
    width: 100%;
    max-width: 480px;
}

.panel-wide {
    width: 100%;
    max-width: 800px;
}

/* Login etc: keep footer at bottom of viewport without shrinking shell */
.shell-col {
    display: flex;
    flex-direction: column;
}

.shell-col > .footer-links,
.shell-col > .footer {
    margin-top: auto;
    padding-top: 48px;
}
