/*
 * Match Tabler’s `:root, [data-bs-theme=light]` so SPEFR brand tokens win inside
 * themed chrome (main.html sets data-bs-theme=light on <aside class="navbar">).
 * Tabler alone redefines --tblr-* on that attribute back to stock colours.
 */
:root,
[data-bs-theme="light"] {
    /* Existing */
    --tblr-primary: #472681; /* Deep purple */
    --tblr-secondary: #3bb83e; /* Bright green */
    --tblr-danger: #ff3131; /* Vivid red */
    --tblr-black: #060200; /* Near-black */
    --tblr-body-bg: #f7f8fb; /* Light gray-blue background */

    /* Complimentary and supporting colors */
    --tblr-primary-light: #a290c6;
    --tblr-primary-bg: #f2ecfa;
    --tblr-primary-compliment: #81a626; /* A soft olive green, opposite on color wheel */

    --tblr-secondary-light: #8be68c;
    --tblr-secondary-bg: #eefbee;
    --tblr-secondary-compliment: #b83eb7; /* Magenta tone for contrast */

    --tblr-danger-light: #ffa5a5;
    --tblr-danger-bg: #fff0f0;

    /* Neutrals */
    --tblr-gray-100: #f1f3f7;
    --tblr-gray-200: #e2e6ec;
    --tblr-gray-300: #c5cbd8;
    --tblr-gray-600: #7d8494;
    --tblr-gray-900: #1c1e21;

    /* RGB for Tabler rgba() helpers (.bg-primary / .text-primary).
     * Do not set --tblr-secondary-rgb to brand green: Bootstrap/Tabler .text-secondary
     * and .bg-secondary are muted greys across the app (footers, help copy, omitted counts). */
    --tblr-primary-rgb: 71, 38, 129;
    --tblr-link-color-rgb: var(--tblr-primary-rgb);

    /* Accent colors */
    --tblr-info: #2681a6; /* Cool blue */
    --tblr-info-light: #9fd1e5;
    --tblr-warning: #f5a623; /* Amber */
    --tblr-warning-light: #ffe1b3;
    --tblr-success: #28a745; /* Darker green for status */
    --tblr-success-light: #a3deb0;

    /* UQ body text uses $grey-900 */
    --tblr-body-color: var(--tblr-gray-900);
    /* Nav labels stay body grey — do not tie to --tblr-secondary (logo green is for accents/badges). */
    --tblr-navbar-color: var(--tblr-body-color);
    --tblr-navbar-hover-color: var(--tblr-body-color);
    --tblr-nav-link-color: var(--tblr-navbar-color);
    --tblr-nav-link-hover-color: var(--tblr-navbar-hover-color);
    --tblr-nav-link-disabled-color: var(--tblr-navbar-disabled-color);

    /* Form control borders (#276); override on a container to restyle all fields inside */
    --spefr-form-control-border-color: #a6afbf;
}

.btn:hover {
    background-color: var(--tblr-primary-light);
    color: #fff;
}

.markdown > table thead th, .table thead th {
    font-size: 0.875rem;
    background-color: var(--tblr-primary);
    color: #fff;
    height: 45px;
    vertical-align: middle;
}

.markdown > table thead th, .table thead th a {
    color: #fff;
}

.nav.nav-tabs {
    border: 0;
}

.nav-tabs .nav-link:focus, .nav-tabs .nav-link:hover {
    border: 0;
}

.nav.nav-tabs .nav-link {
    border: 0;
}

.nav.nav-tabs .nav-link.active {
    background-color: var(--tblr-primary);
    color: #fff;
    border: 0;
}

.navbar-expand-lg .nav-item.active:after {
    border: #472681 solid 1px;
}

/* .navbar-nav .nav-item:hover .nav-link, .navbar-nav .nav-item:hover .nav-link-icon {
    color: var(--tblr-primary);
    font-weight: bold;
} */
.navbar-nav {
    --tblr-nav-link-padding-x: 0;
    --tblr-nav-link-padding-y: 0.5rem;
    --tblr-nav-link-font-weight: ;
    --tblr-nav-link-color: var(--tblr-navbar-color);
    --tblr-nav-link-hover-color: var(--tblr-navbar-hover-color);
    --tblr-nav-link-disabled-color: var(--tblr-navbar-disabled-color);
}
.navbar-nav {
    --tblr-nav-link-hover-bg:
        color-mix(in srgb, var(--tblr-nav-link-color) 4%, transparent);
}
.nav-link:focus,
.nav-link:hover {
    background-color: var(--tblr-nav-link-hover-bg);
}

/* Main layout navbar: instance university logo. See docs/PORTAL_UNIVERSITY_LOGOS.md. */
.navbar-university-logo {
    display: block;
    flex-shrink: 0;
    /* Definite height so SVG-as-<img> with only viewBox (no width/height on root) lays out in this flex row. */
    height: 2.25rem;
    width: auto;
    max-width: 12rem;
    object-fit: contain;
    object-position: center right;
}

/*
 * Support open-count badge: colour/shape come from Tabler utilities
 * (`badge bg-blue text-blue-fg rounded-pill`). This class is layout-only hooks.
 */
.spefr-support-open-badge {
    pointer-events: none;
}

/*
 * Support nav: open-ticket count badge anchored to the ticket icon (not the whole
 * nav-link). Overrides Tabler `.navbar … .nav-link .badge` which parks the badge
 * at the top-right of icon+label and reads as “hanging in mid-air”.
 */
.navbar .navbar-nav .nav-link .spefr-nav-support-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar .navbar-nav .nav-link .spefr-nav-support-icon .spefr-nav-support-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.45rem;
    transform: none;
    z-index: 1;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.28rem;
    font-size: 0.625rem;
    line-height: 1rem;
}

.auth-body {
    background-color: var(--tblr-primary);
}

/*
 * Auth password show/hide (Tabler input-group-flat).
 * Bootstrap raises .input-group > .form-control:focus to z-index: 5 while
 * .input-group .btn stays at 2 unless the button itself is focused — so the
 * focused input paints over the eye. Match the focused-control stack when the
 * group has focus (same level as Tabler/Bootstrap, not an arbitrary high value).
 */
.spefr-auth-password-field .input-group:focus-within > .input-group-text .spefr-password-toggle {
    z-index: 5;
}

.card.navigation-card {
    cursor: pointer;
}
.card.navigation-card:hover > .card-header {
    background-color: var(--tblr-primary);
    color: #fff;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card.navigation-card > .card-header {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Support home card: trailing open-count badge (not icon-corner like nav). */
.card.navigation-card .spefr-home-support-badge {
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Invert fill when the navigation-card header flips to primary purple. */
.card.navigation-card:hover > .card-header .spefr-home-support-badge {
    background: #fff !important;
    color: var(--tblr-blue) !important;
}

/* Card root is an <a> (UQ link weight 500); body copy is deliberately lighter than that */
.card.navigation-card .card-body {
    font-weight: 100;
}

/* Domain Navigation Styles */
.domain-navigation .btn-group .btn {
    min-width: 50px;
    font-weight: 600;
    border-radius: 0;
    margin-right: 2px;
}

.domain-navigation .btn-group .btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.domain-navigation .btn-group .btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    margin-right: 0;
}

.domain-navigation .btn-group .btn.btn-outline-primary:hover {
    background-color: var(--tblr-primary);
    border-color: var(--tblr-primary);
    color: #fff;
}

.domain-navigation .btn-group .btn.btn-outline-secondary:hover {
    background-color: var(--tblr-gray-600);
    border-color: var(--tblr-gray-600);
    color: #fff;
}

/* Evaluation domain pages: sticky student context + top domain navigation */
.evaluation-sticky-context-bar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--tblr-body-bg);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--tblr-border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Evaluation objective page: sticky comment bank / rating scale (desktop side column) */
@media (min-width: 992px) {
    .evaluation-side-panel-sticky {
        position: sticky;
        top: var(--evaluation-sticky-offset, 10rem);
        max-height: calc(100vh - var(--evaluation-sticky-offset, 10rem) - 0.75rem);
        display: flex;
        flex-direction: column;
        z-index: 1010;
    }

    .evaluation-side-panel-sticky > .card-body {
        overflow-y: auto;
        flex: 1 1 auto;
        min-height: 0;
    }
}

/* Results table status badges: light icon and larger size for visibility */
.badge-status {
    padding: 0.35em 0.6em;
    flex-shrink: 0;
}
.badge-status .badge-status-icon {
    height: 1.3em;
    width: auto;
    vertical-align: middle;
    margin-right: 0.25rem;
    filter: brightness(0) invert(1);
}

/* Results table: predictable grid for Halfway/Final label + badge */
.results-status-cell {
    display: grid;
    grid-template-columns: max-content minmax(max-content, 1fr);
    column-gap: 0.25rem;
    row-gap: 0.25rem;
    align-items: center;
    width: 100%;
    min-width: max-content;
}
/* Flatten each phase wrapper so label and badge share the same parent grid tracks. */
.results-status-cell .results-status-row {
    display: contents;
}
/* Keep phase labels single-line for consistent row height/alignment. */
.results-status-cell .results-status-label {
    margin-right: 0;
    white-space: nowrap;
}
/* Keep badge text single-line and fully visible within the shared badge column. */
.results-status-cell .badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
}
.results-status-cell .badge-status .badge-status-icon {
    flex: 0 0 auto;
}

/* Preview page: rating scale (N/A, 1–5, I/O) with selected option highlighted. Single box around all options, PDF-like. */
.preview-rating-scale {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    border: 1px solid #424242;
    max-width: max-content;
}
.preview-rating-label {
    font-weight: 700;
    font-size: 0.9em;
    min-width: 5rem;
    padding: 0.35em 0.5em;
    display: inline-flex;
    align-items: center;
    background: #472681;
    color: #fff;
    border-right: 1px solid #424242;
}
.preview-rating-options {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35em 0.6em;
}
.preview-rating-option {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 1.75rem;
    padding: 0;
    font-size: 0.9em;
    border: none;
    background: transparent;
    color: var(--tblr-body-color-muted, #656d77);
}
.preview-rating-option .preview-rating-circle {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    vertical-align: middle;
}
.preview-rating-option .preview-rating-text {
    line-height: 1;
}
.preview-rating-option.selected {
    background: transparent;
    color: var(--tblr-body-color, #1e293b);
    font-weight: 700;
}

/* Preview item: two-column layout (description left, rating scales right) like PDF */
.preview-item-block .preview-item-row {
    align-items: stretch;
}
.preview-item-block .preview-item-left {
    border-right: 1px solid var(--tblr-border-color);
}
.preview-item-block .preview-item-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.preview-item-block .preview-item-example {
    white-space: pre-wrap;
}

/* Home page login refresh */
.home-login-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

.home-login-panel-inner {
    width: 100%;
    max-width: 540px;
    padding: 2.5rem 2.25rem 1.5rem;
}

.home-login-uq-logo {
    width: 100%;
    max-width: 170px;
    height: auto;
    margin-bottom: 1rem;
}

.home-login-primary-logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    margin-bottom: 1.25rem;
}

.home-login-university-logo-wrap {
    width: 50%;
    max-width: 50%;
    margin-bottom: 2rem;
}

.home-login-university-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

.home-login-university-name-wrap {
    margin-bottom: 2rem;
}

.home-login-university-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1c1e21;
    line-height: 1.25;
}

.home-login-heading {
    font-size: 3rem;
    color: #1c1e21;
    line-height: 1;
    margin-bottom: 1.25rem;
}

.home-login-form .form-label {
    color: #1c1e21;
    margin-bottom: 0.35rem;
}

.home-login-form .form-label-description a {
    color: #51247a;
    text-decoration: none;
}

.home-login-form .form-label-description a:hover {
    text-decoration: underline;
}

/* Stronger default borders for form controls (WCAG-ish UI contrast; #276) */
.form-check-input,
.form-control,
.form-select,
.input-group > .input-group-text {
    border-color: var(--spefr-form-control-border-color);
}

.home-login-form .form-control,
.home-login-form .input-group-text {
    min-height: 2.45rem;
}

.home-landing-select-wrap {
    margin-bottom: 1.5rem;
}

.home-landing-listbox {
    border: 1px solid var(--spefr-form-control-border-color);
    border-radius: 0.5rem;
    background-color: #fff;
    max-height: 20rem;
    overflow-y: auto;
}

.home-landing-option {
    cursor: pointer;
    padding: 0.55rem 0.75rem;
    gap: 0.5rem;
}

.home-landing-option:hover,
.home-landing-option:focus {
    outline: none;
    background-color: #f2ecfa;
}

.home-landing-option-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.home-login-footer-copy {
    margin-top: auto;
    color: #656d77;
    font-size: 0.77rem;
    line-height: 1.5;
}

.home-login-panel--hero {
    background: #51247a;
    color: #ffffff;
}

.home-login-hero-brandmark {
    width: 100%;
    height: auto;
    margin-top: -4%;
    margin-left: -12%;
}

.home-login-hero-logo {
    width: min(100%, 380px);
    height: auto;
    margin-bottom: 3rem;
}

.home-login-hero-tagline {
    width: min(100%, 380px);
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.1;
    font-weight: 500;
    margin: 0;
}

.home-login-path-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 0.5rem;
}

.home-login-form .btn-success,
.home-login-panel-inner .home-login-primary-cta.btn-success {
    background-color: #3bb83e;
    border-color: #3bb83e;
    min-height: 2rem;
}

.home-login-form .btn-success:hover,
.home-login-panel-inner .home-login-primary-cta.btn-success:hover {
    background-color: #34a637;
    border-color: #34a637;
}

.home-login-form .btn-outline-primary {
    min-height: 2rem;
}

/* Production 500 page — purple canvas, centred content (home brand colours/logo) */
.home-error-body {
    margin: 0;
    background-color: #51247a;
}

.home-error-page {
    min-height: 100vh;
    min-height: 100dvh;
}

.home-error-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #51247a;
    color: #ffffff;
}

.home-error-container {
    width: 100%;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.home-error-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 28rem;
    margin-inline: auto;
}

.home-error-logo {
    display: block;
    width: min(100%, 240px);
    height: auto;
    margin-bottom: 1.75rem;
}

.home-error-heading {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 500;
    line-height: 1.15;
    color: #ffffff;
    margin: 0 0 1rem;
}

.home-error-lead {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0 0 1.5rem;
}

.home-error-reference {
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 0.9rem 1rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    text-align: left;
}

.home-error-reference-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem 0.75rem;
}

.home-error-reference-label {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.home-error-reference-value {
    font-size: 0.95rem;
    word-break: break-all;
    color: #1c1e21;
    background-color: #ffffff;
    border-radius: 0.25rem;
    padding: 0.15rem 0.45rem;
}

.home-error-reference-hint {
    margin-top: 0.55rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    line-height: 1.35;
    text-align: center;
}

.home-error-actions {
    width: 100%;
    display: flex;
    justify-content: center;
}

.home-error-home-btn {
    background-color: #3bb83e;
    border-color: #3bb83e;
    color: #ffffff;
    min-height: 2.5rem;
    min-width: 10rem;
    padding-inline: 1.25rem;
    font-weight: 500;
}

.home-error-home-btn:hover,
.home-error-home-btn:focus {
    background-color: #34a637;
    border-color: #34a637;
    color: #ffffff;
}

.home-error-home-btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

@media (max-width: 575.98px) {
    .home-error-container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .home-error-logo {
        width: min(100%, 200px);
        margin-bottom: 1.35rem;
    }

    .home-error-home-btn {
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .home-login-panel-inner {
        padding: 1.5rem 1.25rem 2rem;
    }

    .home-login-heading {
        font-size: 2.25rem;
    }

    .home-login-primary-logo {
        margin-bottom: 1.25rem;
    }

    .home-login-hero-content {
        min-height: 460px;
    }

    .home-login-hero-logo,
    .home-login-hero-tagline {
        width: min(100%, 420px);
    }

    .home-login-hero-logo {
        margin-bottom: 1.5rem;
    }

    .home-login-hero-tagline {
        font-size: clamp(1.4rem, 5vw, 2.1rem);
    }
}

/* Client-side local date/time: hover shows time zone + UTC hint (see spefr-local-datetime.js) */
time.spefr-local-datetime[datetime],
time.spefr-local-date[datetime],
.spefr-local-datetime-hint {
    cursor: help;
    border-bottom: 1px dotted var(--tblr-gray-600);
}

/* tr[data-spefr-href] whole-row hit target (see spefr-table-row-nav.js) */
.spefr-table-row-clickable {
    cursor: pointer;
}

tr[data-spefr-href]:focus-visible {
    outline: 2px solid var(--tblr-primary, #206bc4);
    outline-offset: 2px;
}

/* HTMX loading indicators (filtered tables; see docs/FILTERED_TABLE_HTMX.md) */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
    pointer-events: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
}

/* First-level page titles: match main-nav icon size (24px). */
.spefr-page-title > .icon,
.spefr-page-title .icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Login-code digit boxes (confirm-login-code; progressive enhancement via JS). */
.spefr-login-code-digits {
    display: none;
}
.spefr-login-code--enhanced .spefr-login-code-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.spefr-login-code--enhanced .spefr-login-code-digits {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}
.spefr-login-code-digit {
    flex: 1 1 2.75rem;
    min-width: 2rem;
    max-width: 2.75rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 360px) {
    .spefr-login-code--enhanced .spefr-login-code-digits {
        gap: 0.35rem;
    }
    .spefr-login-code-digit {
        flex: 1 1 0;
        max-width: none;
    }
}

/* --- Platform legal pages / Terms modal (#491) --- */
.spefr-legal-document-body table,
.spefr-terms-acceptance-body table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.spefr-legal-document-body th,
.spefr-legal-document-body td,
.spefr-terms-acceptance-body th,
.spefr-terms-acceptance-body td {
    border: 1px solid var(--tblr-border-color, #dce1e7);
    padding: 0.5rem 0.65rem;
    vertical-align: top;
    text-align: left;
}

.spefr-legal-document-body thead th,
.spefr-terms-acceptance-body thead th {
    background: var(--tblr-bg-surface-secondary, #f1f5f9);
    font-weight: 600;
}

.spefr-legal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--tblr-body-bg);
}

.spefr-legal-header {
    background: var(--tblr-primary);
    color: #fff;
}

.spefr-legal-header__inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.65rem 1rem;
}

.spefr-legal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.25rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.spefr-legal-back:hover,
.spefr-legal-back:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.spefr-legal-back__icon {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}

.spefr-legal-back__icon path {
    fill: currentColor;
}

.spefr-legal-header__logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.spefr-legal-header__logo-img {
    height: 2.1rem;
    width: auto;
    max-width: 14rem;
}

.spefr-legal-header__title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.95;
}

.spefr-legal-main {
    flex: 1 1 auto;
}

.spefr-legal-footer {
    background: #1c1e21;
    color: #fff;
    font-size: 0.8rem;
}

.spefr-legal-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

.spefr-legal-footer a {
    color: rgba(255, 255, 255, 0.85);
}

.spefr-legal-footer a:hover,
.spefr-legal-footer a:focus {
    color: #fff;
}

@media (max-width: 44.9375em) {
    .spefr-legal-back__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .spefr-legal-back {
        padding: 0.45rem;
    }
}

/* Public About page (/about/) — history + acknowledgements. */
.spefr-about-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Shared legal split hero (About / Contact): Bootstrap row/col in card; photo fills pane. */
.spefr-legal-hero {
    border-color: rgba(71, 38, 129, 0.18);
    background: var(--tblr-primary);
}

.spefr-legal-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.75rem 1.5rem;
    color: #fff;
    background: var(--tblr-primary);
}

@media (min-width: 768px) {
    .spefr-legal-hero-copy {
        padding: 2.25rem 2rem;
    }
}

.spefr-legal-hero-title {
    font-size: clamp(1.65rem, 1.25rem + 1.4vw, 2.35rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.spefr-legal-hero-lead {
    font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.2rem);
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.92);
    max-width: 28rem;
}

.spefr-legal-hero-media {
    position: relative;
    min-height: 14rem;
    height: 100%;
    background: #1c1430;
}

@media (min-width: 768px) {
    .spefr-legal-hero-media {
        min-height: 18rem;
    }
}

.spefr-legal-hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}

.spefr-legal-hero-logo {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 1;
    width: auto;
    height: 2.1rem;
    max-width: 42%;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}

.spefr-about-title {
    font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.35rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--tblr-body-color);
}

.spefr-about-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--tblr-secondary);
    max-width: 40rem;
}

.spefr-about-section.card,
.spefr-about-ack-card {
    border-color: rgba(32, 107, 196, 0.12);
    box-shadow: 0 0.15rem 0.6rem rgba(24, 36, 51, 0.04);
}

.spefr-about-ack-card {
    border-top: 3px solid var(--tblr-primary);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.spefr-about-ack-card:hover,
.spefr-about-ack-card:focus-within {
    border-color: rgba(32, 107, 196, 0.28);
    box-shadow: 0 0.35rem 1rem rgba(24, 36, 51, 0.08);
}

.spefr-about-ack-logo-wrap {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
}

.spefr-about-ack-logo--uq {
    height: 2.25rem;
    width: auto;
    max-width: 11rem;
}

.spefr-about-ack-logo--thinking-cap {
    height: 2.75rem;
    width: auto;
    max-width: 100%;
    border-radius: 0.25rem;
}

.spefr-about-ack-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--tblr-primary);
    text-decoration: none;
}

.spefr-about-ack-cta:hover,
.spefr-about-ack-cta:focus {
    color: var(--tblr-primary);
    text-decoration: none;
}

.spefr-about-ack-cta-host {
    letter-spacing: 0.01em;
}

.spefr-about-ack-cta-arrow {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
}

.spefr-about-partner-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.spefr-about-timeline-list {
    position: relative;
    margin: 0;
    padding: 0 0 0 1.15rem;
    border-left: 2px solid rgba(32, 107, 196, 0.2);
}

.spefr-about-timeline-item {
    position: relative;
    padding: 0 0 1.5rem 1.25rem;
}

.spefr-about-timeline-item:last-child {
    padding-bottom: 0;
}

.spefr-about-timeline-item::before {
    content: "";
    position: absolute;
    left: -1.15rem;
    top: 0.35rem;
    width: 0.65rem;
    height: 0.65rem;
    margin-left: -0.2rem;
    border-radius: 50%;
    background: var(--tblr-primary);
    box-shadow: 0 0 0 3px var(--tblr-body-bg, #fff);
}

.spefr-about-timeline-year {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tblr-primary);
    margin-bottom: 0.25rem;
}

.spefr-about-refs-list {
    padding-left: 1.1rem;
}

.spefr-about-refs-list li {
    margin-bottom: 0.85rem;
    line-height: 1.45;
}

.spefr-about-refs-list li:last-child {
    margin-bottom: 0;
}

.spefr-about-training.alert {
    border-color: rgba(32, 107, 196, 0.2);
}

/* Support ticket thread — viewer-centric bubbles (You right, them left). */
.spefr-feedback-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spefr-feedback-thread-item {
    max-width: min(34rem, 90%);
    padding: 0.7rem 1rem;
    border-radius: 1rem;
    border: 1px solid transparent;
}

.spefr-feedback-thread-item--them {
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
    background: var(--tblr-bg-surface-secondary, #f1f5f9);
    border-color: rgba(0, 0, 0, 0.04);
    color: var(--tblr-body-color, #1e293b);
}

.spefr-feedback-thread-item--them .spefr-feedback-thread-meta {
    color: var(--tblr-secondary, #64748b);
}

.spefr-feedback-thread-item--you {
    align-self: flex-end;
    border-bottom-right-radius: 0.25rem;
    background: var(--tblr-primary, #51247a);
    color: #fff;
    border-color: transparent;
}

.spefr-feedback-thread-item--you .spefr-feedback-thread-meta,
.spefr-feedback-thread-item--you .spefr-feedback-thread-label,
.spefr-feedback-thread-item--you .spefr-feedback-thread-meta time {
    color: rgba(255, 255, 255, 0.82);
}

.spefr-feedback-thread-item--system {
    align-self: center;
    max-width: 100%;
    border-radius: 0.5rem;
    border: 1px dashed var(--tblr-border-color, #cad0d8);
    background: transparent;
    color: var(--tblr-secondary, #6c7a91);
}

.spefr-feedback-thread-item--system .spefr-feedback-thread-body {
    font-size: 0.925rem;
}

.spefr-feedback-thread-label {
    font-weight: 600;
}

.spefr-feedback-thread-item--system .spefr-feedback-thread-label {
    font-weight: 500;
}
