:root {
    --cqure-academy-primary: #00437b;
    --cqure-academy-primary-hover: #003562;
    --cqure-academy-danger: #b42318;
    --cqure-academy-success: #1f7a36;
    --cqure-academy-border: #c8ccd0;
    --cqure-academy-surface: #fff;
    --cqure-academy-muted: #5d646b;
}

body.cqure-academy-modal-open {
    overflow: hidden !important;
}

body.cqure-academy-modal-open.cqure-academy-scrollbar-compensated #global-header-section {
    width: calc(100vw - var(--cqure-academy-scrollbar-width));
}

.cqure-academy-modal[hidden] {
    display: none !important;
}

.cqure-academy-modal {
    display: grid;
    position: fixed;
    z-index: 100000;
    padding: 20px;
    inset: 0;
    place-items: center;
    pointer-events: none;
}

.cqure-academy-modal.is-open {
    pointer-events: auto;
}

.cqure-academy-modal-backdrop {
    position: absolute;
    transition: opacity 280ms ease-out;
    opacity: 0;
    background: rgba(0, 0, 0, .58);
    cursor: default;
    inset: 0;
}

.cqure-academy-modal.is-open .cqure-academy-modal-backdrop {
    opacity: 1;
}

.cqure-academy-modal-panel {
    display: flex;
    position: relative;
    flex-direction: column;
    transform: translateY(-48px);
    transition: opacity 280ms ease-out, transform 280ms ease-out;
    opacity: 0;
    width: min(100%, 500px);
    max-height: calc(100vh - 40px);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    background: var(--cqure-academy-surface);
    overflow: hidden;
}

.cqure-academy-modal.is-open .cqure-academy-modal-panel {
    transform: translateY(0);
    opacity: 1;
}

.cqure-academy-modal.has-static-feedback .cqure-academy-modal-panel {
    animation: cqure-academy-static-backdrop 180ms ease-out;
}

@keyframes cqure-academy-static-backdrop {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    45% {
        transform: translateY(0) scale(.985);
    }
}

.cqure-academy-modal-panel-wide {
    width: 100%;
    max-width: 742px;
}

.cqure-academy-modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0;
    padding: 18px 22px;
    gap: 16px;
}

.cqure-academy-modal-header h2 {
    margin: 0;
    padding-bottom: 0;
    line-height: 1.25;
    color: #222;
    font-size: 24px;
}

.cqure-academy-modal-close {
    display: inline-grid;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: #333;
    place-items: center;
}

.cqure-academy-modal-close:hover,
.cqure-academy-modal-close:focus-visible {
    outline: 2px solid var(--cqure-academy-primary);
    outline-offset: 1px;
    background: #f0f1f2;
}

.cqure-academy-modal-body {
    min-height: 0;
    padding: 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cqure-academy-form {
    color: #25282a;
}

.cqure-academy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.cqure-academy-login-fields {
    display: grid;
    gap: 8px;
}

.cqure-academy-span-2 {
    grid-column: 1 / -1;
}

.cqure-academy-field-group {
    position: relative;
    margin: 0;
    min-width: 0;
    border: 0;
    padding: 0;
}

.cqure-academy-field-group label,
.cqure-academy-field-group legend {
    display: block;
    margin: 0 0 2px;
    padding: 0;
    line-height: 1;
    color: #4b5157;
    font-size: 16px;
    font-weight: 600;
    font-style: italic;
}

.cqure-academy-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cqure-academy-label-row label {
    margin-bottom: 4px;
}

.cqure-academy-required {
    color: var(--cqure-academy-danger);
}

.cqure-academy-field {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--cqure-academy-border);
    border-radius: 4px;
    background: #fff;
    padding: 9px .75rem;
    line-height: 1.35;
    color: #25282a;
    font: inherit;
}

.cqure-academy-login-form input.cqure-academy-field,
.cqure-academy-registration-form input.cqure-academy-field,
.cqure-academy-registration-form textarea.cqure-academy-field {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--cqure-academy-border);
    border-radius: 4px;
    background-color: #fff;
    padding: 6px 12px;
    line-height: 1.35;
    color: #25282a;
    font: inherit;
    font-size: inherit;
}

.cqure-academy-registration-form input.cqure-academy-field-with-helper {
    padding: 6px 34px 6px 12px;
}

.cqure-academy-login-form input.cqure-academy-field::placeholder,
.cqure-academy-registration-form input.cqure-academy-field::placeholder,
.cqure-academy-registration-form textarea.cqure-academy-field::placeholder {
    opacity: 1;
    color: #999;
}

.cqure-academy-field:focus {
    outline: 0;
    border-color: var(--cqure-academy-primary);
    box-shadow: 0 0 0 2px rgba(0, 67, 123, .18);
}

.cqure-academy-login-form input.cqure-academy-field:focus,
.cqure-academy-registration-form input.cqure-academy-field:focus,
.cqure-academy-registration-form textarea.cqure-academy-field:focus {
    outline: 0;
    border-color: var(--cqure-academy-primary);
    box-shadow: 0 0 0 2px rgba(0, 67, 123, .18);
}

.cqure-academy-field.is-invalid,
.cqure-academy-field-group.is-invalid .cqure-academy-field,
.cqure-academy-field-group.is-invalid .select2-selection {
    border-color: var(--cqure-academy-danger) !important;
}

.cqure-academy-field.is-invalid:focus,
.cqure-academy-field-group.is-invalid .cqure-academy-field:focus {
    border-color: var(--cqure-academy-danger) !important;
    box-shadow: 0 0 0 2px rgba(180, 35, 24, .22);
}

.cqure-academy-invalid-feedback {
    transition: opacity 150ms ease;
    visibility: hidden;
    opacity: 0;
    margin-top: 2px;
    min-height: 18px;
    line-height: 1.35;
    color: var(--cqure-academy-danger);
    font-size: 13px;
}

.cqure-academy-field.is-invalid + .cqure-academy-invalid-feedback,
.cqure-academy-field-group.is-invalid > .cqure-academy-invalid-feedback {
    visibility: visible;
    opacity: 1;
}

.cqure-academy-radio-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 42px;
    gap: 9px 18px;
}

.cqure-academy-radio-group label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    gap: 6px;
}

.cqure-academy-radio-group input[type="radio"] {
    display: grid;
    flex: 0 0 auto;
    margin: 0;
    width: 16px;
    height: 16px;
    border: 1.5px solid #8d949a;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    place-content: center;
    appearance: none;
    -webkit-appearance: none;
}

.cqure-academy-radio-group input[type="radio"]::before {
    transform: scale(0);
    transition: transform 120ms ease-out;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cqure-academy-primary);
    content: "";
}

.cqure-academy-radio-group input[type="radio"]:checked {
    border-color: var(--cqure-academy-primary);
}

.cqure-academy-radio-group input[type="radio"]:checked::before {
    transform: scale(1);
}

.cqure-academy-radio-group input[type="radio"]:focus-visible {
    outline: 2px solid rgba(0, 67, 123, .35);
    outline-offset: 2px;
}

.cqure-academy-field-group.is-invalid .cqure-academy-radio-group input[type="radio"] {
    border-color: var(--cqure-academy-danger);
}

.cqure-academy-field-group.is-invalid .cqure-academy-radio-group input[type="radio"]::before {
    background: var(--cqure-academy-danger);
}

.cqure-academy-field-group.is-invalid .cqure-academy-radio-group input[type="radio"]:focus-visible {
    outline-color: rgba(180, 35, 24, .4);
}

.cqure-academy-submit-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.cqure-academy-required-message {
    align-self: center;
    transition: opacity 150ms ease;
    visibility: hidden;
    opacity: 0;
    color: var(--cqure-academy-muted);
    font-size: 13px;
}

.cqure-academy-required-message.is-visible {
    visibility: visible;
    opacity: 1;
}

.cqure-academy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid var(--cqure-academy-primary);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    padding: 9px 18px;
    color: var(--cqure-academy-primary);
    font: inherit;
    font-weight: 600;
}

.cqure-academy-button-primary {
    background: var(--cqure-academy-primary);
    color: #fff;
}

.cqure-academy-button:hover,
.cqure-academy-button:focus-visible {
    border-color: var(--cqure-academy-primary-hover);
    background: var(--cqure-academy-primary-hover);
    color: #fff;
}

.cqure-academy-button:disabled {
    opacity: .65;
    cursor: wait;
}

.cqure-academy-button-block {
    width: 100%;
}

.cqure-academy-link-button {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    color: var(--cqure-academy-primary);
    font: inherit;
}

.cqure-academy-link-button:hover,
.cqure-academy-link-button:focus-visible {
    text-decoration: inherit;
    color: var(--cqure-academy-primary-hover);
}

.cqure-academy-form-actions,
.cqure-academy-signup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0;
    gap: 16px;
}

.cqure-academy-signup-row {
    flex-wrap: wrap;
    gap: 8px 16px;
}

.cqure-academy-signup-row > * {
    flex: 0 0 auto;
    max-width: 100%;
}

.cqure-academy-form-actions {
    flex-wrap: wrap;
    gap: 8px 16px;
}

.cqure-academy-form-actions > * {
    flex: 0 0 auto;
    max-width: 100%;
}

.cqure-academy-login-form .cqure-academy-form-actions > label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.cqure-academy-login-form #rememberme {
    display: grid;
    flex: 0 0 auto;
    margin: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid #8d949a;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    place-content: center;
    appearance: none;
    -webkit-appearance: none;
}

.cqure-academy-login-form #rememberme::before {
    transform: translateY(-2px) translateX(-0.5px) rotate(-45deg) scale(0);
    transition: transform 120ms ease-out;
    width: 9px;
    height: 5px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    content: "";
}

.cqure-academy-login-form #rememberme:checked {
    border-color: var(--cqure-academy-primary);
    background: var(--cqure-academy-primary);
}

.cqure-academy-login-form #rememberme:checked::before {
    transform: translateY(-2px) translateX(-0.5px) rotate(-45deg) scale(1);
}

.cqure-academy-login-form #rememberme:focus-visible {
    outline: 2px solid rgba(0, 67, 123, .35);
    outline-offset: 2px;
}

.cqure-academy-logo-wrap {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.cqure-academy-form hr {
    margin: 18px 0 0;
    border: 0;
    border-top: 1px solid #e5e7e9;
}

.cqure-academy-notice {
    margin-bottom: 16px;
    border: 1px solid #d6d9dc;
    border-radius: 4px;
    background: #f7f8f8;
    padding: 11px 13px;
}

.cqure-academy-notice[hidden] {
    display: none;
}

.cqure-academy-notice-error {
    border-color: #f0b3ab;
    background: #fef3f2;
    color: #7a271a;
}

.cqure-academy-notice-success {
    border-color: #a8d5b2;
    background: #effaf2;
    color: #175c2a;
}

.cqure-academy-notice-warning {
    border-color: #ead18d;
    background: #fff8e5;
    color: #704d00;
}

.cqure-academy-notice-info {
    border-color: #a8cee3;
    background: #eef8fd;
    color: #164c6c;
}

.cqure-academy-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.cqure-academy-tooltip-wrap {
    display: inline-flex;
    position: relative;
    margin-bottom: 7px;
}

.cqure-academy-label-row .cqure-academy-tooltip-wrap {
    position: absolute;
    top: 28px;
    right: 8px;
    z-index: 2;
    margin-bottom: 0;
}

.cqure-academy-tooltip-trigger {
    display: inline-grid;
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    cursor: help;
    padding: 0;
    color: #999;
    place-items: center;
}

.cqure-academy-tooltip {
    display: none;
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 4;
    width: max-content;
    max-width: min(300px, 75vw);
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    background: #24272a;
    padding: 9px 11px;
    line-height: 1.4;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
}

.cqure-academy-tooltip-trigger[aria-expanded="true"] + .cqure-academy-tooltip {
    display: block;
}

.cqure-academy-registration-form .select2-container {
    width: 100% !important;
}

.cqure-academy-registration-form .select2-container .select2-selection--single {
    height: 42px;
    border-radius: 4px;
    border-color: var(--cqure-academy-border);
}

.cqure-academy-registration-form .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 6px 34px 6px 12px;
    line-height: 28px;
    color: #25282a;
}

.cqure-academy-registration-form .select2-container .select2-selection--single .select2-selection__arrow {
    right: 6px;
    height: 40px;
}

.select2-container--open {
    z-index: 100001;
}

.cqure-academy-results {
    display: grid;
    gap: 30px;
}

.cqure-academy-results-card {
    --cqure-academy-card-width: calc((100% - 60px) / 3);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cqure-academy-results-card:has(> .cqure-academy-result-card:only-child) {
    grid-template-columns: minmax(0, var(--cqure-academy-card-width));
    justify-content: center;
}

.cqure-academy-results-card:has(> .cqure-academy-result-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, var(--cqure-academy-card-width)));
    justify-content: center;
}

.cqure-academy-result {
    min-width: 0;
    height: 100%;
    border: 0;
    border-radius: .75rem;
    box-shadow: 0 2px 18px rgba(0, 0, 0, .1);
    background: #fff;
    overflow: hidden;
}

.cqure-academy-result-card {
    display: flex;
    position: relative;
    flex-direction: column;
}

.cqure-academy-result .meta-type-name {
    line-height: normal;
    font-style: italic;
    font-size: 14px;
}

.academy-shortcode-diagnostic { color: #d63384; }

.match-in-language,
.match-in-language-card,
.category-fallback-language,
.category-fallback-language-card {
    border-radius: 5rem;
    background-color: #213366;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    color: #fff;
    font-size: 12px;
}

.match-in-language,
.category-fallback-language {
    display: block;
    width: fit-content;
}

.match-in-language-card,
.category-fallback-language-card {
    position: absolute;
    top: 8px;
    right: 8px;
}

.cqure-academy-result-content {
    flex: 1;
    padding: 20px;
}

.cqure-academy-result footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cqure-academy-result-card footer {
    padding: 0 20px 20px;
}

.cqure-academy-result-list {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
}

.cqure-academy-result-list .cqure-academy-result-content {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 230px;
}

.cqure-academy-result-list footer {
    margin-top: auto;
    padding-top: 12px;
}

.cqure-academy-result-list .cqure-academy-result-media {
    height: 230px;
    overflow: hidden;
}

.cqure-academy-result-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.cqure-academy-result-card > .cqure-academy-result-image {
    height: 230px;
    min-height: 230px;
    max-height: 230px;
    border-radius: .75rem .75rem 0 0;
}

.cqure-academy-result-list .cqure-academy-result-image {
    height: 100%;
}

.cqure-academy-result-title {
    margin: 0;
    line-height: normal;
    color: var(--ta-blue, #213366);
    font-style: italic;
}

.cqure-academy-result-list .cqure-academy-result-title {
    padding-bottom: 0;
}

.cqure-academy-result-title a {
    line-height: inherit;
    color: inherit;
    font-style: inherit;
}

.cqure-academy-result .page-search-excerpt {
    display: -webkit-box;
    margin-bottom: 0;
    overflow: hidden;
    line-height: 1.25;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.cqure-academy-result-list .page-search-excerpt {
    -webkit-line-clamp: 4;
}

.cqure-academy-result .meta-categories a,
.cqure-academy-result .page-search-read-more {
    transition: color 200ms ease;
    color: var(--ta-blue-medium, #3061b5);
}

.cqure-academy-result .meta-categories a:hover,
.cqure-academy-result .meta-categories a:focus-visible,
.cqure-academy-result .page-search-read-more:hover,
.cqure-academy-result .page-search-read-more:focus-visible {
    color: var(--ta-blue-light, #abc7eb);
}

.cqure-academy-result .page-search-read-more {
    line-height: normal;
    font-size: 16px;
    font-weight: 700;
    font-style: italic;
}

.cqure-academy-meta-separator {
    margin: 0 6px;
    color: #9aa0a6;
}

.cqure-academy-search-thumbnail {
    margin-left: auto;
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    border-radius: .25rem;
    object-fit: cover;
    object-position: left center;
}

.cqure-academy-result-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem 2rem;
    margin: 6px 6px 2rem;
    font-size: 13px;
}

.cqure-academy-result-controls label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cqure-academy-result-count,
.cqure-academy-result-controls select {
    box-sizing: border-box;
    min-height: 36px;
    max-height: 36px;
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: var(--cqure-academy-primary);
    font: inherit;
    line-height: 20px;
}

.cqure-academy-result-count {
    display: inline-flex;
    align-items: center;
    margin-right: auto;
    padding-right: 12px;
    padding-left: 12px;
}

.cqure-academy-result-controls select {
    min-width: 64px;
    cursor: pointer;
}

.cqure-academy-result-controls select:focus-visible {
    outline: 2px solid var(--cqure-academy-primary) !important;
    outline-offset: 2px;
}

.cqure-academy-results + .pagination-cqure {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: nowrap;
    margin-top: 24px;
    gap: 20px;
}

.cqure-academy-results + .pagination-cqure > div {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 10px;
}

.cqure-academy-results + .pagination-cqure .cqure-academy-pagination-end {
    justify-content: flex-end;
    margin-left: auto;
}

.pagination-cqure button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    padding: 0;
    color: var(--cqure-academy-primary);
}

.pagination-cqure button svg {
    display: block;
    width: 32px;
    height: 32px;
}

.pagination-cqure button:focus-visible {
    /* Override the Divi customizer's pagination focus reset. */
    outline: 2px solid var(--cqure-academy-primary) !important;
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .pagination-cqure button::after {
        content: attr(aria-label);
        position: absolute;
        bottom: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        padding: 4px 8px;
        border-radius: 4px;
        background: #213366;
        color: #fff;
        font-size: 12px;
        line-height: 1.4;
        white-space: nowrap;
        pointer-events: none;
        visibility: hidden;
        z-index: 1;
    }

    .pagination-cqure button:hover::after,
    .pagination-cqure button:focus-visible::after {
        visibility: visible;
    }

    .cqure-academy-pagination-start button:first-child::after {
        left: 0;
        transform: none;
    }

    .cqure-academy-pagination-end button:last-child::after {
        right: 0;
        left: auto;
        transform: none;
    }
}

.cqure-academy-protected-form {
    display: grid;
    gap: 10px;
}

#searchform {
    position: relative;
}

@media (max-width: 767.98px) {
    #searchform #search-input-ta {
        /* Gill Sans reserves descent space below ordinary search text.
           Balance its visible glyphs with font-relative vertical padding. */
        padding-top: .35em;
        padding-bottom: 0;
    }
}

#clear-search {
    display: inline-grid;
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: #213366;
    place-items: center;
}

#clear-search[hidden] {
    display: none !important;
}

#clear-search svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
}

#clear-search:hover,
#clear-search:focus-visible {
    color: #3061b5;
}

#search-results,
#results-list {
    height: auto;
}

#results-list {
    transform-origin: top;
}

#clear-search:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 50%;
}

#results-list .cqure-academy-search-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    color: #213366;
    font-weight: 600;
    gap: 10px;
}

#results-list .cqure-academy-search-spinner {
    display: block;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(33, 51, 102, .22);
    border-radius: 50%;
    border-top-color: #213366;
    animation: cqure-academy-search-spin .7s linear infinite;
}

#results-list .cqure-academy-search-loader-text {
    line-height: 1.2;
}

@keyframes cqure-academy-search-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cqure-academy-modal-backdrop,
    .cqure-academy-modal-panel,
    .cqure-academy-invalid-feedback,
    .cqure-academy-required-message {
        transition-duration: .01ms;
    }

    .cqure-academy-modal-panel {
        transform: none;
    }

    .cqure-academy-modal.has-static-feedback .cqure-academy-modal-panel {
        animation: none;
    }

    #results-list .cqure-academy-search-spinner {
        animation-duration: 1.4s;
    }
}

@media (max-width: 820px) {
    .cqure-academy-results-card {
        --cqure-academy-card-width: calc((100% - 30px) / 2);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Divi's mobile navigation breakpoint. Login keeps its intrinsic content size. */
@media (max-width: 981px) {
    .cqure-academy-modal {
        --cqure-academy-viewport-height: 100vh;
        --cqure-academy-modal-top-gap: max(16px, env(safe-area-inset-top, 0px));
        --cqure-academy-modal-bottom-gap: max(16px, env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        top: var(--cqure-academy-viewport-top, 0px);
        bottom: auto;
        height: var(--cqure-academy-viewport-height);
        padding: 20px;
    }

    .cqure-academy-modal-panel {
        max-height: calc(var(--cqure-academy-viewport-height) - 40px);
        transform: none;
    }

    #registrationModal {
        --cqure-academy-modal-bottom-gap: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 1rem);
        --cqure-academy-modal-available-height: calc(var(--cqure-academy-viewport-height) - var(--cqure-academy-header-clearance, 0px) - var(--cqure-academy-modal-top-gap) - var(--cqure-academy-modal-bottom-gap));
        padding: calc(var(--cqure-academy-header-clearance, 0px) + var(--cqure-academy-modal-top-gap)) 20px var(--cqure-academy-modal-bottom-gap);
    }

    #registrationModal .cqure-academy-modal-panel {
        max-height: var(--cqure-academy-modal-available-height);
        transition-property: opacity;
        /* The larger bottom gap lifts the center by .5rem. Lift another 1rem
           when there is room, keeping the title below the measured header. */
        transform: translateY(max(-1rem, calc(50% - var(--cqure-academy-modal-available-height) / 2)));
    }

    @supports (height: 100dvh) {
        .cqure-academy-modal {
            --cqure-academy-viewport-height: 100dvh;
        }
    }
}

@media (max-width: 640px) {
    .cqure-academy-modal {
        padding: 10px;
    }

    .cqure-academy-modal-panel {
        max-height: calc(var(--cqure-academy-viewport-height) - 20px);
    }

    #registrationModal {
        padding-right: 10px;
        padding-left: 10px;
    }

    .cqure-academy-modal-header,
    .cqure-academy-modal-body {
        padding: 16px;
    }

    .cqure-academy-grid,
    .cqure-academy-results-card,
    .cqure-academy-result-list {
        grid-template-columns: 1fr;
    }

    .cqure-academy-results-card {
        --cqure-academy-card-width: 100%;
    }

    .cqure-academy-result-count {
        flex-basis: 100%;
    }

    .cqure-academy-results-card:has(> .cqure-academy-result-card:nth-child(2):last-child) {
        grid-template-columns: 1fr;
    }

    .cqure-academy-span-2 {
        grid-column: auto;
    }

    .cqure-academy-result-list .cqure-academy-result-media {
        height: 200px;
    }

    .cqure-academy-submit-group {
        flex-direction: column;
        align-items: stretch;
    }

    #clear-search {
        right: 1rem;
        width: 28px;
        height: 28px;
    }
}
