/* ======================================================
   Accessibility layer, loaded last by every layout (after page
   styles) so these rules win:
   - reduced motion: no animations or transitions anywhere;
   - one visible focus ring on every interactive element, even
     where a component removed its outline;
   - footer landmark, language switcher and voice input styles.
   ============================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

a:focus-visible,
button:focus-visible,
input:not(.hb-input):not(.trac-input):not(.searchable-single-search):not([data-tag-search]):focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[role="menuitem"]:focus-visible,
[contenteditable="true"]:focus-visible {
    outline: 2px solid var(--focus-ring-color, var(--accent-hover, #1d4ed8)) !important;
    outline-offset: 2px !important;
}

/* UF1: ONE focus indicator everywhere (WCAG 2.4.7 and 2.4.11): a single 2px outline with a 2px offset.
   Components used to add a box-shadow ring and a thicker border on top of the outline, which looked like a double or
   triple border. The shadow-ring tokens are neutralised here, so a component that still reads them gets no extra ring.
   Error rings (--ring-danger) are left alone. */
:root,
body,
body.cm-shell.layout-v2,
body.ad-shell.layout-v2,
body.member-shell.layout-v2,
body.pt-shell.layout-v2,
body.sr-shell.layout-v2 {
    --focus-ring-color: var(--accent-hover, #1d4ed8);
    --ring-accent: 0 0 0 0 transparent;
    --c-focus: 0 0 0 0 transparent;
    --a-focus: 0 0 0 0 transparent;
    --m-focus: 0 0 0 0 transparent;
    --z-dropdown: 1000;
}

/* A field built as a wrapper (box with the input inside) shows the ring on the wrapper, once; the input inside draws nothing. */
.hb-field:focus-within,
.trac-field:has(.trac-input:focus),
.chip-multi-control:focus-within,
.searchable-single-search-wrap:focus-within,
.activity-tag-search-wrap:focus-within,
.member-faq-search:focus-within,
.help-center-search:focus-within {
    outline: 2px solid var(--focus-ring-color) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}
.hb-field input:focus,
.hb-field input:focus-visible,
.trac-field input:focus,
.trac-field input:focus-visible,
.chip-multi-control input:focus,
.chip-multi-control input:focus-visible,
.searchable-single-search-wrap input:focus,
.searchable-single-search-wrap input:focus-visible,
.activity-tag-search-wrap input:focus,
.activity-tag-search-wrap input:focus-visible,
.member-faq-search input:focus,
.member-faq-search input:focus-visible,
.help-center-search input:focus,
.help-center-search input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}
/* When the microphone button inside the field is the focused item, the button draws the ring and the wrapper does not. */
.hb-field:has(button:focus-visible),
.trac-field:has(button:focus-visible) { outline: none !important; }

/* Visually hidden inputs (custom radios and checkboxes) show focus on their visible label instead. */
input.visually-hidden:focus-visible + label {
    outline: 2px solid var(--accent-hover, #1d4ed8);
    outline-offset: 2px;
}

/* The main region takes focus from the skip link; it is not a control, so no ring. */
main[tabindex="-1"]:focus,
main[tabindex="-1"]:focus-visible {
    outline: none !important;
}

/* ---- Footer landmark ---------------------------------------- */

.app-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: auto;
    padding: 16px 24px;
    border-top: 1px solid var(--line, #e5e7eb);
    color: var(--muted, #4b5563);
    font-size: .875rem;
}

.app-footer p {
    margin: 0;
}

.app-footer-voice {
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--line, #d1d5db);
    border-radius: 8px;
    background: var(--surface, #fff);
    color: var(--ink, #111827);
}

/* ---- Language switcher ----------------------------------- */

.language-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.language-switcher-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--ink, #111827);
    font-weight: 500;
}

.language-switcher-icon {
    width: 18px;
    height: 18px;
}

.language-switcher-select,
.language-switcher-button {
    min-height: var(--ui-control-height, 44px);
    font-size: var(--ui-text-control, 15px);
    padding: 6px 10px;
    border: 1px solid var(--role-border-input, #667085); /* 3:1 control border */
    border-radius: var(--radius-control, 8px);
    background: var(--surface, #fff);
    color: var(--ink, #111827);
}

.language-switcher-notice {
    flex-basis: 100%;
    margin: 0;
    font-size: .875rem;
}

/* VS1: the language bar is a row in normal flow (it used to float at top:12px/right:16px and sat on top of the page
   content and the legal notice). body.auth-page is a flex row with a fixed 420px sidebar, so the bar takes a full row
   (wrap) and is offset by the sidebar width; it is never positioned over anything. */
body.auth-page:not(.signin-v2) { flex-wrap: wrap; }

body:not(.signin-v2) .auth-language-bar {
    position: static;
    z-index: 5;
    display: flex;
    flex: 0 0 100%;
    justify-content: flex-end;
    box-sizing: border-box;
    margin-left: 420px;
    width: calc(100% - 420px);
    padding: 6px 16px;
    background: var(--surface, #fff);
}

@media (max-width: 991.98px) {
    body:not(.signin-v2) .auth-language-bar { margin-left: 300px; width: calc(100% - 300px); }
}

@media (max-width: 767.98px) {
    body:not(.signin-v2) .auth-language-bar {
        margin-left: 0;
        width: 100%;
    }

    .top-actions .language-switcher-label span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

/* ---- Voice input ----------------------------------------- */

.voice-input {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.voice-input[hidden] {
    display: none;
}

.voice-input-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line, #d1d5db);
    border-radius: 50%;
    background: var(--surface, #fff);
    color: var(--ink, #111827);
}

.voice-input-icon,
.voice-input-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* Listening: a stop square (shape change, not just colour) and a thicker red border. */
.voice-input-button.is-listening {
    border: 3px solid #b91c1c;
    color: #b91c1c;
}

.voice-input-notice {
    position: absolute;
    z-index: 30;
    right: 0;
    bottom: calc(100% + 8px);
    width: min(300px, 80vw);
    padding: 12px;
    border: 1px solid var(--line, #d1d5db);
    border-radius: 10px;
    background: var(--surface, #fff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
    color: var(--ink, #111827);
    font-size: .875rem;
    text-align: left;
}

.voice-input-notice p {
    margin: 0 0 10px;
}

.voice-input-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.voice-input-notice-actions button {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line, #d1d5db);
    border-radius: 8px;
    background: var(--surface, #fff);
    color: var(--ink, #111827);
}

.voice-input-notice-actions .voice-input-notice-continue {
    border-color: var(--accent, #2563eb);
    background: var(--accent, #2563eb);
    color: #fff;
}

.chatbot-language-note {
    margin: 0;
    padding: 8px 12px;
    font-size: .8125rem;
}

/* Admin > Translations filter links. */
.translations-page .aio-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.translations-page .aio-filter-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: underline;
}

.translations-page .aio-filter-list a[aria-current="page"] {
    font-weight: 700;
    text-decoration-thickness: 3px;
}

/* Attestation shown in English inside a translated page. */
.attestation-language-note {
    display: block;
    margin-top: 6px;
    font-style: italic;
}

/* ---- Interaction targets (44px where practical) -------------
   Buttons, links styled as buttons, form fields, navigation links
   and icon buttons are at least 44px tall (icon buttons also wide).
   min-height only: dense tables keep their layout and simply give
   row buttons the room they need. Plain text links in sentences,
   checkboxes, radios and visually hidden controls are left alone
   (16px remove buttons already grow their hit area in base.css).
   The generic button rule is wrapped in :where() so it has no
   specificity: a component rule that deliberately sets its own
   min-height still wins. Left out: the member chat window's tabs
   and header icons (they sit in a fixed-height bar), and sortable
   table header buttons (the header cell is the target). Square
   icon buttons are kept square below. */
:where(button:not(.visually-hidden):not(.sr-only):not(.btn-close):not(.chip-multi-remove):not(.activity-subtype-tag button):not(.chatbot-tab):not(.chatbot-header-actions button):not(.data-table-sort)),
:where([role="button"]:not(.visually-hidden):not(.sr-only)),
.btn,
.button,
input[type="button"],
input[type="submit"],
input[type="reset"],
select:not(.visually-hidden):not(.sr-only):not([multiple]):not([size]),
.form-select,
.form-control,
input[type="text"]:not(.visually-hidden),
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input:not([type]),
.nav-link,
.side-nav a,
.nav-submenu a,
.profile-menu a,
.dropdown-item {
    min-height: 44px;
}

/* Square icon buttons grow in both directions so they stay square
   (row icon actions, pagination, calendar month arrows). */
.table-action,
.data-table-pagination button,
.activity-month-year button,
.icon-button,
.menu-toggle,
.sidebar-mobile-close,
.btn-close {
    min-width: 44px;
    min-height: 44px;
}

/* Links styled as buttons are often inline: make them boxes so the height applies. */
a.btn,
a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---- Status badge (Views/Shared/_StatusBadge.cshtml, WorkTrackUiStates.status) ----
   The word is always shown; the icon's shape differs by tone (check, !, x, dot), so no
   status depends on colour alone. Colours meet 4.5:1 contrast on their backgrounds. */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 2px 10px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: normal;
}

.status-badge__icon {
    flex: 0 0 auto;
    font-weight: 700;
    line-height: 1;
}

.status-badge--positive {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.status-badge--attention {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.status-badge--problem {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

/* ---- Loading, empty and error states (js/ui-states.js) ------ */
.ui-state {
    margin: 12px 0;
}

.ui-state p {
    margin: 0 0 6px;
}

.ui-state--loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted, #4b5563);
}

.ui-state__spinner {
    width: 18px;
    height: 18px;
    border: 3px solid #d1d5db;
    border-top-color: var(--accent, #2563eb);
    border-radius: 50%;
    animation: ui-state-spin 1s linear infinite;
}

@keyframes ui-state-spin {
    to {
        transform: rotate(360deg);
    }
}

.ui-state--empty,
.ui-state--error {
    padding: 12px 16px;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
}

.ui-state--error {
    border: 1px solid #fca5a5;
    border-left-width: 4px;
    background: #fef2f2;
    color: #7f1d1d;
}

.ui-state__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.ui-state__next {
    color: inherit;
}

.ui-state__retry {
    margin-top: 6px;
}

/* ---- Small phones: slim pinned header (E2E-014) ---------------------------
   The language select plus its "Change language" button did not fit beside the menu button, bell and profile at
   320-375px. Below 576px the header stays one slim pinned row: a globe button (44px) opens the language form as a
   small panel under the bar. Without JavaScript the toggle stays hidden and the form shows as before. */
.language-switcher-toggle {
    display: none;
}

.language-switcher-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

@media (max-width: 575.98px) {
    .topbar .top-actions {
        min-width: 0;
        gap: 4px;
    }

    .topbar .language-switcher {
        position: relative;
    }

    .topbar .language-switcher.has-toggle .language-switcher-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--line, #d1d5db);
        border-radius: 8px;
        background: var(--surface, #fff);
        color: var(--ink, #111827);
    }

    .topbar .language-switcher.has-toggle .language-switcher-toggle svg {
        width: 20px;
        height: 20px;
    }

    .topbar .language-switcher.has-toggle:not(.is-open) .language-switcher-fields {
        display: none;
    }

    .topbar .language-switcher.has-toggle.is-open .language-switcher-fields {
        position: absolute;
        z-index: 40;
        top: calc(100% + 6px);
        right: 0;
        flex-wrap: nowrap;
        width: max-content;
        max-width: calc(100vw - 24px);
        padding: 10px;
        border: 1px solid var(--line, #d1d5db);
        border-radius: 10px;
        background: var(--surface, #fff);
        box-shadow: 0 8px 24px rgba(16, 24, 40, .18);
    }

    .topbar .language-switcher.has-toggle .language-switcher-label span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .topbar .language-switcher-select {
        min-width: 0;
        max-width: 140px;
        text-overflow: ellipsis;
    }

    .topbar .language-switcher-button {
        white-space: nowrap;
    }
}

/* ---- Links keep a non-colour cue (E2E-015, WCAG 1.4.1) ----------------------
   base.css sets a { color: inherit; text-decoration: none }, so a link inside a sentence looked like body text.
   Links in running text are underlined; navigation, buttons and cards keep their own styling. */
:is(main, .main-content, .auth-card, .app-footer) :is(p, li, dd, td, small, label, figcaption) a:not([class]),
:is(main, .main-content) :is(p, li, dd, td, small) a:is(.text-link, .inline-link, .link, .link-inline) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

:is(main, .main-content) :is(p, li, dd, td, small) a:not([class]):hover {
    text-decoration-thickness: 2px;
}


/* =============================================================
   UF2: one type scale, one layer scale, one subtle focus ring.
   Tokens live in var.css (--ui-text-*, --z-*). The role shells
   (a-ds, cm-ds, p-ds, s-ds, member-ds) take the same numbers.
   ============================================================= */

/* Fieldset titles were Bootstrap's 1.5rem (21px): card-title size now. */
main legend:not(#_) {
    float: none;
    width: auto;
    font-size: var(--ui-text-h3);
    font-weight: var(--weight-semibold, 600);
    line-height: 1.3;
}

/* Small and meta text never drops below 13px. */
:is(main, .main-content, .app-footer) :is(small, .small, dt, code, figcaption):not(#_),
:is(main, .main-content) :is(.module-chip, .cfg-key, .cfg-default-badge, .aio-tag, .section-kicker, .eyebrow-note,
    .staff-terms-hint, .opc-hint, .aicp-help, .sh-last-checked, .mco-metric-link, .status-badge__icon, .status-badge__text):not(#_),
.app-footer-help:not(#_) {
    font-size: var(--ui-text-small);
}

/* Only the footer support line is centred. The rule above also covers dt, small, code and the chips, which stay as they are. */
.app-footer-help:not(#_) {
    flex: 1;
    text-align: center;
}

/* Form controls: 15px on desktop, 16px on phones (no iOS zoom), 44px targets on phones. */
:is(main, [role="dialog"], dialog) :is(select, textarea, input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"])):not(#_) {
    font-size: var(--ui-text-control);
}

@media (max-width: 767.98px) {
    :is(main, [role="dialog"], dialog) :is(select, textarea, input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"])):not(#_) {
        font-size: 16px;
        min-height: 44px;
    }

    main :is(button, .btn, input[type="submit"], input[type="button"]):not(#_) {
        min-height: 44px;
    }
}

/* Buttons share the button size. */
main :is(button, .btn, input[type="submit"], input[type="button"]):not(#_):not([class*="icon"]):not([class*="dd-trigger"]) {
    font-size: var(--ui-text-button);
}

/* Layers: menus, selects and popovers sit above cards, tables and sticky bars, under dialogs. */
:is(.dropdown-menu, [role="listbox"], [role="menu"], .popover, .tooltip, .ui-autocomplete, .select2-dropdown, .flatpickr-calendar):not(#_) {
    z-index: var(--z-dropdown);
}

/* One subtle focus ring: a 2px outline, no extra box-shadow ring on top of it. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[role="menuitem"]:focus-visible {
    outline-width: 2px !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* UF1 desktop header scale (UF3: select and button follow --ui-text-control and --ui-control-height) (1024px and wider; phones and tablets keep their sizes): the language selector in the header or top bar
   follows the same scale as the menus: label 13px, select and button 14px, 36px tall. */
@media (min-width: 1024px) {
    .language-switcher-label { font-size: var(--type-meta); gap: 4px; }
    .language-switcher-icon { width: 16px; height: 16px; }
    .language-switcher-select,
    .language-switcher-button { min-height: var(--ui-control-height, 40px); padding: 4px 8px; font-size: var(--ui-text-control, 15px); border-radius: var(--radius-control); }
    .language-switcher-notice { font-size: var(--type-meta); }
    .m-menu-language { padding: 8px 12px; }
}

/* UF1 (merge with the helper focus-ring fix): other search and chat wrappers ring once on the wrapper; the input inside draws nothing.
   Plain .form-control and .form-select keep the single 2px outline above. */
.cm-search:focus-within,
.search-box:focus-within,
.chatbot-input-area:focus-within,
.conversation-search:focus-within {
    outline: 2px solid var(--focus-ring-color) !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}
.cm-search input:focus-visible,
.search-box input:focus-visible,
.chatbot-input-area :is(input, textarea):focus-visible,
.conversation-search input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* UF3: notyf.min.css (vendor, not edited) sets z-index 9999; toasts use the toast layer. */
.notyf { z-index: var(--z-toast) !important; }

/* UF3: "Signed in as <name>, <role>" header of the v1 account (profile) menus. */
.popover-head { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--line, #d1d5db); display: grid; gap: 1px; font-size: var(--ui-text-small, 13px); color: var(--muted, #475467); }
.popover-head strong { font-size: var(--ui-text-body, 15px); font-weight: 600; color: var(--ink, #111827); overflow-wrap: anywhere; }

/* UF3: account menu of the Partner and State Reviewer v2 headers (a details disclosure: works without script). */
.acct-menu { position: relative; }
.acct-menu > summary { list-style: none; cursor: pointer; }
.acct-menu > summary::-webkit-details-marker { display: none; }
.acct-menu .acct-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-dropdown, 300); min-width: 240px; max-width: calc(100vw - 24px); padding: 6px; background: #fff; border: 1px solid #d0d5dd; border-radius: 10px; box-shadow: 0 10px 28px rgba(16, 24, 40, .18); }
.acct-menu .acct-panel .popover-head { margin: 0 0 4px; }
.acct-menu .acct-panel a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: inherit; font-size: var(--ui-text-body, 15px); text-decoration: none; }
.acct-menu .acct-panel a:hover { background: rgba(16, 24, 40, .06); }

/* UF3: "Show more" under text cut to two lines (js/clamp-toggle.js). */
.activity-type-description.is-expanded { display: block; -webkit-line-clamp: unset; overflow: visible; }
.clamp-toggle { display: inline-block; margin: 2px 0 0; padding: 0; min-height: 24px; border: 0; background: none; color: var(--blue-700, #1a56db); font: inherit; font-size: var(--ui-text-small, 13px); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.clamp-toggle[hidden] { display: none; }

/* =============================================================
   VS1: one scale for every page (body 16px, controls 1rem / 2.5rem, checks 1.125rem).
   Tokens: var.css. Role shells (a-ds, cm-ds, p-ds, s-ds, member-ds) may still set their own sizes
   with a body.<shell> selector; those win over the low-specificity rules here.
   ============================================================= */
body { font-size: var(--ui-text-body); line-height: 1.5; }

label, .form-label { font-size: 1rem; }
.form-text, .help-block, .field-hint, .hint, small, .small { font-size: .875rem; }

h1, .h1 { font-size: var(--ui-text-h1); line-height: 1.25; }
h2, .h2 { font-size: var(--ui-text-h2); line-height: 1.3; }
h3, .h3 { font-size: var(--ui-text-h3); line-height: 1.35; }
h4, .h4 { font-size: var(--ui-text-h4); line-height: 1.4; }

/* Text boxes, selects and buttons: same font size and the same height wherever they appear. */
input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"], [type="submit"], [type="button"], [type="image"]),
select, textarea {
    box-sizing: border-box;
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.5;
}
input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"], [type="submit"], [type="button"], [type="image"]),
select { min-height: var(--ui-control-height); }
/* The legacy .form-control is a flex column fixed at 48px; the shared height is 2.5rem and textareas still grow. */
.form-control:not(textarea), .form-select, .form-input { height: auto; min-height: var(--ui-control-height); font-size: 1rem; }
/* Native option lists follow the select instead of a bigger page default. */
select option, select optgroup { font-size: 1rem; }
button, .btn, input[type="submit"], input[type="button"] { box-sizing: border-box; min-height: var(--ui-control-height); font-size: 1rem; }
.btn-sm { min-height: 0; }

/* Checkboxes and radios: a small square in the theme colour; width:100% or a control rule can no longer stretch them. */
input[type="checkbox"], input[type="radio"] {
    flex: none;
    box-sizing: border-box;
    width: var(--ui-check-size);
    height: var(--ui-check-size);
    min-height: 0;
    padding: 0;
    accent-color: var(--accent, #1d4ed8);
    vertical-align: middle;
}

/* =============================================================
   UI standards (Docs/UI-STANDARDS.md): shared component rules for every role.
   Tokens: var.css ("UI standards tokens"). Low specificity on purpose, so a role
   design system that has its own version of a component still wins.
   ============================================================= */

/* Tables: a wide table scrolls inside its wrapper; the page itself never scrolls sideways. */
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Numbers, money and counts: right-aligned, with figures that line up. */
.num { font-variant-numeric: tabular-nums; }
:is(td, th).num { text-align: right; white-space: nowrap; }
.mco-simple-table :is(th, td):not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* Table headers: sentence case and normal letter spacing (no forced capitals). */
th { text-transform: none; }

/* Alerts and banners: one size everywhere (1rem text; a title line is 1rem/600 at most). */
.alert, .alert p, .alert-heading, [role="alert"].ui-state, .ui-state--error { font-size: var(--type-body); }
.alert-heading { font-weight: 600; }

/* Monospace is for code only (keys, IDs shown as code); text people read or copy uses the UI font. */
code, kbd, samp, pre { font-family: var(--font-code); }

/* Empty states: one quiet line (and an optional next-step button). */
.empty-state, .ui-state--empty { color: var(--ink-muted); font-size: var(--type-body); }
