.resource-page {
    flex: 1 0 auto;
    padding: 42px 0;
}

.embed-shell {
    padding: 26px;
}

.embed-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.embed-heading p {
    margin-top: 5px;
    color: var(--muted);
}

.student-panel {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fafafa;
}

.embed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0 14px;
}

.embed-toolbar span {
    color: var(--muted);
}

.embed-frame-wrap {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border: 1px solid #d8dfe5;
    border-radius: 20px;
    background: #0c2031;
}

.embed-frame {
    width: 100%;
    min-height: 650px;
    display: block;
    border: 0;
}

.embed-placeholder {
    min-height: 650px;
    display: grid;
    place-items: center;
    padding: 34px;
    text-align: center;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14), transparent 28%),
        linear-gradient(135deg, #071c2d, var(--resource-primary));
}

.embed-placeholder p {
    max-width: 600px;
    margin: 8px auto 0;
    color: rgba(255, 255, 255, 0.78);
}

.embed-status {
    margin-top: 16px;
}

.landing-card {
    padding: 30px;
}

.landing-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.download-panel {
    margin-top: 24px;
    padding: 26px;
    border: 1px dashed var(--resource-primary);
    border-radius: 18px;
    background: var(--resource-soft);
}

@media (max-width: 900px) {
    .embed-heading,
    .embed-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .embed-frame-wrap,
    .embed-frame,
    .embed-placeholder {
        min-height: 520px;
    }
}

/* =========================================================
   FULL EMBED-ONLY EXERCISE AND QUIZ PAGES
========================================================= */

.resource-page-embed-only {
    padding-top: 34px;
}

.embed-shell-full {
    padding: 26px;
}

.embed-kicker {
    color: var(--resource-primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.embed-frame-wrap-full {
    min-height: clamp(680px, 75vh, 980px);
    margin-top: 22px;
}

.embed-frame-full {
    width: 100%;
    min-height: clamp(680px, 75vh, 980px);
}

.alert.info {
    color: #18506f;
    background: #eaf6fd;
}

@media (max-width: 900px) {
    .embed-frame-wrap-full,
    .embed-frame-full {
        min-height: 720px;
    }
}

/* =========================================================
   WIDER INTERACTIVE ACTIVITY EMBED
   Keeps the existing resource slug/database unchanged.
========================================================= */
.resource-container-wide {
    width: min(1580px, calc(100% - 24px));
    max-width: none;
}

.resource-container-wide .embed-shell-full {
    padding: 20px;
}

.resource-container-wide .embed-frame-wrap-full,
.resource-container-wide .embed-frame-full {
    min-height: clamp(860px, 88vh, 1280px);
}

@media (max-width: 900px) {
    .resource-container-wide {
        width: min(100% - 12px, 1580px);
    }

    .resource-container-wide .embed-shell-full {
        padding: 10px;
        border-radius: 16px;
    }

    .resource-container-wide .embed-frame-wrap-full,
    .resource-container-wide .embed-frame-full {
        min-height: 900px;
        border-radius: 14px;
    }
}

/* =========================================================
   EXERCISE 1A — LARGE RESPONSIVE EMBED
   The activity uses almost the full browser width and height.
========================================================= */
.resource-page-embed-only {
    padding: 18px 0 32px;
}

.resource-page-embed-only > .resource-container-wide {
    width: calc(100vw - 24px) !important;
    max-width: 1880px !important;
    margin-inline: auto;
}

.resource-page-embed-only .embed-shell-full {
    padding: 16px;
    border-radius: 20px;
}

.resource-page-embed-only .embed-frame-wrap-full {
    height: max(900px, calc(100vh - 170px));
    min-height: 900px;
    margin-top: 14px;
}

.resource-page-embed-only .embed-frame-full {
    width: 100%;
    height: 100%;
    min-height: 900px;
}

@media (max-width: 900px) {
    .resource-page-embed-only > .resource-container-wide {
        width: calc(100vw - 8px) !important;
    }

    .resource-page-embed-only .embed-heading {
        padding: 4px;
    }

    .resource-page-embed-only .embed-frame-wrap-full,
    .resource-page-embed-only .embed-frame-full {
        height: 1100px;
        min-height: 1100px;
    }
}
