/* AusSci · Can a table push? (Year 7): votes, force arrows, the spring, boards, table, force meter, friction and trolley.
   Diagrams are drawn on a paper-coloured plate with fixed ink colours, in light and dark mode alike.
   Charts are drawn on the page surface and take their own light and dark colours from the --viz variables. */

.section-title { font-size: 1.333rem; font-weight: 800; margin: 0; }
.dia { display: block; width: 100%; height: auto; font-family: 'Atkinson Next', system-ui, sans-serif; }
.plate { background: #fbfbf6; border: 1px solid #d8ded9; border-radius: 4px; color: #15231d; }
.dia text { fill: #15231d; }
.d-lab { font-size: 13px; fill: #34423c; }
.d-small { font-size: 11.5px; fill: #34423c; }
.d-strong { font-weight: 800; }
.ctl .label { margin-bottom: 0.3rem; }
.ctl-row { display: flex; flex-wrap: wrap; gap: 0.7rem 1.4rem; align-items: flex-end; }
.stage { max-width: 32rem; }
.stage-wide { max-width: 38rem; }
.tbl-scroll { overflow-x: auto; }
.lab-run { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.done-mark { color: var(--ok); font-weight: 800; }
.seg .btn[aria-pressed="true"] .done-mark { color: inherit; }

/* ---------- force arrows and the things they act on ---------- */
.fa { stroke-width: 5; stroke-linecap: butt; fill: none; }
.fa-head { stroke: none; }
.fa-weight { stroke: #8a3fb0; } .fa-head.fa-weight { fill: #8a3fb0; }
.fa-support { stroke: #1f6fbf; } .fa-head.fa-support { fill: #1f6fbf; }
.fa-push { stroke: #1b7f5a; } .fa-head.fa-push { fill: #1b7f5a; }
.fa-friction { stroke: #c75b00; } .fa-head.fa-friction { fill: #c75b00; }
.dia .fa-t { font-size: 12.5px; font-weight: 800; }
.dia .fa-t.fa-weight { fill: #6f2f92; stroke: none; }
.dia .fa-t.fa-support { fill: #18589a; stroke: none; }
.dia .fa-t.fa-push { fill: #13644a; stroke: none; }
.dia .fa-t.fa-friction { fill: #9a4500; stroke: none; }
.halo { paint-order: stroke; stroke: #fbfbf6; stroke-width: 3.5px; stroke-linejoin: round; }
.ground { fill: #e6e9e3; stroke: #6f7b80; stroke-width: 1.5; }
.wood { fill: #d9b98a; stroke: #8a6a3c; stroke-width: 1.5; stroke-linejoin: round; }
.wood-dark { fill: #b98f58; stroke: #7a5a30; stroke-width: 1.5; stroke-linejoin: round; }
.book { fill: #3f6fa8; stroke: #244a78; stroke-width: 1.5; stroke-linejoin: round; }
.book-pages { fill: #f4f1e6; stroke: #244a78; stroke-width: 1; }
.skin { fill: #e3b08a; stroke: #8a5a3a; stroke-width: 1.5; stroke-linejoin: round; }
.coil { fill: none; stroke: #5d6f77; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.foam { fill: #f3dc7a; stroke: #b39a2e; stroke-width: 1.5; }
.foam-dot { fill: #d9bf4e; }
.metal { fill: #c9d0d2; stroke: #6f7b80; stroke-width: 1.5; stroke-linejoin: round; }
.thin { stroke: #6f7b80; stroke-width: 1; fill: none; }
.rule-tick { stroke: #34423c; stroke-width: 1; }
.dim { stroke: #34423c; stroke-width: 1; fill: none; }
.beam { stroke: #d03b3b; stroke-width: 1.6; fill: none; }
.beam-old { stroke: #d03b3b; stroke-width: 1; fill: none; opacity: 0.35; }
.spot { fill: #d03b3b; }
.mirror { fill: #cfe3ee; stroke: #5d6f77; stroke-width: 1.5; }
.wall { fill: #e6e9e3; stroke: #6f7b80; stroke-width: 1.5; }
.inset { fill: #ffffff; stroke: #6f7b80; stroke-width: 1.2; }
.pt { fill: #9fb4c8; stroke: #4c6480; stroke-width: 1; }
.bond { stroke: #7c8790; stroke-width: 1.2; fill: none; }
.earth { fill: #cfe6d6; stroke: #3f7d55; stroke-width: 2; }
.earth-core { fill: #3f7d55; }
.person { stroke: #15231d; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.person-head { fill: #15231d; }
.body { fill: #c9d0d2; stroke: #51615a; stroke-width: 1.5; }
.bristle { stroke: #5d4a2e; stroke-width: 2; stroke-linecap: round; fill: none; }
.rough { fill: #d9b98a; stroke: #8a6a3c; stroke-width: 1.2; stroke-linejoin: round; }
.rough-top { fill: #a9bfd6; stroke: #4c6480; stroke-width: 1.2; stroke-linejoin: round; }
.grit { fill: #b98f58; stroke: #7a5a30; stroke-width: 1; }
.track { stroke: #6f7b80; stroke-width: 3; }
.wheel { fill: #34423c; }
.cart { fill: #c9d0d2; stroke: #51615a; stroke-width: 1.5; }
.load { fill: #8d99a1; stroke: #51615a; stroke-width: 1.2; }
.trail { fill: none; stroke: #34423c; stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.trail-push { fill: none; stroke: #1b7f5a; stroke-width: 3.5; stroke-linecap: round; }
.ball { fill: #c8372b; stroke: #8f241b; stroke-width: 1.5; }
.floor-grid { stroke: #dfe4de; stroke-width: 1; }
.cord { stroke: #34423c; stroke-width: 2; }
.shade { fill: #f0cf2e; stroke: #a37e00; stroke-width: 1.5; stroke-linejoin: round; }
.box { fill: #d9b98a; stroke: #8a6a3c; stroke-width: 1.5; }
.meter-tube { fill: #ffffff; stroke: #5d6f77; stroke-width: 1.5; }
.meter-pointer { fill: #d03b3b; }
.mass { fill: #8d99a1; stroke: #51615a; stroke-width: 1.2; }

/* ---------- votes ---------- */
.votes { display: grid; gap: 0.8rem; }
.vote { border: 1px solid var(--rule); border-left: 0.35rem solid var(--y-stripe); border-radius: 3px; padding: 0.6rem 0.9rem 0.75rem; margin: 0; background: var(--box); max-width: 44rem; }
.vote legend { font-weight: 800; padding: 0 0.3rem; }
.vote-row { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; align-items: center; }
.vote-row + .vote-row { margin-top: 0.5rem; }
.vote-row .label { margin: 0 0.4rem 0 0; }
.vote label { display: inline-flex; align-items: center; gap: 0.35rem; }
.vote input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.vote-saved { margin: 0.5rem 0 0; font-weight: 700; color: var(--ok); }
.preds { display: grid; gap: 0.7rem; max-width: 44rem; }
.preds fieldset { border: 1px solid var(--rule); border-radius: 3px; padding: 0.55rem 0.9rem 0.7rem; margin: 0; background: var(--box); }
.preds legend { font-weight: 700; padding: 0 0.3rem; }
.preds label { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 1.1rem; }
.preds input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* ---------- controls ---------- */
.stepper { display: inline-flex; align-items: center; gap: 0.25rem; }
.stepper .btn { min-width: 2.4rem; min-height: 2.4rem; padding: 0; font-size: 1.2rem; font-weight: 800; line-height: 1; }
.stepper output { min-width: 3.6rem; text-align: center; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.slider { display: grid; gap: 0.2rem; max-width: 22rem; }
.slider input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 2rem; }
.slider output { font-weight: 800; font-variant-numeric: tabular-nums; }
.toggles { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem; padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.frow:first-child { border-top: 0; }
.frow-name { font-weight: 800; margin: 0; }
.frow-set { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; }
.frow select { font: inherit; padding: 0.3rem 0.5rem; border: 1px solid var(--ink-3); border-radius: 4px; background: var(--box); color: var(--ink); min-height: 2.4rem; }
.frow .fb-line { margin: 0; font-weight: 700; }
.frow .fb-line.ok { color: var(--ok); }
.frow .fb-line.no { color: var(--bad); }
.dirs .btn { min-width: 2.4rem; min-height: 2.4rem; padding: 0 0.3rem; font-size: 1.1rem; }

/* ---------- tables ---------- */
table.rec { border-collapse: collapse; width: 100%; max-width: 30rem; font-size: 0.889rem; }
table.rec caption { text-align: left; font-weight: 800; padding-bottom: 0.3rem; }
table.rec th, table.rec td { border: 1px solid var(--rule); padding: 0.35rem 0.5rem; text-align: left; font-variant-numeric: tabular-nums; }
table.rec thead th { font-size: 0.778rem; background: var(--soft); }
table.rec td.none { color: var(--ink-3); }
table.rec.wide { max-width: 40rem; }
table.rec th[scope="row"] { white-space: nowrap; }
.key-dot { display: inline-block; width: 0.9rem; height: 0.2rem; border-radius: 1px; vertical-align: middle; margin-right: 0.4rem; background: var(--viz-s1); }
.key-dot.s2 { background: var(--viz-s2); } .key-dot.s3 { background: var(--viz-s3); }

/* ---------- charts ---------- */
/* the colours are set on the whole simulation box, because the legend and the table keys are outside .viz */
.lab, .viz { --viz-surface: var(--box); --viz-ink: var(--ink); --viz-ink-2: var(--ink-2); --viz-muted: var(--ink-3); --viz-grid: #e3e8e4;
  --viz-s1: #2a78d6; --viz-s2: #eb6834; --viz-s3: #1baf7a; --viz-yes: #2a78d6; --viz-no: #e34948; --viz-mid: #9aa3a0; }
@media (prefers-color-scheme: dark) {
  .lab, .viz { --viz-grid: #26332d; --viz-s1: #3987e5; --viz-s2: #d95926; --viz-s3: #199e70; --viz-yes: #3987e5; --viz-no: #e66767; --viz-mid: #7c8a84; }
}
.viz { position: relative; max-width: 34rem; }
.viz svg { display: block; width: 100%; height: auto; font-family: 'Atkinson Next', system-ui, sans-serif; overflow: visible; }
.viz-title { margin: 0 0 0.3rem; font-weight: 800; font-size: 0.944rem; }
.viz .v-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz .v-axis { stroke: var(--viz-muted); stroke-width: 1; }
.viz .v-tick { fill: var(--viz-ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.viz .v-name { fill: var(--viz-ink-2); font-size: 12.5px; font-weight: 700; }
.viz .v-note { fill: var(--viz-ink-2); font-size: 12px; }
.viz .v-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz .v-s1 { stroke: var(--viz-s1); } .viz .v-s2 { stroke: var(--viz-s2); } .viz .v-s3 { stroke: var(--viz-s3); }
.viz .v-dot { stroke: var(--viz-surface); stroke-width: 2; }
.viz .v-dot.v-s1 { fill: var(--viz-s1); } .viz .v-dot.v-s2 { fill: var(--viz-s2); } .viz .v-dot.v-s3 { fill: var(--viz-s3); }
.viz .v-fit { stroke: var(--viz-muted); stroke-width: 1.5; fill: none; }
.viz .v-cross { stroke: var(--viz-muted); stroke-width: 1; }
.viz .v-mark { stroke: var(--viz-muted); stroke-width: 1; }
.viz .v-hit { fill: transparent; stroke: none; cursor: default; }
.viz .v-hit:focus { outline: none; }
.viz .v-hit:focus-visible + .v-ring, .viz .v-hit:hover + .v-ring { opacity: 1; }
.viz .v-ring { fill: none; stroke: var(--viz-ink); stroke-width: 1.5; opacity: 0; pointer-events: none; }
.viz-tip { position: absolute; z-index: 3; pointer-events: none; background: var(--viz-ink); color: var(--viz-surface); border-radius: 4px; padding: 0.3rem 0.5rem; font-size: 0.778rem; line-height: 1.35; white-space: nowrap; transform: translate(-50%, -100%); }
.viz-tip b { font-weight: 800; }
.viz-tip .tip-key { display: inline-block; width: 0.8rem; height: 0.18rem; vertical-align: middle; margin-right: 0.35rem; border-radius: 1px; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0.4rem 0 0; padding: 0; list-style: none; font-size: 0.833rem; color: var(--viz-ink-2); }

/* the votes: one row for each case, with a dot on a scale from sure it doesn't to sure it does */
.vrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; max-width: 40rem; }
.vrow { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 0.2rem 0.8rem; align-items: center; padding: 0.35rem 0; border-top: 1px solid var(--rule); }
.vrow:first-child { border-top: 0; }
.vrow-name { margin: 0; font-weight: 700; }
.vrow-vote { margin: 0; font-size: 0.889rem; color: var(--ink-2); }
.vrow svg { width: 11rem; height: auto; display: block; overflow: visible; }
.vrow .vs-line { stroke: var(--viz-grid); stroke-width: 1; }
.vrow .vs-mid { stroke: var(--viz-muted); stroke-width: 1; }
.vrow .vs-dot { stroke: var(--viz-surface); stroke-width: 2; }
.vrow .vs-yes { fill: var(--viz-yes); } .vrow .vs-no { fill: var(--viz-no); } .vrow .vs-unsure { fill: var(--viz-mid); }
.vscale { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 0 0.8rem; max-width: 40rem; font-size: 0.722rem; color: var(--ink-3); }
.vscale span { display: flex; justify-content: space-between; }
.vscale i { font-style: normal; font-weight: 700; }
.tn-grid { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1rem 1.4rem; align-items: start; }
.tn-first .label, .tn-votes .label { margin-bottom: 0.3rem; }

@media (max-width: 640px) {
  .vrow, .vscale { grid-template-columns: minmax(0, 1fr); }
  .vscale span { max-width: 11rem; }
  .tn-grid { grid-template-columns: minmax(0, 1fr); }
  table.rec { font-size: 0.833rem; }
  table.rec th, table.rec td { padding: 0.3rem 0.35rem; }
}
