/* This host's layout and visual accents. Colour, type and the shared controls arrive from
   /branding/theme.css and /css/rota-controls.css, which are generated from RotaPalette — the same
   values that seed the coordinator site's MudBlazor theme, so a button here is the button there.

   Unbranded, and that has not changed: Program.cs maps the theme with branded: false, so the
   palette this host gets is the neutral one whatever group is open. What used to sit here was a
   fourth hand-made copy of the palette that had already drifted from the other three — the cards
   were a shade off the coordinator site's and the dark scheme was its own invention. */

/* Workspace shell and shared page patterns. */
body {
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-workspace {
    --admin-tint: color-mix(in srgb, var(--brand) 7%, var(--card));
    --admin-selected: color-mix(in srgb, var(--brand) 13%, var(--card));
    --admin-edge: color-mix(in srgb, var(--brand) 30%, var(--line));
}

.admin-bar {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--app-header);
    color: var(--on-app-header);
}

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.2;
}

.brand small {
    display: block;
    margin-top: .2rem;
    font-size: .75rem;
    font-weight: 400;
    opacity: .8;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid currentColor;
    border-radius: 6px;
    font-size: 1.35rem;
    background: color-mix(in srgb, var(--on-app-header) 12%, var(--app-header));
}

.environment-label {
    margin-left: auto;
    font-size: .8125rem;
    opacity: .8;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -5rem;
    z-index: 20;
    padding: .75rem 1rem;
    background: var(--card);
    color: var(--ink);
}

.skip-link:focus {
    top: 1rem;
}

.admin-workspace {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

.admin-workspace .admin-bar {
    grid-column: 1 / -1;
}

.workspace-navigation {
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--brand) 3%, var(--card));
}

.workspace-navigation > summary {
    padding: .75rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.25rem 1rem;
}

.nav-heading {
    margin: 1.5rem .75rem .5rem;
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--brand);
    font-weight: 700;
}

.nav-heading:first-child {
    margin-top: 0;
}

.workspace-navigation nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .6rem .75rem;
    margin: .15rem 0;
    border-radius: var(--mud-default-borderradius);
    text-decoration: none;
    color: var(--quiet);
    font-size: .9rem;
    font-weight: 500;
}

.workspace-navigation nav a:hover {
    background: var(--admin-tint);
    color: var(--ink);
}

.workspace-navigation nav a[aria-current=page] {
    background: var(--admin-selected);
    color: var(--brand);
    font-weight: 700;
    box-shadow: inset 3px 0 var(--brand);
}

.sidebar-account {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
    padding: 1.25rem .75rem 0;
    border-top: 1px solid var(--line);
    font-size: .8125rem;
}

.sidebar-account .who {
    max-width: 100%;
}

.sidebar-account a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.version {
    color: var(--quiet);
    font-size: .75rem;
}

.workspace-content {
    min-width: 0;
}

main {
    width: 100%;
    max-width: 90rem;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

.admin-auth main {
    max-width: 34rem;
    padding-top: 3rem;
}

.admin-auth .environment-label {
    display: none;
}

h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.25;
    letter-spacing: -.025em;
}

h2 {
    font-size: 1.2rem;
    margin: 1.75rem 0 .75rem;
    line-height: 1.4;
}

h3 {
    font-size: 1rem;
}

.lead {
    color: var(--quiet);
    max-width: 65ch;
    margin: .65rem 0 1.75rem;
}

.eyebrow {
    margin: 0 0 .4rem;
    color: var(--quiet);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.page-heading, .section-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .75rem 1.5rem;
    margin-bottom: .75rem;
}

.section-heading h2 {
    margin: 0;
}

.page-heading .button-link {
    flex: 0 0 auto;
}

.admin-workspace .page-heading, .group-heading {
    padding: 1.25rem;
    border: 1px solid var(--admin-edge);
    border-left: 4px solid var(--brand);
    border-radius: var(--mud-default-borderradius);
    background: var(--admin-tint);
}

.admin-workspace .eyebrow {
    color: var(--brand);
}

.card {
    min-width: 0;
    padding: 1.5rem;
    margin: 1rem 0;
}

.card > :first-child {
    margin-top: 0;
}

.card > :last-child {
    margin-bottom: 0;
}

.card h3 {
    margin: 0 0 .5rem;
}

.card > p {
    margin: .5rem 0;
}

.admin-workspace .card > h2, .admin-workspace .section-heading h2 {
    color: var(--brand);
}

.admin-workspace .note {
    background: var(--admin-tint);
    border-color: var(--admin-edge);
}

.group-card {
    border-left: 3px solid var(--brand);
}

.hint {
    color: var(--quiet);
}

form {
    max-width: 48rem;
}

form.card {
    margin: 1rem 0 1.5rem;
}

.operator-invite {
    max-width: none;
}

.operator-invite > p {
    max-width: 48rem;
}

form > button, form > .action-row {
    margin-top: 1.25rem;
}

input, select, textarea {
    max-width: 100%;
}

input[type=file] {
    max-width: 100%;
}

.action-row form {
    margin: 0;
}

.action-row form > button {
    margin-top: 0;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
}

.cancel {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem .75rem;
}

.button-link.secondary {
    color: var(--brand);
    background: var(--card);
    border-color: var(--admin-edge, var(--line));
}

.button-link.secondary:hover {
    background: var(--admin-selected, var(--page));
}

.admin-footer {
    max-width: 90rem;
    margin: 0 auto;
    padding: 0 2rem 1.5rem;
    color: var(--quiet);
    font-size: .75rem;
}

.admin-auth .admin-footer {
    max-width: 34rem;
    text-align: center;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin: 0 0 1.5rem;
    font-size: .8125rem;
    color: var(--quiet);
}

.breadcrumbs a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}

.breadcrumbs a + a::before, .breadcrumbs span::before {
    content: "/";
    margin-right: .5rem;
    color: var(--quiet);
}

.group-heading .group {
    margin-top: .75rem;
}

.group-heading {
    margin-bottom: 1.5rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.overview-grid .card {
    margin: 0;
}

.metric {
    --metric-accent: var(--brand);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-top: 4px solid var(--metric-accent);
    background: color-mix(in srgb, var(--metric-accent) 7%, var(--card));
}

.metric-problems {
    --metric-accent: var(--mud-palette-secondary);
}

.metric-backups {
    --metric-accent: var(--mud-palette-tertiary);
}

.metric .eyebrow {
    color: var(--metric-accent);
}

.admin-workspace .metric > h2 {
    color: var(--ink);
}

.metric h2 {
    margin: .3rem 0 .75rem;
    font-size: 1.5rem;
}

.metric p {
    font-size: .875rem;
}

.metric > a {
    margin-top: auto;
    padding-top: 1rem;
    font-size: .875rem;
    font-weight: 600;
}

.record-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.record-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}

.record-list .hint {
    margin: .4rem 0 0;
    font-size: .8125rem;
}

/* A record's own button keeps its width, and the words beside it wrap instead: at phone width the
   list squeezed "Forget" until it broke across three lines. */
.record-list li > form {
    flex: none;
    margin: 0;
}

.record-list li > form button {
    white-space: nowrap;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--quiet);
}

.empty-state h2 {
    margin: 0 0 .5rem;
    color: var(--ink);
    font-size: 1.1rem;
}

.settings-heading {
    margin-top: 1.5rem;
}

.messaging-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.messaging-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .5rem .9rem;
    border-radius: var(--mud-default-borderradius);
    text-decoration: none;
    color: var(--quiet);
    border: 1px solid var(--line);
}

.messaging-nav a[aria-current=page] {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--admin-selected);
    font-weight: 600;
}

@media (min-width: 64rem) {
    .workspace-navigation > summary {
        display: none;
    }
    .sidebar-content {
        position: sticky;
        top: 0;
        max-height: 100vh;
        overflow-y: auto;
        min-height: calc(100vh - 4.5rem);
        justify-content: space-between;
    }
}

@media (max-width: 63.999rem) {
    .admin-workspace {
        display: block;
    }
    .workspace-navigation {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .sidebar-content {
        padding-top: .5rem;
    }
    .workspace-navigation nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .15rem .75rem;
    }
    .nav-heading {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
    main {
        padding: 1.5rem;
    }
    .admin-footer {
        padding: 0 1.5rem 1rem;
    }
}

@media (max-width: 45rem) {
    .overview-grid {
        grid-template-columns: 1fr;
    }
    .admin-bar {
        padding: .9rem 1rem;
    }
    .environment-label {
        display: none;
    }
    main, .admin-auth main {
        padding: 1.5rem 1rem 2rem;
    }
    .card {
        padding: 1.1rem;
    }
    .page-heading {
        align-items: flex-start;
    }
    .page-heading .button-link {
        width: 100%;
    }
}

/* The page-level h2 margin would open an empty band at the top of the card. */
.history-detail h2, .backup-now h2, .restore-check h2 { margin-top: 0; }

/* The nightly time and days kept, side by side where there is room. */
.backup-schedule { display: flex; flex-wrap: wrap; gap: 0 1.5rem; align-items: flex-end; }
.backup-schedule p { margin: 0; }
.backup-schedule input[type=number] { width: 6rem; }

/* The problems page's reference search: the box and its button on one line, wrapping on a phone. A
   reference is 32 characters, so the box is as wide as one. */
.problem-search { display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: flex-end; }
.problem-search p { margin: 0; flex: 0 1 26rem; }
.problem-search input { width: 100%; font-family: ui-monospace, monospace; }

/* Keep the whole level visible even beside a long message. State belongs below it, rather than
   making the level column wider. The same level badges appear in the overview and problem details. */
.problem-levels { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.problem-levels .tag { white-space: nowrap; }
.tag.problem-level {
    display: inline-flex;
    align-items: center;
    padding: .15rem .5rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--warn);
    background: color-mix(in srgb, var(--warn) 8%, var(--card));
    border-color: color-mix(in srgb, var(--warn) 40%, var(--card));
}
.problem-level.level-error {
    color: var(--bad);
    background: color-mix(in srgb, var(--bad) 8%, var(--card));
    border-color: color-mix(in srgb, var(--bad) 40%, var(--card));
}
.problem-level.level-fatal {
    color: var(--mud-palette-error-text);
    background: var(--bad);
    border-color: var(--bad);
}

.problem-list th, .problem-list td { vertical-align: top; }
.problem-list .problem-count { font-variant-numeric: tabular-nums; }
@media (min-width: 601px) {
    .problem-list th, .problem-list td { overflow-wrap: normal; }
    .problem-list td[data-label="What went wrong"] { overflow-wrap: anywhere; }
    .problem-list .problem-count { text-align: right; }
    .problem-list td.problem-count { white-space: nowrap; }
    .problem-list .problem-last-seen { min-width: 8rem; }
}

/* A problem's last seven days: one row of seven numbers, which fits a phone, rather than seven rows. */
.problem-week th, .problem-week td { text-align: center; }

/* Its occurrences: the reference is 32 characters with nowhere to break, so it breaks anywhere and the
   other columns keep their words whole — which the page-wide overflow-wrap would not let a table do. */
@media (min-width: 601px) { .problem-occurrences td { overflow-wrap: normal; } }
.problem-occurrences code { word-break: break-all; font-size: .8125rem; }

/* A history entry's before and after. Wraps rather than scrolls sideways, so a long value is still
   readable at phone width. */
.history-json {
    margin: .25rem 0 .75rem;
    padding: .5rem .75rem;
    border: 1px solid var(--line);
    background: var(--page);
    font-size: .8125rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 1.25rem 0 1.5rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--line);
}

.section-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .45rem .75rem;
    border: 1px solid transparent;
    border-radius: var(--mud-default-borderradius);
    font-weight: 600;
    text-decoration: none;
}

.section-nav a[aria-current="page"] {
    color: var(--brand);
    background: var(--admin-selected);
    border-color: var(--admin-edge);
    box-shadow: inset 0 -3px var(--brand);
}

.section-nav a:hover, .messaging-nav a:hover {
    background: var(--admin-tint);
}

.group { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem; }
.group a { font-weight: 600; }
.group .tag { flex: 0 0 auto; max-width: 100%; overflow-wrap: break-word; }
.tag { font-size: .75rem; padding: .1rem .45rem; border-radius: 3px; border: 1px solid var(--line); color: var(--quiet); }
.tag.off {
    color: var(--bad);
    border-color: var(--bad);
    background: color-mix(in srgb, var(--bad) 8%, var(--card));
}
.tag.on {
    color: var(--good);
    border-color: var(--good);
    background: color-mix(in srgb, var(--good) 8%, var(--card));
}

table { margin-top: .5rem; }

.admin-workspace thead th {
    color: var(--ink);
    background: var(--admin-tint);
    border-bottom-color: var(--admin-edge);
}

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }



.branding-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .5rem 1rem; }
.branding-grid figure { margin: .5rem 0; min-width: 0; }
.artwork-card { margin: 1.5rem 0; padding: 1rem; border: 1px solid var(--line); min-width: 0; }
.artwork-card legend { font-weight: 600; }
.artwork-current { object-fit: contain; border-radius: 10px; background: var(--page); }
/* The file inputs inside a card must not push it wider than the grid column it sits in. */
.artwork-card input[type=file] { max-width: 100%; }
.branding-previews, .pack-previews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 1rem;
}
.branding-previews h4 { margin: .5rem 0; }
.brand-preview-card, .pack-preview-card { min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.brand-preview-card > h4, .pack-preview-card > h4 { margin: 0; padding: .65rem .75rem; }
.brand-preview-header { display: flex; gap: .7rem; align-items: center; padding: .75rem; border-bottom: 3px solid; overflow-wrap: anywhere; }
.brand-preview-header div { min-width: 0; }
.brand-preview-header span, .brand-preview-header strong { display: block; }
.brand-preview-header span { font-size: .8rem; }
.brand-preview-header [hidden] { display: none; }
.brand-preview-header canvas { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 8px; }
.brand-preview-header canvas.preview-web-wordmark.is-wide { width: min(145px, 38vw); height: 48px; flex: 0 1 145px; object-fit: contain; }
.installed-preview { display: flex; flex-direction: column; align-items: center; gap: .4rem; overflow-wrap: anywhere; }
.icon-treatments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: .75rem; }
.icon-treatments figure { min-width: 0; margin: 0; text-align: center; font-size: .75rem; color: var(--quiet); }
.icon-treatments canvas, .icon-treatments img { display: block; width: 64px; height: 64px; margin: 0 auto .35rem; object-fit: contain; border-radius: 14px; }
.icon-treatments .mask-preview canvas, .icon-treatments .maskable img { border-radius: 50%; }
.icon-treatments .favicon-preview canvas, .icon-treatments .favicon img { width: 32px; height: 32px; border-radius: 7px; margin-top: 16px; }
.brand-preview-card > p, .pack-preview-card > p { margin: 0; padding: 0 .75rem .75rem; }
.pack-preview-header { display: flex; align-items: center; gap: .7rem; min-height: 72px; padding: .65rem; color: var(--pack-foreground); background: var(--pack-header); border-bottom: 3px solid var(--pack-accent); }
.pack-preview-header img { width: auto; max-width: min(9rem, 55%); height: 48px; object-fit: contain; }
.pack-preview-header span { overflow-wrap: anywhere; }
.rcs-pack-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1rem; }
.rcs-pack-previews figure { margin: .5rem 0; }
.rcs-pack-previews img { display: block; max-width: 100%; max-height: 12rem; object-fit: contain; }
.table-scroll { overflow-x: auto; }
.pack-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pack-actions form { margin: 0; }
.pack-review details { margin-top: 1rem; }

/* Configuration values and the operator's address must wrap on narrow screens. */
.card table { table-layout: fixed; }
table { width: 100%; }
.table-scroll { max-width: 100%; }

.setup-status h2 { margin-top: 0; }
.setup-checklist { list-style: none; padding: 0; margin: .75rem 0 0; }
.setup-checklist li {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: .75rem;
    padding: .55rem 0;
    border-top: 1px solid var(--line);
}
.setup-result { font-weight: 600; }
.setup-checklist [data-state="ready"] .setup-result { color: var(--good); }
.setup-checklist [data-state="missing"] .setup-result { color: var(--bad); }
.setup-checklist [data-state="review"] .setup-result { color: var(--quiet); }

@media (max-width: 600px) {
    .section-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section-nav a { justify-content: center; text-align: center; }
    .icon-treatments { grid-template-columns: repeat(3, minmax(4.5rem, 1fr)); overflow-x: auto; }
    .setup-checklist li { grid-template-columns: 1fr; gap: .1rem; }

    .responsive-records thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .responsive-records,
    .responsive-records tbody,
    .responsive-records tr,
    .responsive-records th,
    .responsive-records td {
        display: block;
        width: 100%;
    }

    .responsive-records tr {
        margin-bottom: .75rem;
        padding: .5rem;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: var(--card);
    }

    .responsive-records tbody th,
    .responsive-records td {
        display: grid;
        /* Keep label and value together at normal size, then stack them when enlarged text
           needs more room. A fixed label minimum squeezed severity badges beyond the page. */
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
        gap: .5rem;
        padding: .45rem .25rem;
    }

    .responsive-records tbody th::before,
    .responsive-records td::before {
        content: attr(data-label);
        color: var(--quiet);
        font-weight: 600;
    }

    .responsive-records td form:first-child button { margin-top: 0; }
}

/* Group panels share an edge, whether the panel itself is a form or contains one. Keep the
   existing reading/field width inside the panel instead of narrowing its outer surface. */
.group-settings > .card {
    max-width: none;
    margin: 1rem 0 1.5rem;
}

.group-settings > form.card > *, .group-settings > .card > p {
    max-width: 48rem;
}

/* Sign-in and authenticator set-up (ADR-24). */

.codes {
    list-style: none;
    padding: .75rem;
    margin: 0 0 1rem;
    border: 1px solid var(--line);
    border-radius: var(--mud-default-borderradius);
    background: var(--card);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .35rem .75rem;
    font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
    letter-spacing: .08em;
}

.secret {
    font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
    font-size: 1.0625rem;
    letter-spacing: .12em;
    word-break: break-all;
    background: var(--page);
    border: 1px solid var(--line);
    border-radius: var(--mud-default-borderradius);
    padding: .6rem .8rem;
    margin: 0 0 1rem;
}

/* The shared sheet draws this as a button already; a sign-in page has room for a wider one. */
.button-link { padding: .6rem 1.2rem; }

/* Connectors (ADR-58): a card per channel, headed inside the card like every other card on this
   site. They were fieldsets, whose legend the browser draws on the top border, so the headings sat
   across the card's edge; each form is named by its heading instead, which a screen reader announces
   on the way in just as it did the legend. */
.connector { max-width: 51rem; }
.connector h3 { font-size: 1.0625rem; margin: 0 0 .35rem; }
.connector h3 .optional { margin-left: .35rem; font-size: .8125rem; font-weight: 400; color: var(--quiet); }
.card .connector-status { margin: 0 0 .25rem; color: var(--ink); }
.connector-status b { margin-right: .15rem; }
.connector-status[data-state="ready"] b { color: var(--good); }
.connector-status[data-state="off"] b,
.connector-status[data-state="not-saved"] b { color: var(--quiet); }
.connector details { margin-top: .75rem; }
/* Padding rather than flex for the 44px target: flex on a summary drops its disclosure triangle. */
.connector summary { cursor: pointer; padding: .7rem 0; }
.connector-keys { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.connector-keys h4 { margin: 0 0 .25rem; font-size: .9375rem; }
.not-kept { color: var(--bad); font-weight: 600; }

/* A connector's on/off switch, drawn as a toggle. The shared .check draws a plain tick box; this
   outranks it for the switches only. Off is an outlined track with a grey knob and on is a filled
   track with a light one, so either state has a 3:1 edge against the card (WCAG 1.4.11) without
   relying on colour alone: the knob also moves. */
.check.toggle input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 1.5rem;
    margin: 0;
    border: 2px solid var(--mud-palette-lines-inputs);
    border-radius: 999px;
    background: var(--card);
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.check.toggle input::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--quiet);
    transition: transform .15s, background-color .15s;
}
.check.toggle input:checked { background: var(--brand); border-color: var(--brand); }
.check.toggle input:checked::before { background: var(--on-brand); transform: translateX(1.25rem); }
.check.toggle span { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    .check.toggle input, .check.toggle input::before { transition: none; }
}

@media (forced-colors: active) {
    .check.toggle input { border-color: CanvasText; }
    .check.toggle input::before { background: CanvasText; }
    .check.toggle input:checked { background: Highlight; border-color: Highlight; }
    .check.toggle input:checked::before { background: HighlightText; }
}

/* The mark for each way of reaching somebody (ADR-68), beside a connector's name. */
.channel-icon { vertical-align: -0.2em; margin-right: .3rem; flex: none; }
