/* ============================================================================================================================
   A JOB'S WHITE-BOARD, AS DRAWN — redesign step 16, second round (R-644; public/js/99w-board-drawn.js). NEW PACE ONLY: every rule
   starts with html[data-new-pace], and the page wears .bw-drawn only in the new PACE. The top is the drawn job's (np-job.css: .jd-ph,
   .jd-crumb, .jd-t, .jd-sub, .jd-ph-acts — the record pattern, used as it is). The board: a column per stage on a glass pane, quiet
   cards with a 3px stripe in the stage's colour, the board scrolling sideways in its own box. Words take the new look's own inks
   (--fx-text …) — inside #content the old look re-inks every card (new-pace-look.css, "TEXT INK RULE"), so they are said here.
   ============================================================================================================================ */

/* the page's top is the job's own (crumb, title, summary, actions): the frame's title line is put away on this page only */
html[data-new-pace] body:has(#content .bw-drawn) #topbar .tb-head,html[data-new-pace] body:has(#content .bw-drawn) #topbar .tb-act{display:none}

html[data-new-pace] .bw-drawn{display:flex;flex-direction:column;gap:var(--np-space-4);min-width:0;max-width:100%;padding:var(--np-space-1_5) 0 34px;color:var(--fx-text);font:400 var(--np-text-body)/1.5 var(--font)}
html[data-new-pace] .bw-drawn p,html[data-new-pace] .bw-drawn h1{margin:0}
html[data-new-pace] .bw-drawn .btn{min-height:var(--np-h-control);padding:0 var(--np-space-4_5);font:600 var(--np-text-lg)/1 var(--font);display:inline-flex;align-items:center;justify-content:center;gap:var(--np-space-2);white-space:nowrap}
html[data-new-pace] .bw-drawn .btn-primary{font-weight:700}
html[data-new-pace] .bw-drawn .btn svg{width:18px;height:18px;flex:none}
html[data-new-pace] .bw-drawn .bw-lnk{min-height:32px;padding:0 var(--np-space-1);background:transparent;border-color:transparent;box-shadow:none;color:var(--fx-accent);font-weight:700;font-size:var(--np-text-md)}
html[data-new-pace] .bw-hint{font-size:var(--np-text-md);line-height:1.45;color:var(--fx-text2)}
html[data-new-pace] .bw-err{color:var(--fx-red)}
/* how to move: dragging where there is a mouse, "Move to…" where there is a finger (hover is never decided by width) */
html[data-new-pace] .bw-how-drag{display:none}
@media (hover:hover) and (pointer:fine){ html[data-new-pace] .bw-how-drag{display:inline} html[data-new-pace] .bw-how-touch{display:none} }

/* ── the board: its own box scrolls sideways, the page never does ── */
html[data-new-pace] .bw-board{position:relative;display:flex;align-items:flex-start;gap:var(--np-space-3);min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;padding:var(--np-space-0_5) var(--np-space-0_5) var(--np-space-3_5)}
html[data-new-pace] .bw-board:focus-visible{outline:2px solid var(--fx-acc);outline-offset:2px;border-radius:var(--np-round-xl)}
html[data-new-pace] .bw-col{flex:0 0 240px;min-width:0;display:flex;flex-direction:column;padding:var(--np-space-3) var(--np-space-2_5) var(--np-space-2_5);border-radius:var(--np-round-xl);background:var(--card);border:1px solid var(--glass-brd);
  transition:background-color .15s var(--quick),border-color .15s var(--quick)}
html[data-new-pace] .bw-col.is-over{border-color:var(--fx-acc);background:color-mix(in srgb,var(--fx-acc) 9%,var(--card))}
/* the stage's colour: 33's families in the new look's inks; the dot in the head and the stripe on each card */
html[data-new-pace] .bw-grey{--bw-c:var(--fx-text3)} html[data-new-pace] .bw-amber{--bw-c:var(--fx-amber)} html[data-new-pace] .bw-acc{--bw-c:var(--fx-accent)}
html[data-new-pace] .bw-teal{--bw-c:var(--fx-teal)} html[data-new-pace] .bw-violet{--bw-c:var(--fx-purple)} html[data-new-pace] .bw-green{--bw-c:var(--fx-green)} html[data-new-pace] .bw-red{--bw-c:var(--fx-red)}

/* a column's head: the stage and its count, calm */
html[data-new-pace] .bw-head{display:flex;align-items:center;gap:var(--np-space-2);padding:var(--np-space-0_5) var(--np-space-1_5) var(--np-space-2_5);min-width:0}
html[data-new-pace] .bw-dot{width:9px;height:9px;flex:none;border-radius:var(--np-round-pill);background:var(--bw-c)}
html[data-new-pace] .bw-st{font:700 var(--np-text-lg)/1.3 var(--font);color:var(--fx-text);min-width:0;overflow-wrap:anywhere}
html[data-new-pace] .bw-n{margin-left:auto;font:700 var(--np-text-md)/1.3 var(--font);color:var(--fx-text2);font-variant-numeric:tabular-nums}
html[data-new-pace] .bw-note{display:block;margin:-6px var(--np-space-1_5) var(--np-space-2_5) 23px;font:600 var(--np-text-sm)/1.3 var(--font);color:var(--fx-text2)}
html[data-new-pace] .bw-note.is-wait{color:var(--fx-accent);font-weight:700}
html[data-new-pace] .bw-cards{display:flex;flex-direction:column;gap:var(--np-space-2);min-width:0}
html[data-new-pace] .bw-empty{padding:var(--np-space-3_5) var(--np-space-2);border:1px dashed var(--line2);border-radius:var(--np-round-lg);font-size:var(--np-text-md);color:var(--fx-text2);text-align:center}

/* a card: quiet — the name, a line or two, a stripe in the stage's colour; the whole card opens the person's record */
html[data-new-pace] .bw-card{display:flex;flex-direction:column;align-items:flex-start;gap:var(--np-space-0_5);min-width:0;padding:var(--np-space-3) var(--np-space-3) var(--np-space-3) 15px;border-radius:var(--np-round-lg);cursor:pointer;
  background:color-mix(in srgb,var(--card-solid) 78%,transparent);border:1px solid var(--line);box-shadow:inset 3px 0 0 var(--bw-c);transition:background-color .15s var(--quick)}
html[data-new-pace] .bw-card[draggable="true"]{cursor:grab}
html[data-new-pace] .bw-name{display:block;max-width:100%;padding:0;border:0;background:none;text-align:left;cursor:inherit;font:600 var(--np-text-lg)/1.35 var(--font);color:var(--fx-text);overflow-wrap:anywhere}
html[data-new-pace] .bw-name:focus-visible{outline:2px solid var(--fx-acc);outline-offset:2px;border-radius:4px}
html[data-new-pace] .bw-what,html[data-new-pace] .bw-line,html[data-new-pace] .bw-iv{display:block;max-width:100%;font-size:var(--np-text-md);line-height:1.4;color:var(--fx-text2);overflow-wrap:anywhere}
/* the interview: its time first, then its place on the same line — a long meeting link is cut short (the whole of it is the title) */
html[data-new-pace] .bw-iv{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* the card's two menus on one line, quiet until used: the sub-stage (25's, as today) and Move to… (33's window). With a mouse they read
   as words with an arrow and take an edge under the pointer; where there is a finger they keep a light edge, so they read as menus */
html[data-new-pace] .bw-foot{display:flex;gap:var(--np-space-1);width:calc(100% + 8px);margin:var(--np-space-1_5) -4px 0}
html[data-new-pace] .bw-drawn .bw-foot .sel{flex:1 1 0;min-width:0;width:auto;height:32px;padding:0 0 0 var(--np-space-1);border-radius:9px;font:500 var(--np-text-md)/1 var(--font);color:var(--fx-text2);
  background:transparent;border:1px solid transparent;box-shadow:none;cursor:pointer;text-overflow:ellipsis}
/* where a menu can be as wide as what it says, each takes its words' width, and a second menu that does not fit goes under the first
   (so "Sub-stage", a long sub-stage and "Move to…" are never cut short) */
@supports (field-sizing:content){ html[data-new-pace] .bw-foot{flex-wrap:wrap} html[data-new-pace] .bw-drawn .bw-foot .sel{flex:0 1 auto;field-sizing:content} }
html[data-new-pace] .bw-drawn .bw-foot .sel.is-set{color:var(--fx-text)}
html[data-new-pace] .bw-drawn .bw-foot .sel:focus-visible{outline:2px solid var(--fx-acc);outline-offset:1px}
@media not all and (hover:hover) and (pointer:fine){ html[data-new-pace] .bw-drawn .bw-foot .sel{border-color:var(--line2);padding-left:var(--np-space-2)} }
html[data-new-pace] .bw-subtx{display:inline-flex;align-items:center;padding:3px var(--np-space-2_5);border-radius:var(--np-round-pill);font:600 var(--np-text-sm)/1.3 var(--font);color:var(--fx-text2);background:color-mix(in srgb,var(--fx-text3) 14%,transparent)}
@media (hover:hover) and (pointer:fine){ html[data-new-pace] .bw-card:hover{background:var(--card-solid)} html[data-new-pace] .bw-drawn .bw-foot .sel:hover{border-color:var(--ctl-brd);color:var(--fx-text)} }

/* the stages as chips above the board (99r's npChips, as they are): one row that scrolls in its own box; the column at the board's
   left edge is the pressed chip. On a wide screen it is the index to the stages off to the right; on a phone, where one column fills
   the screen, it is the way to a stage */
html[data-new-pace] .bw-jump{display:block;min-width:0;max-width:100%;margin:-4px 0 -6px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
html[data-new-pace] .bw-jump::-webkit-scrollbar{display:none}
html[data-new-pace] .bw-jump .np-chips{flex-wrap:nowrap;width:max-content;margin:0;padding:var(--np-space-0_5) var(--np-space-0_5) var(--np-space-1_5)}
html[data-new-pace] .bw-jump .np-chip{flex:none}
/* a row that scrolls clips the pressed chip's glow into a box; here its fill alone says which one */
html[data-new-pace] .bw-jump .np-chip[aria-pressed="true"]{box-shadow:none}

/* ── a wide screen: a long column scrolls in its own box (its place kept across a repaint), the board's foot stays in reach ── */
@media (min-width:861px){
  html[data-new-pace] .bw-cards{max-height:max(340px,calc(100vh - 330px));overflow-y:auto;padding-right:var(--np-space-0_5)}   /* no overscroll contain: a short column must not hold the wheel (R-1190) */
}

/* ── a phone: each column is the screen's width and the board swipes column by column; fields a finger uses are 16px ── */
@media (max-width:860px){
  /* R-677 (owner, 18 Nov 2026, D-0461: "the mobile layout is taking away half the view"): on a phone the cards come up the screen —
     no how-to sentence (the stage chips and each card's "Move to…" say it; a failure line still shows), the preview switch is left
     to the other pages and My Profile, the title and the gaps are tighter. The title, the status, the counts, both actions and the
     stage chips all stay. board-smoke measures it: the first card in the top 40% of a 390 × 844 phone (it was 52%). */
  html[data-new-pace] .bw-drawn{gap:var(--np-space-2_5);padding-top:0}
  html[data-new-pace] .bw-drawn .bw-how{display:none}
  html[data-new-pace] .bw-drawn .new-pace-chip{display:none}
  html[data-new-pace] .bw-drawn .jd-t{font-size:var(--np-text-5xl);line-height:1.2}
  html[data-new-pace] .bw-drawn .jd-crumb{margin-bottom:var(--np-space-0_5)}
  html[data-new-pace] .bw-drawn .jd-ph-acts{width:100%}
  html[data-new-pace] .bw-drawn .jd-ph-acts > .btn{flex:1 1 auto}
  html[data-new-pace] .bw-board{gap:var(--np-space-2_5);scroll-snap-type:x mandatory;padding-bottom:var(--np-space-2_5)}
  html[data-new-pace] .bw-col{flex:0 0 calc(100% - 26px);scroll-snap-align:start}
  html[data-new-pace] .bw-foot{gap:var(--np-space-1_5);width:100%;margin:var(--np-space-2_5) 0 0}
  html[data-new-pace] .bw-drawn .bw-foot .sel{flex:1 1 0;field-sizing:fixed;height:var(--np-h-control);font-size:var(--np-text-body)}
  html[data-new-pace] .bw-drawn select,html[data-new-pace] .bw-drawn input{font-size:var(--np-text-body)}
}
