/* AusSci · What makes a solid, a liquid or a gas? (Year 5): the predict and explain cards, the simulations' drawings
   and controls, and the try-it cards. Drawings are on a light plate with fixed colours in light and dark mode alike.
   Every colour in a drawing also has its word, so colour is never the only key. */

/* ---------- drawings ---------- */
.dia { display: block; width: 100%; height: auto; font-family: 'Atkinson Next', system-ui, sans-serif; touch-action: manipulation; }
.plate { background: #fbfbf6; border: 1px solid #d8ded9; border-radius: 4px; color: #15231d; }
.dia text { fill: #15231d; pointer-events: none; }
.d-small { font-size: 11.5px; fill: #15231d; font-weight: 700; }
.dia text.d-lab, .dia text.d-lab-s, .dia text.d-lab-b, .dia text.d-big, .dia text.d-lab-w { paint-order: stroke; stroke: #fbfbf6; stroke-width: 3.4px; stroke-linejoin: round; }
.dia text.d-lab { font-size: 15px; font-weight: 700; }
.dia text.d-lab-s { font-size: 13px; font-weight: 700; fill: #2c3a34; }
.dia text.d-lab-b { font-size: 16px; font-weight: 800; }
.dia text.d-big { font-size: 26px; font-weight: 800; }
.dia text.d-lab-w { font-size: 14px; font-weight: 800; fill: #ffffff; stroke: rgba(21, 35, 29, 0.78); stroke-width: 3px; }
.art { position: relative; width: 100%; }
.art-cv { display: block; width: 100%; height: auto; border-radius: 4px; background: #fbfbf6; }
.art .art-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; overflow: visible; touch-action: manipulation; }
@media (max-width: 640px) { .dia text.d-lab { font-size: 14px; } .dia text.d-lab-b { font-size: 15px; } .dia text.d-lab-s { font-size: 12.5px; } .dia text.d-big { font-size: 22px; } }

/* ---------- the predict and explain cards ---------- */
.poe { border: 2px solid var(--y-stripe); border-radius: 8px; padding: 0.9rem 1.1rem 1rem; background: var(--box); max-width: 46rem; }
.poe.is-done { box-shadow: inset 0.35rem 0 0 var(--ok); }
.poe .play-tag { margin-bottom: 0.5rem !important; }
.poe-q { font-weight: 800; font-size: 1.111rem; margin: 0 0 0.6rem; max-width: 42rem; }
.poe-opts { margin-bottom: 0.7rem; }
.poe-opts .btn { padding: 0.4rem 0.8rem; }
.poe-why { display: block; font-weight: 700; color: var(--ink-2); margin-bottom: 0.25rem; }
.poe textarea { width: 100%; max-width: 42rem; }
.poe-said, .poe-fb { margin: 0.6rem 0 0; font-weight: 700; color: var(--ink-2); max-width: 42rem; }
.poe-said:empty, .poe-fb:empty { display: none; }
.poe-fb.is-ok { color: var(--ok); }
.poe-recap { margin: 0 0 0.7rem; max-width: 42rem; }
.poe-list { list-style: none; margin: 0 0 0.2rem; padding: 0; display: grid; gap: 0.45rem; max-width: 42rem; }
.poe-opt { display: block; width: 100%; text-align: left; white-space: normal; line-height: 1.4; padding: 0.5rem 0.8rem; }
.poe-opt[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.poe.is-done .poe-opt[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.poe.is-done .poe-opt[aria-pressed="true"]::after { content: ' \2713'; }
.poe-opt:disabled, .poe-opts .btn:disabled { cursor: not-allowed; }
.poe-opt[aria-pressed="true"]:disabled, .poe-opts .btn[aria-pressed="true"]:disabled { opacity: 1; }
.poe-explain:not(.is-ready) .poe-list { opacity: 0.55; }
.poe-draw { margin: 0.8rem 0 0; border-top: 1px dashed var(--rule); padding-top: 0.6rem; max-width: 42rem; }
.poe-lock { margin: 0.6rem 0 0; font-weight: 800; color: var(--ink-2); }
.poe-lock[hidden] { display: none; }
.lab.poe-wait .lab-body { opacity: 0.4; filter: grayscale(0.5); }
@media (max-width: 640px) { .poe { padding: 0.7rem 0.7rem 0.8rem; } .poe-q { font-size: 1.056rem; } }

/* ---------- controls ---------- */
.ctl .label { margin-bottom: 0.3rem; }
.ctl + .ctl, .ctl + .lab-run, .ctl + .sm-about { margin-top: 0.6rem; }
.lab-run { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; margin-top: 0.6rem; }
.lab-run[hidden], .lab-run .btn[hidden], .ctl[hidden] { display: none; }
.seg { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.seg .btn { padding: 0.3rem 0.65rem; }
.seg .btn[aria-pressed="true"], .lab-run .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg .btn:disabled, .lab-run .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pick-ctl { margin-top: 0.8rem; border-top: 1px dashed var(--rule); padding-top: 0.7rem; }
.sm-about { margin: 0.6rem 0 0; max-width: 44rem; }
.sm-about:empty { display: none; }

/* ---------- a simulation: the drawing, with its readings ---------- */
.sm-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 0.8rem; }
.sm-main { max-width: 52rem; }
.sm-box { padding: 0.25rem; }
.sm-read { margin: 0.45rem 0 0; font-size: 0.944rem; font-weight: 700; color: var(--ink-2); }
.sm-status { min-height: 2.6em; font-size: 1.111rem; }
.sm-todo { margin: 0; color: var(--ink-3); }
.sm-todo:empty { display: none; }

/* ---------- the try-it cards ---------- */
.tryit { border: 2px solid var(--y-stripe); border-radius: 6px; padding: 0.9rem 1.1rem 1rem; max-width: 46rem; background: var(--box); }
.play-tag { display: inline-block; font-size: 0.722rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--paper); background: var(--ink); border-radius: 3px; padding: 0.1rem 0.45rem; margin: 0 0 0.45rem !important; }
.tryit p { margin: 0 0 0.5rem; }
.ch-list { margin: 0.4rem 0 0.6rem; padding: 0; list-style: none; display: grid; gap: 0.5rem; counter-reset: ch; }
.ch { border: 1px solid var(--rule); background: var(--paper); border-radius: 4px; padding: 0.55rem 0.75rem 0.5rem 2.6rem; position: relative; counter-increment: ch; }
.ch::before { content: counter(ch); position: absolute; left: 0.6rem; top: 0.5rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--ink-3); display: grid; place-items: center; font-weight: 800; font-size: 0.833rem; }
.ch.is-done { border-color: var(--ok); box-shadow: inset 0.3rem 0 0 var(--ok); }
.ch.is-done::before { content: '\2713'; border-color: var(--ok); background: var(--ok); color: var(--paper); }
.ch-t { font-weight: 800; margin: 0 0 0.25rem !important; }
.ch-obs { display: inline-block; font-size: 0.722rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; border: 1.5px solid var(--ink-2); color: var(--ink-2); border-radius: 3px; padding: 0 0.35rem; margin-right: 0.2rem; vertical-align: 0.12em; }
.ch-hint summary { cursor: pointer; font-weight: 700; color: var(--ink-2); font-size: 0.944rem; }
.ch-hint p { margin: 0.3rem 0 0.2rem !important; }
.ch-done { margin: 0.2rem 0 0 !important; font-weight: 700; color: var(--ok); }
.ch-done:empty { display: none; }
.ch-count { font-weight: 800; }
.ch-talk { border-top: 1px dashed var(--rule); padding-top: 0.55rem; }
