/* Slate boards: Tracker and Board in three layouts (list, desk, rows).
   Hand-off file from mockups/boards/ (card t_2473d8c2, SPEC.md section 11). Copy unchanged to app/web/boards.css.
   Every selector starts with .bd, so no rule in style.css, home.css, review.css or admin.css is restyled.
   Colours come from the app's existing variables; the four extra tones are scoped to .bd. */

/* ---- 1. Root and tokens ---- */
.bd { --bd-late: #ffb799; --bd-faint: #6f7686; --bd-rule: #22262f; --bd-on: #25324a; --bd-sel: #1f2735; --bd-chip: #343a49;
  --bd-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  display: flex; flex-direction: column; height: 100%; min-height: 0; min-width: 0; contain: size layout; }
.bd :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bd-grow { flex: 1; }
.bd-car { width: 14px; color: var(--dim); font-size: 15px; line-height: 1; flex: none; text-align: center; }
.bd-n { color: var(--dim); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- 2. Shared pieces: status dot, person, code, due date, markers ---- */
.bd-st { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.bd-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--bd-faint); flex: none; }
.bd-dot.is-wip { background: var(--wip); border-color: var(--wip); }
.bd-dot.is-review { background: var(--warn); border-color: var(--warn); }
.bd-dot.is-done { background: var(--ok); border-color: var(--ok); }
.bd-dot.is-stop { background: var(--bad); border-color: var(--bad); }
.bd-av { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bd-chip); color: var(--text); font-size: 10px; font-weight: 600; flex: none; letter-spacing: .02em; }
.bd-av.is-none { background: transparent; border: 1px dashed var(--bd-faint); }
.bd-av.is-mine { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }
.bd-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.bd-who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-who.is-none { color: var(--dim); }
.bd-code { font-family: var(--bd-mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.bd-due { white-space: nowrap; color: var(--dim); font-size: 13px; }
.bd-due.is-late { color: var(--bd-late); font-weight: 600; }
.bd-due.is-soon { color: var(--text); }
.bd-flag { color: var(--bd-late); font-size: 12px; white-space: nowrap; }
.bd-wait { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-wait::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border: 1.5px solid var(--dim); transform: rotate(45deg) translate(-1px, -1px); }
.bd-step { white-space: nowrap; }
.bd-kind { color: var(--dim); font-size: 12px; white-space: nowrap; }
button.bd-open { background: transparent; border: 0; border-radius: 3px; padding: 2px 4px; margin: 0 -4px; cursor: pointer; }
button.bd-open:hover { color: var(--text); text-decoration: underline; }

/* ---- 3. Toolbar: search, counted toggles, Filters row, count, switches ---- */
.bd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--line); min-height: 51px; flex: none; }
.bd-more { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--panel); flex: none; }
.bd-sep { width: 1px; height: 20px; background: var(--line); flex: none; }
input.bd-search { flex: 1 1 120px; min-width: 120px; max-width: 240px; padding: 5px 8px; }
select.bd-pick { flex: none; padding: 4px 4px; font-size: 13px; }
button.bd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: transparent; border: 1px solid var(--line); color: var(--dim); font-size: 13px; flex: none; white-space: nowrap; }
button.bd-chip b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
button.bd-chip[aria-pressed="true"] { background: var(--bd-on); border-color: var(--accent); color: var(--text); }
button.bd-chip.is-zero b { color: var(--dim); }
button.bd-chip[aria-disabled="true"] { opacity: .55; cursor: default; }
button.bd-chip[aria-disabled="true"]:hover { border-color: var(--line); }
button.bd-link { display: inline-flex; align-items: center; gap: 5px; background: transparent; border-color: transparent; color: var(--dim); padding: 4px 6px; font-size: 13px; flex: none; white-space: nowrap; }
button.bd-link:hover { border-color: var(--line); color: var(--text); }
button.bd-link[aria-expanded="true"] { color: var(--text); }
button.bd-link.is-accent { color: var(--accent); }
button.bd-link.is-accent:hover { border-color: var(--accent); }
button.bd-link b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.bd-count { color: var(--dim); font-size: 12.5px; white-space: nowrap; }
.bd-seg { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bd-seg button { background: transparent; border: 0; border-radius: 0; padding: 4px 10px; color: var(--dim); font-size: 13px; }
.bd-seg button + button { border-left: 1px solid var(--line); }
.bd-seg button:hover { color: var(--text); }
.bd-seg button[aria-checked="true"] { background: var(--bd-on); color: var(--text); font-weight: 600; }
.bd-seg button:focus-visible { outline-offset: -2px; }
.bd-seg button[aria-disabled="true"] { opacity: .5; cursor: default; }

/* ---- 4. States: loading, empty, failed ---- */
.bd-state { margin: 56px auto; color: var(--dim); }
.bd-empty { margin: 56px auto; max-width: 420px; text-align: center; color: var(--dim); padding: 0 16px; }
.bd-empty h3 { margin: 0 0 6px; color: var(--text); font-size: 15px; font-weight: 600; }
.bd-empty p { margin: 0 0 14px; }
button.bd-primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- 5. Layout list, Tracker ---- */
.bd-list { flex: 1; overflow: auto; min-height: 0; }
.bd-cols, .bd-row { display: grid; grid-template-columns: 122px minmax(200px, 640px) 190px 150px; align-items: center; column-gap: 12px; padding: 0 16px 0 40px; }
.bd-list.is-client .bd-cols, .bd-list.is-client .bd-row { grid-template-columns: 122px minmax(200px, 640px); }
.bd-cols { position: sticky; top: 0; z-index: 2; background: var(--bg); height: 30px; color: var(--dim); font-size: 12px; border-bottom: 1px solid var(--line); }
.bd-cols-end { position: absolute; right: 10px; top: 0; height: 29px; display: flex; align-items: center; gap: 4px; background: var(--bg); padding-left: 8px; }
.bd-cols-end button.bd-link { font-size: 12px; padding: 2px 6px; }
button.bd-row { height: 34px; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--bd-rule); border-radius: 0; text-align: left; }
button.bd-row:hover { background: var(--panel); }
button.bd-row[aria-current="true"], button.bd-trow[aria-current="true"], button.bd-tr[aria-current="true"] { background: var(--bd-sel); box-shadow: inset 3px 0 0 var(--accent); }
.bd-row .bd-st { font-size: 13px; color: var(--dim); }
.bd-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.bd-name strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-row.is-quiet .bd-name strong, .bd-row.is-quiet .bd-step { font-weight: 400; color: var(--dim); }
.bd-grp { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 max(16px, calc(100% - 1178px)) 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 30px; z-index: 1; cursor: pointer; }
button.bd-grp-t { display: inline-flex; align-items: center; gap: 10px; height: 30px; background: transparent; border: 0; padding: 0 4px 0 0; font-size: 14px; min-width: 0; }
.bd-grp-t strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-prog { display: inline-flex; gap: 2px; flex: none; }
.bd-prog i { width: 14px; height: 5px; border-radius: 2px; background: var(--line); }
.bd-prog i.is-wip, .bd-prog i.is-review { background: #8a92a6; }
.bd-prog i.is-done { background: var(--ok); opacity: .75; }
.bd-prog i.is-stop { background: var(--bad); }

/* ---- 6. Status lanes and cards (Board in list and rows) ---- */
.bd-lanes { flex: 1; min-height: 0; display: flex; gap: 10px; padding: 12px 16px; overflow-x: auto; }
.bd-lane { flex: 1 1 0; min-width: 200px; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.bd-lane > h3 { margin: 0; padding: 9px 10px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.bd-lane > h3 .bd-n { margin-left: auto; }
.bd-lane.is-over, .bd-cell.is-over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.bd-stack { overflow-y: auto; padding: 0 8px 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-content: start; }
button.bd-lane.is-slim { flex: 0 0 46px; min-width: 46px; align-items: center; padding: 10px 0; gap: 10px; color: var(--dim); }
.bd-lane.is-slim .bd-v { writing-mode: vertical-rl; font-size: 13px; font-weight: 600; color: var(--text); }
button.bd-card, button.bd-scard { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; text-align: left; display: grid; gap: 3px; width: 100%; min-width: 0; }
button.bd-card[aria-current="true"], button.bd-scard[aria-current="true"], button.bd-tl[aria-current="true"] { border-color: var(--accent); }
.bd-card-t { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-card-s { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--dim); min-width: 0; }
.bd-card-s .bd-code { overflow: hidden; text-overflow: ellipsis; }
.bd-card-s .bd-due, .bd-card-s .bd-wait { margin-left: auto; font-size: 12.5px; }
.bd-card-f { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-top: 2px; min-width: 0; }
.bd-card-f .bd-due { margin-left: auto; font-size: 12.5px; }
.bd-card.is-quiet .bd-card-t { font-weight: 500; color: var(--dim); }
button.bd-morebtn { background: transparent; border-style: dashed; color: var(--dim); font-size: 12.5px; }
.bd-none { color: var(--dim); font-size: 12.5px; padding: 4px 4px 8px; }

/* ---- 7. Layout desk: view rail, two-line rows, swimlanes ---- */
.bd-desk { flex: 1; min-height: 0; display: grid; grid-template-columns: 184px minmax(0, 1fr); }
.bd-views { border-right: 1px solid var(--line); padding: 12px 8px; overflow-y: auto; }
.bd-views h4 { margin: 14px 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.bd-views h4:first-child { margin-top: 2px; }
button.bd-view { display: flex; align-items: center; width: 100%; gap: 8px; padding: 6px 8px; background: transparent; border: 1px solid transparent; border-radius: 6px; text-align: left; color: var(--dim); }
button.bd-view:hover { background: var(--panel); border-color: transparent; }
button.bd-view[aria-current="true"] { background: var(--panel2); color: var(--text); font-weight: 600; }
button.bd-view[aria-disabled="true"] { opacity: .55; cursor: default; }
.bd-view .bd-n { margin-left: auto; }
.bd-view .bd-n.is-hot { color: var(--bd-late); font-weight: 600; }
.bd-add { display: block; margin: 12px 2px 0; }
.bd-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; container-type: inline-size; }
.bd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); min-height: 51px; flex: none; }
.bd-head h1 { margin: 0; font-size: 17px; font-weight: 650; white-space: nowrap; }
.bd-head p { margin: 0; color: var(--dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.bd-head input.bd-search { flex: 0 1 200px; }
.bd-tbl { flex: 1; overflow: auto; min-height: 0; }
.bd-th, .bd-tr { display: grid; grid-template-columns: 106px minmax(180px, 560px) 146px 84px; column-gap: 12px; align-items: center; padding: 0 16px; }
.bd-th { position: sticky; top: 0; z-index: 1; height: 32px; background: var(--bg); border-bottom: 1px solid var(--line); }
.bd-th button { background: transparent; border: 0; padding: 4px 0; text-align: left; color: var(--dim); font-size: 12px; border-radius: 3px; }
.bd-th button.is-on { color: var(--text); }
button.bd-tr { min-height: 52px; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--bd-rule); border-radius: 0; text-align: left; }
button.bd-tr:hover { background: var(--panel); }
.bd-tr .bd-st { font-size: 13px; }
.bd-tr-main { min-width: 0; }
.bd-tr-1 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-tr-1 strong { font-weight: 600; }
.bd-tr-1 .bd-step::before { content: '·'; margin: 0 7px; color: var(--dim); }
.bd-tr-2 { display: flex; gap: 12px; font-size: 12px; color: var(--dim); min-width: 0; margin-top: 1px; }
.bd-two { display: grid; min-width: 0; }
.bd-two small { font-size: 12px; color: var(--dim); }
.bd-two small.bd-flag { color: var(--bd-late); }
.bd-two .bd-due { font-size: 13.5px; }
.bd-swim { flex: 1; overflow: auto; min-height: 0; }
.bd-swhead, .bd-swcells { display: grid; grid-template-columns: repeat(var(--bd-cols, 5), minmax(150px, 1fr)); gap: 8px; padding: 0 16px; }
.bd-swhead { position: sticky; top: 0; z-index: 2; background: var(--bg); height: 34px; align-items: center; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
button.bd-swtitle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 16px 7px; background: transparent; border: 0; border-radius: 0; text-align: left; }
.bd-swtitle small { color: var(--dim); font-size: 12.5px; }
.bd-swcells { padding-bottom: 12px; border-bottom: 1px solid var(--line); align-items: stretch; }
.bd-cell { display: grid; gap: 6px; align-content: start; min-height: 30px; min-width: 0; border-radius: 6px; }
button.bd-scard { padding: 6px 9px; gap: 2px; }
.bd-tbl.is-client .bd-th, .bd-tbl.is-client .bd-tr { grid-template-columns: 106px minmax(180px, 560px); }
.bd-swim.is-client .bd-swcells { padding-top: 10px; border-bottom: 0; }

/* ---- 8. Layout rows: one row per shot or asset with its step strip ---- */
.bd-rows { flex: 1; overflow: auto; min-height: 0; padding-bottom: 20px; container-type: inline-size; --bd-cw: clamp(104px, calc((100cqw - 432px) / 6), 150px); }
.bd-sect { display: flex; align-items: baseline; gap: 10px; padding: 16px 16px 6px; }
.bd-sect h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.bd-sect .bd-code { font-size: 11px; }
.bd-cols.bd-rcols { grid-template-columns: 224px minmax(0, calc(var(--bd-cw) * 6 + 25px)) 112px; column-gap: 10px; padding: 0 16px; }
.bd-rcols > span:first-child { padding-left: 24px; }
.bd-prow { display: grid; grid-template-columns: 224px minmax(0, calc(var(--bd-cw) * 6 + 25px)) 112px; column-gap: 10px; align-items: center; min-height: 46px; padding: 4px 16px; border-top: 1px solid var(--bd-rule); cursor: pointer; }
.bd-prow:hover, .bd-prow.is-open { background: var(--panel); }
.bd-prow-n { display: grid; min-width: 0; justify-items: start; }
button.bd-prow-t { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; background: transparent; border: 0; padding: 0; text-align: left; }
.bd-prow-t strong { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-prow-n button.bd-open { margin-left: 20px; }
.bd-sum { text-align: right; font-size: 12.5px; color: var(--dim); display: grid; }
.bd-strip { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.bd-sc { display: flex; align-items: center; gap: 5px; width: var(--bd-cw); height: 28px; padding: 0 4px 0 7px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; color: var(--dim); flex: none; }
.bd-lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.bd-sc .bd-av { width: 17px; height: 17px; font-size: 9px; }
.bd-sc.is-wip, .bd-sc.is-review, .bd-sc.is-stop { background: var(--panel2); border-color: var(--line); color: var(--text); }
.bd-sc.is-none.is-owned { border-color: var(--line); }
.bd-sc.is-late { border-color: var(--bd-late); color: var(--bd-late); }
.bd-sc.is-blocked .bd-lb::after { content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 6px; border: 1.5px solid currentColor; transform: rotate(45deg) translateY(-1px); opacity: .8; }
.bd-sc.is-missing { border: 1px dashed var(--bd-rule); color: var(--bd-faint); padding-left: 21px; }
.bd-sc.is-extra { width: auto; padding: 0 8px; border-color: var(--line); }
.bd-sc.is-here { background: var(--panel2); border-color: var(--line); color: var(--text); font-weight: 600; }
.bd-sc.is-path { padding-left: 21px; }
.bd-prow.is-client .bd-prow-n { padding-left: 24px; }
.bd-sc.is-off, .bd-trow.is-off { opacity: .3; }
button.bd-trow { display: grid; grid-template-columns: 112px 130px minmax(120px, 460px) 170px 140px; column-gap: 12px; align-items: center; height: 32px; padding: 0 16px 0 42px; background: #181b21; border: 0; border-top: 1px solid var(--bd-rule); border-radius: 0; width: 100%; text-align: left; font-size: 13px; }
button.bd-trow.is-wide { grid-template-columns: 112px minmax(250px, 602px) 170px 140px; }
button.bd-trow:hover { background: var(--panel2); }
.bd-trow .bd-st { color: var(--dim); }
.bd-trow strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-mid { display: flex; gap: 12px; min-width: 0; align-items: baseline; }
.bd-trow.is-quiet strong { font-weight: 400; color: var(--dim); }
.bd-pc { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px 6px; min-width: 0; }
.bd-pc-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; min-width: 0; }
.bd-pc-h strong { font-size: 13.5px; white-space: nowrap; flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bd-pc-h .bd-code { overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
button.bd-tl { display: flex; align-items: center; gap: 7px; width: calc(100% + 8px); padding: 3px 4px; margin: 0 -4px; background: transparent; border: 0; border-radius: 4px; text-align: left; font-size: 12.5px; }
button.bd-tl:hover { background: #2b303c; }
.bd-tl .bd-av { width: 18px; height: 18px; font-size: 9px; }
.bd-tl .bd-due, .bd-tl .bd-wait { font-size: 12px; flex: none; }
button.bd-tl.is-rest { display: block; color: var(--dim); white-space: normal; }

/* ---- 9. Narrow windows and the open drawer ---- */
@container (max-width: 760px) {
  .bd-head p { display: none; }
}
@container (max-width: 660px) {
  .bd-th, .bd-tr { grid-template-columns: 106px minmax(180px, 560px) 26px 84px; }
  .bd-tr .bd-who > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .bd-th button:nth-child(3) { width: 26px; overflow: hidden; white-space: nowrap; color: transparent; }
  .bd-th button:nth-child(3):focus-visible, .bd-th button:nth-child(3).is-on { color: var(--text); overflow: visible; }
}
@media (max-width: 1100px) {
  .bd-desk { grid-template-columns: 148px minmax(0, 1fr); }
}

/* Gemini finish-line board layout switcher additions */
.board-toolbar { flex-wrap: wrap; gap: 8px; }
.board-toolbar-count { margin-left: auto; }
.bd-body { contain: layout; }
.bd-list { display: flex; flex-direction: column; gap: 14px; }
.bd-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bd-steps { display: flex; flex-direction: column; gap: 10px; }
.bd-step-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.bd-step-parent { min-width: 170px; display: flex; flex-direction: column; gap: 2px; }
.bd-step-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-step-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel2, transparent); color: var(--text); cursor: pointer; }
.bd-step-chip:hover { border-color: var(--accent-fill, #2862c8); }
