/* app2/ui/pages.css — the site pages' components (screenplay 3.0; M89, M104): the page and its
   columns, the panel, the table, the page tabs, buttons and keycaps, the marks (tier diamonds,
   goal segments, bars), the sheet preview, the Practice header block and the boards. Tokens only
   (ui/tokens.css): no hex value, pixel size or duration appears here. Loaded after components.css.

   Pages are laid out the way the course lays out a sheet (3.0, rule 4): one strong left edge, white
   panels on the paper ground with no border and no shadow, tables with a rule above the header and
   hairlines between rows, labels left and figures right in tabular numerals. Two-column pages are
   1fr and 336px (or two equal halves for a catalog) and end on the same line. */

/* ---------- the page and its columns ---------- */
.pg{font-family:var(--font); color:var(--ink); font-size:var(--fs-body); line-height:var(--lh-body); display:flex; flex-direction:column; gap:var(--s4)}
.pg-two{display:grid; grid-template-columns:minmax(0,1fr) var(--side-col); gap:var(--s4) var(--cols-gap); align-items:stretch}
.pg-main, .pg-side{display:flex; flex-direction:column; gap:var(--stack-gap); min-width:0}

/* ---------- the panel ---------- */
/* the old panel is the system card now (components.css .ui-card); these are its page hooks */
.panel-stretch{flex:1 1 auto}
.panel-line{margin:0; color:var(--ink-2); font-size:var(--fs-small)}
.panel-link{font-size:var(--fs-small)}
.facts{display:flex; flex-wrap:wrap; gap:var(--s2) var(--s4); align-items:center; font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2); font-variant-numeric:tabular-nums}
.btn-row{display:flex; align-items:center; gap:var(--s3); flex-wrap:wrap}
.row-name{font-weight:var(--fw-semi); font-size:var(--fs-small)}
.row-sub{display:block; font-size:var(--fs-label); color:var(--ink-2); font-weight:var(--fw-body)}



/* ---------- the page tabs (Learn, Leaderboards) ---------- */
.tabs{display:flex; gap:var(--s1); border-bottom:1px solid var(--line)}
.tab{display:inline-flex; align-items:center; gap:var(--s2); font:inherit; font-size:var(--fs-body); font-weight:var(--fw-semi); color:var(--ink-2); background:transparent; border:0; border-bottom:var(--mode-rule) solid transparent; margin-bottom:-1px; padding:var(--s2) var(--s4) var(--s3); cursor:pointer; position:relative}
.tab:hover{color:var(--ink)}
.tab.on{color:var(--ink); border-bottom-color:var(--mode)}
.tab:focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:calc(-1 * var(--focus-w)); border-radius:var(--r-btn)}   /* a tab on its hairline: inside it, as the kit's tab (.lt) */
.mode-mark{display:inline-block; width:var(--mode-mark); height:var(--mode-mark); background:var(--mark, var(--mode)); flex:none}

/* ---------- the inline link (keycaps are the keycap kit's, buttons the button kit's: components.css .ui-cap, .ui-btn) ---------- */
.picker{display:inline-flex; align-items:center; gap:var(--s2); font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2)}
.picker .ui-field-in{width:auto}   /* the drop-down is the field kit's (components.css .ui-field-sel), as wide as its longest choice */

/* ---------- the marks: tier diamonds, goal segments, bars, the level chip, a tick ---------- */
.tiers{display:inline-flex; gap:var(--bw-3); align-items:center; vertical-align:middle}
.tiers i{display:inline-block; width:var(--tier-mark); height:var(--tier-mark); transform:rotate(45deg) scale(.8); border:var(--bw-1-5) solid var(--clock-ink); box-sizing:border-box; background:transparent}
.tiers i.on{background:var(--clock)}
.tiers-none i{border-color:var(--edge)}
.segs{display:inline-flex; gap:var(--s1); align-items:center}
.segs i{display:inline-block; width:var(--seg-w); height:var(--seg-h); background:var(--line); border-radius:1px}
.segs i.on{background:var(--mode-line)}
.segs i.now{box-shadow:inset 0 0 0 1px var(--mode-line)}
.bar{display:block; height:var(--bar-h); background:var(--line); overflow:hidden}
.bar i{display:block; height:100%; background:var(--mode-line); transition:width var(--d-goal)}
.tick{display:inline-block; width:var(--s4); height:var(--s4); border:1px solid var(--edge); border-radius:var(--bw-2); vertical-align:middle; position:relative; background:var(--sheet)}
.tick.on{background:var(--mode-line); border-color:var(--mode-line)}
.tick.on::after{content:''; position:absolute; left:var(--tick-check); top:var(--bw-2); width:var(--s1); height:var(--s2); border:solid var(--on-fill); border-width:0 var(--bw-2) var(--bw-2) 0; transform:rotate(45deg)}

/* ---------- Home ---------- */
.week{display:inline-flex; gap:var(--bw-3)}
.week i{display:inline-grid; place-items:center; width:var(--s6); height:var(--s5); font-style:normal; font-family:var(--mono); font-size:var(--fs-min); line-height:1; color:var(--ink-2); background:var(--chrome)}
.week i.on{background:var(--learn); color:var(--on-fill)}
.week i.today{outline:1px solid var(--ink); outline-offset:-1px}
/* Home's badges are keys (01-home): the rarity's tint with its fill as the edge; a locked one is a blank key with ? */
/* the chapter table on Home has no header row: the rule sits above its first row */

/* ---------- the sheet preview (Home, Learn): a still of the sheet, read-only ---------- */
.sheet-preview{display:flex; flex-direction:column; border:1px solid var(--line); background:var(--sheet)}
.sp-scroll{overflow:hidden; max-height:var(--preview-h)}
table.sp{border-collapse:collapse; font-family:var(--cellfont); font-size:var(--fs-key); color:var(--ink); table-layout:fixed}
table.sp th, table.sp td{border:1px solid var(--grid); padding:0 var(--s1); height:var(--sp-row); white-space:nowrap; overflow:hidden; text-overflow:clip; text-align:left; max-width:0; position:static; font-weight:var(--fw-body); vertical-align:middle; transition:none}
table.sp th{background:var(--chrome); color:var(--ink-2); text-align:center; font-family:var(--font); font-size:var(--fs-min); max-width:none}
table.sp tbody th{width:1%; padding:0 var(--s2)}
table.sp td.num{text-align:right}
table.sp td.mid, table.sp td.ca{text-align:center}
table.sp td.b{font-weight:var(--fw-bold)}
table.sp td.i{font-style:italic}
table.sp td.bb{border-bottom:1px solid var(--ink)}
table.sp td.bt{border-top:1px solid var(--ink)}
table.sp td.fc-blue{color:var(--drills)}
table.sp td.fc-green{color:var(--learn)}
table.sp td.fc-red{color:var(--red)}
table.sp td.fc-gray, table.sp td.fc-darkgray{color:var(--ink-2)}
table.sp td.fill-gray{background:var(--chrome)}
table.sp td.fill-yellow{background:var(--note)}
table.sp td.fill-blue{background:var(--drills-tint)}
table.sp td.fill-green{background:var(--learn-tint)}
.sp-tab{align-self:flex-start; font-family:var(--font); font-size:var(--fs-min); color:var(--ink-2); background:var(--chrome); padding:var(--bw-2) var(--s3); border-top:1px solid var(--line); border-right:1px solid var(--line)}

/* ---------- the Practice pages' header block ---------- */
/* the header block is the page's selected item (Enter presses its primary button), but its Enter keycap already says so: no cursor ring round the block */
.hdr.cursor-on{outline-color:transparent}
.hdr.cursor-on::after{content:none}
.hdr{flex-direction:row; align-items:center; justify-content:space-between; gap:var(--s6); padding:var(--s6) var(--s6)}
.hdr-main{display:flex; flex-direction:column; gap:var(--s1); min-width:0}
.hdr-row{display:flex; align-items:baseline; gap:var(--s4)}
.hdr-title{font-size:var(--fs-title); font-weight:var(--fw-heavy); margin:0; line-height:1.15}
.hdr-main{flex:1 1 auto}
.hdr-fx{display:flex; align-items:stretch; border:1px solid var(--grid); background:var(--sheet); min-height:var(--row-h); margin-top:var(--s2); max-width:calc(var(--side-col) * 2.2)}   /* the line sits in a formula bar: fx, then the words */
.hdr-fx-mark{display:flex; align-items:center; padding:0 var(--s3); border-right:1px solid var(--grid); background:var(--chrome); color:var(--ink-2); font-style:italic; font-family:var(--fx-font); font-size:var(--fs-small)}
.hdr-line{margin:0; display:flex; align-items:center; padding:var(--s1) var(--s3); color:var(--ink); font-size:var(--fs-small); font-family:var(--cellfont)}
.hdr-acts{display:flex; align-items:center; gap:var(--s4); flex:none}
.paywall .panel-line{font-size:var(--fs-body); color:var(--ink)}

/* ---------- the boards (their look is the board kit's, components.css) ---------- */

/* ---------- the path: Learn and the drill catalog (ui/components/path.js) ---------- */
.keys-row{display:inline-flex; flex-wrap:wrap; gap:var(--s1) var(--chord-apart); align-items:center}
.keys-row .ui-cap{--cap-fs:var(--fs-min)}
.keys-more{font-size:var(--fs-min); color:var(--ink-2); font-weight:var(--fw-semi)}

/* a plain link in running text takes the page's mode ink, never the browser's blue */
.pg a:not([class]), .page a:not([class]){color:var(--mode-ink); font-weight:var(--fw-semi)}

/* the chapter strip: six cards, each a tab */
/* the chapter strip: the workbook's sheet tabs, one per chapter, sitting on the panel they open (Excel's
   active tab: white, bold, the green rule under it; the rest on the chrome grey). Each carries its number,
   its name, a hairline of progress and its count or its lock. */
.ch-cards{display:flex; align-items:stretch; gap:0; background:var(--chrome); border:1px solid var(--grid); border-bottom:0; margin-bottom:calc(-1 * var(--s4)); position:relative; z-index:1; overflow-x:auto}
.ch-cards .ch-card{flex:1 1 auto; min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr) auto; grid-template-areas:"n title note" "bar bar bar"; align-items:center; column-gap:var(--s2); row-gap:var(--s1); text-align:left; background:transparent; border:0; border-right:1px solid var(--grid); margin:0; padding:var(--s3) var(--s4) var(--s2); border-radius:0; color:var(--ink-2); font-weight:var(--fw-body); cursor:pointer}
.ch-cards .ch-card:last-child{border-right:0}
.ch-cards .ch-card:hover{background:var(--sheet); color:var(--ink)}
.ch-cards .ch-card.on{background:var(--sheet); color:var(--learn-ink); box-shadow:inset 0 calc(-1 * var(--bw-3)) 0 var(--learn)}
.ch-cards .ch-card:focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:calc(-1 * var(--focus-w)); border-radius:0}
.ch-top{display:contents}
.ch-n{grid-area:n; font-family:var(--mono); font-weight:var(--fw-bold); font-size:var(--fs-key); line-height:1; color:inherit; background:none; border:0; padding:0; min-width:0}
.ch-card.full .ch-n{color:var(--learn-ink)}
.ch-title{grid-area:title; font-size:var(--fs-small); font-weight:var(--fw-semi); line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.ch-card.on .ch-title{font-weight:var(--fw-heavy)}
.ch-note{grid-area:note; font-size:var(--fs-min); font-weight:var(--fw-bold); color:var(--learn-ink)}
.ch-card.locked .ch-note{display:inline-flex; align-items:center; gap:var(--s1); color:var(--challenges-ink)}
.ch-card.locked .ch-note::before{content:''; width:var(--s2); height:var(--s2); border:var(--bw-2) solid currentColor; border-bottom:0; border-radius:var(--s1) var(--s1) 0 0; box-shadow:0 var(--s2) 0 calc(-1 * var(--bw-2)) currentColor; margin-bottom:var(--s1)}   /* a small drawn lock */
.ch-card.locked .ch-note{font-size:0; gap:0}   /* in the tab the lock speaks alone; the word is the tab's title */
.ch-bar{grid-area:bar; display:block; height:var(--bw-2); background:var(--grid)}
.ch-bar i{display:block; height:100%; background:var(--learn)}
.ch-count{display:none}   /* the panel under the tabs carries the count */

/* the nodes: one per lesson, the line between them filling as the path is walked; the challenge is a diamond */
.path{display:flex; align-items:center; min-height:var(--pn-now)}
.pn{position:relative; display:inline-block; width:var(--pn); height:var(--pn); border:var(--bw-2) solid var(--edge); border-radius:50%; background:var(--sheet); flex:none; box-sizing:border-box}
.pn + .pn{margin-left:var(--pn-gap)}
.pn + .pn::before{content:''; position:absolute; top:50%; left:calc(-1 * var(--pn-gap) - var(--bw-2)); width:var(--pn-gap); height:var(--bw-2); background:var(--line); transform:translateY(-50%)}
.pn-done{background:var(--learn); border-color:var(--learn)}
.pn-done + .pn::before{background:var(--learn)}
.pn-started{border-color:var(--learn)}
.pn-next{width:var(--pn-now); height:var(--pn-now); border-color:var(--learn); box-shadow:0 0 0 var(--bw-3) var(--learn-tint)}
.pn-next::after{content:''; position:absolute; inset:var(--bw-3); border-radius:50%; background:var(--learn)}
.pn-ch{border:0; background:transparent; border-radius:0; display:inline-grid; place-items:center}
.pn-ch i{display:block; width:calc(var(--pn) - var(--bw-2)); height:calc(var(--pn) - var(--bw-2)); transform:rotate(45deg); border:var(--bw-2) solid var(--challenges); background:var(--sheet); box-sizing:border-box}
.pn-ch.pn-done i{background:var(--challenges)}
.pn-ch.pn-next{box-shadow:none}
.pn-ch.pn-next::after{content:none}
.pn-ch.pn-next i{background:var(--challenges-tint); box-shadow:0 0 0 var(--bw-3) var(--challenges-tint)}
a.pn:hover{border-color:var(--ink)}
a.pn-ch:hover i{border-color:var(--challenges-ink)}
a.pn:focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}

/* the badge a module pays out, under its page */
@media (max-width:900px){ .ch-cards .ch-card{flex:none; width:var(--side-col)} }

/* a drill's state in the catalog sheet: your time, not played, or the lock and why */

/* the set, inline at the side of the catalog */

/* Rapid-fire: the lengths as a toolbar in the header (Monkeytype's row of numbers), the deck as a sheet */
.tbl-sheet .keys-row{flex-wrap:nowrap}

/* the tiers a challenge pays, with the times they take */

/* the Daily's week: a row a day with its drill, its keys and your time */



/* ---------- the profile: the band, the shelf, the level titles ---------- */
.ach{display:grid; grid-template-columns:var(--ach-art) minmax(0,1fr); gap:var(--s3); align-items:start; padding:var(--s3) var(--s3) var(--s3) 0; border-bottom:1px solid var(--line)}

/* ---------- the certificate: the chapters as progress, the next step, the page it will be ---------- */
.cert-card{padding:var(--s6); gap:var(--s2)}   /* the box kit's card (.ui-card): sheet, hairline, no shadow, no coloured rule */
.cert-top{display:flex; justify-content:space-between; align-items:center; margin-bottom:var(--s4)}
.cert-mark{font-size:var(--fs-body)}   /* the logo, small (components/logo.js; UI-96) */
.cert-state{display:inline-flex; align-items:center; gap:var(--s2); font-size:var(--fs-min); font-weight:var(--fw-bold); color:var(--ink-2)}
.cert-name{font-size:var(--fs-title); font-weight:var(--fw-heavy); line-height:1.1}
.cert-course{font-size:var(--fs-panel); font-weight:var(--fw-semi)}
.cert-sub{font-size:var(--fs-min); color:var(--ink-2)}
.cert-to{display:flex; flex-direction:column; margin:var(--s3) 0; font-size:var(--fs-label); color:var(--ink-2)}
.cert-to b{font-size:var(--fs-head); color:var(--ink)}
.cert-segs{display:grid; grid-template-columns:repeat(6, 1fr); gap:var(--s1)}
.cert-segs i{display:block; height:var(--bar-h); background:var(--line)}
.cert-segs i.half{background:var(--learn-tint)}
.cert-segs i.on{background:var(--learn)}
.cert-foot{display:flex; justify-content:space-between; font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2)}
.cert-foot > span:first-child{color:var(--ink)}   /* its own first fact, never the label inside a button set in it (A-grade pass: Continue was ink on green, 3.4 to 1, UI-2) */
/* the certificate with its next step (the Certificate tab's side card): the name a step smaller, the step's words beside its
   one button */
.cert-act .cert-name{font-size:var(--fs-head)}
.cert-act .cert-foot{align-items:center; font-size:var(--fs-small)}
@media (max-height:760px){ .cert-act :is(.cert-course, .cert-to){display:none} }   /* a short window: the paper's name, its six chapters and the step stay in view (the name and the course are the rows beside it) */

/* below 900px the columns stack */
@media (max-width:900px){
  .pg-two{grid-template-columns:minmax(0,1fr)}
  .hdr{flex-direction:column; align-items:stretch}
}
@media (prefers-reduced-motion: reduce){ .bar i{transition:none} }

/* Today's quest rows (6.6, 6.10): a quest's line may wrap, its bar sits under it; the bonus row in the lesson green; the week folds open on Enter */

/* ---------- Teams and the desk (Phase F desks v1) ---------- */
/* the banner that opens the desk page (0023): the name with its tag, the motto, the seats; tinted in the
   team's colour (--tc, --tc-ink, --tc-tint from team-look.js), the neutral card without one */
.desk-banner{flex-direction:row; align-items:center; gap:var(--s4)}
.desk-banner.has-tc{background:var(--tc-tint); border-top:var(--mode-rule) solid var(--tc)}
.desk-banner-main{flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:var(--s1)}
.desk-banner .h-title{margin:0; overflow-wrap:anywhere}
.desk-banner-side{flex:none; display:flex; flex-direction:column; align-items:flex-end; gap:var(--s2)}
.desk-banner .panel-facts{font-size:var(--fs-small)}
.desk-banner.has-tc .panel-facts{color:var(--tc-ink)}
/* the owner's Edit team look: a drop-down card under the banner, its right edge on the banner's. The menu kit's panel
   (UI-31, docs/specs/menu-kit.md): 240 wide, 8 above and below, 12 at the sides; one column of fields, each a label over
   its control and one short line; the swatches 36px, 8px apart, four to a row */
.desk-head{position:relative}
.desk-name{display:flex; align-items:center; gap:var(--s3); min-width:0; flex-wrap:wrap}
@media (max-width:600px){ .desk-banner{flex-wrap:wrap; align-items:flex-start} .desk-banner-main{flex-basis:0; flex-grow:1} .desk-banner-side{flex:1 1 100%; align-items:flex-start} .desk-banner .panel-facts{flex-wrap:wrap} }
.tbl-ops-teams td{vertical-align:top; padding-top:var(--s2); padding-bottom:var(--s2)}
.tbl-ops-teams .row-sub{overflow-wrap:anywhere; white-space:normal}
.tbl-ops-teams td[data-col="act"]{width:1%; white-space:nowrap}
.desk-code{margin:0; font-size:var(--fs-head); font-weight:var(--fw-heavy); color:var(--ink)}
.desk-role{margin-left:var(--s2); font-size:var(--fs-min); font-weight:var(--fw-semi); color:var(--mode-ink)}
.desk-sees{list-style:none; margin:0; padding:0; display:flex; flex-direction:column}
.desk-sees li{padding:var(--s2) 0; border-bottom:1px solid var(--line); font-size:var(--fs-small); line-height:var(--lh-body)}
.desk-sees li:last-child{border-bottom:0}
/* the team sheet by chapter (TC-16): a column a chapter, every label a button that sorts, the due work's state (TC-18) */
.tbl-by-ch td[data-col="ch"]{white-space:nowrap; font-variant-numeric:tabular-nums; padding-left:var(--s1)}   /* a chapter column is numbers right-aligned: half the cell padding on its empty side, so the six fit the frame at 1366 */
.tbl-by-ch td[data-col="due"]{white-space:nowrap}
.tbl-sheet .ms-sort.ui-btn{color:inherit; white-space:nowrap}
.ms-sort:focus-visible{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.ms-sort-i{display:none; vertical-align:middle; margin-left:var(--s1); width:0; height:0; border-left:var(--sort-i) solid transparent; border-right:var(--sort-i) solid transparent; border-top:var(--sort-i) solid var(--ink)}
.ms-sort.on .ms-sort-i{display:inline-block}
.ms-sort.on[data-dir="up"] .ms-sort-i{border-top:0; border-bottom:var(--sort-i) solid var(--ink)}
.ch-cell.ch-none{color:var(--ink-2)}
.ch-cell.ch-ver{color:var(--due-done); font-weight:var(--fw-bold)}
.due{font-weight:var(--fw-bold)}
.due-overdue{color:var(--due-late)}
.due-soon{color:var(--due-soon)}
.due-done{color:var(--due-done)}
.due-open{color:var(--due-open); font-weight:var(--fw-semi)}
.desk-sheet-foot{display:flex; align-items:center; justify-content:flex-end; gap:var(--s4)}
.desk-sheet-foot .btn2{flex:none}
.desk-work .btn-row{margin-top:var(--s3)}
/* a piece of work set (round 3): its name wraps inside the card, never past it; its date; a bar and the count; Who is
   done and Take off; the names, the done ones ticked in the done colour, the late ones in the overdue colour */
.desk-work-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; min-width:0}
.desk-work-item{display:flex; flex-direction:column; gap:var(--s2); padding:var(--s3) 0; border-bottom:1px solid var(--line); min-width:0}
.desk-work-item:first-child{padding-top:0}   /* the list's edges meet the card's own gap: the line above and the button below sit as in every side card */
.desk-work-item:last-child{border-bottom:0; padding-bottom:0}
.desk-work-top{display:flex; align-items:baseline; justify-content:space-between; gap:var(--s3); min-width:0}   /* the date keeps its place at the right; a long name wraps beside it */
.desk-work-name{flex:1 1 auto; min-width:0; overflow-wrap:anywhere; font-weight:var(--fw-bold); color:var(--ink)}
.desk-work-date{flex:none; font-size:var(--fs-min); font-weight:var(--fw-semi); color:var(--due-open)}
.desk-work-date.late{color:var(--due-late)}
.desk-work-prog{display:flex; flex-direction:column; gap:var(--s1); min-width:0}   /* the bar and its count are one mark */
.desk-work-bar{width:100%}
.desk-work-tally{display:flex; align-items:center; gap:var(--s1); margin:0; font-size:var(--fs-min); color:var(--due-open)}
.desk-work-tally.late{color:var(--due-late); font-weight:var(--fw-semi)}
.desk-work-tally.all{color:var(--due-done); font-weight:var(--fw-semi)}
.desk-work-acts{display:flex; flex-wrap:wrap; gap:var(--s1) var(--s4)}
.desk-work-who{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--s2); font-size:var(--fs-min)}
.desk-work-who li{display:flex; align-items:center; gap:var(--s2); min-width:0; color:var(--due-open)}
.desk-work-who-name{flex:1 1 auto; min-width:0; overflow-wrap:anywhere; color:var(--ink); font-weight:var(--fw-semi)}
.desk-work-who-state{flex:none}
.desk-work-who li.due-done .desk-work-who-state{color:var(--due-done); font-weight:var(--fw-bold)}
.desk-work-who li.due-overdue .desk-work-who-state{color:var(--due-late); font-weight:var(--fw-bold)}
.due-tick{flex:none; width:var(--due-tick); height:var(--due-tick); color:var(--due-done); vertical-align:middle; margin-right:var(--s1)}
.due-dot{flex:none; display:inline-block; width:var(--due-dot); height:var(--due-dot); margin:0 calc((var(--due-tick) - var(--due-dot)) / 2); border-radius:50%; background:var(--line)}
.due-overdue .due-dot{background:var(--due-late)}
.ch-cell.ch-set-done{color:var(--due-done); font-weight:var(--fw-bold)}
.ch-cell.ch-set-overdue{color:var(--due-late); font-weight:var(--fw-bold)}
.desk-work-form{display:flex; flex-direction:column; gap:var(--s2); min-width:0}
.desk-work-form > .ui-field + .ui-field{margin-top:var(--s2)}   /* a label sits nearer its own field than the one above (the sd-card form's rule) */
.desk-work-form .desk-work-what, .desk-work-form .desk-work-due{width:var(--work-what-w); max-width:100%; min-width:0; box-sizing:border-box}
.desk-work-form .co-err:empty{display:none}
.desk-work-form .fine{margin:0}
/* clubs and classes made safe (0041): a member's row actions side by side; the switch between an account's desks; the
   desk's kind beside its name; Run the club, the removed list and a class's confirm */
.desk-switch{display:inline-flex; align-self:flex-start; width:fit-content; flex-wrap:wrap; max-width:100%}
.desk-switch-tab{display:inline-flex; align-items:baseline; gap:var(--s2); min-height:var(--ctl-h-sm); padding:var(--s2) var(--s4); text-decoration:none; font-size:var(--fs-body); font-weight:var(--fw-bold)}
.desk-switch-name{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:var(--desk-switch-w)}
.desk-switch-kind{font-size:var(--fs-min); font-weight:var(--fw-semi); color:var(--ink-2)}
.desk-switch-tab.on .desk-switch-kind{color:inherit}
.desk-mark{display:inline-flex; align-items:center; height:var(--chip-h); padding:0 var(--chip-px); border:1px solid var(--line); border-radius:var(--chip-r); font-size:var(--fs-min); font-weight:var(--fw-semi); color:var(--ink-2)}
.desk-banner.has-tc .desk-mark{color:var(--tc-ink); border-color:currentColor}
.desk-run .btn-row{margin-top:var(--s3)}
.desk-record{color:var(--ink)}
.cc-fieldset{margin:0; padding:0; border:0; min-width:0; display:flex; flex-direction:column; gap:var(--s2)}
.cc-fieldset legend{padding:0; margin-bottom:var(--s1)}
.cc-fieldset[hidden]{display:none}
.cc-fieldset .cc-basis{align-items:flex-start; line-height:var(--lh-body)}
.cc-fieldset .cc-basis input{margin-top:var(--s1)}
.desk-class-form{display:flex; flex-direction:column; gap:var(--s3)}
.desk-class-form .co-err:empty{display:none}
.tbl-members tr.mine .row-name{font-weight:var(--fw-heavy)}
/* the member sheet (ui/components/member-sheet.js): the frame fills its card to the foot of the side column, the sheet
   scrolls inside it with the letters and row 1 frozen and the row numbers held at the left; over twelve members the
   find row sits above it */
.desk-seats, .desk-members{min-height:0}
/* the owner's seat sheet ends after its rows (--ms-rows: the labels, the members and three blanks, desk-page.js SEAT_SHEET_SPARE) plus
   the frame's two edges; the card no longer stretches to the side column (round 4: no stretched element with empty space) */
.desk-seats .ms-wrap{flex:none; min-height:0; height:calc(var(--sp-row) + var(--row-h) * var(--ms-rows, 4) + 2 * var(--btn-edge))}
.ms{display:flex; flex-direction:column; gap:var(--s3); flex:1 1 auto; min-height:0}
.ms-find{display:flex; align-items:center; gap:var(--s3)}
.ms-find .ui-field-box{flex:1 1 auto; min-width:0}
.ms-count{flex:none; font-size:var(--fs-label); font-weight:var(--fw-semi); color:var(--ink-2); font-variant-numeric:tabular-nums; white-space:nowrap}
.ms-wrap{position:relative; flex:1 1 auto; min-height:var(--ms-min-h)}
/* more below: the scroll list's fade over the frame's foot, in the sheet's own ground (the chevron is retired, UI-65) */
.ms-wrap::after{content:''; position:absolute; left:0; right:0; bottom:0; height:var(--fade-h); pointer-events:none; background:linear-gradient(to bottom, transparent, var(--sheet)); opacity:0; transition:opacity var(--d-menu)}
.ms-wrap.ms-more::after{opacity:1}

/* ---------- the ops page (#/ops): errors that open to their stack, alerts with Resolve, the digests ---------- */
.tbl-ops-funnel td[data-col="rate"]{color:var(--ink-2); font-size:var(--fs-label); font-variant-numeric:tabular-nums; width:1%; white-space:nowrap}
.tbl-ops-money td{vertical-align:top; padding-top:var(--s2); padding-bottom:var(--s2)}
.tbl-ops-money .row-sub{white-space:normal}
.tbl-ops-errors td[data-col="msg"]{white-space:normal; width:100%; padding-top:var(--s2); padding-bottom:var(--s2)}
.tbl-ops-errors td, .tbl-ops-alerts td{vertical-align:top; padding-top:var(--s2); padding-bottom:var(--s2)}
.pg-ops td[data-col="time"]{font-family:var(--mono); font-size:var(--fs-key); color:var(--ink-2)}
.ops-err summary{cursor:pointer; font-size:var(--fs-small); overflow-wrap:anywhere}
.ops-err[open] summary{font-weight:var(--fw-semi)}
.ops-err-more{display:grid; grid-template-columns:auto minmax(0,1fr); gap:var(--s1) var(--s3); margin:var(--s2) 0 0; font-size:var(--fs-label)}
.ops-err-more dt{color:var(--ink-2)}
.ops-err-more dd{margin:0; overflow-wrap:anywhere}
.ops-stack{margin:var(--s2) 0 0; padding:var(--s2) var(--s3); background:var(--chrome); font-family:var(--font); font-size:var(--fs-min); line-height:var(--lh-body); white-space:pre-wrap; overflow-wrap:anywhere; max-height:calc(var(--row-h) * 8); overflow:auto}
.tbl-ops-alerts .row-sub{overflow-wrap:anywhere; white-space:normal}
.pg-ops .pg-two{grid-template-columns:minmax(0,1fr) calc(var(--side-col) * 1.4)}
.tbl-ops-alerts td[data-col="act"], .tbl-ops-digests td[data-col="act"]{width:1%}
.ops-find, .ops-rename{display:flex; align-items:center; gap:var(--s2); margin:0 0 var(--s3)}
.ops-find .ui-field-box, .ops-rename .ui-field-in{flex:1 1 auto; min-width:0}
.ops-rename{margin:0 0 var(--s1)}
.tbl-ops-desks td{vertical-align:top; padding-top:var(--s2); padding-bottom:var(--s2)}
.tbl-ops-desks .row-sub{overflow-wrap:anywhere; white-space:normal}
.tbl-ops-desks td[data-col="act"]{width:1%; white-space:nowrap}
.tbl-ops-desks .ops-flag{margin-left:var(--s2)}
.tbl-ops-shared .row-name + *{margin-left:var(--s2)}
@media (max-width:900px){ .pg-ops .pg-two{grid-template-columns:minmax(0,1fr)} }


/* Round 2: thin strokes of a bright lane read its line; a sheet's blue font is the Drills ink (a real blue on white) */
table.sp td.fc-blue{color:var(--drills-ink)}
.pn-ch i{border-color:var(--challenges-line)}

/* ---------- the ops page's tabs and the 0042 lists: reports, flagged runs, feedback, accounts, the log ---------- */
.ops-tabs{margin:0 0 var(--s4)}
.ops-tab-n{display:inline-flex; align-items:center; justify-content:center; min-width:var(--chip-h); height:var(--chip-h); padding:0 var(--s1); border-radius:var(--chip-r); font-size:var(--fs-min); font-weight:var(--fw-bold); color:var(--red); border:1px solid var(--red); background:var(--sheet); box-sizing:border-box}
.tbl-ops-reports .ui-chip, .tbl-ops-runs .ui-chip, .tbl-ops-feedback .ui-chip, .ops-acct-h .ui-chip{margin-left:var(--s2)}
.tbl-ops-feedback .ui-chip{margin-left:0; margin-right:var(--s2)}
.ops-flags{display:flex; flex-wrap:wrap; gap:var(--s1); margin-top:var(--s1)}
.ops-flags .ui-chip{margin-left:0}
.ops-note, .ops-fb-body{color:var(--ink); white-space:pre-wrap}
.tbl-ops-log td[data-col="time"]{font-family:var(--mono); font-size:var(--fs-key); color:var(--ink-2); white-space:nowrap}
.ops-acct{display:flex; flex-direction:column; gap:var(--s2); padding:var(--s4) 0; border-top:1px solid var(--line)}
.ops-acct-h{margin:0; font-size:var(--fs-small); display:flex; align-items:center}
.rp-facts.ops-facts{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); column-gap:var(--s5)}
.ops-notes{margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:var(--s1); font-size:var(--fs-label)}
.ops-notes small{display:block; color:var(--ink-2)}
.ops-forms{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:var(--s4); margin-top:var(--s2)}
.ops-form{display:flex; flex-direction:column; gap:var(--s2); padding:var(--s3); background:var(--paper); border-radius:var(--r-btn)}
.ops-form h3{margin:0; font-size:var(--fs-label); font-weight:var(--fw-bold); color:var(--ink-2)}
.ops-forms > *{min-width:0}
.ops-form .ui-btn{align-self:flex-start}
.ops-grant{display:inline-flex; align-items:baseline; white-space:pre}   /* a club's seat grant (app/ops-seats.js): its line, then End */
.ops-code{font-family:var(--mono); font-size:var(--fs-body); font-weight:var(--fw-bold); color:var(--ink)}
.ops-msg{color:var(--ink)}
@media (max-width:900px){ .ops-forms, .rp-facts.ops-facts{grid-template-columns:minmax(0,1fr)} }
