/* Keel's look over the idp-theme webjar (theme.css: Bootstrap's classes in the Sovrain style): the frame with the
   side nav, the breadcrumb back link, page actions beside the heading, buttons at the right, framed lists, check
   cards and detail-page cards. Loaded after the webjar's theme.css, before keel.css. */

/* ---- A list on its own is framed like the IDP's .tbl-card; inside a card the card frames it ---- */

.table {
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
}
.table > :not(caption) > * > :first-child {
    padding-left: 1.25rem;
}
.table > :not(caption) > * > :last-child {
    padding-right: 1.25rem;
}
.table > thead > * > * {
    border-top: 0;
}
/* Named on the cell itself: inherited through tbody and tr, the light-dark() divider comes out as the text colour. */
.table > tbody > * > * {
    border-bottom-color: var(--color-divider);
}
.table > :last-child > tr:last-child > * {
    border-bottom: 0;
}
/* The frame's rounded corners: the cells there round with it, so a lit row stays inside. */
.table > :first-child > tr:first-child > :first-child { border-top-left-radius: calc(var(--radius-xl) - 1px); }
.table > :first-child > tr:first-child > :last-child { border-top-right-radius: calc(var(--radius-xl) - 1px); }
.table > :last-child > tr:last-child > :first-child { border-bottom-left-radius: calc(var(--radius-xl) - 1px); }
.table > :last-child > tr:last-child > :last-child { border-bottom-right-radius: calc(var(--radius-xl) - 1px); }
.card .table {
    margin-bottom: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}
.card .table :is(th, td) {
    border-radius: 0;
}
/* A link standing as a cell's own content names the row, in weight; one inside the cell's text or notes reads
   as text. Either is marked by a green chevron after it and underlined on hover. */
.table td > a:not(.btn) {
    color: var(--color-fg);
    font-weight: 500;
    text-decoration: none;
}
.table td > a:not(.btn):hover {
    text-decoration: underline;
}
.table td > * a:not(.btn) {
    color: var(--color-fg);
    text-decoration: none;
}
.table td a:not(.btn)::after {
    content: "\203A";
    margin-left: .3em;
    color: var(--color-accent);
    font-size: 1.25em;
    font-weight: 600;
    line-height: 1;
}
.table td > * a:not(.btn):hover {
    text-decoration: underline;
}

.btn__icon {
    flex: none;
}

/* ---- Utilities the theme adds ---- */

.text-mono {
    font-family: var(--font-mono);
}
.text-accent {
    color: var(--color-accent) !important;
}
.eyebrow {
    font-family: var(--font-mono);
    font-size: .6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-fg-subtle);
}

/* ---- The frame: header, side nav and footer, as in the IDP's admin shell ---- */

.keel-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 3.5rem;
    padding: .5rem 1.5rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-divider);
}
.keel-header__brand {
    display: flex;
    align-items: center;
    gap: .625rem;
    color: var(--color-fg);
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: -.01em;
    text-decoration: none;
}
.keel-header__brand:hover {
    color: var(--color-fg);
}
.keel-header__tenant {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--color-fg-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
}
.keel-header__tenant:hover {
    color: var(--color-fg);
}
.keel-header__sep {
    align-self: center;
    width: 1px;
    height: 1.25rem;
    background: var(--color-border-strong);
}
.keel-header__actions {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
}
/* The header's icon buttons: a 36px square that takes the quiet fill under the pointer. */
.keel-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    color: var(--color-fg-muted);
    background: transparent;
    border: 0;
    border-radius: var(--radius-lg);
    cursor: pointer;
}
.keel-icon-btn:hover,
.keel-icon-btn[aria-expanded="true"] {
    color: var(--color-fg);
    background: var(--color-fill-quiet);
}
.keel-icon-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
}
.keel-icon-btn svg {
    width: 18px;
    height: 18px;
}
.keel-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid var(--color-border);
}

.keel-nav {
    flex-shrink: 0;
    width: 15rem;
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--color-divider);
}
.keel-nav__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.keel-nav__link {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 2.5rem;
    padding: 0 .75rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-fg-secondary);
    text-decoration: none;
    border-radius: var(--radius-lg);
}
.keel-nav__link:hover {
    color: var(--color-fg);
    background: var(--color-nav-active);
}
.keel-nav__link[aria-current="page"] {
    color: var(--color-fg-strong);
    background: var(--color-accent-soft);
}
.keel-nav__link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

.keel-page-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .75rem;
    margin: 0 0 1.5rem;
    font: 600 1.375rem/1.5 var(--font-sans);
    letter-spacing: -.015em;
}

.keel-aside {
    flex-shrink: 0;
    width: 15rem;
    padding: 1.5rem 1rem;
    border-left: 1px solid var(--color-divider);
}

.keel-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    font-size: var(--text-xs);
    color: var(--color-fg-subtle);
    border-top: 1px solid var(--color-divider);
}

/* A badge reads as written, in sentence case: the webjar capitalizes every word ("Waiting For The Next Sync"). */
.badge {
    text-transform: none;
}

/* A choicePicker's list is as wide as its matches up to the window's width, where a long detail (an id) wraps. */
[data-choice-matches] > * > small { min-width: 0; overflow-wrap: anywhere; }

/* min-width: beside the side nav the page shrinks to the room left, so a wide table scrolls in its own frame
   rather than pushing the page past the window. */
.keel-page {
    min-width: 0;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.keel-nav__link.keel-nav__section {
    min-height: 2rem;
    margin-top: 1.25rem;
    font: 500 .6875rem/1.4 var(--font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-fg-subtle);
}
.keel-nav__link.keel-nav__section:hover,
.keel-nav__link.keel-nav__section[aria-current="page"] {
    color: var(--color-fg-strong);
}

/* A phone: the side nav wraps above the page with every link in sight, each section's heading on a line of its own,
   the header keeps to one line without the tenant's slug, and a page's tabs scroll sideways. */
@media (max-width: 767.98px) {
    div:has(> .keel-nav) {
        flex-direction: column;
    }
    .keel-nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 2px;
        width: auto;
        padding: .5rem 1rem;
        border-right: 0;
        border-bottom: 1px solid var(--color-divider);
    }
    .keel-nav__list {
        display: contents;
    }
    .keel-nav__link {
        min-height: 2.25rem;
        white-space: nowrap;
    }
    .keel-nav__link.keel-nav__section {
        flex-basis: 100%;
        min-height: 1.75rem;
        margin: .5rem 0 0;
    }
    .keel-header {
        padding: .5rem 1rem;
    }
    .keel-header__brand,
    .keel-header__tenant {
        min-width: 0;
        white-space: nowrap;
    }
    .keel-header__brand span,
    .keel-header__tenant span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .keel-header__tenant code {
        display: none;
    }
    .keel-page .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }
    .keel-page .nav-tabs .nav-link {
        white-space: nowrap;
    }
}

/* The way back up (components/backLink.jte): a quiet link with a chevron, like the IDP's breadcrumb. */
.back-link {
    margin: 0 0 1rem;
    font-size: .8125rem;
    line-height: 1.5;
}
.back-link a {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    color: var(--color-fg-muted);
    text-decoration: none;
}
.back-link a:hover {
    color: var(--color-fg);
}
.back-link a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
/* Called first in the content, it is lifted above the heading, below any operator notice. */
.keel-page__body {
    display: flow-root;
    position: relative;
}
.keel-page__body > .keel-page-title:first-child:has(+ .back-link) {
    margin-top: 1.875rem;
}
.keel-page__body > .keel-page-title:first-child + .back-link {
    position: absolute;
    top: 0;
}

/* The page's own actions (components/pageActions.jte): at the right of the heading, centred on its line, like
   the IDP's page header; the heading leaves them room. */
.page-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-bottom: 1rem;
}
.keel-page__body > .keel-page-title:first-child ~ .page-actions {
    position: absolute;
    top: -.25rem;
    right: 0;
    margin: 0;
}
.keel-page__body:has(> .keel-page-title:first-child + .back-link) > .page-actions {
    top: calc(1.875rem - .25rem);
}
.keel-page__body:has(> .keel-page-title:first-child ~ .page-actions) > .keel-page-title {
    padding-right: 14rem;
}
/* A phone has no room beside the heading: the actions follow it on a line of their own, and the page keeps a
   narrower gutter. */
@media (max-width: 767.98px) {
    .keel-page {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .keel-page__body > .keel-page-title:first-child ~ .page-actions {
        position: static;
        margin-bottom: 1rem;
    }
    .keel-page__body:has(> .keel-page-title:first-child ~ .page-actions) > .keel-page-title {
        padding-right: 0;
    }
}

/* Buttons sit at the right, as in the IDP's cards and save bars: a row of nothing but buttons (.form-actions, a
   paragraph holding one), and a lone button closing a form or fieldset or leading its help text. Grid columns, groups and menus keep their own
   layout, and so does a link-style button. */
.form-actions,
:is(p, div):not([class*="col"]):not(.input-group):not(.btn-group):not(.dropdown):not(.page-actions):not(.keel-header__actions):has(> .btn):not(:has(> :not(.btn, input[type="hidden"]))) {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
}
form:not(.row):not(.d-flex):not(.d-inline):not(.d-inline-block) > .btn:not(.btn-link):not(.d-block),
fieldset > .btn:not(.btn-link):not(.d-block),
div:not([class*="col"]):not(.d-flex):not(.input-group) > .btn:has(+ .form-text) {
    display: flex;
    width: fit-content;
    margin-left: auto;
}

/* Check cards (the IDP's radio card, for checkboxes): a choice that needs a sentence of explanation, the whole
   card the target; a checked one takes a green hairline and a faint fill. */
.check-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
    gap: .75rem;
}
.check-card {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .875rem 1rem;
    border: 1px solid var(--color-control-border);
    border-radius: .625rem;
    background: var(--color-surface-sunken);
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}
.check-card .form-check-input {
    flex: none;
    margin-top: 1px;
}
.check-card:hover {
    background: var(--color-surface-subtle);
    border-color: var(--color-border-strong);
}
.check-card:has(input:checked) {
    background: var(--color-accent-wash);
    border-color: var(--color-accent-line);
}
.check-card:has(input:disabled) {
    opacity: .45;
    cursor: not-allowed;
}
.check-card__title {
    display: block;
    font: 500 .8125rem/1.4 var(--font-mono);
    color: var(--color-fg);
}
.check-card__desc {
    display: block;
    margin-top: 2px;
    font-size: .8125rem;
    line-height: 1.55;
    color: var(--color-fg-muted);
}

/* A card holding a section of a detail page: the heading names it, a mono count may follow, and its list sits
   flush under the body (.card-body-flush) or a line says it is empty. */
h2.card-header {
    justify-content: flex-start;
    margin: 0;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.5;
}
.card-header__count {
    margin-left: .375rem;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--color-fg-subtle);
}
.card > .card-body + .card-empty {
    margin: 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-fg-muted);
    font-size: var(--text-sm);
}
/* A button closing a row of fields stands as tall as them. */
.card .row.align-items-end > [class*="col"] > .btn {
    min-height: 2.75rem;
}

/* What the buttons of a .form-actions row do, said once under the row rather than under each button. */
.form-actions-notes {
    margin-top: .75rem;
}
.form-actions-notes:not(:has(*)) {
    display: none;
}
.form-actions-notes > .form-text {
    margin: 0 0 .375rem;
}

/* A setting that is one short field (a number, a period) keeps its buttons beside the control, rather than across
   the page. The form and its field step aside (display: contents) so the label, the control and the hints sit in
   one grid with the buttons: the control and the buttons share a row, the hints run under both. */
.property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .75rem;
    row-gap: .5rem;
    align-items: center;
}
.property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) > #property-form,
.property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) > #property-form > :nth-child(2) {
    display: contents;
}
.property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) > #property-form > :nth-child(2) > *,
.property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) > .form-actions-notes {
    grid-column: 1 / -1;
}
.property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) > #property-form > :nth-child(2) > label {
    grid-row: 1;
}
.property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) > #property-form > :nth-child(2) > :is(.form-control-short, .input-group) {
    grid-row: 2;
    grid-column: 1;
    width: 16rem;
}
.property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) > .form-actions {
    grid-row: 2;
    grid-column: 2;
    justify-content: flex-start;
}
.property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) > .form-actions .btn {
    min-height: 2.75rem;
}

/* Sign-in pages (log in, passwords, two-factor, choosing a tenant): a narrow centred column, heading included. */
.keel-page:has(> .keel-page__body > .keel-narrow) {
    max-width: calc(28rem + 5rem);
}

/* Facts about one thing (a member, a key): labels in a narrow column beside the values. */
.facts {
    display: grid;
    /* One label width on every page, so facts in cards one above the other line up. */
    grid-template-columns: minmax(10rem, max-content) minmax(0, 1fr);
    gap: .5rem 1.5rem;
    align-items: center;
    margin: 0;
}
.facts > * { font-size: .875rem; }
.facts > dt { font-weight: 500; color: var(--bs-secondary-color); }
.facts > dd { margin: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }

/* The configuration index: one width for every section's columns, so the groups line up. */
.property-table { table-layout: fixed; }
.property-table th:nth-child(1) { width: 28%; }
.property-table th:nth-child(2) { width: auto; }
.property-table th:nth-child(3) { width: 14%; }
.property-table th:nth-child(4) { width: 9rem; }
/* Where the page is narrow (a phone, or a tablet beside the side nav) the table sizes to its content instead, so the
   fixed columns cannot squeeze a heading over the next one; one that still does not fit becomes cards (trafly.js). */
@media (max-width: 1199.98px) {
    .property-table { table-layout: auto; }
    .property-table th:is(:nth-child(1), :nth-child(3), :nth-child(4)) { width: auto; }
}

/* The identity provider's fields (components/identityProviderFields.jte): three sections, each under a ruled
   title, the connection's fields two to a row. */
.idp-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 0 1.75rem;
}
/* The rule goes on the legend: a fieldset's top padding would open under its legend, not above it. */
.idp-section + .idp-section > .idp-section__title {
    width: 100%;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-divider);
}
.idp-section__title {
    float: none;
    margin: 0 0 1rem;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.5;
}
.idp-section > :not(legend),
.idp-section .row > [class*="col"] > * {
    margin-bottom: 0 !important;
}
.idp-section .form-check { margin: 0; }
.idp-section:last-of-type { margin-bottom: 0; }
.idp-admission-claim {
    max-width: 44rem;
    margin: -.25rem 0 0 1.75rem;
}
.idp-mappings > thead th:last-child { width: 1%; white-space: nowrap; }

/* A retention period beside the reason for keeping it longer (components/justifiedPeriodInput.jte), each
   pair ruled off from the next. */
.justified-period {
    margin-bottom: 1.25rem;
}
.justified-period + .justified-period {
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-divider);
}
.justified-period .row > [class*="col"] > * { margin-bottom: 0 !important; }
.justified-period > .form-text { margin: .5rem 0 0; }

/* A copy icon inside a field's box (components/copyIconButton.jte): the field leaves it room at the right; it
   turns to a check while the copy is confirmed. Alone, beside a code, it is a small ghost button. */
.input-icon {
    position: relative;
}
.input-icon > .form-control {
    padding-right: 2.75rem;
}
.input-icon > .icon-copy {
    position: absolute;
    /* Centred on the control's line, not on the box, which grows when a validation message shows. */
    top: calc(1.375rem - 1rem);
    right: .5rem;
}
.icon-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--bs-secondary-color);
    vertical-align: middle;
}
.icon-copy:hover { color: var(--bs-body-color); background: var(--bs-tertiary-bg); }
.icon-copy:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.icon-copy__done, .icon-copy.is-copied > .icon-copy__idle { display: none; }
.icon-copy.is-copied > .icon-copy__done { display: block; color: var(--color-accent); }
.copyable__value {
    display: block;
    font-size: .875rem;
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
}
.copyable-narrow { max-width: 28rem; }
.facts > dd > .d-block { width: 100%; }
.terms-description {
    padding-top: 1rem;
    border-top: 1px solid var(--color-divider);
    font-size: .875rem;
}
.terms-description > :last-child { margin-bottom: 0; }

/* The search above an audit log (admin/audit/search.jte): one row across the whole width, the dates at their
   own size and the rest sharing what is left; on a narrow screen two to a row. */
.audit-search {
    display: grid;
    grid-template-columns: 10rem 10rem minmax(10rem, 1fr) minmax(10rem, 1fr) minmax(12rem, 2fr) auto;
    gap: .75rem;
    align-items: end;
}
.audit-search .form-label { white-space: nowrap; }
.audit-search__actions { display: flex; gap: .5rem; }
.audit-search__actions > .btn { min-height: 2.75rem; }
@media (max-width: 1399.98px) {
    .audit-search { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .audit-search__actions { justify-content: flex-end; align-self: end; }
}
@media (max-width: 991.98px) {
    .audit-search { grid-template-columns: 1fr 1fr; }
    .audit-search__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 575.98px) {
    .audit-search { grid-template-columns: minmax(0, 1fr); }
    /* a long button label or badge wraps rather than reaching past its card */
    .keel-page :is(.btn, .badge) { max-width: 100%; white-space: normal; }
}

/* An administration section's icon (admin/sectionIcon.jte), green on a soft green tile before its title. */
.section-title {
    display: flex;
    align-items: center;
    gap: .625rem;
}
.section-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 14%, transparent);
}

/* A group of radio choices, some with their own field (a date, a period, a price) set under the choice's
   label, indented to it. */
.choice-group {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin: 0;
}
.choice-group + .choice-group { margin-top: 1.25rem; }
.choice-group > legend { float: none; margin-bottom: .5rem; }
.choice-group > .form-check { margin: 0; }
.choice-detail { margin: -.125rem 0 .25rem 1.75rem; }
.choice-detail .form-text { margin-top: .375rem; }

/* The site operators (admin/operators.jte): one row per operator, each role it holds stacked with its end. */
.operator-roles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.operator-grants > tbody > tr > td:first-child { width: 16rem; min-width: 14rem; }
.terms-periods .row > [class*="col"] > *, .terms-periods > [class*="col"] > * { margin-bottom: 0 !important; }
.card-body .row.g-3 > [class*="col"] > .mb-3 { margin-bottom: 0 !important; }
/* A card's body spaces its fields itself (a flex column with a gap); a field's own bottom margin would double it. */
.card-body > .mb-3, .card-body > div > .mb-3:last-child { margin-bottom: 0 !important; }

/* Tom Select marks an empty required select invalid the moment it is drawn; the red waits for a submit
   (static/validation-reveal.js sets was-validated on the form). */
form:not(.was-validated) .ts-wrapper.invalid .ts-control {
    border-color: var(--color-control-border) !important;
    box-shadow: none !important;
}
form:not(.was-validated) .ts-wrapper.invalid:is(.focus, .dropdown-active) .ts-control {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px var(--color-accent-ring) !important;
}

/* A long id in a table cell (a license, a public id, a key) breaks where it must rather than widening the page. */
.table td :is(code, .text-mono) { overflow-wrap: anywhere; }

/* The plan page's settings: one card, a row per setting - label, control with its help, and its own button. */
.plan-settings { gap: 0; padding-block: 0; }
.plan-setting {
    display: grid;
    grid-template-columns: 8rem minmax(0, 28rem) 1fr;
    gap: .5rem 1.5rem;
    align-items: start;
    padding-block: 1.25rem;
}
.plan-setting + .plan-setting { border-top: 1px solid var(--color-divider); }
.plan-setting__label { padding-top: .7rem; font-size: var(--text-sm); font-weight: 500; }
.plan-setting__value { padding-top: .7rem; font-size: var(--text-sm); }
.plan-setting > .btn { justify-self: start; min-height: 2.75rem; }
@media (max-width: 767.98px) {
    /* on a phone a one-field setting stacks again: label, control, hints, then the buttons */
    .property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) { display: block; }
    .property-editor:has(> #property-form > :nth-child(2):last-child .form-control-short) > #property-form > :nth-child(2) > :is(.form-control-short, .input-group) {
        width: auto;
        max-width: 16rem;
    }
    /* on a phone each label sits above its value, which keeps the whole width */
    .facts { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    .facts > dd { margin-bottom: .5rem; }
    .plan-setting { grid-template-columns: 1fr; }
    .plan-setting__label { padding-top: 0; }
}
