/* AusSci · How do things move? (Foundation): the movement cards, the simulations' drawings and controls, the group
   buttons, the try-it cards and the table of predictions. Drawings are on a light plate with fixed colours in light
   and dark mode alike. Every group's colour 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: #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: 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 movement cards ---------- */
.moves { border: 2px solid var(--y-stripe); border-radius: 8px; padding: 0.9rem 1.1rem 1rem; background: var(--box); max-width: 50rem; }
.moves.is-done { box-shadow: inset 0.35rem 0 0 var(--ok); }
.moves-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; margin-bottom: 0.6rem; }
.moves-head .play-tag { margin: 0 !important; }
.moves-title { margin: 0; font-weight: 800; color: var(--ink-2); }
.move-card { margin: 0; }
.move-pic { border-radius: 6px; overflow: hidden; border: 1px solid #d8ded9; background: #fbfbf6; }
.moves:not(.is-live) .move-pic { display: none; }
.move-lead { margin: 0.7rem 0 0.3rem; font-weight: 700; color: var(--ink-2); }
.move-steps { margin: 0; padding-left: 1.4rem; font-size: 1.222rem; line-height: 1.5; font-weight: 500; max-width: 42rem; }
.move-steps li + li { margin-top: 0.3rem; }
.move-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; margin-top: 0.8rem; }
.move-nav:empty { display: none; }
.move-nav [data-mv="done"][aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: var(--paper); }
.move-said { font-weight: 700; color: var(--ink-2); }
.move-said:empty { display: none; }
@media (max-width: 640px) { .moves { padding: 0.7rem 0.7rem 0.8rem; } .move-steps { font-size: 1.111rem; } }

/* ---------- controls ---------- */
.ctl .label { margin-bottom: 0.3rem; }
.ctl + .ctl, .ctl-row + .lab-run, .ctl + .lab-run { margin-top: 0.6rem; }
.ctl-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; }
.ctl-row .ctl + .ctl { margin-top: 0; }
.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"] { 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; }

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

/* ---------- screen 1: the group buttons, each with its colour and its word ----------
   The four colours were checked with a palette validator as a set, on the drawing's light plate and on the dark page;
   every button and mat also has its word. */
.grp-ctl { margin-top: 0.8rem; }
.grp-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.grp { border-left-width: 0.5rem; border-radius: 6px; font-weight: 800; padding: 0.4rem 0.9rem; }
.grp-rolls { border-left-color: #2a78d6; }
.grp-slides { border-left-color: #e0662a; }
.grp-spins { border-left-color: #1baf7a; }
.grp-bounces { border-left-color: #c0408a; }
.grp[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-top-color: var(--ink); border-right-color: var(--ink); border-bottom-color: var(--ink); }
.grp[aria-pressed="true"]::after { content: ' \2713'; }

/* ---------- screen 6: the table of predictions ---------- */
.pt-wrap { margin-top: 0.8rem; overflow-x: auto; max-width: 46rem; }
.pt { border-collapse: collapse; width: 100%; font-size: 1rem; }
.pt caption { text-align: left; font-weight: 800; margin-bottom: 0.3rem; }
.pt th, .pt td { border: 1px solid var(--rule); padding: 0.35rem 0.6rem; text-align: left; }
.pt thead th { background: var(--box); font-size: 0.889rem; }
.pt td.pt-yes { color: var(--ok); font-weight: 800; }
.pt td.pt-no { color: var(--ink-2); font-weight: 800; }
@media (max-width: 640px) { .pt { font-size: 0.889rem; } .pt th, .pt td { padding: 0.3rem 0.35rem; } .pt thead th { font-size: 0.833rem; } }

/* ---------- 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-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; }
