/* Shared look for every toy: Pico CSS plus these. */
:root { --pico-font-size: 95%; --ink: #1d4ed8; --hot: #dc2626; }
main { padding-top: 1rem; padding-bottom: 4rem; }
header p, .prose { max-width: 72ch; }
nav.top { margin-bottom: .5rem; }
nav.top a { text-decoration: none; }
.layout { grid-template-columns: minmax(0, 3fr) minmax(280px, 1.4fr); gap: 1.5rem; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.stage { position: relative; border: 1px solid var(--pico-muted-border-color); border-radius: .5rem; background: #fff; overflow: hidden; }
canvas { display: block; width: 100%; height: auto; touch-action: none; }
.stage canvas.draw { cursor: crosshair; }
.hint { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #999; pointer-events: none; text-align: center; }
.hint.hidden { display: none; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: .75rem 0; }
.row button { margin: 0; width: auto; }
.row label { margin: 0; }
fieldset.row label { display: inline-flex; gap: .3rem; }
.muted { color: #666; }
.equations { font-size: .78rem; white-space: pre-wrap; word-break: break-word; max-height: 18rem; overflow: auto; padding: .75rem; }
.stats { color: #666; min-height: 1.5em; }
aside h3 { margin-top: 1rem; margin-bottom: .5rem; }
/* the walk-through below each toy */
.explain { margin-top: 3rem; }
.step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; padding: 1.5rem 0; border-top: 1px solid var(--pico-muted-border-color); }
@media (max-width: 800px) { .step { grid-template-columns: 1fr; } }
.step h3 { margin-bottom: .4rem; }
.step .num { display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%; background: var(--ink); color: #fff; font-size: .8em; margin-right: .4em; }
.step figure { margin: 0; border: 1px solid var(--pico-muted-border-color); border-radius: .5rem; background: #fff; }
.step figcaption { font-size: .8rem; color: #666; padding: .3rem .6rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.facts article { margin: 0; }
.facts article h4 { margin-bottom: .3rem; }
.facts article p { margin: 0; font-size: .92rem; }
.formula { font-family: var(--pico-font-family-monospace); background: var(--pico-code-background-color); padding: .5rem .75rem; border-radius: .3rem; display: block; font-size: .85rem; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.reveal.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
/* home */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.cards article { margin: 0; display: flex; flex-direction: column; }
.cards article p { flex: 1; }
.cards .soon { opacity: .6; }
.readout { font-family: var(--pico-font-family-monospace); font-size: .9rem; }
