/* AusSci · Why have two parents? (Year 9): the "Why would that be?" boxes, the Explain it 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, .dia text.d-ital, .dia text.d-ital-s { paint-order: stroke; stroke: #fbfbf6; stroke-width: 3.4px; stroke-linejoin: round; }
.dia text.d-ital { font-size: 18px; font-weight: 700; font-style: italic; }
.dia text.d-ital-s { font-size: 13px; font-weight: 700; font-style: italic; fill: #2c3a34; }
.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; }
.dia text.d-lab-ws { font-size: 12.5px; font-weight: 700; fill: #ffffff; paint-order: stroke; stroke: rgba(15, 27, 51, 0.85); stroke-width: 3px; stroke-linejoin: round; }
.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 Explain it cards ---------- */
.link { border: 2px solid var(--y-stripe); border-radius: 8px; padding: 0.9rem 1.1rem 1rem; background: var(--box); max-width: 46rem; }
.link.is-done { box-shadow: inset 0.35rem 0 0 var(--ok); }
.link .play-tag { margin-bottom: 0.5rem !important; }
.link-recap { margin: 0 0 0.6rem; max-width: 42rem; font-weight: 700; color: var(--ink-2); }
.link-q { font-size: 1.111rem; margin: 0 0 0.7rem; max-width: 42rem; }
.link-part { border-top: 1px dashed var(--rule); padding-top: 0.7rem; margin-top: 0.7rem; max-width: 42rem; }
.link-part:not(.is-open) .link-list { opacity: 0.55; }
.link-h { font-weight: 800; margin: 0 0 0.5rem; }
.link-num { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--ink); font-size: 0.833rem; font-weight: 800; margin-right: 0.35rem; }
.link-part.is-done .link-num { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.link-list { list-style: none; margin: 0 0 0.2rem; padding: 0; display: grid; gap: 0.45rem; }
.link-opt { display: block; width: 100%; text-align: left; white-space: normal; line-height: 1.4; padding: 0.5rem 0.8rem; }
.link-opt[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.link-part.is-done .link-opt[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.link-opt:disabled { cursor: not-allowed; }
.link-opt[aria-pressed="true"]:disabled { opacity: 1; }
.link-fb { margin: 0.55rem 0 0; font-weight: 700; color: var(--ink-2); }
.link-fb:empty { display: none; }
.link-part.is-done .link-fb { color: var(--ok); }
.link-sum { margin: 0.9rem 0 0; padding: 0.6rem 0.8rem; border-left: 0.35rem solid var(--ok); background: var(--paper); font-weight: 700; max-width: 42rem; }
.link-sum[hidden] { display: none; }
.link-book { margin: 0.8rem 0 0; border-top: 1px dashed var(--rule); padding-top: 0.6rem; max-width: 42rem; }
@media (max-width: 640px) { .link { padding: 0.7rem 0.7rem 0.8rem; } .link-q { font-size: 1.056rem; } }

/* ---------- controls ---------- */
.ctl .label { margin-bottom: 0.3rem; }
.ctl + .ctl, .ctl + .lab-run, .ctl + .rp-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; }
.rp-about { margin: 0.6rem 0 0; max-width: 44rem; }
.rp-about:empty { display: none; }

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

/* ---------- safety notes on a screen ---------- */
.care { border: 2px solid #c8323a; border-radius: 8px; padding: 0.7rem 0.9rem; background: var(--box); max-width: 46rem; margin: 1rem 0; }
.care p { margin: 0; }

/* ---------- the method box on screen 1 ---------- */
.method { border: 1px dashed var(--ink-3); border-radius: 4px; padding: 0.9rem 1.1rem; max-width: 46rem; background: var(--soft); }
.method p { margin: 0; }

/* ---------- the "Why would that be?" boxes ---------- */
.why { border: 2px solid var(--y-stripe); border-radius: 8px; padding: 0.9rem 1.1rem 1rem; background: var(--box); max-width: 46rem; }
.why.is-done { box-shadow: inset 0.35rem 0 0 var(--ok); }
.why .play-tag { margin-bottom: 0.5rem !important; }
.why-recap { margin: 0 0 0.6rem; font-weight: 700; color: var(--ink-2); max-width: 42rem; }
.why-fact { margin: 0 0 0.7rem; max-width: 42rem; }
.why-q { display: block; font-size: 1.111rem; font-weight: 800; margin: 0 0 0.4rem; max-width: 42rem; }
.why textarea { display: block; width: 100%; max-width: 42rem; font: inherit; padding: 0.5rem 0.6rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); resize: vertical; }
.why textarea:disabled { opacity: 0.55; cursor: not-allowed; }
.why-count { margin: 0.35rem 0 0; color: var(--ink-2); }
.why-count:empty { display: none; }
.why-act { margin: 0.6rem 0 0; }
.why-act .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.why-reason { margin: 0.8rem 0 0; padding: 0.7rem 0.9rem; border-left: 0.35rem solid var(--ok); background: var(--paper); max-width: 42rem; }
.why-reason[hidden] { display: none; }
.why-reason p { margin: 0 0 0.5rem; }
.why-jq { font-weight: 800; }
.why .seg .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.why .seg .btn:disabled { cursor: not-allowed; }
.why .seg .btn:disabled:not([aria-pressed="true"]) { opacity: 0.55; }
.why-fb { margin: 0.55rem 0 0 !important; font-weight: 700; color: var(--ok); }
.why-fb:empty { display: none; }
@media (max-width: 640px) { .why { padding: 0.7rem 0.7rem 0.8rem; } }

/* ---------- lists and groups under the simulations ---------- */
.rp-pick { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: end; margin-top: 0.6rem; }
.rp-pick .ctl { margin: 0; max-width: 100%; min-width: 0; }
.rp-pick label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.rp-pick select { font: inherit; padding: 0.3rem 0.5rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); min-width: 11rem; max-width: 100%; }
.rp-pick select:disabled { opacity: 0.55; }
.rp-pick .lab-run { margin-top: 0; }
.rp-groups { margin-top: 0; }
.rp-groups .btn { white-space: normal; text-align: left; }
.rp-tq { margin: 0.8rem 0 0; border-top: 1px dashed var(--rule); padding-top: 0.7rem; max-width: 46rem; }
.rp-tq[hidden] { display: none; }
.rp-tq-fb { margin: 0.5rem 0 0; font-weight: 700; color: var(--ink-2); }
.rp-tq-fb:empty { display: none; }
