/* app2/ui/workbook.css — the workbook layer: the sheet-tabs strip (ui/sheet-tabs.js), the Quick Access
   Toolbar in the ribbon's tab row, the File backstage menu, and the Go To / Excel Options / Page Setup
   cards (ui/ribbon-view.js). Theme tokens only, so every palette is covered; the card look is app.css's
   .pd-box idiom (Format Cells / Paste Special), widened where Excel's dialog is wide. */

/* ---------- sheet tabs (the old build's strip: SHEETS chip, raised current tab) ---------- */
.wb-tabs{display:flex; align-items:flex-end; gap:3px; padding:0 10px; height:38px; flex:none; background:var(--surface2); border-top:1px solid var(--line); overflow-x:auto; scrollbar-width:none}
.wb-tabs::-webkit-scrollbar{display:none}
.wb-lead{font-family:var(--mono); font-size:calc(var(--wb-fs) - 3.5px); font-weight:700; letter-spacing:.14em; color:var(--accent); margin-right:8px; padding:3px 10px; align-self:center; white-space:nowrap; flex:none; border:1px solid currentColor; border-radius:99px; opacity:.92}
.wb-tab{flex:0 0 auto; min-width:52px; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:var(--mono); font-size:calc(var(--wb-fs) - 1px); color:var(--muted); background:var(--surface);
  border:1px solid var(--line); border-bottom:0; border-top:2.5px solid var(--line); border-radius:7px 7px 0 0; padding:8px 15px 9px; cursor:pointer; transition:.12s; user-select:none}
.wb-tab:hover{color:var(--text)}
.wb-tab.cur{color:var(--text); background:var(--bg); font-weight:700; border-color:var(--accent-dim); border-top-color:var(--accent); cursor:default}
.wb-tab.ren{color:var(--accent); border-top-color:var(--accent); box-shadow:0 0 0 2px var(--accent-glow)}   /* being renamed (its name changes on Enter) */
.wb-add{flex:none; align-self:center; margin-left:4px; width:22px; height:22px; border-radius:99px; border:1px solid var(--line); background:var(--surface); color:var(--muted); font-size:calc(var(--wb-fs) + 0.5px); line-height:1; cursor:pointer; padding:0}
.wb-add:hover{color:var(--accent); border-color:var(--accent-dim)}

/* ---------- the tab row with the toolbar and the File tab in it: compact, and a tab label never wraps ---------- */
.rf-tabs{gap:1px; padding-left:6px; padding-right:6px}
.rf-tabs .rf-tab{white-space:nowrap; flex:none; padding-left:9px; padding-right:9px}
.rf-tabs .rf-tools{flex:none; gap:6px}
.rf-tabs .rf-tools .rnote{white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:180px}

/* ---------- Quick Access Toolbar: small icons left of the tabs, numeric KeyTips while Alt is up ---------- */
.rf-qat{display:inline-flex; align-items:center; gap:0; align-self:center; margin-right:4px; padding:0 5px 2px 0; border-right:1px solid var(--line); flex:none}
.rf-qbtn{position:relative; display:inline-grid; place-items:center; width:18px; height:19px; padding:0; border:1px solid transparent; border-radius:4px; background:transparent; color:var(--text); cursor:pointer}
.rf-qbtn:hover{background:var(--surface2); border-color:var(--line)}
.rf-qbtn .rf-ico{display:inline-flex; width:14px; height:14px; align-items:center; justify-content:center}
.rf-qbtn .rf-ico svg{width:14px; height:14px}
.rf-qbtn .rf-ico .ri-g{font-size:calc(var(--xl-fs) - 1px)}
.rf-qbtn.dim{color:var(--muted)}
.rf-qbtn.rf-qmore{width:12px; color:var(--faint); font-size:calc(var(--xl-fs) - 3px)}
.ribbon-full .rf-qbtn > .ri-key{left:50%; transform:translateX(-50%); bottom:-9px}

/* ---------- the File tab (a backstage menu, not a body of groups) ---------- */
.rf-tab.rf-file{color:var(--on-accent); background:var(--accent); border-color:var(--accent); font-weight:700; margin-right:4px}
.rf-tab.rf-file:hover, .rf-tab.rf-file.on{color:var(--on-accent); background:var(--accent-dim); border-color:var(--accent-dim)}
.rf-tab.rf-file k{bottom:-9px}
.rdrop.rdrop-backstage{min-width:230px}
.rdrop-backstage .rdrop-cap{color:var(--accent)}
.rdrop-backstage .rdrop-item{padding:5px 10px 5px 10px}
.rdrop-backstage .rdrop-item.rdrop-last{margin-top:4px; border-top:1px solid var(--line); border-radius:0 0 6px 6px; padding-top:8px}
.ribbon .ri-cmd.dis{opacity:.45}
/* the dialog launcher in a group's name row (Excel's ↘ box) */
.rf-gname{position:relative}
.rf-launch{position:absolute; right:-2px; bottom:0; width:13px; height:13px; padding:0; border:1px solid var(--line); border-radius:2px; background:var(--surface); color:var(--muted); cursor:pointer; display:inline-grid; place-items:center}
.rf-launch:hover{color:var(--accent); border-color:var(--accent-dim)}
.rf-launch svg{width:9px; height:9px}
.ribbon-full .rf-launch > .ri-key{left:auto; right:-3px; bottom:-4px; transform:none}   /* the KeyTip rides on the launcher box, as Excel draws it */
.rf-gname:has(.rf-launch){padding-right:16px}

/* design-guard: keep Excel's own dialogs and tool cards (the Ribbon's Go To, Excel Options, Page Setup, the sheet cards,
   Conditional Formatting, the Formulas and Data tool cards): their tight measurements are Excel's, like the Ribbon's, and
   stay exact (CLAUDE.md: the Ribbon stays as built). Not the site's design system, so not its spacing tokens. */
/* ---------- the workbook cards (Go To, Excel Options, Page Setup, Rename / Delete / Move or Copy Sheet): fixed over the sheet, one tight card ---------- */
#gotoDialog, #optionsDialog, #pagesetupDialog, #renameSheetDialog, #deleteSheetDialog, #moveSheetDialog{position:fixed; z-index:30; display:none; flex-direction:column; font-size:calc(var(--wb-fs) - 1.5px)}
.pd-box.pd-wide{width:690px; max-width:calc(100vw / var(--ws-z) - 16px)}
.pd-box.pd-mid{width:420px; max-width:calc(100vw / var(--ws-z) - 16px)}
.wb-body{font-family:var(--sans); color:var(--text)}
.wb-err{margin:4px 0 2px; font-family:var(--mono); font-size:calc(var(--wb-fs) - 2.5px); color:var(--bad)}
.pd-btn.dis{opacity:.45; cursor:not-allowed}
.pd-foot .pd-spacer{flex:1 1 auto}
.pd-btn .pd-key{margin-left:6px}
/* section header: Excel's bold caption over a rule */
.od-sect{display:flex; align-items:center; gap:8px; margin:6px 0 4px; font-size:calc(var(--wb-fs) - 1.5px); font-weight:700; color:var(--text); white-space:nowrap}
.od-sect::after{content:''; flex:1 1 auto; height:1px; background:var(--line)}
/* rows: radio, checkbox, plain */
.od-row{display:flex; align-items:center; gap:8px; padding:2px 6px; border-radius:6px; font-size:calc(var(--wb-fs) - 1.5px); line-height:1.5; min-height:22px; color:var(--text)}
.od-row.ind{margin-left:22px}
.od-row.ind2{margin-left:44px}
.od-row[data-act]{cursor:pointer}
.od-row[data-act]:hover{background:var(--accent-glow)}
.od-row.on{color:var(--accent)}
.od-row.dis{color:var(--muted); opacity:.6}
.od-row .pd-key{margin-left:auto}
.od-row .pd-radio{width:14px}
.od-box{display:inline-grid; place-items:center; width:13px; height:13px; border:1px solid var(--line); border-radius:3px; background:var(--surface); font-size:calc(var(--wb-fs) - 3.5px); line-height:1; color:var(--accent); flex:none}
.od-box.on{border-color:var(--accent)}
.od-box.on::after{content:'✓'; font-weight:800}
.od-row.foc .od-box, .od-row.foc .pd-radio{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off); border-radius:3px}
.od-lbl{white-space:nowrap}
/* a text/number field with a caret when focused */
.od-field{display:inline-flex; align-items:center; min-width:56px; height:20px; padding:0 6px; border:1px solid var(--line); border-radius:4px; background:var(--surface); font-family:var(--mono); font-size:calc(var(--wb-fs) - 2px); color:var(--text); cursor:text; white-space:nowrap}
.od-field.wide{min-width:180px; flex:1 1 auto}
.od-field.foc{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}   /* the dialog's current control: the kit's one ring (UI-71) */
.od-field.dis{color:var(--muted); cursor:default; background:var(--surface2)}
.od-caret{display:inline-block; width:1px; height:13px; margin-left:1px; background:var(--accent); animation:wb-blink 1s steps(2, start) infinite}
@keyframes wb-blink{to{visibility:hidden}}
.od-combo{display:inline-flex; align-items:center; justify-content:space-between; gap:8px; height:20px; padding:0 6px; border:1px solid var(--line); border-radius:4px; background:var(--surface2); font-family:var(--mono); font-size:calc(var(--wb-fs) - 2.5px); color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%}
.od-combo::after{content:'▾'; color:var(--faint)}
.od-caplbl{font-size:calc(var(--wb-fs) - 2.5px); color:var(--muted); margin:0 0 3px 2px}
.od-unit{color:var(--muted)}
/* Excel Options: page list on the left, the page on the right */
.od-wrap{display:flex; gap:12px; min-height:300px}
.od-pages{flex:0 0 178px; border:1px solid var(--line); border-radius:6px; background:var(--surface2); padding:4px; align-self:stretch}
.od-page{display:flex; align-items:center; justify-content:space-between; gap:6px; padding:3px 7px; border-radius:5px; font-size:calc(var(--wb-fs) - 2px); color:var(--text); white-space:nowrap}
.od-page[data-act]{cursor:pointer}
.od-page[data-act]:hover{background:var(--accent-glow)}
.od-page.dis{color:var(--faint)}
.od-page.on{background:var(--cell-cursor); color:var(--learn-on); font-weight:600}
.od-page.on .pd-key{background:var(--learn-on); color:var(--cell-cursor); border-color:var(--learn-on)}
.od-page.foc{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.od-body{flex:1 1 auto; min-width:0; padding:0 2px}
.od-body h3{margin:0 0 6px; font-size:calc(var(--wb-fs) - 0.5px); font-weight:700; color:var(--text)}
.od-body .od-sub{font-size:calc(var(--wb-fs) - 2px); color:var(--muted); margin:0 0 6px}
/* the Quick Access Toolbar page: two lists and Add / Remove between them */
.od-qat{display:flex; gap:10px; align-items:stretch}
.od-col{flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:4px}
.od-mid{display:flex; flex-direction:column; justify-content:center; gap:8px; flex:none; width:104px}
.od-mid .pd-btn{display:flex; align-items:center; justify-content:space-between; gap:6px; white-space:nowrap; cursor:pointer}
.od-list{height:190px; overflow-y:auto; border:1px solid var(--line); border-radius:5px; background:var(--surface); padding:3px; scrollbar-width:thin}
.od-list.foc{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.od-item{display:flex; align-items:center; gap:7px; padding:2px 6px; border-radius:4px; font-size:calc(var(--wb-fs) - 2px); color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer}
.od-item:hover{background:var(--xl-hover)}
.od-item.on{background:var(--cell-cursor); color:var(--learn-on)}   /* Excel's own list (controls 2d): the cursor's green under a white word; the ink at 8% under the pointer */
.od-item .od-ico{display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; flex:none}
.od-item .od-ico svg{width:14px; height:14px}
.od-item .od-ico .ri-g{font-size:calc(var(--xl-fs) - 1px)}
.od-item.dim{color:var(--muted)}
.od-item.on.dim{color:var(--learn-on); opacity:.85}
/* Page Setup: its tab strip, the two page thumbnails */
.ps-tabs{display:flex; gap:2px; margin:-2px 0 8px; border-bottom:1px solid var(--line)}
.ps-tab{padding:4px 12px 5px; font-family:var(--mono); font-size:calc(var(--wb-fs) - 2px); color:var(--muted); border:1px solid transparent; border-bottom:0; border-radius:6px 6px 0 0}
.ps-tab.on{color:var(--accent); background:var(--surface2); border-color:var(--line); margin-bottom:-1px; padding-bottom:6px; font-weight:600}
.ps-tab.dis{color:var(--faint)}
.ps-orient{display:flex; gap:24px; padding:2px 6px 6px}
.ps-page{display:inline-block; width:14px; height:18px; border:1.5px solid currentColor; border-radius:2px; margin-right:4px; vertical-align:middle; opacity:.8}
.ps-page.land{width:18px; height:14px}
/* Rename Sheet: the prefilled name shows selected until the first key replaces it */
.od-seltext{background:var(--accent); color:var(--on-accent); border-radius:2px; padding:0 1px}
/* Delete Sheet: Excel's message-box line, with its warning mark */
.ds-msg{display:flex; align-items:flex-start; gap:10px; padding:6px 4px 8px; font-size:calc(var(--wb-fs) - 1px); line-height:1.45; color:var(--text)}
.ds-icon{flex:none; display:inline-grid; place-items:center; width:22px; height:22px; border-radius:99px; border:2px solid var(--bad); color:var(--bad); font-family:var(--mono); font-size:calc(var(--wb-fs) - 0.5px); font-weight:800; line-height:1}
.ds-icon.ds-warning, .ds-icon.ds-information{border-color:var(--ink-2); color:var(--ink-2)}   /* the Data Validation alert's Warning and Information styles: a question mark or an i in the quiet ink */
/* Move or Copy: the Before sheet list is as tall as the workbook */
.od-list.mv-list{height:auto; max-height:150px; margin-bottom:6px}
/* Go To: the previous-locations list and the Reference field */
.gt-recent{height:96px; overflow-y:auto; border:1px solid var(--line); border-radius:5px; background:var(--surface); padding:3px; margin-bottom:8px}
.gt-recent .od-item{cursor:default}
.gt-recent .gt-empty{font-family:var(--mono); font-size:calc(var(--wb-fs) - 2.5px); color:var(--faint); padding:4px 6px}
.gt-ref{display:flex; align-items:center; gap:8px; margin:2px 0 4px}
.gt-ref label{font-size:calc(var(--wb-fs) - 1.5px); color:var(--text); white-space:nowrap}

/* ---- Conditional Formatting cards (Chapter 2): the style chips, the galleries, the Rules Manager ---- */
.cf-styles{display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 6px; padding:3px; border-radius:6px}
.cf-styles.foc{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.cf-chip{display:inline-block; padding:2px 8px; border-radius:4px; font-size:calc(var(--wb-fs) - 2px); line-height:1.5; border:1px solid var(--line); cursor:pointer; white-space:nowrap}
.cf-chip.on{outline:2px solid var(--accent); outline-offset:1px}
.cf-gallery{display:flex; flex-wrap:wrap; gap:8px; margin:4px 0 6px}
.cf-tile{display:inline-flex; flex-direction:column; justify-content:center; gap:3px; width:54px; height:40px; padding:5px; border:1px solid var(--line); border-radius:5px; background:var(--surface); cursor:pointer; box-sizing:border-box}
.cf-tile.on{outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent)}
.cf-tile i{display:block; height:6px; border-radius:2px}
.cf-tile.scale{padding:0}
.cf-rules{border:1px solid var(--line); border-radius:6px; background:var(--surface2); padding:4px; margin:4px 0 6px; min-width:460px}
.cf-rule{display:grid; grid-template-columns:1fr 96px 110px 70px; gap:8px; align-items:center}
.cf-rule-h{font-size:calc(var(--wb-fs) - 2.5px); color:var(--muted); font-weight:700; padding:2px 6px}
.cf-rule .od-lbl{overflow:hidden; text-overflow:ellipsis}
.cf-prev{display:inline-block; height:18px; line-height:18px; padding:0 4px; border-radius:3px; font-size:calc(var(--wb-fs) - 2.5px); text-align:center; background:var(--surface); border:1px solid var(--line); min-width:60px}
.cf-empty{padding:8px 6px; font-size:calc(var(--wb-fs) - 1.5px); color:var(--muted)}
.cf-btns{display:flex; flex-wrap:wrap; gap:6px; margin:2px 0 4px}

/* run R1 engine work: Format Cells, Series, Margins, Find All, the note, grouped tabs */
.wb-tab.grp{background:var(--surface2); border-top-color:var(--accent-dim)}
.ps-tabs.foc .ps-tab.on{outline:var(--focus-w) solid var(--cell-cursor); outline-offset:var(--focus-off)}
.ps-btns{display:flex; gap:6px; justify-content:flex-end; margin:6px 0 2px}
.ps-margins{display:grid; grid-template-columns:repeat(3, auto); gap:6px 14px; padding:4px 6px 8px; justify-content:start}
.ps-margin{display:flex; align-items:center; gap:6px; font-size:calc(var(--wb-fs) - 1.5px)}
.fc-number{display:grid; grid-template-columns:160px 1fr; gap:12px}
.fc-cats{height:220px}
.fc-right .od-list{height:auto; max-height:120px}
.fc-sample{min-height:20px; padding:2px 6px; margin-bottom:6px; border-bottom:1px solid var(--line); font-family:var(--mono); font-size:calc(var(--wb-fs) - 1.5px); color:var(--text)}
.od-item.fc-red{color:var(--bad)}
.od-item.fc-red.on{color:var(--learn-on)}
.fc-swatches{display:flex; flex-wrap:wrap; gap:4px; align-items:center}
.fc-swatch{width:16px; height:16px; border:1px solid var(--line); border-radius:3px}
.fc-swatch.on{outline:2px solid var(--accent); outline-offset:1px}
.sr-cols{display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; margin-bottom:6px}
.fd-results{height:auto; max-height:150px; margin-top:6px}
.fd-results .od-item{display:grid; grid-template-columns:1fr 60px 1fr 1fr; gap:6px}
.fd-results .fd-h{font-weight:700; color:var(--muted); cursor:default}
.nt-box{min-height:70px; padding:6px 8px; border:1px solid var(--line); border-radius:4px; background:var(--note-bg); color:var(--note-text); font-family:var(--sans); font-size:calc(var(--wb-fs) - 1.5px); white-space:pre-wrap}

/* ---- the Formulas and Data tool cards (ui/tool-cards.js): Goal Seek, Data Table, Text to Columns, Edit Links, the Watch Window,
   PivotTable, Insert Hyperlink, Style, Sort, Remove Duplicates, Data Validation, Evaluate Formula, Error Checking, the filter menu ---- */
.wb-card{position:fixed; z-index:30; flex-direction:column; font-size:calc(var(--wb-fs) - 1.5px)}
.pd-box.pd-narrow{width:300px; max-width:calc(100vw / var(--ws-z) - 16px)}
.wb-card.wb-pane .pd-box{border-color:var(--accent-dim)}
.wb-card.wb-pane .pd-box.pd-mid{width:330px}
.tc-list{height:auto; max-height:170px}
.tc-list.tc-wide{min-width:100%}
.tc-row.tc-h, .od-item.tc-h{font-weight:700; color:var(--muted); cursor:default; background:transparent}
.tc-links, .tc-watch, .tc-sort{display:grid; gap:6px; width:100%; align-items:center}
.tc-links{grid-template-columns:1fr 80px 50px 70px}
.tc-watch{grid-template-columns:52px 1fr 1fr 48px 1fr 1.4fr}
.tc-sort{grid-template-columns:60px 1fr 1fr 1fr}
.tc-links span, .tc-watch span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.od-item.on .od-combo{color:var(--learn-on); border-color:var(--learn-on); background:transparent}
.od-combo.tc-foc, .od-combo[data-act]{cursor:pointer}
.od-combo.tc-foc{border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-glow); color:var(--text)}
.od-item .od-box{margin-right:2px}
.tc-grid2{display:grid; grid-template-columns:auto 1fr; gap:4px 10px; align-items:center; margin:2px 0 6px}
.tc-grid4{display:grid; grid-template-columns:minmax(90px,1fr) minmax(70px,1fr) minmax(140px,2fr) minmax(70px,auto); gap:0 10px; width:100%}
.tc-val{font-family:var(--mono); font-size:calc(var(--wb-fs) - 2px); color:var(--text); overflow-wrap:anywhere}
.tc-eval{font-family:var(--mono); font-size:calc(var(--wb-fs) - 2px); color:var(--text); min-height:60px; padding:4px 6px; border:1px solid var(--line); border-radius:4px; background:var(--surface); overflow-wrap:anywhere}
.tc-eval u{text-decoration-color:var(--accent); text-decoration-thickness:2px}
.tc-cols2{display:grid; grid-template-columns:1fr 1fr; gap:0 10px}
.tc-preview{max-height:130px; overflow:auto; border:1px solid var(--line); border-radius:4px; background:var(--surface)}
.tc-preview table{border-collapse:collapse; font-family:var(--mono); font-size:calc(var(--wb-fs) - 2.5px)}
.tc-preview th, .tc-preview td{padding:1px 8px; border-right:1px solid var(--line); text-align:left; white-space:nowrap; color:var(--text)}
.tc-preview th{color:var(--muted); background:var(--surface2); cursor:pointer}
.tc-preview .on{background:var(--accent); color:var(--on-accent)}
.tc-areas{display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:2px 0 6px}
.tc-area{border:1px solid var(--line); border-radius:5px; padding:3px 5px; min-height:44px; background:var(--surface2)}
.tc-chip-row{display:flex; flex-wrap:wrap; gap:4px}
.tc-hyper{display:grid; grid-template-columns:170px 1fr; gap:10px}
.tc-linkto{display:flex; flex-direction:column; gap:3px}
.tc-hmain{min-width:0}
.od-lbl.tc-w{min-width:72px}
.tc-errcheck{display:grid; grid-template-columns:1fr 180px; gap:10px}
.tc-errbtns{display:flex; flex-direction:column; gap:5px}
.tc-errbtns .pd-btn, .cf-btns .pd-btn{cursor:pointer}
.tc-andor{display:flex; gap:14px; margin:2px 0}
.tc-dv{max-height:200px}
.wb-card .rdrop-item{display:flex; align-items:center; gap:8px; padding:3px 6px; border-radius:5px; cursor:pointer; color:var(--text)}
.wb-card .rdrop-item:hover{background:var(--accent-glow)}
.ribbon .opt.st-custom, .rdrop .opt.st-custom{font-style:italic}

/* design-guard: end */

/* ---- the outline (nested groups): one bracket per level in the header, the ⊖ / ⊕ in its level's lane, the level buttons in the corner ---- */
:is(#grid, .grid-rh) th .ol-bar{position:absolute; pointer-events:none; background:var(--accent); z-index:8}
:is(#grid, .grid-rh) th.rowhdr .ol-bar{top:0; bottom:0; width:2px; left:calc(2px + (var(--ol-l) - 1) * 6px)}
:is(#grid, .grid-rh) th.rowhdr .ol-bar.end{bottom:3px; border-bottom:2px solid var(--accent); width:5px; background:linear-gradient(var(--accent), var(--accent)) left / 2px 100% no-repeat}
:is(#grid, .grid-rh) tr.hdr th .ol-bar{left:0; right:0; height:2px; top:calc(2px + (var(--ol-l) - 1) * 4px)}
:is(#grid, .grid-rh) tr.hdr th .ol-bar.end{right:3px; border-right:2px solid var(--accent); height:5px; background:linear-gradient(var(--accent), var(--accent)) top / 100% 2px no-repeat}
:is(#grid, .grid-rh) th .ol-btn.lv{left:calc(1px + (var(--ol-l) - 1) * 6px)}
:is(#grid, .grid-rh) th.rowhdr.ol-host{text-align:right}   /* the row's number steps right, out from under its group's button (play run 2026-11-19 row 26: the − over row 20) */
:is(#grid, .grid-rh) tr.hdr th .ol-btn.lv{left:auto; top:calc(1px + (var(--ol-l) - 1) * 4px)}
:is(#grid, .grid-rh) th.ol-corner{overflow:visible}
:is(#grid, .grid-rh) th .ol-lv{position:absolute; display:flex; gap:1px; z-index:9}
:is(#grid, .grid-rh) th .ol-lv.r{left:1px; bottom:1px}
:is(#grid, .grid-rh) th .ol-lv.c{right:1px; top:1px; flex-direction:column}
:is(#grid, .grid-rh) th .ol-lv-b{width:11px; height:11px; padding:0; font-family:var(--mono); font-size:calc(var(--wb-fs) - 5px); line-height:9px; font-weight:700; color:var(--muted); background:var(--surface); border:1px solid var(--line); border-radius:2px; cursor:pointer}
:is(#grid, .grid-rh) th .ol-lv-b:hover{color:var(--on-accent); background:var(--accent); border-color:var(--accent)}

/* ---- Page Break Preview (View › Page Break Preview, Alt W I): the pages in blue, a manual break solid, an automatic one dashed, the page number over each ---- */
#grid td.pbp-out{background:var(--line)}
.pbp{position:absolute; left:0; top:0; pointer-events:none; z-index:5}
.pbp-page{position:absolute; box-sizing:border-box; border:2px solid var(--accent); display:grid; place-items:center; overflow:hidden}
.pbp-page.auto-t{border-top-style:dashed}
.pbp-page.auto-l{border-left-style:dashed}
.pbp-num{font-family:var(--sans); font-size:var(--pbp-fs, 28px); font-weight:700; color:var(--faint); opacity:.55; white-space:nowrap}
