/* Advertising showcase — scrollbare Produkt-Demo */

body.page-mg-demo {
    --mg-demo-stage-bg: linear-gradient(180deg, #ffffff 0%, #faf8f4 100%);
    --mg-demo-card-bg: linear-gradient(180deg, #ffffff 0%, #faf8f4 100%);
    --mg-demo-gold: #a8872e;
    --mg-demo-gold-soft: rgba(200, 169, 74, 0.35);
    /* Hintergrund: wie page-app (Wald + Pergament) — siehe style_brand_mathgard_preview.css */
}

/* Nav-Header (.header) behält Brand-Styling — Inhalts-Header in der Demo nicht */
.mg-demo-page header:not(.mg-demo-info-kachel) {
    display: block;
    background: transparent;
    border-bottom: none;
    padding: 0;
    align-items: unset;
    justify-content: unset;
    max-width: none;
}
.mg-demo-page {
    width: 100%;
    max-width: min(1240px, 100%);
    margin: 0 auto;
    padding: clamp(0.75rem, 2.5vw, 1.25rem) clamp(1rem, 3.5vw, 2rem) clamp(4rem, 10vw, 6.5rem);
    box-sizing: border-box;
}

/* ——— Hero: Split mit Jump-Grid ——— */

.mg-demo-hero {
    margin-bottom: clamp(2rem, 5vw, 3rem);
}

.mg-demo-hero__stage {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(1rem, 3vw, 1.75rem);
    padding: clamp(1.1rem, 3vw, 1.75rem);
    border-radius: 16px;
    background: var(--mg-demo-stage-bg);
    border: 1px solid rgba(200, 169, 74, 0.32);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 16px 40px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

.mg-demo-hero__stage::before {
    content: "";
    position: absolute;
    top: -30%;
    right: -10%;
    width: min(380px, 50vw);
    height: min(380px, 50vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 169, 74, 0.08) 0%, transparent 68%);
    pointer-events: none;
}

.mg-demo-hero__main {
    position: relative;
    z-index: 1;
    padding: clamp(0.75rem, 2vw, 1.15rem);
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(200, 169, 74, 0.22);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.mg-demo-hero__mark {
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: 0.65rem;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--mg-nightblue, #1a1a2e) 0%, #2e2e4e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.25);
}

.mg-demo-hero__mark img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    filter: brightness(1.08);
}

.mg-demo-hero__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mg-demo-gold);
}

.mg-demo-hero__main h1 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.55rem, 3.8vw, 2.15rem);
    font-family: Georgia, "Times New Roman", serif;
    color: var(--mg-nightblue, #1a1a2e);
    line-height: 1.15;
}

.mg-demo-hero__lead {
    margin: 0 0 1.25rem;
    line-height: 1.6;
    color: var(--mg-app-muted, #5a6170);
    font-size: clamp(0.92rem, 2vw, 1.02rem);
    max-width: 36rem;
}

.mg-demo-hero__benefits {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
    max-width: 40rem;
}

.mg-demo-hero__benefits li {
    position: relative;
    padding-left: 1.15rem;
    line-height: 1.5;
    color: var(--mg-app-muted, #5a6170);
    font-size: clamp(0.82rem, 1.8vw, 0.92rem);
}

.mg-demo-hero__benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--mg-brand-green, #2d8a4e);
    font-weight: 700;
}

.mg-demo-hero__benefits strong {
    color: var(--mg-app-text, #1a1d24);
    font-weight: 600;
}

.mg-demo-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.mg-demo-hero__jump {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(0.65rem, 2vw, 1rem);
}

.mg-demo-hero__jump-label {
    margin: 0 0 0.75rem;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--mg-app-muted, #5a6170);
}

.mg-demo-jump-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.mg-demo-jump-card {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(200, 169, 74, 0.28);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mg-demo-jump-card:hover {
    transform: translateY(-2px);
    border-color: rgba(200, 169, 74, 0.5);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.mg-demo-jump-card--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
}

.mg-demo-jump-card__n {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--mg-demo-gold);
}

.mg-demo-jump-card__t {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--mg-nightblue, #1a1a2e);
}
/* ——— Showcase-Sections ——— */

.mg-demo-showcases {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 6vw, 4rem);
}

.mg-demo-showcase {
    scroll-margin-top: 5.5rem;
}

.mg-demo-showcase__split {
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 3vw, 1.85rem);
    align-items: stretch;
}

.mg-demo-showcase--layout-reverse .mg-demo-showcase__header {
    order: unset;
}

.mg-demo-showcase--layout-reverse .mg-demo-showcase__panel {
    order: unset;
}

/* Infokachel — hell, grosszügig gepolstert */
.mg-demo-info-kachel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: clamp(2.25rem, 5.5vw, 3.5rem) clamp(2.1rem, 5.5vw, 3.25rem);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #faf8f4 100%);
    border: 1px solid rgba(200, 169, 74, 0.32);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 14px 36px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
    min-width: 0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.mg-demo-info-kachel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 169, 74, 0.35), transparent);
    pointer-events: none;
}

.mg-demo-info-kachel__meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: nowrap;
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
}

.mg-demo-info-kachel .mg-demo-showcase__title,
.mg-demo-info-kachel .mg-demo-duo-cell__title {
    margin: 0 0 1.35rem;
    padding: 0;
    color: var(--mg-nightblue, #1a1a2e);
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: 0.012em;
    line-height: 1.32;
}

.mg-demo-info-kachel .mg-demo-showcase__lead,
.mg-demo-info-kachel .mg-demo-duo-cell__lead {
    margin: 0;
    padding: 0;
    color: var(--mg-app-muted, #5a6170);
    font-size: clamp(0.94rem, 1.9vw, 1.05rem);
    line-height: 1.7;
    max-width: none;
    font-weight: 400;
}

.mg-demo-info-kachel--on-dark {
    /* Gleicher heller Stil in der Duo-Band */
    background: linear-gradient(180deg, #ffffff 0%, #f7f4ee 100%);
    border-color: rgba(200, 169, 74, 0.3);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.mg-demo-duo-cell__head.mg-demo-info-kachel {
    margin-bottom: 0.85rem;
}

.mg-demo-info-kachel--on-dark .mg-demo-showcase__step {
    background: #faf8f4;
    color: var(--mg-nightblue, #1a1a2e);
    border-color: rgba(200, 169, 74, 0.5);
    flex-shrink: 0;
}

.mg-demo-info-kachel--on-dark .mg-demo-showcase__eyebrow {
    margin: 0;
    color: var(--mg-demo-gold);
    font-weight: 500;
}
.mg-demo-showcase__header--sticky:not(.mg-demo-info-kachel) {
    position: static;
    top: auto;
    padding: 0;
}

/* Sticky-Header dürfen Infokachel-Padding nicht überschreiben */
.mg-demo-showcase__header.mg-demo-info-kachel,
.mg-demo-duo-cell__head.mg-demo-info-kachel {
    padding: clamp(2.25rem, 5.5vw, 3.5rem) clamp(2.1rem, 5.5vw, 3.25rem);
}

.mg-demo-showcase__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.85rem;
    height: 2.85rem;
    margin: 0;
    border-radius: 50%;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.02em;
    color: var(--mg-nightblue, #1a1a2e);
    background: #faf8f4;
    border: 1.5px solid rgba(200, 169, 74, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.mg-demo-showcase__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--mg-demo-gold);
    line-height: 1.3;
}

.mg-demo-showcase__title {
    margin: 0;
    font-size: clamp(1.2rem, 2.6vw, 1.55rem);
    color: var(--mg-nightblue, #1a1a2e);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.22;
}

.mg-demo-info-kachel .mg-demo-showcase__title {
    color: var(--mg-nightblue, #1a1a2e);
}

.mg-demo-showcase__lead {
    margin: 0;
    line-height: 1.55;
    color: var(--mg-app-muted, #5a6170);
    font-size: 0.92rem;
    max-width: 42rem;
}

.mg-demo-info-kachel .mg-demo-showcase__lead {
    color: var(--mg-app-muted, #5a6170);
    max-width: none;
}
.mg-demo-showcase__frame {
    padding: clamp(1.1rem, 3vw, 1.6rem);
    border-radius: 16px;
    background: var(--mg-demo-card-bg);
    border: 1px solid rgba(200, 169, 74, 0.28);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 16px 40px rgba(15, 23, 42, 0.1);
}

.mg-demo-showcase__empty {
    margin: 0;
    padding: 1rem;
    color: var(--mg-app-muted, #5a6170);
    font-size: 0.92rem;
}

/* Duo-Band: Fortschritt + 3D */

.mg-demo-showcases__band {
    padding: clamp(1.75rem, 4vw, 2.5rem);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f2ec 100%);
    border: 1px solid rgba(200, 169, 74, 0.3);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.mg-demo-page header.mg-demo-showcases__band-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 40rem;
    margin: 0 auto clamp(1.75rem, 3.5vw, 2.35rem);
    padding: clamp(1.5rem, 3.5vw, 2rem) clamp(1.25rem, 3vw, 1.75rem);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #faf8f4 100%);
    border: 1px solid rgba(200, 169, 74, 0.22);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset;
    box-sizing: border-box;
}

.mg-demo-showcases__band-head .mg-demo-showcase__eyebrow {
    margin: 0 0 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
    width: 100%;
}

.mg-demo-showcases__band-title {
    margin: 0 0 1.1rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
    font-weight: 400;
    line-height: 1.3;
    color: var(--mg-nightblue, #1a1a2e);
}

.mg-demo-showcases__band-lead {
    margin: 0;
    font-size: clamp(0.94rem, 1.9vw, 1.05rem);
    line-height: 1.68;
    color: var(--mg-app-muted, #5a6170);
    max-width: 36rem;
}

.mg-demo-showcases__duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.85rem, 2.5vw, 1.25rem);
    align-items: stretch;
}

.mg-demo-duo-cell {
    scroll-margin-top: 5.5rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.mg-demo-duo-cell--progress .mg-demo-duo-cell__body,
.mg-demo-duo-cell--3d .mg-demo-duo-cell__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.mg-demo-duo-cell--progress .mg-demo-showcase__frame--progress,
.mg-demo-duo-cell--3d .mg-demo-showcase__frame--3d {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.mg-demo-duo-cell__head {
    margin-bottom: 0.65rem;
}

.mg-demo-duo-cell__title {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.18rem);
    font-family: Georgia, "Times New Roman", serif;
    color: var(--mg-nightblue, #1a1a2e);
    line-height: 1.25;
}

.mg-demo-duo-cell__lead {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--mg-app-muted, #5a6170);
}
.mg-demo-duo-cell__body {
    flex: 1 1 auto;
    min-height: 0;
}

.mg-demo-showcase__panel {
    min-width: 0;
}

/* ——— Aufgaben-Tabs ——— */

.mg-demo-exercise-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(26, 26, 46, 0.08);
}

.mg-demo-exercise-tabs__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(26, 26, 46, 0.12);
    background: rgba(243, 244, 248, 0.95);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--mg-app-text, #232733);
    transition: background 0.15s ease, transform 0.15s ease;
}

.mg-demo-exercise-tabs__btn:hover {
    transform: translateY(-1px);
}

.mg-demo-exercise-tabs__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(26, 26, 46, 0.08);
}

.mg-demo-exercise-tabs__btn--active {
    background: var(--mg-nightblue, #1a1a2e);
    color: #fff;
    border-color: var(--mg-nightblue, #1a1a2e);
}

.mg-demo-exercise-tabs__btn--active .mg-demo-exercise-tabs__index {
    background: rgba(200, 169, 74, 0.35);
    color: #fff;
}

.mg-demo-exercise-panel {
    display: none;
}

.mg-demo-exercise-panel--active {
    display: block;
}

.mg-demo-exercise-mount {
    max-height: min(68vh, 580px);
    overflow-y: auto;
    padding: 0.35rem 0.5rem;
    border-radius: 10px;
    background: rgba(243, 244, 248, 0.45);
}

.mg-demo-exercise-block-title {
    font-size: 1.02rem;
    margin: 0.85rem 0 0.6rem;
    color: var(--mg-nightblue, #1a1a2e);
}

.mg-demo-exercise-mount .exercise {
    margin-bottom: 1rem;
}

/* ——— Lernpfad-Embed ——— */

.mg-demo-lp-embed.page-learning-path {
    background: transparent;
    min-height: 0;
}

.mg-demo-lp-shell {
    padding: 0;
    max-width: none;
}

.mg-demo-lp-embed .lp-presets {
    margin-bottom: 1rem;
}

.mg-demo-lp-catalog {
    max-height: 260px;
    overflow-y: auto;
}

.mg-demo-lp-embed .lp-grid {
    gap: 0.85rem;
}

/* ——— Fortschritt / 3D / Stats ——— */

.mg-demo-progress-embed,
.mg-demo-stats-embed {
    padding: 0;
}

.mg-demo-progress-embed .progress-student-shell,
.mg-demo-stats-embed .progress-student-shell {
    padding: 0;
    max-width: none;
}

.mg-demo-duo-cell--progress .mg-demo-progress-embed {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

.page-mg-demo .mg-demo-duo-cell--progress .progress-student-shell {
    height: 100%;
    min-height: 0;
}

.page-mg-demo .mg-demo-duo-cell--progress .progress-student-chapters {
    min-height: 0;
}

.page-mg-demo .progress-section {
    margin: 0;
}

.page-mg-demo .competency-3d-section {
    margin: 0;
}

.page-mg-demo .competency-3d-card {
    border: none;
    box-shadow: none;
    background: transparent;
}

.page-mg-demo .competency-3d-card__title {
    font-size: 1rem;
}

.page-mg-demo .competency-3d-embed {
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
}

.page-mg-demo .competency-3d-canvas-host {
    position: relative;
    width: 100%;
    min-height: min(56vh, 480px);
    height: min(56vh, 480px);
    max-height: min(56vh, 480px);
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #0f1115;
    border: 1px solid rgba(26, 26, 46, 0.15);
}

.page-mg-demo .competency-3d-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.page-mg-demo .competency-3d-pop {
    position: fixed;
    z-index: 10080;
    min-width: 220px;
    max-width: min(360px, 94vw);
    background: rgba(22, 26, 36, 0.97);
    border: 1px solid #3d4a62;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    color: #e8eaef;
}

.page-mg-demo .competency-3d-pop__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.page-mg-demo .competency-3d-pop__close {
    flex-shrink: 0;
    border: none;
    background: #2a3344;
    color: #c9d1e0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.page-mg-demo .competency-3d-pop__close:hover {
    background: #3d4a62;
}

.page-mg-demo .competency-3d-pop__coords {
    color: #9aa3b5;
    font-size: 12px;
    margin-bottom: 6px;
}

.page-mg-demo .competency-3d-pop__count {
    font-size: 16px;
    font-weight: 600;
    color: #e8eaef;
}

.page-mg-demo .competency-3d-pop__extra {
    font-size: 12px;
    color: #9aa3b5;
    margin-bottom: 6px;
}

.page-mg-demo .competency-3d-pop__list {
    margin: 8px 0 0;
    padding-left: 18px;
    max-height: 180px;
    overflow-y: auto;
    color: #b8c0d0;
    font-size: 12px;
}

@media (max-width: 720px) {
    .page-mg-demo .competency-3d-canvas-host {
        min-height: min(48vh, 380px);
        height: min(48vh, 380px);
        max-height: min(48vh, 380px);
    }
}

.mg-demo-stats-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 1fr);
    gap: clamp(1rem, 2.5vw, 1.5rem);
    align-items: stretch;
}

.mg-demo-stats-split__metrics {
    min-width: 0;
}

.mg-demo-stats-chart-wrap {
    min-height: 240px;
    height: 100%;
    padding: 0.5rem;
    border-radius: 10px;
    background: rgba(243, 244, 248, 0.55);
}

.mg-demo-stats-pills {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
}

.page-mg-demo .mg-demo-stats-pills.stats-result--student {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: stretch;
    padding: 0;
    gap: 0.65rem;
}

.mg-demo-stats-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: none;
    flex: none;
    margin: 0;
    padding: 0.9rem 1.05rem;
    border-radius: 10px;
    background: rgba(243, 244, 248, 0.7);
    border: 1px solid rgba(26, 26, 46, 0.06);
    font-size: 0.88rem;
    box-sizing: border-box;
}

.page-mg-demo .mg-demo-stats-pills.stats-result--student .mg-demo-stats-pill {
    flex: none;
    max-width: none;
    width: 100%;
    padding: 0.9rem 1.05rem;
}

.mg-demo-stats-pill span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
    padding-right: 0.5rem;
    color: var(--mg-app-muted, #5a6170);
}

.mg-demo-stats-pill strong {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: var(--mg-nightblue, #1a1a2e);
    font-variant-numeric: tabular-nums;
}

.mg-demo-stats-pill--highlight {
    background: linear-gradient(135deg, rgba(200, 169, 74, 0.18) 0%, rgba(200, 169, 74, 0.06) 100%);
    border-color: rgba(200, 169, 74, 0.35);
}

/* ——— Lehrpersonen-Demo ——— */

.mg-demo-showcase--teacher {
    scroll-margin-top: 5.5rem;
}

.mg-demo-teacher-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(1rem, 2.5vw, 1.5rem);
    align-items: stretch;
}

.mg-demo-teacher-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.mg-demo-teacher-pane__title {
    margin: 0 0 0.35rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.05rem, 2.2vw, 1.22rem);
    font-weight: 400;
    color: var(--mg-nightblue, #1a1a2e);
}

.mg-demo-teacher-pane__hint {
    margin: 0 0 0.85rem;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--mg-app-muted, #5a6170);
}

.mg-demo-teacher-assign-panel {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: clamp(0.85rem, 2vw, 1.1rem);
    border-radius: 12px;
    background: rgba(243, 244, 248, 0.55);
    border: 1px solid rgba(26, 26, 46, 0.07);
}

.mg-demo-teacher-assign-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.mg-demo-teacher-assign-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.mg-demo-teacher-assign-field__label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mg-app-muted, #5a6170);
}

.mg-demo-teacher-assign-select,
.mg-demo-teacher-assign-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 2.4rem;
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(26, 26, 46, 0.14);
    background: #fff;
    font: inherit;
    color: var(--mg-nightblue, #1a1a2e);
}

.mg-demo-teacher-assign-chapter {
    margin: 0;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: rgba(200, 169, 74, 0.1);
    border: 1px solid rgba(200, 169, 74, 0.25);
    font-size: 0.88rem;
    color: var(--mg-nightblue, #1a1a2e);
}

.mg-demo-teacher-assign-chapter__label {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mg-demo-gold);
}

.mg-demo-teacher-exercise-picks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.mg-demo-teacher-exercise-pick {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.6rem 0.7rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(26, 26, 46, 0.08);
}

.mg-demo-teacher-exercise-pick--selected {
    border-color: rgba(200, 169, 74, 0.45);
    background: linear-gradient(180deg, #fff 0%, #faf8f4 100%);
}

.mg-demo-teacher-exercise-pick__toggle {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 1px solid rgba(26, 26, 46, 0.14);
    background: #f4f5f8;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    color: var(--mg-app-muted, #5a6170);
}

.mg-demo-teacher-exercise-pick--selected .mg-demo-teacher-exercise-pick__toggle {
    border-color: rgba(200, 169, 74, 0.55);
    background: rgba(200, 169, 74, 0.18);
    color: #8a6d1f;
}

.mg-demo-teacher-exercise-pick__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mg-demo-teacher-exercise-pick__title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--mg-nightblue, #1a1a2e);
}

.mg-demo-teacher-exercise-pick__levels {
    font-size: 0.74rem;
    color: var(--mg-app-muted, #5a6170);
}

.mg-demo-teacher-assign-submit {
    margin-top: auto;
    min-height: 2.5rem;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 10px;
    background: var(--mg-nightblue, #1a1a2e);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.mg-demo-teacher-assign-submit:hover {
    background: #2e2e4e;
    transform: translateY(-1px);
}

.mg-demo-teacher-assign-feedback {
    margin: 0;
    min-height: 1.25rem;
    font-size: 0.84rem;
    color: #1f7a39;
}

.mg-demo-teacher-monitor-embed {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.page-mg-demo .mg-demo-teacher-monitor-embed .teacher-assignment-details {
    margin: 0;
}

.page-mg-demo .mg-demo-teacher-monitor-embed .teacher-assignment-summary {
    flex-wrap: wrap;
    gap: 0.65rem;
}

.page-mg-demo .mg-demo-teacher-monitor-embed .teacher-assignment-summary__progress-wrap {
    flex: 1 1 100%;
    max-width: none;
}

.page-mg-demo .mg-demo-teacher-monitor-embed .teacher-student-progress-list__name {
    flex: 1 1 6.5rem;
    min-width: 0;
}

.page-mg-demo .mg-demo-teacher-monitor-embed .teacher-assignment-exercise-link {
    cursor: default;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

/* ——— CTA ——— */

.mg-demo-showcase--cta {
    scroll-margin-top: 5.5rem;
}

.mg-demo-showcase__frame--cta {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: linear-gradient(180deg, #ffffff 0%, #f8f5ef 100%);
    border: 2px solid rgba(200, 169, 74, 0.4);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.mg-demo-cta__glow {
    position: absolute;
    inset: auto -20% -60% -20%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(200, 169, 74, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.mg-demo-cta__content {
    position: relative;
    z-index: 1;
    max-width: 32rem;
    margin: 0 auto;
}

.mg-demo-showcase__frame--cta .mg-demo-showcase__title,
.mg-demo-showcase__frame--cta .mg-demo-showcase__eyebrow {
    color: var(--mg-nightblue, #1a1a2e);
}

.mg-demo-showcase__frame--cta .mg-demo-showcase__lead,
.mg-demo-cta__lead {
    color: var(--mg-app-muted, #5a6170);
}

.mg-demo-cta__btn--secondary {
    background: #fff;
    color: var(--mg-nightblue, #1a1a2e);
    border-color: rgba(26, 26, 46, 0.18);
}

.mg-demo-cta__btn--secondary:hover {
    background: #faf8f4;
}
.mg-demo-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.35rem;
}

.mg-demo-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.mg-demo-cta__btn:hover {
    transform: translateY(-1px);
}

.mg-demo-cta__btn--primary {
    background: var(--mg-runegold, #c8a94a);
    color: var(--mg-nightblue, #1a1a2e);
    border-color: rgba(200, 169, 74, 0.9);
}

.mg-demo-cta__btn--primary:hover {
    filter: brightness(1.06);
}

.mg-demo-cta__btn--ghost {
    background: transparent;
    color: var(--mg-nightblue, #1a1a2e);
    border-color: rgba(26, 26, 46, 0.18);
}

.mg-demo-cta__btn--ghost:hover {
    background: rgba(26, 26, 46, 0.04);
}

.mg-demo-cta__link {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.88rem;
    color: rgba(200, 169, 74, 0.95);
    text-decoration: none;
}

.mg-demo-cta__link:hover {
    text-decoration: underline;
}

/* ——— Responsive ——— */

@media (min-width: 1080px) {
    .mg-demo-showcase__split {
        display: grid;
        grid-template-columns: minmax(420px, 500px) minmax(0, 1fr);
        gap: clamp(1.75rem, 3.2vw, 2.5rem);
        align-items: start;
    }

    .mg-demo-showcase--layout-reverse .mg-demo-showcase__split {
        grid-template-columns: minmax(0, 1fr) minmax(420px, 500px);
    }

    .mg-demo-showcase--layout-reverse .mg-demo-showcase__header {
        order: 2;
    }

    .mg-demo-showcase--layout-reverse .mg-demo-showcase__panel {
        order: 1;
    }

    .mg-demo-showcase__header--sticky:not(.mg-demo-info-kachel) {
        position: sticky;
        top: 5.5rem;
    }

    .mg-demo-showcase__header.mg-demo-info-kachel.mg-demo-showcase__header--sticky {
        position: sticky;
        top: 5.5rem;
    }
}

@media (max-width: 960px) {
    .mg-demo-hero__stage {
        grid-template-columns: 1fr;
    }

    .mg-demo-showcases__duo {
        grid-template-columns: 1fr;
    }

    .mg-demo-stats-split {
        grid-template-columns: 1fr;
    }

    .mg-demo-teacher-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .mg-demo-jump-grid {
        grid-template-columns: 1fr;
    }

    .mg-demo-jump-card--wide {
        grid-column: auto;
    }

    .mg-demo-exercise-mount {
        max-height: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mg-demo-jump-card,
    .mg-demo-cta__btn,
    .mg-demo-exercise-tabs__btn {
        transition: none;
    }

    .mg-demo-jump-card:hover,
    .mg-demo-cta__btn:hover,
    .mg-demo-exercise-tabs__btn:hover {
        transform: none;
    }
}
