/* ==========================================================================
   Gratienne — the guest's journey (the page for guests; /open has no page of its own)

   The page for guests is set as a watchmaker's booklet: hairline rules, gold
   numerals, living pictures and a great deal of paper between them. The
   opening holds the one field a guest may need at once beside the words; then
   the four steps beside one stage playing their gestures on the folded
   letter (only what every guest holds; the
   engraved plates where WebGL does not run), what the opening remembers, the
   questions and a letter to the team. Every engraving is inline SVG drawn by
   engrave.js from the house's modules, so nothing is fetched. Tokens and faces
   are site.css's; the shared manners (reveals, disclosures, the house's
   validation) are ui.js's.
   ========================================================================== */

/* ------------------------------------------------------------- 1. Frame */

/* The home page's margins: the gutter alone at every width, no narrower frame; a reading measure is the text's own, never the page's. */
.guests {
    width: 100%;
    padding: 0 var(--gutter) clamp(4rem, 10vw, 8rem);
}

    .guests > section {
        margin-top: clamp(5.5rem, 12vw, 10rem);
    }

.guests__soft {
    color: var(--ink-soft);
}

.guests__h2 {
    font-family: var(--display);
    font-weight: var(--weight-display);
    font-size: var(--type-title);
    line-height: 1.05;
    letter-spacing: var(--display-tracking);
    text-wrap: balance;
}

/* A section's head: the title on the left, a sentence on the right, one hairline under both. */
.guests__head {
    display: grid;
    gap: 1.4rem;
    padding-bottom: clamp(2rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--rule);
}

    .guests__head .text {
        max-width: 30rem;
    }

    /* A lede set under its heading (Memory). */
    .guests__head .guests__lede-under {
        margin-top: 1.2rem;
    }

    /* A heading on one line where the screen allows it (Memory); a phone may still break it. */
    @media (min-width: 40rem) {
        .guests__h2--line {
            white-space: nowrap;
        }
    }

@media (min-width: 56rem) {
    .guests__head {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        column-gap: clamp(3rem, 6vw, 5rem);
        align-items: end;
    }

    /* A head whose lede stands under its heading takes the whole width. */
    .guests__head--single {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ------------------------------------------------------------- 2. The opening */

/* The opening is the booklet's cover: a band of a
   deeper paper running the window's whole width under the header, the card's number laid on it as a sheet of the
   house's own paper with its white edge — the card in the guest's hand —, and closed by one hairline before the
   booklet's pages begin. The two columns share one top and one foot: the eyebrow stands on the line of the number's
   label, the lead's last line on the line of the sheet's last. The band is a ground, never a notice: no colour but a
   step of the paper's own grey, the cotton's fibre lying over it as over the page. */
.guests__hero {
    --cover-ground: #EDEDED;
    --opener-pad: clamp(1.5rem, 2.8vw, 2.4rem);
    display: grid;
    gap: clamp(2rem, 6vw, 4rem);
    align-items: start;
    margin-inline: calc(-1 * var(--gutter));
    padding: var(--page-top) var(--gutter) clamp(3rem, 7vw, 6rem);
    background: var(--cover-ground);
    border-bottom: 1px solid var(--rule);
}

.guests__intro {
    display: grid;
    justify-items: start;
    align-content: start;
}

/* The page's eyebrow: a short gold hairline before the words in small capitals. */
.guests__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: clamp(1.4rem, 2.6vw, 2.2rem);
    color: var(--ink-soft);
}

    .guests__eyebrow::before {
        content: '';
        width: 2.2rem;
        height: 1px;
        background: var(--gold);
    }

.guests__title {
    font-family: var(--display);
    font-weight: var(--weight-display);
    font-size: var(--type-hero);
    line-height: 1.02;
    letter-spacing: var(--display-tracking);
    text-wrap: balance;
}

.guests__lead {
    max-width: 30rem;
    margin-top: 1.4rem;
    color: var(--ink-soft);
}

/* The number field: its label and where to find it, the number over its four hairlines, the button under it, and the
   sentence that says a number only leads to the card. The button stands under the number at every width: beside it,
   in a column this narrow, the number would have to be set too small or be cut short. */
.guests__opener {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "label" "where" "field" "error" "submit" "hint";
    justify-items: stretch;
    gap: 0.6rem;
    width: 100%;
    margin-top: clamp(1.8rem, 4vw, 2.8rem);
    /* Its edge the cotton's own, no black rule above it: a sheet of the house's paper with its
       fibre, lying a little above the band in site.css's light sheet shadow. */
    position: relative;
    isolation: isolate;
    padding: var(--opener-pad);
    background: var(--ground);
    border: 1px solid var(--card-edge);
    box-shadow: var(--shadow-sheet);
    text-align: left;
}

    .guests__opener::before {
        content: '';
        position: absolute;
        z-index: -1;
        inset: 0;
        background-image: var(--fiber);
        opacity: 0.35;
        pointer-events: none;
    }

    /* Written against .number's own rules (section 9). The number is set in the display face, sized
       by its box so the nineteen characters of a number with its dashes take the box's width (a number is on average
       as wide as the placeholder's x's: 10.3 em of the 11 the box holds), never larger than its own size. */
    .number.guests__opener {
        /* Up to the sheet's whole measure: a number stopping short of the frame would leave its right third empty. */
        --number-size: min(2.6rem, 100cqi / 11);
        --number-tracking: 0.12em;
        --number-advance: 0.439em;
        --number-dash: 0.323em;
    }

    .number.guests__opener .number__label { grid-area: label; }
    .number.guests__opener .guests__where { grid-area: where; }
    .number.guests__opener .number__field { grid-area: field; }
    .number.guests__opener .field__error { grid-area: error; }
    .number.guests__opener .number__submit { grid-area: submit; margin-top: 0.8rem; }
    .number.guests__opener .number__hint { grid-area: hint; margin-top: 0.4rem; }

    .number.guests__opener .number__field {
        display: grid;
        min-width: 0;
        container-type: inline-size;
    }

    .number.guests__opener .number__input {
        width: 100%;
        font-family: var(--display);
        text-align: left;
    }

    .number.guests__opener .number__groups {
        margin-top: -0.4rem;
    }

.guests__where {
    font-family: var(--sans);
    font-weight: var(--sans-weight);
    font-size: var(--caps-size-small);
    letter-spacing: var(--caps-tracking);
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* Where the sheet is wide enough the label and where to find the number share a line, and the button keeps its own
   width — measured on the sheet's column, not the screen, since beside the title on a small laptop the column is narrow
   and „Numer karty” would break in two. */
.guests__opening {
    container-type: inline-size;
}

@container (min-width: 26rem) {
    .guests__opener {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "label where" "field field" "error error" "submit submit" "hint hint";
        column-gap: 1.4rem;
        align-items: end;
    }

        .number.guests__opener .guests__where {
            justify-self: end;
        }

        .number.guests__opener .number__submit {
            justify-self: start;
            min-width: 14rem;
        }
}

@media (min-width: 56rem) {
    .guests__hero {
        /* The words on the left, the card's number on the right. */
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        column-gap: clamp(3rem, 7vw, 7rem);
        /* From the top, not centred in a tall band: both columns stretched to the row, so the sheet's foot and the lead's share one line. */
        align-items: stretch;
    }

        /* The words stand inside the sheet's own margins: the eyebrow on the line of the number's label, the lead's
           last line on the line of the hint's. */
        .guests__hero .guests__intro {
            grid-template-rows: auto auto 1fr;
            padding-block: calc(var(--opener-pad) + 1px);
        }

            .guests__hero .guests__intro > .guests__lead {
                align-self: end;
            }

        /* The sheet fills its column to the right margin and the row to its foot; the number stands level with the
           title, the button and its sentence at the foot level with the lead, the paper's air between them. */
        .guests__hero .guests__opening {
            display: grid;
        }

        .guests__hero .guests__opener {
            margin-top: 0;
            grid-template-rows: auto auto auto 1fr auto;
        }

            .guests__hero .number.guests__opener .number__submit {
                align-self: end;
            }
}

/* The living picture (film.js's guests()): once the stage has drawn its first frame (.is-live), it comes up on the
   paper. It has no edge: what the lens leaves at the sides fades into the paper. */
.guests__stage-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    /* No mask round the picture (it reads as a white fog): the paper itself is its ground. */
    /* The paper stands alone until the first frame is drawn, then the objects come up on it — never a sketch first. */
    opacity: 0;
    transition: opacity 1.4s var(--slow);
}

.is-live > .guests__stage-canvas {
    opacity: 1;
}

/* ------------------------------------------------------------- 3. The engravings */

/* Only the outer drawing is sized here: the pieces nested in a plate keep the sizes engrave.js gives them. */
.guests__plate-art > svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* ------------------------------------------------------------- 4. The plates */

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

.guests__plate {
    padding: 2.6rem 0;
    border-bottom: 1px solid var(--rule);
}

/* Every plate is drawn on the same 300 × 330 sheet, so the box holds that shape before and after it is drawn. */
.guests__plate-art {
    position: relative;
    width: min(100%, 19rem);
    aspect-ratio: 300 / 330;
    margin: 0 auto;
}

.guests__plate-no {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    margin-top: 1.8rem;
}

.guests__plate-number {
    font-family: var(--display);
    font-size: 2.4rem;
    line-height: 1;
    color: var(--gold);
}

.guests__plate-no .label {
    color: var(--ink-soft);
}

/* The gesture's name large and light, as a title page sets one word: the display face at the section title's size in the house's light weight, set close. */
.guests__plate-name {
    margin: 0.4rem 0 0.8rem;
    font-family: var(--display);
    font-weight: var(--weight-light);
    font-size: var(--type-title);
    line-height: 1;
    letter-spacing: var(--display-tracking);
}

/* Four plates in a row on a wide screen, divided by hairlines as a booklet's columns. */
@media (min-width: 64rem) {
    .guests__plates {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .guests__plate {
        padding: 3rem 1.8rem 0;
        border-bottom: 0;
        border-left: 1px solid var(--rule);
    }

        .guests__plate:first-child {
            padding-left: 0;
            border-left: 0;
        }

        .guests__plate:last-child {
            padding-right: 0;
        }

    /* One width for every plate's picture, whichever column has the padding, so the four stand on one line. */
    .guests__plate-art {
        width: min(100%, 14rem);
    }

    /* Four to a row, a name stays on one line of its column („Przeczytaj” the longest): the scale's step below. */
    .guests__plate-name {
        font-size: var(--type-subtitle);
    }

    .has-guests-steps .guests__plate-name {
        font-size: var(--type-title);
    }
}

/* The stage beside the steps (film.js's guestsSteps()), only where WebGL runs (.has-guests-steps): it stands still on
   the screen while the steps pass beside it, each step tall enough to be read alone, and the step being read keeps
   its full ink. The plates and their figure numbers give way to it. Between gestures it dims to the paper and back. */
.guests__stage {
    display: none;
}

.has-guests-steps .guests__stage {
    position: sticky;
    display: block;
    margin: 0;
}

.has-guests-steps .guests__plate-art,
.has-guests-steps .guests__plate-figure {
    display: none;
}

/* Every step stands in full ink as it rises in, never half transparent; the
   step being read is marked by the gold hairline after its numeral (section 12). */
.has-guests-steps .guests__plate {
    display: grid;
    align-content: center;
}

    .has-guests-steps .guests__plate .guests__soft {
        max-width: 26rem;
    }

/* On a narrow screen the stage stands over the steps, under the header, on the page's own paper. The step being read
   keeps its words right under the stage while its gesture plays, so the reader never scrolls through bare paper
   between two steps (the tester's report of 2026-10-28): each step's words stand at its top and stay there, under
   the stage, until the next step's words push them up behind it. A step is shorter to scroll than on a wide screen —
   about 5svh a second of its gesture, never under 40svh — since a thumb's flick runs farther than a wheel's notch and
   the words no longer need the length to be read alone. film.js reads the stage's foot as the line a step is read at. */
@media (max-width: 63.99rem) {
    .has-guests-steps .guests__stage {
        top: var(--header);
        z-index: 2;
        height: 46svh;
        margin: 0 calc(-1 * var(--gutter));
        background: var(--ground);
    }

    /* A block, not the wide screen's grid: a grid item's sticky words could travel only their own row. The words stand
       at the step's top — a block centres its content too where align-content is set. */
    .has-guests-steps .guests__plate {
        display: block;
        align-content: normal;
        min-height: max(40svh, calc(var(--period, 6) * 5svh));
        padding: 1.5rem 0;
    }

    .has-guests-steps .guests__plate-words {
        position: sticky;
        top: calc(var(--header) + 46svh + 1.5rem);
    }

        /* The words' top is the step's: the plate's own air above the numeral is the step's padding. */
        .has-guests-steps .guests__plate-words > .guests__plate-no {
            margin-top: 0;
        }
}

/* On a wide screen the stage takes the left of the section, the steps the right, one under another. */
@media (min-width: 64rem) {
    .has-guests-steps .guests__walk {
        display: grid;
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        column-gap: clamp(3rem, 6vw, 5rem);
    }

    /* Pinned at the exact middle of the screen under the header, whatever the screen's height (pinned under the
       header, its capped height would leave the air below it and the model above the middle). film.js reads this top to end the story where the stage starts to leave. */
    .has-guests-steps .guests__stage {
        --stage-h: min(calc(100svh - var(--header) - 2rem), 52rem);
        top: calc(var(--header) + (100svh - var(--header) - var(--stage-h)) / 2);
        align-self: start;
        height: var(--stage-h);
    }

    .has-guests-steps .guests__plates {
        grid-template-columns: minmax(0, 1fr);
    }

    .has-guests-steps .guests__plate,
    .has-guests-steps .guests__plate:first-child,
    .has-guests-steps .guests__plate:last-child {
        /* As long to scroll as the step's gesture is to play (film.js sets --period, its seconds): about 9svh a second,
           so a wheel's notch moves the film a second or so, never ten. */
        min-height: max(60svh, calc(var(--period, 7) * 9svh));
        padding: 0;
        border-left: 0;
        border-bottom: 1px solid var(--rule);
    }

        .has-guests-steps .guests__plate:last-child {
            border-bottom: 0;
        }
}

/* ------------------------------------------------------------- 5. What the opening remembers */

.guests__memory-body {
    display: grid;
    gap: clamp(2.5rem, 6vw, 4rem);
    padding-top: clamp(2.5rem, 5vw, 4rem);
}

.guests__seal {
    width: min(100%, 21rem);
    /* Higher, the sky's own air above it given back to the heading. */
    margin: calc(-1 * clamp(2rem, 4vw, 3rem)) auto 0;
    text-align: center;
}

/* The sky alone on the paper, as the book's seal sets it: no ring, no frame. */
.guests__seal-art {
    position: relative;
    aspect-ratio: 1;
}

.guests__sky {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.guests__legend {
    display: grid;
    gap: 0.4rem;
    /* Close under the sky, whose square keeps air at its foot. */
    margin-top: -1.6rem;
}

    .guests__legend .label {
        color: var(--ink-soft);
    }

    .guests__legend-sky {
        font-family: var(--display);
        color: var(--ink-soft);
    }

    /* One example opening giving way to the next: the sky and its words fade out and in together. */
    .guests__legend > *,
    .guests__seal-art {
        transition: opacity 0.7s var(--slow);
    }

    .guests__seal.is-turning .guests__legend > *,
    .guests__seal.is-turning .guests__seal-art {
        opacity: 0;
    }

.guests__facts {
    display: grid;
    align-content: start;
}

.guests__fact {
    padding: 1.6rem 0 1.8rem;
    border-bottom: 1px solid var(--rule);
}

.guests__fact-title {
    margin-bottom: 0.5rem;
    font-family: var(--display);
    font-weight: var(--weight-display);
    font-size: var(--type-heading);
}

@media (min-width: 40rem) {
    .guests__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: clamp(2rem, 4vw, 3.5rem);
    }
}

@media (min-width: 56rem) {
    .guests__memory-body {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        column-gap: clamp(3rem, 6vw, 5rem);
        align-items: start;
    }
}

/* ------------------------------------------------------------- 6. Questions */

.guests__faq,
.guests__report {
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
}

.guests__aside .text {
    max-width: 26rem;
    margin-top: 1.2rem;
}

@media (min-width: 56rem) {
    .guests__faq,
    .guests__report {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        column-gap: clamp(3rem, 6vw, 5rem);
    }

    .guests__aside {
        position: sticky;
        top: calc(var(--header) + 2rem);
        align-self: start;
    }
}

.guests__faq .faq__list details {
    padding: 0;
    border-top: 1px solid var(--rule);
}

    .guests__faq .faq__list details:last-child {
        border-bottom: 1px solid var(--rule);
    }

.guests__faq .faq__list summary {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr) 1.1rem;
    align-items: baseline;
    gap: 0;
    padding: 1.4rem 0;
    font-family: var(--display);
    font-size: var(--type-heading);
    line-height: 1.3;
    list-style: none;
    cursor: pointer;
}

    .guests__faq .faq__list summary::-webkit-details-marker {
        display: none;
    }

.guests__qa-no {
    font-size: 1rem;
    color: var(--gold);
}

.guests__qa-question {
    padding-right: 1.2rem;
}

/* The sign is a plus of two hairlines that turns into a cross as the answer opens, in gold while it is open. */
.faq__sign {
    position: relative;
    flex: none;
    align-self: center;
    width: 1.1rem;
    height: 1.1rem;
    transition: transform 0.6s var(--slow);
}

    .faq__sign::before,
    .faq__sign::after {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 100%;
        height: 1px;
        background: currentColor;
        transition: background-color 0.4s var(--slow);
    }

    .faq__sign::after {
        transform: rotate(90deg);
    }

.guests__faq summary:hover .faq__sign::before,
.guests__faq summary:hover .faq__sign::after,
.faq__list details[data-state="open"] .faq__sign::before,
.faq__list details[data-state="open"] .faq__sign::after,
.faq__list details[data-state="opening"] .faq__sign::before,
.faq__list details[data-state="opening"] .faq__sign::after {
    background: var(--gold);
}

.faq__list details[data-state="open"] .faq__sign,
.faq__list details[data-state="opening"] .faq__sign,
.faq__list details[open]:not([data-state]) .faq__sign {
    transform: rotate(135deg);
}

.guests__faq .faq__list details p {
    max-width: 40rem;
    margin: 0;
    padding: 0 2.6rem 1.6rem 2.6rem;
    color: var(--ink-soft);
    transition: opacity 0.3s var(--slow);
}

.guests__faq .faq__list details[open] p {
    animation: answer-in 0.7s var(--slow) 0.08s both;
}

/* A closing answer fades before its height folds over it. */
.guests__faq .faq__list details[data-state="closing"] p {
    opacity: 0;
}

@keyframes answer-in {
    from { opacity: 0; transform: translateY(-0.4rem); }
}

/* ------------------------------------------------------------- 7. A letter to the team */

.report__body {
    display: grid;
    gap: 1.4rem;
    align-content: start;
}

/* The sheet: a page a little whiter than the paper around it, lifted by a soft shadow, the sentences with their blanks
   in a large reading size, and lined paper for the message. */
.guests__letter {
    gap: 1.8rem;
    padding: clamp(1.6rem, 5vw, 3.2rem) clamp(1.2rem, 5vw, 3.4rem) clamp(1.8rem, 5vw, 3rem);
    background: #F8F8F7;
    box-shadow: var(--shadow-sheet);
}

/* The box's message stands right under its words, not a whole row of the letter's gap below. */
.guests__letter label.check + .field__error {
    margin-top: calc(0.3rem - 1.8rem);
}

.guests__prose {
    font-family: var(--serif);
    font-size: clamp(1.12rem, 1.5vw, 1.3rem);
    line-height: 2.3;
}

/* A blank in a sentence: the field sits on the line, and ui.js's message, when there is one, stands under it, so the
   line grows for it alone. */
.guests__blank {
    display: inline-grid;
    gap: 0;
    vertical-align: baseline;
    max-width: 100%;
}

    /* Written against pages.css's .field rules, which set a field as a block of its own. */
    .guests__blank.field input:not([type="checkbox"]):not([type="radio"]),
    .guests__blank.field select {
        min-height: 0;
        padding: 0 0.2rem 0.1rem;
        font-family: var(--serif);
        font-size: inherit;
        line-height: 1.7;
    }

    /* The topic written into the sentence as the house's own choice (ui.js), as wide as its longest topic. */
    .guests__blank.field .choice > input.choice__input:not([type="checkbox"]):not([type="radio"]) {
        width: calc(var(--choice-ch, 12) * 0.62em + 1.6rem);
        padding-right: 1.4rem;
        background: var(--choice-chevron);
        cursor: pointer;
    }

    .guests__blank.field select {
        appearance: none;
        -webkit-appearance: none;
        padding-right: 1.4rem;
        background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
        background-position: calc(100% - 9px) 58%, calc(100% - 4px) 58%;
        background-size: 5px 5px;
        background-repeat: no-repeat;
        cursor: pointer;
    }

    .guests__blank input::placeholder {
        color: var(--ink-soft);
        opacity: 0.55;
        letter-spacing: 0.04em;
    }

    /* Its face and size are the site's one refusal (site.css); here only its place under a blank in a sentence. */
    .guests__blank .field__error {
        margin-top: 0.2rem;
        white-space: normal;
    }

.guests__blank--number {
    width: 14.5rem;
}

.guests__blank--email {
    width: min(100%, 17rem);
}

.guests__stop {
    margin-left: 0.05em;
}

.guests__paper.field textarea {
    min-height: 11.5rem;
    padding: 0.1rem 0;
    border: 0;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.3rem - 1px), var(--rule) calc(2.3rem - 1px), var(--rule) 2.3rem);
    font-family: var(--serif);
    /* The message in the plain reading face, never bold and upright, as nothing leans but the „&”. */
    font-style: normal;
    font-weight: 400;
    font-size: clamp(1.08rem, 1.4vw, 1.2rem);
    line-height: 2.3rem;
}

    .guests__paper.field textarea::placeholder {
        font-weight: 400;
    }

    .guests__paper.field textarea:focus {
        background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.3rem - 1px), rgba(var(--gold-rgb), 0.6) calc(2.3rem - 1px), rgba(var(--gold-rgb), 0.6) 2.3rem);
    }

    .guests__paper.field textarea[aria-invalid="true"] {
        box-shadow: none;
        background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.3rem - 1px), var(--ink) calc(2.3rem - 1px), var(--ink) 2.3rem);
    }

.guests__letter-foot {
    display: grid;
    gap: 1.4rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--rule);
}

    .guests__letter-foot .privacy-note {
        max-width: 28rem;
    }

@media (min-width: 40rem) {
    .guests__letter-foot {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 2rem;
    }
}

/* ------------------------------------------------------------- 8. Their own day */

.guests__closing {
    display: grid;
    justify-items: center;
    gap: 1.2rem;
    text-align: center;
}

    .guests__closing .text {
        max-width: 30rem;
    }

    .guests__closing .link {
        margin-top: 1rem;
    }

    /* The invitation to their own day is one sentence on one line: it is never held to the text's
       measure, and on a narrow screen it steps down with the width rather than breaking. */
    .guests__closing .guests__closing-line {
        max-width: none;
        font-size: min(var(--type-body), 3.2vw);
        white-space: nowrap;
    }

/* A gold thread let down from the page above, drawn as the closing arrives. */
.guests__ornament {
    display: block;
    width: 1px;
    height: 4.5rem;
    margin-bottom: 1rem;
    background: var(--gold);
    transform-origin: 50% 0;
    transition: transform 1.4s var(--slow) 0.2s;
}

.has-ui .guests__closing:not(.is-in) .guests__ornament {
    transform: scaleY(0);
}

.guests__closing-title {
    font-family: var(--display);
    font-weight: var(--weight-display);
    font-size: var(--type-title);
    line-height: 1.06;
    letter-spacing: var(--display-tracking);
    /* „dzień” never alone on a phone's last line. */
    text-wrap: balance;
}

/* ------------------------------------------------------------- 9. The number field */

/* The characters sit over four hairlines, one per group, each filling with gold as its group is typed. Standing in a
   column, everything under the field keeps its place, so a message ui.js adds at the form's end still stands above the
   button. */
.number {
    /* Each hairline lies under its group: the hairlines are set in the number's own size, a group as wide as four
       characters with the tracking between them, the gap as wide as a dash with the tracking on either side. The
       advances are the face's lowercase x and dash (Montserrat 300 here, Cormorant on the page for guests), which the
       placeholder shows and an average number matches; a number heavy in m and w runs a little past its hairlines. */
    --number-size: clamp(1.15rem, 4.8vw, 1.6rem);
    --number-tracking: 0.14em;
    --number-advance: 0.514em;
    --number-dash: 0.381em;
    gap: 0.9rem;
}

    .number > * {
        order: 3;
    }

    .number .number__label {
        order: 0;
        font-family: var(--sans);
        font-weight: var(--sans-weight);
        font-size: var(--caps-size);
        letter-spacing: var(--caps-tracking);
        text-transform: uppercase;
    }

    /* The card's number is typed large and spaced, a size of its own outside the reading scale. */
    .number .number__input {
        order: 1;
        width: min(100%, 25rem);
        padding: 0.2rem 0;
        border-bottom-color: transparent;
        font-size: var(--number-size);
        letter-spacing: var(--number-tracking);
    }

        .number .number__input:focus {
            border-bottom-color: transparent;
        }

        .number .number__input::placeholder {
            color: var(--ink-soft);
            opacity: 0.45;
        }

    .number .number__groups {
        order: 2;
    }

    .number .number__hint {
        order: 3;
    }

    .number .field__error {
        order: 4;
    }

    .number .number__submit {
        order: 5;
        margin-top: 0.8rem;
    }

.number__groups {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: calc(var(--number-dash) + 2 * var(--number-tracking));
    width: min(100%, calc(4 * (4 * var(--number-advance) + 3 * var(--number-tracking)) + 3 * (var(--number-dash) + 2 * var(--number-tracking))));
    margin-top: -0.7rem;
    font-size: var(--number-size);
}

    .number__groups > span {
        position: relative;
        height: 1px;
        background: var(--rule);
        transition: background-color 0.4s var(--slow);
    }

        .number__groups > span::after {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--gold);
            transform: scaleX(var(--fill, 0));
            transform-origin: 0 50%;
            transition: transform 0.45s var(--slow);
        }

/* The field's focus: its four hairlines turn gold, the outline it has instead of a border. */
.number:focus-within .number__groups > span {
    background: var(--gold);
}

@media (max-width: 30rem) {
    .number {
        --number-tracking: 0.06em;
    }
}

.number__groups > span.is-full::after {
    height: 2px;
    top: -0.5px;
}

.number .number__input[aria-invalid="true"] ~ .number__groups > span {
    background: var(--ink);
}

/* ------------------------------------------------------------- 10. Arrivals and touches */

/* Every part of the page arrives in the house's one language — rising a little out of the paper, a hairline drawn out,
   the gold coming last — but each in a gesture of its own: the title settles out of a blur, the number's frame is drawn round it and its four hairlines one
   after another, a section's rule is drawn under its heading, a plate's numeral rises after its plate, the sky comes up
   from a little smaller, the facts and the questions draw their own rules, the letter is lifted off the paper and its
   lines ruled, the closing follows its gold thread. What a pointer touches steps a hair to the right. Moves are
   `translate`/`scale`, never `transform`, so the shared reveal and a button's press keep theirs. */

/* The step being read is marked by a short gold hairline after its numeral, as the page's eyebrow. */
.has-guests-steps .guests__plate-no::after {
    content: '';
    align-self: center;
    width: 2.2rem;
    height: 1px;
    background: var(--gold);
    scale: 0 1;
    transform-origin: 0 50%;
    transition: scale 0.9s var(--slow);
}

    .has-guests-steps .guests__plate.is-current .guests__plate-no::after {
        scale: 1 1;
    }

@media (prefers-reduced-motion: no-preference) {
    /* The title settles as ink does, out of a soft blur; the lead follows. */
    .has-ui .guests__intro > .guests__title {
        filter: blur(0.08em);
        transform: translateY(0.4em);
        transition: opacity 1.4s var(--slow), transform 1.4s var(--slow), filter 1.4s var(--slow);
    }

        .has-ui .guests__intro > .guests__title.is-in {
            filter: none;
            transform: none;
        }

    .has-ui .guests__intro > .guests__lead {
        transition-delay: 0.35s;
    }

    /* The number's sheet arrives whole with the form, at once — never drawn side by side, which reads as a frame
       loading late and in pieces — and its contents follow it closely, the four hairlines one
       after another. */
    .has-ui .guests__opener[data-reveal] {
        transform: none;
        transition: opacity 0.5s var(--slow);
    }

        .has-ui .guests__opener[data-reveal] > * {
            opacity: 0;
            translate: 0 0.5rem;
            transition: opacity 0.7s var(--slow) var(--arrive, 0.1s), translate 0.7s var(--slow) var(--arrive, 0.1s);
        }

        .has-ui .guests__opener[data-reveal] > .number__submit {
            transition: opacity 0.9s var(--slow) var(--arrive), translate 0.9s var(--slow) var(--arrive), transform 0.2s var(--slow);
        }

        .has-ui .guests__opener[data-reveal].is-in > * {
            opacity: 1;
            translate: none;
        }

        .has-ui .guests__opener .number__field { --arrive: 0.15s; }
        .has-ui .guests__opener .number__submit { --arrive: 0.3s; }
        .has-ui .guests__opener .number__hint { --arrive: 0.4s; }
        /* A refusal ui.js adds later answers at once. */
        .has-ui .guests__opener .field__error { --arrive: 0s; }

        .has-ui .guests__opener[data-reveal] .number__groups > span {
            scale: 0 1;
            transform-origin: 0 50%;
            transition: background-color 0.4s var(--slow), scale 0.6s var(--slow) var(--draw, 0.2s);
        }

            .has-ui .guests__opener[data-reveal] .number__groups > span:nth-child(2) { --draw: 0.27s; }
            .has-ui .guests__opener[data-reveal] .number__groups > span:nth-child(3) { --draw: 0.34s; }
            .has-ui .guests__opener[data-reveal] .number__groups > span:nth-child(4) { --draw: 0.41s; }

        .has-ui .guests__opener[data-reveal].is-in .number__groups > span {
            scale: 1 1;
        }

    /* A section's rule is drawn under its heading from the left, and the sentence under the heading follows it. */
    .has-ui .guests__head[data-reveal] {
        border-bottom-color: transparent;
        background: linear-gradient(var(--rule), var(--rule)) 0 100% / 0 1px no-repeat;
        background-origin: border-box;
        transition: opacity 1.1s var(--slow), transform 1.1s var(--slow), background-size 1.6s var(--slow) 0.35s;
    }

        .has-ui .guests__head[data-reveal].is-in {
            background-size: 100% 1px;
        }

    .has-ui .guests__head[data-reveal] .guests__lede-under {
        opacity: 0;
        translate: 0 0.6rem;
        transition: opacity 1s var(--slow) 0.25s, translate 1s var(--slow) 0.25s;
    }

        .has-ui .guests__head[data-reveal].is-in .guests__lede-under {
            opacity: 1;
            translate: none;
        }

    /* The steps rise from below already in full ink, never through a fade. */
    .has-ui .guests__plates[data-reveal-stagger] > .guests__plate {
        opacity: 1;
    }

    /* A plate's gold numeral rises a beat after its plate. */
    .has-ui .guests__plate .guests__plate-number {
        display: inline-block;
        translate: 0 0.45em;
        transition: translate 0.9s var(--slow) 0.3s;
    }

        .has-ui .guests__plate.is-in .guests__plate-number {
            translate: none;
        }

    /* The sky comes up from a little smaller, slower than anything else, as a morning does. */
    .has-ui .guests__seal[data-reveal] {
        transform: scale(0.94);
        transition: opacity 1.6s var(--slow), transform 1.9s var(--slow);
    }

        .has-ui .guests__seal[data-reveal].is-in {
            transform: none;
        }

    /* The facts and the questions draw their own rules as they arrive, one after another. */
    .has-ui .guests__facts > .guests__fact {
        border-bottom-color: transparent;
        background: linear-gradient(var(--rule), var(--rule)) 0 100% / 0 1px no-repeat;
        background-origin: border-box;
    }

    .has-ui .guests__faq .faq__list > details {
        border-top-color: transparent;
        background: linear-gradient(var(--rule), var(--rule)) 0 0 / 0 1px no-repeat;
        background-origin: border-box;
    }

    .has-ui .guests__facts > .guests__fact,
    .has-ui .guests__faq .faq__list > details {
        transition:
            opacity 1.1s var(--slow) calc(var(--reveal-index, 0) * 90ms),
            transform 1.1s var(--slow) calc(var(--reveal-index, 0) * 90ms),
            background-size 1.3s var(--slow) calc(var(--reveal-index, 0) * 90ms + 0.25s);
    }

        .has-ui .guests__facts > .guests__fact.is-in {
            background-size: 100% 1px;
        }

        .has-ui .guests__faq .faq__list > details.is-in {
            background-size: 100% 1px;
        }

    /* The letter is lifted off the paper, then its lines are ruled. */
    .has-ui .report__body[data-reveal] .guests__letter {
        box-shadow: none;
        transition: box-shadow 1.4s var(--slow) 0.3s;
    }

        .has-ui .report__body[data-reveal].is-in .guests__letter {
            box-shadow: var(--shadow-sheet);
        }

    .has-ui .report__body[data-reveal] .guests__paper.field textarea {
        background-size: 0 100%;
        background-repeat: no-repeat;
        transition: background-size 1.6s var(--slow) 0.7s;
    }

        .has-ui .report__body[data-reveal].is-in .guests__paper.field textarea {
            background-size: 100% 100%;
        }

    /* The closing follows its gold thread down: the title, the sentence, the link. */
    .has-ui .guests__closing[data-reveal] > :not(.guests__ornament) {
        opacity: 0;
        translate: 0 0.8rem;
        transition: opacity 1.1s var(--slow) var(--arrive, 0.6s), translate 1.1s var(--slow) var(--arrive, 0.6s);
    }

        .has-ui .guests__closing[data-reveal] > :nth-child(3) { --arrive: 0.8s; }
        .has-ui .guests__closing[data-reveal] > :nth-child(4) { --arrive: 1s; }

        .has-ui .guests__closing[data-reveal].is-in > :not(.guests__ornament) {
            opacity: 1;
            translate: none;
        }
}

/* What a pointer touches steps a hair to the right: a question, a fact's title. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .guests__qa-question,
    .guests__fact-title {
        transition: translate 0.5s var(--slow), color 0.3s var(--slow);
    }

    .guests__faq summary:hover .guests__qa-question,
    .guests__fact:hover .guests__fact-title {
        translate: 0.35rem 0;
    }
}

/* ------------------------------------------------------------- 11. Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .faq__sign,
    .has-guests-steps .guests__plate-no::after,
    .number__groups > span::after,
    .guests__ornament,
    .guests__stage-canvas,
    .has-guests-steps .guests__plate {
        transition: none;
    }

    .guests__faq .faq__list details[open] p {
        animation: none;
    }
}

@media (forced-colors: active) {
    .number__groups > span,
    .number__groups > span::after {
        background: CanvasText;
    }
}
