:root {
    /* 1000px: wordmark width consistency across /create/ and /manage/. */
    --shell-w: 1000px;
    --shell-pad: 20px 18px 40px;

    /* Padding-bottom on .brand, not gap on .shell (footer already has padding-top). */
    --shell-gap: 22px;

    --split-side: 320px;
    --split-gap: 26px;

    /* Token so mechanism is shared; only measurement differs per header height. */
    --split-sticky-top: 18px;
    --split-sticky-bottom: 18px;

    --form-w: 520px;
}

.shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: var(--shell-w);
    margin: 0 auto;
    padding: var(--shell-pad);
}

main {
    flex: 1;
}

/* Grid not flex (flex fractional math caused 2px rounding error). minmax(0,1fr) prevents long URLs from pushing phone off-edge. */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--split-side);
    align-items: start;
    gap: 25px;
}

.split-side {
    position: sticky;
    top: var(--split-sticky-top);
}

/* Taller than the viewport: pin the bottom instead, so the last controls stay reachable.
   Set by sticky-side.js. Both edges together would let top win and clip the bottom. */
.split-side.is-tall {
    top: auto;
    bottom: var(--split-sticky-bottom);
}

@media (max-width: 900px) {
    :root {
        --shell-gap: 32px;
    }

    .split {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
}

.panel--form {
    max-width: var(--form-w);
    margin-inline: auto;
}
