/* PC XML Filter, web version: the desktop window's look (Windows, ttk) in a browser. Colours that are rules
   (the DC strip, our terms, quick-box dots, filter line) are set by app.js from the rule files. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 13px "Segoe UI", Tahoma, Arial, sans-serif; color: #000; background: #f0f0f0; }
button { font: inherit; padding: 2px 10px; border: 1px solid #adadad; background: #e1e1e1; border-radius: 0; cursor: pointer; }
button:hover:not(:disabled) { background: #e5f1fb; border-color: #0078d7; }
button:disabled { color: #a0a0a0; cursor: default; }
input[type=text], input[type=password], textarea, select { font: inherit; border: 1px solid #7a7a7a; padding: 2px 4px; background: #fff; }
.grey { color: #555; }
.red, .err { color: #c00000; }
.note { color: #1f4e99; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

#app { display: flex; flex-direction: column; height: 100vh; }
.dcstrip { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; text-align: center;
  color: #fff; background: #c00000; font-weight: bold; font-size: 15px; padding: 3px 6px; }   /* DATES.md rule 30: centered together */
.dcstrip button { font-weight: normal; font-size: 12px; padding: 0 8px; }
.dcstrip #refresh { margin-left: 12px; }
.ruleline { color: #c00000; padding: 2px 8px; background: #fff3f3; }
.sourcebar { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid #d0d0d0; }
.sourcebar form { margin: 0; }
.sourcebar.dragover { background: #dbeaff; outline: 2px dashed #1f4e99; }
.apptitle { font-weight: bold; }
.apptitle .edition { font-weight: normal; color: #555; }
.sources { color: #333; max-width: 35vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary.red { color: #c00000; }
.clientnote { padding: 2px 8px; white-space: pre-wrap; font-size: 12px; }
.notice { padding: 4px 8px; background: #fff8e0; border-bottom: 1px solid #e0d090; white-space: pre-wrap; }
.notice.red { background: #fff0f0; color: #c00000; border-color: #e0a0a0; }

.filterarea { padding: 4px 8px 6px; border-bottom: 1px solid #c8c8c8; overflow: auto; max-height: 45vh; resize: vertical; }
.askrow, .filterrow { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.askrow input { flex: 1; }
.askanswer { border: 1px solid #c8c8c8; background: #fafafa; padding: 4px 8px; margin: 4px 0 2px; }
.askanswer .filtertext { font-family: Consolas, "Courier New", monospace; }
.askanswer .badge { font-weight: bold; margin-left: 8px; }
.askanswer .lowline { color: #c00000; font-weight: bold; }
.askanswer .lines div { white-space: pre-wrap; }
.filterlabel { font-weight: bold; margin-top: 8px; display: block; }
.boxwrap { position: relative; flex: 1; }
.boxwrap .shadow, .boxwrap textarea { font: 13px Consolas, "Courier New", monospace; padding: 4px 6px; margin: 0;
  white-space: pre-wrap; word-wrap: break-word; line-height: 18px; border: 1px solid #7a7a7a; width: 100%; min-height: 48px; }
.boxwrap .shadow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-color: transparent; background: #fff; }
.boxwrap textarea { position: relative; background: transparent; resize: vertical; display: block; color: transparent; caret-color: #000; }
.boxwrap .shadow .ours { border-bottom: 2px dotted; }
.boxwrap .shadow .bad { background: #ffd0d0; }
/* wave 20-web W4: the grey X sits at the right end of the box (its colours and size: GRID.md clear_x) */
.boxwrap .clearx { position: absolute; top: 2px; right: 6px; z-index: 2; cursor: pointer; line-height: 1; }
.boxwrap .clearx[hidden] { display: none; }
.filternotes { min-height: 16px; margin-top: 2px; white-space: pre-wrap; }

.tabs { display: flex; gap: 0; padding: 4px 8px 0; border-bottom: 1px solid #adadad; }
.tabs button { border-bottom: none; margin-right: -1px; background: #f0f0f0; padding: 3px 14px; }
.tabs button.on { background: #fff; position: relative; top: 1px; font-weight: bold; }
.tabbody { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #fff; }
.tabbar { display: flex; align-items: center; gap: 8px; padding: 4px 8px; flex-wrap: wrap; border-bottom: 1px solid #e0e0e0; background: #f7f7f7; }
.filterline { color: #1f4e99; }
.split { flex: 1; display: flex; min-height: 0; }
.left { flex: 1; min-width: var(--case-list-min, 200px); display: flex; flex-direction: column; min-height: 0; }
.divider { width: 8px; cursor: col-resize; background: #e6e6e6; border-left: 1px solid #ccc; border-right: 1px solid #ccc; }
.panel { width: 380px; min-width: 120px; display: flex; flex-direction: column; min-height: 0; }
.statusbar { padding: 3px 8px; border-top: 1px solid #c8c8c8; background: #f0f0f0; }
#status { white-space: pre-wrap; }   /* keep the core's "   " before the history note, as the desktop shows it */

/* tables (grid, events, status, deadlines, case panel) */
.tablewrap { flex: 1; overflow: auto; min-height: 0; position: relative; }
table.grid { border-collapse: collapse; table-layout: fixed; font-size: 12px; }
table.grid th, table.grid td { border: 1px solid #d4d4d4; padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
table.grid th { background: #f3f3f3; position: sticky; top: 0; z-index: 2; font-weight: normal; cursor: pointer; user-select: none; }
table.grid tr.qrow th { top: 21px; background: #fafafa; padding: 1px; cursor: default; }
table.grid thead.boxesfirst tr.qrow th { top: 0; }            /* wave 22-web J-4: boxes above the titles (panel lists) */
table.grid tbody tr:hover { background: #eef5ff; }
table.grid tbody tr.sel { background: #cce4ff; }
table.grid td.grey { color: #808080; }
table.grid td.sel { outline: 2px solid #1f4e99; outline-offset: -2px; }
table.grid tr.late td { color: #c00000; }
table.grid tr.heading td { font-weight: bold; background: #eef1f6; }
.qbox { display: flex; align-items: center; border: 1px solid #7a7a7a; background: #fff; height: 19px; }
.qbox .dot { width: 9px; height: 9px; border-radius: 50%; margin: 0 3px; flex: none; cursor: pointer; border: 1px solid #c4c4c4; }
.qbox .tag { font-size: 10px; margin-right: 2px; flex: none; }
.qbox input { border: none; width: 100%; min-width: 0; padding: 0 2px; font-size: 12px; outline: none; background: transparent; }
/* wave 22-web J-5: a box with the focus grows over the next columns (its widths: GRID.md Grid numbers) */
.qbox.grown { position: relative; z-index: 6; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
table.grid tr.qrow th:focus-within { z-index: 7; }         /* ... above the boxes of the next columns */
.panel .ptabs { display: flex; padding: 4px 4px 0; border-bottom: 1px solid #adadad; overflow-x: auto; overflow-y: hidden; }
.panel .ptabs button { border-bottom: none; padding: 2px 8px; margin-right: -1px; white-space: nowrap; flex: none; }
.panel .ptabs button.on { background: #fff; font-weight: bold; position: relative; top: 1px; }
/* wave 28-web Q-4 (GRID.md rule 23, decided: A): the case panel's tabs wrap onto 2 rows or more; every name whole */
.panel .ptabs.wrap { flex-wrap: wrap; overflow-x: visible; row-gap: 2px; }
.panel .pbody { flex: 1; overflow: auto; padding: 6px; white-space: pre-wrap; font-size: 12px; }
.panel .pbody .lbl { font-weight: bold; }
.panel .pbody .pnote { color: #555; }
.dgrid { border-collapse: collapse; table-layout: fixed; width: 100%; font-size: 12px; outline: none; }
.dgrid td { border: 1px solid #b0b0b0; padding: 2px 4px; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; cursor: default; }
.dgrid col.cn { width: 20%; }
.dgrid col.cv { width: 30%; }
.dgrid td.on { background: #cce4ff; }
/* wave 22-web J-7: the QA tab - name | value, one field per row (the line's width and colour: TRANSACTIONS.md qa_tab.line) */
.qagrid col.cn { width: 40%; }
.qagrid col.cv { width: 60%; }
.qagrid td.qaline { padding: 0; height: 0; border-left: none; border-right: none; }
.dgrid td.dhead { font-weight: bold; }
.dgrid td.dnote { color: #555; }
.panel .phead { display: flex; gap: 6px; align-items: center; padding: 3px 6px; }


.menu { position: fixed; z-index: 50; background: #fff; border: 1px solid #999; box-shadow: 2px 2px 6px rgba(0,0,0,.25); padding: 2px 0; max-height: 70vh; overflow: auto; min-width: 180px; }
.menu div { padding: 3px 18px 3px 22px; cursor: pointer; white-space: nowrap; position: relative; }
.menu div:hover { background: #cce4ff; }
.menu div.on::before { content: "\2713"; position: absolute; left: 6px; }
.menu div.head { font-weight: bold; cursor: default; color: #555; }
.menu div.head:hover { background: none; }
.menu div.disabled { color: #808080; cursor: default; }        /* GRID.md rule 33 (wave 28B): a greyed line */
.menu div.disabled:hover { background: none; }
.menu hr { border: none; border-top: 1px solid #ddd; margin: 2px 0; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 40; display: flex; align-items: center; justify-content: center; }
.modalbox { background: #f0f0f0; border: 1px solid #888; width: min(1000px, 92vw); max-height: 85vh; display: flex; flex-direction: column; }
.modalhead { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-bottom: 1px solid #ccc; }
.modalbody { padding: 8px; overflow: auto; white-space: pre-wrap; font-size: 12px; background: #fff; }

body.login { display: flex; align-items: center; justify-content: center; height: 100vh; }
.loginbox { background: #fff; border: 1px solid #aaa; padding: 20px 26px; width: 420px; display: flex; flex-direction: column; gap: 10px; }
.loginbox h1 { font-size: 18px; margin: 0; }
.loginbox .edition { font-size: 13px; color: #555; font-weight: normal; }
.ownframe { margin: 4px 8px; padding: 2px 8px 6px; border: 1px solid #c8c8c8; }
.ownframe .ownbox { flex: 1; font-family: Consolas, monospace; }
.appsline { margin-left: 12px; }
.grid th { position: relative; }
.grid th .hx { position: absolute; right: 2px; top: 1px; color: #c00000; font-size: 10px; cursor: pointer; padding: 0 2px; }
.grid th .hx:hover { background: #ffd0d0; }
.grid th .ha { position: absolute; right: 16px; top: 1px; font-size: 11px; cursor: pointer; padding: 0 2px; }
.grid th .ha:hover { background: #e8e8e8; }
.grid th .hname { padding-right: 12px; }
/* GRID.md rule 25 (wave 14 C2): titles wrap at word boundaries (a word longer than the column is cut as before);
   the row is as tall as the tallest title, up to wrap_titles.max_lines (set on each title from the rules) */
table.grid thead tr:first-child th { white-space: normal; vertical-align: bottom; }
.grid th .hname { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal;
  word-break: normal; white-space: normal; }
#casedatehead { cursor: pointer; }
.menu .subline { position: relative; }
.menu .subline.boldline { font-weight: bold; }
.menu .submenu { position: fixed; padding: 2px 0; font-weight: normal; max-height: 70vh; overflow-y: auto; }
.menu hr.bold { border-top: 2px solid #333; }
.copynote { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #fff8c4; color: #333;
  border: 1px solid #333; padding: 2px 8px; z-index: 50; }
.countline { font-weight: bold; margin-top: 2px; }
.suggest button { margin-top: 2px; }
/* GRID.md rule 16 (wave 15 C1): a selected block of cells; dragging selects cells, not text */
table.grid td.bsel { background: #cce4ff; }
table.grid tbody { user-select: none; }
/* GRID.md rule 35 (wave 28E item 7b): the case panel's lists (and the summary windows) let a drag select text in a
   cell; a drag that leaves its row selects rows as before, so its text highlight is not shown */
table.listgrid tbody { user-select: text; }
table.listgrid.rowdrag tbody ::selection { background: transparent; }
/* GRID.md rule 25 (wave 15 W1): cell VALUES never wrap - only titles (above) and the details grid (.dgrid) do */
table.grid tbody td { white-space: nowrap; }

/* GRID.md rule 29 (wave 16 T4): "Arrange columns..." and dragging a column title; DEADLINES.md rule 23: the note's cell */
.arrange { min-width: 640px; }
.arrcols { display: flex; gap: 8px; align-items: stretch; }
.arrcol { flex: 1; display: flex; flex-direction: column; min-width: 220px; }
.arrhead { font-weight: bold; margin-bottom: 3px; }
.arrlist { border: 1px solid #7a7a7a; background: #fff; height: 300px; overflow-y: auto; user-select: none; }
.arritem { padding: 1px 6px; white-space: nowrap; cursor: default; }
.arritem.on { background: #0078d7; color: #fff !important; }
.arrmid { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.arrhint { margin-top: 6px; }
.arrfoot { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
table.grid tr.titledrag th { cursor: col-resize; }
.tablewrap .dropline { position: absolute; z-index: 5; pointer-events: none; }   /* GRID.md rule 30: where it lands */
table.grid td.tipcell { cursor: help; }

.updatebar { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-bottom: 1px solid #d0d0d0; flex-wrap: wrap; }

/* wave beta B4 (ACCOUNTS.md rule 16): the gateway screen and the small link back to it */
body.gateway { margin: 0; }
.gwtop { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid #d0d0d0; }
.gwtop form { margin: 0; }
.gwbox { max-width: 760px; margin: 20px auto; padding: 0 16px; }
.gwbox h1 { font-size: 20px; }
.gwmethods { display: flex; flex-direction: column; gap: 12px; }
.gwmethod { border: 1px solid #c8c8c8; background: #fff; padding: 10px 14px; }
.gwmethod p { margin: 4px 0 8px; }
.gwprogress { margin-top: 12px; }
.gwpre { white-space: pre-wrap; font-family: Consolas, monospace; font-size: 12px; }
.gwgo { margin-top: 18px; }
.gwgobtn { display: inline-block; padding: 6px 18px; border: 1px solid #0078d7; background: #e5f1fb; color: inherit; text-decoration: none; }
.addapps { font-size: 12px; }
.tabs #bigupdate { margin: 0 0 4px; align-self: center; }   /* wave beta B5: colour and size from ACCOUNTS.md big_update */
#userline { white-space: nowrap; }

/* wave 21 I-13: the Documents tab's Download column (colours: DOWNLOADS.md) */
.dlword { cursor: pointer; text-decoration: underline; }
.dlword.off { cursor: default; text-decoration: none; }
/* wave 21 I-19: the case Deadlines tab's section titles (colours: DEADLINES.md case_tab.sections) */
td.secthead { font-weight: bold; padding-top: 6px; }
/* wave 22-web J-1: the strip at a title's right border that drags the width (its width: GRID.md Grid numbers) */
.grid th .rgrip { position: absolute; top: 0; right: 0; bottom: 0; cursor: col-resize; z-index: 3; }
.grid tr.resizing th, .grid tr.resizing th * { cursor: col-resize; }
/* wave 22-web J-9: the line above the foreign priority claims (its width and colour: TRANSACTIONS.md continuity_line) */
.panel .pbody .pline { margin: 8px 0 2px; height: 0; }
/* wave 22-web J-16: a download that is not possible (not public) - greyed but clickable (it says why) */
button.off { color: #9a9a9a; border-color: #c8c8c8; background: #f4f4f4; }
/* wave 22-web J-14: the Smart download panel - BESIDE the window's content, never a blocking window (no overlay) */
.smartpanel { position: fixed; right: 12px; top: 90px; width: 380px; max-height: 80vh; overflow: auto; background: #fff;
  border: 1px solid #888; box-shadow: 0 2px 10px rgba(0,0,0,.25); z-index: 35; padding: 8px; font-size: 12px; }
.smartpanel .smarthead { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.smartpanel .smartgroup { border-top: 1px solid #ddd; padding: 4px 0; }
.smartpanel .smartopt { display: block; margin: 2px 0 2px 8px; }
.smartpanel .smartpack, .smartpanel .smartfmt { margin: 4px 0 4px 18px; }
.smartpanel .smartline { white-space: pre-wrap; margin: 6px 0; min-height: 14px; }
.smartpanel .smartbtns { margin-top: 6px; }

/* wave 23-web (INTAKE.md): the "Find cases" area on the gateway and the old mode's page */
.intake { border: 1px solid #c8c8c8; background: #fff; padding: 10px 14px; margin: 14px 0; }
.intake h2 { font-size: 17px; margin: 4px 0; }
.intake h3 { font-size: 14px; margin: 12px 0 4px; }
.intaketabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
.intaketab { border: 1px solid #c8c8c8; background: #f2f2f2; padding: 3px 10px; cursor: pointer; }
.intaketab.on { background: #fff; border-bottom-color: #fff; font-weight: bold; }
.intakebody { border: 1px solid #c8c8c8; padding: 8px; }
.intakebody textarea { width: 100%; box-sizing: border-box; font-family: Consolas, monospace; font-size: 12px; }
.intakefield { display: block; margin: 3px 0; }
.intakefield span { display: inline-block; min-width: 200px; }
.intakegrid { border-collapse: collapse; margin: 4px 0; font-size: 12px; max-width: 100%; }
.intakegrid th, .intakegrid td { border: 1px solid #d0d0d0; padding: 2px 6px; text-align: left; vertical-align: top;
  white-space: normal; overflow-wrap: anywhere; }
.intakegrid tr.intakebatch { cursor: pointer; }
.intakegrid tr.on td { background: #eef4ff; }
.intakegrid td.warn { color: #9a5b00; }
.intakebuttons, .intakeremove { margin: 8px 0; }

/* wave 26-web N-3 (MANAGE.md rules 5-7): the progress panel and the result box (the outcome colours come from the md) */
.pcxp-run { border: 1px solid #9cc3f0; background: #f4f9ff; border-radius: 6px; padding: 8px 10px; margin: 8px 0; }
.pcxp-name { display: block; margin-bottom: 4px; }
.pcxp-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.pcxp-pill { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #e6e9ee; color: #555; }
.pcxp-pill.done { background: #dff3e4; color: #1e6b34; }
.pcxp-pill.now { background: #d6e6fb; color: #174a8b; font-weight: bold; }
.pcxp-bar { height: 8px; background: #e6e9ee; border-radius: 4px; overflow: hidden; margin: 4px 0; }
.pcxp-fill { height: 100%; width: 0; background: #2b6cd4; transition: width .3s; }
.pcxp-note { margin: 4px 0; font-size: 12px; }
.pcxp-result { border: 1px solid #8fcf9f; background: #fbfffb; border-radius: 6px; padding: 8px 10px; margin: 8px 0; }
.pcxp-result.red { border-color: #e3a1a1; }
.pcxp-head { display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px; }
.pcxp-head .spacer { flex: 1; }
.pcxp-line { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; }
.pcxp-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.pcxp-count { min-width: 44px; text-align: right; }
.pcxp-words { flex: 1; }
.pcxp-list { margin: 2px 0 6px 62px; max-height: 160px; overflow: auto; font-size: 12px; border-left: 2px solid #e6e9ee; padding-left: 8px; }
.pcxp-now { margin: 6px 0 0; color: #444; }

/* wave 26-web N-4 (MANAGE.md rules 8-13): "Manage my docket" - one screen, sections as tabs, nothing stacked; the page
   itself never scrolls (rule 11): the panel takes the rest of the window and a long list scrolls in its own box */
body.manage { height: 100vh; margin: 0; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
body.manage .mgtop { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid #e3e6eb; }
/* wave 28-web Q-3 (MANAGE.md rule 8, decided: "Go to my docket" at the top CENTRE): two equal sides, the button between */
body.manage .mgtop .mgside { flex: 1 1 0; display: flex; align-items: center; gap: 12px; min-width: 0; }
body.manage .mgtop .mgright { justify-content: flex-end; }
body.manage .mgtop .mgcentre { flex: 0 0 auto; display: flex; align-items: center; }
body.manage .mgtop .spacer, .mgstatus .spacer { flex: 1; }
.mgtitle { font-size: 17px; }
.mggo { background: #1f6feb; color: #fff; padding: 7px 16px; border-radius: 6px; text-decoration: none; font-weight: bold; }
.mgstatus { display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-bottom: 1px solid #e3e6eb; flex-wrap: wrap; font-size: 13px; }
.mgsep { width: 1px; height: 16px; background: #d0d5dc; }
.mgbar { display: inline-block; width: 90px; height: 7px; background: #e6e9ee; border-radius: 4px; vertical-align: middle; overflow: hidden; }
.mgbarfill { display: block; height: 100%; background: #2e9d4f; }
body.manage #wholedocket { display: none; margin: 0 16px; border: 1px solid #d0d5dc; border-radius: 6px; padding: 6px 10px; background: #fff; }
body.manage #wholedocket.mgopen:not([hidden]) { display: block; }
.mgtabs { display: flex; gap: 2px; padding: 6px 16px 0; border-bottom: 1px solid #d0d5dc; }
.mgtab { border: 1px solid transparent; border-bottom: none; background: none; padding: 6px 14px; cursor: pointer; border-radius: 6px 6px 0 0; }
.mgtab.on { border-color: #d0d5dc; border-top: 2px solid #1f6feb; background: #fff; font-weight: bold; margin-bottom: -1px; }
.mgpanels { flex: 1; min-height: 0; overflow: hidden; padding: 8px 16px; display: flex; }
.mgpanel { flex: 1; min-height: 0; overflow: auto; }
.mgpanel[hidden] { display: none; }
.mgadd { display: flex; align-items: center; gap: 16px; border: 2px dashed #c5ccd6; border-radius: 8px; padding: 8px 14px; }
.mgadd.dragover { border-color: #1f6feb; background: #f4f9ff; }
.mgaddpart { flex: 1; }
.mgaddpart p { margin: 2px 0 6px; font-size: 12px; }
.mgpick { background: #1f6feb; color: #fff; border: none; padding: 5px 12px; border-radius: 5px; cursor: pointer; }
.mgdrop { flex: 0.7; text-align: center; font-size: 12px; }
.mgfold { border: 1px solid #e3e6eb; border-radius: 6px; padding: 4px 10px; margin: 8px 0; }
.mgfold > summary { cursor: pointer; font-weight: bold; }
.mgfold .intake { max-height: 46vh; overflow: auto; }
.mgtileshead { margin: 6px 0 4px; }
.mgtilerow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.mgtile { flex: none; width: 158px; text-align: left; border: 1px solid #d0d5dc; border-radius: 6px; background: #fff; padding: 6px 8px; cursor: pointer; font-size: 12px; }
.mgtile.gone { opacity: .55; }
.mgtilebar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #e6e9ee; margin: 4px 0; }
.mgtilebar span { display: block; height: 100%; }
.mgmore { flex: none; border: 1px dashed #c5ccd6; background: none; border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.mgemail { margin-top: 10px; border-top: 1px solid #e3e6eb; padding-top: 8px; }
/* wave 26-web N-4: the Remove section (left / right, the red danger box) and the Recently removed rows */
.mgcols { display: flex; gap: 18px; align-items: flex-start; }
.mgleft { flex: 1; min-width: 0; }
.mgleft textarea { width: 100%; box-sizing: border-box; margin: 6px 0; }
.mgright { flex: 1; min-width: 0; max-height: 52vh; overflow: auto; }
.mgrow { display: flex; align-items: center; gap: 8px; }
.mgrow .spacer, .mgdanger .spacer { flex: 1; }
.mghint { font-size: 12px; }
.mgdanger { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; border: 1px solid #f0b8b8; background: #fff6f6; border-radius: 6px; }
.mgdanger b { color: #b42318; }
button.danger { color: #b42318; border: 1px solid #d9534f; background: #fff; border-radius: 5px; padding: 4px 10px; cursor: pointer; }
#removeyes.danger { background: #c62828; color: #fff; border-color: #c62828; }
.removedrow { display: grid; grid-template-columns: 26px 1fr 2.2fr 60px 1.3fr auto auto; gap: 8px; align-items: center; padding: 4px 0; }
.removedhead { font-size: 12px; border-bottom: 1px solid #e3e6eb; }
.removedtoggle { border: none; background: none; cursor: pointer; }
.removedcases { margin: 2px 0 8px 34px; max-height: 32vh; overflow: auto; }
/* wave 26-web N-5: Find cases inside "Add cases" - the box left, the Look up list right */
.incols { display: flex; gap: 16px; align-items: flex-start; }
.inleft { flex: 1; min-width: 0; }
.inleft textarea { width: 100%; box-sizing: border-box; }
.inrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.inrow .spacer { flex: 1; }
.insmall { font-size: 12px; padding: 3px 8px; }
.incols .intakeopen { flex: 1.2; min-width: 0; max-height: 40vh; overflow: auto; }
.inpill { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 9px; color: #fff; }
.inread > summary { cursor: pointer; color: #555; font-size: 12px; }
/* wave 26-web N-6 (MANAGE.md rule 15): "Manage my docket" is a clear button, not a small link */
a.addapps { display: inline-block; border: 1px solid #b9c2cf; border-radius: 6px; padding: 3px 12px; background: #fff;
  color: #1f2937; text-decoration: none; font-weight: bold; }
a.addapps::before { content: "⚙ "; }
a.addapps.backbtn::before { content: none; }   /* wave 28D item 5: "Back to Gateway Screen", plain words */
/* wave 26-web N-7 (REMOVE.md rule 14): the tick boxes at the left edge of the first column, the bar, the Undo line */
.tickbox, .tickhead { margin: 0 6px 0 0; vertical-align: middle; cursor: pointer; }
.tickbar { display: inline-flex; align-items: center; gap: 8px; margin: 0 8px; }
.tickbar button:disabled { opacity: .45; cursor: default; }
.tickremoved { font-size: 12px; }
.filterwords { margin-left: 4px; }
.undoline { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1f2430; color: #fff;
  padding: 10px 16px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 50; }
.undoline a { color: #8ab4ff; margin-left: 6px; }
.undoline .undoclose { color: #ccc; }
/* wave 26-web N-8 (WEB.md rule 29): the side panel of "Download ticked" - it does not block the docket */
.zippanel { position: fixed; top: 150px; right: 18px; width: 340px; background: #fff; border: 1px solid #c5ccd6;
  border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 10px 14px; z-index: 40; font-size: 13px; }
.ziphead { display: flex; align-items: center; margin-bottom: 6px; }
.ziphead .spacer { flex: 1; }
.zippanel input[type=text] { width: 100%; box-sizing: border-box; margin: 2px 0 4px; }
.zipbuttons { margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.zipbuttons input[type=text] { flex: 1; margin: 0; }
.pcxp-said { margin: 2px 0 6px; font-weight: bold; }   /* wave 27-web P-3 (MANAGE.md rule 2): said in full */
.casexml { margin: 8px 0 4px; padding-top: 6px; border-top: 1px solid #ddd; }   /* wave 27-web P-6: Download XML */
/* OA report button wave (OA_REPORT.md rules 29-35): the button and the report window */
.oareport { border-top: none; margin-top: 2px; padding-top: 2px; }
.oareportunreported { color: #c00000; font-weight: bold; margin: 2px 0; }
.oareportbox { width: min(1100px, 96vw); max-height: 92vh; }
.oareportbody { white-space: normal; font-size: 13px; }
.oareporttop { border: 1px dashed #888; background: #fafafa; padding: 6px 8px; margin-bottom: 8px; }
.oareporthead { font-weight: bold; margin: 4px 0; }
.oareportwarnings { border: 2px solid #c00000; color: #c00000; padding: 4px 8px; margin: 4px 0; font-weight: bold; }
.oareportnotes { border: 1px solid #999; padding: 4px 8px; margin: 4px 0; }
.oareportcodes { border: 1px solid #1f4e9e; padding: 4px 8px; margin: 4px 0; font-family: Consolas, monospace; word-break: break-all; }
.oareportocr { background: #fff4c2; }
.oareportred { color: #c00000; font-weight: bold; }
.oareportform td { padding: 2px 6px 2px 0; vertical-align: top; }
.oareportwide { width: min(760px, 70vw); }
.oareportletter { width: 100%; min-height: 240px; border: 1px solid #bbb; background: #fff; }
.oareporttext { width: 100%; font-family: Consolas, monospace; font-size: 12px; }
.oareportfiles { border-collapse: collapse; margin: 4px 0; }
.oareportfiles td { border: 1px solid #ccc; padding: 2px 6px; vertical-align: top; }
.oareportsize { text-align: right; white-space: nowrap; }
.oareportbuttons { margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.oareportresult p { margin: 2px 0; }
.pcxp-sofar { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin: 4px 0; }   /* wave 27-web P-5 */
.pcxp-live { display: inline-flex; gap: 4px; align-items: baseline; }

/* wave 28-web Q-1 (SAVE.md rules 8-11): the SAVE button, its result line, the leave question (colours from the md) */
.pcsave-btn { border: 2px solid transparent; border-radius: 3px; margin-left: 8px; letter-spacing: 0.5px; }
.pcsave-btn.pale { opacity: 0.95; }
.pcsave-badge { font-weight: bold; margin-left: 4px; }
.pcsave-line { padding: 3px 10px; font-weight: bold; color: #1a6b1a; }
.pcsave-line.err { color: #b00000; }
.mgsave { margin-left: 8px; }
.pcsave-leave { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 90; display: flex;
  align-items: center; justify-content: center; }
.pcsave-leavebox { background: #fff; padding: 18px 22px; border-radius: 6px; max-width: 460px; box-shadow: 0 4px 18px rgba(0,0,0,0.3); }
.pcsave-leavebtns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
/* wave 28-web Q-6 (DOWNLOADS.md rule 9): the "no PDF in the USPTO API" words wrap in their cell, never cut off */
.dlnopdf { white-space: normal; display: inline-block; max-width: 100%; font-size: 11px; line-height: 1.2; }
/* MANAGE.md rule 16 (wave 28B-web item 8): "Only this applicant:" - the box next to Go to my docket, its pick list
   and the banner above the tabs (the look DRAFT) */
body.manage .mgtop .mgcentre { position: relative; }   /* wave 28D item 4: Go + the box, the PAIR centred */
.mgonly { position: absolute; right: 100%; margin-right: 12px; white-space: nowrap; }
.mgonly.mgonlyright { position: static; margin: 0 0 0 12px; }   /* MANAGE.md only_applicant.side: right (decided) */
body.manage .mgtop .mgcentre .mgsave { position: absolute; left: 100%; white-space: nowrap; }   /* outside the pair */
.mgonly label { font-weight: bold; margin-right: 4px; }
.mgonly input { width: 16em; }
.mgonlypick { margin: 4px 12px; padding: 4px 8px; border: 1px solid #999; background: #fff; }
.mgonlylist { max-height: 30vh; overflow: auto; margin: 4px 0; }
.mgonlyline { display: block; }
.onlybanner { padding: 2px 8px; }                 /* its colours: MANAGE.md only_applicant.banner_look */
/* wave 28E (TRANSACTIONS.md rule 12): the date sort toggle, three joined buttons (Who acted), the no-PDF X */
.dsort { cursor: pointer; margin-left: 4px; color: #1f4e99; font-size: 11px; user-select: none; }
th.nodatecycle { cursor: default; }
.joined { display: inline-flex; align-items: center; gap: 4px; }
.joinedrow { display: inline-flex; }
.joinedrow button { border-radius: 0; margin: 0; border-right-width: 0; padding: 1px 10px; }
.joinedrow button:first-child { border-radius: 3px 0 0 3px; }
.joinedrow button:last-child { border-radius: 0 3px 3px 0; border-right-width: 1px; }
.joinedrow button.on { background: #1f4e99; color: #fff; font-weight: bold; }
.whorow { margin: 2px 0 4px; }
.hx.nox { cursor: default; }
/* MANAGE.md rule 15 (wave 28E item 13): the top bar in three parts - "Back to Gateway Screen" in the centre */
.barleft, .barright, .barcentre { display: flex; align-items: center; gap: 8px; }
.sourcebar.centred .barleft, .sourcebar.centred .barright { flex: 1 1 0; min-width: 0; }
.sourcebar.centred .barright { justify-content: flex-end; }
.sourcebar.centred .barcentre { flex: 0 0 auto; }
.sourcebar:not(.centred) .barright { margin-left: auto; }
/* wave 28E item 9 (EVENTS_VIEW.md rule 13, DEADLINES.md rule 25): ONE control row per tab */
.tabbar.onerow { flex-wrap: wrap; row-gap: 4px; }
.onerow .whofirst > b { font-weight: bold; }
.rowdivider { display: inline-block; width: 1px; height: 18px; background: #b0b0b0; margin: 0 6px; }
.estimates { font-size: 11px; margin-left: 8px; }
.tabown { display: inline-flex; gap: 6px; align-items: center; margin-right: 8px; }
/* wave 28E item 8 (EVENTS_VIEW.md rule 14): Find an event across cases */
.findwrap { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.findlist { position: absolute; top: 100%; left: 0; z-index: 40; background: #fff; border: 1px solid #7a7a7a;
  max-height: 360px; overflow-y: auto; min-width: 280px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.findhead { font-weight: bold; padding: 3px 6px 1px; background: #f3f3f3; }
.finditem { padding: 1px 12px; cursor: pointer; white-space: nowrap; }
.finditem:hover { background: #cce4ff; }
.findsummary { background: #eef4fb; }
/* GRID.md rule 36 (wave 28E item 11): Filter by Query - the button, the chip, the popup */
.fqbtn { font-weight: bold; }
.fqchip { background: #e8f0fb; border: 1px solid #9db6d8; border-radius: 10px; padding: 1px 8px; margin-left: 4px;
  white-space: nowrap; }
.fqchip a { color: #c00000; text-decoration: none; font-weight: bold; }
.tabgap { display: inline-block; width: 14px; }
.fqpopup { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 55; display: flex; align-items: flex-start;
  justify-content: center; padding-top: 60px; }
.fqpopup[hidden] { display: none; }
.fqbox { background: #fff; border: 1px solid #555; padding: 8px 12px; width: min(820px, 94vw); max-height: 85vh; overflow: auto; }
.fqtabs button { border-radius: 0; margin-right: 2px; }
.fqtabs button.on { background: #1f4e99; color: #fff; font-weight: bold; }
.fqholder .fqoff { display: none !important; }
.fqall { display: block; margin: 8px 0 4px; }
.fqpreview { font-weight: bold; color: #1f4e99; margin: 4px 0; }
.fqpreview.red { color: #c00000; }
/* SAVE.md rule 15 (wave 28E item 10): the marker and the small menu */
.pcsave-marker { font-size: 14px; vertical-align: middle; }
.pcsave-menu { background: #fff; border: 1px solid #555; z-index: 70; box-shadow: 0 2px 6px rgba(0,0,0,.25); padding: 2px 0; }
.pcsave-menuline { padding: 3px 12px; white-space: nowrap; }
.pcsave-menuline .pcsave-menutext { cursor: pointer; }
.pcsave-menuline:hover { background: #cce4ff; }
.pcsave-menuline[data-key=everything] { font-weight: bold; }
.pcsave-menuline.off .pcsave-menutext, .pcsave-menuline.info .pcsave-menutext { color: #808080; cursor: default; }
.pcsave-details { font-size: 11px; }
/* MANAGE.md rule 17 (wave 28E item 14): Download cases; the small dividers between the section groups */
.mgtabdivider { display: inline-block; width: 1px; height: 20px; background: #9a9a9a; margin: 0 10px; vertical-align: middle; }
.dcline { margin: 3px 0; }
.dcticks { margin: 2px 0 4px 18px; display: flex; flex-direction: column; }
.dcbtns { margin: 6px 0; }
.dcsaid { font-weight: bold; }
/* forms button wave (FORMS.md): the FORMS button, its menu, and the LOUD box at the top of the case panel */
.formswrap { position: relative; display: inline-block; }
.formsmenu { position: absolute; z-index: 60; left: 0; top: 100%; background: #fff; border: 1px solid #888;
  padding: 4px 6px; min-width: 420px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.formsmenuhead { font-weight: bold; margin: 2px 0 4px; }
.formsitem { display: block; width: 100%; text-align: left; margin: 1px 0; }
.formsitem.grey { color: #888; }
.formsloud { border: 1px solid #999; padding: 4px 8px; margin: 0 0 6px; }
.formsloud.formsred { border: 2px solid #c00000; }
.formsredline { color: #c00000; font-weight: bold; margin: 2px 0; }
.formssaid { margin: 2px 0; }

/* STATUS_VIEW.md rule 10 (wave 29 item 5): the Status tab's name box */
.statusname { margin: 6px; max-width: 320px; }
.statusnamerow { display: flex; gap: 4px; margin-top: 4px; }
.statusnametext { flex: 1; min-width: 0; }
.statusnamepick { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.statusnamepick button { text-align: left; }
/* STATUS_VIEW.md rule 11 (wave 29 item 6): the Status table's draggable right border; labels wrap */
/* STATUS_VIEW.md rule 12 (wave 29C): the counts are never cut off. The labels wrap - "tbody td" so this beats the
   grid's own "table.grid tbody td" nowrap (wave 29's rule lost to it and the counts were cut off at the right); too
   narrow for the names, the area scrolls sideways and the counts' column stays pinned at its right edge */
.statusleft { flex: none; overflow: auto; }
.statusleft .statusname { max-width: none; }
table.statuswrap { width: calc(100% - 12px); table-layout: auto; }
table.statuswrap td, table.statuswrap tbody td { white-space: normal; overflow-wrap: anywhere; }
table.statuswrap tbody td.statuscount, table.statuswrap th.statuscount { position: sticky; right: 0; white-space: nowrap;
  overflow-wrap: normal; overflow: visible; text-overflow: clip; background: var(--st-base); z-index: 1; }
table.statuswrap th.statuscount { background: #f3f3f3; z-index: 3; }
/* STATUS_VIEW.md rule 13 (Status tab wave): the whole row is clickable. No colour, size or cursor is typed here: the page
   sets --st-<name> from the md's `row_click` (the Python guard test fails if one is typed in this file) */
table.statuswrap tbody td { padding: var(--st-row-padding); background: var(--st-base); }
table.statuswrap tbody tr.sub td:first-child { padding-left: var(--st-sub-indent); }
table.statuswrap tbody td.statuscount { text-align: right; min-width: var(--st-count-width); font-variant-numeric: tabular-nums; }
table.statuswrap tbody tr.live { cursor: var(--st-cursor); }
table.statuswrap tbody tr.live td.count { color: var(--st-link); text-decoration: underline; }
table.statuswrap tbody tr.zero td { color: var(--st-zero); }
table.statuswrap tbody tr.live:hover td { background: var(--st-hover); }
table.statuswrap tbody tr.clicked td, table.statuswrap tbody tr.clicked.live:hover td { background: var(--st-marked); }
table.statuswrap tbody tr.live:focus-visible { outline: var(--st-focus-width) solid var(--st-focus); outline-offset: calc(-1 * var(--st-focus-width)); }
.statusgrip { flex: none; width: 5px; cursor: col-resize; background: #e0e0e0; align-self: stretch; }
.statusgrip:hover { background: #b0b0b0; }
/* wave 30B-web (ADD_CASES_SCREEN.md, the layout decided by Moshe 2026-11-15): Add cases - four open boxes, 2 x 2 on a
   laptop, one column on a phone (addcases.js sets .acstack below layout.stack_below_px); every word is the md's */
.acheading { font-size: 22px; margin: 6px 0 2px; }
.acsub { margin: 0 0 10px; font-size: 14px; }
.acboxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acboxes.acstack { grid-template-columns: 1fr; }
.acbox { border: 1px solid #c9d3df; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.acbox[hidden] { display: none; }
.acboxhead { display: flex; align-items: center; gap: 8px; }
.acnum { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #2577c8; color: #fff; font-weight: bold; font-size: 13px; flex: none; }
.actitle { font-size: 17px; }
.achelp { margin: 2px 0 8px; font-size: 13px; }
.acdrop { flex: 1; border: 2px dashed #a9b7c8; border-radius: 8px; background: #f2f5f9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 8px; text-align: center; min-height: 150px; }
.acdrop.dragover { border-color: #2577c8; background: #e8f1fb; }
.acdropicon { font-size: 26px; line-height: 1; }
.actags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.actag { background: #dde3ea; border-radius: 10px; padding: 2px 8px; font-size: 12px; }
.acnote { font-size: 12px; margin: 6px 0 0; }
.acbig { background: #2577c8; color: #fff; border: none; border-radius: 6px; padding: 8px 18px; font-size: 15px; font-weight: bold; cursor: pointer; }
.acbig[disabled] { background: #9db6cf; cursor: default; }
.acoutline { background: #fff; color: #2577c8; border: 1px solid #2577c8; border-radius: 6px; padding: 4px 10px; font-weight: bold; cursor: pointer; }
.acoutline[hidden] { display: none; }
.acarea { width: 100%; box-sizing: border-box; font-family: Consolas, monospace; font-size: 13px; border: 1px solid #aab4c0; border-radius: 6px; padding: 6px 8px; resize: vertical; }
.acrow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.acrow .spacer, .acfoot .spacer { flex: 1; }
.acsmallrow { margin: 0 0 6px; flex-wrap: wrap; }
.acsmallnote { font-size: 12px; }
.acchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.acchip { border: 1px solid #66bb6a; border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.acform { display: flex; flex-direction: column; gap: 4px; }
.acform[hidden] { display: none; }
.acfield { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 12px; }
.acfield input { font-size: 14px; padding: 5px 7px; border: 1px solid #aab4c0; border-radius: 6px; }
.acpair { display: flex; gap: 8px; }
.acmore { font-size: 13px; margin: 6px 0; color: #2577c8; }
.acwhy { font-size: 12px; margin: 6px 0 0; white-space: pre-wrap; }
.acwhy[hidden] { display: none; }
.acfoot { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; flex-wrap: wrap; }
.acfootline { font-size: 13px; }
.acdoor { background: #f4f5f7; color: #555; border: 1px solid #c8ccd2; border-radius: 5px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.acback { display: inline-block; margin: 4px 0 8px; font-size: 13px; }
.acrouted { white-space: pre-wrap; margin: 8px 0; }
.acsavenow { display: flex; align-items: center; gap: 14px; margin: 10px 0; padding: 10px 12px; border: 1px solid #e0c46c; background: #fffbea; border-radius: 8px; }
.acsavenow[hidden] { display: none; }
.acsavebtn { border: none; border-radius: 4px; font-weight: bold; text-transform: uppercase; cursor: pointer; }
.acsavebtn[hidden] { display: none; }
.acsaveline { font-size: 15px; font-weight: bold; }
.acsummary { font-weight: bold; font-size: 14px; margin: 6px 0; }
.acsummary.warn { color: #9a5b00; }
tr.acnotfound td { color: #8a8f96; background: #f3f4f6; }

/* wave 30A-web (GHOSTS.md rules 7-8): the "Ghosts (N)" button, the hidden line, the pop-up and a shown ghost's row */
.ghostslot { margin-left: 10px; white-space: nowrap; }
.ghostsbtn { font-weight: bold; border: 1px solid; border-radius: 3px; padding: 2px 10px; cursor: pointer; }
.ghosthidden { font-weight: bold; }
.ghostpopup { max-width: 980px; }
.ghostpopup h4 { margin: 14px 0 6px; }
table.ghostpair { border-collapse: collapse; width: 100%; margin-top: 8px; table-layout: fixed; }
table.ghostpair th, table.ghostpair td { border: 1px solid #d8d0e6; padding: 3px 6px; text-align: left; vertical-align: top;
  overflow-wrap: anywhere; }
table.ghostpair tr > th:first-child { width: 110px; color: #555; font-weight: normal; }
.ghostlikely { font-weight: normal; font-size: 12px; }
.ghostwhy { margin: 4px 0 10px; }
.ghostflags { margin: 4px 0; padding-left: 18px; }
.ghostflags li { margin: 3px 0; }
.ghostsaid { font-weight: bold; white-space: pre-wrap; }
tr.ghostrow td { font-style: italic; }
.ghostmark { font-style: normal; }
.ghostmeta { margin-top: 8px; }
.pcsave-extra { border-top: 1px solid #ddd; margin-top: 4px; padding-top: 4px; }

/* wave 33 (FOREIGN.md rule 4): the "Show:" selector in the tab row, and the Add cases choice (rule 12) */
.foreignshow { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 0 12px; white-space: nowrap; }
.foreignlabel { font-weight: bold; margin-right: 2px; }
#tabs .foreignshow button.foreignview { border: 1px solid #b8b8b8; background: #fff; color: #222; padding: 3px 7px;
  cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: normal; height: auto; min-height: 0; }
#tabs .foreignshow button.foreignview.on { background: #c00000; color: #fff; border-color: #c00000; font-weight: bold; }
.acforeign { margin: 6px 0 10px; }
.acforeignpick { margin-right: 14px; cursor: pointer; }
/* wave 33 (DRAFT): with the "Show:" selector the tab row may need a second line - it wraps instead of running off the
   right edge (the row is unchanged while the module is off: no selector, no wrap) */
.tabs:has(.foreignshow) { flex-wrap: wrap; row-gap: 4px; }
/* wave 34 (FOREIGN_EVENTS.md): "Update foreign cases", its line, the Office events tab (looks DRAFT) */
.fevupd { display: inline-flex; align-items: flex-start; gap: 6px; margin: 0 6px; position: relative; }
#tabs .fevupd button.fevbtn { border: 1px solid #1f4e79; background: #1f4e79; color: #fff; font-weight: bold; padding: 3px 9px; }
.fevline { font-size: 11px; max-width: 290px; }
.fevline summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.fevline.red summary { color: #c00000; font-weight: bold; }
.fevline[open] { position: absolute; top: 100%; left: 0; z-index: 30; background: #fff; border: 1px solid #c00000; padding: 4px 6px; width: 520px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.fevloud { white-space: normal; margin: 2px 0; }
.fevloud.red { color: #c00000; font-weight: bold; }
.fevlinks { margin: 4px 0; }
.fevtable { border-collapse: collapse; margin: 2px 0 8px 12px; font-size: 12px; }
.fevtable th, .fevtable td { border: 1px solid #d0d0d0; padding: 2px 5px; text-align: left; vertical-align: top; }
.fevtable tr.fevunread td { font-weight: bold; }
.fevchanged { color: #c00000; font-weight: bold; }

/* wave IL-2: the Israeli numbers line, the Hebrew title, the Download control */
.acilrow { margin: 6px 0; }
.acil { width: 22em; vertical-align: middle; }
.acilsaid { white-space: pre-line; margin-top: 4px; }
.fevhe { direction: rtl; text-align: right; color: #555; font-size: 0.95em; }
.fevdl { vertical-align: top; min-width: 9em; }
.fevdlmenu > summary { cursor: pointer; display: inline-block; border: 1px solid #888; border-radius: 3px; padding: 1px 6px; }
.fevdlitem { padding: 2px 0; }
.fevdlnote { font-size: 0.85em; }
.fevdlnone { font-size: 0.9em; }
.fevfold { margin: 6px 0; }
.fevfold > summary { cursor: pointer; }
.fevfoldline { font-size: 0.9em; margin-left: 1.2em; }
/* wave 35 (FIND_FOREIGN.md, the mock-up find_foreign_members_v1.pdf; the look DRAFT, polished later): the button next
   to Columns..., its line, the two pop-ups (red title bar), the tick list */
#tabs button.ffmbtn { border: 1px solid #c00000; color: #c00000; background: #fff; }
.ffmline { font-size: 11px; margin: 0 6px; }
.ffmline .err { color: #c00000; }
.ffmshade { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding-top: 70px; }
.ffmbox { background: #fff; border: 1px solid #888; box-shadow: 0 4px 18px rgba(0,0,0,.35); max-width: calc(100vw - 32px); max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
.ffmbox.ffmsmall { width: 410px; }
.ffmbox.ffmwide { width: 1160px; }
.ffmhead { font-weight: bold; padding: 6px 10px; font-size: 13px; }
.ffmbody { padding: 8px 12px 10px; font-size: 12px; overflow: auto; }
.ffmgroup { margin: 6px 0 8px; }
.ffmscope { display: block; margin: 3px 0 0 4px; }
.ffmoffice { margin-right: 10px; white-space: nowrap; }
.ffmexplain { color: #1f4e79; line-height: 1.5; }
.ffmbody .err { color: #c00000; white-space: pre-line; }
.ffmbuttons { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ffmbuttons .spacer { flex: 1; }
button.ffmgo { border: 1px solid #c00000; font-weight: bold; padding: 4px 12px; }
button.ffmgo:disabled { opacity: .45; }
.ffmtop { margin: 2px 0 6px; font-weight: bold; }
.ffmloud { margin-bottom: 2px; }
.ffmquick { margin: 4px 0 6px; }
button.ffmsmallbtn { font-size: 10px; padding: 0 5px; }
.ffmscroll { overflow: auto; max-height: calc(100vh - 330px); }
.ffmtable { border-collapse: collapse; width: 100%; font-size: 11px; }
.ffmtable th, .ffmtable td { border: 1px solid #d0d0d0; padding: 2px 6px; text-align: left; }
.ffmtable th { background: #f3f3f3; }
.ffmtable tr.ffmband td { font-size: 11px; }
.ffmnew { border-radius: 8px; padding: 0 7px; font-size: 10px; }
.ffmsaid { margin-top: 6px; }
.ffmsavebtn { font-weight: bold; border: none; cursor: pointer; }
