/* HOW TO PLAY (#330, ui/howto.js, data/howto.js): the page's own rules, beside the sheet's. It is a sheet in the frame (sheet.css `the frame`), so the side, the list, the foot and the way out are the frame's. Read after sheet.css (index.html).
   Nothing here is a length, a colour or a time of its own: the HUD's tokens (data/hud.js) and the rows of data/howto.js `look`, which ui/howto.js sets on the sheet as custom properties (tests/howto.test.mjs holds it). */

/* It lies over the pause it was opened from: the sheet under it is put away while it is up (it keeps its place, and the option that opened this has the keyboard when it is shut). */
.howto-screen:not([hidden]) { display: grid; }
html[data-howto] .panel-screen { visibility: hidden; }

/* the chosen chapter: its name, then its words (the design's .cap and .text) */
.howto-screen .sheet-body { display: flex; flex-direction: column; gap: var(--howto-cap-gap); }
.howto-screen .sheet-body:focus-visible { outline: var(--sheet-rule) solid var(--ink-faint); outline-offset: calc(-1 * var(--sheet-rule)); }
.howto-screen .cap { margin: 0; font: var(--weight-label) var(--size-label) / var(--sheet-label-lead) var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-dim); }
.howto-text { display: grid; gap: var(--howto-gap); max-width: var(--howto-measure); font: var(--weight-read) var(--howto-text-size) / var(--howto-lead) var(--font-text); color: var(--ink-dim); }
.howto-text p, .howto-text ul, .howto-text ol { margin: 0; }
.howto-text ul, .howto-text ol { display: grid; gap: var(--howto-list-gap); padding-left: var(--howto-indent); }
.howto-text .keydraw, .howto-text .howto-gesture { vertical-align: middle; margin: 0 var(--howto-key-air); }

/* a finger's gesture, where it has no control to draw: its face as a label, never as a key (a hold carries the weighted foot's rule under it) */
.howto-gesture { display: inline-block; font: var(--weight-label) var(--size-label) / var(--sheet-label-lead) var(--font-text); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink); }
.howto-gesture.hold { border-bottom: var(--sheet-rule) solid var(--ink-faint); }

/* Every key: the groups, and in each a row to a control: its keys at the left, then what it does */
.howto-controls { display: grid; gap: var(--howto-group-gap); max-width: var(--howto-measure); }
.howto-group ul { margin: 0; padding: 0; list-style: none; }
.howto-row { display: grid; grid-template-columns: var(--howto-key-w) minmax(0, 1fr); align-items: center; gap: 0 var(--howto-row-gap); padding: var(--howto-row-pad) 0; border-bottom: var(--sheet-foot-line) solid var(--rule); }
.howto-keys { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; }
.howto-says { font: var(--weight-read) var(--howto-text-size) / var(--howto-lead) var(--font-text); color: var(--ink-dim); }
