* {
    box-sizing: border-box;
}

.wave-simulation {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 60px;
    font-family: Arial, Helvetica, sans-serif;
    color: #263238;
}


/* INTRO */

.intro {
    margin-bottom: 18px;
}

.intro h1 {
    margin: 0 0 7px;
    font-size: clamp(25px, 3vw, 32px);
}

.intro p {
    margin: 0;
    color: #607d8b;
    line-height: 1.5;
}


/* SIMULATION */

.simulation-panel {
    overflow: hidden;
    background: white;
    border: 1px solid #d8e2e7;
    border-radius: 15px;
}


/* CONTROLS */

.controls {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    align-items: center;
    gap: 26px;

    padding: 16px 20px;

    background: #f7fafb;
    border-bottom: 1px solid #dce5e9;
}

.play-controls {
    display: flex;
    gap: 8px;
}

.play-controls button {
    min-height: 40px;
    padding: 8px 14px;

    background: white;

    border: 1px solid #b0bec5;
    border-radius: 8px;

    font-weight: 700;
    cursor: pointer;
}

.play-controls button:hover {
    background: #edf3f5;
}

.play-controls .primary-btn {
    background: #263238;
    color: white;
    border-color: #263238;
}


.control-label {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 6px;

    font-size: 13px;
}

.control-label strong {
    white-space: nowrap;
}

.control-group input {
    width: 100%;
}


/* OCEAN */

.canvas-wrapper {
    position: relative;
    width: 100%;
    background: #0879b5;
}

#waveCanvas {
    display: block;
    width: 100%;
    height: 440px;
}


/* DATA */

.values-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 14px;

    padding: 18px;

    background: #f7fafb;
}

.value-card,
.equation-card {
    padding: 16px;

    background: white;

    border: 1px solid #dce5e9;
    border-radius: 11px;
}

.value-card h2,
.equation-card h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.deep-card {
    border-top: 4px solid #1976d2;
}

.shallow-card {
    border-top: 4px solid #26a69a;
}

.value-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    padding: 8px 0;

    border-bottom: 1px solid #edf1f3;

    font-size: 14px;
}

.value-row:last-child {
    border-bottom: 0;
}

.value-row strong {
    white-space: nowrap;
}


/* EQUATION */

.equation-card {
    text-align: center;
}

.equation {
    margin: 5px 0 10px;

    font-family: Georgia, serif;
    font-size: 34px;
    font-style: italic;
}

.equation-card p {
    margin: 0 auto 14px;

    max-width: 330px;

    color: #607d8b;

    font-size: 13px;
    line-height: 1.45;
}

.relationship {
    display: flex;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;

    font-weight: 700;
}


/* KEY IDEA */

.key-idea {
    margin: 0 18px 18px;
    padding: 13px 16px;

    background: #fff8e1;

    border-left: 5px solid #ffb300;
    border-radius: 7px;

    font-size: 14px;
    line-height: 1.5;
}


/* QUESTIONS */

.checking-understanding {
    margin-top: 24px;
    padding: 22px;

    background: white;

    border: 1px solid #d8e2e7;
    border-radius: 15px;
}

.questions-heading {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 14px;
}

.brain-icon {
    display: grid;
    place-items: center;

    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    background: #f2e9ff;
    border-radius: 10px;

    font-size: 23px;
}

.questions-heading h2 {
    margin: 0 0 3px;
    font-size: 22px;
}

.questions-heading p {
    margin: 0;
    color: #607d8b;
    font-size: 14px;
}

.question {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 15px 0;

    border-top: 1px solid #e5ecef;
}

.question-number {
    display: grid;
    place-items: center;

    width: 29px;
    height: 29px;

    flex: 0 0 29px;

    background: #263238;
    color: white;

    border-radius: 50%;

    font-size: 13px;
    font-weight: 700;
}

.question p {
    margin: 3px 0 0;

    font-size: 15px;
    line-height: 1.5;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    .controls {
        grid-template-columns: 1fr 1fr;
    }

    .play-controls {
        grid-column: 1 / -1;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 600px) {

    .wave-simulation {
        width: calc(100% - 18px);
    }

    .controls {
        grid-template-columns: 1fr;
    }

    .play-controls {
        grid-column: auto;
    }

    .play-controls button {
        flex: 1;
    }

    #waveCanvas {
        height: 380px;
    }
}

/* CHECKING UNDERSTANDING - ANSWER LAYOUT */

.checking-understanding .question {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
}

/* Keep the question number on the left */
.checking-understanding .question-number {
    grid-column: 1;
    grid-row: 1 / span 5;
}

/* Question text */
.checking-understanding .question p {
    grid-column: 2;
    margin: 0 0 10px;
}

/* Answer rectangle */
.checking-understanding .question textarea {
    grid-column: 2;
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 115px;
    padding: 14px;
    margin: 0 0 10px;
    border: 1px solid #cbd5df;
    border-radius: 8px;
    background: #ffffff;
    font: inherit;
    line-height: 1.5;
    resize: vertical;
}

/* Button below the rectangle */
.checking-understanding .question button {
    grid-column: 2;
    justify-self: start;
    display: block;
    padding: 10px 16px;
    background: #476f85;
    color: white;
    border: none;
    border-radius: 7px;
    font: inherit;
    cursor: pointer;
}

.checking-understanding .question button:hover {
    background: #34586c;
}

/* Model answer below the button */
.checking-understanding .question .model-answer {
    grid-column: 2;
    width: 100%;
    box-sizing: border-box;
    margin-top: 12px;
}
