/* Playground page only. Shared look lives in ../assets/explainers.css. */

/* drawings: readable size on wide screens */
.page-sec .fig > svg, .win .bd svg { display: block; max-width: 560px; width: 100%; height: auto; margin-left: auto; margin-right: auto; }

/* picker buttons above a drawing */
.pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.pick .b95 { flex: 1 1 auto; min-height: 44px; }
.pick .b95.right { background: #c8f0c8; }
.pick .b95.wrong { background: #f6c8c8; }
.pick .b95:disabled { color: #000; opacity: 1; }
.say { font-size: 15px; line-height: 1.45; margin: 8px 0 0; }
.say ul { margin: 4px 0; padding-left: 20px; }
.say .cite, .win .cite { white-space: normal; }

/* range sliders */
label.f.slider { font-weight: normal; }
label.f.slider b { font-weight: bold; }
label.f.slider input[type=range] { display: block; width: 100%; height: 44px; margin: 0; accent-color: #1c7fc4; }

/* age sorter */
.sortcard .sortname { display: block; font: 900 22px/1.2 var(--black); margin: 2px 0; }
.sortout { margin-top: 8px; font-size: 15px; }

/* numbered key under a drawing */
ol.key { list-style: none; padding: 0; margin: 10px 0; counter-reset: k; }
ol.key li { counter-increment: k; position: relative; padding: 4px 0 8px 38px; }
ol.key li::before { content: counter(k); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border: 2px solid #000; border-radius: 50%; background: #ffff99; font: 900 14px/26px var(--sans); text-align: center; }

/* appropriate / inappropriate surfacing */
.okbox { border-color: var(--good); }
.okbox h3 { color: var(--good); }
.nobox { border-color: var(--bad); }
.nobox h3 { color: var(--bad); }
.okbox ul, .nobox ul { margin: 6px 0; padding-left: 20px; }

/* spot the hazards */
#spotsvg .spot { cursor: pointer; outline: none; }
#spotsvg .spot:focus-visible { stroke: #000080; stroke-width: 3; }

/* inspection checklist */
.checkrows { list-style: none; margin: 0; padding: 0; }
.checkrows li { display: grid; grid-template-columns: 32px 1fr; gap: 2px 8px; padding: 8px 0; border-bottom: 1px dotted #000; align-items: start; }
.checkrows li:last-child { border-bottom: 0; }
.checkrows input { width: 24px; height: 24px; margin: 2px 0 0; }
.checkrows label { cursor: pointer; }
.checkrows li.done label { color: #555; text-decoration: line-through; }

/* tool window title icons */
.win > .tb [data-px] { display: inline-flex; }


@media (prefers-reduced-motion: reduce) {
  .page-sec svg * { animation: none !important; transition: none !important; }
}

/* tall plan drawings stay on one screen */
#zsvg svg { max-height: 460px; }

/* covered / not covered */
.verdict { display: inline-block; font: 900 15px var(--black); padding: 3px 10px; margin: 0 8px 6px 0; border: 2px solid #000; box-shadow: 2px 2px 0 #000; }
.verdict.yes { background: #c8f0c8; }
.verdict.no { background: #f6c8c8; }

/* hazard cards */
.hazgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; margin-bottom: 8px; }
.hazbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; min-height: 44px; }
.hazbtn svg { width: 72px; height: 48px; }
.hazbtn span { font-size: 13px; line-height: 1.2; text-align: center; }

/* check yourself */
.checkq { border: 2px solid #000; background: #fffbe0; padding: 8px 10px; box-shadow: 3px 3px 0 #000; margin: 10px 0 16px; }
.checkq .qcard { margin: 8px 0; }

/* soft or hard */
#softgame > svg { margin-bottom: 8px; }

/* folded extra detail */
details.more { border: 2px solid #000; background: #fff; padding: 6px 10px; margin: 12px 0; box-shadow: 2px 2px 0 #000; }
details.more summary { font-weight: bold; min-height: 32px; display: flex; align-items: center; }
details.more ul { margin: 6px 0; padding-left: 20px; }

/* rule cards and standard cards */
.pgcard { border: 2px solid #000; background: #fff; padding: 8px 10px; box-shadow: 3px 3px 0 #000; }
.pgcard h3 { margin: 0 0 2px; font-size: 17px; }
.pgcard p { margin: 4px 0; }
.pgcard .meta { margin: 0 0 4px; }
.pgcard ul { margin: 4px 0; padding-left: 18px; }
.stdgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 12px 0; }
.two > p { margin: 0; }

/* hazard cards: all shown, icon beside the text */
.hazgrid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.hazcard { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: start; border: 2px solid #000; background: #fff; padding: 8px; box-shadow: 3px 3px 0 #000; }
.hazcard svg { width: 72px; height: 48px; }
.hazcard p { margin: 2px 0 0; font-size: 15px; }
