/* app.css — document, header, pills, lists, toasts. Paint order is DOM
   order (no z-index, ever); geometry is declared, never negotiated (no
   flex, no grid, no gap); rhythm flows downward through margin-bottom in
   --text-base math. */

* { box-sizing: border-box; }

html {
    background-color: var(--color-page);
}

body {
    position: relative;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    margin: 0;
    color: var(--color-ink);
    background-color: var(--color-page);
    font-family: var(--font-ui);
    font-size: 16.8px;                    /* elder fallback: the floor itself */
    font-size: var(--text-base);
    line-height: 1.45;
}

.norender { display: none; }

/* ---- page column ---------------------------------------------------------
   main comes FIRST in the DOM; the fixed header renders after it and wins
   the paint by order; main clears the footprint with the token. */

main {
    position: relative;
    left: 0;
    top: 0;
    display: block;
    width: var(--page-width);
    margin: 0 auto var(--rhythm-max);
    padding-top: calc(var(--header-height) + var(--rhythm-loose));
}

.page-title {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-regular);
    font-size: 26px;                      /* elder fallback ≥ floor */
    font-size: calc(var(--text-base) * 1.55);
    font-weight: 650;
    letter-spacing: -0.01em;
}

.section-title {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-small);
    font-size: 20px;                      /* elder fallback ≥ floor */
    font-size: calc(var(--text-base) * 1.2);
    font-weight: 600;
}

.page-head {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0;
}

.page-action {
    position: absolute;
    right: 0;
    top: calc(var(--text-base) * 0.1);    /* optically level with the title */
    width: auto;                          /* content-sized by declaration */
    margin: 0;
}

.page-action-button {
    padding: calc(var(--text-base) * 0.5) var(--rhythm-regular);
}

.admin-section {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-loose);
}

.section-head {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0;
}

.section-action {
    position: absolute;
    right: 0;
    top: calc(var(--text-base) * -0.2);   /* optically level with the section title */
    width: auto;                          /* content-sized by declaration */
    margin: 0;
}

.section-action-button {
    padding: calc(var(--text-base) * 0.4) var(--rhythm-regular);
}

.tracker-list {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-large);
}

/* the list's own title clears its first pill by a full stage */
.tracker-list .section-title { margin-bottom: var(--rhythm-regular); }

/* ---- first-run welcome (no items yet) ------------------------------------ */

.tracker-empty {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-large);
}

.tracker-empty .page-lede { font-weight: 500; }

.tracker-empty-action {
    text-decoration: none;                /* a link wearing the button suit */
}

/* ---- tracker pager: dots and arrows swap lists in (plain links) ---------- */

.tracker-pager {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-large);
    text-align: center;
    font-size: 0px;                       /* kills inter-dot whitespace */
}

.pager-arrow {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: calc(var(--text-base) * 2);
    height: calc(var(--text-base) * 2);
    color: var(--color-salmon);
    vertical-align: middle;
}

.pager-arrow .icon { --icon-size: calc(var(--text-base) * 2); --icon-mask-size: var(--icon-glyph); }

.pager-arrow:focus-visible {
    outline: 2px solid var(--color-accent);
}

.pager-dots {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: auto;                          /* content-sized by declaration */
    margin: 0 var(--rhythm-regular);
    vertical-align: middle;
}

.pager-dot {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: calc(var(--text-base) * 0.55);
    height: calc(var(--text-base) * 0.55);
    margin: 0 calc(var(--text-base) * 0.3);
    border-radius: 50%;
    background-color: var(--color-line);
}

.pager-dot--current { background-color: var(--color-salmon); }

.pager-dot:focus-visible {
    outline: 2px solid var(--color-salmon);
    outline-offset: 2px;
}

.page-lede {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-large);
    color: var(--color-muted);
}

/* ---- site header (after main in the DOM) -------------------------------- */

.site-header {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-raise);
    border-bottom: 1px solid var(--color-line);
}

.site-nav {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: auto;                          /* content-sized by declaration */
    padding-left: var(--rhythm-regular);
}

.site-nav-link {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: auto;                          /* content-sized by declaration */
    margin: 0 var(--rhythm-regular) 0 0;
    line-height: var(--header-height);
    color: var(--color-ink);
    text-decoration: none;
    font-weight: 600;
}

.site-nav-link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

/* the account menu: a details disclosure at the signout's old post. The
   header paints last, so its open panel covers main by DOM order alone. */
.account-menu {
    position: absolute;
    right: var(--rhythm-regular);
    top: 0;
    width: auto;                          /* content-sized by declaration */
    height: var(--header-height);
}

.account-menu-open {
    display: inline-block;
    width: calc(var(--text-base) * 2);
    height: var(--header-height);
    line-height: var(--header-height);
    color: var(--color-charcoal);
    cursor: pointer;
    list-style: none;                     /* no disclosure marker */
}

.account-menu-open::-webkit-details-marker { display: none; }

.account-menu-open .icon {
    --icon-size: calc(var(--text-base) * 2);
    --icon-mask-size: var(--icon-glyph);
    vertical-align: middle;
}

.account-menu-open:focus-visible {
    outline: 2px solid var(--color-salmon);
    outline-offset: -2px;
}

/* the open panel: the same menu molecule, hung under the header edge */
.account-menu .row-menu {
    display: block;
    position: absolute;
    left: auto;
    right: 0;
    top: calc(100% + var(--rhythm-min));
    bottom: auto;
    width: max-content;
    min-width: calc(var(--text-base) * 11);
    margin: 0;
    padding: var(--rhythm-min) 0;
    border: 1px solid var(--color-line);
    border-radius: calc(var(--text-base) * 0.4);
    background-color: var(--color-raise);
    box-shadow: var(--shadow-soft);
}

.account-menu-form {
    position: relative;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    margin: 0;
}

/* ---- pills --------------------------------------------------------------- */

.pill-list {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-regular);
    padding: 0;
    list-style: none;
}

/* the row: pill + score tile; the gap between them is the inter-pill gap */
.pill-row {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    height: var(--row-height);
    margin-bottom: var(--rhythm-small);
}

.pill {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: calc(100% - var(--row-height) - var(--rhythm-small));
    height: var(--row-height);
    margin: 0;
    background-color: var(--color-raise);
    border: var(--border-width) solid var(--color-salmon);
    border-radius: calc(var(--text-base) * 0.4);   /* same radius as buttons */
    overflow: hidden;                     /* clips the control squares at the radius */
}

/* the score: today's count memorialized, 1:1 on the row height. White on
   solid salmon is a 3:1 ground — the number stays large-text (≥18.7px, 600)
   to hold the AA large-text floor, same law as the buttons. */
.pill-score {
    position: absolute;
    left: auto;                           /* release the base pin; right owns the box */
    right: 0;
    top: 0;
    display: inline-block;
    width: var(--row-height);
    height: var(--row-height);
    border-radius: calc(var(--text-base) * 0.4);
    background-color: var(--color-salmon);
    color: var(--color-accent-ink);
    line-height: var(--row-height);
    text-align: center;
    font-size: 18.7px;                    /* elder fallback ≥ large-text line */
    font-size: max(18.7px, var(--text-base));
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pill-action {
    position: absolute;
    top: 0;
    width: var(--row-height);
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-salmon);
    cursor: pointer;
}

/* each cap wears the pill radius on its outer corners */
.pill-action--subtract {
    left: 0;
    border-radius: calc(var(--text-base) * 0.4) 0 0 calc(var(--text-base) * 0.4);
}

.pill-action--add {
    right: 0;
    border-radius: 0 calc(var(--text-base) * 0.4) calc(var(--text-base) * 0.4) 0;
}

/* focus ring drawn, not outlined: the inner edge backs off the center a
   touch further than the outer edges, which follow the cap's curve */
.pill-action:focus-visible { outline: none; }

.pill-action:focus-visible::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    bottom: 4px;
    right: 4px;
    border: var(--border-width) solid var(--color-salmon);
    pointer-events: none;
}

.pill-action--subtract:focus-visible::after {
    right: 5px;
    border-radius: calc(var(--text-base) * 0.25) 0 0 calc(var(--text-base) * 0.25);
}

.pill-action--add:focus-visible::after {
    left: 5px;
    border-radius: 0 calc(var(--text-base) * 0.25) calc(var(--text-base) * 0.25) 0;
}

.pill-action .icon {
    --icon-size: calc(var(--row-height) - var(--border-width) * 2);
    --icon-mask-size: var(--icon-glyph);
    position: relative;
    top: 0;
}

.pill-label {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: calc(100% - var(--row-height) * 2);
    margin-left: var(--row-height);
    line-height: calc(var(--row-height) - var(--border-width) * 2);
    color: var(--color-charcoal);
    font-weight: 600;
    white-space: nowrap;                  /* ellipsizes when narrow */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- admin list ----------------------------------------------------------- */

.list {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-loose);
    padding: 0;
    list-style: none;
}

.list-row {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    height: var(--row-height);
    border-bottom: 1px solid var(--color-row-rule);
}

.list-row:last-child { border-bottom: 0; }

.list-col {
    position: relative;
    line-height: var(--row-height);
    left: 0;
    top: 0;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-open {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: calc(100% - var(--text-base) * 3);   /* the row minus the remove island */
    height: 100%;
    color: inherit;
    text-decoration: none;
}


.list-open:focus-visible {
    outline: 2px solid var(--color-salmon);
    outline-offset: -2px;
}

.list-col--label {
    width: 44%;                           /* its share of a columned row */
    color: var(--color-ink);
    font-weight: 500;
}

/* ONE width law, structural: a label that is a link's only column fills the
   link — the 44% share exists only beside sibling columns */
.list-open > .list-col--label:only-child { width: 100%; }

.list-col--priority { width: 14%; color: var(--color-muted); font-variant-numeric: tabular-nums; text-align: center; }
.list-col--status   { width: 20%; color: var(--color-muted); text-align: center; }
.list-col--count    { width: 12%; color: var(--color-muted); font-variant-numeric: tabular-nums; text-align: center; }

.list-col--status-inactive { color: var(--color-accent); }

/* items page: the label-link anchor owns the row's 44%; the span inside is
   an only-column and fills it by the law above */
.list-open--label { width: 44%; }

.list-col--lists {
    width: calc(56% - var(--text-base) * 3);   /* the rest, minus the menu island */
    color: var(--color-muted);
}

.item-list-link {
    color: var(--color-salmon-deep);
    text-decoration: underline;
}

/* the comma is furniture: inline-block keeps it off the underline */
.list-col--lists .item-list-link + .item-list-link::before {
    content: ", ";
    display: inline-block;
    white-space: pre;
    color: var(--color-muted);
}

.item-list-link:focus-visible {
    outline: 2px solid var(--color-salmon);
    outline-offset: 2px;
}

/* ---- the kebab: one molecule, every row kind ----------------------------- */

.list-col--menu {
    position: absolute;
    left: auto;                           /* release the base pin; right owns the box */
    right: 0;
    top: calc((var(--row-height) - var(--text-base) * 2) / 2);
    width: auto;                          /* content-sized by declaration */
    margin: 0;
    overflow: visible;                    /* the drop-up escapes the row */
    line-height: normal;
}

.row-menu-form {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: auto;                          /* content-sized by declaration */
    margin: 0;
}

.row-menu-open {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: calc(var(--text-base) * 2);
    height: calc(var(--text-base) * 2);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-charcoal);
    cursor: pointer;
}

.row-menu-open .icon { --icon-size: calc(var(--text-base) * 2); --icon-mask-size: var(--icon-glyph); }

.row-menu-open:focus-visible {
    outline: 2px solid var(--color-accent);
}

/* the menu is a top-layer popover anchored to its trigger: top edges
   aligned, offset to the trigger's left. The top layer paints over
   everything by standing, not by z-index. Closed, it does not exist. */
.row-menu { display: none; }

.row-menu:popover-open {
    display: block;
    position: fixed;
    inset: auto;
    position-area: left span-bottom;      /* left of the kebab, tops aligned */
    width: max-content;
    min-width: calc(var(--text-base) * 11);
    margin: 0 var(--rhythm-min) 0 0;      /* breathing gap to the trigger */
    padding: var(--rhythm-min) 0;
    border: 1px solid var(--color-line);
    border-radius: calc(var(--text-base) * 0.4);
    background-color: var(--color-raise);
    box-shadow: var(--shadow-soft);
    overflow: visible;
}

.row-menu-entry {
    position: relative;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    margin: 0;
    padding: var(--rhythm-tight) var(--rhythm-regular);
    border: 0;                            /* an entry may be a button (Log Out) */
    background: none;
    color: var(--color-ink);
    font-family: inherit;
    font-size: 16.8px;                    /* elder fallback: the floor */
    font-size: var(--text-base);
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}


.row-menu-entry:focus-visible {
    outline: 2px solid var(--color-salmon);
    outline-offset: -2px;
}

.row-menu-entry--danger { color: var(--color-danger); }

.row-menu-rule {
    position: relative;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    height: 1px;
    margin: var(--rhythm-min) 0;
    background-color: var(--color-line);
}

/* the same entries in the no-JS menu modal: a plain block, not a popover */
.row-menu--static {
    display: block;
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    min-width: 0;
    margin: 0 0 var(--rhythm-regular);
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* ---- item lists modal (the "(n) others" roster) -------------------------- */

.item-lists {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-regular);
    padding: 0 0 0 var(--rhythm-large);
    list-style: disc;
}

.item-lists-row {
    margin: 0 0 var(--rhythm-tight);
    font-size: 16.8px;                    /* elder fallback: the floor */
    font-size: var(--text-base);
}

/* ---- forms (page-level chrome; the lego lives in field.css) -------------- */

.form {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-large);
    padding-top: var(--rhythm-tight);     /* headroom for the first row's notch labels */
    font-size: 0px;                       /* kills inter-lego whitespace */
}

/* the row above the buttons matches the title gap - both ends of the form breathe alike */
.form .field:last-of-type,
.modal-form .field:last-of-type {
    padding-bottom: var(--rhythm-large);
}

.form-submit {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: auto;                          /* content-sized by declaration */
    min-width: 96px;
    margin: 0;
    padding: calc(var(--text-base) * 0.75) var(--rhythm-large);
    border: 0;
    border-radius: calc(var(--text-base) * 0.4);
    background-color: var(--color-salmon-deep);
    color: var(--color-accent-ink);
    font-family: inherit;
    /* large-text threshold: white on salmon holds the 3:1 large-text floor,
       so the label stays ≥18.7px bold — never floor-size on this ground */
    font-size: 18.7px;                    /* elder fallback ≥ large-text line */
    font-size: max(18.7px, var(--text-base));
    font-weight: 600;
    line-height: 1;                       /* padding owns the centering */
    cursor: pointer;
}

.form-submit:focus-visible {
    outline: 2px solid var(--color-salmon);
    outline-offset: 2px;
}

/* ---- toasts (last layer paints over everything; centered bottom) --------- */

#layer-toasts {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--rhythm-regular);
    width: var(--page-width);
    margin: 0 auto;
}

.toast {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin-bottom: var(--rhythm-tight);
    padding: var(--rhythm-tight) calc(var(--text-base) * 2.4) var(--rhythm-tight) var(--rhythm-regular);
    background-color: var(--color-charcoal);
    color: var(--color-accent-ink);
    border-radius: calc(var(--text-base) * 0.5);
}

.toast-message {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: auto;                          /* content-sized by declaration */
    margin: 0;
}

.toast-note-open {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: auto;                          /* content-sized by declaration */
    margin: 0 0 0 var(--rhythm-tight);
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-page);
    font-family: inherit;
    font-size: 16.8px;                    /* elder fallback: the floor */
    font-size: var(--text-base);
    text-decoration: underline;
    cursor: pointer;
}

.toast-dismiss {
    position: absolute;
    right: var(--rhythm-tight);
    top: 50%;
    width: calc(var(--text-base) * 2);
    height: calc(var(--text-base) * 2);
    margin: calc(var(--text-base) * -1) 0 0;   /* true vertical center on the text line */
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-accent-ink);          /* explicit: white on the charcoal ground */
    cursor: pointer;
}

.toast-dismiss .icon {
    --icon-size: calc(var(--text-base) * 2);
    --icon-mask-size: var(--icon-glyph);
}

/* ---- note modal (#layer-modals; scrim participates only in fallback) ----- */

.layer-scrim {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(38, 34, 28, 0.5);
}

#layer-modals:has(dialog[open]:not(:modal)) .layer-scrim { display: block; }

.modal {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: var(--modal-width);
    height: fit-content;                  /* inset 0 + auto margins = true center */
    max-height: 92%;                      /* a too-tall modal scrolls inside itself */
    margin: auto;
    /* top trimmed by the title's half-leading so the optical gap matches the bottom */
    padding: calc(var(--rhythm-large) - var(--text-base) * 0.3) var(--rhythm-large) var(--rhythm-large);
    border: 1px solid var(--color-line);
    border-radius: calc(var(--text-base) * 0.5);
    background-color: var(--color-raise);
    color: var(--color-ink);
}

.modal::backdrop { background-color: rgba(38, 34, 28, 0.5); }

.modal-title {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-large);      /* clears the first row's notch labels */
    font-size: 26px;                      /* elder fallback ≥ floor; page-title scale */
    font-size: calc(var(--text-base) * 1.55);
    letter-spacing: -0.01em;
    font-weight: 650;
}

.modal-form {
    position: relative;
    left: 0;
    top: 0;
    display: block;                       /* no baseline gap under the last row */
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 0px;                       /* kills inter-lego whitespace */
}


.modal-cancel {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: auto;                          /* content-sized by declaration */
    min-width: 96px;                     /* pairs with the submit's floor */
    margin: 0 0 0 var(--rhythm-tight);
    padding: calc(var(--text-base) * 0.75) var(--rhythm-large);
    border: 0;                            /* solid ground; same footprint as the submit */
    border-radius: calc(var(--text-base) * 0.4);
    background-color: var(--color-charcoal);
    color: var(--color-accent-ink);
    font-family: inherit;
    font-size: 18.7px;                    /* pairs with the submit beside it */
    font-size: max(18.7px, var(--text-base));
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.modal-cancel:focus-visible {
    outline: 2px solid var(--color-salmon);
    outline-offset: 2px;
}

/* the actions row: the anchor its pinned children position against */
.modal-actions {
    position: relative;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    margin: 0;
}

/* narrow render: the pair splits the row, pinned to its ends. The gap
   between them is the SAME stage as the vertical gap between field boxes. */
.modal-actions .form-submit,
.modal-actions .modal-cancel {
    width: calc(50% - var(--rhythm-regular) / 2);
    min-width: 0;
}

/* pin only where a submit shares the row — a lone Close stays in flow */
.modal-actions:has(.form-submit) .modal-cancel {
    position: absolute;
    left: auto;
    right: 0;
    top: 0;
    margin: 0;
}

@media (min-width: 640px) {
    .modal-actions .form-submit,
    .modal-actions .modal-cancel {
        width: auto;
        min-width: 96px;
    }

    .modal-actions:has(.form-submit) .modal-cancel {
        position: relative;
        left: 0;
        right: auto;
        margin: 0 0 0 var(--rhythm-regular);
    }
}

/* a page-scale title in a section head: center the action on the title's
   line box — title box is 1.55 × 1.45 ≈ 2.25×base, the button runs 2.5×base
   (text + 0.75× padding both sides), so the action starts half the excess
   above the box top */
.section-head:has(.page-title) .section-action { top: calc(var(--text-base) * -0.13); }

/* the title-and-action set clears the rows below it by a full stage */
.section-head:has(.page-title) { margin-bottom: var(--rhythm-regular); }

.modal-close {
    position: absolute;
    right: var(--rhythm-tight);
    top: var(--rhythm-tight);
    width: calc(var(--text-base) * 2);
    height: calc(var(--text-base) * 2);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-salmon);
    cursor: pointer;
}

.modal-close .icon { --icon-size: calc(var(--text-base) * 2); --icon-mask-size: var(--icon-glyph); }

/* prose inside a modal form (the form ground is font-size 0) */
.modal-copy {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0 0 var(--rhythm-regular);
    font-size: 16.8px;                    /* elder fallback: the floor */
    font-size: var(--text-base);
    line-height: 1.5;
}

/* a quoted entity label inside modal copy */
.modal-copy-label { font-weight: 500; }

/* ---- loader (staged sign-in; scrim is the dialog backdrop) --------------- */

.modal--loader {
    width: min(20rem, 92vw);              /* a status card, not a form */
    padding: var(--rhythm-large);
    text-align: center;
}

.loader-spinner {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: calc(var(--text-base) * 2);
    height: calc(var(--text-base) * 2);
    margin: 0 0 var(--rhythm-tight);
    border: 3px solid var(--color-line);
    border-top-color: var(--color-salmon);
    border-radius: 50%;
    animation: loader-turn 0.8s linear infinite;
}

@keyframes loader-turn {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .loader-spinner { animation: none; }
}

.loader-message {
    position: relative;
    left: 0;
    top: 0;
    display: inline-block;
    width: 100%;
    margin: 0;
    font-size: 16.8px;                    /* elder fallback: the floor */
    font-size: var(--text-base);
}
