/* AusSci · Is it alive? (Year 3): the simulations' drawings and controls, the talk rules, the talk boxes and the tally
   of the group's talk. Drawings are on a light plate with fixed colours in light and dark mode alike. Right and wrong
   each have a colour, and every mark 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; }
.dia text.d-ok { fill: #1f7a4d; }
.dia text.d-bad { fill: #b5401f; }
.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; }

/* ---------- the method box and the talk rules ---------- */
.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; }
.rules { border: 2px solid var(--y-stripe); border-radius: 6px; padding: 0.9rem 1.1rem 1rem; max-width: 46rem; background: var(--box); }
.rules h3 { margin: 0 0 0.4rem; font-size: 1.111rem; }
.rules ol { margin: 0 0 0.6rem; padding-left: 1.5rem; display: grid; gap: 0.25rem; font-weight: 700; }
.rules p { margin: 0 0 0.5rem; }
.rules .rules-own { display: block; font-size: 0.889rem; font-weight: 700; margin: 0.6rem 0 0.2rem; }
.rules input[type="text"] { width: 100%; max-width: 34rem; font: inherit; padding: 0.4rem 0.55rem; border: 1px solid var(--ink-3); border-radius: 4px; background: var(--paper); color: var(--ink); }
.rules-done { font-weight: 700; color: var(--ok); margin: 0.4rem 0 0; min-height: 1.4em; }

/* ---------- controls ---------- */
.ctl .label { margin-bottom: 0.3rem; }
.ctl + .ctl { margin-top: 0.6rem; }
.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; }
.lab-run { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; margin-top: 0.6rem; }
.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"] { 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 ---------- */
.lc-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 0.8rem; }
.lc-main { max-width: 52rem; }
.lc-box { padding: 0.25rem; }
.lc-read { margin: 0.45rem 0 0; font-size: 0.889rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lc-status { min-height: 2.6em; font-size: 1.056rem; }
.lc-todo { margin: 0; color: var(--ink-3); }

/* ---------- the words beside a simulation: answers, stages and feedback ---------- */
.lc-words { margin-top: 0.8rem; border-top: 1px dashed var(--rule); padding-top: 0.7rem; max-width: 46rem; }
.lc-words p { margin: 0 0 0.45rem; }
.lc-words dl { margin: 0; display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 0.3rem 0.8rem; }
.lc-words dt { font-weight: 700; }
.lc-words dd { margin: 0; }
@media (max-width: 640px) { .lc-words dl { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } .lc-words dd { margin-bottom: 0.45rem; } }
.mark { display: inline-block; font-size: 0.833rem; font-weight: 800; padding: 0.05rem 0.4rem; border-radius: 3px; margin-right: 0.35rem; border: 1px solid currentColor; }
.mark-yes { color: var(--ok); }
.mark-no { color: var(--ink-2); }
.mark-once { color: #9a5a14; }
.mark-notyet { color: var(--y-deep); }
.mark-wait { color: var(--ink-3); font-weight: 700; border-style: dashed; }
:root[data-theme="dark"] .mark-once { color: #e0a868; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mark-once { color: #e0a868; } }
.fb-right { color: var(--ok); font-weight: 700; }
.fb-wrong { color: var(--bad); font-weight: 700; }
.find { margin-top: 0.8rem; border-top: 1px dashed var(--rule); padding-top: 0.7rem; max-width: 46rem; }
.find .big-q { margin: 0.2rem 0 0.4rem; }
.big-q { font-size: 1.111rem; font-weight: 800; }
.find ol { margin: 0.2rem 0 0.4rem; padding-left: 1.4rem; }
.find li.is-done { color: var(--ok); }

/* ---------- talk first, talk again ---------- */
.talk { border: 2px solid var(--y-stripe); border-radius: 6px; padding: 0.9rem 1.1rem 1rem; max-width: 46rem; background: var(--box); }
.talk-tag { display: inline-block; font-size: 0.722rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--paper); background: var(--y-deep); padding: 0.1rem 0.45rem; border-radius: 3px; margin: 0 0 0.35rem; }
.talk h3 { margin: 0 0 0.35rem; font-size: 1.222rem; }
.talk p { margin: 0 0 0.5rem; }
.talk-say { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.2rem 0 0.7rem; padding: 0; list-style: none; }
.talk-say li { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.944rem; }
.talk-pick { border: 0; margin: 0 0 0.6rem; padding: 0; }
.talk-pick legend { font-weight: 800; padding: 0; margin-bottom: 0.35rem; }
.talk-pick label { display: flex; gap: 0.55rem; align-items: center; border: 1px solid var(--rule); background: var(--paper); border-radius: 4px; padding: 0.4rem 0.6rem; margin-bottom: 0.3rem; cursor: pointer; max-width: 34rem; }
.talk-pick label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0.3rem 0 0 var(--y-stripe); font-weight: 700; }
.talk-pick input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); flex: none; }
.talk-why-l { display: block; font-weight: 800; margin: 0.2rem 0 0.25rem; }
.talk textarea { width: 100%; max-width: 44rem; min-height: 4em; font: inherit; padding: 0.5rem 0.6rem; border: 1px solid var(--ink-3); border-radius: 4px; background: var(--paper); color: var(--ink); }
.talk-hint { min-height: 1.4em; margin: 0.35rem 0 0 !important; font-weight: 700; color: var(--ink-2); }
.talk-hint.is-good { color: var(--ok); }
.talk-before { font-size: 0.944rem; color: var(--ink-2); }
.talk-before:empty { display: none; }
.talk-check { margin-top: 0.7rem; border-top: 1px dashed var(--rule); padding-top: 0.6rem; }
.talk-check .label { margin-bottom: 0.3rem; }
.talk-check label { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.25rem; cursor: pointer; }
.talk-check input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }

/* ---------- the tally of the group's talk on screen 6 ---------- */
.talk-tally { max-width: 46rem; }
.talk-tally p { margin: 0 0 0.45rem; }
.talk-tally .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: top; }
table.data thead th { background: var(--soft); font-size: 0.833rem; }
table.data tbody th { font-weight: 700; }
