/*
 * StudyStruct Platform Hero — CSP Safe V1
 *
 * External same-origin CSS replaces presentation that would otherwise
 * depend on inline style attributes blocked by Content-Security-Policy.
 */

.ss-platform-hero {
    background: linear-gradient(135deg, #123d82 0%, #235bd6 100%);
    border-radius: 26px;
    padding: 30px 34px;
    color: #fff;
    box-shadow: 0 12px 28px rgba(18, 61, 130, .18);
    margin-bottom: 28px;
}

.ss-platform-hero-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 930px;
    margin: 0 auto;
}

.ss-platform-logo-box {
    width: 92px;
    min-width: 92px;
    height: 72px;
    padding: 8px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, .14);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ss-platform-logo-box img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 68px !important;
    max-height: 52px !important;
    object-fit: contain;
    border-radius: 6px;
}

.ss-platform-hero-copy {
    flex: 1;
    min-width: 0;
}

.ss-platform-hero-copy > div:first-child {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #f4f7ff;
}

.ss-platform-hero-copy > div:nth-child(2) {
    height: 1px;
    background: rgba(255, 255, 255, .55);
    margin-bottom: 18px;
}

.ss-platform-hero-copy > h2 {
    color: #fff;
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 500;
}

.ss-platform-hero-copy > p {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
    color: #fff;
}

@media (max-width: 700px) {
    .ss-platform-hero {
        padding: 22px 18px;
    }

    .ss-platform-hero-inner {
        gap: 14px;
        align-items: flex-start;
    }

    .ss-platform-logo-box {
        width: 72px;
        min-width: 72px;
        height: 60px;
        padding: 6px;
    }

    .ss-platform-logo-box img {
        max-width: 52px !important;
        max-height: 42px !important;
    }

    .ss-platform-hero-copy > h2 {
        font-size: 28px;
    }
}

/* =========================================================
 * STUDYSTRUCT SITE-WIDE CSP UI V1
 *
 * Same-origin external presentation for StudyStruct logos
 * and value-driven progress indicators.
 * ========================================================= */

/* Site-wide StudyStruct logo safety.
 *
 * The native quiz header is intentionally excluded because it already
 * has its own CSP-safe external sizing contract.
 */
img[src*="/local/studystructassessment/pix/logo-studystruct.png"]:not(.ss-native-quiz-hero__logo),
img[src*="/local/mathassessmentsummary/pix/logo-studystruct.png"]:not(.ss-native-quiz-hero__logo) {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 90px !important;
    max-height: 90px !important;
    object-fit: contain !important;
}

/* Shared StudyStruct platform hero remains intentionally smaller.
 *
 * Attribute specificity deliberately matches the global logo-safety
 * selector so this later rule wins while preserving the certified
 * platform-hero dimensions.
 */
.ss-platform-logo-box > img[src*="logo-studystruct.png"] {
    width: auto !important;
    height: auto !important;
    max-width: 68px !important;
    max-height: 52px !important;
    object-fit: contain !important;
}

/* Preserve the certified mobile platform-hero dimensions as well. */
@media (max-width: 700px) {
    .ss-platform-logo-box > img[src*="logo-studystruct.png"] {
        max-width: 52px !important;
        max-height: 42px !important;
    }
}

/* Preserve the existing direct Teach Me intent. */
.ss-teachme-shell .ss-platform-logo-box {
    display: none !important;
}

.ss-teachme-shell .ss-platform-hero-inner {
    gap: 0 !important;
}

/* Generic CSP-safe native progress component. */
.ss-csp-progress {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: #e5e7eb;
    appearance: none;
    -webkit-appearance: none;
}

.ss-csp-progress::-webkit-progress-bar {
    background: #e5e7eb;
    border-radius: 999px;
}

.ss-csp-progress::-webkit-progress-value {
    background: #2563eb;
    border-radius: 999px;
}

.ss-csp-progress::-moz-progress-bar {
    background: #2563eb;
    border-radius: 999px;
}

/* Green mastery variant. */
.ss-csp-progress--green::-webkit-progress-value,
.ss-mastery-fill::-webkit-progress-value {
    background: #16a34a;
}

.ss-csp-progress--green::-moz-progress-bar,
.ss-mastery-fill::-moz-progress-bar {
    background: #16a34a;
}

/* Mastery Passport variants. */
.ss-passport-fill-success::-webkit-progress-value {
    background: #16a34a;
}

.ss-passport-fill-success::-moz-progress-bar {
    background: #16a34a;
}

.ss-passport-fill-warning::-webkit-progress-value {
    background: #f59e0b;
}

.ss-passport-fill-warning::-moz-progress-bar {
    background: #f59e0b;
}

.ss-passport-fill-muted::-webkit-progress-value {
    background: #94a3b8;
}

.ss-passport-fill-muted::-moz-progress-bar {
    background: #94a3b8;
}

/* Existing StudyStruct track dimensions. */
.ss-chart-track .ss-csp-progress,
.ss-bar-track .ss-csp-progress {
    height: 18px;
}

.ss-passport-track .ss-csp-progress,
.ss-mastery-track .ss-csp-progress,
.ss-progress .ss-csp-progress {
    height: 12px;
}

.ss-platform-progress-native {
    height: 14px;
}

.ss-history-trend-progress {
    height: 10px;
}

.ss-teachme-progress-native {
    height: 10px;
}

.ss-teacher-confidence-track .ss-csp-progress {
    height: 100%;
    min-height: 10px;
}

/* =========================================================
 * STUDYSTRUCT SITE-WIDE CSP UI V1 END
 * ========================================================= */
