body.selfhost-page {
    min-height: 100vh;
    margin: 0;
    background: #050506;
    color: var(--color-text);
    overflow-x: hidden;
}

body.selfhost-page .site-nav {
    position: relative;
    z-index: 3;
}

body.selfhost-page .site-nav-brand {
    display: none;
}

.selfhost-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 2rem));
    margin: 0 auto;
    padding: 1.2rem 0 4rem;
}

.selfhost-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(110deg, rgba(4, 10, 13, 0.86), rgba(0, 0, 0, 0.46) 52%, rgba(18, 7, 6, 0.72)),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.78));
    z-index: -1;
}

.selfhost-hero {
    min-height: min(76vh, 720px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem 0 4rem;
}

.selfhost-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text);
    text-decoration: none;
    margin-bottom: 3rem;
}

.selfhost-brand img {
    width: 36px;
    height: 36px;
}

.selfhost-brand span {
    font-family: Rubik, 'Rubik Blank';
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0;
}

.selfhost-kicker,
.section-label {
    margin: 0 0 0.75rem;
    color: #91d8d2;
    font-family: 'Noto Sans Mono', 'Noto Sans Mono Blank';
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.selfhost-hero h1,
.selfhost-section h2 {
    font-family: Rubik, 'Rubik Blank';
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
}

.selfhost-hero h1 {
    max-width: 13ch;
    font-size: clamp(2.6rem, 7vw, 5.6rem);
    line-height: 0.98;
}

.selfhost-intro {
    max-width: 42rem;
    margin: 1.5rem 0 0;
    color: #e4e4e4;
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.55;
}

.selfhost-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    box-sizing: border-box;
    border-radius: 8px;
    font-family: Rubik, 'Rubik Blank';
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0;
    text-decoration: none;
    transition: filter 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.primary-action {
    background: #4ca8a1;
    color: #001210;
    padding: 0.78rem 1.2rem;
}

.secondary-action {
    color: #f4f0ed;
    border: 1px solid rgba(244, 240, 237, 0.3);
    padding: 0.72rem 1rem;
}

.primary-action:hover,
.secondary-action:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.secondary-action:hover {
    border-color: rgba(145, 216, 210, 0.7);
}

.selfhost-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    gap: clamp(1rem, 4vw, 3rem);
    align-items: start;
    padding: clamp(2rem, 5vw, 4rem) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.selfhost-section h2 {
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    line-height: 1.08;
    max-width: 16ch;
}

.selfhost-section p {
    margin: 1rem 0 0;
    color: #dddddd;
    font-size: 1rem;
    line-height: 1.65;
    max-width: 42rem;
}

.selfhost-section a {
    color: #91d8d2;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.selfhost-section code {
    font-family: 'Noto Sans Mono', 'Noto Sans Mono Blank', monospace;
}

.selfhost-section pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid rgba(145, 216, 210, 0.28);
    border-radius: 8px;
    background: rgba(2, 6, 7, 0.82);
    color: #f7f4ef;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.selfhost-section pre code {
    display: block;
    font-size: 0.86rem;
    line-height: 1.55;
    white-space: pre;
}

.selfhost-artifact pre {
    align-self: center;
}

.license-summary {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 0;
}

.license-summary h2 {
    max-width: none;
}

.license-summary p {
    max-width: 56rem;
}

@media (max-width: 760px) {
    .selfhost-shell {
        width: min(100% - 1rem, 680px);
    }

    .selfhost-hero {
        min-height: auto;
        padding: 2rem 0 3rem;
    }

    .selfhost-brand {
        margin-bottom: 2rem;
    }

    .selfhost-section {
        grid-template-columns: 1fr;
    }

    .selfhost-section pre {
        max-width: 100%;
    }

    .primary-action,
    .secondary-action {
        width: 100%;
        justify-content: center;
    }
}
