/*
 * Shell — the document frame: header / nav / content / footer rows.
 * (Pre-5.102 the body carried `.page`; that block name now belongs to
 * the content-page header + grid contract in components/_page.css.)
 *
 * Responsive: one minmax(0,1fr) column so no child can widen the
 * viewport; the content gutter drops from 24px to 16px at ≤640px.
 */
.shell {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}
.shell--auth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gutter);
}
.shell__content {
    width: 100%;
    max-width: var(--content-max);
    min-width: 0;
    margin: 0 auto;
    padding: var(--gutter);
}
@media (max-width: 640px) {
    :root { --gutter: var(--sp-4); }
}

/* Generic grid + the card grid every content page uses. `.grid--cards`
   is the pre-5.102 name and stays a synonym of `.page__grid` for one
   release; new views use `.page__grid`. Tracks are auto-fit at a 320px
   floor (min(320px, 100%) so a 360px phone still gets one full-width
   column instead of an overflowing 320px one). */
.grid { display: grid; gap: var(--sp-4); }
.grid--cards,
.page__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: var(--sp-4);
    align-items: start;
}
