/* app2/ui/menu-kit.css — the menu kit (UI-31, docs/specs/menu-kit.md): the one look of every menu, drop-down, picker,
   settings row and dialog. Two shells (a panel that drops down, a card on a page), one row with its cap column, one
   setting row, one grid of tiles, one row of swatches, one actions row, one field. Every number is a --menu-* token or the
   --s scale (tokens.css); every colour a theme token, so the kit wears every theme. The pieces are drawn by
   ui/components/menu-kit.js and nothing restyles an .mk- class outside this file (layout rule 10; the design guard). */

/* ---- the shells ---- */
.mk-box{box-sizing:border-box; color:var(--ink); font-family:var(--font); font-size:var(--fs-body); background:var(--sheet); border:1px solid var(--edge); border-radius:var(--r-card)}
.mk-box *, .mk-box *::before, .mk-box *::after{box-sizing:border-box}
/* a panel floats under its trigger: shadow, 8px above and below its rows, none at the sides (the rows carry their own) */
.mk-panel{position:fixed; z-index:60; width:var(--menu-panel-w); padding:var(--menu-pad-y) 0; box-shadow:var(--shadow-pop)}
.mk-panel.mk-over{z-index:90}   /* a panel opened from a card that floats over the page (the Daily's share menu over the close-out card, z 81) */
/* a panel with a part that scrolls inside it (mkScroll): the panel is a column, and only that part gives up height */
.mk-panel.mk-fit{display:flex; flex-direction:column}
.mk-panel.mk-fit > *{flex:none}
.mk-panel.mk-fit > .mk-scroll{flex:0 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; scroll-padding-block:var(--s2)}
/* a card sits on a page: a hairline, no shadow; as a dialog (.mk-dlg) it is centred over the scrim by the pop shell */
.mk-card{width:min(var(--menu-card-w), calc(100vw - var(--s8))); padding:var(--menu-pad-y) 0; border-color:var(--line)}
.mk-dlg{box-shadow:var(--shadow-backdrop)}
.mk-dlg.mk-rise{animation:mk-rise var(--d-claim-in) cubic-bezier(.2,.8,.2,1) both}   /* a dialog that comes in by transform (the claim card, screenplay 3.0's moment claim-in) */
@keyframes mk-rise{from{transform:translateY(var(--s3)) scale(.985)}}
/* a card that floats (the hotkeys pop-up): a card's width on a panel's shadow */
.mk-float{position:fixed; z-index:60; box-shadow:var(--shadow-pop); overflow:auto; overscroll-behavior:contain}

/* ---- head, group label, divider ---- */
.mk-head{display:flex; flex-direction:column; gap:var(--s1); padding:var(--s1) var(--menu-pad) var(--s2)}
.mk-head.row{flex-direction:row; align-items:center; justify-content:space-between; gap:var(--menu-gap)}
.mk-title{margin:0; font-size:var(--fs-body); font-weight:var(--fw-heavy); line-height:1.25}
.mk-sub{margin:0; font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2); line-height:1.3}
/* a status line at the right of a head ("Changes save as you go") */
.mk-head .mk-status{margin-left:auto; font-size:var(--fs-min); font-weight:var(--fw-semi); color:var(--ink-2); white-space:nowrap}
.mk-grp{padding:var(--s1) var(--menu-pad) 0; font-size:var(--fs-min); font-weight:var(--fw-bold); color:var(--ink-2); line-height:calc(var(--menu-cap-h) / 1.2)}
.mk-rule{height:1px; margin:var(--s1) 0; border:0; background:var(--line)}
.mk-note{margin:0; padding:0 var(--menu-pad) var(--s2); font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2); line-height:1.35}
.mk-note b{color:var(--ink); font-weight:var(--fw-heavy)}
.mk-note .ui-cap{--cap-fs:var(--fs-min)}
/* a text row: running words in the ink at the body size (Contact's who runs hotkey.gg) */
.mk-text{margin:0; padding:var(--s1) var(--menu-pad) var(--s2); font-size:var(--fs-body); line-height:var(--lh-body); color:var(--ink)}
/* a QR code to scan (two-step sign-in, PS-50): Supabase's picture, centred, at one size; the key under it as mono text to select */
.mk-qr{display:block; width:calc(var(--s8) * 5 * var(--k)); height:calc(var(--s8) * 5 * var(--k)); margin:0 auto var(--s2)}
.mk-secret{text-align:center; font-size:var(--fs-label)}
.mk-secret .mk-secret-k{color:var(--ink-2); font-weight:var(--fw-semi)}
.mk-secret code{font-family:var(--mono); user-select:all; word-break:break-all}
/* an error line: empty, and so not there, until something fails */
.mk-err{margin:0; padding:0 var(--menu-pad) var(--s1); font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--red); line-height:1.3}
.mk-err:empty{display:none}
.mk-foot{margin:var(--s1) 0 0; padding:var(--s2) var(--menu-pad) 0; border-top:1px solid var(--line); font-size:var(--fs-small); font-weight:var(--fw-semi); color:var(--ink-2); text-align:center}
.mk-foot a, .mk-link{color:var(--learn-ink); font-weight:var(--fw-bold); text-decoration:none}
.mk-foot a:hover, .mk-link:hover{text-decoration:underline}

/* ---- the row: a cap, the word, at most one short word at the right ---- */
.mk-row{display:flex; align-items:center; gap:var(--menu-gap); width:100%; min-height:var(--menu-row-h); padding:0 var(--menu-pad); border:0; background:none; color:var(--ink); font:inherit; font-weight:var(--fw-bold); text-align:left; text-decoration:none; cursor:pointer; white-space:nowrap}
.mk-row:focus-visible{background:var(--chrome); outline:none; box-shadow:inset var(--focus-w) 0 0 var(--cell-cursor)}   /* the keyboard's row (controls 2d): the hover's ground and the cursor's bar at its left edge, so it never reads as a second hover */
@media (hover:hover){ .mk-row:hover{background:var(--chrome)} }
/* the press (UI-52, Wolf 2026-11-06 "yes": menu rows and the top bar tabs press as the buttons do): a row is a band across its
   panel, so it never moves; a click, a tap, Enter or Space (button.js wirePress) fills it a shade darker until it lets go */
.mk-row:not([aria-disabled="true"]):is(:active, .is-pressed){background:var(--line)}
.mk-row.on:is(:active, .is-pressed){background:var(--learn-tint)}
/* the selected row (controls 2d): the brand's tint and its ink; a row that is one of a choice (a radio) carries the tick at its right */
.mk-row.on{background:var(--learn-tint); color:var(--learn-ink)}
.mk-row.on:is([role="radio"], [role="menuitemradio"])::after{content:"\2713"; margin-left:auto; font-weight:var(--fw-heavy)}
/* disabled (controls 2d, everywhere): the --ink-3 word, no hover, no pointer */
.mk-row[aria-disabled="true"]{color:var(--ink-3); cursor:default}
.mk-row[aria-disabled="true"]:hover{background:none}
.mk-row[aria-disabled="true"] .mk-cap{--cap-ink:var(--ink-3)}
.mk-name{flex:1 1 auto; min-width:0; overflow:visible}
.mk-word{flex:none; font-size:var(--fs-min); font-weight:var(--fw-semi); color:var(--ink-2)}
.mk-row.on .mk-word{color:inherit}
/* the cap column: the keycap kit's cap (components.css .ui-cap) in the 22px column, a quiet outlined key before its word,
   dark while Alt is held (.mk-alt on the panel) or when live */
.ui-cap.mk-cap{min-width:var(--menu-cap-w); height:var(--menu-cap-h); padding:0 var(--s1); --cap-fs:var(--fs-min); --cap-face:transparent; --cap-ink:var(--ink-2); --cap-rim:var(--edge)}
.mk-cap.dark, .mk-alt .mk-cap{--cap-face:var(--keytip); --cap-ink:var(--on-keytip); --cap-rim:var(--keytip)}
.mk-row.on .mk-cap{--cap-ink:currentColor; --cap-rim:currentColor}
/* a chord in a row or a hotkey row: caps joined by their marks, in the key's own face */
.mk-chord{display:inline-flex; flex-wrap:wrap; align-items:center; gap:var(--s1); flex:none}   /* a long chord (Alt+H+O+I) wraps inside its column rather than running into the name */

/* ---- the setting row: the name with one help line, the control at the right; .stack puts the control under the name ---- */
.mk-set{display:flex; align-items:center; justify-content:space-between; gap:var(--s4); min-height:var(--menu-set-h); padding:var(--s2) var(--menu-pad); border-top:1px solid var(--grid)}
.mk-set:first-of-type, .mk-head + .mk-set, .mk-grp + .mk-set{border-top:0}
.mk-set .w{display:flex; flex-direction:column; gap:var(--s1); min-width:0}
.mk-set .n{font-size:var(--fs-body); font-weight:var(--fw-bold); line-height:1.25}
.mk-set .v{font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink); line-height:1.3; overflow-wrap:anywhere}
.mk-set .h{font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2); line-height:1.3}
.mk-set .c{flex:none; display:flex; align-items:center; gap:var(--menu-gap)}
.mk-set.stack{flex-direction:column; align-items:stretch; gap:var(--s2)}
.mk-set.stack .c{align-self:flex-start; max-width:100%}

/* ---- the controls the rows carry: the site's switch (.ac-switch) and choice (.seg) keep their own files; here only the kit's own ---- */
.mk-act{display:flex; align-items:center; gap:var(--s3); padding:var(--s2) var(--menu-pad) var(--s1)}
.mk-act.end{justify-content:flex-end}
.mk-act.centre{justify-content:center}
.mk-act > [hidden]{display:none}
/* in a panel: Cancel is its word and its Esc cap with no side air (a quiet button has no box until hovered), a step less
   between the two; on the narrowest panel Cancel goes under the primary rather than past the edge */
.mk-panel .mk-act{gap:var(--s2); flex-wrap:wrap}
.mk-panel .mk-act .ui-btn-quiet{padding-left:0; padding-right:0}
.mk-field{display:flex; flex-direction:column; gap:var(--s1); padding:var(--s1) var(--menu-pad) var(--s2)}
/* the field's label and control are the field kit's (components.css .ui-field-label, .ui-field-in: the same type, edge,
   corners and focus ring); a box's fields keep the kit's shorter height. Its help and error lines stay the kit's own, a step
   smaller than the field kit's (--fs-label against --fs-small): a box is read at a glance, a page's form at length */
.mk-box, .mk-field{--field-h:var(--menu-in-h)}
.mk-field .h{font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2); line-height:1.3}
.mk-field .err{font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--red); line-height:1.3}

/* ---- the grid of tiles (the theme picker): five across, each a picture, its name, one sub line ---- */
.mk-grid{display:grid; grid-template-columns:repeat(var(--menu-tile-cols), var(--menu-tile-w)); gap:var(--s2) var(--menu-gap); padding:var(--s1) var(--menu-pad) var(--s2)}
@media (max-width:480px){ .mk-grid{--menu-tile-cols:4} }   /* a phone's card is narrower than five tiles: four across, the same tiles */
.mk-tile{display:flex; flex-direction:column; align-items:flex-start; gap:var(--s1); width:var(--menu-tile-w); padding:0; border:0; background:none; color:var(--ink); font:inherit; text-align:left; cursor:pointer}
.mk-tile b{font-size:var(--fs-label); font-weight:var(--fw-heavy); line-height:1.15; text-wrap:balance; overflow-wrap:anywhere}
.mk-tile small{font-size:var(--fs-min); font-weight:var(--fw-semi); color:var(--ink-2); line-height:1.2; text-wrap:balance}
.mk-tile:focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}   /* the one ring round the whole tile, its picture and its name (UI-71) */
/* the chosen tile (controls 2d): a 2px border in the cursor's green and a tick in its corner; under the pointer a 1px --edge */
.mk-tile.on .mk-pv{box-shadow:0 0 0 var(--bw-2) var(--cell-cursor)}
.mk-tile.on .mk-pv::after{content:"\2713"; position:absolute; top:var(--s1); right:var(--s1); display:grid; place-items:center; width:var(--s4); height:var(--s4); border-radius:50%; background:var(--cell-cursor); color:var(--learn-on); font-size:var(--fs-min); font-weight:var(--fw-heavy); line-height:1}
@media (hover:hover){ .mk-tile:not(.on, .locked):hover .mk-pv{border-color:var(--edge)} }
.mk-tile.locked .mk-pv{border-style:dashed; border-color:var(--edge)}
.mk-tile.locked b{color:var(--ink-2)}
/* the picture: the theme as the product, a top bar over a card and the sheet; the sheet is the one the theme's grid really draws
   (--tile-ws*, set by settings-page themeTiles from ui/themes.js gridTokens: white, or the dark themes' light sheet, BG-34), so the
   tile never promises a recoloured grid */
/* a tile's picture at its card's width (mkPreview: the theme in force, on Appearance's card) */
.mk-preview{--menu-tile-w:100%; --menu-tile-h:var(--menu-preview-h); display:flex; flex-direction:column; gap:var(--s2); margin:0}
.mk-preview figcaption{font-size:var(--fs-small); font-weight:var(--fw-semi); color:var(--ink-2)}
.mk-pv{position:relative; display:flex; flex-direction:column; width:var(--menu-tile-w); height:var(--menu-tile-h); border:1px solid var(--tile-grid, var(--line)); border-radius:var(--r-btn); background:var(--tile-bg, var(--paper)); overflow:hidden; transition:box-shadow var(--d-key)}
.mk-pv .bar{display:flex; align-items:center; gap:4%; height:22%; padding-left:6%; background:var(--tile-sheet, var(--sheet)); border-bottom:1px solid var(--tile-grid, var(--line))}
.mk-pv .bar i{display:block; width:14%; height:35%; border-radius:1px; background:var(--tile-fg, var(--ink))}
.mk-pv .bar i:first-child{width:18%; background:var(--tile-accent, var(--learn))}
.mk-pv .body{display:flex; flex:1; gap:5%; padding:6%}
.mk-pv .card{flex:1; background:var(--tile-sheet, var(--sheet)); border:1px solid var(--tile-grid, var(--line)); border-radius:var(--bw-2)}
.mk-pv .sheet{flex:1.3; background:var(--tile-ws, var(--sheet)); border:1px solid var(--tile-ws-line, var(--line)); border-radius:var(--bw-2); background-image:linear-gradient(var(--tile-ws-grid, var(--grid)) 1px, transparent 1px), linear-gradient(90deg, var(--tile-ws-grid, var(--grid)) 1px, transparent 1px); background-size:33% 33%}
.mk-pv .lock{position:absolute; top:var(--s1); right:var(--s1); width:var(--menu-lock); height:var(--menu-lock); border-radius:var(--bw-3); background:var(--ink-2); -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.2 4.6V3.2a1.8 1.8 0 0 1 3.6 0v1.4' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3Crect x='2' y='4.6' width='6' height='4.4' rx='0.9'/%3E%3C/svg%3E") center / contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.2 4.6V3.2a1.8 1.8 0 0 1 3.6 0v1.4' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3Crect x='2' y='4.6' width='6' height='4.4' rx='0.9'/%3E%3C/svg%3E") center / contain no-repeat}
/* the legend under the grid: the only printed key legend on the site (UI-22) */
.mk-legend{display:flex; flex-wrap:wrap; align-items:center; gap:var(--s1) var(--s3); margin:0; padding:0 var(--menu-pad) var(--s1); font-size:var(--fs-min); font-weight:var(--fw-semi); color:var(--ink-2)}
.mk-legend span{display:inline-flex; align-items:center; gap:var(--s1)}

/* ---- swatches: eight across in a card, four in a panel ---- */
.mk-dots{display:grid; grid-template-columns:repeat(var(--menu-dot-cols), var(--menu-dot)); gap:var(--menu-gap); padding:var(--s1) var(--menu-pad) var(--s2)}
.mk-panel .mk-dots, .mk-dlg .mk-dots{--menu-dot-cols:4}
/* the swatches across their box (the club look card, the start card; UI-103, Wolf 2026-11-16: "can we make the crests and
   colors not have that weird spacing"): even columns at the kit's gap that meet both edges of the box, each tile square in its
   column, so every group on the card sits in the same columns; a wide tile spans two (the tag styles); a field on the last
   row beside its swatch (mkDotsField) */
.mk-dots.fill, .mk-dots-field{grid-template-columns:repeat(var(--menu-dot-cols), minmax(0, 1fr))}
.mk-dots.fill > .mk-dot, .mk-dots-field .mk-dot{width:auto; height:auto; aspect-ratio:1}
.mk-dots.fill:has(> .mk-dot.wide){container-type:inline-size}   /* a wide tile reads its row height off the box (never on a subgrid: containment would cut it from its parent's columns) */
.mk-dots.fill > .mk-dot.wide{grid-column:span 2; aspect-ratio:auto; height:calc((100cqw - (var(--menu-dot-cols) - 1) * var(--menu-gap)) / var(--menu-dot-cols))}
.mk-dot.wide.locked{gap:var(--s1); grid-auto-flow:column; justify-content:center; font-weight:var(--fw-semi)}
.mk-dot.wide.locked .ui-li{width:var(--chip-icon); height:var(--chip-icon); stroke:currentColor}
.mk-dots-field{display:grid; gap:var(--menu-gap); padding:var(--s1) var(--menu-pad) var(--s2)}
.mk-dots-field > .mk-dots{grid-column:1 / -1; grid-row:1 / span var(--menu-dot-rows, 2); grid-template-columns:subgrid; grid-template-rows:subgrid; padding:0}
.mk-dots-field > .mk-field{grid-column:var(--menu-field-col, 2) / -1; grid-row:var(--menu-field-row, 2); align-self:center; margin:0; padding:0}
.mk-dot .ui-li{color:inherit; width:calc(var(--s5) * var(--k)); height:calc(var(--s5) * var(--k))}   /* a line mark on its tile */
.mk-dot{position:relative; display:grid; place-items:center; width:var(--menu-dot); height:var(--menu-dot); padding:0; border:0; border-radius:var(--r-btn); background:var(--dot, var(--chrome)); color:var(--dot-ink, var(--on-fill)); font:inherit; font-size:var(--fs-min); font-weight:var(--fw-heavy); cursor:pointer}
/* the chosen swatch (controls 2d): the tile's 2px border in the cursor's green (off the swatch by the sheet's 2px, so it never runs into the colour) and the tick at its corner */
.mk-dot.on{box-shadow:0 0 0 var(--bw-2) var(--sheet), 0 0 0 var(--s1) var(--cell-cursor)}
.mk-dot.on::after{content:"\2713"; position:absolute; top:calc(-1 * var(--s1)); right:calc(-1 * var(--s1)); display:grid; place-items:center; width:var(--s4); height:var(--s4); border-radius:50%; background:var(--cell-cursor); color:var(--learn-on); box-shadow:0 0 0 var(--bw-2) var(--sheet); font-size:var(--fs-min); font-weight:var(--fw-heavy); line-height:1}
@media (hover:hover){ .mk-dot:not(.on, .locked):hover{box-shadow:0 0 0 1px var(--edge)} }
.mk-dot:focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.mk-dot.locked{background:var(--chrome); color:var(--ink-2); border:1px dashed var(--edge); cursor:default}

/* ---- key and value rows (the Profile tab) ---- */
.mk-kv{display:grid; grid-template-columns:var(--menu-kv-w) minmax(0, 1fr) auto; align-items:center; gap:var(--s3); min-height:var(--menu-kv-h); padding:var(--s1) var(--menu-pad); border-top:1px solid var(--grid)}
.mk-kv:first-of-type, .mk-head + .mk-kv{border-top:0}
.mk-kv .k{font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2)}
.mk-kv .v{display:flex; align-items:center; gap:var(--menu-gap); min-width:0; font-size:var(--fs-body); font-weight:var(--fw-bold); overflow-wrap:anywhere}
.mk-kv > .a{justify-self:end}   /* the action keeps the right edge, a link under a switch as under a link (rule 2) */
.mk-kv.stack{grid-template-columns:minmax(0, 1fr) auto}
.mk-kv.stack .k{grid-column:1 / -1}
/* a stacked row's value is a column (an input stacks): the field, its line and the actions under it, on the row's own padding */
.mk-kv.stack .v{flex-direction:column; align-items:stretch}
.mk-kv .mk-field, .mk-kv .mk-act{padding-left:0; padding-right:0}

/* ---- hotkey rows (the Learn more pop-up): the chord column, then the name ---- */
.mk-popk{display:grid; grid-template-columns:var(--menu-chord-w) minmax(0, 1fr); align-items:center; gap:var(--menu-gap); min-height:var(--menu-row-h); padding:0 var(--menu-pad); font-size:var(--fs-small); font-weight:var(--fw-bold)}
/* two chords that do one thing share a row: past the column's width the second goes under the first, at its slash */
.mk-popk .mk-chord{flex-wrap:wrap; min-width:0; white-space:normal}

/* ---- chips that pick (the title picker) and rows that pick (Contact's topics) ---- */
.mk-picks{display:flex; flex-wrap:wrap; gap:var(--menu-gap); padding:var(--s1) var(--menu-pad) var(--s2)}
.mk-pick{display:inline-flex; align-items:center; gap:var(--s1); height:var(--chip-h-lg); padding:0 var(--s3); border:1px solid var(--edge); border-radius:var(--r-btn); background:var(--sheet); color:var(--ink); font:inherit; font-size:var(--fs-label); font-weight:var(--fw-bold); white-space:nowrap; cursor:pointer}
.mk-pick.on{background:var(--ink); border-color:var(--ink); color:var(--sheet)}
.mk-pick.locked{color:var(--ink-2); border-style:dashed; cursor:default}
.mk-pick:focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.mk-topic{display:flex; flex-direction:column; align-items:flex-start; gap:var(--s1); width:100%; min-height:var(--menu-set-h); padding:var(--s2) var(--menu-pad); border:0; border-top:1px solid var(--grid); background:none; color:var(--ink); font:inherit; text-align:left; cursor:pointer}
.mk-topic:first-child, .mk-head + .mk-topic{border-top:0}
.mk-topic .n{font-size:var(--fs-body); font-weight:var(--fw-bold); line-height:1.25}
.mk-topic .h{font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2); line-height:1.3}
.mk-topic:hover, .mk-topic:focus-visible{background:var(--chrome); outline:none}
.mk-topic.on{background:var(--learn-tint)}
.mk-topic.on .n{color:var(--learn-ink)}

/* ---- the choice inside a kit row: the site's segmented control on the kit's row height ---- */
.mk-box .seg{height:var(--menu-row-h)}
.mk-box .seg-btn{display:inline-flex; align-items:center; padding:0 var(--s3); white-space:nowrap}

/* ---- motion: a panel rises in over --d-menu (.mk-open once placed; not .mk-in, the field's input), opaque from the first frame; reduced motion shows it at once ---- */
.mk-panel{transform-origin:top right; opacity:0; transform:translateY(calc(-1 * var(--s1))) scale(.97); transition:opacity var(--d-menu), transform var(--d-menu)}
.mk-panel.mk-open, .mk-panel.mk-still{opacity:1; transform:none}
.mk-panel.mk-from-pointer{transform-origin:top left}   /* a menu opened at the pointer grows from the pointer */
@media (prefers-reduced-motion: reduce){ .mk-panel{transition:none; opacity:1; transform:none} .mk-dlg.mk-rise{animation:none} }

/* ==== THE POP-OUT CARD (PS-41; docs/specs/menu-kit.md "The pop-out card"; Wolf 2026-11-06 17:20) ====
   Every card over a scrim is this one card: a kit dialog (.mk-dlg: Sign in, Report, the leave prompt, ...),
   a moment (.cel: a level-up, the keep card, a time to beat, the welcome back, the terms gate) and the lesson door (.door).
   Its width is one of the kit's three sizes, set by data-size and nothing else: sm 320, md 420, lg 560 (times --k). Its air is --pop-pad on all four sides
   at every window size, its gap --pop-gap, its corner --r-pop. A dialog's rows carry their own side air (the menu kit's
   rows), so a dialog keeps the kit's --menu-pad-y over and under them. Nothing outside this block sets a pop-out card's
   width, height, padding, gap, corner or aspect, and no per-kind or per-state rule sets spacing on its pieces
   (tests/popcard-kit.test.js); a card that needs another size grows this block first, on Wolf's word. */
.ui-popcard{box-sizing:border-box; width:min(var(--pop-w-md), 100%); padding:var(--pop-pad); border-radius:var(--r-pop); background:var(--sheet); color:var(--ink); box-shadow:var(--pop-shadow, var(--shadow-backdrop)); font-family:var(--font)}
.ui-popcard[data-size="sm"]{width:min(var(--pop-w-sm), 100%)}
.ui-popcard[data-size="lg"]{width:min(var(--pop-w-lg), 100%)}
.ui-popcard:not(.mk-dlg){display:flex; flex-direction:column; align-items:center; text-align:center; gap:var(--pop-gap)}
.ui-popcard.mk-dlg{padding:var(--menu-pad-y) 0}
/* the card takes the focus as it opens: the site's focus ring and its corner (app.css [tabindex]:focus-visible) never reshape it */
.ui-popcard:focus, .ui-popcard:focus-visible{outline:none; border-radius:var(--r-pop)}
/* a moment's number in its mode's wash: a box of the mode's tint and line round the kit's counter (the time to beat, DY-13) */
.ui-popcard:not(.mk-dlg) .mk-check{justify-content:center; text-align:start}   /* a tick box in a centred card sits in the middle, its words still read from the left */
.ui-popcard .cel-nums[data-wash]{border:1px solid var(--wash-line); border-radius:var(--r-card); background:var(--wash-tint)}
.ui-popcard .cel-nums[data-wash="daily"]{--wash-line:var(--daily-line); --wash-tint:var(--daily-tint)}
/* the one foot (UI-63, mkPopFoot): main over second over the close, each the kit's md button at the foot's full width, --s3
   apart; at most two links on one centred row, then the note line. A dialog's foot keeps the rows' sides (--menu-pad); a
   moment's sits inside --pop-pad. An lg card's buttons are centred, no wider than an md card's inner width (K6 reads that
   as the lg foot's full width). Nothing else sets a foot's size, gap or order */
.ui-popfoot{display:flex; flex-direction:column; align-self:stretch; gap:var(--s3)}
.ui-popfoot[hidden]{display:none}
.ui-popfoot-btns{display:flex; flex-direction:column; gap:var(--s3)}
.ui-popfoot-btns > .ui-btn{display:flex; width:100%}
.ui-popcard.mk-dlg .ui-popfoot-btns{padding:var(--s2) var(--menu-pad) var(--s1)}
.ui-popcard.mk-dlg .ui-popfoot{gap:0}
.ui-popcard[data-size="lg"] .ui-popfoot-btns{align-self:center; width:min(100%, calc(var(--pop-w-md) - 2 * var(--pop-pad)))}
.ui-popcard:not(.mk-dlg) .ui-popfoot > .mk-act{padding:0}
/* ==== end of the pop-out card ==== */

/* ---- dialogs (Sign in, the claim card, Feedback, Report, Contact's card): a card over the pop shell's scrim (components/pop.js),
   centred, scrolling inside the scrim when it is taller than the window ---- */
.pop > .mk-dlg, .pop-out > .mk-dlg{margin:auto; flex:none}
/* the pop-out's motion (UI-52; components/pop.js): the scrim fades in, the card lifts --dlg-rise into place; on a close the shell
   is already gone for the page and the keys and only its picture, a copy with no ids, fades (.pop-out). The claim card keeps its own rise (mk-rise). Effects Off
   and reduced motion cut */
.pop{animation:pop-scrim-in var(--d-scrim-in) linear both}
.pop > .mk-dlg:not(.mk-rise){animation:pop-card-in var(--d-dlg-in) var(--ease-out) both}
.pop-out{pointer-events:none; animation:pop-scrim-out var(--d-dlg-out) linear both}
.pop-out > .mk-dlg{animation:pop-card-out var(--d-dlg-out) var(--ease-in) both}
@keyframes pop-scrim-in{from{opacity:0}}
@keyframes pop-scrim-out{to{opacity:0}}
@keyframes pop-card-in{from{opacity:0; transform:translateY(var(--dlg-rise)) scale(var(--dlg-from))}}
@keyframes pop-card-out{to{opacity:0; transform:translateY(calc(var(--dlg-rise) / 2))}}
html[data-effects="off"] :is(.pop, .pop > .mk-dlg){animation:none}
@media (prefers-reduced-motion: reduce){ :is(.pop, .pop > .mk-dlg){animation:none} }
/* a field's input with a control beside it (the claim card's chip and Suggest one), or inside it at its right (.inset: the password's eye) */
.mk-in-wrap{display:flex; align-items:center; gap:var(--menu-gap); min-width:0}
.mk-in-wrap > .mk-in{flex:1 1 auto; width:auto}
.mk-in-wrap > :not(.mk-in){flex:none}
.mk-in-wrap.inset{position:relative; gap:0}
.mk-in-wrap.inset > .mk-in{padding-right:var(--menu-in-h)}
.mk-in-wrap.inset > :not(.mk-in){position:absolute; top:var(--s1); right:var(--s1); display:inline-grid; place-items:center; width:calc(var(--menu-in-h) - var(--s2)); height:calc(var(--menu-in-h) - var(--s2)); padding:var(--s1); border:0; border-radius:var(--r-btn); background:none; color:var(--ink-2)}
.mk-in-wrap.inset > :not(.mk-in):hover{color:var(--ink); background:var(--chrome)}
.mk-in-wrap.inset > :not(.mk-in):focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.mk-in-wrap.inset .ui-btn-icon, .mk-in-wrap.inset svg{display:block; width:100%; height:100%}
/* a label with a small link or hint at its right (Forgot password?, 8 characters or more) */
.mk-lab-row{display:flex; align-items:baseline; justify-content:space-between; gap:var(--s3); font-size:var(--fs-label)}
.mk-lab-row .h{font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2)}
/* a box of words (the feedback and report notes): the field kit's note box (.ui-field-ta) */
/* an error line under the fields; empty, it takes no room */
.mk-err{margin:0; font-size:var(--fs-label); font-weight:var(--fw-semi); line-height:1.35; color:var(--red)}
.mk-err:empty{display:none}
.mk-box > .mk-err{padding:0 var(--menu-pad) var(--s2)}
/* a tick box with its sentence (the agreement on Sign up and the terms gate): a real checkbox, Space ticks it */
.mk-check{display:flex; align-items:flex-start; gap:var(--menu-gap); font-size:var(--fs-label); font-weight:var(--fw-semi); line-height:1.4; color:var(--ink); cursor:pointer}
.mk-check input{flex:none; width:var(--check); height:var(--check); margin:calc((var(--fs-label) * 1.4 - var(--check)) / 2) 0 0; accent-color:var(--learn); cursor:pointer}
.mk-check input:focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.mk-check a{color:var(--learn-ink); font-weight:var(--fw-bold)}
/* "or" between two hairlines (Continue with Google over the form) */
.mk-or{display:flex; align-items:center; gap:var(--s3); margin:0; padding:var(--s1) var(--menu-pad); font-size:var(--fs-label); color:var(--ink-2)}
.mk-or::before, .mk-or::after{content:""; flex:1 1 0; border-top:1px solid var(--line)}
/* a link in the kit (Email me a code instead, the foot's Sign up): resting in ink-2 while it waits (Send a new code's countdown) */
.mk-link:disabled, .mk-link:disabled:hover{color:var(--ink-2); text-decoration:none; background:none; cursor:default; opacity:1}
.mk-link:focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.mk-act.centre{flex-wrap:wrap; gap:var(--s1) var(--s4); font-size:var(--fs-label)}
/* the wait beside Send a new code: figures that do not jump as they count */
.mk-wait{font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2); font-variant-numeric:tabular-nums}
/* keycaps that wrap (Graded wrong's last keys) */
.mk-caps{display:flex; flex-wrap:wrap; gap:var(--s1); margin:0; padding:0 var(--menu-pad) var(--s2)}
/* a small table inside a card that scrolls in both directions rather than widen it (Graded wrong's cells) */
.mk-table{margin:0 var(--menu-pad) var(--s2); max-height:calc(var(--menu-row-h) * 6); overflow:auto; border:1px solid var(--line); border-radius:var(--r-btn)}
.mk-table table{width:100%; border-collapse:collapse; font-size:var(--fs-label); line-height:1.35}
.mk-table th{position:sticky; top:0; padding:var(--s1) var(--s2); text-align:left; font-weight:var(--fw-bold); color:var(--ink-2); background:var(--chrome)}
.mk-table td{padding:var(--s1) var(--s2); border-top:1px solid var(--line); vertical-align:top; color:var(--ink); overflow-wrap:anywhere}
.mk-table td.mono{font-family:var(--mono); font-size:var(--fs-key)}
.mk-table td.ink-2{color:var(--ink-2)}
/* a row that is a link (a Contact topic opens an email): the topic's look, the words never underlined */
a.mk-topic{text-decoration:none}
/* a status line waiting for its words (Report's "Your email app should open now") takes no room */
.mk-note:empty{display:none}
