/* Keyboard, assistive-technology and motion preferences. */
.screen-reader-text,
.prog-screen-reader-text,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.screen-reader-text:focus,
.prog-screen-reader-text:focus,
.sr-only:focus {
    z-index: 100000;
    top: 0.75rem;
    left: 0.75rem;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    background: var(--prog-surface);
    color: var(--prog-text);
    box-shadow: var(--prog-shadow);
    white-space: normal !important;
}

.prog-skip-link {
    position: fixed;
    z-index: 100000;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    background: var(--prog-surface);
    color: var(--prog-text);
    box-shadow: var(--prog-shadow);
    font-weight: 800;
    transform: translateY(-150%);
    transition: transform var(--prog-transition);
}

.prog-skip-link:focus {
    transform: none;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus {
    outline: none;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--prog-secondary) 72%, white);
    outline-offset: 3px;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
.prog-field.has-error input,
.prog-field.has-error select,
.prog-field.has-error textarea {
    border-color: var(--prog-danger);
    box-shadow: 0 0 0 1px var(--prog-danger);
}

.prog-field-error {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 0.35rem;
    color: var(--prog-danger);
    font-size: 0.875rem;
    font-weight: 650;
}

.prog-field-error::before {
    flex: 0 0 auto;
    content: "!";
    font-weight: 900;
}

[aria-busy="true"] {
    cursor: progress;
}

[aria-disabled="true"],
:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.prog-live-region[aria-live] {
    position: fixed;
    z-index: 100000;
    right: 1rem;
    bottom: 1rem;
    max-width: min(26rem, calc(100vw - 2rem));
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .prog-reveal {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-contrast: more) {
    :root {
        --prog-border: #66736d;
        --prog-text-soft: #405149;
    }

    .prog-card,
    .prog-panel,
    .prog-table-scroll,
    input,
    select,
    textarea {
        border-width: 2px;
    }
}

@media (forced-colors: active) {
    .prog-status::before,
    .prog-autonomous-activity__item::before {
        forced-color-adjust: auto;
    }

    .prog-progress,
    .prog-progress__bar,
    .prog-attendance-ring {
        border: 1px solid CanvasText;
        forced-color-adjust: none;
    }

    .prog-progress__bar {
        background: Highlight;
    }
}

@media print {
    .prog-announcement,
    .prog-site-header,
    .prog-site-footer,
    .prog-portal-sidebar,
    .prog-portal-topbar,
    .prog-portal-bottom-nav,
    .prog-page-header__actions,
    .prog-table-actions,
    .prog-toolbar,
    .prog-button {
        display: none !important;
    }

    .prog-portal-shell,
    .prog-dashboard-grid {
        display: block;
    }

    .prog-portal-main,
    .prog-entry-content {
        padding: 0;
    }

    .prog-panel,
    .prog-card {
        break-inside: avoid;
        box-shadow: none;
    }

    .prog-table-scroll,
    .prog-table-scroll--long {
        max-height: none;
        overflow: visible;
    }
}
