.thermo-app .mode-picker { flex-wrap: wrap; }
.thermo-app .mode-picker button { min-width: 0; }
.thermo-app .game { padding: 24px; }
#th-content { margin: 24px auto; max-width: 900px; }
.thermo-reaction { text-align: center; font-size: clamp(20px, 3vw, 28px); padding: 24px 12px; color: #152d48; }
.thermo-data { text-align: center; max-width: 680px; margin: 16px auto; padding: 14px 22px; background: #f0f5fb; border-left: 3px solid #163d68; line-height: 1.7; font-size: 17px; }
.thermo-data p { margin: 5px 0; }
.thermo-note, .diagram-note, .diagram-help { font-size: 14px; line-height: 1.6; color: #52657c; max-width: 820px; margin: 12px auto; text-align: center; }
.molecule-reaction { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.molecule-reaction img { width: 180px; max-width: 100%; height: auto; }
.reaction-plus, .reaction-arrow { font-size: 28px; color: #163d68; }
.thermo-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; border: 0; padding: 0; margin: 24px auto; }
.thermo-options legend { text-align: center; font-weight: 650; margin: 0 auto 14px; }
.thermo-options label { padding: 14px 18px; border: 1px solid #a9bed7; border-radius: 4px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.thermo-options label:has(input:checked) { background: #e6eef7; border-color: #163d68; }
.thermo-options input, .no-feature input { accent-color: #163d68; width: 18px; height: 18px; }
.numeric-answer { display: grid; justify-content: center; gap: 10px; font-weight: 650; text-align: center; margin: 24px auto; }
.numeric-answer > span { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.numeric-answer input { width: 190px; max-width: 100%; padding: 12px; font: inherit; border: 1px solid #a9bed7; border-radius: 4px; }
.no-feature { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 20px auto; }
#th-feedback { min-height: 60px; padding: 14px 18px; margin-top: 22px; background: #f0f5fb; border: 2px solid transparent; border-radius: 4px; line-height: 1.6; }
#th-feedback[data-state="correct"] { background: #e9f7ed; color: #166534; border-color: #228443; }
#th-feedback[data-state="incorrect"] { background: #fff0f0; color: #a51c26; border-color: #c8323e; }
#th-progress { height: 100%; background: #163d68; }
.energy-diagram { display: block; width: 100%; max-width: 900px; margin: 0 auto; height: auto; overflow: visible; font: 16px Arial, sans-serif; color: #163d68; }
.energy-diagram text { fill: #163d68; }
.diagram-axis { fill: none; stroke: #52657c; stroke-width: 2; }
.energy-curve { fill: none; stroke: #c8323e; stroke-width: 3; }
.energy-guide { stroke: #a9bed7; stroke-width: 1; stroke-dasharray: 4 4; }
.energy-value { font-size: 13px; }
.feature-hit { fill: transparent; stroke: transparent; }
.feature-dot { fill: white; stroke: #163d68; stroke-width: 2; }
.feature-line-hit { stroke: transparent; stroke-width: 22; }
.barrier-arrow { stroke: #52657c; stroke-width: 1.7; }
.diagram-feature[role="button"] { cursor: pointer; }
.diagram-feature.selected .feature-dot { fill: #163d68; }
.diagram-feature.selected .barrier-arrow { stroke: #1265c6; stroke-width: 4; }
.diagram-feature:focus-visible { outline: none; }
.diagram-feature:focus-visible .feature-hit { stroke: #1265c6; stroke-width: 2; }
.diagram-feature:focus-visible .feature-line-hit { stroke: #1265c622; }
.diagram-feature.selected .feature-label { font-weight: bold; fill: #1265c6; }
@media(max-width:520px) { .thermo-app .game { padding: 18px 12px; } .molecule-reaction img { width: 130px; } .thermo-options { flex-direction: column; } .thermo-options label { justify-content: center; } .energy-diagram { min-width: 620px; } #th-content:has(.energy-diagram) { overflow-x: auto; } }

/* Worksheet-style energy profiles: a clean curve with no pre-drawn barriers. */
.axis-head { fill: none; stroke: #52657c; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.curve-hit { fill: transparent; stroke: transparent; cursor: pointer; }
.selection-dot { fill: #1265c6; stroke: #fff; stroke-width: 2; }
.curve-location:focus-visible { outline: none; }
.curve-location:focus-visible .curve-hit { fill: #1265c612; stroke: #1265c6; stroke-width: 1.5; }
.barrier-guide { fill: none; stroke: #879bb2; stroke-width: 1; stroke-dasharray: 4 4; }
.measured-barrier { fill: none; stroke: #1265c6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.student-barrier text { font-size: 16px; fill: #1265c6; }
.diagram-comparisons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.diagram-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; min-width: 0; background: #fff; border: 1px solid #b9cadf; border-radius: 4px; color: #163d68; box-shadow: none; cursor: pointer; }
.diagram-card strong { font-size: 17px; text-align: center; }
.diagram-card:hover { background: #f5f8fc; }
.diagram-card.selected { border-color: #1265c6; box-shadow: inset 0 0 0 1px #1265c6; background: #edf5ff; }
.diagram-card:focus-visible { outline: 3px solid #1265c6; outline-offset: 3px; }
.diagram-card .energy-diagram { min-width: 0; width: 100%; }
.diagram-card-status { font-size: 13px; text-align: center; font-weight: 600; }
@media (max-width:620px) { .diagram-comparisons { grid-template-columns: 1fr; } .diagram-card { padding: 12px; } }

.compact-diagram { font-size: 23px; }

#th-prompt { text-align: center; font-size: clamp(22px, 3vw, 28px); line-height: 1.35; }
.thermo-app .family { text-align: center; }
#th-feedback:empty { display: none; }
.thermo-app .thermo-options { gap: 10px; margin: 24px auto 16px; }
.thermo-app .thermo-options label { flex: 0 1 220px; justify-content: center; padding: 16px 14px; background: #fff; }
.thermo-app .thermo-options label:has(input:checked) { background: #e6eef7; border-color: #163d68; box-shadow: inset 0 0 0 1px #163d68; }
.thermo-app .thermo-options label:focus-within { outline: 2px solid #1265c6; outline-offset: 3px; }


.product-overlay { max-width: 900px; min-width: 650px; }
.common-reactants { fill: none; stroke: #52657c; stroke-width: 3; }
.product-path { fill: none; stroke-width: 3; }
.path-0 { stroke: #c8323e; }
.path-1 { stroke: #1265c6; stroke-dasharray: 10 5; }
.path-2 { stroke: #28704b; stroke-dasharray: 3 5; }
.product-label-guide { fill: none; stroke-width: 1; stroke-dasharray: none; }
.product-label { font-size: 18px; font-weight: 600; }
.product-overlay .label-0 { fill: #c8323e; }
.product-overlay .label-1 { fill: #1265c6; }
.product-overlay .label-2 { fill: #28704b; }
.product-answers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.product-answers .thermo-options { margin: 12px 0; }
.product-answers .thermo-options label { flex-basis: auto; }
@media(max-width:620px) { .product-answers { grid-template-columns: 1fr; } }

.path-3 { stroke: #7446a6; stroke-dasharray: 12 4 3 4; }
.product-overlay .label-3 { fill: #7446a6; }

.product-answers .four-product-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; align-content: start; }
.product-answers .four-product-options label { min-width: 0; margin: 0; padding: 14px 8px; gap: 7px; }
.product-answers .four-product-options input { flex-shrink: 0; }

/* Separate answer selection from checking and question navigation. */
.thermo-app .game > .bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid #d8e2ee; }

#th-note:empty { display: none; }

/* Compact product choices with space between the two answer groups. */
.product-answers { max-width: 760px; margin: 0 auto; gap: 28px 64px; }
.product-answers .thermo-options { min-width: 0; justify-content: center; }
.product-answers .thermo-options label { flex: 0 1 144px; min-height: 44px; padding: 10px 12px; gap: 8px; }
.product-answers .four-product-options { grid-template-columns: repeat(2, minmax(0, 144px)); justify-content: center; gap: 12px; }
.product-answers .four-product-options label { padding: 10px 12px; }
.product-answers .thermo-options legend { margin-bottom: 16px; }
@media(max-width:620px) { .product-answers { max-width: 340px; gap: 28px; } }
