/* AusSci · Can you teach Pip about light? (Year 5): the simulations' drawings and controls, the teach-Pip blocks and
   the method box. Drawings are on a light plate with fixed colours in light and dark mode alike. Right and wrong each have
   a colour, and every tag also says 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: #34423c; }
.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: 14px; font-weight: 700; }
.dia text.d-lab-s { font-size: 12.5px; font-weight: 700; fill: #2c3a34; }
.dia text.d-lab-b { font-size: 15px; font-weight: 800; }
.dia text.d-big { font-size: 20px; font-weight: 800; }
.dia text.d-lab-w { font-size: 13px; font-weight: 800; fill: #ffffff; stroke: rgba(21, 35, 29, 0.75); 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; }

/* ---------- the method box and the Pip-says box ---------- */
.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; }
.method p + p, .method ol { margin-top: 0.55rem; }
.method ol { padding-left: 1.3rem; display: grid; gap: 0.2rem; }
.pip-says { border: 1px solid var(--rule); border-left: 0.35rem solid var(--y-stripe); border-radius: 4px; background: var(--box); padding: 0.8rem 1rem; max-width: 46rem; }
.pip-says p { margin: 0; }
.pip-says p + p { margin-top: 0.45rem; }
.big-q { font-size: 1.111rem; font-weight: 800; }

/* ---------- controls ---------- */
.ctl .label { margin-bottom: 0.3rem; }
.ctl-range label { display: block; font-size: 0.889rem; font-weight: 700; margin-bottom: 0.2rem; }
.ctl-range output { font-weight: 800; color: var(--y-deep); margin-left: 0.25rem; }
.ctl-range input[type="range"] { width: 100%; max-width: 36rem; accent-color: var(--accent); min-height: 2rem; }
.ctl-range input[type="range"]:disabled { opacity: 0.4; cursor: not-allowed; }
.lab-run { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; }
.lab-run .btn[hidden], .ctl[hidden] { display: none; }
.seg { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.seg .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; }

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

/* ---------- the clickable drawing, the teach-Pip tables and Pip’s test ---------- */
.art .art-svg { touch-action: manipulation; }
.teach { margin-top: 1rem; border-top: 1px dashed var(--rule); padding-top: 0.8rem; }
.teach .seg .btn { text-align: left; }
.teach-table .seg .btn { padding: 0.25rem 0.6rem; font-size: 0.889rem; }
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; max-width: 46rem; font-size: 0.944rem; }
table.data th, table.data td { border: 1px solid var(--rule); padding: 0.35rem 0.5rem; text-align: left; vertical-align: middle; }
table.data thead th { background: var(--soft); font-size: 0.833rem; }
table.data tbody th { font-weight: 700; }
table.data tr.is-right td:first-child, table.data tr.is-right th { box-shadow: inset 0.3rem 0 0 #1f7a4d; }
table.data tr.is-wrong th { box-shadow: inset 0.3rem 0 0 #b5401f; }
.verdict { display: block; font-size: 0.833rem; font-weight: 700; margin-top: 0.2rem; max-width: 14rem; }
.verdict:empty { display: none; }
tr.is-right .verdict { color: var(--ok); }
tr.is-wrong .verdict { color: var(--bad); }
.seg-row .btn { padding: 0.25rem 0.6rem; font-size: 0.889rem; }
