* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: #f3f5ef;
    color: #193c32;
    font: 15px system-ui
}

header {
    background: white;
    border-bottom: 1px solid #dce3d8;
    display: flex;
    justify-content: space-between;
    padding: 23px 4%;
    gap: 15px;
    flex-wrap: wrap
}

header b {
    font-size: 20px
}

a {
    color: #23644f
}

main {
    max-width: 1500px;
    margin: auto;
    padding: 30px 4%
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    color: #688071
}

h1 {
    font-size: 36px;
    margin: 8px 0;
    letter-spacing: -1px
}

h2 {
    font-size: 22px;
    margin: 10px 0
}

h3 {
    font-size: 15px;
    margin-top: 23px
}

p,
li {
    line-height: 1.7;
    color: #62746b
}

.tabs,
.tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0
}

button,
select,
input {
    font: inherit
}

button,
select {
    padding: 10px 14px;
    border: 1px solid #cad7c6;
    border-radius: 7px;
    background: white;
    color: #205944
}

button {
    cursor: pointer
}

button.active,
.primary {
    color: white;
    background: #1c604b;
    border-color: #1c604b
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px
}

.card {
    background: white;
    border: 1px solid #dae2d5;
    border-radius: 12px;
    padding: 23px
}

.stage {
    padding: 0;
    overflow: hidden;
    background: #091a28;
    color: white
}

.stage canvas {
    height: 460px;
    width: 100%;
    display: block;
    touch-action: pan-y
}

.stage svg {
    width: 100%;
    display: block;
    height: auto
}

.caption {
    padding: 16px 22px;
    font-size: 12px;
    color: #b3c8c5;
    margin: 0;
    border-top: 1px solid #304650
}

.diagram {
    background: #f9faf5;
    border: 1px solid #dbe3d5;
    border-radius: 12px;
    overflow: hidden
}

.diagram svg {
    display: block;
    width: 100%;
    height: auto
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 22px
}

.control {
    margin: 20px 0
}

.control label {
    font-size: 12px;
    display: block;
    margin: 10px 0;
    color: #60756a
}

.control input[type=range] {
    width: 100%;
    accent-color: #22664f
}

.value {
    float: right;
    font-weight: 700;
    color: #183c31
}

.metric {
    background: #edf3e7;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
    margin-top: 16px
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

th,
td {
    text-align: left;
    padding: 11px 8px;
    border-bottom: 1px solid #dbe3d4
}

details {
    font-size: 13px
}

summary {
    padding: 12px 0;
    cursor: pointer;
    color: #245f4a;
    font-weight: 600
}

.equation {
    font-family: ui-monospace, monospace;
    font-size: 14px;
    padding: 16px;
    background: #eef4e8;
    border-radius: 8px;
    line-height: 1.9
}

.answer {
    width: 110px;
    padding: 10px;
    border: 1px solid #c9d6c4;
    border-radius: 7px
}

.choices {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin: 18px 0
}

.choices button {
    font-size: 12px;
    padding: 8px 11px
}

footer {
    font-size: 12px;
    line-height: 1.9;
    color: #6c7d70;
    margin-top: 25px
}

.hidden {
    display: none !important
}

.tablewrap {
    overflow: auto
}

.diagram text {
    font-family: system-ui;
    font-size: 14px;
    fill: #224e40
}

.diagram .small {
    font-size: 12px
}

.diagram .white {
    fill: white
}

.steps {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.steps span {
    background: #e6efde;
    padding: 9px;
    border-radius: 6px;
    font-size: 12px
}

#feedback {
    font-size: 13px;
    font-weight: 600
}

@media(max-width:1000px) {
    .layout {
        grid-template-columns: 1fr
    }

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

@media(max-width:600px) {
    main {
        padding: 22px 15px
    }

    h1 {
        font-size: 29px
    }

    .stage canvas {
        height: 350px
    }

    .card {
        padding: 18px
    }

    .stage {
        padding: 0
    }

    .tabs button {
        font-size: 12px;
        padding: 9px
    }
}

[hidden] {
    display: none !important
}