/* Biology Brain shell, extracted from the physical-properties lesson.
   Original shared declarations and cascade preserved; topic selectors removed. */
:root {

    --bb-green:
        #1f7a45;

    --bb-green-dark:
        #155b33;

    --bb-green-soft:
        #eaf6ef;

    --ink:
        #1f2933;

    --muted:
        #667085;

    --line:
        #d9e2dc;

    --surface:
        #ffffff;

    --workspace:
        #eef8f3;

    

    

    

    --shadow:
        0 18px 45px
        rgba(29, 45, 36, .14);
}

* {
    box-sizing:
        border-box;
}

html,
body {

    margin:
        0;

    width:
        100%;

    height:
        100%;

    min-width:
        0;

    min-height:
        0;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color:
        var(--ink);

    background:
        #edf1ee;

    overflow:
        hidden;
}

.module-shell {

    width:
        100%;

    height:
        100vh;

    min-width:
        0;

    min-height:
        0;

    display:
        grid;

    grid-template-rows:
        auto
        minmax(0, 1fr)
        auto;

    background:
        white;

    border:
        1px solid
        #dfe6e1;

    border-radius:
        22px;

    overflow:
        hidden;

    box-shadow:
        var(--shadow);
}

.module-shell:fullscreen,
.module-shell:-webkit-full-screen {

    width:
        100vw;

    height:
        100vh;

    border:
        none;

    border-radius:
        0;

    box-shadow:
        none;
}

.module-topbar {

    min-height:
        68px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        20px;

    padding:
        10px 20px;

    border-bottom:
        1px solid
        var(--line);

    background:
        white;

    z-index:
        50;
}

.module-brand {

    min-width:
        0;

    display:
        flex;

    align-items:
        center;

    gap:
        13px;
}

.module-brand > div:last-child {

    min-width:
        0;
}

.brand-mark {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-mark img {
    width: 42px;
    height: 42px;

    display: block;

    object-fit: contain;
}

.module-eyebrow {

    margin:
        0 0 2px;

    color:
        var(--bb-green);

    font-size:
        .75rem;

    font-weight:
        850;

    letter-spacing:
        .08em;

    text-transform:
        uppercase;
}

.module-title {

    margin:
        0;

    font-size:
        clamp(
            1.05rem,
            2vw,
            1.5rem
        );

    line-height:
        1.15;
}

.module-meta {

    flex:
        0 0 auto;

    display:
        flex;

    align-items:
        center;

    gap:
        9px;
}

.badge {

    padding:
        7px 10px;

    border:
        1px solid
        var(--line);

    border-radius:
        999px;

    background:
        #f8faf8;

    font-size:
        .78rem;

    font-weight:
        800;
}

.icon-button {

    min-width:
        40px;

    height:
        40px;

    padding:
        0 12px;

    border:
        1px solid
        var(--line);

    border-radius:
        11px;

    background:
        white;

    color:
        #334039;

    font-weight:
        800;

    white-space:
        nowrap;

    cursor:
        pointer;
}

.icon-button:hover,
.control-button:hover {

    background:
        #f7faf8;
}

.workspace {

    position:
        relative;

    min-width:
        0;

    min-height:
        0;

    overflow:
        hidden;

    background:
        linear-gradient(
            135deg,
            #f9fcfa,
            var(--workspace)
        );
}

.lesson-scene {

    position:
        absolute;

    inset:
        0;

    display:
        none;

    padding:
        26px 390px 24px 34px;

    overflow:
        hidden;
}

.lesson-scene.active {

    display:
        flex;

    flex-direction:
        column;
}

.comparison-heading {

    flex:
        0 0 auto;

    margin-bottom:
        18px;
}

.comparison-kicker {

    color:
        var(--bb-green);

    font-size:
        .74rem;

    font-weight:
        900;

    letter-spacing:
        .1em;
}

.comparison-heading h2 {

    margin:
        3px 0 4px;

    font-size:
        1.5rem;
}

.comparison-heading p {

    margin:
        0;

    color:
        var(--muted);

    font-size:
        .9rem;
}

.medium-panel {

    position:
        relative;

    min-width:
        0;

    min-height:
        0;

    border:
        1px solid
        rgba(31, 122, 69, .12);

    border-radius:
        22px;

    background:
        rgba(255, 255, 255, .88);

    box-shadow:
        0 12px 28px
        rgba(31, 70, 48, .07);

    overflow:
        hidden;
}

.medium-icon {

    width:
        34px;

    height:
        34px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        10px;

    background:
        var(--bb-green-soft);
}

.instruction-popup {

    position:
        absolute;

    top:
        20px;

    right:
        20px;

    width:
        340px;

    max-width:
        calc(100% - 40px);

    border:
        1px solid
        #d9e5dd;

    border-radius:
        18px;

    background:
        rgba(255, 255, 255, .97);

    box-shadow:
        0 18px 42px
        rgba(28, 44, 34, .15);

    overflow:
        hidden;

    z-index:
        40;
}

.instruction-header {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        12px;

    padding:
        12px 14px 11px 16px;

    background:
        var(--bb-green-soft);

    border-bottom:
        1px solid
        #dbe9df;

    cursor:
        grab;

    user-select:
        none;
}

.instruction-header:active {

    cursor:
        grabbing;
}

.instruction-step {

    color:
        var(--bb-green-dark);

    font-size:
        .76rem;

    font-weight:
        900;

    letter-spacing:
        .08em;

    text-transform:
        uppercase;
}

.popup-actions {

    display:
        flex;

    align-items:
        center;

    gap:
        6px;
}

.popup-action {

    width:
        30px;

    height:
        30px;

    display:
        grid;

    place-items:
        center;

    padding:
        0;

    border:
        none;

    border-radius:
        8px;

    background:
        transparent;

    color:
        #536057;

    font-size:
        1rem;

    cursor:
        pointer;
}

.popup-action:hover {

    background:
        rgba(31, 122, 69, .10);
}

.instruction-body {

    padding:
        16px 18px 17px;
}

.instruction-body h2 {

    margin:
        0 0 9px;

    font-size:
        1.18rem;

    line-height:
        1.25;
}

.instruction-body p {

    margin:
        0;

    color:
        #4e5b53;

    font-size:
        .91rem;

    line-height:
        1.5;
}

.instruction-goal {

    margin-top:
        14px;

    padding:
        11px 13px;

    border:
        1px solid
        #e0e8e3;

    border-radius:
        12px;

    background:
        #f7faf8;

    color:
        #435047;

    font-size:
        .84rem;

    line-height:
        1.4;
}

.instruction-goal strong {

    display:
        block;

    margin-bottom:
        3px;
}

.instruction-restore {

    position:
        absolute;

    top:
        20px;

    right:
        20px;

    display:
        none;

    padding:
        9px 13px;

    border:
        1px solid
        var(--line);

    border-radius:
        999px;

    background:
        white;

    color:
        var(--bb-green-dark);

    font-weight:
        850;

    cursor:
        pointer;

    box-shadow:
        0 8px 20px
        rgba(28, 44, 34, .10);

    z-index:
        39;
}

.module-footer {

    min-height:
        60px;

    display:
        grid;

    grid-template-columns:
        1fr
        auto
        1fr;

    align-items:
        center;

    gap:
        16px;

    padding:
        8px 18px;

    border-top:
        1px solid
        var(--line);

    background:
        white;

    z-index:
        50;
}

.footer-left,
.footer-right {

    display:
        flex;

    align-items:
        center;

    gap:
        9px;
}

.footer-right {

    justify-content:
        flex-end;
}

.control-button {

    min-height:
        40px;

    padding:
        0 14px;

    border:
        1px solid
        var(--line);

    border-radius:
        11px;

    background:
        white;

    color:
        #334039;

    font-weight:
        800;

    white-space:
        nowrap;

    cursor:
        pointer;
}

.control-button.primary {

    border-color:
        var(--bb-green);

    background:
        var(--bb-green);

    color:
        white;
}

.control-button.primary:hover:not(:disabled) {

    background:
        var(--bb-green-dark);
}

.control-button.primary:disabled {

    opacity:
        .38;

    cursor:
        not-allowed;
}

.module-progress {

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        8px;
}

@media (max-height: 760px) {
.module-topbar {

        min-height:
            60px;

        padding:
            8px 16px;
    }

.brand-mark {

        width:
            38px;

        height:
            38px;

        font-size:
            20px;
    }

.module-footer {

        min-height:
            54px;

        padding:
            6px 14px;
    }

.control-button {

        min-height:
            36px;

        font-size:
            .84rem;
    }

.lesson-scene {

        padding-top:
            16px;

        padding-bottom:
            14px;
    }

.comparison-heading {

        margin-bottom:
            12px;
    }

.comparison-heading h2 {

        font-size:
            1.3rem;
    }

.instruction-popup {

        top:
            14px;

        right:
            14px;
    }
}

@media (max-width: 1200px) {
.lesson-scene {

        padding:
            22px 330px 20px 24px;
    }

.instruction-popup {

        width:
            295px;

        right:
            16px;
    }
}

@media (max-width: 950px) {
.lesson-scene {

        padding:
            18px;
    }

.comparison-heading {

        padding-right:
            300px;
    }

.instruction-popup {

        top:
            14px;

        right:
            14px;

        width:
            290px;

        max-width:
            calc(100% - 28px);
    }
}

@media (max-width: 720px) {
html,
body {

        overflow:
            auto;
    }

.module-shell {

        min-height:
            100vh;

        height:
            auto;
    }

.workspace {

        min-height:
            980px;

        overflow:
            visible;
    }

.lesson-scene {

        position:
            relative;

        inset:
            auto;

        min-height:
            980px;

        padding:
            12px;

        overflow:
            visible;
    }

.lesson-scene:not(.active) {

        display:
            none;
    }

.lesson-scene.active {

        display:
            flex;
    }

.comparison-heading {

        padding-right:
            0;

        margin-bottom:
            12px;
    }

.instruction-popup {

        position:
            fixed;

        width:
            min(
                300px,
                calc(100% - 20px)
            );

        top:
            10px;

        right:
            10px;
    }
}

@media (max-width: 560px) {
.module-topbar {

        padding:
            8px 10px;

        gap:
            10px;
    }

.module-meta {

        gap:
            5px;
    }

.module-meta .badge {

        display:
            none;
    }

.module-title {

        font-size:
            .98rem;
    }

.brand-mark {

        width:
            36px;

        height:
            36px;
    }

.icon-button {

        min-width:
            34px;

        height:
            34px;

        padding:
            0 8px;

        font-size:
            .8rem;
    }

.module-footer {

        grid-template-columns:
            auto
            1fr
            auto;

        gap:
            8px;

        padding:
            6px 8px;
    }

.footer-left {

        display:
            none;
    }

.module-progress {

        justify-self:
            center;
    }

.footer-right {

        grid-column:
            3;
    }

.control-button {

        min-height:
            34px;

        padding:
            0 9px;

        font-size:
            .78rem;
    }
}

.sound-active {

    border-color:
        var(--bb-green);

    background:
        var(--bb-green-soft);

    color:
        var(--bb-green-dark);
}

.module-completion-overlay {

    position:
        fixed;

    inset:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        24px;

    background:
        rgba(8, 12, 10, .72);

    backdrop-filter:
        blur(7px);

    -webkit-backdrop-filter:
        blur(7px);

    opacity:
        0;

    visibility:
        hidden;

    pointer-events:
        none;

    transition:
        opacity .35s ease,
        visibility .35s ease;

    z-index:
        9999;
}

.module-completion-overlay.visible {

    opacity:
        1;

    visibility:
        visible;

    pointer-events:
        auto;
}

.module-completion-card {

    position:
        relative;

    width:
        min(
            560px,
            100%
        );

    max-height:
        calc(100vh - 48px);

    overflow-y:
        auto;

    padding:
        30px;

    border:
        1px solid
        #dce6df;

    border-radius:
        26px;

    background:
        #ffffff;

    color:
        var(--ink);

    text-align:
        center;

    box-shadow:
        0 28px 80px
        rgba(0, 0, 0, .32);

    transform:
        translateY(20px)
        scale(.96);

    transition:
        transform .4s
        cubic-bezier(.2, .8, .2, 1);
}

.module-completion-overlay.visible
.module-completion-card {

    transform:
        translateY(0)
        scale(1);
}

.completion-close-button {

    position:
        absolute;

    top:
        14px;

    right:
        14px;

    width:
        34px;

    height:
        34px;

    display:
        grid;

    place-items:
        center;

    padding:
        0;

    border:
        0;

    border-radius:
        9px;

    background:
        #f2f5f3;

    color:
        #58645d;

    font-size:
        1.25rem;

    cursor:
        pointer;
}

.completion-close-button:hover {

    background:
        #e8eeea;
}

.completion-success-icon {

    width:
        72px;

    height:
        72px;

    margin:
        0 auto 13px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        50%;

    background:
        var(--bb-green-soft);

    color:
        var(--bb-green);

    font-size:
        2.1rem;

    font-weight:
        950;

    animation:
        completionSuccessPop
        .55s
        cubic-bezier(.2, .8, .2, 1);
}

.completion-success-icon img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    display: block;
}

.completion-eyebrow {

    margin:
        0 0 5px;

    color:
        var(--bb-green);

    font-size:
        .72rem;

    font-weight:
        900;

    letter-spacing:
        .12em;

    text-transform:
        uppercase;
}

.module-completion-card h2 {

    margin:
        0;

    color:
        var(--ink);

    font-size:
        clamp(
            1.45rem,
            3vw,
            2rem
        );

    line-height:
        1.16;
}

.completion-subtitle {

    max-width:
        450px;

    margin:
        10px auto 0;

    color:
        var(--muted);

    font-size:
        .85rem;

    line-height:
        1.5;
}

.completion-reward-card {

    margin:
        21px 0 14px;

    padding:
        15px 18px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        20px;

    border:
        1px solid
        #dce9df;

    border-radius:
        16px;

    background:
        linear-gradient(
            135deg,
            #f4fbf6,
            #eaf6ef
        );
}

.completion-reward-card span {

    color:
        #57645c;

    font-size:
        .78rem;

    font-weight:
        800;
}

.completion-reward-card strong {

    color:
        #58b92f;

    font-size:
        1.6rem;

    font-weight:
        950;
}

.completion-progress-card {

    padding:
        15px 16px;

    border:
        1px solid
        #e1e7e3;

    border-radius:
        16px;

    background:
        #f9fbfa;

    text-align:
        left;
}

.completion-progress-heading {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        18px;

    margin-bottom:
        11px;
}

.completion-progress-heading div > span {

    display:
        block;

    margin-bottom:
        2px;

    color:
        var(--bb-green);

    font-size:
        .62rem;

    font-weight:
        900;

    letter-spacing:
        .08em;

    text-transform:
        uppercase;
}

.completion-progress-heading div > strong {

    display:
        block;

    color:
        var(--ink);

    font-size:
        .86rem;
}

.completion-progress-heading > strong {

    flex:
        0 0 auto;

    color:
        #48554d;

    font-size:
        .82rem;

    font-weight:
        900;
}

.completion-progress-track {

    width:
        100%;

    height:
        12px;

    overflow:
        hidden;

    border-radius:
        999px;

    background:
        #dce3df;
}

.completion-progress-fill {

    height:
        100%;

    border-radius:
        inherit;

    background:
        #59b832;

    transition:
        width 1.05s
        cubic-bezier(.2, .8, .2, 1);
}

.completion-badge-card {

    margin-top:
        14px;

    display:
        grid;

    grid-template-columns:
        auto
        1fr;

    align-items:
        center;

    gap:
        13px;

    padding:
        15px 16px;

    border:
        1px solid
        #e5e1ec;

    border-radius:
        16px;

    background:
        #faf8fc;

    text-align:
        left;
}

.completion-badge-icon {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;

    display: grid;
    place-items: center;

    border-radius: 16px;
    background: #eef8f3;
}

.completion-badge-icon img {
    width: 60px;
    height: 60px;

    display: block;
    object-fit: contain;
}

.completion-badge-copy {

    min-width:
        0;
}

.completion-badge-copy span {

    display:
        block;

    margin-bottom:
        2px;

    color:
        #7a6092;

    font-size:
        .62rem;

    font-weight:
        900;

    letter-spacing:
        .08em;

    text-transform:
        uppercase;
}

.completion-badge-copy strong {

    display:
        block;

    color:
        #392f43;

    font-size:
        .88rem;
}

.completion-badge-copy p {

    margin:
        5px 0 0;

    color:
        #6c6571;

    font-size:
        .7rem;

    line-height:
        1.4;
}

.completion-actions {

    margin-top:
        22px;

    display:
        grid;

    grid-template-columns:
        1fr
        1fr;

    gap:
        10px;
}

.completion-primary-button,
.completion-secondary-button {

    min-height:
        46px;

    padding:
        0 16px;

    border-radius:
        12px;

    font:
        inherit;

    font-weight:
        850;

    cursor:
        pointer;
}

.completion-primary-button {

    border:
        0;

    background:
        var(--bb-green);

    color:
        white;

    box-shadow:
        0 9px 20px
        rgba(31, 122, 69, .20);
}

.completion-primary-button:hover {

    background:
        var(--bb-green-dark);
}

.completion-secondary-button {

    border:
        1px solid
        var(--line);

    background:
        white;

    color:
        #455248;
}

.completion-secondary-button:hover {

    background:
        #f7faf8;
}

@media (max-width: 600px) {
.module-completion-overlay {

        padding:
            14px;
    }

.module-completion-card {

        padding:
            24px 18px 20px;

        border-radius:
            20px;
    }

.completion-actions {

        grid-template-columns:
            1fr;
    }

.completion-success-icon {

        width:
            62px;

        height:
            62px;

        font-size:
            1.8rem;
    }
}

.activity-feedback {

    margin-top:
        14px;

    padding:
        16px;

    border:
        1px solid
        #dce6df;

    border-radius:
        16px;

    background:
        #f8fbf9;

    text-align:
        left;
}

.activity-feedback-question {

    margin:
        0 0 11px;

    color:
        var(--ink);

    font-size:
        .84rem;

    font-weight:
        850;

    text-align:
        center;
}

.activity-feedback-buttons {

    display:
        grid;

    grid-template-columns:
        1fr
        1fr;

    gap:
        9px;
}

.activity-feedback-button {

    min-height:
        42px;

    padding:
        8px 12px;

    border:
        1px solid
        #d5dfd8;

    border-radius:
        11px;

    background:
        white;

    color:
        #455248;

    font:
        inherit;

    font-size:
        .78rem;

    font-weight:
        800;

    cursor:
        pointer;

    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.activity-feedback-button:hover {

    border-color:
        #a9c5b3;

    background:
        var(--bb-green-soft);

    transform:
        translateY(-1px);
}

.activity-feedback-reasons {

    margin-top:
        13px;

    padding-top:
        13px;

    border-top:
        1px solid
        #e1e8e3;
}

.activity-feedback-reasons[hidden] {

    display:
        none;
}

.activity-feedback-reasons > p {

    margin:
        0 0 9px;

    color:
        #4f5d54;

    font-size:
        .74rem;

    font-weight:
        800;
}

.activity-feedback-reasons > p span {

    margin-left:
        4px;

    color:
        var(--muted);

    font-size:
        .66rem;

    font-weight:
        650;
}

.activity-feedback-reason-grid {

    display:
        grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap:
        7px;
}

.activity-feedback-reason-grid button {

    min-height:
        35px;

    padding:
        6px 8px;

    border:
        1px solid
        #d9e2dc;

    border-radius:
        9px;

    background:
        white;

    color:
        #526057;

    font:
        inherit;

    font-size:
        .68rem;

    font-weight:
        750;

    cursor:
        pointer;

    transition:
        background .18s ease,
        border-color .18s ease,
        color .18s ease;
}

.activity-feedback-reason-grid button:hover {

    border-color:
        #a9c5b3;

    background:
        var(--bb-green-soft);

    color:
        var(--bb-green-dark);
}

.activity-feedback-thanks {

    padding:
        10px 12px;

    border:
        1px solid
        #cfe3d5;

    border-radius:
        10px;

    background:
        var(--bb-green-soft);

    color:
        var(--bb-green-dark);

    font-size:
        .74rem;

    font-weight:
        800;

    line-height:
        1.4;

    text-align:
        center;
}

.activity-feedback-thanks[hidden] {

    display:
        none;
}

@media (max-width: 600px) {
.activity-feedback {

        padding:
            14px;
    }

.activity-feedback-buttons {

        grid-template-columns:
            1fr;
    }

.activity-feedback-reason-grid {

        grid-template-columns:
            1fr;
    }
}

/* Shared behavior fixes for reusable content; original design tokens unchanged. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.instruction-header { touch-action: none; }
.instruction-popup { max-height: calc(100% - 28px); overflow-y: auto; }
.control-button:disabled { cursor: not-allowed; }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--bb-green); outline-offset: 3px; }
.module-completion-card { overscroll-behavior: contain; }
@media (max-width: 720px) {
    /* The original 980px minimum was sized for the water comparison apparatus. */
    .workspace, .lesson-scene { min-height: 0; }
    .workspace { overflow: auto; }
    .module-shell { height: 100dvh; min-height: 0; }
    .lesson-scene { min-height: 100%; }
    .instruction-popup { max-height: calc(100dvh - 20px); }
}
@media (max-width: 560px) {
    /* Keep Reset/Sound reachable; the donor hid the whole left control group. */
    .module-footer { grid-template-columns: 1fr auto; }
    .footer-left { display: flex; grid-column: 1; grid-row: 1; }
    .module-progress { grid-column: 2; grid-row: 1; }
    .footer-right { grid-column: 1 / -1; grid-row: 2; }
    .module-brand { min-width: 0; }
    .module-meta { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
