/* Spec 326: the public game night planner page. The frame, the blocks, the FAQ, the notes and the buttons come from
   rules-pages.css (spec 324) and home-landing.css; the bevel of the blocks and the steps from tabletop-screens.css.
   The same content renders in the guests' static frame and inside the app shell, so the columns follow the width of
   the page itself (a container), not the window. */

.rules-page.gnp-page {
    width: min(1040px, 100%);
    container-type: inline-size;
}

.rules-guest .rules-page.gnp-page {
    width: min(1040px, 100% - 2rem);
}

.gnp-hero,
.gnp-steps-body {
    display: grid;
    gap: 1.25rem;
}

.gnp-hero h1 {
    margin-bottom: 0.85rem;
}

/* Rule 29: the pictures scale to the column and never pass their own size. */
.gnp-shot {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-inline: auto;
    border: 1px solid var(--tt-line);
    background: var(--tt-field);
}

/* Rule 14: each step on its own framed box with its number. */
.gnp-step-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gnp-step {
    position: relative;
    padding: 0.9rem 1rem 1rem 3.5rem;
    border: 1px solid var(--tt-line);
    background: var(--tt-field);
}

.gnp-page .gnp-step h3 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
}

.gnp-step-number {
    position: absolute;
    top: 0.85rem;
    left: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    background: var(--tt-accent);
    color: var(--tt-area);
    font-family: var(--tt-font-display);
    font-weight: 700;
    line-height: 1;
}

/* Rule 19: one sentence and the pricing button on one row while they fit. */
.gnp-plans {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.gnp-page .gnp-plans p {
    flex: 1 1 18rem;
    margin: 0;
}

.gnp-final {
    text-align: center;
}

.gnp-final .rules-actions {
    justify-content: center;
}

/* Rule 29: from a page about 1024 px wide the hero text stands beside its picture and the steps sit two per row. */
@container (min-width: 52rem) {
    .gnp-hero {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: center;
    }

    .gnp-steps-body {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }

    .gnp-step-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .gnp-plans .gl-btn {
        flex: 1 1 100%;
    }
}
