/* Hymnworks desk. Adapted from the approved Reference study. Evidence images are never filtered or tinted. */
:root {
  /* The Pages list's width, the panel's collapsed form that the desk opens
     with and a grid expands, which the top bar's logo slot matches. See
     .brand-slot. --rail-folded is the folded strip's. */
  --rail-list: 80px;
  --rail-folded: 40px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color-scheme: light;
  --ground: #edf0f4;
  --surface: #ffffff;
  --subtle: #f5f7fa;
  --hover: #e9edf3;
  --ink: #232c39;
  --muted: #596574;
  --faint: #5c697a;
  --line: #dfe4eb;
  --control-line: #8994a3;
  --accent: #003f71;
  --accent-soft: #e8eff8;
  --button: #003f71;
  --button-ink: #ffffff;
  --button-hover: #00335b;
  --focus: #426cab;
  --removed: #8b394d;
  --removed-bg: #fbedf1;
  --added: #176951;
  --added-bg: #eaf5ef;
  --warning: #795a25;
  --warning-dot: #a37935;
  --preview: #edf5ef;
  --preview-ink: #365d43;
  --shadow: #24304416;
  --scrim: #11182799;
  --annotation: #345b8b;
  --annotation-line: #627fa8;
  --mark: #fbe3a0;
  --mark-ink: #232c39;
  --panel: 420px;
  background: var(--ground);
  color: var(--ink);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #111419;
  --surface: #1b1f25;
  --subtle: #22272f;
  --hover: #2b323c;
  --ink: #e7e9ef;
  --muted: #a7afbb;
  --faint: #939eae;
  --line: #303742;
  --control-line: #687583;
  --accent: #8cbae0;
  --accent-soft: #263749;
  --button: #b0cbea;
  --button-ink: #12212f;
  --button-hover: #c6dbf2;
  --focus: #96bfff;
  --removed: #f1b3c4;
  --removed-bg: #34262d;
  --added: #94d1b7;
  --added-bg: #22352e;
  --warning: #dfc194;
  --warning-dot: #c7a46f;
  --preview: #203329;
  --preview-ink: #acd8b9;
  --shadow: #00000040;
  --scrim: #080b10c4;
  --mark: #6d5a1c;
  --mark-ink: #fff4cf;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, summary, select { touch-action: manipulation; }
button { cursor: pointer; color: inherit; background: transparent; border: 0; border-radius: 6px; }
button:hover:not(:disabled) { background: var(--hover); }
button:disabled { opacity: .38; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
/* Segmented controls clip their rounded corners, so a focus ring there sits
   just inside the focused segment, where the clip leaves all four sides. */
.view-order button:focus-visible, .filter-mode button:focus-visible, .edit-filter button:focus-visible, .chip button:focus-visible { outline-offset: -3px; }
[hidden] { display: none !important; }
/* A part of a tool the Client view's package does not name is off the
   page, whatever the desk's code sets on it later (hw-fswv.14.7). See
   tools.js. */
[data-tool-off] { display: none !important; }
.grow { flex: 1; }
.dim { color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app { height: 100dvh; min-height: 480px; display: flex; flex-direction: column; }
/* One bar: the package on the left, the view switch, the role, and the menu on the right. */
.appbar { height: 56px; min-height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.environment { font-size: 11px; color: var(--muted); padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.environment b { font-weight: 550; }
.bar-button { height: 30px; font-size: 11px; padding: 4px 10px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--muted); white-space: nowrap; }
/* One pressed style for every toggle: the soft accent fill with accent
   ink, kept under the pointer. A bordered toggle keeps its own border, and
   a count on a toggle stays a plain count. Return, which is merely
   available, takes the accent ink alone. */
:is(.bar-button, .filters-toggle, [id="list-toggle"], [id="annotations"], [id="compare-toggle"], .rail-pages, .rail-grid, .rail-filter, .rail-marks, .search-scope, .filter-mode button, .edit-filter button, .walk-segment button, .follow-page):is([aria-pressed="true"], [aria-expanded="true"]),
:is(.bar-button, .filters-toggle, [id="list-toggle"], [id="annotations"], [id="compare-toggle"], .rail-pages, .rail-grid, .rail-filter, .rail-marks, .search-scope, .filter-mode button, .edit-filter button, .walk-segment button, .follow-page):is([aria-pressed="true"], [aria-expanded="true"]):hover {
  background: var(--accent-soft); color: var(--accent);
}
.menu-anchor { position: relative; }
.menu-button { width: 34px; padding: 0; font-size: 16px; }
.desk-menu { position: absolute; top: calc(100% + 8px); right: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 80px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 40px var(--shadow); padding: 0; font-size: 12px; z-index: 40; }
/* The menu split by scope (hw-kyy3.5.1): This project on the left and
   Hymnworks, every project, on the right, the Show strip under both, and
   the version footer. A phone stacks the columns in a full-screen panel
   with its own Close. */
.menu-head { display: none; }
.menu-columns { display: grid; grid-template-columns: 1fr 1fr; }
.menu-column { min-width: 0; padding: 12px 10px 4px; }
.menu-app { border-left: 1px solid var(--line); }
.menu-scope { display: inline-block; margin: 0 8px 4px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 11px; }
.menu-title { margin: 2px 8px 0; font-size: 14px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.menu-title:empty { display: none; }
.menu-sub { margin: 2px 8px 0; color: var(--muted); font-size: 11px; }
.menu-sub:empty { display: none; }
.menu-column .menu-section { border-top: 0; padding: 6px 0; }
.menu-who { display: flex; align-items: center; gap: 10px; margin: 8px 8px 4px; }
.menu-who[hidden] { display: none; }
.menu-initials { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.menu-who-text { display: grid; min-width: 0; }
.menu-who-text b { font-size: 12px; }
.menu-who-text small { color: var(--muted); font-size: 11px; }
.menu-theme { padding: 4px 8px; }
.menu-strip { position: relative; padding: 8px 18px; background: var(--hover); }
.menu-strip-note { position: absolute; top: 8px; right: 18px; color: var(--faint); font-size: 10px; }
.desk-menu > .menu-version { padding: 8px 18px; }
.menu-note { margin: 4px 8px 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.menu-note:empty { display: none; }
.menu-section { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 8px; }
.menu-section legend { float: left; width: 100%; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; padding: 0; }
.region-list { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.region-list label { display: flex; align-items: center; gap: 7px; padding: 3px 0; }
.region-list input { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.menu-row select { font-size: 12px; padding: 4px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.menu-actions { display: grid; gap: 2px; padding: 6px 0; }
.menu-item { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 8px; font-size: 12px; border-radius: 6px; }
.menu-item kbd { font-size: 10px; }
.menu-version { margin: 0; padding: 8px 8px 4px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
/* What's new sits on the version line. A dot marks notes this browser has not shown. */
.menu-version { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.menu-button { position: relative; }
.notes-open { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--accent); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.notes-open:hover { background: var(--accent-soft); }
.unread-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.unread-dot[hidden] { display: none; }
.menu-dot { position: absolute; top: 4px; right: 4px; box-shadow: 0 0 0 2px var(--surface); }
.brand-tile { display: block; width: 34px; height: 34px; flex: none; }
.brand-lockup { display: block; width: 180px; height: auto; }
:root[data-theme="dark"] .brand-light, :root:not([data-theme="dark"]) .brand-dark { display: none; }
.app-divider { height: 22px; border-left: 1px solid var(--line); margin-left: 7px; }
/* On a desktop the logo sits in a fixed slot as wide as the Pages list
   less its border, --rail-list less 1px: centered over the list, with the
   separator on the list's border (hw-5x0n.30.175). The slot never follows
   the panel, so folding it, expanding it to a grid, or resizing the grid
   moves nothing in the bar (hw-5x0n.30.173, revising hw-5x0n.30.169).
   The folded strip hides over the page's edge, so the slot does not
   follow it either. The slot starts at the bar's edge, past the bar's 18px
   padding, and the 14px gap before the separator is taken back, so the
   separator sits at the slot's end. At 1000px and under, the panel opens
   over the page, the slot is no box, and the bar keeps its plain layout. */
.brand-slot { display: contents; }
@media (min-width: 1001px) {
  .brand-slot { display: flex; flex: none; align-items: center; justify-content: center; width: calc(var(--rail-list) - 1px); margin-left: -18px; margin-right: -14px; }
  .brand-slot + .app-divider { margin-left: 0; }
}
.publication { font-weight: 550; padding: 7px 3px; font-size: 13px; }
/* With the project menu, its button names the project, so the title does
   not repeat it beside the button (hw-395k.6). On a desktop the title
   beside the button names the hymnal instead, muted and cut short, when
   it differs from the project's name; app.js empties and hides it when it
   does not (hw-395k.11). Below a desktop the button keeps the room. A
   desk with one project keeps the title as it was. */
body[data-projects="many"] .publication { min-width: 0; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-weight: 450; }
.publication[hidden] { display: none; }
@media (max-width: 1000px) {
  body[data-projects="many"] .publication { display: none; }
}
.edition { padding: 4px 8px; background: var(--subtle); color: var(--muted); font-size: 11px; border-radius: 4px; }
/* The project switcher, for a login with two or more projects, and the
   coverage line of the book's parts (hw-2ikp.3). The switcher names the
   project in the bar's ink; the line reads like the edition beside it. */
.project-switch { display: inline-flex; align-items: center; gap: 6px; height: 30px; max-width: 240px; min-width: 0; padding: 0 8px; font-size: 13px; font-weight: 550; color: var(--ink); background: var(--surface); border: 1px solid var(--control-line); border-radius: 6px; }
/* The project switcher is a button that opens the project menu, built as
   the proof menu is (hw-395k.2). */
.project-switch[hidden] { display: none; }
.project-switch-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The proof switcher sits beside the title. An earlier proof reads in the
   accent, so the header says the desk is not on the working proof
   (hw-5x0n.31.11). It is a button that opens the proof menu, which wears
   the zoom menu's look (hw-395k). See proofMenu in app.js. */
.proof-switch { display: inline-flex; align-items: center; gap: 6px; height: 30px; max-width: 260px; min-width: 0; padding: 0 8px; font-size: 13px; font-weight: 550; color: var(--ink); background: var(--surface); border: 1px solid var(--control-line); border-radius: 6px; }
.proof-switch[hidden] { display: none; }
.proof-switch-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-proof="earlier"] .proof-switch .zoom-caret, body[data-proof="intake"] .proof-switch .zoom-caret { stroke: currentColor; }
body[data-proof="earlier"] .proof-switch { border-color: var(--accent); color: var(--accent); }
.proof-note { margin: 8px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--subtle); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.proof-note[hidden] { display: none; }
.proof-note p { margin: 0; font-size: 12px; color: var(--ink); flex: 1 1 12em; }
/* The bar no longer names the book's parts, Hymns · Psalms, in any
   project (desk note 008426, hw-uq6s.79). The desk menu still does. */
.coverage { display: none; color: var(--muted); font-size: 11px; white-space: nowrap; }
.operator { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.avatar { width: 25px; height: 25px; display: grid; place-items: center; background: var(--subtle); color: var(--muted); border-radius: 50%; font-size: 11px; }
.workspace { display: flex; flex: 1; min-height: 0; }
/* The Pages panel's header looks the same as a list and as a grid: a 12px
   label, an 11px Marked or All pill, and 30 by 26 icon buttons. No text in
   the panel is smaller than 11px, so the list is 80px wide. Its edge
   toggle is the same 30px box as the review panel's, and it centers 31
   pixels down, on the toolbar's line. */
.rail { width: var(--rail-list); flex: none; border-right: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 16px; flex-direction: column; padding: 16px 8px 20px; min-height: 0; }
.rail-toggle { font-size: 16px; width: 30px; height: 30px; color: var(--muted); }
/* A collapsed rail keeps only its toggle and the count of findings to review. */
.rail[data-collapsed="true"] { width: var(--rail-folded); padding: 16px 3px 14px; }
.rail[data-collapsed="true"] > :is(.rail-label, .thumbnails, .rail-rule, .rail-caption) { display: none; }
.rail-label { font-size: 12px; font-weight: 600; color: var(--ink); }
/* The page list scrolls on its own so a long book never stretches the page.
   It reaches into the rail padding to leave room for a thin scrollbar. */
.thumbnails { display: flex; flex-direction: column; gap: 10px; align-items: center; flex: 0 1 auto; min-height: 0; align-self: stretch; margin: 0 -8px; padding: 2px 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-gutter: stable; }
/* The page rail and the page canvas keep their scrollbar space but show the
   bar only while they scroll. app.js adds .scrolling for 800 ms after a scroll. */
.thumbnails, .canvas-scroll { scrollbar-color: transparent transparent; }
.thumbnails.scrolling, .canvas-scroll.scrolling { scrollbar-color: var(--control-line) transparent; }
.thumbnail { flex: none; padding: 4px 4px 2px; width: 53px; border: 1px solid var(--line); border-radius: 5px; }
.thumbnail.active { border-color: var(--accent); background: var(--accent-soft); }
/* A page image never starts the browser's own drag and drop, in the list
   as in the grid, where dragscroll.js stops it. Dragging a picture out
   of the rail does nothing useful, and in the list it left a Playwright
   mouse drag waiting for good under load (hw-wm7m.70). */
.thumbnail img { display: block; width: 43px; height: auto; background: #fff; -webkit-user-drag: none; }
.thumbnail span { display: block; font-size: 11px; padding-top: 3px; color: var(--accent); }
/* Highlights over a thumbnail, one for each passage its page marks, in the
   marker's color on the white page: a translucent fill with a solid edge.
   A region of one text line is a pixel high in a 43px list thumbnail, so
   each highlight keeps at least 3px. app.js places them from the index. */
.thumbnail .thumb-page { position: relative; padding: 0; }
.thumbnail .thumb-marks { position: absolute; inset: 0; padding: 0; overflow: hidden; pointer-events: none; }
.thumbnail .thumb-mark { --thumb-mark: var(--marker-unruled-page); position: absolute; box-sizing: border-box; min-width: 3px; min-height: 3px; padding: 0;
  border: 1px solid var(--thumb-mark); border-radius: 1px; background: color-mix(in srgb, var(--thumb-mark) 32%, transparent); }
.thumb-mark[data-state="discuss"] { --thumb-mark: var(--marker-discuss-page); }
.thumb-mark[data-state="todo"] { --thumb-mark: var(--marker-todo-page); }
.thumb-mark[data-state="done"] { --thumb-mark: var(--marker-done-page); }
.thumb-mark[data-state="ruled"] { --thumb-mark: var(--marker-ruled-page); }
/* A whole-page finding's band along the thumbnail's top edge, filled. */
.thumbnail .thumb-mark.whole { background: var(--thumb-mark); }
.rail-rule { width: 28px; border-top: 1px solid var(--line); }
.candidate-count { background: var(--accent-soft); color: var(--accent); min-width: 29px; width: auto; height: 29px; padding: 0 4px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* The collapsed rail is 34px inside: four digits shrink to fit it. */
.rail[data-collapsed="true"] > .candidate-count { max-width: 34px; padding: 0 2px; font-size: 10px; letter-spacing: -.02em; }
.rail-caption { font-size: 11px; color: var(--muted); margin-top: -11px; white-space: nowrap; }
.document-area { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--ground); }
.document-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 23px 13px; gap: 15px; }
.eyebrow { font-size: 11px; font-weight: 550; color: var(--muted); }
.document-heading h1 { font-size: 18px; letter-spacing: -.5px; font-weight: 600; margin: 4px 0 5px; }
.document-heading p { font-size: 11px; color: var(--muted); margin: 0; display: flex; gap: 7px; }
.page-review { color: var(--muted); white-space: nowrap; }
.button { min-height: 35px; padding: 8px 11px; font-size: 12px; font-weight: 550; border-radius: 7px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.quiet { border: 1px solid var(--control-line); background: var(--surface); }
.count { font-size: 10px; background: var(--subtle); padding: 2px 5px; border-radius: 4px; color: var(--muted); }
.tools-wrap { position: relative; }
.document-tools { display: flex; align-items: center; gap: 14px; height: 41px; min-height: 41px; margin: 0 23px 12px; padding: 5px 0 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); overflow-x: auto; scrollbar-width: none; }
.document-heading[hidden] + .tools-wrap .document-tools { border-top: 0; margin-top: 8px; }
.tool-group { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.tool-group button { display: grid; place-items: center; font-size: 19px; width: 28px; height: 28px; }
.toolbar-divider { height: 16px; border-left: 1px solid var(--line); }
/* The zoom label opens the zoom menu. It keeps one width, so the plus and
   the controls after it stay put as the label changes. */
.zoom-group .zoom-fit { display: inline-flex; gap: 4px; width: auto; min-width: 84px; padding: 0 8px; font-size: 11px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.zoom-caret { flex: none; fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.zoom-fit[aria-expanded="true"] .zoom-caret, .proof-switch[aria-expanded="true"] .zoom-caret, .project-switch[aria-expanded="true"] .zoom-caret { transform: rotate(180deg); }
/* The zoom menu lies over the page, fixed under the label. See zoomMenu in
   app.js. The proof menu shares its look, as wide as its longest proof. */
.zoom-menu, .proof-menu { position: fixed; z-index: 45; width: 200px; overflow: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 40px var(--shadow); font-size: 12px; }
.zoom-menu[hidden], .proof-menu[hidden] { display: none; }
.proof-menu { width: auto; min-width: 200px; max-width: calc(100vw - 16px); }
.zoom-item, .proof-item { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 30px; padding: 0 8px 0 26px; border-radius: 6px; text-align: left; font-variant-numeric: tabular-nums; position: relative; }
.proof-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zoom-item[aria-checked="true"], .proof-item[aria-checked="true"] { color: var(--accent); font-weight: 600; }
.zoom-item[aria-checked="true"]::before, .proof-item[aria-checked="true"]::before { content: ""; position: absolute; left: 10px; top: 50%; width: 8px; height: 4px; margin-top: -4px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.zoom-item kbd { font-size: 10px; }
.zoom-rule { height: 0; margin: 5px 4px; border-top: 1px solid var(--line); }
.zoom-custom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 8px; margin: 6px 0 0; padding: 8px 4px 2px; border-top: 1px solid var(--line); }
.zoom-custom label { color: var(--muted); }
.zoom-field { display: flex; align-items: center; gap: 3px; min-width: 0; }
.zoom-field input { width: 100%; min-width: 0; padding: 4px 6px; font: inherit; font-variant-numeric: tabular-nums; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.zoom-field input[aria-invalid="true"] { border-color: var(--warning); }
.zoom-unit { color: var(--muted); }
.zoom-apply { min-height: 28px; padding: 3px 9px; font-size: 11px; }
.zoom-hint, .zoom-error { grid-column: 1 / -1; margin: 0; font-size: 11px; }
.zoom-hint { color: var(--muted); }
.zoom-error { color: var(--warning); }
/* The proof menu's jump field and All proofs (hw-395k.5). The field sits
   above the list with the zoom field's look; All proofs is a quiet link
   below a rule. */
.proof-jump { margin: 0 0 5px; padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.proof-jump input { width: 100%; min-width: 0; padding: 5px 8px; font: inherit; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.proof-jump input::placeholder { color: var(--faint); }
.proof-none { margin: 0; padding: 6px 8px; color: var(--muted); }
.proof-all { color: var(--accent); font-weight: 550; }
@media (pointer: coarse) {
  .zoom-menu { width: 240px; font-size: 15px; }
  .proof-menu { min-width: 240px; font-size: 15px; }
  .zoom-item, .proof-item, .zoom-apply { min-height: 44px; }
  .zoom-field input, .proof-jump input { min-height: 44px; font-size: 16px; }
}
.document-tools > button, .list-controls #annotations, .list-controls #compare-toggle { padding: 7px 8px; font-size: 11px; white-space: nowrap; }
/* Markers sits in the Filters and Findings group, so the three wrap
   together. The group's gap is 8 pixels, and Markers keeps the toolbar's
   14 (hw-5x0n.30.190). */
.list-controls #annotations, .list-controls #compare-toggle { margin-left: 6px; }
.list-controls #compare-toggle + #annotations { margin-left: 0; }
.canvas-scroll { flex: 1; min-height: 0; overflow: auto; padding: 3px 25px 20px; container-type: size; }
/* Drag to pan. A page that overflows the canvas shows the grab cursor, and
   the grabbing one while it moves, with no text selected. Holding space
   grabs over the markers too. See bindPan in app.js. */
.canvas-scroll[data-drag="ready"] { cursor: grab; }
.canvas-scroll[data-drag="ready"][data-grab="held"] * { cursor: grab; }
.canvas-scroll[data-drag="dragging"], .canvas-scroll[data-drag="dragging"] * { cursor: grabbing; user-select: none; }
/* The page view is a canvas (hw-5x0n.30.183). The page lies on a
   pasteboard: the stage pads it on every side, so the page drags anywhere
   at any zoom. app.js sets each side's padding, --stage-left and the rest,
   from stagePadding in pasteboard.js, so the page keeps a third of itself
   in view on each axis at the farthest (hw-5x0n.30.196). Until then the
   stage pads by the canvas's own size less 64px, PASTEBOARD_KEEP. app.js scrolls
   the page home when it first shows and on a fit. The canvas is a size
   container, so the room and the page's width follow the canvas, not the
   stage they make. */
.page-stage { --pasteboard-keep: 64px; min-height: 460px; display: flex; justify-content: center; align-items: flex-start; box-sizing: border-box; width: max-content; min-width: 100%; padding: var(--stage-top, max(0px, 100cqh - var(--pasteboard-keep))) var(--stage-right, max(0px, 100cqw - var(--pasteboard-keep))) var(--stage-bottom, max(0px, 100cqh - var(--pasteboard-keep))) var(--stage-left, max(0px, 100cqw - var(--pasteboard-keep))); }
/* The page keeps a fixed margin for two lanes of badges. A margin sized to the
   lanes in use would change the page width, the line spacing, and the lanes. */
/* Width follows zoom: 1 fills the canvas, inside its padding, beside the
   badge margin (fit width). */
.proof-page { --badge-gutter: 76px; --zoom: 1; position: relative; width: calc((100cqw - var(--badge-gutter)) * var(--zoom)); aspect-ratio: 3 / 4; flex-shrink: 0; margin-right: var(--badge-gutter); background: #fff; box-shadow: 0 3px 12px var(--shadow); }
.proof-image { width: 100%; height: 100%; display: block; }
/* While the next page loads, the browser would keep painting the old
   page's picture under the new page's markers (hw-5x0n.30.158). It hides
   after a short grace, so a page from the cache never flickers, and the
   page says it is loading. See pagepicture.js. */
.proof-page[data-picture="loading"] .proof-image { visibility: hidden; transition: visibility 0s linear 150ms; }
.proof-page[data-picture="loading"]::before { content: "Loading page…"; position: absolute; top: 24px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 0.9rem; visibility: hidden; animation: picture-wait 0s linear 150ms forwards; }
@keyframes picture-wait { to { visibility: visible; } }
/* A size container, so badges can be placed in page widths (cqw) at any zoom. */
.marker-layer { position: absolute; inset: 0; pointer-events: none; container-type: size; }
/* --marker colors the badge and leader, and --marker-outline the outline
   on the page. On the editor and operator desks app.js sets data-state
   from the editor's ruling. See the marker colors below. Other desks keep
   the annotation blue. */
.marker { --marker: var(--annotation); --marker-line: var(--annotation-line); --marker-outline: var(--marker-line); --leader-opacity: .8; position: absolute; top: var(--top); left: var(--left); width: var(--width); height: var(--height); border: 1px dashed var(--marker-outline); border-radius: 2px; pointer-events: auto; background: transparent !important; scroll-margin: 24px 72px 24px 24px; }
/* The badge sits 8px beyond the page edge, one lane step further per lane.
   One or two digits make a circle. Three or four make a pill with smaller
   text, and layoutBadges widens the lane step to the widest badge, so the
   leader still meets the badge's left edge. */
.marker > .badge { position: absolute; left: calc((100 - var(--left-n)) * 1cqw + 8px + var(--lane, 0) * var(--lane-step, 30px)); top: 50%; transform: translateY(-50%); box-sizing: border-box; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px; display: grid; place-items: center; background: #fff; color: var(--marker); box-shadow: 0 0 0 1px var(--marker-line); font-size: 11px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.marker > .badge[data-digits="3"], .candidate-row > span:first-child[data-digits="3"] { font-size: 10.5px; }
.marker > .badge[data-digits="4"], .candidate-row > span:first-child[data-digits="4"] { font-size: 10px; letter-spacing: -.02em; }
/* On a touch screen the badge takes taps across at least 44 points. */
@media (pointer: coarse) { .marker > .badge::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(44px, 100%); height: 44px; transform: translate(-50%, -50%); } }
/* The leader runs from the outline's right edge to the badge. The extra 2px covers both borders. */
.marker > .leader { position: absolute; left: 100%; top: 50%; height: 1px; width: calc((100 - var(--left-n) - var(--width-n)) * 1cqw + 10px + var(--lane, 0) * var(--lane-step, 30px)); background: var(--marker-line); opacity: var(--leader-opacity); }
.marker.selected > .leader { background: var(--marker); opacity: 1; }
.marker.selected { outline: 2px solid var(--marker-outline); outline-offset: 2px; border-color: transparent; }
/* A finding about the whole page, such as a line missing from the proof,
   has no box. Its marker is a thin band of its color along the page's top
   edge, clear of the printed text, with the usual badge in the margin
   (hw-5x0n.30.158). Selected, it takes the outline the others do. */
.marker.whole { height: 6px; border: 0; border-radius: 0; background: var(--marker-outline) !important; }
.marker.whole.selected { outline-offset: 1px; }
.marker[data-kind="suppressed"], .marker[data-kind="diagnostic"], .marker[data-kind="abstention"] { border-style: dotted; }
.marker[data-kind="suppressed"] > .badge { box-shadow: none; border: 1px dashed var(--marker-line); }
.marker[data-kind="diagnostic"] > .badge, .candidate-row[data-kind="diagnostic"] > span:first-child { border-radius: 4px; }
.marker[data-kind="abstention"] > .badge, .candidate-row[data-kind="abstention"] > span:first-child { border-radius: 0; }
.marker[data-kind="abstention"] > .badge { box-shadow: 0 0 0 1px var(--marker-line), 0 0 0 3px #fff, 0 0 0 4px var(--marker-line); }
.marker.selected > .badge { background: var(--marker); color: var(--marker-ink, #fff); box-shadow: none; }
/* Visual selection (hw-5x0n.30.233.6): every selected finding's marker
   takes the accent outline and a soft fill, the finding shown included,
   so the page shows what a ruling key will reach. */
.marker.visual-picked, .marker.visual-picked.selected { outline: 2px solid var(--accent); outline-offset: 2px; background-color: color-mix(in srgb, var(--accent) 12%, transparent); }
/* Marker colors by the editor's ruling, from the forge theme: muted not
   ruled, yellow Needs discussion, red To correct, the Correct this
   still to do, mint Keep as printed or done, deep blue any other ruling.
   Dan asked for the yellow and the red (hw-fswv). The light yellow is a
   dark gold, since a bright yellow is short of 4.5:1 on the white page. The light theme uses
   forge-light and the dark theme forge, except that the dark theme's other
   ruling is forge steel, since forge's deep blue number is short of 4.5:1
   on the dark badge. --marker-X is the badge and leader,
   which sit on the theme's ground. --marker-X-page is the outline on the
   proof page, which is white in both themes, so the dark theme draws gold,
   red, mint, and steel outlines in the light theme's shades. --marker-X-ink is
   the number on a filled badge, white or black, whichever reads better.
   Unruled badges are white in the light theme and near black in the dark
   one. Preferences can replace a color in the theme shown; app.js then
   sets all three properties on the root. Keep MARKER_DEFAULTS in app.js in step. */
:root {
  --marker-unruled: #6e675a; --marker-discuss: #8a6a00; --marker-todo: #b04a4a; --marker-done: #3f7a52; --marker-ruled: #1c4e6b;
  --marker-unruled-page: var(--marker-unruled); --marker-discuss-page: var(--marker-discuss); --marker-todo-page: var(--marker-todo); --marker-done-page: var(--marker-done); --marker-ruled-page: var(--marker-ruled);
  --marker-unruled-ink: #fff; --marker-discuss-ink: #fff; --marker-todo-ink: #fff; --marker-done-ink: #fff; --marker-ruled-ink: #fff;
  --marker-badge: #fff;
}
:root[data-theme="dark"] {
  --marker-unruled: #7c7c7c; --marker-discuss: #f6c177; --marker-todo: #ef6f6c; --marker-done: #b3ebbf; --marker-ruled: #81a2c7;
  --marker-discuss-page: #8a6a00; --marker-todo-page: #b04a4a; --marker-done-page: #3f7a52; --marker-ruled-page: #1c4e6b;
  --marker-unruled-ink: #000; --marker-discuss-ink: #000; --marker-todo-ink: #000; --marker-done-ink: #000; --marker-ruled-ink: #000;
  --marker-badge: #0b0d10;
}
.marker[data-state] { --marker-line: var(--marker); --leader-opacity: 1; }
/* The leader starts on the white page and ends on the ground. Its stretch
   over the page takes the outline's shade, which reads on white, and the
   rest keeps the badge's. The leader begins inside the outline's 1px right
   border, so the stretch is 1px longer than the gap to the page edge. */
.marker[data-state] > .leader::before { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: calc((100 - var(--left-n) - var(--width-n)) * 1cqw + 1px); background: var(--marker-outline); }
.marker[data-state]:not(.selected) > .badge { background: var(--marker-badge); }
.marker[data-state][data-kind="abstention"]:not(.selected) > .badge { box-shadow: 0 0 0 1px var(--marker-line), 0 0 0 3px var(--marker-badge), 0 0 0 4px var(--marker-line); }
.marker[data-state="unruled"], .marker-sample[data-state="unruled"] { --marker: var(--marker-unruled); --marker-outline: var(--marker-unruled-page); --marker-ink: var(--marker-unruled-ink); }
.marker[data-state="discuss"], .marker-sample[data-state="discuss"] { --marker: var(--marker-discuss); --marker-outline: var(--marker-discuss-page); --marker-ink: var(--marker-discuss-ink); }
.marker[data-state="todo"], .marker-sample[data-state="todo"] { --marker: var(--marker-todo); --marker-outline: var(--marker-todo-page); --marker-ink: var(--marker-todo-ink); }
.marker[data-state="done"], .marker-sample[data-state="done"] { --marker: var(--marker-done); --marker-outline: var(--marker-done-page); --marker-ink: var(--marker-done-ink); }
.marker[data-state="ruled"], .marker-sample[data-state="ruled"] { --marker: var(--marker-ruled); --marker-outline: var(--marker-ruled-page); --marker-ink: var(--marker-ruled-ink); }
.document-footer { height: 31px; min-height: 31px; display: flex; align-items: center; padding: 0 20px; font-size: 11px; gap: 6px; color: var(--muted); border-top: 1px solid var(--line); background: var(--subtle); }
.lock-icon { font-size: 10px; }
.inspector { width: var(--panel); flex: none; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); min-height: 0; }
.inspector-top { height: 49px; min-height: 49px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-kicker { font-weight: 600; font-size: 12px; }
.panel-nav { display: flex; gap: 7px; align-items: center; font-size: 11px; color: var(--muted); }
.panel-nav button { display: grid; place-items: center; height: 28px; width: 28px; }
.panel-nav { gap: 3px; }
.panel-nav .nav-position { min-width: max(52px, var(--hold-width, 0px)); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.panel-nav .return:not(:disabled) { color: var(--accent); }
.nav-divider { height: 16px; border-left: 1px solid var(--line); margin: 0 3px; }
.inspector-top { padding: 0 12px 0 20px; }
.inspector-body { padding: 23px 27px 20px; overflow: auto; flex: 1; min-height: 0; }
.candidate-heading h2 { font-size: 25px; letter-spacing: -.7px; font-weight: 570; line-height: 1.2; margin: 9px 0 6px; }
.candidate-heading > p { font-size: 11px; color: var(--muted); margin: 0; }
.status { display: flex; align-items: center; gap: 6px; color: var(--warning); font-size: 11px; }
.status b { font-weight: 400; }
.status[data-kind="equal"], .status[data-kind="suppressed"] { color: var(--muted); }
.status[data-kind="equal"] > span, .status[data-kind="suppressed"] > span { background: var(--control-line); }
.status > span { width: 5px; height: 5px; background: var(--warning-dot); border-radius: 50%; }
.status[data-kind="reviewed"] { color: var(--added); }
.status[data-kind="reviewed"] > span { background: var(--added); }
.mode-tabs { display: flex; gap: 20px; margin: 23px -27px 20px; padding: 0 27px; border-bottom: 1px solid var(--line); }
.mode-tabs button { font-size: 12px; padding: 11px 0; border-radius: 0; border-bottom: 2px solid transparent; color: var(--muted); }
.mode-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 25px; margin-bottom: 9px; }
.section-heading h3 { font-size: 12px; font-weight: 600; margin: 0; }
.section-heading > span { font-size: 11px; color: var(--muted); }
.target-quote, .source-quote { margin: 0; font-size: 15px; line-height: 1.75; color: var(--ink); white-space: pre-line; }
.target-quote em, .source-quote em { color: var(--muted); font-size: 12px; }
.target-quote { padding-left: 11px; border-left: 2px solid var(--control-line); }
.target-quote del { color: var(--removed); background: var(--removed-bg); text-decoration-thickness: 1px; }
.source-quote ins { color: var(--added); background: var(--added-bg); text-decoration-thickness: 1px; }
/* A change between proofs shows the earlier proof's words under this
   proof's, each side's own words marked (hw-5x0n.30.236). */
.target-quote ins { color: var(--added); background: var(--added-bg); text-decoration-thickness: 1px; }
.earlier-block { margin-top: 12px; }
.source-heading { margin-top: 26px; }
/* An original lyric stands as the suggestion. Its label keeps it apart from
   the public evidence, which repeats the same words as provenance. */
.lyric-label { margin: 0 0 4px; font-size: 11px; font-weight: 600; color: var(--added); }
.lyric-label small { font-size: 11px; font-weight: 400; color: var(--muted); }
.lyric-label .lyric-witness { display: block; margin-top: 2px; }
/* The Client's card in the editor's shell (hw-fswv.14.8, design step 7c),
   the old page's marks from client.css, scoped to the shell: a word's
   changed letters, the change Keep as printed declined, and the head's
   Newly shared and Already corrected tags. */
body[data-desk="client"] .client-letters { font-weight: 750; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
body[data-desk="client"] del .client-letters { text-decoration-line: underline line-through; }
body[data-desk="client"] .client-declined { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--muted); }
body[data-desk="client"] .client-declined mark { background: none; color: var(--ink); text-decoration: underline dotted; text-underline-offset: 3px; }
body[data-desk="client"] .client-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; order: 2; }
body[data-desk="client"] .client-card-tags[hidden] { display: none; }
body[data-desk="client"] .client-corrected-tag { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; border: 1px solid var(--marker-done-page); border-radius: 999px; color: var(--ink); font-size: 10.5px; font-weight: 650; white-space: nowrap; }
body[data-desk="client"] .client-corrected-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--marker-done); }
body[data-desk="client"] .client-fresh-tag { padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 650; white-space: nowrap; }
/* Add edit in the Client shell (hw-fswv.14.8, design step 7d): the
   Client's own suggestions in the editor's suggestion layer, which the
   page never makes a button, the spot being placed, the placing hint,
   Your edits, and the window for the words, from the old page's
   client.css. */
body[data-desk="client"] .suggestion-pin { pointer-events: none; cursor: default; }
body[data-desk="client"] .suggestion-pin[data-state="accepted"], body[data-desk="client"] .suggestion-pin[data-state="done"] { border-style: solid; border-color: var(--added); background: color-mix(in srgb, var(--added) 10%, transparent); }
body[data-desk="client"] .suggestion-pin[data-state="declined"] { border-color: var(--muted); background: transparent; }
body[data-desk="client"] .suggestion-pin[data-state="accepted"] .suggestion-pin-badge, body[data-desk="client"] .suggestion-pin[data-state="done"] .suggestion-pin-badge { background: var(--added); }
body[data-desk="client"] .suggestion-pin[data-state="declined"] .suggestion-pin-badge { background: var(--muted); }
body[data-desk="client"] .suggestion-pin.client-draft { border-style: solid; }
/* The label sits beside the spot on one line, as on the old Client page,
   so it never wraps over the line above a small spot on a phone. */
body[data-desk="client"] .suggestion-pin-badge { left: calc(100% + 4px); top: -2px; bottom: auto; white-space: nowrap; }
body[data-desk="client"] #proof-page[data-client-adding="true"] { cursor: crosshair; }
body[data-desk="client"] .client-suggest-hint { position: sticky; top: 0; left: 0; z-index: 5; margin: 0; padding: 6px 12px; font-size: 12.5px; color: var(--ink); background: var(--accent-soft); text-align: center; }
body[data-desk="client"] .client-suggest-hint[hidden] { display: none; }
body[data-desk="client"] .client-yours { padding: 4px 0 12px; }
/* Add edit ends the Client's finding buttons' row as an icon, since the
   Walk row that holds it on the editor's desk is off (hw-fswv.14.11). */
body[data-desk="client"] .panel-nav .add-edit { display: inline-grid; place-items: center; margin-left: auto; }
body[data-desk="client"] .panel-nav .add-edit[hidden] { display: none; }
body[data-desk="client"] .panel-nav .add-edit-label { display: none; }
body[data-desk="client"] .client-yours[hidden] { display: none; }
body[data-desk="client"] .client-yours h2 { margin: 4px 0 6px; font-size: 13px; }
body[data-desk="client"] .client-yours-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
body[data-desk="client"] .client-yours-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; font-size: 13px; }
body[data-desk="client"] .client-yours-item p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
body[data-desk="client"] .client-yours-place, body[data-desk="client"] .client-yours-state { font-size: 12px; color: var(--muted); }
body[data-desk="client"] .client-yours-item[data-state="accepted"] .client-yours-state, body[data-desk="client"] .client-yours-item[data-state="done"] .client-yours-state { color: var(--added); }
body[data-desk="client"] .client-yours-reply { padding-left: 8px; border-left: 2px solid var(--line); }
body[data-desk="client"] .client-yours-item .quiet.button { justify-self: start; font-size: 12px; padding: 3px 8px; }
body[data-desk="client"] dialog.client-suggest-dialog { width: min(440px, calc(100vw - 20px)); }
body[data-desk="client"] .client-suggest-dialog form { padding: 0 20px 16px; }
body[data-desk="client"] .client-suggest-dialog header { padding: 16px 0 0; }
body[data-desk="client"] .client-suggest-dialog header h2 { margin: 0; font-size: 16px; }
body[data-desk="client"] .client-suggest-place { font-size: 13px; color: var(--muted); }
body[data-desk="client"] .client-suggest-field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
body[data-desk="client"] .client-suggest-field textarea { font: inherit; font-size: 14px; color: var(--ink); resize: vertical; min-height: 80px; }
body[data-desk="client"] .client-suggest-error { margin: 6px 0 0; font-size: 12.5px; color: var(--removed); }
body[data-desk="client"] .client-suggest-dialog footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
/* The Client's keys dialog in the shell (B7e), the old page's rules. */
body[data-desk="client"] dialog.client-keys-dialog { width: min(560px, calc(100vw - 20px)); }
body[data-desk="client"] .client-keys-hint { margin: 12px 20px 8px; font-size: 13px; color: var(--muted); }
body[data-desk="client"] .client-keys-hint[data-kind="error"] { color: var(--removed); }
body[data-desk="client"] .client-keys-list { list-style: none; margin: 0; padding: 0 20px 8px; }
body[data-desk="client"] .client-keys-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
body[data-desk="client"] .client-keys-keys { display: inline-flex; gap: 4px; }
body[data-desk="client"] .client-keys-dropped { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
body[data-desk="client"] .client-keys-keys kbd { padding: 1px 6px; border: 1px solid var(--control-line); border-radius: 4px; font-size: 11px; }
body[data-desk="client"] .client-keys-dialog footer { padding: 10px 20px 16px; }
@media (max-width: 650px) {
  body[data-desk="client"] dialog.client-suggest-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 14px 14px 0 0; }
}
.text-button { font-size: 11px; color: var(--accent); padding: 4px 0; }
.witness-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); gap: 0 17px; }
.witness-tabs small { font-weight: 400; }
.witness-tabs button { font-size: 11px; border-radius: 0; padding: 7px 0 8px; color: var(--muted); border-bottom: 2px solid transparent; }
.witness-tabs button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.witness-crop { margin: 18px 0 9px; }
/* Across proofs (hw-5x0n.31.11): what changed at the place since the
   earlier proof, the two crops side by side, stacked on a phone, and
   what the editor did on each earlier proof. */
.across { margin: 16px 0 4px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.across[hidden] { display: none; }
.across h3 { margin: 0 0 6px; }
.across p { margin: 4px 0; font-size: 13px; }
.across-state { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.across-tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--subtle); color: var(--muted); }
.across-sentence { color: var(--muted); }
.across-diff { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 15px; }
.across-arrow { color: var(--muted); }
.across-diff del { color: var(--removed); background: var(--removed-bg); text-decoration-thickness: 1px; }
.across-diff ins { color: var(--added); background: var(--added-bg); text-decoration: none; }
/* A carried change (hw-ptzy.9): the proof it came up on, its text before
   and after as Compare's quote, each line under its proof's label so a
   long line wraps inside the panel. */
.across-quote { display: grid; gap: 2px; margin: 6px 0; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.across .across-q { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 10px; align-items: baseline; margin: 0; font-size: 15px; line-height: 1.5; }
.across-q-label { font-size: 11px; color: var(--muted); }
.across-q-text { min-width: 0; overflow-wrap: anywhere; }
.across-q del { color: var(--removed); background: var(--removed-bg); text-decoration: line-through; text-decoration-thickness: 1px; border-radius: 2px; padding: 0 1px; }
.across-q ins { color: var(--added); background: var(--added-bg); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; border-radius: 2px; padding: 0 1px; }
.across-q-word del, .across-q-word ins { font-weight: 600; }
.across-unruled { font-weight: 600; }
/* A crop is a line wide, so the two sit side by side only where each
   still reads; a narrow panel stacks them, as a phone does. A column
   never asks for more than the block's width, which on a phone, beside
   the floated tally, can be under 260 pixels (hw-ptzy.9). */
.across-crops { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 10px; margin: 10px 0 6px; }
/* The slot under the crops holds Swap and the request line later; empty, it takes no room. */
.across-slot:empty { display: none; }
.across-crop { margin: 0; min-width: 0; }
.across-crop figcaption { font-size: 10px; color: var(--muted); margin-top: 4px; }
.across-rows { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12px; }
.across-rows li { padding: 3px 0; }
.across-none, .across-wait { color: var(--muted); font-style: italic; }
.history-proof { display: inline-block; margin: 0 6px; padding: 0 6px; border-radius: 4px; background: var(--subtle); color: var(--muted); font-size: 11px; font-weight: 500; }
.across-rows .history-proof { margin-left: 0; }
/* Proof intake (hw-5x0n.31.14.10.7). The banner over the desk says a
   proof is in intake or Ready, with Open intake or Finish. The Intake
   block lists each item of the finding shown: its slot, the rows of its
   sources side by side with their letters, and the actions on keys. The
   focused item, the one the keys act on, has the accent edge. On a phone
   the rows stack and the buttons wrap. */
.intake-banner { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 36px; padding: 3px 12px; background: var(--accent-soft); color: var(--ink); border-bottom: 1px solid var(--accent); font-size: 13px; position: relative; z-index: 30; }
.intake-banner[hidden] { display: none; }
.intake-banner[data-state="ready"], .intake-banner[data-state="switching"] { background: var(--subtle); border-bottom-color: var(--line); }
.intake-banner-text { flex: 1 1 18em; min-width: 0; font-weight: 550; }
.intake-progress { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.intake-outcome { flex: 1 1 100%; order: 3; font-weight: 500; color: var(--accent); }
.intake-unmatched { flex: 1 1 100%; order: 3; margin: 0; padding-left: 1.2em; }
.intake-unmatched a { color: var(--accent); }
/* The Done but unchanged block (hw-5x0n.31.14.10.22): a fold on its own
   line under the banner, its list scrolling past a dozen lines. */
.intake-inferred { flex: 1 1 100%; order: 4; font-weight: 400; }
.intake-inferred > summary { cursor: pointer; font-weight: 550; width: fit-content; }
.intake-inferred-help { margin: 4px 0; color: var(--muted); }
.intake-inferred-list { margin: 0; padding-left: 1.2em; max-height: 14em; overflow-y: auto; }
.intake-inferred-list li { overflow-wrap: anywhere; }
.intake-banner .button { flex: none; min-height: 28px; padding: 3px 10px; }
.intake-banner .button[aria-disabled="true"], .intake-action[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
/* Agent triage: evidence beside the ruling, never a ruling (hw-5x0n.31.47.9). */
.triage { margin: 16px 0 4px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 6px; background: var(--subtle); }
.triage[hidden] { display: none; }
.triage h3 { margin: 0 0 6px; }
.triage p { margin: 4px 0; overflow-wrap: anywhere; }
.triage-line { font-weight: 550; }
.triage-foot { font-size: 12px; color: var(--muted); }
/* How often hand rulings agreed with each cause (hw-6r34.4). */
.triage-agreement { font-size: 13px; }
.triage-causes { margin: 6px 0; font-size: 12px; }
.triage-causes summary { cursor: pointer; }
.triage-causes ul { margin: 2px 0 6px; padding-left: 18px; }
.triage-group-head { font-weight: 550; }
.triage-basis { color: var(--muted); }
.triage-crop { display: block; max-width: 100%; height: auto; margin: 6px 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.intake { margin: 16px 0 4px; padding: 12px; border: 1px solid var(--accent); border-radius: 6px; background: var(--surface); }
.intake[hidden] { display: none; }
.intake h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.intake-count { font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.intake-item { margin: 8px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 4px; }
.intake-item.focused { border-left-color: var(--accent); background: var(--subtle); }
.intake-item[data-status="resolved"], .intake-item[data-status="auto"] { opacity: 0.85; }
.intake-item[data-status="superseded"] { opacity: 0.6; border-style: dashed; }
.intake-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; }
.intake-class { color: var(--muted); font-size: 12px; }
.intake-status { margin-left: auto; padding: 0 6px; border-radius: 4px; background: var(--subtle); color: var(--muted); font-size: 11px; font-weight: 500; }
.intake-status[data-status="open"] { background: var(--accent-soft); color: var(--accent); }
.intake-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; }
.intake-row { display: flex; gap: 8px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.intake-row.intake-current { border-style: dashed; }
.intake-row.intake-nothing { color: var(--muted); }
.intake-letter { flex: none; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--subtle); color: var(--ink); font-size: 11px; font-weight: 600; }
.intake-row-body { min-width: 0; }
.intake-row p { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.intake-where, .intake-who { color: var(--muted); }
.intake-note { white-space: pre-wrap; margin-top: 2px !important; }
.intake-resolution { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.intake-resolution b { color: var(--ink); }
.intake-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.intake-action { min-height: 28px; padding: 3px 10px; }
.intake-why { margin: 6px 0 0; font-size: 12px; color: var(--muted); font-style: italic; }
.intake-form { display: grid; gap: 6px; margin-top: 8px; }
.intake-form-note { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; }
.intake-form-buttons { display: flex; gap: 6px; justify-content: flex-end; }
.history-intake { display: inline-block; margin: 0 6px; padding: 0 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 500; }
body[data-proof="intake"] .proof-switch { border-color: var(--accent); color: var(--accent); }
@media (pointer: coarse) { .intake-action, .intake-banner .button { min-height: 44px; } }
/* An edit added by hand across proofs (hw-5x0n.31.42.14): who added it,
   and on a finding the new pass found at an edit's place, the edit with
   the person's change beside the pass's, in two columns that wrap their
   words on a phone. */
.across-added { font-weight: 500; }
.across-linkback { color: var(--muted); }
.across-link { margin: 8px 0 4px; padding: 8px 10px; border-left: 3px solid var(--accent); border-radius: 4px; background: var(--subtle); }
.across-link-changes { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: 6px 0 0; font-size: 13px; }
.across-link-changes dt { color: var(--muted); }
.across-link-changes dd { margin: 0; overflow-wrap: anywhere; }

.crop-frame { position: relative; overflow: hidden; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.crop-frame img { position: absolute; max-width: none; display: block; }
.witness-crop figcaption { font-size: 10px; color: var(--muted); margin-top: 6px; }
.diagnostic { display: flex; gap: 8px; align-items: flex-start; margin: 18px 0 0; color: var(--muted); background: var(--subtle); border-radius: 6px; padding: 12px; font-size: 11px; line-height: 1.6; }
.diagnostic p { margin: 0; }
body[data-kind="findings"] .diagnostic { color: var(--ink); font-size: 13px; }
.finding-extra h3 { font-size: 12px; font-weight: 600; margin: 18px 0 6px; }
.context-text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); white-space: pre-line; }
.context-note { margin: 4px 0 0; font-size: 12px; font-style: italic; color: var(--muted); }
.context-hit { font-weight: 650; color: var(--ink); background: var(--accent-soft); border-radius: 2px; padding: 0 1px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.evidence-list { margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.5; }
.evidence-list li + li { margin-top: 8px; }
.evidence-list a { color: var(--ink); overflow-wrap: anywhere; }
.evidence-list small { color: var(--muted); }
/* Which copy is read, on a Duplicate copies finding. The five choices wrap
   in the inspector's width, and the pressed one carries the accent. */
.copy-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.copy-choice { min-height: 32px; }
.copy-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.copy-choice:disabled { opacity: .55; cursor: default; }
.copy-state { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.evidence-quote { margin: 4px 0 0; color: var(--muted); }
.info-icon { display: grid; place-items: center; font-size: 9px; width: 13px; height: 13px; border: 1px solid var(--muted); border-radius: 50%; flex: none; margin-top: 2px; }
.provenance { font-size: 11px; margin: 15px 0; color: var(--muted); line-height: 1.7; }
.provenance summary { cursor: pointer; }
.provenance dl { display: grid; grid-template-columns: 60px 1fr; gap: 6px; }
.provenance dt { font-weight: 600; }
.provenance dd { margin: 0; }
.proposal-content .section-heading { margin-top: 5px; }
.input-label { font-size: 11px; display: block; color: var(--muted); margin-bottom: 6px; }
.input-label span { color: var(--faint); margin-left: 4px; }
.notes-label { margin-top: 12px; }
textarea { width: 100%; resize: vertical; border: 1px solid var(--control-line); border-radius: 7px; padding: 10px 11px; font-size: 14px; line-height: 1.6; min-height: 120px; color: var(--ink); background: var(--surface); }
textarea::placeholder { color: var(--faint); font-size: 12px; }
.draft-explanation { font-size: 10px; line-height: 1.6; color: var(--faint); margin: 6px 0; }
.section-heading .draft-status { color: var(--muted); }
.decision-area { border-top: 1px solid var(--line); padding: 16px 26px 12px; background: var(--surface); }
.decision-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.decision-head > .decision-label { font-size: 11px; color: var(--muted); }
.decision-current { font-size: 11px; color: var(--muted); text-align: right; }
.decision-current[data-state="committed"] { color: var(--added); font-weight: 600; }
.decision-current[data-state="todo"] { color: var(--warning); font-weight: 600; }
/* The ruling buttons (hw-5x0n.30.209.1): one per ruling in a row, each
   with its marker color, its name, and its first key. The ruling the
   finding holds shows pressed, in the accent, as a pressed choice does
   elsewhere on the desk. One press rules and saves. */
.ruling-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; container: rulings / inline-size; }
.rule-button { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 8px; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.rule-button .rule-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--rule-color, var(--marker-ruled)); }
.rule-button[data-color="done"] { --rule-color: var(--marker-done); }
.rule-button[data-color="discuss"] { --rule-color: var(--marker-discuss); }
.rule-button[data-color="todo"] { --rule-color: var(--marker-todo); }
/* Four buttons in one row broke their names inside words, so the editor
   desk's four sit two to a row (hw-fswv). */
.ruling-buttons:has(> .rule-button:nth-child(4)) > .rule-button { flex-basis: calc(50% - 3px); }
/* A long name wraps to a second line rather than losing its end, so
   Needs discussion reads whole in a 420 pixel panel and on a phone. It
   wraps only between words (hw-5x0n.30.245). The narrower panels below
   tighten the buttons so the longest word fits. */
.rule-button .rule-name { flex: 1 1 auto; min-width: 0; line-height: 1.2; overflow-wrap: normal; }
.rule-button kbd { flex: none; min-width: 1.5em; padding: 0 4px; font-size: 10px; color: var(--muted); }
.rule-button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent); }
.rule-button[aria-pressed="true"] kbd { color: var(--accent); }
.rule-button:disabled { opacity: .55; cursor: default; }
.rule-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* The quiet line under the note: saving, saved, or what saves it. */
.note-state { font-size: 11px; line-height: 1.5; color: var(--faint); margin: 3px 0 0; min-height: 0; }
.note-state:empty { display: none; }
.decision-area .decision-note { display: block; min-height: 0; height: 52px; margin-top: 8px; padding: 7px 9px; font-size: 12px; line-height: 1.5; }
.decision-area .decision-note:disabled { opacity: .6; }
/* A note label shown, as the Client view's comment has (decisionarea.js). */
.decision-note-label { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); }
.decision-note-label + .decision-note { margin-top: 4px; }
.decision-status { font-size: 11px; line-height: 1.5; color: var(--faint); margin: 8px 0 0; min-height: 15px; }
.decision-status b { font-weight: 600; }
.decision-status[data-kind="committed"], .decision-status[data-kind="advanced"] { color: var(--added); }
.decision-status[data-kind="refused"] { color: var(--removed); }
.primary { background: var(--button); color: var(--button-ink); min-height: 36px; font-size: 11px; }
.primary:hover:not(:disabled) { background: var(--button-hover); }
.receipt-preview { margin-top: 18px; padding: 12px; background: var(--preview); border-radius: 7px; font-size: 12px; color: var(--preview-ink); }
.receipt-preview p { line-height: 1.6; }
.receipt-preview small { font-size: 11px; line-height: 1.6; display: block; }
.history-content { margin-top: 23px; }
.history-content h3 { font-size: 12px; }
/* The conversation with the Client above History (hw-5x0n.30.212). */
.client-talk { margin-bottom: 18px; }
.client-talk[hidden], .client-talk-form[hidden] { display: none; }
.client-talk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.client-talk-said { padding: 6px 10px; border-radius: 8px; background: var(--subtle); font-size: 12px; }
.client-talk-said p { margin: 0; color: var(--muted); }
.client-talk-said b { color: var(--ink); }
.client-talk-said[data-from="editor"] { border-left: 3px solid var(--accent); }
.client-talk-empty { font-size: 12px; color: var(--muted); }
.client-talk-form { margin-top: 8px; }
.client-talk-form textarea { display: block; width: 100%; min-height: 48px; font-size: 13px; }
.client-talk-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.client-talk-status { flex: 1 1 auto; font-size: 12px; color: var(--muted); }
.history-entry { display: flex; gap: 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.history-entry { margin-bottom: 12px; }
.history-entry b { color: var(--ink); }
.history-entry p { margin: 2px 0 0; }
.history-entry .history-note { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.history-dot { width: 7px; height: 7px; background: var(--control-line); border-radius: 50%; flex: none; margin-top: 6px; }
.history-entry.current .history-dot { background: var(--added); }
.history-icon { width: 7px; flex: none; display: flex; justify-content: center; font-weight: 700; color: var(--muted); }
.history-entry[data-mark="done"] .history-icon { color: var(--edit-done); }
.candidate-list { position: absolute; top: calc(100% - 6px); right: 27px; width: 320px; max-height: min(70dvh, 640px); overflow: auto; background: var(--surface); box-shadow: 0 10px 40px var(--shadow); border: 1px solid var(--line); border-radius: 10px; z-index: 20; padding: 7px; }
.list-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding: 6px 8px; }
.list-head button { font-size: 20px; width: 28px; height: 28px; }
.list-controls { display: flex; align-items: center; gap: 8px; }
.list-controls .button { min-height: 30px; padding: 5px 9px; }
/* A filter in force is shown in the accent color, so it is never forgotten. */
.builder-options { clear: both; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.builder-options label { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.builder-options label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.builder-options input { margin: 0; accent-color: var(--accent); }
.builder-options small { color: var(--muted); }
.candidate-row { display: flex; width: 100%; align-items: center; text-align: left; gap: 10px; padding: 12px 9px; }
/* A row's passage badge has the page badge's box: a circle while the
   number fits one, a pill beyond. flex: none keeps a long heading from
   squeezing it oblong. The kinds take the page's corners above. */
.candidate-row > span:first-child { flex: none; display: grid; place-items: center; box-sizing: border-box; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.candidate-row b { font-size: 12px; font-weight: 550; }
.candidate-row small { display: block; font-size: 11px; margin-top: 3px; color: var(--muted); }
.candidate-section h4 { font-size: 11px; font-weight: 600; color: var(--muted); margin: 12px 9px 2px; }
.candidate-row[data-kind="suppressed"] > span:first-child, .candidate-row[data-kind="diagnostic"] > span:first-child, .candidate-row[data-kind="abstention"] > span:first-child { background: var(--subtle); color: var(--muted); }
/* The lower-priority list is a details element, closed until opened
   (hw-3l7l.11). Its summary is the list heading beside the disclosure
   marker. Its rows take the muted badge and a muted heading as the mark. */
details.candidate-section > summary { cursor: pointer; color: var(--muted); margin: 12px 9px 2px; }
details.candidate-section > summary h4 { display: inline; margin: 0; }
.candidate-row[data-priority="lower"] > span:first-child { background: var(--subtle); color: var(--muted); }
.candidate-row[data-priority="lower"] b { color: var(--muted); }
.list-empty { font-size: 12px; color: var(--muted); padding: 8px 9px; }
/* Batch selection: a checkbox before each row, and a bar under search
   while a selection exists. See batch.js. */
.candidate-item { display: flex; align-items: center; }
.candidate-item .candidate-row { flex: 1; min-width: 0; }
.candidate-pick { flex: none; width: 15px; height: 15px; margin: 0 0 0 9px; accent-color: var(--accent); }
.candidate-item.picked { background: var(--accent-soft); border-radius: 7px; }
.candidate-item.visual-picked { background: var(--accent-soft); border-radius: 7px; box-shadow: inset 3px 0 0 var(--accent); }
.batch-bar { position: sticky; top: 36px; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 -7px 4px; padding: 6px 15px 8px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; }
.batch-bar .button { min-height: 28px; padding: 4px 8px; }
.batch-rulings { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; }
/* The 320 pixel Findings list clipped four ruling buttons in one row, so
   the batch bar's four sit two to a row, as the panel's do (hw-fswv.17). */
.batch-rulings:has(> .rule-button:nth-child(4)) > .rule-button { flex-basis: calc(50% - 3px); }
.triage-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 -7px 4px; padding: 6px 15px 8px; background: var(--subtle); border-bottom: 1px solid var(--line); font-size: 12px; }
.triage-bulk[hidden] { display: none; }
.triage-bulk .button { min-height: 28px; padding: 4px 8px; }
/* The head holds the count and, right beside it, Clear selection as a
   small x, so the actions keep their rows (hw-5x0n.30.167). The x's
   negative margins keep the head as tall as the count's line. */
.batch-head { flex: 1 0 100%; display: flex; align-items: center; gap: 4px; }
.batch-count { flex: none; font-weight: 600; }
.batch-note { flex: 1 0 100%; box-sizing: border-box; min-height: 28px; padding: 4px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
#batch-clear-selection { flex: none; width: 24px; height: 24px; padding: 0; border-radius: 6px; font-size: 18px; line-height: 1; margin: -4px 0; position: relative; }
/* On a touch screen the x keeps its small look and takes a 44px tap. */
@media (pointer: coarse) { #batch-clear-selection::after { content: ""; position: absolute; inset: -10px; } }
.pref-batch select { font: inherit; }
.preference-list #pref-batch-above { width: 72px; height: auto; }
.write-notice-list { margin: 4px 0 0; padding-left: 18px; }
/* Search sits at the top of the list and stays there while results scroll. */
.list-search { position: sticky; top: -7px; z-index: 1; margin: 0 -7px; padding: 0 15px 6px; background: var(--surface); }
.list-search input { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.list-search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.search-status { margin: 6px 1px 0; font-size: 11px; color: var(--muted); }
.search-scope { margin: 6px 0 0; padding: 2px 9px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.search-scope[aria-pressed="true"] { font-weight: 600; }
.search-scope:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.search-approx { margin: 8px 9px 2px; padding: 6px 8px; border-radius: 6px; background: var(--subtle); color: var(--warning); font-size: 11px; font-weight: 600; }
.search-hit { align-items: flex-start; }
.search-hit[aria-selected="true"] { background: var(--hover); box-shadow: inset 3px 0 0 var(--accent); }
.search-snippet { display: block; margin-top: 4px; font-size: 12px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.search-field, .search-more { color: var(--muted); font-size: 11px; }
.candidate-row mark { background: var(--mark); color: var(--mark-ink); border-radius: 2px; padding: 0 1px; }
.empty-state h2 { font-size: 20px; font-weight: 570; margin: 4px 0 8px; }
.empty-state p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.empty-state .button { margin-top: 4px; }
.load-error { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); background: var(--removed-bg); color: var(--removed); border: 1px solid var(--removed); padding: 12px 16px; border-radius: 8px; font-size: 12px; line-height: 1.6; z-index: 50; }
/* The new-version note sits at the top, clear of Done at the bottom. */
.update-note { position: fixed; top: calc(6px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; box-shadow: 0 4px 16px var(--shadow); }
.update-note button { border: 0; border-radius: 999px; padding: 4px 10px; background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.update-note button:disabled { opacity: 0.6; cursor: default; }
.update-note .update-short { display: none; }
/* A phone's app bar has room only over the title, after the tile. */
@media (max-width: 600px) {
  .update-note { left: calc(52px + env(safe-area-inset-left)); transform: none; }
  .update-note .update-long { display: none; }
  .update-note .update-short { display: inline; }
  .update-note.has-notes #update-text .update-short { display: none; }
  .update-note.has-notes { padding-left: 4px; }
}
dialog { width: min(720px, calc(100vw - 28px)); max-height: 92dvh; border: 1px solid var(--line); border-radius: 12px; padding: 0; box-shadow: 0 30px 100px var(--shadow); color: var(--ink); background: var(--surface); }
dialog::backdrop { background: var(--scrim); }
dialog > header { position: sticky; top: 0; z-index: 1; background: var(--surface); padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
dialog h2 { font-size: 18px; margin: 3px 0; }
dialog header button { font-size: 25px; width: 36px; height: 36px; }
dialog > p { font-size: 12px; color: var(--muted); padding: 0 20px 12px; line-height: 1.7; }
.witness-document { background: var(--ground); padding: 22px; text-align: center; }
.full-page { position: relative; margin: 0 auto; width: 100%; max-width: 450px; background: #fff; box-shadow: 0 2px 8px var(--shadow); }
.full-page img { display: block; width: 100%; height: 100%; }
.full-region { position: absolute; outline: 2px solid var(--annotation); outline-offset: 2px; pointer-events: none; }
/* A reviewer desk keeps the Canvas view it had: the rail and the folded
   panel's strip go, and the toolbar floats under the title. The editor
   and operator desks fold both instead. See canvas in app.js. */
body[data-role="reviewer"].focus :is(.rail, .panel-strip) { display: none; }
body[data-role="reviewer"].focus .document-heading { padding: 19px 30px 12px; }
body[data-role="reviewer"].focus .document-heading .eyebrow { display: none; }
body[data-role="reviewer"].focus .document-tools { margin: 0 auto 12px; width: min(820px, calc(100% - 60px)); padding: 0 10px; height: 39px; min-height: 39px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
@media (max-width: 1000px) {
  :root { --panel: 360px; }
  .rail { display: none; }
  .document-heading { padding: 16px; }
  .document-heading h1 { font-size: 16px; }
  .document-tools { margin-left: 16px; margin-right: 16px; gap: 5px; }
  .document-tools #annotations { display: none; }
  .canvas-scroll { padding-left: 15px; padding-right: 15px; }
  .operator { font-size: 0; }
  .operator .avatar { font-size: 11px; }
  .appbar { gap: 12px; padding: 0 15px; }
  /* On a tablet the coverage line gives up its width before the project
     button, and the edition chip keeps to one line. The proof button
     keeps its size and names the proof alone, without its date or state,
     which its menu and its spoken name keep (hw-59nc). */
  .coverage { flex: 0 1000 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .edition { white-space: nowrap; }
  .proof-switch { flex: none; }
  .proof-switch-rest { display: none; }
  #canvas-hint { display: none; }
  .page-stage { min-height: 380px; }
  /* The toolbar wraps so every control stays in view. The folded strip's
     navigation spreads across the strip instead of past it. The open
     panel's stays compact, see the Walk row below. */
  .document-tools, body[data-role="reviewer"].focus .document-tools { flex-wrap: wrap; height: auto; min-height: 0; overflow: visible; row-gap: 6px; padding-bottom: 2px; }
  .document-tools .grow { display: none; }
  /* Filters and Findings keep to the right of their row, so the filters
     panel sits under them (hw-5x0n.30.190). */
  .list-controls { margin-left: auto; }
  .inspector-top { padding: 0 6px; }
  .panel-nav { flex: 1; justify-content: space-between; min-width: 0; }
}
/* A tablet-sized narrow screen, such as an iPad in portrait, gives the
   review panel 10 more pixels, which with the tighter Walk row below
   leaves Add an edit 30 pixels to spare after Follow the page
   (hw-5x0n.30.186). The page keeps the rest: at 834 points the filters
   panel still shows a long value such as Repeated and missing words
   whole. Phones, and a phone in landscape, keep the narrow panel. */
@media (max-width: 1000px) and (min-width: 651px) and (min-height: 521px) {
  :root { --panel: 370px; }
}
/* Phones in portrait. The page sits above the review panel. Text stays at
   reading size, and the app bar alone names the book. */
@media (max-width: 650px) {
  .app { min-height: 0; }
  .environment, #focus-toggle { display: none; }
  .appbar { height: 52px; min-height: 52px; padding: 0 12px; gap: 6px; }
  .brand-tile { width: 30px; height: 30px; }
  .app-divider { margin: 0; height: 19px; }
  .publication { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* The Client's progress line keeps its words; the meter leaves room for the title. */
  .appbar .client-progress { min-width: 0; margin-left: 4px; }
  .appbar .client-meter { display: none; }
  .edition { font-size: 12px; padding: 3px 6px; white-space: nowrap; }
  /* The menu repeats the coverage line. With a switcher, the switcher
     names the book and the package title gives it the room. */
  .coverage { display: none; }
  .project-switch { max-width: 60vw; min-width: 0; flex: 0 1 auto; gap: 4px; padding: 0 6px; font-size: 13px; }
  .proof-switch { max-width: 42vw; min-width: 0; flex: none; gap: 4px; padding: 0 6px; font-size: 13px; }
  .operator { display: none; }
  .workspace { flex-direction: column; }
  .document-area { min-height: 0; flex: 1 1 42%; }
  .document-heading, .page-review { display: none; }
  .document-tools, body[data-role="reviewer"].focus .document-tools { margin: 8px 12px 6px; border-top: 0; padding-top: 0; }
  .candidate-list { left: 8px; right: 8px; width: auto; }
  /* Page and zoom controls share the first row with the panel toggle, which
     keeps its name for screen readers only. The filter gets the next row. */
  .document-footer { display: none; }
  .canvas-scroll { padding: 0 10px 10px; }
  .page-stage { min-height: 0; }
  .inspector { width: 100%; height: auto; flex: 1 1 58%; min-height: 0; border: 0; border-top: 1px solid var(--line); }
  .inspector-body { padding: 14px 16px; }
  .candidate-heading h2 { font-size: 20px; margin: 5px 0; }
  .section-heading { margin-top: 15px; }
  .decision-area { padding: 10px 16px; }
  .ruling-buttons { margin-top: 4px; }
  .decision-area .decision-note { height: 44px; }
  .mode-tabs { margin: 12px -16px 12px; padding-left: 16px; }
  dialog > header { padding: 11px 14px; }
  dialog h2 { font-size: 16px; }
  .witness-document { padding: 12px; }
  textarea { min-height: 75px; }
}

/* A phone's top bar is one row that always fits (hw-59nc, Dan on Slack,
   2026-10-17). The logo, the proof button, the package switch, and the
   desk menu keep their size, and the project button gives up its width
   first. The proof button names the proof alone, as on a tablet. Search
   everything moves into the desk menu. The edition chip steps aside, since the Index
   package's own line names the proof it was generated for, and so does
   the separator after the logo, whose bordered buttons set it apart. */
.menu-item.menu-search { display: none; }
@media (max-width: 650px) {
  .appbar .msearch-open, .appbar .edition, .appbar .app-divider { display: none; }
  .menu-item.menu-search:not([hidden]) { display: flex; }
  .brand-tile, .mode-switch, .menu-anchor { flex: none; }
}

/* Phones in landscape and other short screens. The page keeps the height
   the heading and footer would take. */
@media (max-height: 520px) and (min-width: 651px) {
  .app { min-height: 0; }
  .appbar { height: 46px; min-height: 46px; }
  .document-heading, .document-footer { display: none; }
  .document-tools, body[data-role="reviewer"].focus .document-tools { margin-top: 6px; border-top: 0; padding-top: 0; }
  .inspector-body { padding: 10px 16px; }
  .mode-tabs { margin: 10px -16px 10px; padding-left: 16px; }
  .decision-area { padding: 8px 16px; }
  .ruling-buttons { margin-top: 4px; }
  .decision-area .decision-note { height: 40px; min-height: 0; margin-top: 6px; }
  .page-stage { min-height: 0; }
}

/* Touch screens. Controls are at least 44 points, the size Apple asks for,
   and form fields use 16px text so Safari does not zoom in on focus. */
@media (pointer: coarse) {
  input, select, textarea, .decision-area .decision-note, .key-search-input, .list-search input { font-size: 16px; }
  .list-search input { min-height: 44px; }
  .key-search-scope, .search-scope, .binding-add, .binding-take, .binding-cancel, .binding-reset, .key-chip, .key-menu-item { min-height: 44px; }
  .binding-add { min-width: 44px; }
  .tool-group button, #menu-open, .rail button { min-width: 44px; min-height: 44px; }
  #focus-toggle, .region-list label { min-height: 44px; }
  /* Eight buttons share the panel's width, so they keep the height and give
     up some width. */
  .panel-nav button { min-width: 36px; min-height: 44px; }
  .panel-nav .nav-divider { display: none; }
  .document-tools > button, .list-controls .button, .list-controls #annotations, .list-controls #compare-toggle, .rule-button, .menu-item, .mode-tabs button { min-height: 44px; }
  .tool-group { gap: 2px; }
  .panel-nav { gap: 0; }
  /* The browser's tap highlight lingers on a button as a tinted square,
     and stays on an arrow that the tap disabled. Buttons show a press with
     their own background instead. */
  button { -webkit-tap-highlight-color: transparent; }
  button:active:not(:disabled) { background: var(--hover); }
  .primary:active:not(:disabled) { background: var(--button-hover); }
}

/* Reduced motion follows the device unless Motion in Preferences is Full,
   and Motion set to Reduced asks for it on any device. See applyLook in
   app.js. */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) *, :root:not([data-motion="full"]) *::before, :root:not([data-motion="full"]) *::after { transition: none !important; scroll-behavior: auto !important; }
}
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after { transition: none !important; scroll-behavior: auto !important; }
.signin-page { display: grid; place-items: center; min-height: 100vh; background: var(--subtle); }
.signin { width: min(360px, 90vw); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 28px; }
.signin h1 { font-size: 20px; margin: 14px 0 6px; }
.signin p { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.signin h1:has(+ #signin-lead[hidden]) { margin-bottom: 18px; }
.signin form { display: grid; gap: 6px; }
.signin label { font-size: 12px; font-weight: 600; margin-top: 6px; }
.signin input { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--control-line); border-radius: 6px; background: transparent; color: var(--ink); }
.signin button { margin-top: 14px; }
.signin .signin-status { min-height: 1.4em; margin: 8px 0 0; }
/* The sign-in page draws one mode at a time; a hidden form stays hidden
   although forms here are grids. */
.signin [hidden] { display: none; }
.signin .signin-who { color: var(--ink); font-weight: 600; margin: 0 0 6px; }
.signin .signin-hint { font-size: 12px; margin: 0; }
/* On a phone the page is the card: it starts at the top, so the keyboard
   never covers a centered form, and its fields and button take a finger.
   16px keeps the phone from zooming into a focused field. */
@media (max-width: 600px) {
  .signin-page { place-items: start stretch; background: var(--surface); }
  .signin { width: auto; min-height: 100dvh; box-sizing: border-box; border: 0; border-radius: 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .signin .brand-lockup { max-width: 160px; height: auto; }
  .signin input { font-size: 16px; min-height: 44px; }
  .signin button { min-height: 44px; font-size: 15px; }
  .signin .signin-hint { font-size: 13px; }
}
.list-controls { flex: none; }

/* Preferences apply in this browser only. */
dialog.preferences { width: min(420px, calc(100vw - 28px)); }
dialog.preferences header button { font-size: 20px; width: 28px; height: 28px; }
.preference-list { display: grid; gap: 12px; padding: 16px 20px 20px; font-size: 13px; }
.preference-list p { margin: 0; color: var(--muted); font-size: 12px; }
.preference-list label { display: flex; gap: 9px; align-items: center; }
.pref-undo { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.pref-undo legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
.history-by { margin-left: 6px; padding: 0 5px; border-radius: 3px; font-size: 11px; color: var(--muted); border: 1px solid currentColor; }
/* View as: a rehearsed row in History, and the label naming who rehearsed it. */
.history-rehearsal { margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 11px; color: var(--muted); border: 1px dashed currentColor; }
.history-rehearsal-by { color: var(--muted); font-style: italic; }
.preference-list input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Keys: the help list and the key editor in Preferences. */
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; font: 600 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; background: var(--subtle); color: var(--ink); }
dialog.preferences { width: min(600px, calc(100vw - 28px)); overflow: auto; }
.preference-list h3 { font-size: 14px; margin: 8px 0 0; }
/* The Keys changed note (hw-5x0n.30.233.2): each moved key, the arrow, its
   new keys, and what the old key does now. It scrolls on a phone, with the
   two answers fixed at its foot. */
dialog.keys-note { width: min(560px, calc(100vw - 28px)); max-height: min(720px, calc(100dvh - 28px)); padding: 0; overflow: hidden; }
dialog.keys-note[open] { display: flex; flex-direction: column; }
.keys-note .preference-list { overflow: auto; min-height: 0; }
.keys-note-lede { font-size: 13px; color: var(--muted); }
.keys-note .keys-note-head { margin: 4px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* The list holds the columns and each row takes them as a subgrid, so the
   old-key column is as wide as the list's widest cap, such as Ctrl+o on a
   phone, and the arrows still line up. */
.keys-note-list { display: grid; grid-template-columns: minmax(4.5em, max-content) 1.2em 6.5em 1fr; column-gap: 8px; margin: 0; padding: 0; list-style: none; }
.keys-note-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.keys-note-old { white-space: nowrap; }
.keys-note-arrow { color: var(--muted); }
/* A new key has no old key: its keys, then what it does (hw-5x0n.30.233.5). */
.keys-note-list:has(> .keys-note-added) { grid-template-columns: minmax(6.5em, max-content) 1fr; }
.keys-note-new { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; font-size: 11px; color: var(--muted); }
.keys-note-what { display: grid; font-size: 13px; }
.keys-note-what b { font-weight: 500; }
.keys-note-what small { font-size: 11px; color: var(--muted); }
.keys-note-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
@media (max-width: 650px) {
  .keys-note-list { grid-template-columns: minmax(3.5em, max-content) 1em 5.5em 1fr; }
  .keys-note-list:has(> .keys-note-added) { grid-template-columns: minmax(5.5em, max-content) 1fr; }
  .keys-note-foot .button { flex: 1; min-height: 44px; }
}
/* After ccull's help: folding groups and sections, a compact table with the
   keys first in the accent color, a short note beside the action, and a
   search over key names or descriptions. */
.key-search { display: flex; gap: 6px; margin: 0 0 8px; }
.key-search-input { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.key-search-scope { flex: none; min-width: 56px; padding: 4px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
/* Preferences and the help keep their header out of the scroll, so a key
   group heading sticks below the title instead of sliding over it. */
#preferences-dialog[open], #help-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
#preferences-dialog > header, #help-dialog > header, #help-dialog > p { flex: none; }
#help-dialog > .help-list { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* A sticky heading stops at the scroller's padding edge, so the top space
   moves from that padding onto the first child. */
#help-dialog > .help-list { padding-top: 0; }
#help-dialog > .help-list > :first-child { margin-top: 8px; }
.key-group { margin-bottom: 6px; }
.key-group > summary { position: sticky; top: 0; z-index: 1; padding: 6px 0 4px; background: var(--surface); cursor: pointer; user-select: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.key-section { margin: 2px 0 8px 12px; }
.key-section > summary { padding: 4px 0 2px; cursor: pointer; user-select: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.key-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.key-table td { padding: 3px 12px 3px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
/* One fixed key column in every section, so descriptions line up across
   the whole panel. Long key sets wrap inside the column. */
.help-keys { width: 13em; white-space: normal; overflow-wrap: anywhere; color: var(--accent); font-size: 12px; }
.preference-list .key-search-input { width: auto; height: auto; }
.help-keys kbd { color: var(--accent); }
.help-note { color: var(--muted); font-size: 12px; }
.key-empty { margin: 8px 0; color: var(--muted); font-size: 12px; }
/* The Keys pane (hw-5x0n.30.233.4): the label, a dot when changed, the
   caps on the right, and a + that records another key. A conflict wraps
   under the row. */
.binding-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 5px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.binding-label { flex: 1 1 12em; min-width: 0; }
.binding-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.binding-keys { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex: 0 1 auto; color: var(--accent); }
.binding { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; }
button.binding { padding: 0; border: 0; border-radius: 5px; background: none; color: inherit; cursor: pointer; }
button.binding:hover kbd, button.binding[aria-expanded="true"] kbd { border-color: var(--accent); }
button.binding:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.binding kbd { color: var(--accent); }
.binding-recording { padding: 1px 6px; border: 1px dashed var(--accent); border-radius: 5px; color: var(--accent); }
.binding-recording[data-conflict="true"] { border-color: var(--warning); }
.binding-waiting { font-size: 12px; color: var(--muted); }
.binding-add { flex: none; min-width: 28px; min-height: 28px; padding: 2px 6px; border-style: dashed; font-size: 14px; line-height: 1; white-space: nowrap; }
.binding-conflict { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 2px; padding: 8px 10px; border-left: 3px solid var(--warning); border-radius: 0 6px 6px 0; background: var(--subtle); }
.preference-list .binding-conflict p { flex: 1 1 16em; margin: 0; color: var(--ink); font-size: 12px; }
.binding-take, .binding-cancel, .binding-reset { min-height: 28px; padding: 4px 10px; font-size: 12px; white-space: nowrap; }
/* The search and the Changed and Free keys chips, in one row. */
.keys-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin: 0 0 8px; }
.keys-tools .key-search { flex: 1 1 16em; margin: 0; }
.key-chip { min-height: 28px; padding: 3px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.key-chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.key-chip-count { margin-left: 6px; font-weight: 600; }
.keys-free { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.preference-list .keys-free p { margin: 0 0 6px; }
.keys-free-caps { display: flex; flex-wrap: wrap; gap: 4px; }
/* The cap menu: Change, Remove, Add another key, Reset to the default. */
.key-menu { position: absolute; z-index: 5; display: grid; min-width: 12em; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 10px 40px var(--shadow); }
.key-menu hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--line); }
.key-menu-item { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border: 0; border-radius: 5px; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.key-menu-item:hover:not([disabled]), .key-menu-item:focus-visible { background: var(--hover); outline: none; }
.key-menu-item[disabled] { color: var(--faint); cursor: default; }
.key-menu-caps { display: inline-flex; gap: 2px; }
.key-menu-default { margin-left: auto; color: var(--muted); font-size: 12px; }
.keys-import-review { display: grid; gap: 8px; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.preference-list .keys-import-review p { margin: 0; color: var(--ink); font-size: 13px; }
.keys-foot { margin-top: 10px; }
/* A phone: the caps sit under the label, on the right. */
@media (max-width: 650px) {
  .binding-label { flex-basis: 100%; }
  .binding-keys { margin-left: auto; }
}
.binding-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.binding-status { font-size: 12px; color: var(--muted); }
.help-list { padding: 8px 20px 4px; }
/* Keyboard shortcuts (hw-5x0n.30.233.10): three views under one search,
   Essentials, All keys, and Keyboard, and a foot that names the prefixes
   and opens the Keys pane. */
#help-dialog { width: min(880px, calc(100vw - 28px)); max-height: min(860px, calc(100dvh - 28px)); }
#help-dialog > .help-tools, #help-dialog > .help-foot { flex: none; }
#help-dialog > .help-essentials, #help-dialog > .help-keyboard { flex: 1 1 auto; min-height: 0; overflow: auto; }
#help-dialog > [hidden] { display: none; }
.help-tools { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.help-search-slot { flex: 1; min-width: 0; }
.help-search-slot .key-search { margin: 0; }
.help .seg { display: inline-flex; flex: none; border: 1px solid var(--control-line); border-radius: 7px; overflow: hidden; }
.help .seg button { font: inherit; font-size: 12px; min-height: 30px; padding: 5px 12px; border: 0; border-radius: 0; background: var(--surface); color: var(--ink); cursor: pointer; }
.help .seg button + button { border-left: 1px solid var(--control-line); }
.help .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.help .seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.help-caps { display: inline-flex; gap: 3px; }
.help-caps kbd { color: var(--accent); }
.help-foot { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.help-foot p { flex: 1; margin: 0; }
.help-change-keys { flex: none; padding: 4px 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
/* Essentials: eight cards at most, two columns, each line its keys then
   its words. */
.help-essentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; padding: 16px 20px; align-content: start; }
.essential-card h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.essential-note { font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.essential-card ul { margin: 0; padding: 0; list-style: none; }
.essential-line { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.essential-keys { display: inline-flex; flex-wrap: wrap; gap: 3px 4px; align-items: baseline; }
.essential-or { color: var(--muted); font-size: 11px; }
/* Keyboard: the caps of one layer, each a family stripe on top, the key,
   and its action. The detail row names the key pointed at or pressed. */
.help-keyboard { padding: 14px 20px 16px; }
.help-board-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; }
.help-board-hint { font-size: 12px; color: var(--muted); }
.help-board { display: grid; gap: 6px; padding: 2px; border-radius: 6px; }
.help-board:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.help-board-row { display: flex; gap: 6px; }
.help-board-row:nth-child(2) { padding-left: 26px; }
.help-board-row:nth-child(3) { padding-left: 40px; }
.help-board-row:nth-child(4) { padding-left: 60px; }
.help-cap { display: flex; flex-direction: column; justify-content: space-between; flex: 0 0 48px; width: 48px; height: 52px; padding: 3px 3px 4px; overflow: hidden;
  border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.help-cap-key { font: 600 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); }
.help-cap-label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 9.5px; line-height: 1.15; color: var(--muted); overflow-wrap: normal; word-break: normal; }
.help-cap[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--focus); }
.help-cap[data-family="move"] { border-top-color: var(--accent); }
.help-cap[data-family="change"] { border-top-color: var(--added); }
.help-cap[data-family="new"] { border-top-color: var(--warning-dot); }
.help-cap[data-family="chord"] { border-color: var(--accent); background: var(--accent-soft); }
.help-cap[data-family="free"] { border-style: dashed; border-top-width: 1px; background: transparent; }
.help-cap[data-family="free"] .help-cap-key { color: var(--muted); }
.help-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.help-legend li { display: inline-flex; align-items: center; gap: 6px; }
.help-swatch { width: 16px; height: 4px; border-radius: 2px; background: var(--line); }
.help-legend [data-family="move"] .help-swatch { background: var(--accent); }
.help-legend [data-family="change"] .help-swatch { background: var(--added); }
.help-legend [data-family="new"] .help-swatch { background: var(--warning-dot); }
.help-legend [data-family="chord"] .help-swatch { height: 10px; border: 1px solid var(--accent); background: var(--accent-soft); }
.help-legend [data-family="free"] .help-swatch { height: 10px; border: 1px dashed var(--line); background: transparent; }
.help-key-detail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 52px; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--subtle); font-size: 13px; }
.help-detail-text, .help-detail-others, .help-detail-empty { color: var(--muted); }
.help-detail-text { flex: 1 1 16em; min-width: 0; }
.help-detail-empty { margin: 0; }
.help-change { margin-left: auto; }
@media (max-width: 650px) {
  .help-tools { flex-wrap: wrap; padding: 10px 14px; }
  .help-tools .help-views { flex: 1 1 100%; }
  .help-tools .help-views button { flex: 1; min-height: 44px; }
  .help-search-slot { flex: 1 1 100%; }
  .help-essentials { grid-template-columns: 1fr; padding: 12px 14px; }
  .essential-line { grid-template-columns: 7.5em minmax(0, 1fr); }
  .help-cap-key { font-size: 10px; letter-spacing: -.04em; }
  .help-keyboard { padding: 12px 8px; }
  .help-board, .help-board-row { gap: 3px; }
  .help-board-row:nth-child(n) { padding-left: 0; justify-content: center; }
  .help-cap { flex: 1 1 0; width: auto; min-width: 0; height: 40px; padding: 2px 0; align-items: center; justify-content: center; }
  .help-cap-label { display: none; }
  .help-board-hint { display: none; }
  /* All keys stacks each row's keys above its words, so the words take the
     whole width. */
  #help-list .key-table, #help-list .key-table tbody, #help-list .help-row, #help-list .help-row td { display: block; }
  #help-list .help-row td { padding: 0; border: 0; }
  #help-list .help-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
  #help-list .help-keys { width: auto; margin-bottom: 2px; }
  .help-foot { flex-wrap: wrap; padding: 10px 14px; }
}
/* Export and import: the summary of an import waits for Apply. */
.prefs-file { display: grid; gap: 10px; }
/* The Macros page in Preferences (hw-5x0n.30.233.8): a card a macro,
   its steps as chips with a dot on each step that writes, and the editor
   with a numbered row a step. A step this desk cannot run is faint. */
.macro-page { display: grid; gap: 12px; }
.macros-head, .macro-step-add, .macro-edit-foot, .macro-crumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.macro-list { display: grid; gap: 10px; }
.macro-card { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.macro-card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.macro-handle { color: var(--muted); cursor: grab; letter-spacing: -2px; user-select: none; }
.macro-name { min-width: 0; overflow-wrap: anywhere; }
.macro-register { color: var(--muted); font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.macro-keys { display: inline-flex; gap: 4px; margin-left: auto; }
.macro-nokey { color: var(--muted); font-size: 12px; }
.macro-menu { position: relative; }
.macro-menu > summary { list-style: none; cursor: pointer; padding: 0 6px; border-radius: 4px; color: var(--muted); }
.macro-menu > summary::-webkit-details-marker { display: none; }
.macro-menu-list { position: absolute; right: 0; top: 100%; z-index: 5; display: grid; min-width: 140px; padding: 4px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); box-shadow: 0 6px 18px var(--shadow); }
.macro-menu-list .button { justify-content: flex-start; text-align: left; }
.macro-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.macro-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px;
  background: var(--subtle); color: var(--ink); overflow-wrap: anywhere; }
.macro-chip[data-off="true"], .macro-step[data-off="true"] .macro-step-what { opacity: .5; }
.macro-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--added); }
.macro-sep { color: var(--muted); font-size: 12px; }
.macro-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 12px; }
.macro-off { color: var(--warning); }
.macros-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.macro-file { display: inline-flex; gap: 8px; }
.macro-removed ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.macro-removed li { display: flex; align-items: center; gap: 8px; }
.macro-import { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.macro-import ul { margin: 0; padding-left: 18px; }
/* Preferences draws each input of its list as a 16-pixel check box, so
   the Macros page sizes its own fields. Its crumb reads as a crumb. */
.preference-list .macro-page input[type="text"], .preference-list .macro-page textarea, .preference-list .macro-page select { box-sizing: border-box; width: 100%; min-width: 0; height: auto; font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.preference-list #macro-register { width: auto; }
.preference-list #macro-keys { width: auto; flex: 1 1 10em; max-width: 20em; }
/* The Keys field holds caps and the recorder of the Keys pane
   (hw-5x0n.30.233.18). A conflict spans the whole editor row. */
.macro-keys-field { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.macro-key { gap: 4px; padding: 1px 2px 1px 6px; border: 1px solid var(--line); border-radius: 5px; }
.macro-key-remove { min-width: 22px; min-height: 22px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--muted); font: inherit; font-size: 14px; line-height: 1; cursor: pointer; }
.macro-key-remove:hover { color: var(--removed); background: var(--subtle); }
.macro-fields > .binding-conflict { grid-column: 1 / -1; }
.macro-crumbs { gap: 6px; font-size: 16px; }
.macro-crumb.button { min-height: 0; padding: 0; border-color: transparent; background: none; font-size: inherit; font-weight: 400; color: var(--muted); }
.macro-crumb.button:hover { color: var(--accent); text-decoration: underline; }
.macro-crumb-name { font-weight: 600; }
.macro-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 10px 14px; }
.macro-keys-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.macro-steps-edit { margin: 0; padding: 0; list-style: none; display: grid; border-top: 1px solid var(--line); }
.macro-step { display: grid; grid-template-columns: 1.4em max-content minmax(0, 1fr) minmax(0, 1fr) max-content; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
.macro-step-n { color: var(--muted); font-size: 12px; text-align: right; }
.macro-step-what { display: flex; align-items: center; gap: 6px; min-width: 0; }
.macro-step-what select, .macro-arg { width: 100%; min-width: 0; }
.macro-step-tools { display: inline-flex; gap: 2px; }
.macro-step-tools .button { min-width: 28px; padding: 0 6px; }
.macro-step-off { grid-column: 3 / -1; color: var(--warning); font-size: 12px; }
.macro-error { margin: 0; color: var(--removed); }
.macro-edit-foot .grow { flex: 1; }
@media (max-width: 650px) {
  .macro-step { grid-template-columns: 1.4em max-content minmax(0, 1fr) max-content; }
  .macro-step .macro-arg { grid-column: 3 / -1; grid-row: 2; }
  .macro-fields { grid-template-columns: 1fr; gap: 6px; }
  .macro-keys { margin-left: 0; }
  .macro-key-remove { min-width: 44px; min-height: 44px; }
  .preference-list .macro-page input[type="text"], .preference-list .macro-page textarea, .preference-list .macro-page select { font-size: 16px; min-height: 40px; }
}
.prefs-import-review { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.preference-list .prefs-import-review p { color: var(--ink); font-size: 13px; }
/* Reset everything asks first, under Data's Advanced fold, and offers an
   export before it clears anything. */
.prefs-reset-confirm { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.preference-list .prefs-reset-confirm p { margin: 0; color: var(--ink); font-size: 13px; }
.prefs-import-changes { margin: 0; padding-left: 20px; font-size: 13px; }
.prefs-import-changes li { margin: 2px 0; }
.prefs-file .binding-status[data-error="true"] { color: var(--removed); }
@media (max-width: 1000px), (pointer: coarse) {
  .prefs-file .button { min-height: 44px; }
}

/* Preferences in sections: a sidebar, one pane at a time, and a search
   across them, after macOS System Settings, with VS Code's changed-row
   bar and Linear's rows. See prefsdialog.js. The size holds still as
   panes change, so the sidebar never jumps. */
#preferences-dialog.prefs { width: min(820px, calc(100vw - 28px)); height: min(760px, 90dvh); max-height: 90dvh; }
.prefs-head { display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "back title search close"; align-items: center; gap: 14px; padding: 12px 16px 12px 20px; }
#preferences-dialog > .prefs-head { display: grid; }
.prefs-head h2 { grid-area: title; margin: 0; font-size: 17px; }
.prefs-back { grid-area: back; display: none; }
#preferences-close { grid-area: close; }
.prefs-search { grid-area: search; justify-self: center; width: min(360px, 100%); position: relative; }
.prefs-search-icon { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: var(--muted); stroke-width: 1.5; pointer-events: none; }
.prefs-search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 7px 12px 7px 32px; border: 1px solid var(--control-line); border-radius: 8px; color: var(--ink); background: var(--subtle); }
.prefs-search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.prefs-body { display: flex; flex: 1 1 auto; min-height: 0; }
.prefs-nav { flex: 0 0 200px; display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-right: 1px solid var(--line); background: var(--subtle); overflow: auto; }
.prefs-nav button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; text-align: left; font: inherit; font-size: 13px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.prefs-nav button:hover { background: var(--hover); }
.prefs-nav button[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.prefs-nav button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.prefs-icon { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.prefs-nav button[aria-current="true"] .prefs-icon { stroke: var(--accent); }
.prefs-nav-title { flex: 1 1 auto; }
.prefs-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
/* The panes scroll under a fixed header. A sticky key group heading stops
   at the scroller's padding edge, so the top space sits on each pane. */
#preferences-dialog .prefs-panes { display: block; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 24px 24px; }
.prefs-pane > :first-child, .prefs-empty { margin-top: 18px; }
.prefs-pane-head { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.preference-list .prefs-pane-head h3 { flex: 1 1 auto; margin: 0; font-size: 16px; }
.prefs-pane-head .button { min-height: 28px; padding: 4px 10px; font-size: 12px; }
.prefs-pane-status:empty { display: none; }
.preference-list .prefs-lede { margin: 0 0 10px; font-size: 12px; line-height: 1.5; }
.prefs-empty { color: var(--muted); font-size: 13px; }
/* The device switcher heads a pane's device rows: which class they show.
   Under other rows it has a rule of its own. */
.prefs-device { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; font-size: 13px; }
.prefs-device[hidden] { display: none; }
.preference-list .prefs-device-note { flex: 1 1 100%; }
.prefs .prefs-rows:not(:empty) + .prefs-device { padding-top: 12px; border-top: 1px solid var(--line); }
/* One row per setting: words at the left, the control at the right. */
.prefs .prow { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0; padding: 11px 0 11px 12px; min-height: 44px; box-sizing: border-box; border: 0; border-top: 1px solid var(--line); font-size: 13px; }
.prefs .prefs-rows:empty { display: none; }
.prefs .prefs-lede + .prefs-rows > .prow:first-child, .prefs .prefs-lede + .prow, .prefs .prefs-lede + .prefs-rows:empty + .prow, .prefs-advanced .prow:first-child { border-top: 0; }
.prow-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prefs .prow-label { padding: 0; font-size: 13px; font-weight: 400; color: var(--ink); }
.preference-list .prow-note { font-size: 12px; color: var(--muted); line-height: 1.45; }
.prow-control { flex: none; display: flex; align-items: center; gap: 8px; }
/* A whole-number row, such as Pages grid size, gets a field like the
   inline ones, not the browser's bare box. */
.preference-list .prow-control input[type="number"] { width: 72px; height: auto; font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.prow-control select, .prow-inline select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.prefs .prow-group, .prefs .prow-block { display: block; }
.prefs .prow-group > .prow-note { display: block; margin: 2px 0 8px; }
.prefs .prow-group > legend { float: left; width: 100%; margin-bottom: 2px; }
.prefs .prow-group > legend + * { clear: both; }
.prefs .prow-group h4.prow-label { margin: 0 0 2px; }
.prow-checks { display: grid; gap: 8px; }
.prow-checks-2 { grid-template-columns: 1fr 1fr; max-width: 420px; }
.preference-list .prow-checks label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.prow-inline { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.preference-list .prow-inline label { display: inline; }
.preference-list .prow-inline input[type="number"] { width: 72px; height: auto; font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
/* A row that differs from its default: a bar at the left and a Reset. */
.prefs .prow.changed::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.prow-reset.button { min-height: 26px; padding: 3px 8px; font-size: 12px; }
.prow-group > .prow-reset { position: absolute; top: 9px; right: 0; }
.prefs .prow-group.changed > legend, .prefs .prow-group.changed > h4, .prefs .prow-group.changed > .prow-note { box-sizing: border-box; padding-right: 72px; }
/* Switches, after the desk's Follow the page switch. */
.prefs input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 36px; height: 20px; margin: 0; border-radius: 10px; background: var(--control-line); position: relative; cursor: pointer; transition: background .15s; }
.prefs input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: left .15s; }
.prefs input.switch:checked { background: var(--accent); }
.prefs input.switch:checked::after { left: 18px; }
.prefs input.switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Segmented choices, after the desk's Walk buttons. The notes dialogs share them. */
.prefs .seg, .desk-dialog .seg { display: inline-flex; border: 1px solid var(--control-line); border-radius: 7px; overflow: hidden; }
.prefs .seg button, .desk-dialog .seg button { font: inherit; font-size: 12px; min-height: 28px; padding: 5px 10px; border: 0; border-radius: 0; background: var(--surface); color: var(--ink); cursor: pointer; }
.prefs .seg button + button, .desk-dialog .seg button + button { border-left: 1px solid var(--control-line); }
.prefs .seg button[aria-pressed="true"], .desk-dialog .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.prefs .seg button:focus-visible, .desk-dialog .seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* Advanced: folded at the foot of a pane. */
.prefs-advanced { margin-top: 10px; border-top: 1px solid var(--line); }
.prefs-advanced > summary { cursor: pointer; padding: 10px 0 6px; font-size: 12px; color: var(--muted); }
/* The marker colors and the keys keep their own rows inside a pane. */
.prefs .marker-colors { display: grid; gap: 8px; }
.prefs .prefs-keys .binding-list { margin-top: 2px; }
.prefs .prefs-file-row { display: grid; gap: 10px; }
/* Search: every matching row under its section's title. */
.prefs-body[data-mode="search"] .prefs-nav { opacity: .6; }
.prefs-body[data-mode="search"] .prefs-pane-head .button, .prefs-body[data-mode="search"] .prefs-pane-status, .prefs-body[data-mode="search"] .prefs-lede { display: none; }
.preference-list .prefs-body[data-mode="search"] .prefs-pane-head h3, .prefs-body[data-mode="search"] .prefs-pane-head h3 { margin-top: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.prefs-body[data-mode="search"] .prefs-advanced { margin: 0; border: 0; }
.prefs-body[data-mode="search"] .prefs-advanced > summary { display: none; }
.prefs-body[data-mode="search"] .prow[data-miss] { display: none; }
.prefs-body[data-mode="search"] .prefs-keys .key-search { display: none; }
/* A short screen gets the whole screen. */
@media (max-width: 650px), (max-height: 520px) {
  #preferences-dialog.prefs { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .prefs-nav { flex-basis: 176px; }
}
/* Phones: the sections are a list, and a section opens as its own page
   with a back button, after iOS Settings. */
@media (max-width: 650px) {
  .prefs-head { grid-template-columns: auto 1fr auto; grid-template-areas: "back title close" "search search search"; gap: 8px 6px; padding: 8px 10px 10px 8px; }
  .prefs-head h2 { font-size: 16px; padding-left: 8px; }
  .prefs-search { width: 100%; }
  .prefs-search input { font-size: 16px; padding: 10px 12px 10px 34px; }
  .prefs-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 28px; border: 0; background: transparent; color: var(--accent); }
  .prefs-back[hidden] { display: none; }
  dialog.preferences .prefs-head #preferences-close { width: 44px; height: 44px; }
  .prefs-body { flex-direction: column; }
  .prefs-nav { flex: 1 1 auto; border-right: 0; background: var(--surface); padding: 4px 14px 24px; gap: 0; }
  .prefs-nav button { min-height: 52px; padding: 12px 6px; font-size: 16px; border-radius: 0; border-top: 1px solid var(--line); }
  .prefs-nav button:first-child { border-top: 0; }
  .prefs-nav button::after { content: "›"; color: var(--muted); font-size: 22px; line-height: 1; }
  .prefs-nav button[aria-current="true"] { background: transparent; color: var(--ink); font-weight: 400; }
  .prefs-nav button[aria-current="true"] .prefs-icon { stroke: var(--muted); }
  .prefs-icon { width: 18px; height: 18px; }
  .prefs-body:not([data-mode="list"]) .prefs-nav { display: none; }
  .prefs-body[data-mode="list"] .prefs-panes { display: none; }
  #preferences-dialog .prefs-panes { padding: 0 14px 24px; }
  .prefs .prow { gap: 12px; padding: 12px 0 12px 10px; min-height: 48px; }
  .prefs .prow-label { font-size: 15px; }
  .preference-list .prow-note { font-size: 13px; }
  .prow-control select, .prow-inline select, .preference-list .prow-inline input[type="number"] { font-size: 16px; min-height: 40px; }
  .prefs input.switch { width: 46px; height: 26px; border-radius: 13px; }
  .prefs input.switch::after { width: 22px; height: 22px; }
  .prefs input.switch:checked::after { left: 22px; }
  .prefs .seg button, .desk-dialog .seg button { font-size: 14px; min-height: 40px; padding: 6px 12px; }
  .desk-note-dialog textarea { font-size: 16px; }
  .runs-dialog #runs-proof-label, .runs-dialog #runs-pages, .runs-dialog textarea, .runs-dialog select { font-size: 16px; }
  .desk-note-dialog #desk-note-send { min-height: 40px; }
  .text-export-dialog .client-actions .button { min-height: 40px; }
  .text-export-dialog .text-export-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .desk-dialog .desk-note-row { min-height: 44px; padding: 10px 12px; }
  .desk-inbox-tools input, .desk-inbox-tools select { font-size: 16px; min-height: 44px; }
  /* All five status pills of Notes fit a 375px phone (hw-52oz). */
  .desk-inbox-filter .seg button { padding: 6px 8px; }
  .desk-dialog .desk-note-row-excerpt, .desk-thread-text, .desk-thread-message { font-size: 15px; }
  .desk-dialog #desk-thread-send { min-height: 40px; }
  .desk-note-notice { top: 56px; right: 8px; }
  .client-down-notice { top: 104px; }
  .desk-note-notice button { min-height: 40px; }
  .prow-checks-2 { grid-template-columns: 1fr; }
  .preference-list .prow-checks label { font-size: 15px; min-height: 40px; }
  .prefs-pane-head .button, .prow-reset.button { min-height: 40px; }
  .prow-group > .prow-reset { top: 6px; }
}

/* What's new: release notes, newest first (hw-5x0n.30.210). It opens on
   Highlights, a timeline of the few lines releases mark as their biggest
   deliverables. All releases lists every release by day, one row each,
   closed until opened, with days a week or more old folded under Earlier.
   The switch, the search, and Unread only stay above the list. */
/* The dialog keeps one height, so the switch never moves as the tabs change. */
dialog.notes { width: min(600px, calc(100vw - 20px)); height: min(820px, calc(100dvh - 40px)); }
/* The list scrolls inside the dialog, and the dialog clips it to its
   rounded box. When the dialog itself scrolled, its scroll bar filled the
   right corners and squared them (hw-5x0n.30.170). */
dialog.notes[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.notes > header, .notes-tools, .notes-since, .notes-status { flex: none; }
.notes-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 20px 4px; }
.notes .seg { display: inline-flex; border: 1px solid var(--control-line); border-radius: 7px; overflow: hidden; }
.notes .seg button { font: inherit; font-size: 13px; min-height: 30px; padding: 5px 12px; border: 0; border-radius: 0; background: var(--surface); color: var(--ink); cursor: pointer; }
.notes .seg button + button { border-left: 1px solid var(--control-line); }
.notes .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.notes .seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.notes-search { position: relative; flex: 1 1 160px; min-width: 0; }
.notes-search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 6px 10px 6px 32px; border: 1px solid var(--control-line); border-radius: 8px; color: var(--ink); background: var(--subtle); }
.notes-search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.notes-unread-only { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.notes-unread-only input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.notes-since { margin: 6px 20px 0; padding: 7px 12px; border: 0; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
/* The Since line opens the releases it counts (hw-5x0n.30.210.4). */
.notes-since::after { content: " ›"; }
.notes-since:hover { text-decoration: underline; text-underline-offset: 3px; }
.notes-since:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.notes-status { margin: 6px 20px 0; padding: 0; color: var(--muted); font-size: 12px; }
.notes-status:empty { display: none; }
.notes-list { padding: 0 20px 20px; font-size: 14px; line-height: 1.5; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.notes-day-title { margin: 16px 0 4px; font-size: 13px; font-weight: 700; color: var(--ink); }
.notes-day-count { font-weight: 400; color: var(--muted); }
.notes-dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
/* Highlights: a line down the left joins each day's lines. */
.notes-highlights { margin: 0; padding: 0 0 0 14px; list-style: none; border-left: 2px solid var(--line); }
.notes-highlight { padding: 2px 0 4px; }
/* A highlight's whole text is one button to its release (hw-5x0n.30.210.4). */
.notes-highlight-open { display: block; width: 100%; margin: 0; padding: 4px 6px 6px; border: 0; border-radius: 6px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.notes-highlight-open:hover { background: var(--hover); }
.notes-highlight-open:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.notes-highlight-text { display: block; margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.notes-highlight-from { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.notes-from { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.notes-highlight-open:hover .notes-from { color: var(--accent); text-decoration-color: currentColor; }
/* All releases: one row a release, its lines under it once opened. */
.notes-entry { border-bottom: 1px solid var(--line); }
.notes-entry-title { margin: 0; font-size: 14px; }
.notes-row, .notes-earlier { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 4px; border: 0; border-radius: 6px; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.notes-row:hover, .notes-earlier:hover { background: var(--hover); }
.notes-label { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.notes-counts { flex: none; font-size: 12px; font-weight: 400; color: var(--muted); }
.notes-star { flex: none; width: 12px; height: 12px; background: var(--warning-dot); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.notes-chevron { flex: none; display: inline-block; width: 12px; font-size: 12px; line-height: 1; color: var(--muted); text-align: center; transition: transform .15s ease-out; }
.notes-chevron::before { content: "▾"; }
.notes-row[aria-expanded="true"] .notes-chevron, .notes-earlier[aria-expanded="true"] .notes-chevron { transform: rotate(180deg); }
.notes-body { padding: 0 4px 10px; }
.notes-group { margin: 8px 0 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.notes-group-highlights { color: var(--warning); }
.notes-body ul { margin: 0; padding-left: 20px; }
.notes-body li { margin: 3px 0; }
.notes-earlier { margin: 14px 0 0; padding: 9px 12px; border: 1px dashed var(--control-line); background: var(--subtle); color: var(--muted); }
.notes-earlier-text { flex: 1 1 auto; font-weight: 600; color: var(--ink); }
.notes-empty { color: var(--muted); margin: 16px 0; }
@media (max-width: 600px) {
  .notes-tools { padding: 10px 14px 4px; }
  .notes-tabs { flex: 1 1 100%; }
  .notes-tabs button { flex: 1 1 50%; min-height: 40px; font-size: 15px; }
  .notes-search input { font-size: 16px; min-height: 40px; }
  .notes-unread-only { font-size: 15px; min-height: 40px; }
  .notes-since, .notes-status { margin-left: 14px; margin-right: 14px; }
  .notes-list { padding: 0 14px 16px; font-size: 15px; }
  .notes-entry-title { font-size: 15px; }
  .notes-row { flex-wrap: wrap; row-gap: 0; min-height: 44px; align-items: center; }
  .notes-row .notes-label { flex-basis: calc(100% - 64px); }
  .notes-row .notes-counts { order: 5; flex-basis: 100%; padding-left: 0; }
  .notes-star + .notes-label + .notes-counts { padding-left: 20px; }
}
/* Round summary (hw-5x0n.31.42.15): one dialog on a later proof, every
   count with a filter a chip. A phone gets a full-screen sheet with Start
   full width. */
.menu-item .unread-dot { margin-left: 6px; vertical-align: middle; }
dialog.round-summary { width: min(620px, calc(100vw - 28px)); }
dialog.round-summary[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.round-summary > header { flex: none; }
.round-summary-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px; font-size: 13px; }
.rs-section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rs-section:last-child { border-bottom: 0; }
.rs-section h3 { margin: 0 0 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rs-lede { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
.rs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.rs-big { margin: 0; font-size: 14px; color: var(--ink); }
.rs-big b { font-size: 22px; margin-right: 2px; }
.rs-start { min-width: 96px; font-size: 13px; }
.rs-lines { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rs-chip { display: inline-flex; align-items: baseline; gap: 6px; min-height: 28px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; text-align: left; }
button.rs-chip { cursor: pointer; border-color: var(--control-line); }
button.rs-chip:hover { background: var(--accent-soft); }
button.rs-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.rs-chip .rs-count { font-weight: 700; font-variant-numeric: tabular-nums; }
button.rs-chip .rs-count { color: var(--accent); }
/* A count no filter lists reads as plain text, not a chip. */
.rs-chip.rs-plain { min-height: 0; padding: 2px 12px 2px 0; border: 0; border-radius: 0; background: none; color: var(--muted); }
.rs-chip.rs-plain .rs-count { color: var(--ink); }
.rs-empty, .rs-note { margin: 0; color: var(--muted); font-size: 12px; }
.rs-line { margin: 0 0 6px; color: var(--ink); }
@media (max-width: 650px) {
  dialog.round-summary { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  dialog.round-summary header button { width: 44px; height: 44px; }
  .round-summary-body { padding: 0 14px calc(20px + env(safe-area-inset-bottom)); font-size: 15px; }
  .rs-head { flex-direction: column; align-items: stretch; }
  .rs-start { width: 100%; min-height: 44px; font-size: 15px; }
  .rs-chip { min-height: 40px; font-size: 14px; padding: 8px 12px; }
  .rs-chip.rs-plain { min-height: 0; font-size: 13px; padding: 2px 12px 2px 0; }
}
.update-note button.update-link { background: none; color: var(--accent); text-decoration: underline; padding: 4px 6px; }

/* Client desk dialog. */
.menu-badge { font-size: 10px; color: var(--added); font-weight: 600; }
.client-state { font-size: 13px !important; color: var(--ink) !important; }
.client-state b[data-online="true"] { color: var(--added); }
.client-link-row { display: flex; gap: 6px; }
.client-link-row input { flex: 1; min-width: 0; height: auto; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--subtle); color: var(--ink); }
.client-choice { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 0; }
.client-choice legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
/* A group's Select all link sits after its legend (hw-5x0n.30.177.8). */
.client-choice .select-all { margin-left: 8px; padding: 0 2px; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 400; cursor: pointer; text-decoration: underline; }
.client-choice .select-all:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.client-choice .builder-options { margin-top: 4px; }
.client-count { font-weight: 600; color: var(--ink) !important; }
.client-actions { display: flex; gap: 8px; }
/* Send a note. The kind control shares the Preferences segment rules above. */
.desk-note-form { display: grid; gap: 12px; }
.desk-note-kind { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.desk-note-dialog textarea { min-height: 110px; }
.desk-note-dialog .client-actions { align-items: center; }
/* Export text (hw-d00k): two choices and Download. */
.text-export-form { display: grid; gap: 12px; }
.text-export-hint { margin: 0; font-size: 13px; color: var(--muted); }
.text-export-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.text-export-label { min-width: 52px; font-weight: 600; }
.text-export-dialog .client-actions { align-items: center; }
/* Runs: the operator's New run form. The reader grid is wider than a phone,
   so it scrolls inside its own box and the step names stay in view. */
dialog.runs-dialog { width: min(820px, calc(100vw - 28px)); }
.runs-new { display: grid; gap: 10px; min-width: 0; }
/* A fieldset is as wide as its content by default, which let the grid widen the dialog. */
.runs-new fieldset { min-width: 0; }
.runs-new h3 { margin: 0; font-size: 14px; }
.runs-project { font-weight: 600; color: var(--ink) !important; }
.runs-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.runs-proof { display: grid; gap: 6px; }
.runs-new-proof { display: grid; gap: 6px; padding-left: 22px; }
.runs-dialog #runs-proof-label, .runs-dialog #runs-pages, .runs-dialog textarea { font: inherit; width: auto; height: auto; font-size: 13px; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.runs-dialog #runs-proof-label { min-width: 14em; }
.runs-dialog input[type="file"] { width: auto; height: auto; font-size: 12px; }
.runs-hint { font-size: 12px; color: var(--muted); margin: 0; }
.runs-field { display: grid; gap: 4px; font-size: 13px; }
.runs-drop { display: grid; gap: 6px; padding: 12px; border: 1px dashed var(--control-line); border-radius: 8px; font-size: 13px; cursor: pointer; }
.runs-drop[data-over="true"] { border-color: var(--accent); background: var(--accent-soft); }
.runs-files { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.runs-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.runs-file-line { min-width: 0; overflow-wrap: anywhere; }
.runs-file[data-state="failed"] .runs-file-line { color: var(--removed); }
.runs-grid-wrap { overflow-x: auto; max-width: 100%; }
.runs-grid { border-collapse: collapse; font-size: 12px; }
.runs-grid th, .runs-grid td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.runs-grid thead th { font-weight: 600; font-size: 11px; vertical-align: bottom; }
.runs-grid tbody th { position: sticky; left: 0; background: var(--surface); font-weight: 600; }
.runs-grid td[data-cell="not-authorized"] { opacity: 0.4; }
.runs-grid td select { margin-left: 4px; font-size: 12px; }
.runs-estimate { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; min-height: 1.5em; }
.runs-total { font-weight: 600; color: var(--ink) !important; margin: 0; }
/* The run list and a run's usage. Figures line up in their columns. */
.runs-saved { display: grid; gap: 8px; min-width: 0; }
.runs-saved h3 { margin: 0; font-size: 14px; }
.runs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.runs-row-cost { font-size: 12px; font-weight: 600; color: var(--ink); }
.runs-detail { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; min-width: 0; }
.runs-detail h4 { margin: 6px 0 0; font-size: 12px; }
.runs-usage { border-collapse: collapse; font-size: 12px; }
.runs-usage th, .runs-usage td { padding: 3px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.runs-usage td, .runs-usage thead th { text-align: right; font-variant-numeric: tabular-nums; }
.runs-usage thead th:nth-child(-n+2) { text-align: left; }
.runs-usage td:nth-child(2) { text-align: left; }
.runs-usage tr[data-kind="step"] th, .runs-usage tr[data-kind="total"] th, .runs-usage tr[data-kind="total"] td { font-weight: 600; }
/* The lists of notes: the operator's inbox and the editor's Your notes. */
.desk-note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.desk-note-row { display: grid; gap: 3px; width: 100%; min-width: 0; text-align: left; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.desk-note-row:hover { background: var(--hover); }
.desk-note-row[data-unread="true"] { border-color: var(--accent); }
/* The head wraps, so a long time moves to its own line, still on the
   right, instead of running past the row (hw-52oz). */
.desk-note-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; font-size: 12px; color: var(--muted); }
.desk-note-row-kind { font-weight: 600; color: var(--ink); }
.desk-note-row-time { margin-left: auto; white-space: nowrap; }
.desk-note-row-excerpt { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-note-row-from { font-size: 12px; color: var(--muted); }
.desk-note-row { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; }
.desk-note-row > :not(.desk-note-avatar) { grid-column: 2; }
.desk-note-avatar { grid-column: 1; grid-row: 1 / span 3; align-self: start; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hover); color: var(--ink); font-size: 11px; font-weight: 600; }
.desk-note-row-project { flex-shrink: 0; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; }
.desk-inbox-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.desk-inbox-tools input, .desk-inbox-tools select { box-sizing: border-box; width: auto; height: auto; min-width: 0; max-width: 100%; min-height: 34px; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.desk-inbox-dialog .preference-list > * { min-width: 0; }
.preference-list .desk-inbox-tools input { width: 100%; }
.desk-inbox-filter .seg { max-width: 100%; overflow-x: auto; }
.desk-status { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; color: var(--accent); background: var(--accent-soft); }
.desk-status[data-status="in-progress"] { color: var(--warning); background: transparent; }
.desk-status[data-status="done"] { color: var(--added); background: var(--added-bg); }
.desk-status[data-status="wont-do"] { color: var(--muted); background: var(--subtle); }
.desk-note-empty { color: var(--muted); }
.desk-inbox-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.desk-note-mine { display: grid; gap: 8px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.desk-note-mine h3 { margin: 0; font-size: 14px; }
/* The inbox in two panes, wider than a phone (hw-kyy3.5.3): the list
   with its search, project, and status pills on the left, and the open
   note on the right, each scrolling on its own. app.js sets data-panes
   from the phone query and moves the note's body into the pane. */
dialog.desk-inbox-dialog[data-panes="two"] { width: min(1120px, calc(100vw - 48px)); height: min(760px, calc(100dvh - 48px)); max-height: none; overflow: hidden; }
dialog.desk-inbox-dialog[data-panes="two"][open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
dialog.desk-inbox-dialog[data-panes="two"] .desk-inbox-body { display: grid; grid-template-columns: 380px minmax(0, 1fr); min-height: 0; }
dialog.desk-inbox-dialog[data-panes="two"] .desk-inbox-list-pane { align-content: start; min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); background: var(--subtle); }
.desk-inbox-note { display: none; }
dialog.desk-inbox-dialog[data-panes="two"] .desk-inbox-note { display: block; min-width: 0; min-height: 0; overflow-y: auto; }
.desk-inbox-pick { margin: 40px 24px; color: var(--muted); text-align: center; }
.desk-inbox-pick[hidden] { display: none; }
.desk-inbox-note > .desk-thread { padding: 18px 24px 24px; }
.desk-note-row[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
dialog.desk-inbox-dialog[data-panes="two"] .desk-note-row-kind { white-space: nowrap; }
/* The note: an eyebrow above the text, chips under it, and the operator's
   Captured from the desk box. */
.desk-thread-eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.desk-thread-chip { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
button.desk-thread-chip { cursor: zoom-in; color: var(--accent); }
button.desk-thread-chip:hover { border-color: var(--accent); }
.desk-thread-captured { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.desk-thread-captured h3 { margin: 0; font-size: 12px; color: var(--muted); }
.desk-thread-raw .desk-thread-context { margin-top: 6px; }
/* The thread a note opens into. The operator's part holds the status,
   the context table, the pictures, and the raw capture behind a fold. */
dialog.desk-thread-dialog { width: min(720px, calc(100vw - 28px)); }
.desk-thread-dialog header h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-thread-back { margin-right: 10px; color: var(--accent); }
.desk-thread-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; color: var(--muted); font-size: 12px; }
.desk-thread-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; color: var(--ink); }
.desk-thread-operator { display: grid; gap: 12px; }
.desk-thread-operator[hidden] { display: none; }
.desk-thread-status-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.desk-thread-status-row[hidden] { display: none; }
.desk-thread-context { border-collapse: collapse; width: 100%; font-size: 12px; }
.desk-thread-context th { width: 1%; padding: 3px 12px 3px 0; text-align: left; vertical-align: top; white-space: nowrap; font-weight: 600; color: var(--muted); }
.desk-thread-context td { padding: 3px 0; overflow-wrap: anywhere; }
.desk-thread-context tr + tr th, .desk-thread-context tr + tr td { border-top: 1px solid var(--line); }
.desk-thread-images { display: grid; gap: 10px; }
.desk-thread-images:empty { display: none; }
.desk-thread-images figure { margin: 0; }
.desk-thread-images img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--subtle); }
.desk-thread-shot { display: block; padding: 0; max-width: 100%; cursor: zoom-in; }
.desk-thread-shot:hover:not(:disabled) { background: transparent; }
.desk-thread-shot:hover img { border-color: var(--accent); }
/* The fullscreen viewer a note's picture opens in (hw-5x0n.30.162.14). */
dialog.image-zoom { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; display: none; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); overflow: hidden; }
dialog.image-zoom[open] { display: grid; }
.image-zoom > header { position: static; gap: 6px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
.image-zoom header h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.image-zoom header button { width: 40px; height: 40px; font-size: 22px; }
.image-zoom header .image-zoom-fit { width: auto; padding: 0 10px; font-size: 14px; }
.image-zoom-pct { min-width: 44px; text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.image-zoom-stage { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: var(--subtle); cursor: zoom-in; }
.image-zoom-stage:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.image-zoom-zoomed .image-zoom-stage { cursor: grab; }
.image-zoom-zoomed .image-zoom-stage:active { cursor: grabbing; }
.image-zoom-stage img { flex: none; max-width: none; transform-origin: center; will-change: transform; box-shadow: 0 2px 16px var(--shadow); -webkit-user-drag: none; }
.desk-thread-images figcaption { margin-top: 4px; font-size: 12px; color: var(--muted); }
.desk-thread-raw summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.desk-thread-raw pre { max-height: 320px; overflow: auto; margin: 6px 0 0; padding: 8px; font-size: 11px; line-height: 1.4; background: var(--subtle); border-radius: 6px; }
.desk-thread-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.desk-thread-event { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: baseline; font-size: 13px; }
.desk-thread-who { font-weight: 600; }
.desk-thread-event[data-role="operator"] .desk-thread-who { color: var(--accent); }
.desk-thread-when { color: var(--muted); font-size: 12px; }
.desk-thread-message { grid-column: 1 / -1; white-space: pre-wrap; overflow-wrap: anywhere; }
.desk-thread-act { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.desk-thread-form { display: grid; gap: 8px; }
.desk-thread-form textarea { min-height: 72px; }
/* The notice when a note or a reply arrives while the desk is open. It
   sits under the menu button, above the desk, and goes with Open or ×. */
.desk-note-notice { position: fixed; top: 64px; right: 12px; z-index: 60; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 12px; box-shadow: 0 4px 16px var(--shadow); }
.desk-note-notice[hidden] { display: none; }
/* The take-down notice sits under the desk note notice, so both can show (hw-5x0n.30.177.10). */
.client-down-notice { top: 104px; }
.desk-note-notice button { border: 0; border-radius: 999px; padding: 4px 10px; background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.desk-note-notice .desk-note-notice-close { padding: 2px 8px; background: none; color: var(--muted); font-size: 16px; font-weight: 400; }
.reviewer-seats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.reviewer-seats:empty { display: none; }
.reviewer-seat { display: inline-flex; gap: 6px; align-items: baseline; font: inherit; font-size: 13px; padding: 4px 10px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.reviewer-seat small { color: var(--muted); }
/* Client people on accounts: one row per person, wrapping on a phone. */
.client-people { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.client-people h3, .client-people h4 { margin: 0; }
.client-people p { margin: 0; }
.client-people-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.client-people-list:empty { display: none; }
.client-person { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 10px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--surface); }
.client-person-name { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; }
.client-person-name small, .client-person-link { color: var(--muted); font-size: 13px; }
.client-person[data-state="expired"] .client-person-link { color: var(--warning); }
.client-person-actions { display: flex; gap: 6px; }
.client-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.client-add label { display: grid !important; gap: 4px; flex: 1 1 10em; min-width: 0; font-size: 12px; font-weight: 600; }
.client-add input, .client-days input { font: inherit; height: auto; font-weight: 400; font-size: 13px; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.client-add input { width: auto; min-width: 0; }
.client-days input { width: 4.5em; margin: 0 4px; }
.reviewer-seat[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.reviewer-form-title { font-size: 13px; font-weight: 600; margin: 4px 0 0; }
.reviewer-name { display: grid !important; gap: 4px; font-size: 12px; font-weight: 600; }
.reviewer-name input { font: inherit; width: auto; height: auto; font-weight: 400; font-size: 13px; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
/* Corrections on the editor desk. A finding ruled Correct this gets a
   thick outline, a ring, and a label. None of them covers or tints the
   page image. */
:root { --edit-mark: #b45309; --edit-done: #15803d; --edit-done-bg: #e8f6ec; }
:root[data-theme="dark"] { --edit-mark: #f59e0b; --edit-done: #4ade80; --edit-done-bg: #173323; }
.rail-pages { font-size: 11px; line-height: 1.2; padding: 4px 8px; margin-top: -10px; border: 1px solid var(--line); color: var(--muted); max-width: 64px; }
.rail[data-collapsed="true"] > .rail-pages { display: none; }
/* The page grid. Its rows are max-content: auto rows in a scrolling grid
   start from each tile's min-content height, which a width:100% thumbnail
   makes almost nothing, so tall tiles overlapped. */
/* The page grid. The expanded Pages panel opens from its list into a grid
   of page thumbnails, --rail-width wide, which app.js keeps clear of the
   page, with --tile wide pages. Its right
   edge drags the width. See GRID in app.js. */
.rail { position: relative; }
.rail-grid, .rail-filter, .rail-marks { width: 30px; height: 26px; margin-top: -8px; color: var(--muted); border: 1px solid var(--line); }
.rail-grid svg, .rail-filter svg, .rail-marks svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.rail-filter[aria-pressed="true"] svg { fill: currentColor; fill-opacity: .25; }
.rail-marks[aria-pressed="true"] svg .mark { fill: currentColor; fill-opacity: .45; }
.rail-filter[hidden], .rail-marks[hidden] { display: none; }
/* In All, while the Pages panel follows the filters, a page with no
   finding the filters match is dimmed. */
.thumbnail.dim { opacity: .4; }
.thumbnail.dim:is(:hover, :focus-visible, .active) { opacity: .75; }
/* The page preview beside a Pages grid page. It takes no pointer, so the
   page under it keeps its hover and click. See the page preview in app.js. */
.page-peek { position: fixed; z-index: 60; width: 300px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: hidden; box-sizing: border-box;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18); pointer-events: none; font-size: 12px; }
.page-peek[hidden] { display: none; }
/* A mouse drags the grid while its pages overflow it. See dragscroll.js. */
.thumbnails[data-drag="ready"], .thumbnails[data-drag="ready"] .thumbnail { cursor: grab; }
.thumbnails[data-drag="dragging"], .thumbnails[data-drag="dragging"] * { cursor: grabbing; user-select: none; }
.page-peek p { margin: 0; }
.page-peek .peek-title { font-size: 11px; font-weight: 600; color: var(--muted); }
.peek-item { padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--line); }
.peek-item:first-of-type { border-top: none; margin-top: 4px; padding-top: 0; }
.peek-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
/* The tag on a whole-page finding in the Pages grid preview. */
.peek-whole { margin-left: auto; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 650; letter-spacing: .04em; color: var(--muted); background: var(--accent-soft); white-space: nowrap; }
.peek-badge { min-width: 22px; height: 22px; padding: 0 4px; box-sizing: border-box; border-radius: 11px; display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 650; font-variant-numeric: tabular-nums; background: var(--peek-mark); color: var(--peek-ink); }
.peek-badge[data-state="unruled"] { --peek-mark: var(--marker-unruled); --peek-ink: var(--marker-unruled-ink); }
.peek-badge[data-state="discuss"] { --peek-mark: var(--marker-discuss); --peek-ink: var(--marker-discuss-ink); }
.peek-badge[data-state="todo"] { --peek-mark: var(--marker-todo); --peek-ink: var(--marker-todo-ink); }
.peek-badge[data-state="done"] { --peek-mark: var(--marker-done); --peek-ink: var(--marker-done-ink); }
.peek-badge[data-state="ruled"] { --peek-mark: var(--marker-ruled); --peek-ink: var(--marker-ruled-ink); }
.page-peek .peek-label { margin-top: 6px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.page-peek :is(.target-quote, .source-quote) { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.page-peek .peek-more { margin-top: 8px; color: var(--muted); }
.rail-resize { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; z-index: 5; cursor: col-resize; touch-action: none; }
.rail-resize:hover, .rail-resize:focus-visible, .rail-resizing .rail-resize { background: linear-gradient(to right, transparent 3px, var(--accent) 3px, var(--accent) 5px, transparent 5px); outline: none; }
.rail-resizing { cursor: col-resize; user-select: none; }
@media (pointer: coarse) { .rail-resize { right: -11px; width: 22px; } }
.rail[data-collapsed="true"] > :is(.rail-grid, .rail-filter, .rail-marks, .rail-resize, .grid-zoom) { display: none; }
.rail[data-grid="true"] { width: max(300px, var(--rail-width)); display: grid; align-items: center; justify-items: start; padding: 16px 12px 14px;
  grid-template-columns: auto auto 1fr auto auto auto auto; grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: 10px 8px;
  grid-template-areas: "toggle label . pages filter marks grid" "jump jump jump jump jump jump jump" "zoom zoom zoom zoom zoom zoom zoom" "thumbs thumbs thumbs thumbs thumbs thumbs thumbs" "count caption caption caption caption caption caption"; }
.rail[data-grid="true"] > .rail-toggle { grid-area: toggle; }
.rail[data-grid="true"] > .rail-label { grid-area: label; }
.rail[data-grid="true"] > .rail-pages { grid-area: pages; margin: 0; max-width: none; }
.rail[data-grid="true"] > .rail-grid { grid-area: grid; margin: 0; }
.rail[data-grid="true"] > .rail-filter { grid-area: filter; margin: 0; }
.rail[data-grid="true"] > .rail-marks { grid-area: marks; margin: 0; }
/* On a touch screen the grid's header must fit its narrowest width with
   44 point targets. The three icon buttons keep their height and give up
   some width, as the review panel's buttons do, and the header closes up. */
@media (pointer: coarse) {
  .rail[data-grid="true"] { column-gap: 4px; }
  .rail[data-grid="true"] > :is(.rail-filter, .rail-marks, .rail-grid) { min-width: 36px; width: 36px; }
}
.rail[data-grid="true"] > .grid-zoom { grid-area: zoom; }
.rail[data-grid="true"] > .rail-rule { display: none; }
.rail[data-grid="true"] > .candidate-count { grid-area: count; }
.rail[data-grid="true"] > .rail-caption { grid-area: caption; margin: 0; }
.grid-zoom { display: flex; align-items: center; gap: 6px; justify-self: stretch; }
.grid-zoom[hidden] { display: none; }
.grid-zoom button { width: 28px; height: 26px; font-size: 15px; color: var(--muted); border: 1px solid var(--line); flex: none; }
.grid-zoom input { flex: 1; min-width: 0; accent-color: var(--accent); }
/* Page jump. A field under the Pages panel's header takes a page number,
   and its arrow or Enter opens that page. A number whose page the panel
   does not show turns the field red, disables the arrow, and shows why in
   a note under the field. The note lies over the pages, and in the list
   over the page's edge, so it never moves them. It is the field's live
   status, so it stays in the page while empty, out of sight. In the list
   the field fills the panel's 64 pixels. See the page jump in app.js. */
/* The page jump fields, under the Pages panel's header and over the page
   name in the toolbar, share these rules: the box, the focus ring, the
   text, the arrow, the red refusal, and the note under the field that
   says why. Each field adds its size and place below. */
.jump-field { display: flex; align-items: stretch; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.jump-field:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 30%, transparent); }
.jump-field input { flex: 1; min-width: 0; width: 0; margin: 0; border: 0; background: transparent; color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; outline: none; }
.jump-go { flex: none; padding: 0; display: grid; place-items: center; color: var(--accent); border-radius: 0 5px 5px 0; }
.jump-go svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.jump-field[data-state="invalid"] { border-color: var(--removed); background: var(--removed-bg); }
.jump-field[data-state="invalid"]:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--removed) 30%, transparent); }
.jump-field[data-state="invalid"] input { color: var(--removed); }
.jump-note { position: absolute; z-index: 40; top: calc(100% + 4px); left: -1px; width: max-content; max-width: 220px; margin: 0; padding: 5px 8px; box-sizing: border-box;
  font-size: 12px; line-height: 1.35; color: var(--removed); background: var(--removed-bg); border: 1px solid var(--removed); border-radius: 6px; box-shadow: 0 4px 14px var(--shadow); pointer-events: none; }
.jump-note:empty { width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); box-shadow: none; }
.rail-jump { position: relative; width: 64px; height: 26px; margin: -8px 0 0; }
.rail-jump input { padding: 0 2px 0 6px; border-radius: 6px 0 0 6px; }
.rail-jump input::placeholder { color: var(--muted); opacity: 1; font-size: 11px; }
.rail-jump-go { width: 22px; }
.rail-jump-word { display: none; }
.rail[data-collapsed="true"] > .rail-jump { display: none; }
.rail[data-grid="true"] > .rail-jump { grid-area: jump; margin: 0; width: 132px; height: 28px; }
.rail[data-grid="true"] > .rail-jump > .rail-jump-go { width: 30px; }
/* On a touch screen the field and the arrow are 44 points tall, and the
   field's text is 16 pixels so Safari does not zoom. In the list the
   field sits over the arrow, 56 pixels wide, clear of the panel edge's
   wider touch handle. */
@media (pointer: coarse) {
  .rail-jump { width: 56px; height: auto; flex-direction: column; }
  .rail-jump input { min-height: 44px; width: auto; padding: 0 6px; font-size: 16px; text-align: center; border-radius: 6px 6px 0 0; }
  .rail-jump-go { width: auto; min-height: 44px; border-top: 1px solid var(--line); border-radius: 0 0 5px 5px; }
  .rail[data-grid="true"] > .rail-jump { flex-direction: row; height: 46px; width: 160px; }
  .rail[data-grid="true"] > .rail-jump input { text-align: left; padding: 0 8px; border-radius: 6px 0 0 6px; }
  .rail[data-grid="true"] > .rail-jump > .rail-jump-go { width: 44px; border-top: 0; border-left: 1px solid var(--line); border-radius: 0 5px 5px 0; }
}
.rail[data-grid="true"] > .thumbnails { grid-area: thumbs; justify-self: stretch; align-self: stretch; display: grid; grid-auto-rows: max-content;
  align-content: start; align-items: start; gap: 12px; margin: 0 -6px; padding: 4px 6px; touch-action: pan-y; }
.rail[data-grid="true"] .thumbnail { width: auto; min-width: 0; padding: 5px 5px 3px; }
.rail[data-grid="true"] .thumbnail img { width: 100%; height: auto; }
.rail[data-grid="true"] .thumbnail span { font-size: 11px; }
/* A wide grid beside the review panel can leave the page narrow. The
   toolbar then wraps, as it does below 1000 pixels, so every control stays
   in view. */
.document-area { container-type: inline-size; }
@container (max-width: 700px) {
  .document-tools { flex-wrap: wrap; height: auto; min-height: 0; overflow: visible; row-gap: 6px; padding-bottom: 2px; }
  .document-tools .grow { display: none; }
  .list-controls { margin-left: auto; }
}
/* Below 1000 pixels the rail hides, grid or list. */
@media (max-width: 1000px) { .rail[data-grid="true"] { display: none; } }
/* The Pages overlay. Below 1000 pixels a button after the page arrows
   opens the Pages panel over the whole screen, always as the grid, with
   its header, the page jump field, and the size controls. A close button
   takes the place of the fold and grid toggles, and the width edge and
   the to-review count stay hidden. See setRailOverlay in app.js. */
.page-nav .pages-open, .rail-close { display: none; }
@media (max-width: 1000px) {
  .page-nav .pages-open { display: grid; }
  .rail[data-overlay="true"][data-grid="true"] { display: grid; position: fixed; inset: 0; z-index: 40; width: auto; border: 0; opacity: 1; pointer-events: auto; box-shadow: none;
    padding: calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
    grid-template-columns: auto 1fr auto auto auto auto; grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas: "label . pages filter marks close" "jump jump jump jump jump jump" "zoom zoom zoom zoom zoom zoom" "thumbs thumbs thumbs thumbs thumbs thumbs"; }
  /* A swipe down from the header drags the overlay, and it slides back
     when the swipe falls short. See pagesrail.js. */
  .rail[data-overlay="true"] { transition: transform .18s ease-out; }
  .rail[data-overlay="true"].sheet-dragging { transition: none; }
  .rail[data-overlay="true"] > :is(.rail-toggle, .rail-grid, .rail-resize, .rail-rule, .candidate-count, .rail-caption) { display: none; }
  .rail[data-overlay="true"] > .rail-label { font-size: 15px; }
  /* The overlay's jump field is wider, and its arrow reads Go, since an
     iPhone's number pad has no return key. */
  .rail[data-overlay="true"] > .rail-jump { width: min(240px, 100%); }
  .rail[data-overlay="true"] > .rail-jump > .rail-jump-go { width: auto; min-width: 56px; padding: 0 12px; gap: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
  .rail[data-overlay="true"] .rail-jump-word { display: inline; }
  .rail[data-overlay="true"] .rail-jump-go svg { display: none; }
  .rail[data-overlay="true"] .rail-jump-go:not(:disabled) { background: var(--button); color: var(--button-ink); }
  /* A refused number's note keeps to one line and the field leaves its
     height below, so the note pushes the size controls and the pages
     down instead of covering them. A wide window has room for the line. */
  .rail[data-overlay="true"] .rail-jump-note { white-space: nowrap; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; }
  .rail[data-overlay="true"] > .rail-jump[data-state="invalid"] { margin-bottom: 34px; }
  .rail[data-overlay="true"] > .rail-close { display: grid; place-items: center; grid-area: close; width: 36px; height: 30px; padding: 0; font-size: 22px; line-height: 1; color: var(--muted); border: 1px solid var(--line); }
}
.editing-bar { margin: 10px 23px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "filters actions" "finding finding" "banner banner"; gap: 8px 14px; align-items: start; font-size: 12px; }
.edit-finding { grid-area: finding; }
.edit-banner { grid-area: banner; }
.edit-actions { grid-area: actions; display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.edit-undo { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.edit-done { min-width: 150px; min-height: 40px; font-size: 14px; font-weight: 650; }
/* The order is a segment labeled Walk, By section and By page, on the
   review panel's second row. The folded strip keeps its two icons. The end
   buttons round their own corners instead of the group clipping them, so a
   focus ring shows whole. */
.walk-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.view-order { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.walk-label { font-size: 11px; color: var(--muted); }
.walk-segment { display: inline-flex; border: 1px solid var(--control-line); border-radius: 7px; }
.walk-segment button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.walk-segment button:first-child { border-radius: 6px 0 0 6px; }
.walk-segment button:last-child { border-radius: 0 6px 6px 0; }
.walk-segment button + button { border-left: 1px solid var(--line); }
.walk-segment button[aria-pressed="true"] { font-weight: 600; }
.view-order svg, .nav-icon, .follow-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* Follow the page ends the review panel's Walk row, since it changes how
   the panel moves. On the desktop it is a labeled toggle with the same
   pressed fill as the order beside it, as every toggle on the desk is. On
   a touch or narrow screen it is a switch, and on the folded strip an
   icon. */
.follow-page[aria-pressed="true"] { font-weight: 600; }
.follow-page .follow-icon, .follow-page .follow-switch { display: none; }
.walk-row .follow-page { display: inline-flex; flex: none; align-items: center; gap: 6px; width: auto; height: 28px; margin-left: auto; padding: 0 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 1000px), (pointer: coarse) {
  .walk-row .follow-page { gap: 8px; height: auto; min-height: 44px; padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
  .walk-row .follow-page .follow-switch { display: inline-block; position: relative; flex: none; width: 36px; height: 22px; border-radius: 11px; background: var(--control-line); }
  .walk-row .follow-page .follow-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: left .12s ease-out; }
  .walk-row .follow-page[aria-pressed="true"], .walk-row .follow-page[aria-pressed="true"]:hover { background: transparent; color: var(--accent); }
  .walk-row .follow-page[aria-pressed="true"] .follow-switch { background: var(--accent); }
  .walk-row .follow-page[aria-pressed="true"] .follow-switch::after { left: 17px; }
}
/* The page takes pinch gestures itself, so the desk zooms the page, not
   the screen, and the controls stay where they are. */
.canvas-scroll { touch-action: pan-x pan-y; }
/* A page that fits across keeps a quick sideways swipe for turning the
   page, so one finger does not pan it sideways onto the pasteboard. Two
   fingers still pan it every way. See noteCenter in app.js. */
.canvas-scroll[data-fits="across"] { touch-action: pan-y; }
.edit-filter { display: inline-flex; border: 1px solid var(--control-line); border-radius: 7px; overflow: hidden; }
.edit-filter button { border-radius: 0; padding: 6px 10px; font-size: 11px; color: var(--muted); }
.edit-filter button + button { border-left: 1px solid var(--line); }
.edit-filter button[aria-pressed="true"] { font-weight: 600; }
/* The Client's welcome on the first visit and the notice of items shared
   since the last, on the Client page and in the Client view in the
   editor's shell (hw-fswv.14.8). */
.client-welcome { display: flex; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin: 10px 16px 0; padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--surface); }
.client-welcome[hidden] { display: none; }
.client-welcome-words { flex: 1 1 420px; min-width: 0; }
.client-welcome h2 { margin: 0 0 4px; font-size: 16px; font-weight: 650; }
.client-welcome p { margin: 0 0 4px; font-size: 13.5px; line-height: 1.5; }
.client-welcome-keys { color: var(--muted); font-size: 12px !important; }
.client-welcome-keys[hidden] { display: none; }
@media (pointer: coarse) {
  body[data-desk="client"] .client-welcome-keys { display: none; }
}
.client-welcome-actions { display: flex; gap: 8px; flex: none; }
.client-fresh { display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-size: 13.5px; font-weight: 550; }
.client-fresh[hidden] { display: none; }
.client-fresh span { flex: 1 1 auto; }
.client-fresh-close { width: 30px; height: 30px; padding: 0; font-size: 16px; color: var(--muted); }
/* The conversation (hw-5x0n.30.212): the Client's comments and the
   editor's replies, oldest first. A reply this device has not shown says
   New until the reader moves on, on the Client page and in the Client
   view in the editor's shell (hw-fswv.14.8). */
.client-conversation { margin: 12px 0 0; }
.client-conversation h3 { margin: 0 0 6px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.client-conversation ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.client-said { padding: 6px 10px; border-radius: 8px; background: var(--subtle); font-size: 13px; line-height: 1.5; }
.client-said[data-from="editor"] { border-left: 3px solid var(--accent); }
.client-said[data-from="client"] { margin-left: 18px; }
.client-said[data-unread="true"] { background: var(--accent-soft); }
.client-said p { margin: 0; }
.client-said-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 12px; }
.client-said-role { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.client-said-when { margin-left: auto; font-size: 11px; color: var(--muted); }
.client-said-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.client-new { padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--surface); font-size: 10px; font-weight: 650; }
.client-unread { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; margin-top: 5px; padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 999px; }
.client-unread[hidden] { display: none; }
.client-new-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.client-unread kbd { font-size: 10px; padding: 0 4px; border: 1px solid var(--control-line); border-radius: 3px; }
.inspector-top .client-unread { grid-column: 1 / -1; justify-self: center; margin: 2px 0 0; }
.client-unread-count { display: none; }
/* The tabs and the replies button share one row of the panel's grid
   (hw-fswv.14.8, B7a4). */
.inspector-top .client-tabrow { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin: 2px 0 0; }
.client-tabrow .client-tabs, .inspector-top .client-tabrow .client-unread { margin: 0; }
/* The Client's progress line beside the title, over a meter, as the old
   page's bar has it (G1), and the finished state above the last card
   under Waiting (G2). */
.appbar .client-progress { flex: 0 0 auto; min-width: 150px; margin-left: 12px; }
.client-progress p { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.client-meter { height: 5px; border-radius: 3px; background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.client-meter[hidden] { display: none; }
.client-meter span { display: block; height: 100%; width: 0; background: var(--marker-done); border-radius: 3px; transition: width .3s ease; }
.client-progress[data-finished="true"] p { color: var(--added); }
.client-finished { margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.client-finished[hidden] { display: none; }
.client-finished p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.client-finished .client-empty-title { font-size: 15px; font-weight: 650; color: var(--added); }
/* The comment's fold button shows only on a phone, while the comment is
   folded. */
.client-comment-open { display: none; }
.client-welcome-more { display: none; }
/* The Client's Waiting, Answered, and All tabs sit centered under the
   walk at the top of the review panel (hw-fswv.14.7). */
.client-tabs { display: flex; width: fit-content; margin: 4px auto 8px; }
/* The panel's top is a grid. The tabs take a row of their own, the whole
   width, under the walk's buttons. */
.inspector-top .client-tabs { grid-column: 1 / -1; justify-self: center; margin: 2px 0 0; }
.edit-finding { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.edit-finding b { font-size: 14px; font-weight: 600; }
.edit-location { color: var(--muted); font-size: 11px; }
.edit-state { font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--edit-mark); color: var(--edit-mark); }
.edit-state[data-state="corrected"] { border-color: var(--edit-done); color: var(--edit-done); background: var(--edit-done-bg); }
.edit-edit { flex-basis: 100%; margin: 0; font-size: 15px; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.edit-edit del { color: var(--removed); background: var(--removed-bg); text-decoration-thickness: 2px; }
.edit-edit ins { color: var(--added); background: var(--added-bg); text-decoration: none; font-weight: 650; }
.edit-arrow { color: var(--muted); }
.edit-printed, .edit-suggestion { white-space: pre-line; }
.edit-suggestion .lyric-label { display: block; white-space: normal; }
.edit-banner { margin: 0; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); }
.edit-banner[data-kind="done"] { color: var(--edit-done); background: var(--edit-done-bg); border-color: var(--edit-done); }
.edit-banner[data-kind="cleared"], .edit-banner[data-kind="notice"] { color: var(--ink); background: var(--subtle); }
.key-notice { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 16px var(--shadow); }
/* A notice may end in one button, Show it or Redo (hw-5x0n.30.205). */
.key-notice-act { margin-left: 6px; padding: 2px 8px; font: inherit; font-weight: 600; color: var(--accent); border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); }
@media (pointer: coarse) { .key-notice-act { min-height: 44px; padding: 4px 12px; } }
/* On a touch screen the button sits beside the words, in line, so the
   notice stays one row of the button high instead of wrapping it to a row
   of its own (hw-5x0n.30.213.1). A notice placed from the middle of the
   screen took only the half to the right of it as its width, so it sizes
   to its words up to its largest width instead. */
@media (pointer: coarse) {
  .key-notice:has(.key-notice-act) { display: flex; align-items: center; gap: 8px; width: max-content; }
  .key-notice:has(.key-notice-act) .key-notice-act { flex: none; margin-left: 0; }
}
/* The pending-chord hint (hw-5x0n.30.233.3): a card at the foot of the
   page view, clear of both panels, with a bar that drains over what is
   left of the chord's wait. Faint rows are actions the desk cannot run
   now. On a phone it is a sheet along the foot of the screen, one column. */
.key-hint { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 61; width: min(780px, calc(100% - 48px)); max-height: calc(100% - 96px);
  overflow: auto; margin: 0; border-radius: 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 28px var(--shadow); font-size: 13px; }
.key-hint-bar { height: 3px; background: var(--accent); transform-origin: left; animation: key-hint-drain var(--key-hint-left, 1100ms) linear forwards; }
@keyframes key-hint-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { :root:not([data-motion="full"]) .key-hint-bar { animation: none; } }
:root[data-motion="reduced"] .key-hint-bar { animation: none; }
.key-hint-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.key-hint-keys { display: inline-flex; gap: 3px; }
.key-hint-count { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.key-hint-title { font-weight: 600; }
.key-hint-cancel { margin-left: auto; color: var(--muted); white-space: nowrap; }
.key-hint-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 22px; padding: 10px 14px 12px; }
.key-hint-group h4 { margin: 4px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.key-hint-group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.key-hint-row { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.key-hint-label { min-width: 0; overflow-wrap: break-word; }
/* A mark's page and proof, after its finding (hw-5x0n.30.233.5). */
.key-hint-detail { min-width: 0; color: var(--muted); overflow-wrap: break-word; }
.key-hint-row kbd { flex: none; color: var(--accent); }
.key-hint-row[data-ready="false"] { opacity: .45; }
.key-hint-note { margin: 0; padding: 0 14px 12px; color: var(--muted); font-size: 12px; }
@media (max-width: 650px) {
  .key-hint { position: fixed; left: 0; right: 0; bottom: 0; transform: none; width: auto; max-height: 60dvh; border-radius: 12px 12px 0 0;
    padding-bottom: env(safe-area-inset-bottom); }
  .key-hint-body { grid-template-columns: 1fr; }
}
/* The mode pills beside Focus, and the visual bar at the top of the
   review panel (hw-5x0n.30.233.3). Each shows only while its mode is on. */
.mode-pills { display: inline-flex; gap: 6px; align-items: center; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; white-space: nowrap;
  color: var(--accent); background: var(--accent-soft); }
.mode-pill b { font-weight: 700; letter-spacing: .04em; }
.mode-recording { color: var(--ink); background: var(--subtle); border: 1px solid var(--line); }
.mode-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--marker-todo); }
/* On a phone the bar has no room to spare, so the pills hang just under
   it, in the middle, and keep only the letter and the steps
   (hw-5x0n.30.233.7). */
@media (max-width: 650px) {
  .mode-pills { position: absolute; top: 100%; left: 50%; transform: translate(-50%, 6px); }
  .mode-pill { padding: 0 10px; }
  .mode-recording { background: var(--surface); }
  .mode-pill .mode-long { display: none; }
}
.visual-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 16px 0; padding: 10px 12px; border-radius: 8px; font-size: 12px;
  color: var(--ink); background: var(--accent-soft); }
.visual-bar > b { color: var(--accent); letter-spacing: .04em; }
.visual-count { color: var(--accent); }
.visual-item { display: inline-flex; align-items: center; gap: 3px; }
/* A done finding's marker turns green, and nothing frames the page. A green
   frame around the page stayed while the editor walked done findings and
   read as a stray border (hw-5x0n.30.161). The Done flash that pulsed one
   is gone too. */
/* The review panel offers Done and Undo beside the decision. */
/* Phones, tablets, and every touch screen. While the correction strip
   shows, Done is a full-width button fixed to the bottom of the screen, so
   it stays in view while the page scrolls or zooms. Undo sits beside it,
   smaller but still 44 points. A folded strip takes the bar with it. */
@media (max-width: 1000px), (pointer: coarse) {
  .editing-bar { margin: 8px 12px 6px; padding: 8px 10px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "filters filters" "finding finding" "banner banner"; gap: 6px 8px; }
  .edit-filter button { min-height: 40px; padding: 6px 9px; }
  .edit-finding b { font-size: 13px; }
  .edit-edit { font-size: 16px; }
  .strip-shown .edit-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px var(--shadow); }
  .strip-shown .edit-done { flex: 1; min-height: 56px; font-size: 18px; border-radius: 10px; }
  .strip-shown .edit-undo { flex: none; min-width: 72px; min-height: 44px; font-size: 13px; }
  /* The workspace ends above the Done bar, so the page, the review panel,
     and its folded strip with the finding navigation all stay above it. */
  .strip-shown .workspace { padding-bottom: calc(77px + env(safe-area-inset-bottom)); }
  /* A key notice keeps its 24px gap, above the Done bar instead of on it. */
  .strip-shown .key-notice { bottom: calc(77px + env(safe-area-inset-bottom) + 24px); }
}
@media (max-width: 650px) {
  .edit-location { flex-basis: 100%; }
  .edit-filter { flex: 1 1 100%; }
  .edit-filter button { flex: 1; white-space: nowrap; }
  .client-tabs, .inspector-top .client-tabs { width: auto; justify-self: stretch; margin: 2px 6px 0; }
  /* The Client's phone column keeps room for the card (hw-fswv.14.8,
     B7a4): the tabs and the replies count share one row, the comment
     folds to a button, and the welcome shows its first sentence. */
  .inspector-top .client-tabrow { flex-wrap: nowrap; margin: 2px 6px 0; }
  .client-tabrow .client-tabs, .inspector-top .client-tabrow .client-tabs { flex: 1 1 auto; min-width: 0; margin: 0; }
  .client-tabrow .client-unread { flex: none; padding: 2px 8px; }
  .client-tabrow .client-unread-text { display: none; }
  .client-tabrow .client-unread-count { display: inline; }
  body[data-desk="client"] .decision-area[data-note="closed"] .client-comment-open { display: inline-flex; order: 1; flex: none; }
  body[data-desk="client"] .decision-area[data-note="closed"] .decision-note-label { display: none; }
  body[data-desk="client"] .client-welcome { gap: 6px 12px; margin: 6px 8px 0; padding: 8px 12px; align-items: center; }
  body[data-desk="client"] .client-welcome-words { flex: 1 1 200px; }
  body[data-desk="client"] .client-welcome h2 { font-size: 15px; margin: 0 0 2px; }
  body[data-desk="client"] .client-welcome p { font-size: 13px; line-height: 1.4; margin: 0; }
  body[data-desk="client"] .client-welcome:not([data-more="open"]) .client-welcome-rest { display: none; }
  body[data-desk="client"] .client-welcome-keys { display: none; }
  .client-welcome-more { display: inline; font-size: 12.5px; }
  .client-welcome-more[hidden] { display: none; }
  body[data-desk="client"] .client-welcome-actions .button { padding: 6px 12px; }
}

/* Page numbers. The page pane's arrows turn pages only, and the page they
   show stands out, as does the page of the finding in the editing bar. */
/* Digits keep one width, and the label keeps the width of its widest
   text, which holdwidth.js puts in --hold-width, so the arrows on either
   side stay put (hw-5x0n.30.243). The folded strip stacks its position
   between the arrows and keeps its own minimum. */
.page-nav #page-position { white-space: nowrap; font-variant-numeric: tabular-nums; min-width: var(--hold-width, 0px); }
.page-label, .edit-location .edit-page { color: var(--ink); font-size: 12px; font-weight: 650; }
.edit-location .edit-page { padding: 1px 6px; border: 1px solid var(--control-line); border-radius: 4px; background: var(--subtle); }
/* Page jump in the page toolbar. The page name is a button that reads as
   the name, and opens a field over the name and the count beside it. The
   name keeps its room, hidden, so the toolbar keeps its width. The field
   refuses a page the way the Pages panel's field does, red with a note
   under it. On a phone its arrow reads Go, since a number pad has no
   return key. See the toolbar's page jump in app.js. */
.tool-group .page-jump-open { display: inline-block; width: auto; height: auto; margin: -3px -4px; padding: 3px 4px; border-radius: 4px; font-size: 12px; line-height: inherit; }
.page-jump-open:hover:not(:disabled) { text-decoration: underline dotted; text-underline-offset: 3px; }
#page-position.jumping { visibility: hidden; }
.page-jump { --page-jump-min: 132px; position: absolute; z-index: 30; transform: translateY(-50%); height: 28px; }
.page-jump-word { display: flex; align-items: center; padding: 0 0 0 7px; color: var(--ink); font-size: 12px; font-weight: 650; cursor: text; }
.page-jump input { padding: 0 4px; border-radius: 0; font-weight: 650; }
.page-jump-go { width: 26px; }
.page-jump-goword { display: none; }
.page-jump[data-state="invalid"] .page-jump-word { color: var(--removed); }
.page-jump-note { max-width: 260px; }
@media (pointer: coarse) {
  .tool-group .page-jump-open { position: relative; min-width: 0; min-height: 0; }
  .tool-group .page-jump-open::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  .page-jump { --page-jump-min: 168px; height: 46px; }
  .page-jump-word, .page-jump input { font-size: 16px; }
  .page-jump-go { width: 44px; }
}
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .page-jump-go { width: auto; min-width: 56px; padding: 0 12px; font-size: 14px; font-weight: 600; }
  .page-jump-goword { display: inline; }
  .page-jump-go svg { display: none; }
  .page-jump-go:not(:disabled) { background: var(--button); color: var(--button-ink); }
}

/* The filters panel, after Grafana's ad hoc filters with one filter per
   row. Builder shows each row as field, operator, and value, each a
   dropdown, with the + beside the last row. Saved, Builder, and Code sit
   over the rows. Code edits the same query as text. The panel is as wide
   as its widest row, at every size, so the filters read as one column
   (hw-5x0n.30.179). A long value still stops at the pane's edge. */
.filter-bar { position: relative; left: var(--filter-shift, 0px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "main" "error"; align-items: start; gap: 6px 10px; --filter-inset: 23px; width: fit-content; max-width: calc(100% - 2 * var(--filter-inset)); margin: -4px var(--filter-inset) 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 12px; }
.filter-bar[hidden] { display: none; }
/* Code keeps the Builder's width and never spans the page view
   (Stephen, hw-5x0n.30.198). In Code the rows stay laid out, unseen and
   with no height, so the panel stays as wide as its widest row, and the
   query field adds no width of its own but fills what the panel has.
   app.js marks the rows data-unseen and inert rather than hidden, since
   [hidden] is display: none !important. */
.filter-chips[data-unseen="true"] { visibility: hidden; height: 0; overflow: hidden; }
.filter-main { grid-area: main; min-width: 0; }
.filter-side { grid-area: side; display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.filter-mode { display: inline-flex; flex: none; border: 1px solid var(--control-line); border-radius: 7px; overflow: hidden; }
.filter-mode button { border-radius: 0; padding: 5px 10px; font-size: 11px; color: var(--muted); }
.filter-mode button + button { border-left: 1px solid var(--line); }
.filter-mode button[aria-pressed="true"] { font-weight: 600; }
/* The Quick filter's grouped checklists (hw-5x0n.30.244), drawn by
   checklistview.js. A group is a card whose summary names it and, while
   folded, its selection; its options are pills in three looks: clear, an
   empty box; included, the accent and a check; excluded, the removed
   color, a cross, and the label struck through. A zero count dims. */
.checklist { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; }
.check-group { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; }
.check-summary { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.check-summary:hover { background: var(--hover); }
.check-caret { width: 0; height: 0; border-left: 5px solid var(--muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent; flex: none; transition: transform .12s; }
.check-group[data-open] .check-caret { transform: rotate(90deg); }
.check-picked { font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.check-total { margin-left: auto; color: var(--faint); font-weight: 400; font-variant-numeric: tabular-nums; }
.check-find { display: block; width: calc(100% - 16px); box-sizing: border-box; margin: 2px 8px 6px; font: inherit; font-size: 12px; padding: 4px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.check-options { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 2px 8px 8px; }
.check-empty { margin: 0 10px 8px; color: var(--muted); }
.check-option { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; line-height: 1.3; cursor: pointer; max-width: 100%; }
.check-option:hover { background: var(--hover); }
.check-box { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border: 1px solid var(--control-line); border-radius: 3px; font-size: 10px; line-height: 1; box-sizing: border-box; flex: none; }
.check-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.check-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.check-option[data-state="include"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
:is(.check-option[data-state="include"] .check-box, .check-box[data-state="include"]) { background: var(--accent); border-color: var(--accent); color: var(--button-ink); }
:is(.check-option[data-state="include"] .check-box, .check-box[data-state="include"])::before { content: "✓"; }
.check-option[data-state="exclude"] { border-color: var(--removed); background: var(--removed-bg); color: var(--removed); }
.check-option[data-state="exclude"] .check-label { text-decoration: line-through; text-decoration-thickness: 1px; }
:is(.check-option[data-state="exclude"] .check-box, .check-box[data-state="exclude"]) { background: var(--removed); border-color: var(--removed); color: var(--surface); }
:is(.check-option[data-state="exclude"] .check-box, .check-box[data-state="exclude"])::before { content: "✕"; }
.check-option[data-zero][data-state="clear"] { color: var(--faint); border-style: dashed; }
.check-option[data-zero] .check-count { color: var(--faint); }
.checklist[data-inert] .check-option { opacity: .6; cursor: not-allowed; }
.check-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0 8px 8px; padding: 5px 10px; border-radius: 6px; background: var(--subtle); color: var(--muted); font-size: 11px; }
.check-hint .check-box { width: 12px; height: 12px; font-size: 9px; }
.check-hint-done { margin-left: auto; padding: 0 4px; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
/* Fixed across the top pushes the page down, so the groups run in a
   wrapping row of cards and an open long group scrolls its pills inside
   a box three lines high instead of growing the bar. */
body[data-filter-layout="fixed"] .checklist { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; }
body[data-filter-layout="fixed"] .check-group { flex: 0 1 auto; max-width: 360px; }
body[data-filter-layout="fixed"] .check-group[data-open] { flex-basis: 300px; }
body[data-filter-layout="fixed"] .check-group[data-long][data-open] { flex-basis: 420px; max-width: 420px; }
body[data-filter-layout="fixed"] .check-group[data-long] .check-options { max-height: 96px; overflow-y: auto; overscroll-behavior: contain; }
@media (pointer: coarse) {
  .check-option, .check-summary, .check-find, .check-hint-done { min-height: 44px; }
}
/* Also filtering by: the clauses no group shows, as the Builder's chips. */
.quick-also { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 6px 2px 0; }
.quick-also[hidden] { display: none; }
.quick-also-label { color: var(--muted); font-size: 11px; }

.filter-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.filter-chips[hidden] { display: none; }
.filter-row { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.chip { display: inline-flex; align-items: stretch; max-width: 100%; min-width: 0; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent-soft); color: var(--accent); overflow: hidden; }
.chip > * { padding: 4px 7px; border-radius: 0; font-size: 12px; white-space: nowrap; }
.chip > * + * { border-left: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
/* Each part opens its own dropdown, and its caret says so. */
.chip :is(.chip-key, .chip-op, .chip-value)::after { content: "▾"; margin-left: 5px; font-size: 9px; opacity: .7; }
.chip-custom .chip-value::after { content: none; }
.chip > button:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.chip-key { font-weight: 600; }
.chip-op { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 650; }
.chip-value { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip-remove { border-left: 1px solid var(--accent); font-size: 14px; line-height: 1; }
.chip-custom { border-style: dashed; }
/* A draft row: dashed until it has a value, and never part of the query. */
.chip.draft { border-style: dashed; background: var(--surface); }
.chip.draft > * + * { border-left-style: dashed; }
.chip .chip-empty { color: var(--muted); font-weight: 500; }
.add-filter { flex: none; width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px dashed var(--control-line); border-radius: 6px; font-size: 16px; line-height: 1; color: var(--muted); }
.add-filter:not(:disabled):hover { color: var(--accent); border-color: var(--accent); }
.filter-code { display: flex; gap: 6px; align-items: flex-start; min-width: 0; }
.filter-code[hidden] { display: none; }
.filter-code textarea { flex: 1; width: 0; min-width: 0; min-height: 0; resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface); color: var(--ink); }
.filter-code textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter-code textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.filter-code textarea.filtered { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.filter-code textarea[aria-invalid="true"] { border-color: var(--removed); background: var(--removed-bg); color: var(--removed); }
.filter-bar .button { min-height: 30px; padding: 5px 9px; }
.filter-clear { flex: none; }
.filter-error { grid-area: error; margin: 0; padding: 6px 10px; font-size: 11px; color: var(--removed); background: var(--removed-bg); border: 1px solid var(--removed); border-radius: 6px; }
.filter-pop { position: absolute; z-index: 35; width: min(320px, calc(100vw - 24px)); max-height: 420px; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 40px var(--shadow); }
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.pick-close { font-size: 18px; width: 28px; height: 28px; }
.pick-hint { margin: 0 2px; color: var(--muted); font-size: 11px; }
.pick-input { font: inherit; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.pick-list { display: flex; flex-direction: column; overflow: auto; min-height: 0; }
.pick { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 8px; font-size: 12px; }
.pick .pick-label { flex: 1; }
.pick small { color: var(--muted); }
.pick.active { background: var(--accent-soft); color: var(--accent); }
.pick-typed { font-style: italic; }
/* A value no finding would match with the other rows stays, dimmed, and
   can still be chosen (hw-5x0n.30.125). */
.pick.pick-none:not(.active), .suggest.suggest-none:not(.active) .suggest-label { color: var(--muted); }
.pick-check { font-size: 14px; }
.pick-empty { margin: 4px 8px; color: var(--muted); }
.pick-foot { display: flex; justify-content: flex-end; }
.filter-saved { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; }
.saved-icon { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.filter-saved-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-saved-edited { flex: none; padding: 0 5px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10px; }
.saved-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; overflow: auto; min-height: 0; }
.saved-row { display: flex; align-items: center; gap: 2px; }
.saved-load { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 6px 8px; border-radius: 6px; }
.saved-name { font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.saved-query { font: 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.saved-row.not-applicable .saved-name { color: var(--muted); }
.saved-row.not-applicable .saved-query { white-space: normal; font-family: inherit; color: var(--muted); }
/* Recent filters head Saved, the newest three rows applied
   (hw-5x0n.30.147). Their list never scrolls on its own. */
.saved-group { margin: 4px 8px 0; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.saved-list.saved-recent { flex: none; overflow: visible; }
.saved-act { flex: none; width: 28px; height: 28px; font-size: 14px; color: var(--muted); border-radius: 6px; }
.saved-rename { flex: 1; min-width: 0; font: inherit; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.saved-row.confirming { flex-wrap: wrap; gap: 6px; padding: 6px 8px; background: var(--accent-soft); border-radius: 6px; }
.saved-ask { flex: 1 1 100%; font-size: 12px; }
.saved-form { display: flex; gap: 6px; align-items: center; padding-top: 6px; border-top: 1px solid var(--line); }
.saved-form input { flex: 1; min-width: 0; font: inherit; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.saved-manage-link { align-self: flex-start; font-size: 11px; }
.saved-manage { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.manage-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.manage-row.dragging { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 4px 14px var(--shadow); }
.manage-handle { flex: none; width: 28px; height: 32px; font-size: 16px; color: var(--muted); cursor: grab; touch-action: none; border-radius: 6px; }
.manage-row.dragging .manage-handle { cursor: grabbing; }
.manage-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.manage-row.removed .saved-name { color: var(--muted); }
.manage-empty { color: var(--muted); }
.saved-removed-section h3 { margin: 14px 0 4px; }
.saved-status { margin: 0 2px; font-size: 11px; color: var(--muted); }
.saved-status[hidden] { display: none; }
.filter-suggest { position: absolute; z-index: 36; max-height: 300px; overflow: auto; display: flex; flex-direction: column; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 40px var(--shadow); }
.filter-suggest[hidden] { display: none; }
.suggest { display: flex; align-items: baseline; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.suggest:hover { background: var(--hover); }
.suggest .suggest-label { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); white-space: nowrap; }
.suggest small { margin-left: auto; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest.active { background: var(--accent-soft); }
.suggest.active .suggest-label { color: var(--accent); }
.filter-syntax { position: absolute; z-index: 35; top: calc(100% + 4px); right: 0; width: min(460px, 100%); max-height: 60dvh; overflow: auto; padding: 7px 12px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 40px var(--shadow); font-size: 11px; color: var(--muted); }
.filter-syntax dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 4px 8px 0; }
.filter-syntax dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); white-space: nowrap; }
.filter-syntax dd { margin: 0; }
/* The hidden panel keeps its count of filters in force on the Filters
   button, a plain count like the one on Findings: the button reads in the
   accent color while any filter applies, and dim otherwise. Shown, it
   takes the pressed style every toggle shares. */
.filters-toggle[aria-expanded="false"][data-active="false"] { color: var(--muted); }
.filters-toggle[aria-expanded="false"][data-active="true"] { color: var(--accent); }
/* Show similar reads as a muted link under the finding's place
   (hw-5x0n.30.222). */
.similar-link { display: block; margin: 2px 0 0; padding: 2px 0; border: 0; background: none; color: var(--muted); font-size: 12px; text-align: left; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 2px; cursor: pointer; }
.similar-link[hidden] { display: none; }
.similar-link:hover, .similar-link:focus-visible { color: var(--accent); }
@media (pointer: coarse) { .similar-link { min-height: 44px; } }
/* A parallel pair (hw-6h8u.27): the link to the other copy reads as Show
   similar does, and the offer of this copy's ruling for the other is a
   small accent button beside it. See pair.js. */
.pair-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 0; }
.pair-line[hidden] { display: none; }
.pair-line .similar-link { margin: 0; }
.pair-offer { max-width: 100%; padding: 2px 8px; white-space: normal; text-align: left; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 4px; background: none; color: var(--accent); font-size: 12px; cursor: pointer; }
.pair-offer[hidden] { display: none; }
.pair-offer:hover, .pair-offer:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (pointer: coarse) { .pair-offer { min-height: 44px; } }
/* Back to the previous filter reads muted and borderless, like a link,
   and names what it restores, cut short with an ellipsis
   (hw-5x0n.30.223). */
.filter-back { color: var(--muted); border-color: transparent; background: none; max-width: 22em; min-width: 0; }
.filter-back[hidden] { display: none; }
.filter-back:hover { color: var(--ink); }
.filter-back-label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A phone's toolbar has no room for Back: it pushed Findings off an
   iPhone in portrait. There the filters panel shows Back beside Clear
   all, and only there. */
.filter-back-panel { display: none; }
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .list-controls .filter-back { display: none; }
  .filter-back-panel:not([hidden]) { display: inline-flex; }
  /* Back beside Saved, Clear all, Builder, and Code ran 47 pixels past an
     iPhone 15, so Saved gives way and cuts its name short
     (hw-5x0n.30.240). */
  .filter-side .filter-saved { min-width: 0; }
  .filter-side .filter-back-panel { flex: none; }
  /* Quick made the switch three buttons wide, so each gives up some of
     its padding before Saved gives up its name (hw-5x0n.30.244). */
  .filter-mode button { padding-left: 7px; padding-right: 7px; }
}
.editing-bar { position: relative; z-index: 25; }
.edit-filters { grid-area: filters; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* The review panel folds like the page rail: a toggle on its own edge, and
   a strip that keeps the finding navigation in reach. */
.panel-edge { font-size: 16px; width: 34px; height: 30px; flex: none; color: var(--muted); }
.panel-edge { width: 30px; }
/* The review panel's header: the edge toggle with the finding buttons
   right after it, on the toolbar's line, 31 pixels down, then the Walk
   row. Both sides sit on
   the panel body's 27 pixel margins. */
.inspector-top { display: grid; flex: none; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "edge nav" "walk walk"; align-items: center; gap: 6px 4px; height: auto; min-height: 0; padding: 16px 27px 9px; }
.inspector-top > .panel-edge { grid-area: edge; }
.inspector-top .finding-nav { display: contents; }
/* The group fills its column and packs at the start. The position never
   shrinks under its text, so 1764 of 1764 never runs over the arrows. */
.inspector-top .panel-nav { grid-area: nav; justify-self: stretch; justify-content: flex-start; }
.inspector-top .walk-row { grid-area: walk; }
.inspector-top .nav-position { min-width: max(46px, var(--hold-width, 0px)); flex: none; }
/* Above 1000 pixels with a mouse, the header and the body's top margin
   give back what spacing they can, since the Walk row costs the body
   about 43 pixels against a one-row header (hw-5x0n.30.135). The first
   row keeps its 16 pixels above, which hold it on the toolbar's center
   line. Touch screens keep their own spacing, below, and a short window
   keeps its tighter body. */
@media (min-width: 1001px) and (pointer: fine) {
  .inspector-top { row-gap: 4px; padding-bottom: 5px; }
}
@media (min-width: 1001px) and (min-height: 521px) and (pointer: fine) {
  .inspector-body { padding-top: 18px; }
}
.finding-nav { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; justify-content: space-between; }
.panel-strip { width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 3px; background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; }
.panel-strip .finding-nav { flex-direction: column; flex: none; }
.panel-strip .panel-nav { flex-direction: column; gap: 4px; }
.panel-strip .nav-divider { width: 16px; height: 0; border-left: 0; border-top: 1px solid var(--line); margin: 3px 0; }
.panel-strip .nav-position { min-width: 0; font-size: 10px; white-space: normal; line-height: 1.2; }
.panel-strip .walk-row, .panel-strip .walk-segment { flex-direction: column; }
.panel-strip .walk-row { gap: 4px; }
.panel-strip :is(.walk-label, .order-text, .follow-label, .follow-switch) { display: none; }
.panel-strip .walk-segment button { width: 28px; padding: 0; }
.panel-strip .walk-segment button:first-child { border-radius: 6px 6px 0 0; }
.panel-strip .walk-segment button:last-child { border-radius: 0 0 6px 6px; }
.panel-strip .walk-segment button + button { border-left: 0; border-top: 1px solid var(--line); }
.panel-strip .walk-row .follow-page { margin: 0; padding: 0; width: 28px; justify-content: center; }
.panel-strip .walk-row .follow-page[aria-pressed="true"] { background: var(--accent-soft); }
.panel-strip .follow-page .follow-icon { display: block; }
/* The strip's Follow is an icon on every screen, so the touch switch,
   which the Walk row shows, stays out of it. */
.panel-strip .walk-row .follow-page .follow-switch { display: none; }
@media (max-width: 1240px) {
  .filter-bar { --filter-inset: 16px; margin: 0 var(--filter-inset) 8px; }
}
/* Phones in portrait. The panel sits under the page, so its edge is the
   top: the toggle points down to fold it, and the folded strip runs along
   the bottom with the finding navigation in one row. As in the open
   panel, the finding buttons pack after the edge toggle with Back set
   apart by its divider, and the order and Follow the page end the row as
   icons. */
@media (max-width: 650px) {
  .filter-bar { --filter-inset: 12px; margin: 0 var(--filter-inset) 6px; padding: 6px 8px; }
  .panel-edge > span { display: inline-block; transform: rotate(90deg); }
  .panel-strip { width: auto; flex-direction: row; padding: 2px 6px calc(2px + env(safe-area-inset-bottom)); gap: 4px; border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .strip-shown .panel-strip { padding-bottom: 2px; }
  .panel-strip .finding-nav, .panel-strip .panel-nav { flex-direction: row; flex: 1; }
  .panel-strip .panel-nav { justify-content: flex-start; gap: 0; }
  .panel-strip .nav-position { font-size: 11px; white-space: nowrap; }
  .panel-strip .nav-divider { display: block; width: 0; height: 16px; border-top: 0; border-left: 1px solid var(--line); margin: 0 4px; }
  .finding-nav .panel-nav button { min-width: 30px; }
  /* The folded strip has no room for Undo beside the order and Follow on
     a 375 point phone. It shows in the open panel and stays on u
     (hw-fswv.14.5). */
  .panel-strip .walk-undo, .panel-strip .nav-divider:has(+ .walk-undo) { display: none; }
  /* The edge toggle, seven finding buttons, and a four-digit position
     share one row on a 390-point phone. */
  .inspector-top { column-gap: 2px; padding-left: 4px; padding-right: 4px; }
  .panel-strip { gap: 2px; padding-left: 4px; padding-right: 4px; }
  .workspace .panel-edge { min-width: 36px; width: 36px; }
  .panel-strip :is(.walk-row, .walk-segment) { flex-direction: row; }
  .panel-strip .walk-segment button:first-child { border-radius: 6px 0 0 6px; }
  .panel-strip .walk-segment button:last-child { border-radius: 0 6px 6px 0; }
  .panel-strip .walk-segment button + button { border-top: 0; border-left: 1px solid var(--line); }
  .edit-filters { gap: 6px 8px; }
}
/* On a phone in landscape the folded strip stands at the panel's edge,
   393 points tall on an iPhone, and Undo made it scroll. It leaves Undo
   to the open panel and u, as in portrait (hw-wm7m.331). */
@media (max-height: 520px) and (max-width: 1000px) {
  .panel-strip .walk-undo, .panel-strip .nav-divider:has(+ .walk-undo) { display: none; }
}
@media (pointer: coarse) {
  .filter-mode button, .chip > *, .filters-toggle, .panel-edge, .pick, .pick-close, .filter-bar .button, .suggest { min-height: 44px; }
  .saved-act { min-width: 44px; min-height: 44px; }
  .manage-handle, .manage-restore { min-width: 44px; min-height: 44px; }
  .saved-load { min-height: 44px; }
  .saved-form input, .saved-rename { min-height: 44px; font-size: 16px; }
  .panel-edge { min-width: 44px; }
  .pick-input, .filter-code textarea { min-height: 44px; font-size: 16px; }
  .chip-remove { min-width: 40px; }
  .walk-segment button, .panel-strip .walk-row .follow-page { height: auto; min-height: 44px; }
  .add-filter { width: 44px; height: 44px; }
}
/* A phone in landscape is too short for one column of 44-point buttons,
   so the folded strip pairs them: first and last, the section jumps,
   previous and next, then the position and the order. */
@media (max-height: 520px) and (min-width: 651px) {
  .panel-strip { width: auto; padding: 4px 3px; gap: 2px; overflow: visible; }
  .panel-strip .finding-nav { gap: 2px; }
  .panel-strip .panel-nav { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 0 2px;
    grid-template-areas: "return return" "first last" "psec nsec" "prev next" "pos pos"; justify-items: center; }
  .panel-strip .nav-divider { display: none; }
  .panel-strip #return-candidate { grid-area: return; }
  .panel-strip #first-candidate { grid-area: first; }
  .panel-strip #last-candidate { grid-area: last; }
  .panel-strip #previous-section { grid-area: psec; }
  .panel-strip #next-section { grid-area: nsec; }
  .panel-strip #previous-candidate { grid-area: prev; }
  .panel-strip #next-candidate { grid-area: next; }
  .panel-strip .nav-position { grid-area: pos; white-space: nowrap; }
  .panel-strip :is(.walk-row, .walk-segment) { flex-direction: row; }
  .panel-strip .walk-segment button:first-child { border-radius: 6px 0 0 6px; }
  .panel-strip .walk-segment button:last-child { border-radius: 0 6px 6px 0; }
  .panel-strip .walk-segment button + button { border-top: 0; border-left: 1px solid var(--line); }
}
/* The finding buttons stay one compact group after the edge toggle on
   every screen, as the view toolbar's page arrows do, with Back set apart
   by its divider. The Walk order and the Follow the page switch make the
   second row, a deliberate one, with the label at the start. The order
   drops its icons, so Follow the page keeps its whole label in a 420
   point iPad panel. The label never shortens. A row too narrow for it
   wraps Follow under the order instead. */
@media (max-width: 1000px), (pointer: coarse) {
  .inspector-top { padding: 4px 6px 6px; column-gap: 4px; }
  .inspector-top .panel-nav .nav-divider { display: block; margin: 0 4px; }
  .inspector-top .walk-row { flex-wrap: wrap; gap: 4px 10px; padding: 0 6px; }
  .inspector-top .walk-segment button { padding: 0 10px; font-size: 13px; }
  .inspector-top .walk-segment svg { display: none; }
  .walk-row .follow-page { gap: 6px; padding: 0 4px; }
}
/* Below 1000 pixels the Walk row tightens, so it fits the 360 pixel
   panel and a 390 point phone. The finding buttons give up two more
   points of width and their gaps, as on touch screens, so all seven,
   Back's divider, and a four-digit position fit that panel while walking
   by section. */
@media (max-width: 1000px) {
  .inspector-top .panel-nav button { min-width: 34px; }
  .inspector-top .panel-nav { gap: 0; }
  .inspector-top { padding-left: 4px; padding-right: 4px; }
  .inspector-top .walk-row { gap: 4px 8px; padding: 0 4px; }
  .inspector-top .view-order { gap: 6px; }
  .inspector-top .walk-segment button { padding: 0 9px; font-size: 12px; }
  .walk-row .follow-page { padding: 0 2px; font-size: 12px; }
}
/* In an iPad's 370 point panel the walk with Undo ran under the panel's
   edge button, which then took no tap. On a touch screen up to 1000
   wide the finding buttons are 30 wide, as on a phone (hw-wm7m.331). */
@media (max-width: 1000px) and (pointer: coarse) {
  .inspector-top .panel-nav button { min-width: 30px; }
}
/* Where the desk keeps edits, Add an edit ends the Walk row after Follow
   the page. On a tablet-sized narrow screen, such as an iPad in portrait,
   the 360 pixel panel left 22 pixels after Follow and the button needs
   36, so it wrapped onto a line of its own (hw-5x0n.30.184). The row
   tightens by 18 pixels there: its gaps, the order's padding, and the
   switch's gap. That left 4 pixels, so a font a little wider wrapped it
   again. The row now also drops its own side padding and Follow's, and
   its gaps narrow to 4 pixels, so its ends line up with the header's
   edge toggle. In the 370 pixel panel, above, that leaves 30 pixels to
   spare, and the row still holds with its text at 110 percent. An iPad
   in landscape tightens the same way from its wider touch spacing, which
   leaves 54 of its 420 pixel panel (hw-5x0n.30.186). The phone's Walk
   menu is a column and keeps its own. */
@media (max-width: 1000px) and (min-width: 651px) and (min-height: 521px), (min-width: 1001px) and (pointer: coarse) {
  .inspector-top .walk-row:has(> .add-edit:not([hidden])) { column-gap: 4px; padding: 0; }
  .inspector-top .walk-row:has(> .add-edit:not([hidden])) .walk-segment button { padding: 0 6px; }
  .inspector-top .walk-row:has(> .add-edit:not([hidden])) .follow-page { gap: 4px; padding: 0; }
}
/* A folded rail or review panel hides completely. Its slim view lies over
   the page's edge, invisible and out of the pointer's way, until app.js
   reveals it, so showing it never moves the page. --edge-side names the
   screen edge it folds into, and app.js reads it. --edge-bottom keeps it
   above the fixed Done bar. See renderEdges in app.js. */
.workspace { position: relative; --edge-bottom: 0px; }
.rail { --edge-side: left; }
.panel-strip { --edge-side: right; }
.rail[data-edge], .panel-strip[data-edge] { position: absolute; top: 0; bottom: var(--edge-bottom); z-index: 32; transition: opacity .12s ease-out; }
.rail[data-edge] { left: 0; }
.panel-strip[data-edge] { right: 0; }
.rail[data-edge="hidden"], .panel-strip[data-edge="hidden"] { opacity: 0; pointer-events: none; }
.rail[data-edge="revealed"] { box-shadow: 6px 0 20px var(--shadow); }
.panel-strip[data-edge="revealed"] { box-shadow: -6px 0 20px var(--shadow); }
/* A touch screen gets a slim handle on the edge instead of hover. Its tap
   area reaches into the page, and only the short bar inside it shows. */
.edge-handle { display: none; }
@media (pointer: coarse) {
  .edge-handle:not([hidden]) { display: block; position: absolute; z-index: 31; top: calc(50% - 32px); width: 30px; height: 64px; min-width: 0; min-height: 0; padding: 0; border-radius: 0; background: transparent; }
  .edge-handle::before { content: ""; position: absolute; top: 12px; bottom: 12px; width: 5px; border-radius: 3px; background: var(--control-line); opacity: .8; }
  #rail-handle { left: 0; }
  #rail-handle::before { left: 3px; }
  #panel-handle { right: 0; }
  #panel-handle::before { right: 3px; }
  .edge-handle:active:not(:disabled) { background: transparent; }
}
@media (max-width: 1000px), (pointer: coarse) {
  .strip-shown .workspace { --edge-bottom: calc(77px + env(safe-area-inset-bottom)); }
}
/* Phones in portrait fold the review panel into the bottom edge. */
@media (max-width: 650px) {
  .panel-strip { --edge-side: bottom; }
  .panel-strip[data-edge] { top: auto; left: 0; }
  .panel-strip[data-edge="revealed"] { box-shadow: 0 -6px 20px var(--shadow); }
  #panel-handle { top: auto; bottom: var(--edge-bottom); left: calc(50% - 36px); right: auto; width: 72px; height: 30px; }
  #panel-handle::before { top: auto; bottom: 4px; left: 14px; right: 14px; width: auto; height: 5px; }
}
/* On a touch phone the folded panel's handle bar lies on the bottom of
   the document area, so while it shows Compare keeps room under its
   footnote for the bar (hw-mh87.76). */
@media (max-width: 650px) and (pointer: coarse) {
  .workspace:has(#panel-handle:not([hidden])) .cmp { padding-bottom: 14px; }
}
/* Panel sides (hw-5x0n.30.199). body[data-rail-side] and
   [data-panel-side] dock the Pages panel and the review panel on the left
   or right, and app.js moves them in the page to match, so Tab follows.
   A panel on the other side mirrors its border, its width edge, its fold
   into the screen edge with its shadow, and its touch handle. The Pages
   panel docks only above 1000 pixels, where it is a column, and the
   review panel only above 650, since a phone in portrait keeps it under
   the page. Where both fold into the same edge, the review panel's slim
   view lies inside the Pages panel's, open or folded, at --edge-inset,
   which app.js measures. See sides.js and placeStrip in app.js. */
.workspace { --edge-inset: 0px; }
@media (min-width: 1001px) {
  body[data-rail-side="right"] .rail { --edge-side: right; border-right: 0; border-left: 1px solid var(--line); }
  body[data-rail-side="right"] .rail-resize { right: auto; left: -4px; }
  body[data-rail-side="right"] .rail[data-edge] { left: auto; right: 0; }
  body[data-rail-side="right"] .rail[data-edge="revealed"] { box-shadow: -6px 0 20px var(--shadow); }
  body[data-rail-side="right"] .rail-jump-note { left: auto; right: -1px; }
  /* Nothing in a Pages panel on the right may run past the screen and
     scroll the window sideways, so the workspace clips it there. */
  body[data-rail-side="right"] .workspace { overflow-x: clip; }
}
@media (min-width: 1001px) and (pointer: coarse) {
  body[data-rail-side="right"] .rail-resize { left: -11px; }
  body[data-rail-side="right"] #rail-handle { left: auto; right: 0; }
  body[data-rail-side="right"] #rail-handle::before { left: auto; right: 3px; }
  body[data-rail-side="left"][data-panel-side="left"] #panel-handle, body[data-rail-side="right"][data-panel-side="right"] #panel-handle { top: calc(50% + 40px); }
}
@media (min-width: 651px) {
  body[data-panel-side="left"] .inspector { border-left: 0; border-right: 1px solid var(--line); }
  body[data-panel-side="left"] .panel-strip { --edge-side: left; border-left: 0; border-right: 1px solid var(--line); }
  body[data-panel-side="left"] .panel-strip[data-edge] { right: auto; left: var(--edge-inset); }
  body[data-panel-side="right"] .panel-strip[data-edge] { right: var(--edge-inset); }
  body[data-panel-side="left"] .panel-strip[data-edge="revealed"] { box-shadow: 6px 0 20px var(--shadow); }
}
/* Each panel's fold toggle sits on the panel's screen edge (Stephen,
   2026-10-08): the review panel's header ends with it on the right and
   starts with it on the left, and a Pages grid on the right ends its
   header with it. The list's toggle is at its top, on no side. Under
   1000 pixels the Pages sheet's controls, Marked, the funnel, the
   highlights, and Close, sit on the Pages panel's side, so on the left
   the sheet's header mirrors. A phone in portrait keeps the review
   panel's toggle first, where its edge is the top. */
@media (min-width: 651px) {
  body[data-panel-side="right"] .inspector-top { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nav edge" "walk walk"; }
}
@media (max-height: 520px) and (min-width: 651px) and (max-width: 1000px) {
  body[data-panel-side="right"] .inspector-top { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "nav menu edge"; }
}
@media (min-width: 1001px) {
  body[data-rail-side="right"] .rail[data-grid="true"] { grid-template-columns: auto 1fr auto auto auto auto auto;
    grid-template-areas: "label . pages filter marks grid toggle" "jump jump jump jump jump jump jump" "zoom zoom zoom zoom zoom zoom zoom" "thumbs thumbs thumbs thumbs thumbs thumbs thumbs" "count caption caption caption caption caption caption"; }
}
@media (max-width: 1000px) {
  body[data-rail-side="left"] .rail[data-overlay="true"][data-grid="true"] { grid-template-columns: auto auto auto auto 1fr auto;
    grid-template-areas: "close marks filter pages . label" "jump jump jump jump jump jump" "zoom zoom zoom zoom zoom zoom" "thumbs thumbs thumbs thumbs thumbs thumbs"; }
  body[data-rail-side="left"] .rail[data-overlay="true"][data-grid="true"] > .rail-label { justify-self: end; }
}
@media (min-width: 651px) and (pointer: coarse) {
  body[data-panel-side="left"] #panel-handle { right: auto; left: var(--edge-inset); }
  body[data-panel-side="left"] #panel-handle::before { right: auto; left: 3px; }
  body[data-panel-side="right"] #panel-handle { right: var(--edge-inset); }
}
/* Writes show at once. Until the server confirms one, it is marked as
   saving, quietly, and a refused write gets a notice that names the finding. */
.sync-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.sync-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warning-dot); animation: sync-pulse 1.2s ease-in-out infinite; }
@keyframes sync-pulse { 50% { opacity: .35; } }
.decision-current[data-state="pending"], .decision-status[data-kind="pending"] { color: var(--muted); font-style: italic; }
.history-entry.pending { opacity: .7; }
.edit-state[data-pending="true"] { border-style: dashed; }
.write-notice { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; background: var(--removed-bg); color: var(--removed); border: 1px solid var(--removed); padding: 8px 8px 8px 14px; border-radius: 8px; font-size: 12px; line-height: 1.5; z-index: 50; box-shadow: 0 8px 30px var(--shadow); }
.write-notice p { margin: 0; flex: 1; }
.write-notice .button { color: var(--ink); white-space: nowrap; }
.write-notice-close { font-size: 20px; width: 32px; height: 32px; color: inherit; }
/* The Client view docks the write notice at the top of the review
   panel, under the tabs and in the flow, so it covers neither the walk
   nor the tabs (Stephen, 2026-11-05, hw-fswv.14.28). clientshell.js moves
   it there. */
body[data-desk="client"] #inspector-body > .write-notice { position: static; transform: none; width: auto; max-width: none; margin: 10px 16px 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { :root:not([data-motion="full"]) .sync-status::before { animation: none; } }
:root[data-motion="reduced"] .sync-status::before { animation: none; }
@media (max-width: 650px) {
  .sync-status { font-size: 0; gap: 0; }
  .write-notice { top: 56px; flex-wrap: wrap; }
}
@media (pointer: coarse) { .write-notice .button, .write-notice-close { min-height: 44px; min-width: 44px; } }


/* Marker colors in Preferences: one row per ruling state with a sample
   marker drawn from the same properties as the page, a swatch that opens
   the color picker, and Reset. */
.marker-colors { display: grid; gap: 8px; }
.marker-color-list { display: grid; }
.marker-color-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "name sample swatch reset"; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.marker-color-name { grid-area: name; font-size: 13px; }
.marker-color-row.custom .marker-color-name::after { content: "Custom"; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 650; letter-spacing: .04em; color: var(--accent); background: var(--accent-soft); vertical-align: 1px; }
.marker-sample { grid-area: sample; position: relative; display: block; width: 114px; height: 30px; }
.sample-page { position: absolute; left: 0; top: 0; width: 46px; height: 30px; background: #fff; border-radius: 2px; box-shadow: 0 1px 3px var(--shadow), 0 0 0 1px var(--line); }
.sample-outline { position: absolute; left: 8px; top: 10px; width: 28px; height: 10px; border: 1px dashed var(--marker-outline); border-radius: 2px; }
.sample-leader { position: absolute; left: 37px; top: 15px; width: 17px; height: 1px; background: var(--marker); }
.sample-leader::before { content: ""; position: absolute; left: 0; top: 0; width: 9px; height: 100%; background: var(--marker-outline); }
.sample-badge { position: absolute; top: 2px; left: 54px; width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; background: var(--marker-badge); color: var(--marker); box-shadow: 0 0 0 1px var(--marker); }
.sample-badge.selected { left: 88px; background: var(--marker); color: var(--marker-ink); box-shadow: none; }
.marker-color-swatch { grid-area: swatch; display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 11px 4px 5px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--surface); transition: border-color 120ms ease, box-shadow 120ms ease; }
.marker-color-swatch code { font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); min-width: 7ch; text-align: left; }
.marker-color-swatch[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.swatch-dot { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); transition: background-color 120ms ease; }
.marker-color-row[data-marker-color="unruled"] .swatch-dot { background: var(--marker-unruled); }
.marker-color-row[data-marker-color="discuss"] .swatch-dot { background: var(--marker-discuss); }
.marker-color-row[data-marker-color="todo"] .swatch-dot { background: var(--marker-todo); }
.marker-color-row[data-marker-color="done"] .swatch-dot { background: var(--marker-done); }
.marker-color-row[data-marker-color="ruled"] .swatch-dot { background: var(--marker-ruled); }
.marker-color-reset { grid-area: reset; }
/* While a color is picked the scrim lightens, so the page shows it. */
dialog::backdrop { transition: background-color 200ms ease; }
#preferences-dialog.picking::backdrop { background: rgb(0 0 0 / .18); }

/* The color picker. colorpicker.js sets --hue-color, --color, --x, --y,
   and --hue. Dragging turns the thumb glide off. */
.color-pop { position: fixed; z-index: 20; width: 292px; padding: 14px; display: grid; gap: 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 48px rgb(0 0 0 / .18), 0 2px 6px rgb(0 0 0 / .08); font-size: 12px; }
.color-pop.opening { animation: color-pop-in 160ms cubic-bezier(.2, .8, .2, 1); transform-origin: top left; }
@keyframes color-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes color-sheet-in { from { transform: translateY(24px); opacity: .4; } }
.color-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.color-pop-title { margin: 0; font-size: 13px; font-weight: 650; }
.color-chips { display: inline-flex; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.color-chip-before, .color-chip-after { width: 30px; height: 20px; }
.color-chip-after { background: var(--color); }
.color-area { position: relative; height: 168px; border-radius: 8px; cursor: crosshair; touch-action: none; user-select: none; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent), var(--hue-color); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }
.color-area-thumb { position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%); width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid #fff; background: var(--color); box-shadow: 0 0 0 1px rgb(0 0 0 / .35), 0 2px 6px rgb(0 0 0 / .3); pointer-events: none; transition: left 120ms ease, top 120ms ease, transform 120ms ease; }
.color-hue { position: relative; height: 24px; cursor: pointer; touch-action: none; user-select: none; border-radius: 6px; }
.color-hue-track { position: absolute; inset: 6px 0; border-radius: 6px; background: linear-gradient(to right, #f00 0%, #ff0 16.67%, #0f0 33.33%, #0ff 50%, #00f 66.67%, #f0f 83.33%, #f00 100%); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }
.color-hue-thumb { position: absolute; top: 50%; left: calc(var(--hue) * 100%); width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid #fff; background: var(--hue-color); box-shadow: 0 0 0 1px rgb(0 0 0 / .35), 0 2px 6px rgb(0 0 0 / .3); pointer-events: none; transition: left 120ms ease, transform 120ms ease; }
.color-pop.dragging .color-area-thumb, .color-pop.dragging .color-hue-thumb { transition: none; transform: scale(1.15); }
.color-area:focus-visible, .color-hue:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.color-hex { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 10px; }
.color-hex label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.color-hex-input { width: 100%; padding: 6px 9px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.color-hex-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.color-hex-input[aria-invalid="true"] { border-color: var(--removed); box-shadow: 0 0 0 3px var(--removed-bg); }
.color-hex-hint { grid-column: 2; font-size: 11px; color: var(--removed); }
.color-hex-hint:empty { display: none; }
.color-swatch-group { display: grid; gap: 6px; }
.color-group-label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.color-swatches { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.color-swatch { aspect-ratio: 1; min-width: 0; padding: 0; border-radius: 50%; background: var(--swatch) !important; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .16); transition: transform 120ms ease, box-shadow 120ms ease; }
.color-swatch:hover { transform: scale(1.12); }
.color-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.color-checks { list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.color-checks li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.color-check-mark { width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: var(--surface); background: var(--added); }
.color-checks .warn .color-check-mark { background: var(--warning-dot); }
.color-check-ratio { font-variant-numeric: tabular-nums; color: var(--muted); }
.color-checks .warn .color-check-ratio { color: var(--warning); font-weight: 600; }
.color-verdict { margin: 0; color: var(--muted); }
.color-verdict:empty { display: none; }
.color-verdict[data-state="warn"] { padding: 6px 9px; border-radius: 6px; color: var(--warning); background: var(--subtle); box-shadow: inset 3px 0 0 var(--warning-dot); }
.color-pop-actions { display: flex; align-items: center; gap: 8px; }
.color-pop-actions .button { min-height: 32px; white-space: nowrap; padding: 6px 10px; }
.color-pop-actions .primary { min-width: 72px; font-size: 12px; }
/* Phones: the picker is a sheet along the bottom of the screen. */
@media (max-width: 600px) {
  .marker-color-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name reset" "sample swatch"; row-gap: 6px; }
  .color-pop { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 88dvh; overflow: auto; border-radius: 16px 16px 0 0; border-bottom: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .color-pop.opening { animation-name: color-sheet-in; animation-duration: 200ms; }
  .color-area { height: 200px; }
}
/* Touch screens: every control takes taps across 44 points. */
@media (pointer: coarse) {
  .color-hue { height: 44px; }
  .color-hue-track { inset: 14px 0; }
  .color-hue-thumb { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
  .color-area-thumb { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
  .color-swatches { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
  .color-swatch { min-height: 44px; }
  .color-hex-input { font-size: 16px; min-height: 44px; }
  .color-pop-actions .button, .marker-color-swatch, .marker-color-reset, #marker-colors-reset-all { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { :root:not([data-motion="full"]) .color-pop.opening { animation: none; } }
:root[data-motion="reduced"] .color-pop.opening { animation: none; }
/* The ruling tally: a status panel at the foot of the review panel. Its
   head, Rulings with the total, folds it and opens it, and open, the head
   ends with the scope toggle. A row under the head holds one count per
   ruling state in the marker colors and the total. When the review panel folds, the tally runs
   down the panel's strip as a column of counts. See renderTally in
   app.js. */
.tally { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.tally[hidden] { display: none; }
.tally-counts { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; flex: 1 1 100%; min-width: 0; }
.tally[data-open="false"] :is(.tally-counts, .tally-scope, .tally-mode) { display: none; }
.tally-counts[hidden] { display: none; }
/* With a filter set and the funnel on, the filter's count sits beside the
   whole count, smaller and muted, in parentheses (hw-5x0n.30.205). */
.tally-f { margin-left: 3px; font-size: .85em; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.tally-f::before { content: "("; }
.tally-f::after { content: ")"; }
.tally-f[hidden] { display: none; }
/* The Across proofs toggle sits beside the scope toggle in the head. */
.tally .tally-mode { margin-left: auto; color: var(--muted); }
.tally .tally-mode:not([hidden]) + .tally-scope { margin-left: 0; }
.panel-strip .tally .tally-mode { display: none; }
.tally-counts { order: 1; }
.tally button { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 7px; border: 1px solid var(--line); border-radius: 13px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.tally button[hidden] { display: none; }
.tally button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.tally-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--tally-color); }
.tally-count[data-color="unruled"] { --tally-color: var(--marker-unruled); }
.tally-count[data-color="discuss"] { --tally-color: var(--marker-discuss); }
.tally-count[data-color="todo"] { --tally-color: var(--marker-todo); }
.tally-count[data-color="done"] { --tally-color: var(--marker-done); }
.tally-count[data-color="ruled"] { --tally-color: var(--marker-ruled); }
/* Done and Keep as printed share the marker's green. Done's dot is a ring
   with a dot inside, so the two read apart. */
.tally-count[data-tally="done"] .tally-dot { background: none; box-shadow: inset 0 0 0 2px var(--tally-color); position: relative; }
.tally-count[data-tally="done"] .tally-dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--tally-color); }
.tally .tally-scope { margin-left: auto; color: var(--muted); }
.tally-scope svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.tally-scope[aria-pressed="true"] svg { fill: currentColor; fill-opacity: .25; }
.tally .tally-expand { border-color: transparent; padding-left: 4px; }
.tally .tally-expand .tally-word { font-weight: 600; }
.tally-chevron { font-size: 10px; color: var(--muted); }
.tally-expand[aria-expanded="true"] .tally-chevron { transform: rotate(180deg); }
/* Folded, the counts stack down the strip, with the total and the funnel
   alone of the scope toggle. */
.panel-strip .tally { flex-direction: column; padding: 4px 0 0; border-bottom: 0; border-top: 1px solid var(--line); background: none; }
.panel-strip .tally-counts { flex-direction: column; flex-wrap: nowrap; flex: none; }
.panel-strip .tally .tally-expand { padding: 3px 0; border-color: var(--line); }
.panel-strip .tally button { flex-direction: column; justify-content: center; gap: 2px; width: 36px; height: auto; min-height: 34px; padding: 3px 0; border-radius: 7px; font-size: 11px; }
.panel-strip .tally .tally-word { display: none; }
.panel-strip .tally .tally-scope { margin-left: 0; order: 2; }
/* Under the navigation, by the Rulings panel position preference, the
   tally's rule moves to its foot, against the evidence below it. */
.inspector > .tally[data-position="top"] { border-top: 0; border-bottom: 1px solid var(--line); }
@media (pointer: coarse) {
  .tally button { height: auto; min-height: 44px; padding: 0 10px; border-radius: 22px; }
  .panel-strip .tally button { min-height: 44px; }
  /* 44-point counts would make the folded strip scroll, so a touch screen
     folds the tally there to its total until tapped. See tallyInStrip. */
}
/* Phones and short screens start with the tally folded, so the decision
   area keeps its room. The folded strip along a phone's bottom has no room
   for it. */
@media (max-width: 650px), (max-height: 520px) {
  .tally { padding: 4px 8px; }
  .panel-strip .tally { display: none; }
}
@media (max-height: 520px) and (min-width: 651px) {
  .panel-strip .tally { display: none; }
}

/* Nothing in the toolbar is ever cut off. A toolbar too narrow for one
   row wraps instead of hiding its end. From 701 to 860 pixels of page
   width, as on an iPad in landscape or a 1280 pixel laptop, the editor's
   toolbar no longer fits one row, so Filters, Findings, and Markers move
   together to a second row. */
.document-tools { flex-wrap: wrap; height: auto; row-gap: 6px; }
@container (min-width: 701px) and (max-width: 860px) {
  .document-tools { min-height: 0; overflow: visible; row-gap: 3px; padding-bottom: 2px; }
  .document-tools .grow { flex-basis: 100%; height: 0; }
  .list-controls { margin-left: auto; }
  /* The first row keeps the single row's height, so it stays on the
     review panel's center line. */
  .document-tools > .page-nav { min-height: 36px; }
}
/* Phones and tablets show Filters and Findings as icons. */
.tool-icon { display: none; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* A phone's toolbar is one row: the page arrows and label, the zoom, then
   Filters and Findings as icons with their counts. Their names stay for
   screen readers. A row too narrow for them all, with a long page label
   and big counts, puts Filters and Findings on a second row instead of
   past the screen's edge (hw-59nc). */
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .document-tools, body[data-role="reviewer"].focus .document-tools { flex-wrap: wrap; overflow: visible; gap: 6px; }
  .document-tools .toolbar-divider { display: none; }
  .list-controls { margin-left: auto; gap: 4px; }
  .list-controls .button { gap: 4px; padding: 5px 8px; }
  .list-controls .tool-icon { display: block; }
  .list-controls .tool-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* A phone keeps the page name and the zoom label, which is the fit toggle.
   Two fingers zoom the page. */
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .document-tools { gap: 2px; }
  .page-nav #page-position .dim, .page-nav #page-position .page-review, #zoom-out, #zoom-in { display: none; }
  .zoom-group .zoom-fit { min-width: 0; }
}
/* On a phone whose page area is 500 points wide or less, as on an iPhone
   in portrait or held sideways beside the review panel, the zoom label is
   a magnifier, still named for the zoom it shows. The page and zoom
   buttons keep their 44 point height and give up some width, as the
   review panel's finding buttons do, and Filters and Findings pack
   closer, so a four-digit page and counts keep the toolbar to one row
   (hw-59nc). The Pages button opens the pages overlay and keeps its 44
   point target (hw-59nc.1). The page area is the container. */
.zoom-icon { display: none; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  @container (max-width: 500px) {
    .zoom-group .zoom-fit .zoom-icon { display: block; }
    .zoom-group .zoom-fit #zoom-value { display: none; }
    .document-tools .tool-group button { min-width: 36px; }
    .document-tools .tool-group #pages-open { min-width: 44px; }
    .list-controls { gap: 2px; }
    .list-controls .button { padding: 5px 6px; }
  }
}
/* Under 400 pixels of height the filter bar takes no room. Unfolded, it
   lies over the top of the page, under the toolbar. */
@media (max-height: 400px) {
  .filter-bar { position: absolute; top: 100%; left: 0; z-index: 26; --filter-inset: 0px; margin: 0; padding: 6px 12px 8px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 6px 16px var(--shadow); }
}
/* A phone's filters panel stops at the room it has, and its rows scroll
   inside, under Saved, Builder, and Code (hw-5x0n.30.141). The panel is
   a flex column here, since WebKit lets a grid's rows run past a shrunk
   grid. In the page area's column the page gives up its room first, so
   the panel ends at the top of the review panel. The panel itself never clips, because its
   lists open inside it. */
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .tools-wrap { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; }
  .document-tools { flex: none; }
  .filter-bar { display: flex; flex-direction: column; align-items: stretch; align-self: flex-start; flex: 0 1 auto; gap: 6px; min-height: 0; }
  .filter-side, .filter-error { flex: none; }
  .filter-side { order: -1; }
  .filter-main { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}
/* When the panel holds all of the page's room on a phone, the page area
   keeps only its bottom padding, and the page would show through it as a
   strip under the panel. The page area is a size container on a phone,
   and the page hides when it has no room to speak of (hw-5x0n.30.148). */
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .canvas-scroll { container: page-room / size; }
}
@container page-room (max-height: 24px) {
  .page-stage { visibility: hidden; }
}
/* Over the page, the panel stops at the bottom of the page area: the
   area's height less the toolbar's, which is the panel's containing
   block. */
@media (max-height: 400px) and (max-width: 1000px) {
  .document-area { container-type: size; }
  .filter-bar { max-height: calc(100cqh - 100% - 4px); }
}
/* Filters panel layout (hw-5x0n.30.206, Dan's desk note c5dd95).
   Floating lies over the page view, under the toolbar on the side that
   Filters panel side sets, so opening it never moves, resizes, or
   scrolls the page. The tools row is a flex item, so the toolbar's
   margin stays inside it and top: 100% puts the panel where the flow
   did. Out of the flow its width is its widest row, still capped at the
   page area, since app.js's shift would otherwise narrow it. It stops
   at the bottom of the page area, its rows scrolling inside. Fixed is a bar across
   the page area under the toolbar: Saved, Builder, and Code lead one
   wrapping row, the filters follow beside them when they fit and on the
   next line when not, and the filters run in rows across the width, so
   the bar is as short as it can be. It moves the page down by its
   height. A phone keeps Saved, Builder, and Code over the filters, which
   still share rows. Under 400 pixels of height both lie over the page, as
   before. */
body[data-filter-layout="floating"] .filter-bar { position: absolute; top: 100%; z-index: 26; width: max-content; box-shadow: 0 10px 30px var(--shadow); }
/* Where the page area is at least 820 pixels wide, as on a desktop, the
   floating panel is at least 760 pixels wide, in Builder and Code alike, so a long Code query
   wraps a clause at a time and Code keeps the Builder's width
   (hw-5x0n.30.224, Stephen's 760 px in hw-5x0n.30.201, hw-5x0n.30.198).
   Builder and Code still end the first row. The page area is the
   container, so 760 pixels always fit under the Filters, Findings, and
   Markers buttons. A narrower page area, as on a tablet or phone, keeps
   the panel as wide as its widest row. */
@container (min-width: 820px) {
  body[data-filter-layout="floating"] .filter-bar { min-width: min(760px, 100% - 2 * var(--filter-inset)); }
  body[data-filter-layout="floating"] .filter-mode { margin-left: auto; }
}
body[data-filter-layout="fixed"] .filter-bar { display: flex; flex-wrap: wrap; align-items: flex-start; width: auto; }
body[data-filter-layout="fixed"] .filter-side { flex: none; order: -1; min-height: 30px; }
body[data-filter-layout="fixed"] .filter-main { flex: 1 1 auto; }
body[data-filter-layout="fixed"] .filter-error { flex: 1 1 100%; }
body[data-filter-layout="fixed"] .filter-chips { flex-direction: row; flex-wrap: wrap; align-items: center; }
/* A tall floating panel stops at the bottom of the page area on every
   screen, and its rows scroll inside, under Saved, Builder, and Code
   (hw-5x0n.30.224). The page area is a size container, and the panel a
   flex column, as on a phone, since WebKit lets a grid's rows run past a
   shrunk grid. Its lists open from the panel, outside the rows that
   scroll, so they are never cut off. */
body[data-filter-layout="floating"] .document-area { container-type: size; }
body[data-filter-layout="floating"] .filter-bar { max-height: calc(100cqh - 100%); display: flex; flex-direction: column; align-items: stretch; }
body[data-filter-layout="floating"] .filter-side { order: -1; flex: none; }
body[data-filter-layout="floating"] .filter-error { flex: none; }
body[data-filter-layout="floating"] .filter-main { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  body[data-filter-layout="fixed"] .filter-bar { flex-wrap: nowrap; align-items: stretch; align-self: stretch; }
}
@media (max-height: 400px) {
  body[data-filter-layout="fixed"] .filter-bar { right: 0; }
}
/* The Walk menu button and Add note show only on a phone. */
.walk-menu, .note-add { display: none; }
/* A phone's open review panel keeps its 58 percent, so its fixed rows
   compact until the evidence shows the finding's heading and the
   suggested change without scrolling the document. The header is one row:
   the Walk order and Follow the page fold into a menu at its end. The
   decision is two rows: the ruling buttons, then Add note, which opens
   the note. An empty save status takes no room. Rulings is a chip at the top of the evidence, and
   the Evidence and History tabs follow the evidence. See renderPanel and
   syncNote in app.js. */
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .inspector { position: relative; }
  .inspector-top { position: relative; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "edge nav menu"; padding: 4px; }
  /* Seven finding buttons, Back's divider, 1764/1764, Undo, and the menu
     share one row on a 375 point phone. Undo gives up its divider there
     (hw-fswv.14.5). */
  .inspector-top .panel-nav button { min-width: 30px; }
  .inspector-top .panel-nav .nav-divider { margin: 0 3px; }
  .inspector-top .panel-nav .nav-divider:has(+ .walk-undo) { display: none; }
  .inspector-top .walk-menu { grid-area: menu; display: grid; place-items: center; min-width: 40px; min-height: 44px; color: var(--muted); }
  .inspector-top .walk-menu[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
  .inspector-top .walk-menu svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .inspector-top .walk-row { display: none; position: absolute; top: 100%; right: 4px; z-index: 30; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px var(--shadow); }
  .inspector-top.walk-open .walk-row { display: flex; }
  .inspector-top .walk-row .follow-page { margin-left: 0; justify-content: space-between; }
  .inspector-body { padding: 4px 16px 8px; }
  #candidate-detail:not([hidden]) { display: flex; flex-direction: column; }
  #candidate-detail .mode-tabs { order: 1; margin: 12px -16px 0; }
  #candidate-detail .history-content { order: 2; }
  .candidate-heading { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
  .candidate-heading h2 { order: 1; flex: 1 1 100%; font-size: 20px; margin: 2px 0 0; }
  .candidate-heading .finding-facts-row { order: 2; flex: 1 1 100%; margin: 2px 0 0; }
  .candidate-heading > p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .evidence-content .section-heading { margin-top: 6px; margin-bottom: 0; }
  .evidence-content :is(.target-quote, .source-quote) { line-height: 1.45; }
  /* The closed tally is a chip over the body's top right corner, not a
     float, so the finding's detail, a flex box that a float would narrow
     for its whole height, keeps the panel's width. Only the status and
     location line ends short of it, by --tally-room, which syncChipRoom
     in app.js measures. The location moves to the next line when it does
     not fit beside the status, and the Similar link and the tags under it
     each take a line of their own that ends short of the chip too
     (hw-5x0n.30.197.2.2). */
  .inspector-body { position: relative; }
  .inspector-body > .tally { position: absolute; top: 0; right: 4px; z-index: 1; margin: 0; padding: 0; border: 0; background: none; }
  .inspector-body > .tally[data-open="true"] { position: static; margin: 0 0 6px; }
  .candidate-heading > #candidate-location { margin-right: var(--tally-room, 0px); }
  .candidate-heading > :is(.similar-link, .pair-line, .added-tag, .rename-tag, .added-actions) { flex: 0 1 100%; margin-right: var(--tally-room, 0px); }
  .decision-area { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 16px; }
  .decision-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ruling-buttons { flex: 1 1 100%; margin-top: 0; }
  .rule-button { min-height: 44px; padding: 4px 8px; }
  .decision-area .note-add { display: inline-flex; order: 1; flex: none; }
  .decision-area[data-note="open"] .note-add { display: none; }
  .decision-area[data-note="closed"] .decision-note { display: none; }
  .decision-area .decision-note { order: 2; flex: 1 1 100%; margin-top: 0; }
  .decision-status { order: 2; flex: 1 1 100%; margin: 0; }
  .decision-status:empty { min-height: 0; margin: -6px 0 0; }
  .note-state { order: 2; flex: 1 1 100%; margin: 0; }
}
/* On a phone in portrait the editor desk's four ruling buttons, two to a
   row, and Add note under them pushed the suggested change out of the
   panel's first view on an iPhone SE (hw-fswv.4). The buttons sit three
   to a row, as the three always did, and To correct shares the second row
   with Add note, so the area is no taller than before the fourth button.
   The group lends its buttons to the decision area's row. */
@media (max-width: 650px) and (min-height: 521px) {
  .ruling-buttons:has(> .rule-button:nth-child(4)) { display: contents; }
  .ruling-buttons:has(> .rule-button:nth-child(4)) > .rule-button { flex: 0 0 calc((100% - 12px) / 3); }
}
/* A phone held sideways has room for one row of ruling buttons under the
   evidence, so the buttons tighten and a name wraps only between words,
   keeping the suggested change in the panel's first view (hw-5x0n.30.217). */
@media (max-height: 520px) and (max-width: 1000px) {
  .rule-button { gap: 4px; padding: 2px 6px; font-size: 11px; }
  .rule-button .rule-name { overflow-wrap: normal; }
  .rule-button kbd { padding: 0 2px; }
  .ruling-buttons:has(> .rule-button:nth-child(4)) > .rule-button { flex-basis: 0; }
}
/* On phones and tablets the ruling buttons share a 316 to 361 pixel row,
   where Corrected and a pressed Needs discussion broke mid-word on an
   iPhone SE, an iPhone 14, and an iPad in portrait (hw-5x0n.30.245). The
   buttons keep their type and height and give the name the room of a
   tighter gap, side padding, and key cap. In a row under 320 pixels, an
   iPad's in portrait, the key cap steps aside: the key still works, and
   Keyboard shortcuts lists it. */
@media (max-width: 1000px) {
  .rule-button { gap: 4px; padding-left: 6px; padding-right: 6px; }
  .rule-button kbd { padding: 0 2px; }
}
@container rulings (max-width: 319px) {
  .rule-button kbd { display: none; }
}
/* A Client on a touch screen with no hover, a phone or a tablet, has no
   keyboard to press a key cap's key, so Approve and Reject leave their
   key caps out (hw-fswv.14.14). The keys still work with a keyboard. */
@media (hover: none) and (pointer: coarse) {
  body[data-desk="client"] .rule-button kbd { display: none; }
}

/* Compact density (hw-5x0n.30.112.7): the review panel, the Findings list,
   the Pages list, and their rows take less room, for a screen with a mouse.
   A touch screen keeps its full-size targets, and a phone keeps its own
   tight layout. html[data-density] comes from the Density preference. See
   applyLook in app.js. */
@media (pointer: fine) and (min-width: 651px) and (min-height: 521px) {
  :root[data-density="compact"] .inspector-top { padding: 10px 20px 6px; }
  :root[data-density="compact"] .inspector-body { padding: 14px 20px 12px; }
  :root[data-density="compact"] .candidate-heading h2 { font-size: 20px; margin: 4px 0 3px; }
  :root[data-density="compact"] .mode-tabs { gap: 16px; margin: 14px -20px 12px; padding: 0 20px; }
  :root[data-density="compact"] .mode-tabs button { padding: 7px 0; }
  :root[data-density="compact"] .section-heading { margin-top: 16px; margin-bottom: 6px; }
  :root[data-density="compact"] .source-heading { margin-top: 16px; }
  :root[data-density="compact"] :is(.target-quote, .source-quote) { font-size: 14px; line-height: 1.55; }
  :root[data-density="compact"] .evidence-list li + li { margin-top: 4px; }
  :root[data-density="compact"] .history-content { margin-top: 14px; }
  :root[data-density="compact"] .history-entry { margin-bottom: 6px; line-height: 1.5; }
  :root[data-density="compact"] .decision-area { padding: 10px 20px 8px; }
  :root[data-density="compact"] .decision-status { margin-top: 4px; }
  :root[data-density="compact"] .candidate-row { gap: 8px; padding: 6px 8px; }
  :root[data-density="compact"] .candidate-row small { margin-top: 1px; }
  :root[data-density="compact"] .candidate-section h4 { margin: 8px 8px 1px; }
  :root[data-density="compact"] details.candidate-section > summary h4 { margin: 0; }
  :root[data-density="compact"] .rail { gap: 10px; padding-top: 10px; }
  :root[data-density="compact"] .thumbnails { gap: 6px; }
}

/* View as. The banner sits above the app bar on the desk and above the
   title on the Client page, one line at every width, with Return always in
   reach: the sentence shrinks and ends in an ellipsis, the button never
   does. */
.view-banner { flex: none; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 3px 12px; background: var(--accent-soft); color: var(--accent); border-bottom: 1px solid var(--accent); font-size: 13px; font-weight: 550; position: relative; z-index: 31; }
.view-banner-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-banner-return { flex: none; min-height: 28px; padding: 3px 10px; }
.client-page .view-banner { position: sticky; top: 0; z-index: 3; height: 36px; box-sizing: border-box; }
.client-page:has(.view-banner:not([hidden])) .client-bar { top: 36px; }
.viewas-options { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.viewas-options label { display: inline-flex; align-items: center; gap: 8px; }
.viewas-deletes { flex-wrap: wrap; }
/* Indexes: the hymnal indexes in the desk's Index package and on the
   Client page (hw-74b9.5). One entry per row, its text on the left and its hymn
   numbers on the right, the way the printed index sets them. First lines
   and source titles are italic, as the book sets them. */
.indexes-root { display: grid; gap: 10px; padding: 14px 20px 20px; font-size: 13px; min-width: 0; }
.indexes-about { margin: 0; font-size: 12px; color: var(--muted); }
.indexes-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.indexes-tab { font: inherit; font-size: 12px; padding: 6px 12px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.indexes-tab[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.indexes-tools { display: grid; gap: 8px; position: sticky; top: 0; z-index: 1; padding: 6px 0; background: var(--surface); }
/* The head holds the tabs and the tools. On the Client page it leaves
   its parts laid out as before, the tools sticky alone. On the desk the
   whole head sticks at the top of the list's scroller, on the Index and
   Changes tabs, so the index tabs and the search stay in view however
   far the list scrolls (hw-74b9.32.20.26). Its height, kept in
   --index-head by a ResizeObserver, is the scroller's scroll-padding, so
   focus and a scroll into view land a row below it; bring() in
   indexesview.js reads the height itself at each jump. */
.indexes-head { display: contents; }
.index-main .indexes-head { display: grid; gap: 8px; position: sticky; top: 0; z-index: 3; padding: 6px 0 8px; background: var(--surface); }
.index-main .indexes-tools { position: static; padding: 0; }
.index-main .indexes-head .idiff-chips { margin: 0; }
.index-main .indexes-entry, .index-main .indexes-heading, .index-main .ichg-index, .index-main .ichg-card { scroll-margin-top: 8px; }
.indexes-search { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); min-width: 0; }
.indexes-jump { display: flex; flex-wrap: wrap; gap: 4px; }
.indexes-stop { font: inherit; font-size: 12px; min-width: 28px; min-height: 26px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--subtle); color: var(--accent); cursor: pointer; }
/* In the desk's list header, with the rail folded, the jump bar is one
   row that scrolls sideways, so a metrical index's one stop per meter
   never wraps into rows that take the list's height (hw-74b9.32.20.27). */
.index-main .indexes-jump { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 2px; }
.index-main .indexes-stop { flex: none; white-space: nowrap; }
.indexes-count { margin: 0; font-size: 12px; color: var(--muted); }
/* The input a tab's run went without, as no credit claims for the sources
   index (hw-bojh.1): a note above the list, in the warning color. */
.indexes-missing { margin: 4px 0; padding: 6px 10px; font-size: 13px; border: 1px solid var(--warning-dot); border-radius: 6px; color: var(--warning); background: var(--subtle); }
.indexes-missing[hidden] { display: none; }
.indexes-open-questions { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--subtle); }
.indexes-open-questions summary { cursor: pointer; font-weight: 600; font-size: 12px; }
.indexes-open-questions ul { margin: 6px 0 2px; padding-left: 18px; display: grid; gap: 4px; }
.indexes-list { list-style: none; margin: 0; padding: 0; display: grid; }
.indexes-heading h3 { margin: 12px 0 4px; font-size: 14px; padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.indexes-entry { padding: 3px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 140px; }
.indexes-heading { scroll-margin-top: 140px; }
.indexes-line { display: flex; align-items: baseline; gap: 8px; }
.indexes-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.indexes-entry[data-style="first_line"] .indexes-text { font-style: italic; }
/* A source entry is italic only in the run its export brackets (Dan, 2026-10-09). */
.indexes-italic { font-style: italic; }
.indexes-entry[data-blank="true"] .indexes-text { color: var(--muted); }
/* Wrapped lines of hymn numbers get more leading (Dan, desk note 260aec,
   hw-45dk.7). The negative margin takes the extra half-leading back off the
   first and last line, so a one-line row keeps its height. */
.indexes-numbers { flex: none; max-width: 45%; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.7; margin-block: -0.25em; }
.indexes-number { font: inherit; padding: 0 2px; border: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.indexes-number:hover { color: var(--button-hover); }
.indexes-number-plain { color: var(--muted); }
.indexes-more { flex: none; font: inherit; width: 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); cursor: pointer; line-height: 1; }
.indexes-notes { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 2px 30px; font-size: 11px; }
.indexes-cross-list { display: contents; }
.indexes-cross { font: inherit; padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; text-decoration: underline; }
.indexes-flag { padding: 0 6px; border-radius: 999px; border: 1px solid var(--warning-dot); color: var(--warning); }
.indexes-refs { margin: 2px 0 4px 30px; padding: 0; list-style: none; font-size: 12px; color: var(--muted); display: grid; gap: 2px; }
.indexes-target { background: var(--accent-soft); }
.indexes-number:focus-visible, .indexes-stop:focus-visible, .indexes-tab:focus-visible, .indexes-more:focus-visible, .indexes-cross:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* Left out (hw-74b9.33.6): the lines the generator left out, a folded
   group after each index's list. Their words are muted until restored,
   the reason is a neutral chip, and a restored line says so in the added
   color. The rows line up with the entries, past the + column. */
.indexes-leftout { margin-top: 22px; }
.indexes-leftout > summary { cursor: pointer; font-weight: 650; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.indexes-leftout-note { margin: 6px 0 4px; font-size: 12px; color: var(--muted); }
.indexes-leftout .indexes-line { align-items: center; gap: 8px; padding-left: 30px; }
.indexes-leftout .indexes-text { color: var(--muted); }
.indexes-leftout-restored .indexes-text { color: inherit; }
.indexes-leftout-why { padding: 0 6px; border-radius: 999px; border: 1px solid var(--muted); color: var(--muted); }
.indexes-leftout-state { color: var(--added); }
.indexes-leftout-act { flex: none; min-height: 24px; padding: 2px 9px; font-size: 12px; }
.indexes-leftout-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0 6px 30px; }
.indexes-leftout-line { flex: 1 1 240px; min-width: 0; font: inherit; font-size: 13px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: inherit; }
.indexes-leftout-problem { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--warning); }
.ichg-restored { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); font-size: 13px; }
.ichg-restored-show { min-height: 22px; padding: 1px 8px; font-size: 12px; }
/* Generate: the editor and operator run the generator for a proof
   (hw-74b9.6). */
.indexes-generate { border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); font-size: 13px; }
.indexes-generate > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; font-size: 13px; }
.indexes-generate-body { display: grid; gap: 6px; padding: 0 12px 10px; }
.indexes-generate-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.indexes-generate select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); min-width: 0; max-width: 100%; }
.indexes-generate-status { margin: 0; font-size: 12px; color: var(--muted); min-height: 1.2em; }
.indexes-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); font-size: 13px; }
.indexes-share[data-shared="true"] { border-color: var(--accent); }
.indexes-share-status { margin: 0; flex: 1 1 16em; }
.indexes-runs-wrap summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.indexes-runs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; max-height: 180px; overflow: auto; }
.indexes-run { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.indexes-run[data-state="failed"] > span { color: var(--removed); }
.indexes-run[data-state="running"] > span { color: var(--warning); }
.index-head > .indexes-status { margin: 0; }
.index-head > .indexes-status:empty { display: none; }
/* The Index package (hw-74b9.32.1). The bar's two tabs switch the whole
   workspace under the bar; the bar stays. The Review package's regions
   keep their layout under the Index package, only unseen, so nothing in
   them resizes, scrolls, or loses state, and the index workspace lies
   over them, under the bar and its menu. Its column pins the toolbar,
   the list header, and the status line above one scroller that holds
   the indexes under their sticky tabs and search (hw-74b9.32.21). The
   Generations popover lies over the scroller with the share line and
   Generate. Nothing else in the Index package scrolls but the rail's
   jump list and its lists: the window drops its minimum height there, and
   the scroller lets the wheel chain. The selected
   tab reads "... package" and is underlined in the accent, like the
   review panel's tabs; the other is one word. */
.mode-switch { display: flex; align-items: stretch; gap: 4px; height: 30px; }
.mode-tab { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 11px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; white-space: nowrap; cursor: pointer; }
.mode-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.mode-tab:focus-visible { outline-offset: -2px; }
.mode-icon { display: none; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; }
.workspace > .index-workspace { position: absolute; inset: 0; z-index: 29; display: flex; min-height: 0; background: var(--ground); }
.workspace > .index-workspace[hidden] { display: none; }
body[data-mode="index"] .workspace > :not(.index-workspace) { visibility: hidden; }
/* The key notice and the pending-chord hint sit in the Review package's
   area but speak for the keys in both, so they show over the Index
   package too (hw-5x0n.30.233.13). */
body[data-mode="index"] #key-notice, body[data-mode="index"] #key-hint { visibility: visible; }
/* The bar and menu controls that act on the hidden Review package leave
   with it and come back in Review: Focus, in the bar and as Show's Focus
   row, Presets, Add an edit, and Withdrawn edits, whose Show and Restore
   act on the review's findings (hw-74b9.32.12). Show itself stays, since
   it lists the Index package's own regions there. Every other menu item
   is the desk's own and stays. */
body[data-mode="index"] :is(#focus-toggle, .region-focus, #add-edit-menu, #edits-open) { display: none; }
body[data-mode="index"] .app { min-height: 0; }
/* The Index package is a fixed frame, as the Review package is: only the
   list and the rail scroll. The frame clips whatever grows past it, so the
   page never gets room to scroll, and the root takes no wheel
   (hw-74b9.32.23). Fixed parts, such as the phone's row
   bar and composer sheet, sit on the viewport and are not clipped. */
body[data-mode="index"] .app { overflow: clip; }
:root:has(body[data-mode="index"]) { overflow: hidden; }
.index-column { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
/* The page column (hw-uq6s.25.5): what reads as a page sits in a column
   of --page-max, 920 pixels, centered, with --page-pad inside each edge.
   It is padding, not a width, so a head's border and background and a
   scroller's scrollbar still run the whole width. The index's head and
   list and the Rights head share it. Padding in percent reads the
   containing block's width, so a scroller beside a card, as the Rights
   list is, takes .page-column-rows instead: each child keeps to the
   column, the list's own width when narrower. A Rights workspace with
   data-wide="true" lifts both, and keeps only the edge padding. */
:root { --page-max: 920px; }
.page-column { padding-inline: max(var(--page-pad, 24px), calc((100% - var(--page-max)) / 2 + var(--page-pad, 24px))); }
.page-column-rows > * { max-width: var(--page-max); margin-inline: auto; }
.rights-workspace[data-wide="true"] .page-column { padding-inline: var(--page-pad, 24px); }
.rights-workspace[data-wide="true"] .page-column-rows > * { max-width: none; }
/* The Rights views hold a table and a bar of nine controls, so their
   column is wider than the index's: 1080 keeps the bar on one line at
   1280 pixels and up. --rights-card is the card's width beside the list. */
.rights-workspace { --page-max: 1080px; --rights-card: min(460px, 46%); }
/* A holder card is a reader, so it takes more of the width than a title
   card (hw-wfrm.64.2, Stephen's Q7); w still gives the full width. */
.rights-workspace[data-card-kind="holder"] { --rights-card: min(560px, 50%); }
/* With a card open beside the list, the head keeps to the list's column,
   in the room left of the card, so the head's words stay over the rows'. */
.rights-workspace[data-card="side"] .rights-head.page-column {
  --rights-head-start: max(var(--page-pad, 24px), calc((100% - var(--rights-card) - var(--page-max)) / 2 + var(--page-pad, 24px)));
  padding-inline: var(--rights-head-start) calc(var(--rights-card) + var(--rights-head-start));
}
.rights-workspace[data-card="side"][data-wide="true"] .rights-head.page-column { --rights-head-start: var(--page-pad, 24px); }
.index-head { flex: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-block: 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.index-head:not(:has(> :not([hidden], :empty))) { display: none; }
/* The scroller is the containing block of what sits absolutely inside
   the lists, such as .sr-only words, so their overflow stays inside it
   and never gives the window room to scroll (hw-74b9.32.23). */
.index-main { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: auto; background: var(--surface); scroll-padding-top: var(--index-head, 0px); }
.index-main > .indexes-root { padding-block: 8px 32px; }
/* The Client's index entries for review, above the indexes in the Client
   view's Index package (hw-fswv.14.8, design step 7b). The old Client
   page's card, from client.css, scoped to the editor's index workspace so
   the old page keeps its own rules until it goes. */
.index-main > .client-index-review { display: grid; gap: 10px; max-width: 920px; margin: 12px auto 18px; padding: 0 12px; }
.index-main .client-index-review h2 { font-size: 16px; font-weight: 650; margin: 0; }
.index-main .client-index-count { margin: 0; font-size: 13px; color: var(--muted); }
.index-main .client-index-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.index-main .client-index-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.index-main .client-index-card[data-answer="approved"] { border-left: 4px solid var(--added); }
.index-main .client-index-card[data-answer="rejected"] { border-left: 4px solid var(--removed); }
.index-main .client-index-card header { display: grid; gap: 2px 8px; }
.index-main .client-index-card h3 { font-size: 15px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.index-main .client-index-card .where { font-size: 11px; color: var(--muted); }
.index-main .client-index-card .client-change { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.index-main .client-index-card .client-change[data-one="true"] { grid-template-columns: 1fr; }
.index-main .client-index-card .client-change span { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 3px; }
.index-main .client-index-card .client-change p { margin: 0; font-size: 15px; line-height: 1.6; white-space: pre-line; }
.index-main .client-index-card .client-change del { color: var(--removed); background: var(--removed-bg); }
.index-main .client-index-card .client-change ins { color: var(--added); background: var(--added-bg); text-decoration: none; }
.index-main .client-index-card .client-change em { color: var(--muted); font-size: 13px; }
.index-main .client-index-card .client-editor-note { margin: 12px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--subtle); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.index-main .client-index-card .client-editor-note b { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.index-main .client-index-answer { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.index-main .client-index-answer .ruling-buttons { margin-top: 0; }
.index-main .client-index-answer .rule-button { min-height: 40px; font-size: 13px; }
.index-main .client-index-answer .client-comment { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); }
.index-main .client-index-answer textarea { display: block; width: 100%; min-height: 56px; margin-top: 4px; font-size: 13px; color: var(--ink); }
.index-main .client-index-answer .client-status { margin: 6px 0 0; font-size: 12px; color: var(--muted); min-height: 1.3em; }
.index-main .client-index-answer .client-status[data-kind="refused"] { color: var(--removed); }
@media (pointer: coarse) {
  .index-main .client-index-answer .rule-button { min-height: 48px; }
}
@media (max-width: 650px) {
  .index-main .client-index-card .client-change { grid-template-columns: 1fr; }
}
/* Tablets: the bar keeps both words, and the workspace is one column. */
@media (max-width: 1000px) {
  .index-head { padding: 10px 16px; }
  .index-main > .indexes-root { --page-pad: 16px; padding-block: 8px 24px; }
}
/* Phones: the bar's tabs become two 36px icon buttons where the
   environment line was, still named Review package and Index package for
   screen readers, and the column fills the screen. */
@media (max-width: 650px) {
  .mode-switch { height: 36px; gap: 2px; }
  .mode-tab { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 6px; border-bottom: 0; }
  .mode-tab[aria-selected="true"] { background: var(--accent-soft); }
  .mode-icon { display: block; }
  .mode-word { display: none; }
  .index-main > .indexes-root { --page-pad: 12px; padding-block: 6px 16px; }
  .index-head { padding: 8px 12px; }
  .indexes-search, .indexes-generate select { font-size: 16px; }
  .indexes-numbers { max-width: 50%; }
}
@media (pointer: coarse) {
  .indexes-stop { min-width: 36px; min-height: 36px; }
  .indexes-number { padding: 6px 4px; }
  .indexes-more { width: 32px; height: 32px; }
  .indexes-tab { min-height: 40px; }
  .indexes-generate > summary { min-height: 44px; display: flex; align-items: center; }
}
/* The Index package's head and its Changes tab (hw-74b9.32.4,
   hw-74b9.32.20.2). The pinned head holds the rail's toggle, the Index
   and Changes tabs, and on Changes the generation and base pickers, which
   a phone folds behind Generations so the head stays one line. The index
   rail sits where the Pages panel sits in the Review package and holds
   the jump bar upright. Changes is a worklist of cards, one per changed
   entry, under its index and heading; a card's lines carry a glyph
   gutter, +, -, or ~, so color is never the only sign, and changed words
   are struck or underlined as well as tinted. A changed entry on the
   Index tab carries a small dot that links to its card. A phone keeps
   the rail at the list's left too, narrower (hw-74b9.32.20.27). */
.index-compare-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; }
.index-compare-bar[hidden], .index-views[hidden], .index-gens-open[hidden], .index-header[hidden], .index-gens[hidden] { display: none; }
.index-views { display: inline-flex; align-items: stretch; gap: 2px; padding: 2px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--subtle); }
.index-view { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 12px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.index-view[aria-selected="true"] { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.index-view:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.index-view-count { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.index-view-count:empty { display: none; }
.index-gens-open { display: inline-flex; align-items: center; gap: 6px; min-width: 0; min-height: 30px; margin-left: auto; padding: 2px 10px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.index-gens-open[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.index-gens-open:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.index-gens-word { color: var(--muted); }
/* Export sits beside Generations in the head (hw-74b9.39). Where
   Generations hides, Export takes the right edge itself. */
.index-export { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 30px; margin-left: auto; padding: 2px 10px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.index-gens-open:not([hidden]) + .index-export { margin-left: 0; }
.index-export[hidden] { display: none; }
/* Index options (hw-74b9.44): beside Generations, the same outline. */
.index-options-open { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 30px; padding: 2px 10px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.index-options-open[hidden], .index-options[hidden] { display: none; }
.index-options-open[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.index-options-open:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.index-options-open svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.index-gens-open[hidden] + .index-options-open:not([hidden]) { margin-left: auto; }
.index-options-open:not([hidden]) + .index-export { margin-left: 0; }
.index-options { width: min(540px, calc(100% - 48px)); }
/* Live options per person (hw-74b9.59): the Yours and Project default
   tabs, the mode line, each option's tag, and the two buttons. */
.index-options-tabs { justify-self: start; }
.index-options-panel { display: grid; gap: 10px; }
.index-options-mode, .index-options-fixed { margin: 0; }
.index-options-mode { font-weight: 600; }
.index-options-fixed { padding: 6px 8px; border-left: 3px solid var(--warning); background: var(--subtle); }
.index-option-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.index-option-tag { padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; line-height: 16px; }
.index-option-tag[data-own="true"] { border-color: var(--accent); color: var(--accent); }
.index-option-tag[hidden], .index-options-actions[hidden], .index-options-actions .button[hidden] { display: none; }
.index-options-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* The Export popover (hw-74b9.59): the generation, the options as chips,
   whose they are, and the rulings, then Download. */
.index-export-pop { width: min(480px, calc(100% - 48px)); }
.index-export-pop[hidden] { display: none; }
.index-export-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; }
.index-export-facts dt { color: var(--muted); }
.index-export-facts dd { margin: 0; }
.index-export-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; list-style: none; }
.index-export-chips li { padding: 1px 8px; border: 1px solid var(--control-line); border-radius: 999px; }
.index-export-whose { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.index-export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.index-export-actions .button:not(.primary) { border: 1px solid var(--control-line); background: var(--surface); color: var(--ink); }
.index-options-actions .button { border: 1px solid var(--control-line); background: var(--surface); color: var(--ink); font-size: 13px; }
.index-option:has(input:disabled) { cursor: default; }
.index-options-list { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.index-options-legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
.index-option { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.index-option input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--accent); }
.index-option input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.index-option-text { display: grid; gap: 2px; }
.index-option-help { color: var(--muted); font-size: 12px; }
/* What each option changes in the generation shown, under its box, with
   a button that lists the rows in Changes (hw-74b9.59). It lines up with
   the box's words. */
.index-option-effect { margin: -4px 0 0 24px; font-size: 12px; color: var(--ink); }
.index-option-effect[hidden], .index-option-show[hidden] { display: none; }
.index-option-show { padding: 2px 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.index-option-show:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.index-options-status { margin: 0; min-height: 1em; font-size: 12px; color: var(--muted); }
.index-options-status[data-tone="error"] { color: var(--warning); }
.index-export:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.index-export svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.index-gens-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.index-gens-short { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.index-gens-chevron { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
/* The list header (hw-74b9.32.20.3): the index's full name and counts,
   then what kind of index it is, or on Changes what is compared and
   why. It is pinned with the head, outside the scroller. */
.index-header { display: grid; gap: 2px; min-width: 0; }
.index-title-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; min-width: 0; }
.index-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.index-counts { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.index-sentence { margin: 0; font-size: 12px; color: var(--muted); }
/* An entry the person's index options hide, reached by a link or the
   rail (hw-74b9.59): the notice sits under the list header, in the
   pinned head, so it shows wherever the list is scrolled. */
.index-hidden-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; background: var(--surface); }
.index-hidden-note[hidden], .index-hidden-note .button[hidden] { display: none; }
.index-hidden-text { margin: 0; flex: 1 1 16em; }
.index-hidden-note .button { border: 1px solid var(--control-line); background: var(--surface); color: var(--ink); font-size: 13px; }
/* A phone keeps the notice short, so the pinned head stays low. */
@media (max-width: 650px) {
  .index-hidden-note { margin-top: 4px; padding: 6px 8px; font-size: 13px; }
}
.index-sentence:empty { display: none; }
/* The Generations popover lies over the scroller under the head, and
   only its own list scrolls when it is taller than the column. */
.index-column { position: relative; }
.index-gens { position: absolute; z-index: 5; right: max(24px, calc((100% - 872px) / 2)); width: min(560px, calc(100% - 48px)); max-height: calc(100% - var(--gens-top, 60px) - 12px); overflow: auto; display: grid; gap: 10px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px rgb(0 0 0 / .18); font-size: 13px; }
.index-gens-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.index-gens-head h2 { margin: 0; font-size: 15px; }
.index-gens-close { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 18px; cursor: pointer; }
.index-gens-hint { margin: 0; font-size: 12px; color: var(--muted); }
.index-gens-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.index-gen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.index-gen[data-shown="true"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.index-gen-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.index-gen-mark { padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; white-space: nowrap; }
.index-gen-actions { display: flex; gap: 6px; flex: none; }
.index-gens .indexes-share, .index-gens .indexes-generate { margin: 0; }
.index-digests { margin: 0; }
.index-digests dl { grid-template-columns: max-content 1fr; }
.index-digests dd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.index-rail-toggle, .index-rail-close { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); cursor: pointer; }
.index-rail-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.4; }
.index-rail-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.index-rail-close { width: 26px; height: 26px; border-color: transparent; background: none; color: var(--muted); }
.workspace > .index-workspace > .index-rail { flex: none; display: flex; flex-direction: column; width: 168px; min-height: 0; border-right: 1px solid var(--line); background: var(--subtle); }
.workspace > .index-workspace > .index-rail[hidden] { display: none; }
.index-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 10px 6px 14px; }
.index-rail-jump { flex: 1; min-height: 0; overflow: auto; padding: 0 10px 8px; }
.index-rail-jump .indexes-jump { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 3px; }
.index-rail-jump .indexes-stop { text-align: left; overflow-wrap: anywhere; }
.index-rail-count { margin: 0; padding: 8px 14px 12px; font-size: 12px; color: var(--muted); }
.index-rail-client { margin: 0; padding: 0 14px 12px; font-size: 12px; color: var(--muted); }
.index-rail-client[hidden] { display: none; }
.index-rail-lists { flex: none; max-height: 45%; overflow: auto; padding: 0 10px 8px; display: grid; gap: 6px; }
.index-rail-lists:not(:has(> :not([hidden]))) { display: none; }
.index-rail-list[hidden] { display: none; }
.index-rail-list summary { cursor: pointer; padding: 4px; font-size: 12px; font-weight: 600; }
.index-rail-accept { margin: 4px 6px; font-size: 12px; }
.index-rail-accept[hidden] { display: none; }
.index-rail-accept-status { margin: 0 6px; font-size: 11px; color: var(--muted); }
.index-rail-accept-status:empty { display: none; }
.index-rail-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.index-rail-item { display: flex; align-items: baseline; gap: 4px; width: 100%; min-height: 26px; padding: 2px 6px; border: 0; border-radius: 5px; background: none; color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.index-rail-item:hover { background: var(--accent-soft); }
.index-rail-item:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.index-rail-item .idiff-glyph { flex: none; width: 12px; }
.index-rail-item[data-op="added"] .idiff-glyph { color: var(--added); }
.index-rail-item[data-op="removed"] .idiff-glyph { color: var(--removed); }
.index-rail-item[data-op="change"] .idiff-glyph { color: var(--warning); }
.index-rail-text { min-width: 0; overflow-wrap: anywhere; }
/* The rail's list for the generator (hw-74b9.32.8): an outdated thread
   says the entry changed, and one whose entry is gone is disabled. */
/* The entry and its numbers keep the first line, and the state takes
   one of its own beneath them. */
.index-rail-item:has(> .index-rail-note) { flex-wrap: wrap; row-gap: 0; }
.index-rail-item:has(> .index-rail-note) > .index-rail-text { flex: 1 1 100%; }
.index-rail-note { flex-basis: 100%; font-size: 11px; color: var(--warning); }
.index-rail-item:disabled { cursor: default; color: var(--muted); }
.index-rail-item:disabled:hover { background: none; }
.index-rail-count:empty { display: none; }
.index-return { display: inline-flex; align-items: center; gap: 4px; align-self: center; height: 24px; margin-left: 6px; padding: 0 8px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 11px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.index-return[hidden] { display: none; }
.index-return-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.idiff-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.idiff-chips[hidden] { display: none; }
.idiff-chip { font: inherit; font-size: 12px; min-height: 26px; padding: 2px 10px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.idiff-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.idiff-row:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: -2px; }
.idiff-row.indexes-target { background: var(--accent-soft); }
.ichg-card.indexes-target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.idiff-line { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: baseline; gap: 0 6px; padding: 4px 6px; }
.idiff-glyph { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; text-align: center; color: var(--muted); }
.idiff-line[data-kind="add"] { background: var(--added-bg); }
.idiff-line[data-kind="del"] { background: var(--removed-bg); }
.idiff-line[data-kind="add"] .idiff-glyph { color: var(--added); }
.idiff-line[data-kind="del"] .idiff-glyph { color: var(--removed); }
.idiff-line[data-kind="change"] .idiff-glyph { color: var(--warning); }
.idiff-body { min-width: 0; }
.idiff-body[data-style="first_line"] .indexes-text { font-style: italic; }
.idiff-mark[data-kind="add"] { color: var(--added); background: var(--added-bg); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; font-weight: 650; }
.idiff-mark[data-kind="del"] { color: var(--removed); background: var(--removed-bg); text-decoration: line-through; text-decoration-thickness: 2px; }
.idiff-row[data-op="removed"] .idiff-text { text-decoration: line-through; text-decoration-thickness: 1px; }
.idiff-row .indexes-number[data-mark="added"], .idiff-row .indexes-number-plain[data-mark="added"] { color: var(--added); font-weight: 700; }
.idiff-row .indexes-number[data-mark="removed"], .idiff-row .indexes-number-plain[data-mark="removed"] { color: var(--removed); text-decoration: line-through; }
.idiff-sign { margin-right: 1px; font-weight: 700; }
.idiff-old { color: var(--removed); }
.idiff-notes { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; padding: 4px 6px 0 30px; font-size: 12px; color: var(--muted); }
.ichg-list { display: grid; gap: 20px; font-size: 14px; }
.ichg-find { display: flex; gap: 8px; min-width: 0; }
.ichg-find .indexes-search { flex: 1; }
.ichg-filter { display: none; align-items: center; flex: none; padding: 2px 12px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.ichg-filter[hidden] { display: none; }
.ichg-filter[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.changes-root .indexes-count:empty { display: none; }
.ichg-index { display: grid; gap: 10px; scroll-margin-top: 72px; }
.ichg-index-name { margin: 0; font-size: 15px; }
/* What changed, the generation's summary over the cards (hw-74b9.32.8). */
.ichg-summary { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); font-size: 13px; }
.ichg-summary-title { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.ichg-summary-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.ichg-summary-list li[data-index="total"] { margin-top: 2px; padding-top: 4px; border-top: 1px solid var(--line); }
.ichg-summary-name { font-weight: 600; }
.ichg-group { display: grid; gap: 8px; }
.ichg-group-name { margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.ichg-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ichg-card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; scroll-margin-top: 72px; }
.ichg-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--subtle); font-size: 12px; }
.ichg-kind { font-weight: 600; color: var(--ink); }
.ichg-show { font: inherit; font-size: 12px; min-height: 26px; padding: 2px 10px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--accent); cursor: pointer; }
.ichg-show:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ichg-gone { color: var(--muted); font-style: italic; }
.ichg-card > .idiff-notes:last-of-type { padding-bottom: 6px; }
.ichg-threads:empty { display: none; }
.ichg-threads { padding: 6px 10px 8px 30px; border-top: 1px solid var(--line); }
.ichg-heading { font-weight: 700; }
.indexes-changed { flex: none; align-self: center; width: 18px; height: 18px; margin: 0 2px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; position: relative; }
.indexes-changed::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--warning-dot); }
.indexes-changed[data-op="added"]::after { background: var(--added); }
.indexes-changed:hover::after, .indexes-changed:focus-visible::after { inset: 3px; }
.indexes-changed:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.indexes-heading h3 .indexes-changed { vertical-align: middle; }
.page-peek .peek-thumb { display: block; width: 100%; height: auto; margin-top: 6px; border: 1px solid var(--line); background: var(--surface); }
@media (max-width: 650px) {
  .workspace > .index-workspace > .index-rail { width: min(132px, 36vw); }
  .index-rail-head { padding: 8px 6px 4px 10px; }
  .index-rail-jump, .index-rail-lists { padding: 0 6px 8px; }
  /* Beside the open rail the head has no room for one line, so
     Generations wraps under the tabs. */
  .index-workspace:has(> .index-rail:not([hidden])) .index-compare-bar { flex-wrap: wrap; }
  .index-workspace:has(> .index-rail:not([hidden])) .index-gens-open { max-width: 100%; }
  .index-compare-bar { flex-wrap: nowrap; }
  .index-views { flex: 1; min-width: 0; }
  .index-view { flex: 1; justify-content: center; padding: 2px 6px; }
  .index-gens-open { flex: 0 1 auto; }
  .index-gens-word { display: none; }
  /* On a phone the button names the generation in a few characters read
     whole, Newest or a date such as 10/12, never a cut name (hw-74b9.56). */
  .index-gens-name { display: none; }
  .index-gens-short { display: inline; }
  .index-export { justify-content: center; padding: 2px 8px; }
  .index-export-word { display: none; }
  .index-options-open { justify-content: center; padding: 2px 8px; }
  .index-options-word { display: none; }
  /* The head stays one line, under a fifth of a phone's screen
     (hw-74b9.56). With Options on the line the buttons sit closer and
     Generations drops its chevron, so its short name reads whole on a
     393 px phone. */
  .index-compare-bar:has(> .index-options-open:not([hidden])) { column-gap: 4px; }
  .index-compare-bar:has(> .index-options-open:not([hidden])) .index-gens-open { padding: 2px 6px; }
  .index-compare-bar:has(> .index-options-open:not([hidden])) .index-gens-chevron { display: none; }
  .index-compare-bar:has(> .index-options-open:not([hidden])) .index-view { gap: 4px; }
  /* With Export on the line, the tabs take the width of their words and
     Generations gives up the room, its name cut short. */
  .index-compare-bar:has(> .index-export:not([hidden])) .index-views, .index-compare-bar:has(> .index-export:not([hidden])) .index-rail-toggle { flex: none; }
  .index-compare-bar:has(> .index-export:not([hidden])) .index-view { flex: none; padding: 2px 8px; }
  .index-sentence { display: none; }
  .index-title { font-size: 14px; }
  .index-gens { left: 8px; right: 8px; width: auto; }
  .index-gens .indexes-generate select { font-size: 16px; }
  .ichg-filter { display: inline-flex; }
  .changes-root .idiff-chips:not([data-open="true"]) { display: none; }
  /* What changed would push the first card below the fold. A phone keeps
     each index's count in the jump stops and each kind's behind Filter. */
  .ichg-summary { display: none; }
  .index-return { width: 36px; height: 36px; margin-left: 2px; padding: 0; justify-content: center; border-radius: 6px; }
  .index-return-word { display: none; }
  .idiff-notes, .ichg-threads { padding-left: 24px; }
}
@media (pointer: coarse) {
  .idiff-chip, .ichg-show, .index-view, .index-gens-open, .ichg-filter, .index-gen-actions .button, .index-rail-item { min-height: 44px; }
  .index-export, .index-options-open { min-width: 44px; min-height: 44px; }
  .index-option input { width: 22px; height: 22px; }
  .index-option-effect { margin-left: 30px; }
  .index-gens-close { width: 44px; height: 44px; }
  .indexes-changed { width: 32px; height: 32px; }
  .indexes-changed::after { inset: 11px; }
  .index-rail-toggle, .index-rail-close { width: 44px; height: 44px; }
}
/* The index threads and composer (hw-74b9.32.20.4). A row in hand is
   marked with a bar at its left as well as a tint. Its slot, under the
   row on the Index tab or in the card on Changes, holds the action bar,
   a summary that shows or hides the threads, the threads with their pick
   marked, and the composer. The composer's pick strip draws the entry as
   tokens: a pressed token is tinted and outlined, so color is never the
   only sign. The handles are Add an edit's, 24px on a desktop and 44px
   on touch. On a phone the action bar is a 56px bar fixed at the foot of
   the screen, and the composer is a bottom sheet over the list. The
   Index tab shows a dot while the threads hold messages the person has
   not seen. */
.mode-tab { position: relative; }
.mode-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.mode-dot[hidden] { display: none; }
.indexes-entry, .ichg-card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.indexes-entry .ithreads-slot, .ichg-card .ithreads-slot { cursor: auto; }
.indexes-inhand { box-shadow: inset 3px 0 0 var(--accent); }
.ithreads-slot { display: grid; gap: 8px; padding: 6px 0 8px 30px; font-size: 13px; }
.ichg-threads > .ithreads-slot { padding: 0; }
.irow-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ithread-summary { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.ithread-summary:not([data-open="0"]) { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ithread-summary:focus-visible, .icomposer-token:focus-visible, .icomposer-handle:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ithread-list { display: grid; gap: 10px; }
.ithread { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.ithread:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ithread[data-state="open"] { border-color: var(--accent); }
.ithread-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ithread-state { font-size: 11px; font-weight: 700; }
.ithread-state[data-state="open"] { color: var(--accent); }
.ithread-state[data-state="resolved"] { color: var(--added); }
.ithread-state[data-state="outdated"] { color: var(--warning); }
/* A thread on the operator's list for the generator (hw-74b9.32.8). */
.ithread-generator { padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--muted); }
.ithread-about { font-size: 11px; color: var(--muted); }
.ithread-quote { margin: 0; padding: 2px 8px; border-left: 3px solid var(--line); color: var(--muted); overflow-wrap: anywhere; }
.ithread-pick { padding: 0 2px; border-radius: 3px; background: var(--accent-soft); color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.ithread-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ithread-msg p { margin: 0; }
.ithread-meta { font-size: 11px; color: var(--muted); }
.ithread-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ithread-desk, .ithread-event { font-size: 12px; color: var(--muted); }
.ithread-desk[data-kind="outdated"] { color: var(--warning); }
.ithread-link { font: inherit; padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; }
.ithread-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.ithread-status { margin: 0; font-size: 12px; color: var(--muted); }
.ithread-status:empty { display: none; }
.ithread-reply > summary { cursor: pointer; font-size: 12px; color: var(--accent); }
.ithread-reply-form { display: grid; gap: 6px; padding-top: 6px; }
.ithread-body { font: inherit; font-size: 13px; width: 100%; min-width: 0; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); resize: vertical; }
.ipanel-note { margin: 0; font-size: 12px; color: var(--muted); }
.icomposer { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); }
.icomposer-grip { display: none; }
.icomposer-title { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.icomposer-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--subtle); }
.icomposer-strip:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.icomposer-words { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; flex: 1 1 12em; min-width: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.icomposer-numbers { display: flex; flex-wrap: wrap; gap: 4px; font-variant-numeric: tabular-nums; }
.icomposer-token { font: inherit; font-size: 14px; min-height: 28px; padding: 2px 5px; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--ink); cursor: pointer; }
.icomposer-token:hover { border-color: var(--control-line); }
.icomposer-token[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.icomposer-heading { padding: 2px 8px; border-color: var(--control-line); font-weight: 700; }
.icomposer-number { color: var(--muted); }
.icomposer-blank { color: var(--muted); }
.icomposer-handle { position: relative; align-self: stretch; width: 24px; margin: 0 -12px; padding: 0; border: 0; background: none; z-index: 1; touch-action: none; cursor: ew-resize; }
.icomposer-handle::before { content: ""; position: absolute; left: calc(50% - 1.5px); top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--accent); }
.icomposer-handle::after { content: ""; position: absolute; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.icomposer-handle[data-end="first"]::after { top: -6px; }
.icomposer-handle[data-end="last"]::after { bottom: -6px; }
.icomposer-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.icomposer-about { margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.icomposer-whole[hidden] { display: none; }
/* Suggest (hw-74b9.32.20.5). The composer's mode is a pair of pressed
   buttons. Suggest's edit sits under the pick: an input, the numbers as
   chips, a heading select, or the rarer actions under More, then the
   preview. A suggestion draws as GitLab draws one, in the preview and in
   a thread: the line as it is over the line suggested, a glyph in the
   gutter, the changed words struck or underlined as well as tinted, and
   numbers with + and − signs. An outdated thread on the new line strikes
   its old quote over the new one, or marks the pick on the new line where
   its words are still there. */
.icomposer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.icomposer-modes { display: inline-flex; border: 1px solid var(--control-line); border-radius: 7px; overflow: hidden; }
.icomposer-mode { font: inherit; font-size: 12px; min-height: 28px; padding: 3px 12px; border: 0; background: var(--surface); color: var(--ink); cursor: pointer; }
.icomposer-mode + .icomposer-mode { border-left: 1px solid var(--control-line); }
.icomposer-mode[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.icomposer-mode:focus-visible, .isuggest-action:focus-visible, .isuggest-chip-x:focus-visible, .isuggest-target:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.isuggest { display: grid; gap: 8px; }
.isuggest[hidden] { display: none; }
.isuggest-edit { display: grid; gap: 8px; }
.isuggest-field { display: grid; gap: 4px; }
.isuggest-label { font-size: 12px; font-weight: 600; }
.isuggest-input { font: inherit; font-size: 14px; min-height: 32px; width: 100%; min-width: 0; box-sizing: border-box; padding: 4px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.isuggest-numbers-editor { display: grid; gap: 4px; }
.isuggest-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.isuggest-chips .isuggest-add-number { width: 10em; }
.isuggest-chip { display: inline-flex; align-items: center; gap: 2px; padding-left: 8px; border: 1px solid var(--control-line); border-radius: 999px; font-variant-numeric: tabular-nums; }
.isuggest-chip[data-picked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.isuggest-chip[data-state="removed"] { color: var(--removed); background: var(--removed-bg); }
.isuggest-chip[data-state="removed"] .isuggest-chip-number { text-decoration: line-through; text-decoration-thickness: 2px; }
.isuggest-chip[data-state="added"] { color: var(--added); background: var(--added-bg); font-weight: 650; }
.isuggest-chip-x { font: inherit; min-width: 28px; min-height: 28px; padding: 0; border: 0; border-radius: 999px; background: none; color: inherit; cursor: pointer; }
.isuggest-more > summary { cursor: pointer; font-size: 12px; color: var(--accent); }
.isuggest-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.isuggest-action { font: inherit; font-size: 12px; min-height: 28px; padding: 3px 10px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.isuggest-action[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.isuggest-targets { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 14em; overflow: auto; }
.isuggest-targets:empty { display: none; }
.isuggest-target { display: flex; justify-content: space-between; gap: 12px; width: 100%; min-height: 30px; padding: 3px 8px; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.isuggest-target:hover, .isuggest-target[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.isuggest-target-numbers { color: var(--muted); font-variant-numeric: tabular-nums; }
.isuggest-chosen, .isuggest-say { margin: 0; font-size: 12px; }
.isuggest-problem { margin: 0; font-size: 12px; color: var(--warning); }
.isuggest-problem:empty, .isuggest-preview:empty { display: none; }
.isuggest-diff { display: grid; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.isuggest-head { margin: 0; padding: 4px 8px; border-bottom: 1px solid var(--line); background: var(--subtle); color: var(--muted); font-size: 11px; font-weight: 700; }
.isuggest-line { font-size: 14px; }
.isuggest-body { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; min-width: 0; }
.isuggest-text { min-width: 0; overflow-wrap: anywhere; }
.isuggest-numbers { color: var(--muted); font-variant-numeric: tabular-nums; }
.isuggest-number[data-mark="added"] { color: var(--added); font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.isuggest-number[data-mark="removed"] { color: var(--removed); text-decoration: line-through; text-decoration-thickness: 2px; }
/* On a thread outdated since, the line a suggestion was made on is struck (hw-74b9.32.20.13). */
.isuggest-diff[data-was] .isuggest-line[data-kind="del"] .isuggest-text { text-decoration: line-through; text-decoration-color: var(--removed); text-decoration-thickness: 1px; }
.ithread-moved { display: grid; gap: 4px; }
.ithread-was { display: block; color: var(--muted); text-decoration: line-through; text-decoration-color: var(--removed); text-decoration-thickness: 2px; }
.ithread-was .ithread-quote { border-left-color: var(--removed); }
.ithread-now-label, .ithread-still { margin: 0; font-size: 11px; color: var(--muted); }
.ithread-again { justify-self: start; }
/* Rulings (hw-74b9.32.6). The ruling that applies sits under its row as
   a block with a Ruled chip and the line it changes drawn as a
   suggestion is; a stale ruling has a dashed warning border and says why;
   a reviewer's advisory ruling is one muted line. The ruling form is the
   composer's sibling: its kinds are pressed chips, then the fields the
   kind asks for and the note. A chip's words, not its color, say which
   kind of ruling it is. */
.iruling { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); }
.iruling[data-state="stale"] { border-style: dashed; border-color: var(--warning); background: var(--subtle); }
.iruling-head { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.iruling-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.iruling-chip[data-stale="true"] { background: none; border: 1px solid var(--warning); color: var(--warning); }
.iruling-chip[data-advisory="true"] { background: var(--subtle); color: var(--muted); }
/* A stale ruling the new generation already carries out (hw-74b9.32.27):
   not applied, so dashed, and in the added color, apart from the stale
   warning. Accept sits under it. */
.iruling[data-state="matches"] { border-style: dashed; border-color: var(--added); background: var(--subtle); }
.iruling-chip[data-matches="true"] { background: none; border: 1px solid var(--added); color: var(--added); }
.iruling[data-state="matches"] .iruling-why { color: var(--muted); }
.iruling-actions { display: flex; gap: 8px; margin-top: 6px; }
/* Apply as ruling (hw-74b9.32.20.6): the editor's button under a
   suggestion, with why on its own line when no ruling kind takes it, and
   the Ruled chip a ruled row carries beside its words. */
.ithread-apply-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ithread-apply-why { margin: 0; font-size: 11px; color: var(--muted); }
/* The line a ruled row's edit exports as, under the row's generated
   words (hw-45dk.13). */
.indexes-exports { margin: 0; padding-left: 30px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.indexes-ruled { flex: none; align-self: center; white-space: nowrap; padding: 0 7px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 11px; font-weight: 700; line-height: 16px; }
.iruling-meta, .iruling-why, .iruling-carried { margin: 0; font-size: 11px; color: var(--muted); }
.iruling-why { color: var(--warning); }
/* The line a ruler saw, and the options a ruling was made under when they
   differ from the viewer's on the entry (hw-74b9.59). */
.iruling-seen, .iruling-other { margin: 0; font-size: 11px; color: var(--muted); }
.iruling-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Where a ruling stands with the Client (hw-74b9.32.7): a word in the
   row's chip and a line under the ruling, never color alone. */
.indexes-client { font-weight: 600; }
.indexes-ruled[data-client="approved"] { border-color: var(--added); color: var(--added); }
.indexes-ruled[data-client="rejected"] { border-color: var(--removed); color: var(--removed); }
.iruling-client { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.iruling-client[data-client="approved"] b { color: var(--added); }
.iruling-client[data-client="rejected"] b { color: var(--removed); }
.client-index-share { display: grid; gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.client-index-share h3 { margin: 0; font-size: 14px; }
.client-index-state { margin: 0; font-size: 13px; }
.client-index-state[data-shared="false"] { color: var(--removed); }
.iruling-advisory { margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.iruling-history { display: grid; gap: 4px; }
.iruling-history-title { margin: 0; font-size: 11px; font-weight: 700; color: var(--muted); }
.iruling-history ol { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: 12px; overflow-wrap: anywhere; }
.iruler { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); }
.iruler-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.iruler-kind { font: inherit; font-size: 12px; min-height: 28px; padding: 3px 10px; border: 1px solid var(--control-line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.iruler-kind[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.iruler-kind:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.iruler-fields { display: grid; gap: 8px; }
/* Phones: the action bar is fixed at the foot of the screen, and the
   composer is a bottom sheet with a grip that a swipe down closes. The
   list keeps room under its last row for the bar. */
@media (max-width: 650px) {
  .ithreads-slot { padding-left: 24px; }
  .ithreads-slot:has(> .irow-bar:only-child) { padding: 0; }
  .irow-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; height: 56px; box-sizing: border-box; flex-wrap: nowrap; padding: 6px max(12px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px var(--shadow); }
  .irow-bar .button { flex: 1; }
  .index-main:has(.irow-bar) > .indexes-root { padding-bottom: 72px; }
  .icomposer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 32; max-height: 75vh; overflow: auto; overscroll-behavior: contain; padding: 4px 14px calc(12px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgb(0 0 0 / 18%); }
  .icomposer-grip { display: block; width: 40px; height: 5px; margin: 6px auto 0; border-radius: 3px; background: var(--line); }
  .icomposer-title { touch-action: none; }
  .ithread-body, .isuggest-input { font-size: 16px; }
  .iruler { position: fixed; left: 0; right: 0; bottom: 0; z-index: 32; max-height: 75vh; overflow: auto; overscroll-behavior: contain; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgb(0 0 0 / 18%); }
}
@media (pointer: coarse) {
  .ithread-summary { min-height: 44px; }
  .ithread-buttons .button, .ithread-link, .irow-bar .button { min-height: 44px; }
  .ithread-reply > summary { min-height: 44px; display: flex; align-items: center; }
  .icomposer-token { min-height: 44px; min-width: 32px; }
  .icomposer-mode, .isuggest-action, .isuggest-target, .isuggest-input { min-height: 44px; }
  .iruler-kind, .ithread-apply { min-height: 44px; }
  .isuggest-chip-x { min-width: 44px; min-height: 44px; }
  .icomposer-handle { width: 44px; margin: 0 -22px; }
  .icomposer-handle[data-end="first"]::after { top: -10px; width: 14px; height: 14px; left: calc(50% - 7px); }
  .icomposer-handle[data-end="last"]::after { bottom: -10px; width: 14px; height: 14px; left: calc(50% - 7px); }
}
/* Your views: one row per open view, the name first and its buttons
   after. A long name wraps, and the buttons wrap below it whole. */
.viewas-views h3 { margin: 12px 0 4px; font-size: 14px; }
.viewas-view-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.viewas-view { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.viewas-view-name { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; }
.viewas-view-actions { flex: none; display: inline-flex; gap: 6px; }
.viewas-views-limit { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.viewas-generic-note { margin: 4px 0; color: var(--muted); font-size: 13px; }

/* Edits added by hand (hw-5x0n.30.176.3). Add an edit sits at the end of
   the panel's Walk row, in the phone's Walk menu, and down the folded
   strip as an icon. While an edit is placed the page takes clicks for
   words: markers rest, the cursor is a crosshair, the strip over the page
   says what a click does, and the review panel holds the form. The draft
   marker is dashed in the Not ruled color, with a handle at each end of
   its words. See Edits added by hand in app.js. */
/* Add an edit is its icon alone, named by its tooltip and aria-label. On
   a desktop the Walk row has no room left after By section, By page, and
   Follow the page, so the icon ends the finding buttons' row instead,
   which has room on the 420 pixel panel. Below 1000 pixels and on touch
   screens the Walk row wraps, and the phone's Walk menu, a column, shows
   the words. */
.walk-row .add-edit { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 6px; width: 28px; height: 28px; margin-left: auto; padding: 0; font-size: 12px; color: var(--accent); white-space: nowrap; }
.walk-row .add-edit-label { display: none; }
.walk-row .follow-page:not([hidden]) + .add-edit { margin-left: 0; }
.add-edit[hidden] { display: none !important; }
.add-edit-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.panel-strip .walk-row .add-edit { margin: 0; }
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .inspector-top .walk-row .add-edit { width: auto; margin-left: 0; min-height: 44px; padding: 0 6px; font-size: 13px; font-weight: 600; }
  .inspector-top .walk-row .add-edit-label { display: inline; }
  .panel-strip .walk-row .add-edit { width: 28px; padding: 0; }
  .panel-strip .walk-row .add-edit-label { display: none; }
}
@media (pointer: coarse) { .walk-row .add-edit { min-height: 44px; } }
@media (min-width: 1001px) and (pointer: fine) {
  .inspector-top { position: relative; }
  .inspector-top .walk-row .add-edit { position: absolute; top: 16px; right: 27px; }
  /* A panel on the right has its fold toggle at that end, so Add an
     edit sits left of it (hw-5x0n.30.199). */
  body[data-panel-side="right"] .inspector-top .walk-row .add-edit { right: calc(27px + 30px + 6px); }
}
.place-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0 16px 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-size: 12px; }
.place-strip[hidden] { display: none; }
.place-strip .place-text { flex: 1 1 220px; min-width: 0; }
@media (max-width: 650px) { .place-strip .place-text { flex-basis: 100%; } }
/* The draft-wait line (hw-fswv.24): under the header while an Add-an-edit
   draft waits in the Review package and the desk shows Rights or Index. */
.draft-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 6px 18px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); color: var(--ink); font-size: 13px; }
.draft-wait[hidden] { display: none; }
.draft-wait .text-button { font-size: 13px; }
@media (max-width: 650px) { .draft-wait { padding: 4px 10px; gap: 0 12px; } .draft-wait .text-button { min-height: 44px; } }
.place-strip .grow { display: none; }
.place-strip .button { min-height: 30px; padding: 5px 10px; }
@media (max-width: 650px) { .place-strip { margin: 0 10px 6px; padding: 6px 8px; font-size: 13px; } }
@media (pointer: coarse) { .place-strip .button { min-height: 44px; padding: 5px 12px; font-size: 13px; } }
body[data-placing] .proof-page { cursor: crosshair; touch-action: pan-x pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
body[data-placing] .marker-layer .marker { pointer-events: none; }
.draft-layer { position: absolute; inset: 0; pointer-events: none; }
/* Client suggestions (hw-ljj3): an open one is a dashed box on its spot. */
.suggestion-layer { position: absolute; inset: 0; pointer-events: none; }
.suggestion-pin { position: absolute; margin: 0; padding: 0; font: inherit; border: 2px dashed var(--accent); border-radius: 3px; background: color-mix(in srgb, var(--accent) 8%, transparent); pointer-events: auto; cursor: pointer; }
.suggestion-pin:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
body[data-placing] .suggestion-pin { pointer-events: none; }
/* The app bar names the open Client suggestions (hw-fswv.16). */
.suggestions-bar { display: inline-flex; align-items: center; gap: 6px; border-color: var(--button); background: var(--button); color: var(--button-ink); font-weight: 600; }
.suggestions-bar:hover { background: var(--button-hover); }
.suggestions-bar[hidden] { display: none; }
.suggestions-bar-short { display: none; }
@media (max-width: 1100px) {
  .suggestions-bar-word { display: none; }
  .suggestions-bar-short { display: inline; }
}
.suggestions-item[data-picked="true"] { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.suggestion-pin.flash { outline: 3px solid var(--accent); outline-offset: 3px; }
.suggestion-pin-badge { position: absolute; left: 0; bottom: calc(100% + 2px); padding: 0 5px; border-radius: 7px; font-size: 10px; font-weight: 650; background: var(--accent); color: #fff; }
.draft-mark { position: absolute; box-sizing: border-box; border: 2px dashed var(--marker-unruled-page, var(--annotation)); border-radius: 2px; background: color-mix(in srgb, var(--marker-unruled, var(--annotation)) 12%, transparent); }
.draft-mark.whole { left: 0; top: 0; width: 100%; height: 6px; border: 0; background: repeating-linear-gradient(90deg, var(--marker-unruled-page, var(--annotation)) 0 10px, transparent 10px 16px); }
.edit-handle { position: absolute; width: 24px; margin-left: -12px; pointer-events: auto; touch-action: none; cursor: ew-resize; }
.edit-handle::before { content: ""; position: absolute; left: calc(50% - 1.5px); top: -3px; bottom: -3px; width: 3px; border-radius: 2px; background: var(--accent); }
.edit-handle::after { content: ""; position: absolute; left: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
/* The start handle's knob sits above the words and the end's below, as a
   phone's text selection draws them, so a one-word span shows both. */
.edit-handle[data-end="first"]::after { top: -15px; }
.edit-handle[data-end="last"]::after { bottom: -15px; }
/* A finger gets a 44 pixel target around each handle. */
@media (pointer: coarse) {
  .edit-handle { width: 44px; margin-left: -22px; }
  .edit-handle[data-end="first"] { padding-top: 22px; margin-top: -22px; }
  .edit-handle[data-end="first"]::after { top: 4px; }
  .edit-handle[data-end="last"] { padding-bottom: 22px; }
  .edit-handle[data-end="last"]::after { bottom: 4px; }
  .edit-handle::before { top: auto; bottom: auto; }
}
.inspector[data-adding] > .inspector-body, .inspector[data-adding] > .decision-area, .inspector[data-adding] > .tally { display: none; }
.inspector[data-adding] .walk-row { display: none; }
.inspector[data-adding] .panel-nav, .inspector[data-adding] .walk-menu { visibility: hidden; }
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) { .inspector[data-adding] > .inspector-top { display: none; } }
.edit-form { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 18px 27px 20px; }
.edit-form[hidden] { display: none; }
.edit-form-title { font-size: 20px; font-weight: 570; letter-spacing: -.4px; margin: 0; }
.edit-form-place { margin: 0 0 6px; font-size: 11px; color: var(--muted); }
.edit-label { font-size: 12px; font-weight: 600; margin-top: 8px; }
.edit-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.edit-label-row .text-button { font-size: 12px; }
.edit-form select, .edit-form input:not([type="checkbox"]) { width: 100%; box-sizing: border-box; height: auto; line-height: 1.3; min-height: 35px; padding: 7px 9px; border: 1px solid var(--control-line); border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 13px; }
.edit-form textarea { box-sizing: border-box; min-height: calc(1.5em + 18px); font-size: 13px; line-height: 1.5; padding: 7px 9px; }
.edit-form textarea[readonly] { background: var(--subtle); border-style: dashed; }
#edit-note { min-height: 56px; }
.edit-delete { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.edit-line summary { font-size: 12px; color: var(--muted); cursor: pointer; margin-top: 4px; }
.edit-line p { margin: 6px 0 0; font-size: 12px; white-space: pre-line; color: var(--ink); }
.edit-action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.edit-action-row .edit-label { margin: 0; }
.edit-form .seg { display: inline-flex; border: 1px solid var(--control-line); border-radius: 7px; overflow: hidden; }
.edit-form .seg button { font: inherit; font-size: 12px; min-height: 30px; padding: 5px 10px; border: 0; border-radius: 0; background: var(--surface); color: var(--ink); }
.edit-form .seg button + button { border-left: 1px solid var(--control-line); }
.edit-form .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.edit-form-status { min-height: 1.4em; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.edit-form-status[data-kind="error"] { color: var(--removed); }
.edit-form-actions { display: flex; gap: 8px; }
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .edit-form { padding: 10px 16px 12px; }
  .edit-form-title { font-size: 16px; }
  .edit-form-actions { position: sticky; bottom: -12px; padding: 8px 0; background: var(--surface); }
}
@media (pointer: coarse) {
  .edit-form select, .edit-form input:not([type="checkbox"]), .edit-form textarea { font-size: 16px; }
  .edit-form select, .edit-form input:not([type="checkbox"]) { min-height: 44px; }
  .edit-form .seg button, .edit-form-actions .button { min-height: 44px; }
}
.source-tag { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; vertical-align: 1px; }
.source-tag[data-source="reviewer"] { background: var(--preview); color: var(--preview-ink); }
.added-tag { margin: 6px 0 0; font-size: 11px; font-weight: 600; color: var(--accent); }
.added-tag[data-source="reviewer"] { color: var(--preview-ink); }
.added-tag[hidden], .added-actions[hidden], .added-confirm[hidden] { display: none; }
/* A Client-required tune rename (hw-5x0n.31.41). See renames.js. */
.rename-tag { margin: 6px 0 0; font-size: 11px; font-weight: 600; color: var(--accent); }
.rename-tag[hidden] { display: none; }
.added-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.added-actions .button { min-height: 30px; padding: 5px 10px; }
.added-confirm { flex-basis: 100%; margin: 4px 0 0; font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (pointer: coarse) { .added-actions .button { min-height: 44px; } }
/* A finding's facts under its heading, and About this finding
   (hw-5x0n.30.197.2). See findinfo.js. The subtext reads as the filter
   rows do, the field name muted. The card opens in the panel's flow under
   the heading, so it needs no room of its own on a phone. */
.finding-facts-row { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; min-width: 0; }
.finding-facts-row[hidden], .finding-info[hidden] { display: none; }
.finding-facts { margin: 0; min-width: 0; font-size: 12px; color: var(--ink); line-height: 1.45; }
.finding-facts .fact-key { color: var(--muted); }
.finding-facts .fact-dot { color: var(--muted); }
/* An archive batch's finding names its file first, whole: a filename is
   never cut, and a long one wraps on a phone (hw-38zq.4). */
.finding-facts .fact-file { font-weight: 600; overflow-wrap: anywhere; }
/* A phone held sideways has room for the heading and the suggested change
   only, so the facts fold behind their info button, which joins the
   location line. About this finding still lists them (hw-5x0n.30.197.2.3). */
@media (max-height: 520px) and (max-width: 1000px) {
  .candidate-heading .finding-facts-row { order: 0; flex: none; margin: -4px 0; }
  .candidate-heading .finding-facts { display: none; }
  /* The file stays when the other facts fold away. */
  .candidate-heading .finding-facts:has(> .fact-file) { display: block; }
  .candidate-heading .finding-facts:has(> .fact-file) > :not(.fact-file) { display: none; }
}
.finding-info-toggle { position: relative; display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; padding: 0; border-radius: 50%; color: var(--muted); }
.finding-info-toggle .info-icon { margin: 0; width: 14px; height: 14px; font-size: 10px; font-weight: 650; }
.finding-info-toggle:hover, .finding-info-toggle[aria-expanded="true"] { color: var(--accent); }
.finding-info-toggle[aria-expanded="true"] .info-icon { border-color: var(--accent); background: var(--accent-soft); }
.finding-info { margin: 8px 0 4px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 12px; line-height: 1.5; }
.finding-info:focus { outline: none; }
.finding-info:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.finding-info-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.finding-info-head h3 { margin: 0; font-size: 13px; font-weight: 620; }
.finding-info-close { width: 28px; height: 28px; padding: 0; border-radius: 6px; color: var(--muted); font-size: 18px; line-height: 1; }
.finding-info h4 { margin: 10px 0 2px; font-size: 11px; font-weight: 620; color: var(--muted); }
.finding-info p { margin: 0; }
.finding-info-facts { display: grid; grid-template-columns: minmax(84px, max-content) 1fr; gap: 4px 10px; margin: 8px 0 0; }
.finding-info-facts dt { display: flex; flex-direction: column; color: var(--ink); padding-top: 3px; }
.finding-info-facts .fact-code { color: var(--muted); font-size: 10px; }
.finding-info-facts dd { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.fact-value { min-height: 24px; padding: 2px 8px; border: 1px solid var(--control-line, var(--line)); border-radius: 12px; color: inherit; background: none; font-size: 12px; text-align: left; }
.fact-value:hover { border-color: var(--accent); color: var(--accent); }
.finding-info-hint { margin-top: 6px !important; font-size: 11px; color: var(--muted); }
.finding-info-related { margin: 0; padding: 0; list-style: none; }
.finding-info-related li + li { margin-top: 2px; }
.finding-info-related small { color: var(--muted); }
@media (pointer: coarse) {
  .finding-info-toggle::after { content: ""; position: absolute; inset: -11px; }
  .finding-info-close { width: 44px; height: 44px; margin: -8px -10px -8px 0; }
  .fact-value { min-height: 44px; padding: 4px 12px; }
  .finding-info-related .text-button { min-height: 44px; }
}
.history-entry.history-edit .history-icon { color: var(--accent); font-weight: 400; }
.edits-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.edits-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.edits-item > b { grid-column: 1; font-weight: 600; overflow-wrap: anywhere; }
.edits-item > small { grid-column: 1; color: var(--muted); }
.edits-item-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; align-items: center; }
.edits-item > .binding-status { grid-column: 1 / -1; margin: 0; }
.edits-item > .binding-status:empty { display: none; }
/* A Client suggestion's buttons take their own row under its text, on
   every width. Five of them (Show on page, Make an edit, Done, Done with a
   note, Decline) in a second column squeezed the text to about 80 px on a
   desktop (orchestrator stills review, 2026-10-22, hw-fswv.23). The note
   form's label stacks over its field, outranking .preference-list label. */
.suggestions-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.suggestions-item > b { grid-column: 1; font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.suggestions-item > small, .suggestions-reply { grid-column: 1; color: var(--muted); margin: 0; }
.suggestions-item .edits-item-actions { grid-column: 1; grid-row: auto; flex-wrap: wrap; justify-content: flex-start; margin-top: 4px; }
.suggestions-item > .binding-status { grid-column: 1 / -1; margin: 0; }
.suggestions-item > .binding-status:empty { display: none; }
.suggestions-item .suggestions-decline { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 12px; color: var(--muted); }
.suggestions-decline textarea { font: inherit; font-size: 13px; color: var(--ink); }
.suggestions-decline-actions { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; }
.edits-empty[hidden] { display: none; }

/* Your account. The password form follows the sign-in page's; each
   session is one row with its own Sign out. */
.account-section { display: grid; gap: 8px; }
.account-section h3 { margin: 0; font-size: 14px; }
.account-form { display: grid; gap: 6px; }
.account-form label { font-size: 12px; font-weight: 600; margin-top: 4px; }
.account-form input { width: 100%; height: auto; box-sizing: border-box; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--control-line); border-radius: 6px; background: transparent; color: var(--ink); }
.account-form .client-actions { margin-top: 8px; }
.account-hint { font-size: 12px; margin: 0; }
/* A reviewer's display name stays for now (hw-2ikp.6.24): the field reads
   as fixed, not as one to type in. */
.account-form input[readonly] { background: var(--subtle); color: var(--muted); border-style: dashed; }
.account-sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.account-sessions li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.account-sessions li[data-current="true"] { border-color: var(--accent); }
.account-session-text { display: grid; gap: 2px; min-width: 0; }
.account-session-text small { color: var(--muted); font-size: 12px; }
.account-sessions .button { flex: none; white-space: nowrap; }
@media (max-width: 600px) {
  /* 16px keeps a phone from zooming into a field it focuses. */
  .account-form input { font-size: 16px; min-height: 44px; }
}

/* The compare view (hw-ptzy.2). Compare swaps the page for the finding's
   lines on the earlier proof above the same lines here, or both whole
   pages. Page images are never tinted: every mark is an overlay. The page
   is white in both themes, so the marks on it keep the light theme's
   --removed, --added, and --annotation shades, and the chrome around it
   takes the theme's. See compareview.js. */
.document-area[data-compare="on"] .canvas-scroll { display: none; }
/* While Compare is open the review panel's Across proofs block repeats
   it, so it hides until Compare closes (hw-ptzy.11). */
body:has(.document-area[data-compare="on"]) .across { display: none; }
.cmp {
  --cmp-zoom: 1; --cmp-removed: #8b394d; --cmp-added: #176951; --cmp-moved: #345b8b;
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 2px 25px 14px; position: relative; overflow: hidden;
}
.cmp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.cmp-what { min-width: 0; }
.cmp-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cmp-line { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink); max-width: 72ch; }
.cmp-line b { font-weight: 600; }
.cmp-note { margin: 0; font-size: 13px; color: var(--muted); }
.cmp-tools { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.cmp-tools button { min-height: 30px; padding: 0 10px; font-size: 12px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); white-space: nowrap; }
.cmp-tools button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.cmp-tools .cmp-hold { touch-action: none; user-select: none; -webkit-user-select: none; }
.cmp[data-show="old"] .cmp-hold { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.cmp-tools .cmp-close { width: 30px; padding: 0; font-size: 18px; border-color: transparent; background: none; }

/* Plates: a label over a rule, after the Bonar packet's plate heads. */
.cmp-plate { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 2px 4px; margin-bottom: 6px; border-bottom: 1.5px solid var(--ink); font-size: 12px; }
.cmp-plate b { font-weight: 600; }
.cmp-plate span { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.cmp-plate .cmp-plate-peek { display: none; }
.cmp[data-show="old"] [data-side="new"] > .cmp-plate > :is(.cmp-plate-name, .cmp-plate-page) { display: none; }
.cmp[data-show="old"] [data-side="new"] > .cmp-plate > .cmp-plate-peek { display: inline; color: var(--accent); }

.cmp-sheet { position: relative; background: #fff; }
.cmp-sheet > img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.cmp-layer { position: absolute; inset: 0; pointer-events: none; }
.cmp-peek { position: absolute; inset: 0; visibility: hidden; }
.cmp[data-show="old"] .cmp-peek { visibility: visible; }
.cmp-mark { position: absolute; box-sizing: border-box; }
.cmp-removed { background: rgb(139 57 77 / .12); border-bottom: 2px dashed var(--cmp-removed); }
.cmp-added { background: rgb(23 105 81 / .12); border-bottom: 2px solid var(--cmp-added); }
.cmp-moved { border-left: 3px solid var(--cmp-moved); margin-left: -7px; }
.cmp-other { outline: 1.5px dotted var(--cmp-moved); outline-offset: 2px; }
.cmp-finding { --own: var(--marker-unruled-page); outline: 2.5px solid var(--own); outline-offset: 4px; border-radius: 2px; }
.cmp-sheet[data-side="old"] .cmp-finding { outline-style: dashed; }
.cmp-finding[data-state="discuss"] { --own: var(--marker-discuss-page); }
.cmp-finding[data-state="todo"] { --own: var(--marker-todo-page); }
.cmp-finding[data-state="done"] { --own: var(--marker-done-page); }
.cmp-finding[data-state="ruled"] { --own: var(--marker-ruled-page); }
.cmp-band { outline: 2px solid var(--focus); outline-offset: 1px; background: rgb(66 108 171 / .12); }

/* Focus: the strips, earlier above this proof, at one scale and one left
   edge, with the quote under them and the map of both pages beside.
   --strip-max, the band's width times 1.4 from compareview.js, caps the
   page cuts so a narrow band is not blown up. It caps only the frames: a
   short word cuts a band a few words wide, and the quote and plates
   under that cap stacked one word a line (hw-ptzy.12). */
.cmp-focus { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: start; }
.cmp-strips { display: grid; gap: 14px; min-width: 0; max-width: max(var(--strip-max, 100%), 60ch); }
.cmp-strip { margin: 0; min-width: 0; max-width: max(var(--strip-max, 100%), 24ch); }
.cmp-frame { position: relative; overflow: hidden; background: #fff; box-shadow: 0 1px 6px var(--shadow); max-width: var(--strip-max, none); }
.cmp-frame > .cmp-sheet { position: absolute; }
.cmp-map { display: grid; grid-template-columns: 104px 104px; gap: 10px; position: sticky; top: 0; }
.cmp-mini { display: block; padding: 0; border-radius: 2px; cursor: zoom-in; text-align: center; }
.cmp-mini:hover:not(:disabled) { background: none; }
.cmp-mini .cmp-sheet { box-shadow: 0 1px 4px var(--shadow); }
.cmp-mini .cmp-removed, .cmp-mini .cmp-added { border-bottom-width: 0; }
.cmp-mini .cmp-removed { background: rgb(139 57 77 / .55); }
.cmp-mini .cmp-added { background: rgb(23 105 81 / .55); }
.cmp-mini :is(.cmp-finding, .cmp-moved, .cmp-other) { display: none; }
.cmp-mini-label { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }

/* The quote: the finding's line on each proof, the differing words
   struck or underlined as well as colored. */
.cmp-quote { display: grid; gap: 3px; padding: 7px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cmp-q { display: flex; gap: 12px; align-items: baseline; min-width: 0; font-size: 15px; line-height: 1.5; }
.cmp-q-label { flex: none; width: 96px; font-size: 11px; color: var(--muted); }
.cmp-q-text { min-width: 0; overflow-wrap: anywhere; }
.cmp-q del { color: var(--removed); background: var(--removed-bg); text-decoration: line-through; text-decoration-thickness: 1px; border-radius: 2px; padding: 0 2px; }
.cmp-q ins { color: var(--added); background: var(--added-bg); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; border-radius: 2px; padding: 0 2px; }
.cmp-gap, .cmp-q-none { color: var(--faint); }

/* Whole pages: two-up, scroll in step. compareview.js sets each pane's
   --cmp-zoom, a multiple of its fit width, and its 12 px margin is
   PANE_MARGIN in comparepages.js (hw-ptzy.2.4). */
/* The two panes take the shares compareview.js sets in --cmp-left and
   --cmp-right, with the divider's gutter between them. Its small dot is
   the only mark of it until the pointer comes near (hw-ptzy.2.4). */
.cmp-two { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, var(--cmp-left, 1fr)) 16px minmax(0, var(--cmp-right, 1fr)); }
.cmp-split { position: relative; display: flex; align-items: center; justify-content: center; cursor: col-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
.cmp-split-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .55; transition: transform .12s ease, opacity .12s ease; }
.cmp-split:hover .cmp-split-dot, .cmp-two[data-splitting] .cmp-split-dot { opacity: 1; transform: scale(1.5); background: var(--accent); }
.cmp-two[data-splitting], .cmp-two[data-splitting] * { cursor: col-resize; user-select: none; }
.cmp-pane { margin: 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.cmp-scroll { position: relative; flex: 1; min-height: 0; overflow: auto; background: var(--ground); scrollbar-width: thin; }
.cmp-scroll[data-drag="ready"] { cursor: grab; }
.cmp-scroll[data-drag="dragging"], .cmp-scroll[data-drag="dragging"] * { cursor: grabbing; user-select: none; }
.cmp-scroll > .cmp-sheet { margin: 12px auto; width: calc((100% - 24px) * var(--cmp-zoom)); box-shadow: 0 2px 10px var(--shadow); }

.cmp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11px; color: var(--muted); }
.cmp-legend span::before { content: ""; display: inline-block; box-sizing: border-box; width: 18px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.cmp-legend .lg-finding::before { outline: 2px solid var(--muted); outline-offset: -2px; border-radius: 2px; }
.cmp-legend .lg-removed::before { background: var(--removed-bg); border-bottom: 2px dashed var(--removed); }
.cmp-legend .lg-added::before { background: var(--added-bg); border-bottom: 2px solid var(--added); }
.cmp-legend .lg-moved::before { width: 3px; background: var(--annotation-line); margin-right: 8px; }
.cmp-legend .lg-other::before { outline: 1.5px dotted var(--annotation-line); outline-offset: -2px; }

/* A narrow document area, an iPad in portrait with the panel open, or a
   phone, stacks what sits side by side. */
@container (max-width: 720px) {
  .cmp { padding: 0 10px 8px; gap: 8px; }
  .cmp-head { flex-wrap: wrap; }
  /* The buttons take a row of their own under the head line and wrap
     there, so none runs off a phone's edge (hw-ptzy.8). Close moves to
     the head's top right corner, beside the eyebrow, so it never takes a
     row alone. */
  .cmp-head { position: relative; }
  .cmp-what { padding-right: 36px; }
  .cmp-tools { flex: 1 1 100%; min-width: 0; justify-content: flex-start; }
  .cmp-tools .cmp-close { position: absolute; top: -6px; right: 0; }
  .cmp-two { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, var(--cmp-left, 1fr)) 14px minmax(0, var(--cmp-right, 1fr)); }
  .cmp-split, .cmp-two[data-splitting], .cmp-two[data-splitting] * { cursor: row-resize; }
  /* Tighter steps between the strips and the quote give back the room
     the folded panel's handle takes on a phone, so both quote rows still
     show above the legend (hw-mh87.76). */
  .cmp-strips { gap: 8px; }
  .cmp-quote { padding: 5px 0; }
  .cmp-q { font-size: 14px; gap: 8px; }
  .cmp-q-label { width: 70px; }
  .cmp-focus { grid-template-columns: minmax(0, 1fr); }
  .cmp-map { position: static; grid-template-columns: 84px 84px; }
  .cmp-legend { gap: 4px 12px; }
}
/* A phone's toolbar has no room for Compare, so it opens from the Across
   proofs block instead. */
.across-compare { display: none; }
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .list-controls #compare-toggle { display: none; }
  .across-compare { display: inline-flex; margin-top: 10px; }
}
.cmp-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.cmp-footnote { margin: 0; font-size: 11px; color: var(--faint); }
.cmp-q-word del, .cmp-q-word ins { padding: 0 1px; border-radius: 1px; font-weight: 600; }

/* The project picker (hw-395k.5): the projects on the left, the chosen
   project's card on the right. On a phone the list fills the screen and a
   tap shows the card in its place. */
dialog.project-picker { width: min(1080px, calc(100vw - 48px)); height: min(700px, calc(100dvh - 48px)); max-height: none; overflow: hidden; font-size: 13px; }
dialog.project-picker[open] { display: grid; grid-template-columns: 360px minmax(0, 1fr); }
.picker-list-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line); background: var(--subtle); }
.picker-head { display: contents; }
.picker-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.picker-close { position: absolute; right: 12px; top: 12px; z-index: 1; width: 32px; height: 32px; font-size: 22px; line-height: 1; color: var(--muted); }
.picker-search { display: flex; align-items: center; gap: 8px; height: 38px; margin: 14px 14px 10px; padding: 0 10px; background: var(--surface); border: 1px solid var(--control-line); border-radius: 8px; }
.picker-search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.picker-search svg { flex: none; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.picker-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.picker-search input::placeholder { color: var(--faint); }
.picker-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 14px 10px; }
.picker-kinds { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
.picker-kinds[hidden] { display: none; }
.picker-kind { padding: 4px 9px; border-radius: 0; font-size: 12px; color: var(--muted); }
.picker-kind + .picker-kind { border-left: 1px solid var(--line); }
.picker-kind[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.picker-sort { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 4px 6px; font-size: 12px; font-weight: 550; color: var(--ink); }
.picker-sort .zoom-caret { fill: none; stroke: currentColor; stroke-width: 1.5; }
.picker-toggles { display: contents; }
.picker-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); white-space: nowrap; }
.picker-toggle[hidden] { display: none; }
.picker-toggle b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.picker-toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.picker-toggle[aria-pressed="true"] b { color: inherit; }
.picker-list { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 12px; }
.picker-group-title { padding: 12px 8px 5px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.picker-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 10px 8px 12px; border-radius: 8px; cursor: pointer; }
.picker-row:hover { background: var(--hover); }
.picker-row[aria-selected="true"] { background: var(--accent-soft); }
.picker-row[aria-selected="true"]::before { content: ""; position: absolute; left: 3px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--accent); }
.picker-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.picker-row[data-archived="true"] .picker-name { color: var(--muted); font-weight: 550; }
.picker-pin-mark { margin-right: 6px; font-size: 11px; color: var(--muted); }
.picker-meta { grid-column: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.picker-badge { grid-column: 2; grid-row: 1 / span 2; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.picker-badge[data-kind="done"] { border-color: transparent; background: transparent; color: var(--added); }
.picker-badge[data-kind="intake"] { border-color: var(--accent); color: var(--accent); }
.picker-badge[data-kind="archived"] { border-color: transparent; background: transparent; color: var(--muted); font-weight: 550; }
.picker-badge[data-kind="draft"] { border-style: dashed; color: var(--muted); font-weight: 600; }
/* Register a project (hw-kyy3.13): the button under the list, the form's
   steps with their owner badges, and a draft's key in full. */
.picker-register { margin: 0 14px 10px; padding: 8px 10px; border: 1px dashed var(--control-line); border-radius: 8px; background: var(--surface); color: var(--accent); font-size: 13px; font-weight: 600; text-align: left; }
.picker-register[hidden] { display: none; }
.picker-register[aria-pressed="true"] { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.picker-steps { display: grid; gap: 7px; margin: 0; padding-left: 20px; font-size: 13px; }
.picker-steps li { padding-left: 2px; }
.picker-steps li .picker-owner { margin-left: 8px; }
.picker-key { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.picker-none.picker-draft-note { margin-top: 10px; }
.picker-empty { padding: 16px 12px; color: var(--muted); }
.picker-hint { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.picker-hint kbd, .picker-open kbd { padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.picker-hint kbd + kbd { margin-left: 3px; }
.picker-card { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.picker-card-body { flex: 1; min-height: 0; overflow: auto; padding: 26px 30px 18px; }
.picker-back { display: none; }
.picker-eyebrow { margin: 0; font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.picker-title { margin: 4px 40px 2px 0; font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.picker-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.picker-section { margin-top: 24px; }
.picker-section h4 { margin: 0 0 9px; font-size: 12px; font-weight: 650; color: var(--muted); }
.picker-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.picker-tile { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.picker-tile b { display: block; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.picker-tile span { font-size: 12px; color: var(--muted); }
.picker-tile[data-zero="true"] b { color: var(--faint); }
.picker-tile[data-tile="remaining"][data-zero="false"] { border-color: transparent; background: var(--accent-soft); }
.picker-tile[data-tile="remaining"][data-zero="false"] b { color: var(--accent); }
.picker-proofs { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.picker-proof { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; width: 100%; padding: 9px 12px; border-radius: 0; text-align: left; font-size: 13px; }
.picker-proof + .picker-proof, .picker-more { border-top: 1px solid var(--line); }
/* The list clips its corners, so the ring of the proof chosen sits inside
   it, on the tint of the project chosen (hw-395k.14). */
.picker-proof:focus-visible { outline-offset: -3px; background: var(--accent-soft); }
.picker-proof-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.picker-proof-date { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.picker-proof-last { color: var(--muted); font-size: 11.5px; font-style: italic; white-space: nowrap; }
.picker-state { padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 650; white-space: nowrap; color: var(--muted); background: var(--subtle); }
.picker-state[data-state="working"] { background: var(--button); color: var(--button-ink); }
.picker-state[data-state="intake"], .picker-state[data-state="ready"] { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.picker-more { display: block; width: 100%; padding: 8px 12px; border-radius: 0; text-align: left; font-size: 12.5px; font-weight: 550; color: var(--accent); }
.picker-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.picker-chip { padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--subtle); font-size: 12px; }
.picker-none { margin: 0; color: var(--faint); font-size: 12.5px; }
.picker-members[hidden] { display: none; }
/* Members on the card (hw-kyy3.16): one row per member with initials,
   name and line, chips, and Change; Change and the adder open as forms
   in place, in the Users panel's form style. */
.picker-members-head { display: flex; align-items: baseline; gap: 12px; }
.picker-members-head h4 { margin: 0; }
.picker-members-group { display: grid; gap: 6px; margin-top: 12px; }
.picker-members-group-title { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.picker-member-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.picker-member + .picker-member { border-top: 1px solid var(--line); }
.picker-member-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; }
.picker-member-text { display: grid; min-width: 0; }
.picker-member-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-member-line { color: var(--muted); font-size: 12px; }
.picker-member-changed { color: var(--accent); font-size: 12px; }
.picker-member-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.picker-member-chips:empty { display: none; }
.picker-member-form { margin: 0 12px 12px; }
.picker-member-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.picker-member-buttons { flex-wrap: wrap; }
.picker-member-form [hidden], .picker-adder [hidden] { display: none !important; }
.picker-members-links { display: grid; gap: 8px; }
.picker-members-status { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.picker-members-status:empty { display: none; }
.picker-adder { margin: 10px 0 0; }
.picker-adder-field { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 6px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); }
.picker-adder-field:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.picker-adder .picker-adder-input { flex: 1 1 140px; min-width: 0; padding: 4px 2px; border: 0; outline: none; background: transparent; }
.picker-adder-token { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }
.picker-adder-untoken { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font: inherit; cursor: pointer; }
/* Both classes, so the grid beats .account-match's display: block,
   which comes later in the sheet: the username line sits under the name
   (N488 still). */
.account-match.picker-adder-match { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
.account-match.picker-adder-match small { grid-column: 1; color: var(--muted); font-size: 12px; }
.picker-adder-match .users-chip { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.picker-adder-match[aria-disabled="true"] { color: var(--muted); cursor: default; }
.picker-adder-new { color: var(--accent); font-weight: 600; }
@media (max-width: 650px) {
  .picker-member-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .picker-member-chips { grid-column: 2; grid-row: 2; justify-content: flex-start; }
  .picker-member-form input:not([type="checkbox"]), .picker-adder input:not([type="checkbox"]) { font-size: 16px; min-height: 44px; }
  .picker-member-change, .picker-adder-untoken { min-height: 44px; min-width: 44px; }
}
/* The card's tabs and Settings view (hw-kyy3.14): rows of label and
   value in the card's own type, one owner badge per group, and the form
   in place of the rows once Edit is pressed. */
.picker-tabs { display: flex; gap: 2px; margin: 16px 0 0; border-bottom: 1px solid var(--line); }
.picker-tab { appearance: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 12px; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.picker-tab[aria-selected="true"] { color: inherit; border-bottom-color: var(--accent); }
.picker-settings-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.picker-settings-head h4 { margin: 0; }
.picker-owner { padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.picker-kv { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 13px; }
.picker-kv dt { color: var(--muted); }
.picker-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.picker-kv dd[data-blank="true"] { color: var(--faint); }
.picker-kv input, .picker-kv select, .picker-kv textarea { width: 100%; box-sizing: border-box; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; font: inherit; font-size: 13px; }
.picker-kv textarea { resize: vertical; min-height: 4.2em; line-height: 1.4; }
.picker-kv dd .picker-none { margin-top: 3px; }
.picker-settings-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.picker-settings-status { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.picker-settings-error { margin: 8px 0 0; font-size: 12.5px; color: var(--danger, #b42318); }
.picker-settings-error:empty, .picker-settings-status:empty { display: none; }
/* The form's fields end before the dialog's close button, a group's note
   stands off its first row, and a refused field carries its message. */
.picker-settings { padding-right: 24px; }
.picker-settings-note { margin-bottom: 10px; }
.picker-field-error { margin: 3px 0 0; font-size: 12.5px; color: var(--danger, #b42318); }
.picker-field-error:empty { display: none; }
.picker-kv [aria-invalid="true"] { border-color: var(--danger, #b42318); }
.rights-linklike { appearance: none; border: 0; padding: 0; background: none; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.picker-foot { display: flex; align-items: center; gap: 10px; padding: 14px 30px; border-top: 1px solid var(--line); }
.picker-foot .grow { flex: 1; }
.picker-pin { height: 36px; padding: 0 14px; border: 1px solid var(--control-line); border-radius: 8px; font-weight: 600; }
.picker-pin[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.picker-open { min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13px; }
.picker-open kbd { margin-left: 4px; background: transparent; color: inherit; border-color: color-mix(in srgb, var(--button-ink) 45%, transparent); }
@media (max-width: 1000px) {
  dialog.project-picker[open] { grid-template-columns: 300px minmax(0, 1fr); }
  .picker-card-body { padding: 22px 22px 14px; }
  .picker-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker-foot { padding: 12px 22px; }
}
@media (max-width: 650px) {
  dialog.project-picker { width: 100vw; height: 100dvh; max-width: none; margin: 0; border: 0; border-radius: 0; }
  dialog.project-picker[open] { grid-template-columns: minmax(0, 1fr); }
  dialog.project-picker[data-view="list"] .picker-card, dialog.project-picker[data-view="card"] .picker-list-pane { display: none; }
  .picker-kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .picker-kv dd { margin-bottom: 9px; }
  .picker-list-pane { border-right: 0; background: var(--surface); }
  .picker-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 0 16px; }
  .picker-head h2 { position: static; width: auto; height: auto; overflow: visible; clip-path: none; margin: 0; font-size: 18px; }
  .picker-close { position: static; width: 44px; height: 44px; }
  .picker-settings { padding-right: 0; }
  .picker-search { height: 44px; margin: 8px 16px 10px; }
  .picker-search input { font-size: 16px; }
  .picker-filters { padding: 0 16px 8px; }
  .picker-toggle, .picker-kind, .picker-sort { min-height: 36px; }
  .picker-row { padding: 11px 12px 11px 14px; }
  .picker-name { font-size: 15px; }
  .picker-meta { font-size: 13px; }
  .picker-hint { display: none; }
  .picker-card-body { padding: 4px 18px 18px; }
  .picker-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin-left: -4px; font-size: 15px; font-weight: 600; color: var(--accent); }
  .picker-title { font-size: 22px; margin-right: 0; }
  .picker-proof { grid-template-columns: minmax(0, 1fr) auto; min-height: 44px; font-size: 14px; }
  .picker-proof-date, .picker-proof-last { display: none; }
  .picker-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .picker-pin, .picker-open { min-height: 44px; }
  .picker-open { flex: 1; font-size: 15px; }
  .picker-open kbd { display: none; }
}
/* Master search (hw-5x0n.30.204.5), Stephen's Q4 B: two panes with a
   preview. The category tabs run down the left, the hits fill the middle,
   and the preview takes the right. At 900px and under one column shows,
   the tabs scroll sideways over the hits, and the preview is a second
   step. A phone gets a full screen sheet. See msearchview.js. */
.msearch-open { display: inline-flex; align-items: center; gap: 6px; }
.msearch-open[hidden] { display: none; }
.msearch-open svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
dialog.msearch { width: min(1180px, calc(100vw - 48px)); height: min(760px, calc(100dvh - 48px)); max-height: none; margin-top: 4vh; overflow: hidden; font-size: 13px; }
dialog.msearch[open] { display: flex; flex-direction: column; }
.msearch-head { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.msearch-grab { display: none; }
.msearch-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.msearch-field { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; height: 42px; padding: 0 12px; background: var(--surface); border: 1px solid var(--control-line); border-radius: 9px; }
.msearch-field:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.msearch-field svg { flex: none; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.msearch-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.msearch-field input::-webkit-search-cancel-button { display: none; }
.msearch-clear { flex: none; width: 36px; height: 36px; font-size: 20px; line-height: 1; color: var(--muted); }
.msearch-clear[hidden] { display: none; }
.msearch-close { flex: none; height: 36px; padding: 0 12px; border: 1px solid var(--control-line); border-radius: 8px; font-weight: 600; color: var(--muted); }
.msearch-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 380px); }
.msearch-rail { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--subtle); }
.msearch-chips { display: flex; flex-direction: column; gap: 2px; }
.msearch-chips[hidden] { display: none; }
.msearch-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 10px; border-radius: 8px; text-align: left; font-size: 13px; color: var(--ink); }
.msearch-chip:hover { background: var(--hover); }
.msearch-chip[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.msearch-chip-count { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--muted); }
.msearch-chip[aria-selected="true"] .msearch-chip-count { color: inherit; }
.msearch-toggles { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 4px 0; border-top: 1px solid var(--line); }
.msearch-toggle { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 4px 10px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); white-space: nowrap; }
.msearch-toggle[hidden] { display: none; }
.msearch-toggle b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.msearch-toggle b:empty { display: none; }
.msearch-toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.msearch-results { min-height: 0; overflow: auto; padding: 6px 12px 16px; }
dialog.msearch[data-phase="loading"] .msearch-results { opacity: .65; }
.msearch-cat { padding-top: 10px; }
.msearch-cat-head { display: flex; align-items: baseline; gap: 8px; padding: 6px 6px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.msearch-cat-head b { font-weight: 700; color: var(--muted); }
.msearch-item { margin: 2px 0 8px; }
.msearch-item-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; padding: 4px 6px 2px; }
.msearch-item-title { font-weight: 650; font-size: 13.5px; }
.msearch-item-meta { color: var(--muted); font-size: 12px; }
.msearch-item-state { padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 650; color: var(--muted); background: var(--subtle); }
.msearch-item-count { margin-left: auto; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.msearch-option { position: relative; display: flex; align-items: baseline; gap: 10px; min-height: 30px; padding: 5px 8px 5px 14px; border-radius: 7px; cursor: pointer; line-height: 1.45; }
.msearch-option:hover { background: var(--hover); }
.msearch-option[aria-selected="true"] { background: var(--accent-soft); }
.msearch-option[aria-selected="true"]::before { content: ""; position: absolute; left: 3px; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--accent); }
.msearch-label { flex: none; width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.msearch-snippet { min-width: 0; overflow-wrap: anywhere; }
.msearch-snippet mark, .msearch-preview mark { background: var(--mark); color: var(--mark-ink); border-radius: 2px; padding: 0 1px; outline: 1px solid color-mix(in srgb, var(--mark-ink) 35%, transparent); }
.msearch-more-hits, .msearch-more-groups, .msearch-show-category { color: var(--accent); font-weight: 600; font-size: 12.5px; }
.msearch-divider { display: flex; align-items: center; gap: 10px; margin: 10px 6px 6px; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.msearch-divider::before, .msearch-divider::after { content: ""; flex: 1; border-top: 1px dashed var(--line); }
.msearch-empty { margin: 24px 8px; color: var(--muted); }
.msearch-preview { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-left: 1px solid var(--line); }
.msearch-preview-head { padding: 16px 18px 8px; }
.msearch-back { display: none; }
.msearch-preview-eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.msearch-preview-title { margin: 4px 0 2px; font-size: 17px; font-weight: 650; }
.msearch-preview-meta { margin: 0; color: var(--muted); font-size: 12.5px; }
.msearch-preview-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 18px 12px; }
.msearch-preview-hit { display: flex; gap: 10px; margin: 12px 0 0; line-height: 1.5; }
.msearch-preview-none { margin: 24px 18px; color: var(--faint); }
.msearch-preview-foot { padding: 12px 18px; border-top: 1px solid var(--line); }
.msearch-preview-open { min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13px; }
.msearch-preview-open kbd { margin-left: 4px; padding: 1px 5px; border: 1px solid color-mix(in srgb, var(--button-ink) 45%, transparent); border-radius: 4px; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.msearch-crop { position: relative; overflow: hidden; height: 300px; border: 1px solid var(--line); border-radius: 8px; background: var(--page-ground, var(--subtle)); }
.msearch-sheet { position: absolute; left: 0; right: 0; top: 0; }
.msearch-sheet img { display: block; width: 100%; height: auto; }
.msearch-box { position: absolute; box-sizing: border-box; border: 2px solid var(--accent); border-radius: 3px; background: color-mix(in srgb, var(--mark) 45%, transparent); }
.msearch-compare { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; margin: 6px 0 0; }
.msearch-compare dt { color: var(--muted); font-size: 12px; }
.msearch-compare dd { margin: 0; overflow-wrap: anywhere; }
.msearch-foot { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.msearch-status { flex: 1; min-width: 0; }
.msearch-hint kbd { margin: 0 3px; padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 1100px) {
  .msearch-open-word { display: none; }
}
@media (max-width: 900px) {
  dialog.msearch { width: min(640px, calc(100vw - 32px)); }
  .msearch-body { display: flex; flex-direction: column; }
  .msearch-rail { flex-direction: row; align-items: center; overflow-x: auto; overflow-y: hidden; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .msearch-chips { flex-direction: row; flex: none; }
  .msearch-chip { flex: none; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
  .msearch-toggles { flex-wrap: nowrap; flex: none; padding: 0 0 0 8px; border-top: 0; border-left: 1px solid var(--line); }
  .msearch-toggle { min-height: 44px; }
  .msearch-results { flex: 1; }
  .msearch-option { min-height: 44px; }
  .msearch-preview { display: none; border-left: 0; }
  dialog.msearch[data-step="preview"] .msearch-preview { display: flex; flex: 1; }
  dialog.msearch[data-step="preview"] .msearch-rail, dialog.msearch[data-step="preview"] .msearch-results { display: none; }
  .msearch-back { display: flex; align-items: center; width: fit-content; min-height: 44px; margin: -6px 0 4px -4px; padding: 0 4px; font-size: 15px; font-weight: 600; color: var(--accent); }
  .msearch-preview-open { width: 100%; min-height: 44px; font-size: 15px; }
  .msearch-preview-open kbd { display: none; }
  .msearch-hint { display: none; }
}
@media (max-width: 650px) {
  dialog.msearch { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  dialog.msearch:not(.sheet-dragging) { transition: transform .2s ease; }
  .msearch-head { flex-wrap: wrap; padding: 6px 12px 10px; }
  .msearch-grab { display: block; width: 100%; height: 14px; }
  .msearch-grab::before { content: ""; display: block; width: 40px; height: 5px; margin: 4px auto 0; border-radius: 3px; background: var(--line); }
  .msearch-field { order: 2; flex-basis: 100%; height: 44px; }
  .msearch-close { order: 1; min-height: 44px; margin-left: auto; }
  .msearch-clear { order: 3; position: absolute; right: 16px; bottom: 14px; width: 40px; height: 40px; }
  .msearch-head h2 { position: static; order: 1; width: auto; height: auto; overflow: visible; clip-path: none; margin: 0; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { :root:not([data-motion="full"]) dialog.msearch { transition: none; } }
:root[data-motion="reduced"] dialog.msearch { transition: none; }
/* A master search landing's flash (hw-5x0n.30.204.6): a box over each
   matched word, held 700 ms and faded over 800 ms, drawn over the page or
   the panel and never moving text. Reduced motion holds it and drops the
   fade. The accent outline keeps it from resting on color alone. */
.hit-layer { position: absolute; inset: 0; pointer-events: none; }
.page-hit, .text-hit { position: absolute; box-sizing: border-box; border: 2px solid var(--accent); border-radius: 3px; background: color-mix(in srgb, var(--mark) 45%, transparent); pointer-events: none; animation: hit-fade 1.5s linear forwards; }
.text-hit { position: fixed; z-index: 70; }
.hit-flash { outline: 2px solid var(--accent); outline-offset: 2px; background: color-mix(in srgb, var(--mark) 45%, transparent); animation: hit-fade-outline 1.5s linear forwards; }
@keyframes hit-fade { 0%, 46% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hit-fade-outline { 0%, 46% { outline-color: var(--accent); } 100% { outline-color: transparent; background: transparent; } }
@media (prefers-reduced-motion: reduce) { :root:not([data-motion="full"]) .page-hit, :root:not([data-motion="full"]) .text-hit, :root:not([data-motion="full"]) .hit-flash { animation: none; } }
:root[data-motion="reduced"] .page-hit, :root[data-motion="reduced"] .text-hit, :root[data-motion="reduced"] .hit-flash { animation: none; }
/* The Rights package (hw-uq6s.4.2, design 5.2 to 5.6) lies over the
   Review package as the Index package does: the bar stays, and only the
   list and the card scroll. From an iPad up the card sits beside the
   list; on a phone it is a sheet over the whole package, under the bar,
   with a back link. A status
   chip and a footer mark carry their words, never color alone. */
.workspace > .rights-workspace { position: absolute; inset: 0; z-index: 29; display: flex; min-height: 0; background: var(--surface); }
.workspace > .rights-workspace[hidden] { display: none; }
/* The rights manager's page keeps its notice for a desk without the
   Rights package (hw-uq6s.23.4). */
body[data-mode="rights"] .workspace > :not(.rights-workspace):not(.rd-none) { visibility: hidden; }
body[data-mode="rights"] #key-notice, body[data-mode="rights"] #key-hint { visibility: visible; }
body[data-mode="rights"] :is(#focus-toggle, .region-focus, #add-edit-menu, #edits-open) { display: none; }
body[data-mode="rights"] .app { min-height: 0; overflow: clip; }
:root:has(body[data-mode="rights"]) { overflow: hidden; }
.rights-column { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
/* The Mail home (hw-wfrm.5, P4): Mail's own tab, laid over the review as
   Copyrights is. The page scrolls under its head of Inbox, Templates,
   and Settings, and the inbox draws in the page column. */
.workspace > .mail-workspace { position: absolute; inset: 0; z-index: 29; display: flex; flex-direction: column; min-height: 0; overflow: auto; background: var(--surface); --page-max: 860px; }
.workspace > .mail-workspace[hidden] { display: none; }
body[data-mode="mail"] .workspace > :not(.mail-workspace):not(.rd-none) { visibility: hidden; }
body[data-mode="mail"] #key-notice, body[data-mode="mail"] #key-hint { visibility: visible; }
body[data-mode="mail"] :is(#focus-toggle, .region-focus, #add-edit-menu, #edits-open) { display: none; }
body[data-mode="mail"] .app { min-height: 0; overflow: clip; }
:root:has(body[data-mode="mail"]) { overflow: hidden; }
.mail-home { display: grid; gap: 12px; padding-block: 14px 32px; }
.mail-home-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mail-home-title { margin: 0; font-size: 18px; font-weight: 650; color: var(--ink); }
.mail-home-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-home-tab.is-on { border-color: var(--accent); background: var(--accent-soft); }
.mail-home-body { display: grid; gap: 10px; }
/* The project mail overview (hw-wfrm.20, P21): the queue counts on one
   wrapping row, a queue with letters in ink and an empty one muted, then the open threads on a
   four-column grid, Correspondent, Last exchange, Next action, and Due,
   that stacks on a phone. */
.mail-overview-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.mail-overview-title { margin: 0; font-size: 15px; font-weight: 650; color: var(--ink); }
.mail-overview-head .rights-sub { margin: 0; }
.mail-overview-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-overview-count { font-variant-numeric: tabular-nums; }
.bar-button.mail-overview-count:not(.is-zero) { color: var(--ink); font-weight: 600; }
.mail-overview-columns, .mail-overview-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 4px 12px; }
.mail-overview-columns { padding: 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.mail-overview-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mail-overview-row { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--subtle); color: inherit; font: inherit; font-size: 13px; line-height: 1.45; text-align: left; cursor: pointer; }
.mail-overview-row:hover { border-color: var(--accent); }
.mail-overview-row > span { display: grid; gap: 2px; align-content: start; min-width: 0; overflow-wrap: anywhere; }
.mail-overview-row .rights-mail-marker.is-awaiting { background: var(--subtle); color: var(--muted); border: 1px solid var(--line); }
.mail-overview-due.is-overdue { color: var(--warning); font-weight: 600; }
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .mail-overview-columns { display: none; }
  .mail-overview-count { min-height: 44px; }
  .mail-overview-row { grid-template-columns: minmax(0, 1fr); }
  .mail-overview-due:empty, .mail-overview-next:empty { display: none; }
}
.rights-head { flex: none; display: grid; gap: 6px; padding-block: 12px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.rights-run { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.rights-facts-line { margin: 0; font-size: 12px; color: var(--muted); }
.rights-facts-line:empty { display: none; }
/* The head keeps the tabs and the tools (desk note b1288e, hw-uq6s.68):
   the print run line shows only when the book could not be loaded. */
.rights-run:empty { display: none; }
/* In the page column the bar's controls outgrow one line, so it wraps
   rather than run past the column, and the field keeps room to read. */
.rights-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
/* With three view tabs the operator's ten controls outgrew the column's
   1032 pixels of content by 74, so off a phone the gaps, buttons, and
   tabs run a little tighter, and the field starts at 160 pixels and grows
   into what is left, about 220 (hw-wm7m.362.2). A phone keeps its rows. */
@media (min-width: 651px) {
  .rights-bar { gap: 6px; }
  .rights-bar > .bar-button { padding-inline: 6px; }
  .rights-views .index-view { padding-inline: 10px; }
}
.rights-filter { flex: 1 1 160px; min-width: 0; }
.rights-filter[aria-invalid="true"] { border-color: var(--removed); }
/* The Quick filter on the Rights views (hw-uq6s.4.19): the Findings
   filter's checklists, quickpanel.js, under the bar. The groups run in a
   wrapping row of cards, as the fixed filters bar lays them, and stack on
   a phone. */
.rights-quick[hidden], .rights-quick-view[hidden] { display: none; }
/* Builder and Code on the Rights views (hw-uq6s.4.22): the Findings
   panel's mode switch, rows, list, and suggestions, filterbar.js. The
   switch heads the panel, as Saved and the switch head the Findings one,
   and the rows line up under it. Code's field is the bar's filter field,
   so Code shows the syntax beside it. */
.rights-quick { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rights-quick > .rights-quick-box { align-self: stretch; }
.rights-quick-box[hidden], .rights-code[hidden] { display: none; }
/* The rows run in a wrapping row, as the Findings panel's Fixed across
   the top lays them, whatever that panel's layout. */
.rights-quick .rights-chips { flex-direction: row; flex-wrap: wrap; align-items: center; max-width: 100%; }
.rights-code { display: grid; gap: 6px; max-width: 720px; font-size: 12px; color: var(--muted); }
.rights-code-hint { margin: 0; }
.rights-syntax { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.rights-syntax dt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); white-space: nowrap; }
.rights-syntax dd { margin: 0; }
@media (max-width: 650px) {
  .rights-syntax { grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
  .rights-syntax dt { white-space: normal; overflow-wrap: anywhere; }
  .rights-syntax dd { margin-bottom: 6px; }
}
.rights-quick .checklist { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; }
.rights-quick .check-group { flex: 0 1 auto; max-width: 460px; }
@media (max-width: 650px) {
  .rights-quick .checklist { flex-direction: column; align-items: stretch; }
  .rights-quick .check-group { max-width: none; }
}
.rights-filter-error { margin: 0; font-size: 12px; color: var(--removed); }
.rights-filter-error:empty { display: none; }
.rights-counts { margin: 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* The Columns button sits at the end of the counts line, not in the bar,
   so the bar keeps to one line (hw-uq6s.25.3). */
/* It wraps so a long step such as Confirm the map from the sheets
   (hw-uq6s.130.7) takes a line of its own on a phone instead of
   squeezing the counts and pushing Columns off the screen. */
.rights-counts-line { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 22px; }
.rights-columns-open { flex: none; font-size: 12px; min-height: 22px; }
/* The bulk confirm of the public domain (hw-uq6s.32) sits beside Columns. */
.rights-pd-confirm { flex: none; margin-left: auto; font-size: 12px; min-height: 22px; }
/* The bulk confirm's one Undo (hw-uq6s.119) sits beside it, or at the
   bar's right when nothing is left to confirm. */
.rights-pd-undo { flex: none; font-size: 12px; min-height: 22px; }
.rights-pd-confirm[hidden] + .rights-pd-undo { margin-left: auto; }
.rights-pd-ask { margin: 6px 0; }
/* The top of a title card (hw-uq6s.32): the foot of the title's first
   page, where the rights lines print, beside the holders and shares. The
   band crops to the page's foot by object-position; the page stays
   paper-white in dark appearance, framed by a rule. */
.rights-glance-body { display: grid; gap: 10px; }
/* Show footer on a settled title card (hw-uq6s.92). */
.rights-footer-row { margin: 0 0 10px; }
/* hw-uq6s.178: the band scrolls sideways along the strip, which
   footerCrop makes wider than the band and as tall as the page's credit
   lines. The image moves up inside the strip to the credits, and the strip
   clips the rest of the page. */
.rights-footer-band { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x pan-y; background: #fff; }
.rights-footer-strip { display: block; max-width: none; padding: 0; border: 0; overflow: hidden; background: #fff; cursor: pointer; }
.rights-footer-strip img { display: block; width: 100%; max-width: none; height: auto; }
.rights-footer-strip:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rights-glance-holders { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.rights-glance-name { overflow-wrap: anywhere; }
.rights-glance-total { margin: 4px 0 0; font-weight: 600; }
.rights-glance-total.is-open { color: var(--warning); }
.rights-glance-total.is-over { color: var(--removed); }
.rights-pd-ask-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rights-columns-list .col-menu-list { display: grid; gap: 2px; margin: 4px 0 8px; padding: 0; list-style: none; font-size: 13px; }
.rights-columns-list label { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.rights-columns-actions { display: flex; justify-content: flex-end; }
.rights-main { flex: 1; min-height: 0; display: flex; }
/* The list's rows carry their own 24 pixels inside, so they line up
   with the head's words in the page column. */
.rights-list { flex: 1; min-width: 0; overflow: auto; container-type: inline-size; padding-bottom: 24px; }
.rights-row-head, .rights-row { display: grid; align-items: center; gap: 4px 14px; padding: 9px 24px; text-align: left; }
/* The column heads sort the list (hw-uq6s.4.19, sorthead.js): a click
   sorts ascending, a second descending, a third turns the sort off. The
   head's table stays at the top while the list scrolls. */
.rights-sort-head { position: sticky; top: 0; z-index: 1; }
.rights-row-head { padding-top: 7px; padding-bottom: 7px; background: var(--subtle); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sort-head-button { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; white-space: nowrap; margin: -3px -5px; padding: 3px 5px; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; border-radius: 4px; }
.sort-head-button:hover { color: var(--ink); background: var(--hover); }
.sort-head-cell[aria-sort="ascending"], .sort-head-cell[aria-sort="descending"] { color: var(--accent); }
.sort-head-cell { display: flex; align-items: center; min-width: 0; }
.sort-head-cell.rights-num { justify-content: flex-end; }
.sort-head-cell.rights-num .sort-head-button { flex-direction: row-reverse; }
.sort-head-arrow { display: inline-block; min-width: .8em; font-size: 11px; line-height: 1; }
/* The Sort menu takes the heads' place where a narrow list folds its rows. */
.rights-sort-menu { display: none; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--subtle); font-size: 12px; color: var(--muted); }
.sort-select-field { min-width: 0; max-width: 100%; padding: 4px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; color-scheme: inherit; }
.rights-gen-sort .sort-head-row { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 2px 0 6px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* Each list's grid tracks, one variable per column, so a layout a person
   sets (hw-uq6s.25.3, colgrid.js) can name them in --rights-tracks on the
   list: rightsColumns in rightsview.js gives each column its variable,
   and scripts/test-stylesheet.test.mjs holds the two in step. */
.rights-list {
  --rt-titles-marker: 44px; --rt-titles-title: minmax(0, 1.6fr); --rt-titles-tune: minmax(0, .8fr); --rt-titles-holder: minmax(0, 1.1fr);
  --rt-titles-words: minmax(0, 1fr); --rt-titles-music: minmax(0, 1fr);
  --rt-titles-status: 140px; --rt-titles-units: 44px;
  --rt-holders-name: minmax(0, 1fr); --rt-holders-relation: minmax(0, 1.4fr); --rt-holders-state: 210px; --rt-holders-royalty: 110px;
  --rt-holders-units: 70px; --rt-holders-titles: 60px; --rt-holders-contact: 96px;
}
/* Beside an open card the list is 820 to 980 pixels wide, so Title takes
   the larger share and a floor of 200, and the fixed columns give room. */
.rights-workspace[data-card="side"] .rights-list {
  --rt-titles-marker: 40px; --rt-titles-title: minmax(200px, 2fr); --rt-titles-status: 116px;
}
/* Titles: the number, the title, its tune and holders (desk note b1288e,
   hw-uq6s.68), Words and Music, the works' credits (hw-uq6s.25.2), then
   status and units. The Footer column left by desk note 930676
   (hw-uq6s.74). */
.rights-row-head.is-titles, .rights-row.is-titles { grid-template-columns: var(--rights-tracks, var(--rt-titles-marker) var(--rt-titles-title) var(--rt-titles-tune) var(--rt-titles-holder) var(--rt-titles-words) var(--rt-titles-music) var(--rt-titles-status) var(--rt-titles-units)); }
.rights-credit { min-width: 0; font-size: 12px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.rights-tune-cell { text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.rights-holder-cell { display: grid; align-content: start; gap: 2px; color: var(--ink); }
#rights-psalter-ask[open] { display: flex; flex-direction: column; overflow: hidden; }
#rights-psalter-ask > header, #rights-psalter-ask > p, #rights-psalter-ask > footer { flex: none; }
#rights-psalter-items { overflow: auto; min-height: 0; overflow-wrap: anywhere; margin: 0; padding: 12px 24px 0 40px; }
#rights-psalter-items p { margin: 6px 0 18px; }
#rights-psalter-ask > footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
.rights-psalter-row > td { grid-column: 1 / -1; }
.rights-psalter { min-width: 0; overflow-wrap: anywhere; }
.rights-psalter > p { margin: 0 0 6px; }
.rights-psalter details { margin-bottom: 6px; }
.rights-psalter summary { cursor: pointer; color: var(--muted); }
.rights-psalter > button { margin-right: 10px; }
.rights-psalter .rights-rule-form input { min-width: 0; width: 100%; box-sizing: border-box; }
/* A proposed holder says Candidate after its name, as a title does
   (desk note 062b4f, hw-uq6s.104), in place of italics nothing
   explained. */
.rights-holder-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
.rights-holder-line > .rights-candidate, .rights-holder-line > .rights-pulled { margin-left: 0; }
/* A Holders row's name, then Candidate or Verified on the same line when
   it fits (desk note 007fe5, hw-uq6s.110). */
.rights-name-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.rights-name-line > .rights-holder-mark { margin-left: 0; }
.rights-holder-name.is-candidate { font-style: normal; }
.rights-row-head.is-holders, .rights-row.is-holders { grid-template-columns: var(--rights-tracks, var(--rt-holders-name) var(--rt-holders-relation) var(--rt-holders-state) var(--rt-holders-contact) var(--rt-holders-royalty) var(--rt-holders-units) var(--rt-holders-titles)); }
/* A Holders row (hw-kgp6.12): the relation sentence, whose names open
   their cards as .rights-holder-link, and one state chip in this book. */
.rights-relation { color: var(--ink); font-size: 13px; }
/* A holder that deals for itself: a muted dash, as Royalty marks none
   (Dan's desk note 553d54, hw-kgp6.32). */
.rights-relation-none { color: var(--muted); }
.rights-holder-kind { flex-basis: 100%; font-size: 11px; }
.rights-state { display: inline-flex; align-items: center; gap: .3em; padding: 2px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.rights-state.is-ask { color: var(--warning); background: color-mix(in srgb, var(--warning-dot) 22%, var(--surface)); }
.rights-state.is-quiet { color: var(--muted); border-color: var(--line); background: var(--surface); }
.rights-state.is-out { padding-inline: 0; color: var(--muted); font-style: italic; font-weight: 400; background: none; }
/* hw-kgp6.6: a holder's name on the owner card opens its card and reads
   as the words around it, the owner's heading included. */
.rights-map-holder { font: inherit; padding: 0; text-align: left; }
/* hw-kgp6.9: a holder's name in a list row opens its card, as a link
   reads; Not in this book marks a holder on the desk only; Show all sits
   right after the Holders counts. */
.rights-holder-link { color: var(--accent); cursor: pointer; }
.rights-holder-link:hover { text-decoration: underline; }
.rights-not-in-book { color: var(--muted); font-size: 12px; }
.rights-in-book { flex: none; font-size: 12px; min-height: 22px; margin-right: auto; }
/* The counts line's handled phrase is a link inside the sentence: the
   line's own size and no padding (hw-kgp6.21). */
.rights-handled-link { font: inherit; padding: 0; color: var(--accent); }
.rights-map-choices { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.rights-map-choice { display: inline-flex; align-items: center; gap: 6px; }
/* The engines draw a dark-mode radio as a solid light dot, checked or
   not, so the choices draw their own: an empty ring, and the picked one
   filled in the accent with its label in the accent. */
.rights-map-choice input, .rights-adminfield-choice input { appearance: none; -webkit-appearance: none; flex: none; box-sizing: border-box; width: 16px; height: 16px; margin: 0; border: 1.5px solid var(--control-line); border-radius: 50%; background: transparent; cursor: pointer; }
.rights-map-choice input:checked, .rights-adminfield-choice input:checked { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--subtle); }
.rights-map-choice input:focus-visible, .rights-adminfield-choice input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rights-map-choice:has(input:checked) { color: var(--accent); font-weight: 600; }
/* Set administrator (hw-kgp6, hw-kgp6.11): the sheet scrolls its body,
   not its buttons; the summary leads the preview, then a line for each
   holder that changes or is left. */
#rights-map-set[open] { display: flex; flex-direction: column; overflow: hidden; }
#rights-map-set > header, #rights-map-set > p, #rights-map-set > footer { flex: none; }
#rights-map-set > p { margin: 12px 20px 0; font-size: 13px; overflow-wrap: anywhere; }
.rights-map-set-body { display: grid; gap: 8px; overflow: auto; min-height: 0; padding: 12px 20px 0; }
.rights-map-set-body > p { margin: 0; }
.rights-map-set-field { display: grid; gap: 4px; font-size: 13px; }
.rights-map-set-field[hidden] { display: none; }
.rights-map-set-field input { box-sizing: border-box; width: 100%; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; color-scheme: inherit; }
.rights-map-set-scope { display: grid; gap: 4px; margin: 0; padding: 0; border: 0; font-size: 13px; }
.rights-map-set-scope > legend { padding: 0; margin-bottom: 4px; }
.rights-map-set-books { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.rights-map-set-book { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.rights-map-set-book input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.rights-map-set-preview { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.rights-map-set-line { padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.rights-map-set-line.is-left { color: var(--muted); }
.rights-map-set-summary { padding: 6px 0; font-weight: 600; }
.rights-map-set-line > ul { margin: 4px 0 0; padding-left: 18px; }
#rights-map-set > footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
/* A column head's right edge widens or narrows the column by a drag or
   the arrow keys (hw-uq6s.25.3). It sits in the gap after the head. */
.rights-row-head .sort-head-cell { position: relative; }
.col-edge { position: absolute; top: -7px; bottom: -7px; right: -11px; z-index: 1; width: 8px; cursor: col-resize; touch-action: none; border-radius: 2px; }
.col-edge::after { content: ""; position: absolute; top: 6px; bottom: 6px; left: 3px; width: 2px; border-radius: 1px; background: transparent; }
.col-edge:hover::after, .col-edge:focus-visible::after, .col-resizing .col-edge::after { background: var(--accent); }
.col-edge:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
body.col-resizing { cursor: col-resize; user-select: none; }
.rights-row { width: 100%; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
.rights-row[aria-current="true"], .rights-row[aria-current="true"]:hover { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.rights-row:focus-visible { outline-offset: -3px; }
/* A pulled share strikes its own holder's line, not the title (hw-uq6s.114). */
.rights-holder-line.is-pulled > .rights-holder-name { text-decoration: line-through; color: var(--muted); }
.rights-num { text-align: right; font-variant-numeric: tabular-nums; }
.rights-marker { font-weight: 650; font-variant-numeric: tabular-nums; }
/* The No. cell opens the title's proof page, as the index's hymn number
   does, and the rest of the row the card (hw-uq6s.25.4). */
.rights-marker.rights-page { justify-self: start; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.rights-marker.rights-page:hover { color: var(--button-hover); }
.rights-page-link { padding: 0; font: inherit; }
/* A title's number on a holder card opens the title in Titles (desk note
   d03dfb, hw-uq6s.131), drawn as a link like the No. cell above. */
.rights-title-link { position: relative; padding: 0; font: inherit; font-variant-numeric: tabular-nums; text-decoration: underline; text-underline-offset: 2px; }
/* A touch reaches it over 44 points without moving the row. */
@media (pointer: coarse) { .rights-title-link::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); } }
/* One track that may shrink below its content, so a long holder chip
   wraps inside the Title column in place of running into Words (desk
   note bddc13, hw-uq6s.41). */
.rights-main-cell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; }
.rights-title { font-weight: 550; overflow-wrap: anywhere; }
.rights-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 11px; color: var(--muted); }
.rights-holder-chip { padding: 1px 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--subtle); color: var(--ink); white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.rights-holder-chip.is-candidate, .rights-candidate { border-style: dashed; }
.rights-candidate { padding: 0 6px; border: 1px dashed var(--control-line); border-radius: 4px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-left: 6px; }
.rights-chips > .rights-candidate { margin-left: 0; }
.rights-share.is-open { color: var(--warning); font-weight: 600; }
.rights-share.is-over { color: var(--removed); font-weight: 600; }
.rights-pulled { padding: 0 6px; border-radius: 4px; background: var(--removed-bg); color: var(--removed); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-left: 6px; }
.rights-chips > .rights-pulled { margin-left: 0; }
/* A share left under a holder a person retired, on the title's line, the
   title card, and the Administrators row (hw-88y1.1). */
.rights-retired { padding: 0 6px; border-radius: 4px; background: var(--warning); color: var(--surface); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; margin-left: 6px; }
.rights-holder-line > .rights-retired { margin-left: 0; }
.rights-hint { font-style: italic; }
.rights-card-status-note { min-width: 0; color: var(--ink); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rights-status-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.rights-holder-list-note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-style: italic; font-size: 12px; line-height: 1.4; flex-basis: 100%; white-space: pre-wrap; }
.rights-row:focus .rights-holder-list-note, .rights-holder-list-note:hover { -webkit-line-clamp: unset; }
#rights-holder-note-input { width: 100%; box-sizing: border-box; }
.rights-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 550; white-space: nowrap; color: var(--ink); background: var(--surface); }
.rights-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--control-line); flex: none; }
.rights-status.kind-waiting-on-them { color: var(--warning); border-color: color-mix(in srgb, var(--warning-dot) 55%, transparent); }
.rights-status.kind-waiting-on-them::before { background: var(--warning-dot); }
.rights-status.kind-waiting-on-us { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.rights-status.kind-waiting-on-us::before { background: var(--accent); border-radius: 1px; }
.rights-status.kind-done { color: var(--added); background: var(--added-bg); border-color: transparent; }
.rights-status.kind-done::before { background: var(--added); }
.rights-status.kind-dead { color: var(--removed); background: var(--removed-bg); border-color: transparent; }
.rights-status.kind-dead::before { background: var(--removed); border-radius: 0; transform: rotate(45deg); }
.rights-status.kind-none, .rights-status.kind-unknown { color: var(--muted); }
/* The copyright team's colors (desk note c9aefb, hw-uq6s.72): blue while
   the request goes out, yellow once permission is in hand, green when
   done, grey at a dead end. They come after the kinds, so they win. */
.rights-status.tone-red { color: var(--removed); background: var(--removed-bg); border-color: transparent; }
.rights-status.tone-red::before { background: var(--removed); }
.rights-status.tone-blue { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.rights-status.tone-blue::before { background: var(--accent); }
.rights-status.tone-yellow { color: var(--warning); background: color-mix(in srgb, var(--warning-dot) 20%, var(--surface)); border-color: transparent; }
.rights-status.tone-yellow::before { background: var(--warning-dot); }
.rights-status.tone-green { color: var(--added); background: var(--added-bg); border-color: transparent; }
.rights-status.tone-green::before { background: var(--added); }
.rights-status.tone-grey { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, var(--surface)); border-color: transparent; }
.rights-status.tone-grey::before { background: var(--muted); }
/* In Holders a click on the status sets it (desk note e150de, hw-uq6s.69). */
.rights-status-set { cursor: pointer; }
.rights-status-set:hover { box-shadow: 0 0 0 1px currentColor; }
.rights-overdue { padding: 1px 6px; border-radius: 4px; background: var(--warning); color: var(--surface); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
/* The muted tail after a holder's status (hw-kgp6.30). Since Dan's desk
   note adc13e (hw-kgp6.49) the status chip stands alone, and only Last
   contact rides the tail, folded on a phone. */
.rights-state-tail { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.rights-footer { font-size: 11px; white-space: nowrap; }
.rights-footer.is-approved { color: var(--added); }
.rights-footer.is-approved::before { content: "✓ "; }
.rights-footer.is-differs { color: var(--removed); font-weight: 600; }
.rights-footer.is-differs::before { content: "≠ "; }
.rights-footer.is-required, .rights-footer.is-printed { color: var(--muted); }
.rights-footer.is-missing { color: var(--muted); }
.rights-footer.is-missing::before { content: "– "; }
.rights-money, .rights-units { display: grid; justify-items: end; gap: 2px; }
.rights-live { font-weight: 600; }
.rights-sub { font-size: 11px; color: var(--muted); font-weight: 400; }
.rights-paid { padding: 0 6px; border-radius: 4px; background: var(--added-bg); color: var(--added); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.rights-channel { padding: 1px 7px; border-radius: 4px; background: var(--subtle); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.rights-contact { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Last contact rides the state line only on a phone (hw-kgp6.48). */
.rights-state-contact { display: none; }
/* Last contact's mark after the date (Dan's desk note adc13e,
   hw-kgp6.49, mapux item 165): a red square for a bounce, a yellow
   circle for more than ten days without contact. Two shapes, so color
   is never the only cue; the words ride in sr-only text. */
.rights-contact-mark { display: inline-block; width: 7px; height: 7px; margin-left: 6px; vertical-align: 1px; flex: none; }
.rights-contact-mark.is-bounced { background: var(--removed); border-radius: 0; }
.rights-contact-mark.is-stale { background: var(--warning-dot); border-radius: 50%; }
.rights-group-head { position: sticky; top: 29px; z-index: 1; margin: 0; padding: 10px 24px 6px; font-size: 12px; font-weight: 650; background: var(--surface); border-bottom: 1px solid var(--line); }
.rights-empty { margin: 24px; color: var(--muted); }
/* The card's head sticks at its top, so the card keeps that much room
   when it scrolls a section or a focused control into view. */
.rights-card { flex: none; width: var(--rights-card); min-height: 0; overflow: auto; border-left: 1px solid var(--line); background: var(--surface); overscroll-behavior: contain; scroll-padding-top: 64px;; overflow-anchor: none; }
.rights-card[hidden] { display: none; }
.rights-card-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; padding: 8px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.rights-card-back { font-size: 12px; min-height: 30px; }
.rights-card-body { padding: 4px 20px 32px; }
.rights-card-title h2 { margin: 2px 0 4px; font-size: 18px; line-height: 1.25; }
.rights-eyebrow { margin: 12px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rights-rule-form .rights-field-hint { display: block; margin-top: 2px; }
.rights-eyebrow > .rights-role-from-map { font-weight: 400; letter-spacing: 0; text-transform: none; }
.rights-split-names { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.rights-split-sheet { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.rights-split-sheet h4 { margin: 0 0 6px; font-size: 13px; }
.rights-split-sheet p { margin: 0 0 8px; line-height: 1.45; }
.rights-card-title .rights-sub, .rights-card-title .rights-chips { margin: 4px 0 0; }
.rights-owns { margin: 12px 0 0; font-size: 13px; }
.rights-card-section { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.rights-card-section h3 { margin: 0 0 8px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rights-card-section p { margin: 0 0 6px; font-size: 13px; line-height: 1.45; }
.rights-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 0; font-size: 13px; }
.rights-facts dt { color: var(--muted); }
.rights-facts dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.rights-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rights-table th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); }
.rights-table td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
.rights-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11px !important; color: var(--muted); }
.rights-quote { margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid var(--line); background: var(--subtle); font-size: 12px; line-height: 1.5; }
.rights-work + .rights-work { margin-top: 8px; }
.rights-work.is-public-domain b { color: var(--warning); }
.rights-contacts, .rights-books, .rights-history { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.rights-contacts li { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.rights-contacts a { color: var(--accent); overflow-wrap: anywhere; }
/* The holder card's email under the name, and the Contact history's
   notes, each on a line of its own with its breaks kept (desk note
   953dcd, hw-uq6s.70). */
.rights-card-email { margin: 0 0 6px; font-size: 13px; }
.rights-card-email a { color: var(--accent); overflow-wrap: anywhere; }
.rights-contact-note { display: block; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.rights-verified { padding: 0 6px; border-radius: 4px; background: var(--added-bg); color: var(--added); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.rights-verified::before { content: "✓ "; }
/* A Rights row's confirm chip lines up under the title like a Candidate
   chip and keeps to its own width (hw-wm7m.334). */
.rights-main-cell > .rights-confirm-state { margin-left: 0; justify-self: start; }
.rights-source { padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 550; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rights-eyebrow > .rights-verified, .rights-eyebrow > .rights-source, .rights-authority-line > .rights-verified, .rights-authority-line > .rights-source { margin-left: 6px; }
.rights-authority-disclosure > summary { cursor: pointer; min-height: 44px; padding: 8px 0; box-sizing: border-box; }
.rights-authority-disclosure > summary h3 { display: inline; margin: 0; }
.rights-authority-disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.rights-authority-summary { display: block; margin: 4px 0 0 16px; font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.rights-authority-disclosure[open] > summary .rights-authority-summary { display: none; }
.rights-authority-content { margin-top: 8px; }
.rights-authority-list { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; }
.rights-authority-row { display: grid; gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.rights-authority-row:last-child { border-bottom: 0; }
.rights-authority-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
.rights-authority-text { overflow-wrap: anywhere; }
.rights-authority-row .rights-sub { margin: 0; }
.rights-authority-rule { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 2px 0 0; }
.rights-card-section h4.rights-label { margin: 10px 0 4px; }
.rights-card-section h4.rights-label:first-of-type { margin-top: 0; }
.rights-authority-form .rights-check { display: flex; align-items: center; gap: 6px; }
/* The holder card's research log (hw-uq6s.186): one line per search,
   where and what, then who and when, with the note and link under it. */
.rights-research-list { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; }
.rights-research-row { display: grid; gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.rights-research-row:last-child { border-bottom: 0; }
.rights-research-line { margin: 0; overflow-wrap: anywhere; }
.rights-research-row.is-found .rights-research-text { font-weight: 600; }
.rights-research-row .rights-sub { margin: 0; }
.rights-research-link a { overflow-wrap: anywhere; }
.rights-email { overflow-wrap: anywhere; }
.rights-books li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rights-note { color: var(--muted); }
/* History in plain words (hw-uq6s.97): the sentence wraps inside the
   card, and Details lists the stored words, which break anywhere. */
.rights-history li { min-width: 0; overflow-wrap: anywhere; }
.rights-history-details { margin-top: 2px; }
.rights-history-details > summary { display: inline; font-size: 12px; color: var(--accent); cursor: pointer; }
.rights-history-raw { display: block; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; word-break: break-word; }
/* A Set administrator line's shares, each title a link (hw-kgp6.21). */
.rights-history-links { display: block; margin: 2px 0; font-size: 12px; overflow-wrap: anywhere; }
.rights-history-links .rights-map-title { font: inherit; padding: 0; }
/* The Generations popover (hw-uq6s.20.4) hangs from the Rights head, as
   the Index package's hangs from its bar: the runs newest first, one
   run's review list, and Generate. */
.rights-head { position: relative; }
.rights-gens-open { flex: none; }
.rights-review-open { flex: none; }
.rights-review-open[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.rights-gens-open[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.rights-gens { position: absolute; z-index: 5; top: calc(100% - 4px); right: max(24px, calc((100% - 872px) / 2)); width: min(560px, calc(100% - 48px)); max-height: min(70vh, 640px); overflow: auto; display: grid; gap: 10px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px rgb(0 0 0 / .18); font-size: 13px; }
.rights-gens[hidden] { display: none; }
/* The Columns menu hangs from the counts line, under its button. */
.rights-gens.rights-columns { top: calc(100% + 4px); right: 0; width: min(320px, 100%); }
/* The Columns menu hangs from the counts line, under its button. */
.rights-gens.rights-columns { top: calc(100% + 4px); right: 0; width: min(320px, 100%); }
.rights-gens-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rights-gens-head h2 { margin: 0; font-size: 15px; }
.rights-gens-hint { margin: 0; font-size: 12px; color: var(--muted); }
.rights-gens-status { margin: 0; font-size: 12px; }
.rights-gens-cutoff { margin: 0; font-size: 12px; color: var(--muted); }
.rights-gens-status:empty { display: none; }
.rights-gens-status[data-state="running"] { color: var(--accent); }
.rights-gens-status[data-state="failed"] { color: var(--removed); }
.rights-gens-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rights-gen { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.rights-gen.is-shown .rights-gen-name { color: var(--accent); }
.rights-gen-text { min-width: 0; display: grid; gap: 2px; }
.rights-gen-name { font-weight: 600; }
.rights-gen-counts { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rights-gen-failed { font-size: 12px; color: var(--removed); }
.rights-gen-show { flex: none; }
.rights-gens-review { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.rights-gens-review[hidden] { display: none; }
.rights-gens-review h3 { margin: 0; font-size: 13px; }
.rights-gen-group h4 { margin: 4px 0 2px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rights-gen-group .rights-sub { margin: 0 0 4px; font-size: 12px; }
.rights-gen-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rights-gen-accept-all { font-size: 12px; }
.rights-gen-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rights-gen-group li.has-accept { display: flex; align-items: center; gap: 6px; }
.rights-gen-group li.has-accept > .rights-gen-line { flex: 1; min-width: 0; }
.rights-gen-accept { flex: none; font-size: 12px; }
.rights-gen-accept[disabled] { opacity: .5; cursor: progress; }
.rights-gen-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; width: 100%; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 12px; text-align: left; }
button.rights-gen-line { cursor: pointer; }
button.rights-gen-line:hover { background: var(--subtle); }
button.rights-gen-line:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.rights-gen-line .rights-marker { font-variant-numeric: tabular-nums; color: var(--muted); }
.rights-gen-line-text { min-width: 0; overflow-wrap: anywhere; }
/* A move a title still holds the number of: the line under it names the
   title, with Retire when the proof no longer prints it (hw-74b9.84.1). */
.rights-gen-group li.rights-gen-blocked { margin-left: 76px; padding: 0 0 4px 8px; border-left: 2px solid var(--warning); font-size: 12px; }
.rights-gen-blocked-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rights-gen-blocked-hint { margin: 0 0 4px; font-size: 12px; }
/* A line with no entry number starts on its text, which then spans the
   number's column too (hw-mh87.70). */
.rights-gen-line-text:first-child { grid-column: 1 / 3; }
.rights-gen-line.is-acted .rights-gen-line-text { color: var(--muted); }
.rights-gen-acted { font-size: 11px; color: var(--accent); white-space: nowrap; }
.rights-review-slots:empty, .rights-review-groups:empty { display: none; }
.rights-review-slot { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.rights-review-slot > .rights-review-item { border: 1px dashed var(--control-line); border-radius: 8px; padding: 6px 8px; }
.rights-review-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; }
.rights-review-item label { display: flex; align-items: baseline; gap: 6px; flex: 1; min-width: 0; }
.rights-review-item .rights-sub { font-size: 12px; }
.rights-review-sources { flex-basis: 100%; margin: 0; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.rights-review-bulk { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.rights-review-ask { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--accent); border-radius: 8px; }
.rights-review-ask[hidden] { display: none; }
.rights-review-ask p { margin: 0; }
.rights-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.rights-rule-form { display: grid; gap: 6px; margin: 8px 0 0; }
.rights-rule-form[hidden] { display: none; }
.rights-rule-form label { display: grid; gap: 2px; font-size: 12px; font-weight: 600; }
.rights-rule-form input { font: inherit; font-weight: 400; }
.rights-rule-form textarea { font: inherit; font-weight: 400; resize: vertical; }
/* The holder card's merge (hw-uq6s.45): the plan reads as plain lines,
   and the two names to keep sit side by side when they fit. */
.rights-merge-keep { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; border: 0; }
.rights-merge-keep legend { padding: 0; font-size: 12px; font-weight: 600; }
.rights-merge-keep label { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.rights-merge-plan { margin: 0; padding-left: 18px; font-size: 13px; }
.rights-merge-plan:empty { display: none; }
/* Combine's warning box, the card's names line, and each History
   line's Undo (hw-kgp6.10). */
.rights-merge-title { margin: 0; font-size: 14px; }
.rights-merge-warning { margin: 0; padding: 8px 12px; border: 1px solid var(--warning-dot); border-radius: 6px; font-size: 13px; }
.rights-names-line { margin: 2px 0 0; }
.rights-history-undo { margin-left: 4px; }
/* The Delete form's title and its two blocks' headings sit close to
   what they head (hw-kgp6.10). */
.rights-delete-title { margin: 12px 0 0; font-size: 15px; }
.rights-rule-form > .rights-label { margin: 4px 0 0; }
/* A holder's notes keep the lines they were written in (hw-uq6s.46). */
.rights-holder-notes { margin: 0; white-space: pre-line; font-style: italic; overflow-wrap: anywhere; }
.rights-rule-note { margin: 6px 0 0; font-size: 12px; }
.rights-rule-note:empty { display: none; }
.rights-rule-form select { font: inherit; font-weight: 400; }
/* Add holder on a title card (hw-uq6s.4.20). */
.rights-add-form { padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.rights-add-form [hidden] { display: none; }
/* The holder picker's match list, reused by the existing-account search in
   People and the Client desk (hw-fswv.18). */
.rights-add-matches, .account-matches { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; max-height: 240px; overflow-y: auto; }
.rights-add-matches:empty, .account-matches:empty { display: none; }
/* The account search reads as a list of choices under its field. */
.account-matches { margin: 4px 0 0; padding: 2px; border: 1px solid var(--line); border-radius: 8px; }
.rights-add-match, .account-match { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.rights-add-match:hover, .account-match:hover { background: var(--subtle); }
.rights-add-match:focus-visible, .account-match:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.rights-add-match.is-new { font-style: italic; }
.rights-add-picked { margin: 0; font-size: 13px; }
/* Change's map tick (hw-uq6s.130.4): the box beside its words, which wrap. */
.rights-rule-form label.rights-add-map { display: flex; align-items: flex-start; gap: 6px; font-weight: 400; font-size: 13px; }
.rights-rule-form label.rights-add-map[hidden] { display: none; }
/* Load from a list on a store administrator's card (hw-kgp6.13). */
.rights-store-list { display: grid; gap: 8px; min-width: 0; }
.rights-store-list > * { min-width: 0; }
.rights-store-list textarea { width: 100%; box-sizing: border-box; font: 13px/1.4 var(--mono, ui-monospace, monospace); resize: vertical; }
.rights-store-list-links { display: grid; gap: 4px; margin: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.rights-store-list-link { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; }
.rights-store-list-link.is-left { display: block; margin: 0; }
.rights-store-list-entry { margin: 0 0 6px; }
.rights-store-list-summary { margin: 0; font-weight: 600; }
.rights-table.is-store-list tr.is-fix td:last-child { color: var(--warning); }
.rights-store-list-scroll { min-width: 0; max-width: 100%; overflow-x: auto; }
.rights-table.is-store-list .rights-sub { display: block; }
.rights-table.is-store-list .rights-map-title { font: inherit; padding: 0; }
@media (max-width: 640px) {
  .rights-table.is-store-list thead { display: none; }
  .rights-table.is-store-list tr { display: grid; grid-template-columns: 3.5em 1fr; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .rights-table.is-store-list td { display: block; padding: 0; border: 0; }
  .rights-table.is-store-list td:nth-child(n+3) { grid-column: 2; }
}
/* An ended administration reads quieter than the current one (hw-uq6s.130.4). */
.rights-authority-row.is-ended .rights-authority-text { color: var(--muted); }
.rights-add-error { margin: 0; font-size: 12px; color: var(--removed); }
.rights-add-error:empty { display: none; }
.rights-add-title { margin: 0; font-size: 13px; font-weight: 600; }
.rights-holder-actions { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.rights-status-select { max-width: 160px; font: inherit; font-size: 12px; }
.rights-contract-select { max-width: 100%; font: inherit; font-size: 13px; }
/* Change copyright, a button on its own line under a work (hw-uq6s.91). */
.rights-work-actions { margin: 4px 0 0; }
.rights-card-thread[hidden] { display: none; }
.rights-gens-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.rights-gens-form[hidden] { display: none; }
.rights-gens-form label { font-weight: 600; }
.rights-gens-form select { flex: 1; min-width: 0; }
/* The royalty calculator (hw-uq6s.4.5): a dialog on a desktop, a bottom
   sheet on a phone. Four inputs in a grid, the fixed rate under them, and
   the server's figures, the holder's amount the largest. */
.rights-calc-open, .rights-export, .rights-copy-copyrighted { flex: none; }
/* The Copyrights bar (hw-kgp6.12): the views, the search, Filters,
   Select, and More. More opens a menu of the tools the bar used to show,
   in groups a rule sets apart, under its button's right edge. */
.rights-more-wrap { position: relative; flex: none; display: inline-flex; }
.rights-more { display: inline-flex; align-items: center; gap: 4px; }
.rights-more-caret { font-size: 9px; }
.rights-more[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.rights-more-menu { position: absolute; z-index: 6; top: calc(100% + 4px); right: 0; width: max-content; min-width: 220px; max-width: min(360px, calc(100vw - 24px)); display: grid; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px rgb(0 0 0 / .18); }
.rights-more-group { display: grid; gap: 2px; }
.rights-more-group.has-rule { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.rights-more-menu .rights-more-item { margin: 0; min-height: 30px; font-size: 13px; color: var(--ink); background: none; border: 0; }
.rights-more-menu .rights-more-item:hover, .rights-more-menu .rights-more-item:focus-visible { background: var(--hover, var(--line)); }
.rights-more-menu .rights-more-item[aria-checked="true"]::after { content: '\2713'; color: var(--accent); }
/* Close is the phone sheet's last row; above a phone, Escape and a press
   outside close the menu. */
.rights-more-closer { display: none; }
@media (max-width: 650px) {
  .rights-more-menu { position: fixed; z-index: 20; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 82dvh; overflow: auto; border-radius: 14px 14px 0 0; border-bottom: 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .rights-more-closer { display: grid; margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
  .rights-more-menu .rights-more-item { min-height: 44px; font-size: 15px; }
  .rights-bar > .rights-filters, .rights-bar > .rights-select-mode, .rights-more { height: 44px; }
}
dialog.rights-calc { width: min(520px, calc(100vw - 28px)); }
.rights-calc-form { display: grid; gap: 12px; padding: 14px 20px 18px; }
.rights-calc-hint, .rights-calc-rate, .rights-calc-basis, .rights-calc-status { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.rights-calc-rate b { color: var(--ink); }
.rights-calc-status { color: var(--ink); }
.rights-calc-status:empty, .rights-calc-basis:empty { display: none; }
.rights-calc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.rights-calc-field { display: grid; gap: 4px; align-content: start; }
.rights-calc-field label, .rights-calc-label { font-size: 12px; font-weight: 600; }
/* The title count is the live one, shown, never typed (hw-88y1). It sits
   on the inputs' line, without their box. */
.rights-calc-count { padding: 7px 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rights-calc-field input { min-width: 0; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; }
.rights-calc-field input[aria-invalid="true"] { border-color: var(--removed); }
.rights-calc-note, .rights-calc-error { margin: 0; font-size: 11px; line-height: 1.4; color: var(--muted); }
.rights-calc-error { color: var(--removed); }
.rights-calc-error:empty { display: none; }
.rights-calc-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.rights-calc-out dt { font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rights-calc-out dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rights-calc-out .is-amount dd { font-size: 18px; color: var(--accent); }
.rights-calc-actions { display: flex; justify-content: flex-end; gap: 8px; }
/* The holder card's money (hw-uq6s.70): the fee choice, a custom
   amount shown only for Custom, and the Change fee and Record a payment
   links. */
.rights-money-choices { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; border: 0; }
.rights-money-choices legend { padding: 0; margin: 0 0 4px; font-size: 12px; font-weight: 600; }
.rights-rule-form .rights-money-choices label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; }
.rights-rule-form .rights-money-amount[hidden] { display: none; }
.rights-money-left { margin: 2px 0 0; }
.rights-money-bar { display: flex; flex-wrap: wrap; gap: 4px 14px; }
/* A holder card's Documents section (hw-uq6s.6.1): the packets, newest
   first, each with Download, and Generate. On a phone a row's actions
   open in a bottom sheet. */
.rights-docs[hidden] { display: none; }
.rights-docs-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 2px; }
.rights-docs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: default; }
.rights-docs-row:hover, .rights-docs-row.is-hand { background: var(--accent-soft); }
.rights-docs-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rights-docs-main { display: grid; gap: 2px; min-width: 0; font-size: 13px; }
.rights-docs-line { font-weight: 600; color: var(--ink); }
.rights-docs-actions { flex: none; }
.rights-docs-tail { font-weight: 400; }
.rights-docs-earlier { margin: 0 0 8px; font-size: 13px; }
.rights-docs-earlier > summary { cursor: pointer; min-height: 44px; padding: 12px 0; box-sizing: border-box; color: var(--muted); }
.rights-docs-earlier > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Mark as the signed contract sits after a saved file's Download
   (hw-uq6s.218.1). */
.rights-docs-sign { margin-left: 8px; }
/* Add a file from your computer, its kind first (hw-uq6s.218.2). */
.rights-docs-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; }
.rights-docs-add-kind { font: inherit; }
/* With a signed contract on file, Generate is a muted link
   (mapux follow-up 31, hw-uq6s.218.3). */
.rights-docs-contract-new { color: var(--muted); }
.rights-docs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
/* A contract refusal's Nos., each a link to its title card, read at the
   line's size (hw-uq6s.14.2). */
/* A contract refusal reads in the body color under Generate, apart from
   the muted intro and dash line (Dan's desk note 0d08e0, hw-uq6s.231). */
.rights-docs-contract-reason { color: var(--ink); }
.rights-docs-contract-reason .rights-map-title { font: inherit; padding: 0; }
.rights-docs-sheet { position: fixed; z-index: 7; left: 0; right: 0; bottom: 0; display: grid; gap: 6px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; background: var(--surface); box-shadow: 0 -10px 30px rgb(0 0 0 / .18); font-size: 14px; }
.rights-docs-sheet[hidden] { display: none; }
.rights-docs-sheet p { margin: 0; }
.rights-docs-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.rights-docs-sheet-actions .bar-button { flex: 1 1 0; justify-content: center; }
@media (max-width: 650px) {
  .rights-docs-row { min-height: 44px; cursor: pointer; }
  .rights-docs-row .rights-docs-actions { display: none; }
  /* A file saved from mail (hw-wfrm.41) has no sheet, so its Download
     stays in the row. */
  .rights-docs-saved .rights-docs-row .rights-docs-actions { display: block; }
  /* With Mark as the signed contract beside Download, a saved file's
     buttons wrap under its words (hw-uq6s.218.2). */
  .rights-docs-saved .rights-docs-row { flex-wrap: wrap; }
  /* Nor has a contract draft (hw-uq6s.5.2). Flex, so its Download
     takes the 44 points a coarse pointer gives it. */
  .rights-docs-contract-drafts .rights-docs-row .rights-docs-actions { display: flex; }
  /* Nor has the signed contract (hw-uq6s.218.1). */
  .rights-docs-signed .rights-docs-row .rights-docs-actions { display: flex; }
}
@media (pointer: coarse) {
  .rights-docs-bar .bar-button, .rights-docs-sheet .bar-button, .rights-docs-contract-drafts .bar-button, .rights-docs-signed .bar-button { min-height: 44px; }
}
/* Ask the holder (hw-uq6s.13.3, design 6.1 and 6.2): the holder card's
   Send and track section, its buttons and timeline, and the sheet, a
   dialog on a desktop and a bottom sheet on a phone. */
.rights-portal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; }
.rights-portal-button.is-primary { border-color: var(--button); background: var(--button); color: var(--button-ink); }
.rights-portal-button.is-primary:hover:not(:disabled) { background: var(--button-hover); }
.rights-portal-button:disabled { opacity: .55; cursor: default; }
.rights-portal h4.rights-label { margin: 14px 0 4px; font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rights-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.rights-timeline li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; }
.rights-timeline li:first-child { border-top: 0; }
.rights-timeline-when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rights-timeline-what b { font-weight: 650; }
.rights-timeline-quote { display: block; color: var(--muted); font-style: italic; }
.rights-timeline-what .rights-status { margin-left: 6px; }
.rights-status.rights-portal-state::before { border-radius: 50%; transform: none; }
/* The store worklist (hw-kgp6.8, mocks admin-* and pay-*): a store
   administrator's titles with a tick each, the store step, who else is
   needed, and one Mark per ticked step. */
.rights-cart-through { margin: 4px 0 0; }
.rights-cart-book { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 10px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); font-size: 13px; }
.rights-cart-book-label { font-weight: 650; }
.rights-cart-book-sum { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rights-cart-step { display: inline-block; width: max-content; max-width: 100%; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.rights-cart-step.is-todo { background: #fef3c7; color: #92400e; }
.rights-cart-step.is-cart { background: #ede9fe; color: #4c1d95; }
.rights-cart-step.is-sent { background: #e0e7ff; color: #312e81; }
.rights-cart-step.is-ok { background: #dcfce7; color: #166534; }
.rights-cart-step.is-paid { background: #bbf7d0; color: #14532d; }
:root[data-theme="dark"] .rights-cart-step.is-todo { background: #78350f; color: #fde68a; }
:root[data-theme="dark"] .rights-cart-step.is-cart { background: #4c1d95; color: #ddd6fe; }
:root[data-theme="dark"] .rights-cart-step.is-sent { background: #312e81; color: #c7d2fe; }
:root[data-theme="dark"] .rights-cart-step.is-ok { background: #14532d; color: #bbf7d0; }
:root[data-theme="dark"] .rights-cart-step.is-paid { background: #166534; color: #dcfce7; }
.rights-cart-sum { margin: 0 0 6px; }
.rights-cart-only.is-on { font-weight: 650; text-decoration: underline; }
.rights-cart-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--subtle); font-size: 13px; }
.rights-cart-pay { margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); display: grid; gap: 8px; }
.rights-cart-pay-title { margin: 0; font-weight: 650; }
.rights-cart-pay-fields { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; }
.rights-cart-pay-fields label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; }
.rights-cart-pay-fields input { width: 100%; box-sizing: border-box; padding: 5px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.rights-cart-pay .rights-sub { margin: 0; }
.rights-cart-list { font-size: 13px; }
.rights-cart-head, .rights-cart-row { display: grid; grid-template-columns: 26px 40px minmax(0, 1.5fr) 54px 92px minmax(0, 1.3fr); gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: start; }
.rights-cart-head { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rights-cart-row.is-ticked { background: var(--subtle); }
/* hw-kgp6.8.1: the title in hand, as the Rights list marks its row. */
.rights-cart-row[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.rights-cart-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* The bar hint's ", or press x" waits for a keyboard: a phone hides it. */
@media (pointer: coarse) { .rights-cart-keyhint { display: none; } }
.rights-cart-tick { display: inline-flex; align-items: center; height: 18px; }
.rights-cart-tick input { margin: 0; width: 16px; height: 16px; }
.rights-cart-done { color: var(--added, #15803d); font-weight: 700; }
.rights-cart-name .rights-sub { display: block; }
.rights-cart-share { text-align: right; font-variant-numeric: tabular-nums; }
.rights-cart-holder { padding: 0; font: inherit; }
.rights-cart h4.rights-label { margin: 14px 0 4px; font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 650px) {
  .rights-cart-head { display: none; }
  .rights-cart-row { grid-template-columns: 26px 40px minmax(0, 1fr) 54px; grid-template-areas: "tick no name share" "tick no step step" "tick no gap gap"; }
  .rights-cart-tick { grid-area: tick; }
  .rights-cart-no { grid-area: no; }
  .rights-cart-name { grid-area: name; }
  .rights-cart-row > .rights-cart-share { grid-area: share; }
  .rights-cart-step-cell { grid-area: step; }
  .rights-cart-gap { grid-area: gap; font-size: 12px; }
  .rights-cart-pay-fields { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .rights-cart-tick { height: 28px; }
  .rights-cart-tick input { width: 22px; height: 22px; }
}
dialog.rights-ask { width: min(560px, calc(100vw - 28px)); }
.rights-ask-form, .rights-ask-done { display: grid; gap: 12px; padding: 14px 20px 18px; }
.rights-ask-for { margin: 0; font-size: 14px; font-weight: 650; }
.rights-ask-scopes { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.rights-ask-scopes legend { margin-bottom: 6px; padding: 0; font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rights-ask-scopes[hidden], .rights-ask-grid[hidden], .rights-ask-pick[hidden], .rights-ask-done[hidden], .rights-ask-form[hidden], .rights-ask-field[hidden] { display: none; }
#rights-ask-scope-list { display: grid; gap: 6px; }
.rights-ask-scope { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); cursor: pointer; }
.rights-ask-scope:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rights-ask-scope:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rights-ask-scope input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.rights-ask-scope b { display: block; font-size: 13px; }
.rights-ask-scope .rights-sub { display: block; font-size: 12px; }
.rights-ask-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
/* Countersign the agreement (hw-uq6s.13.8): the consent sentence is a
   checkbox row like Ask for's choices. */
.rights-countersign-consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); font-size: 13px; line-height: 1.5; cursor: pointer; }
.rights-countersign-consent:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rights-countersign-consent:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rights-countersign-consent input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); }
.rights-countersign-facts dd a { color: inherit; overflow-wrap: anywhere; }
.rights-ask-field { display: grid; gap: 4px; align-content: start; }
.rights-ask-field label { font-size: 12px; font-weight: 600; }
.rights-ask-field :is(input, select, textarea) { min-width: 0; width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.rights-ask-field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.rights-ask-confirm { margin: 0; font-size: 13px; line-height: 1.5; }
.rights-ask-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent-soft); }
.rights-ask-link code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; color: var(--ink); user-select: all; }
/* Holder mail on the holder card (hw-uq6s.52): the Mail section's
   buttons and its letters by thread, and the three sheets, which reuse
   Ask the holder's dialog and fields. A letter's text keeps its lines
   and never runs past the card. */
.rights-mail-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; }
.rights-mail-button.is-primary { border-color: var(--button); background: var(--button); color: var(--button-ink); }
.rights-mail-button.is-primary:hover:not(:disabled) { background: var(--button-hover); }
.rights-mail-note { margin: 4px 0 0 !important; }
.rights-mail-threads, .rights-mail-letters { list-style: none; margin: 0; padding: 0; display: grid; }
.rights-mail-threads > li { border-top: 1px solid var(--line); }
.rights-mail-threads > li:first-child { border-top: 0; }
.rights-mail-thread > summary { padding: 7px 0; font-size: 13px; line-height: 1.5; cursor: pointer; }
.rights-mail-thread > summary b { font-weight: 650; overflow-wrap: anywhere; }
.rights-mail-letters { gap: 8px; padding: 0 0 10px; }
.rights-mail-letter { padding: 8px 10px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 6px; background: var(--subtle); font-size: 12.5px; line-height: 1.5; }
.rights-mail-letter:is(.is-logged-received, .is-received) { border-left-color: var(--accent); }
.rights-mail-letter p { margin: 0; }
.rights-mail-head { font-weight: 600; overflow-wrap: anywhere; }
.rights-mail-subject { font-style: italic; overflow-wrap: anywhere; }
.rights-mail-files { min-width: 0; overflow-wrap: anywhere; }
.rights-mail-files ul { padding-left: 20px; }
.rights-mail-files label { white-space: normal; }
/* Save to Documents (hw-wfrm.41) stands apart from the links before it,
   and its line takes no room until it speaks. */
.rights-mail-files .rights-mail-save-document, .rights-mail-files .rights-mail-save-signed { margin-inline-start: 12px; }
.rights-mail-keep-status:empty { display: none; }
.rights-mail-body { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 24em; overflow: auto; }
.rights-mail-by { font-size: 11.5px; overflow-wrap: anywhere; }
.rights-mail-threads > li, .rights-mail-letter { min-width: 0; }
.rights-mail-letter-line { cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rights-mail-letter-fold[open] > .rights-mail-letter-line { white-space: normal; margin-bottom: 4px; }
.rights-mail-snippet { margin-left: 6px; color: var(--muted); font-weight: 400; }
.rights-mail-snippet.is-failure { color: var(--warning); font-weight: 600; }
.rights-mail-letter-fold[open] .rights-mail-snippet { display: none; }
/* The compact thread reader (hw-wfrm.3, P2): quoted history folds under
   its letter, set off and quieter, and on a phone the thread's Reply and
   Close stay at the foot of the sheet as the letters scroll. */
.rights-mail-quoted { margin: 4px 0; }
.rights-mail-quoted > summary { font-size: 12px; color: var(--accent); cursor: pointer; }
.rights-mail-body.is-quoted { color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; }
/* A Markdown reply's quote keeps its own blockquote rule, so its fold
   draws no second one (hw-uq6s.226). */
.rights-mail-body.is-formatted.is-quoted { border-left: 0; padding-left: 0; }
.rights-mail-reader .rights-mail-letter-reply { margin-top: 2px; }
@media (max-width: 650px) {
  #rights-mail-thread-body > .rights-ask-actions {
    position: sticky; bottom: 0; z-index: 1; padding-block: 8px; background: var(--surface); border-top: 1px solid var(--line);
  }
}
/* The compact phone composer (hw-wfrm.3, P2). Write a letter's actions
   ride in one row at the foot of the sheet, the head fields set their
   labels beside the inputs, and the sheet scrolls a field clear of the
   bar. While P1's unsaved-changes prompt shows, the bar keeps its place
   under it, so it never covers Keep editing, Save and close, or Discard.
   The thread sheet has no composer of its own: Reply there opens this
   one (hw-wfrm.63). */
@media (max-width: 650px) {
  dialog.rights-mail-sheet { scroll-padding-bottom: 84px; }
  .rights-mail-line-field { grid-template-columns: 4.5em minmax(0, 1fr); align-items: center; gap: 0 8px; }
  .rights-mail-line-field > label { color: var(--muted); }
  .rights-mail-write-actions {
    position: sticky; bottom: 0; z-index: 1; flex-wrap: nowrap; align-items: center; margin-inline: -16px; padding: 8px 16px; background: var(--surface); border-top: 1px solid var(--line);
  }
  .rights-mail-write-actions .button { flex: 1 1 auto; white-space: nowrap; padding-inline: 10px; }
  #rights-mail-write-form:has(> #rights-mail-unsaved:not([hidden])) > .rights-mail-write-actions { position: static; border-top: 0; }
  .rights-ask-field textarea.rights-mail-write-body { height: 40dvh; min-height: 180px; }
}
dialog.rights-mail-templates { width: min(680px, calc(100vw - 28px)); }
.rights-mail-contact { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.rights-mail-contact input { accent-color: var(--accent); }
.rights-mail-template-names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rights-mail-template-list { display: grid; gap: 10px; }
.rights-mail-template-group { display: grid; gap: 4px; }
.rights-mail-template-heading { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rights-mail-template-names .bar-button.is-on { border-color: var(--accent); background: var(--accent-soft); }
/* The catalog says each template's version and use beside its name, and
   keeps retired templates apart (hw-wfrm.14). */
.rights-mail-template-names li { display: inline-flex; align-items: baseline; gap: 6px; }
.rights-mail-template-meta { font-size: 12px; white-space: nowrap; }
.rights-mail-template-retired { display: grid; gap: 4px; }
.rights-mail-template-retired > summary { cursor: pointer; }
/* Defaults and signature in the template catalog (hw-wfrm.17). */
.rights-mail-tpl-defaults { display: grid; gap: 8px; }
.rights-mail-tpl-defaults > summary { cursor: pointer; font-weight: 600; }
.rights-mail-tpl-defaults-grid { display: grid; grid-template-columns: minmax(8em, max-content) 1fr 1fr; gap: 6px 10px; align-items: center; }
.rights-mail-tpl-defaults-grid select { min-width: 0; width: 100%; }
@media (max-width: 650px) {
  .rights-mail-tpl-defaults-grid { grid-template-columns: 1fr 1fr; }
  .rights-mail-tpl-defaults-grid > span:not(.rights-sub) { grid-column: 1 / -1; font-weight: 600; }
  .rights-mail-tpl-defaults-grid > span.rights-sub:first-child { display: none; }
}
/* Insert field and Preview in the template form (hw-wfrm.16). */
.rights-mail-tpl-insert { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.rights-mail-tpl-preview { display: grid; gap: 8px; }
.rights-mail-tpl-preview > summary { cursor: pointer; font-weight: 600; }
.rights-mail-tpl-preview-out { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.rights-mail-tpl-preview-out[hidden] { display: none; }
.rights-mail-tpl-preview-subject { margin: 0; font-weight: 600; }
.rights-mail-tpl-preview-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: none; }
.rights-mail-tpl-preview-fields { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; margin: 0; }
.rights-mail-tpl-preview-fields dd { margin: 0; overflow-wrap: anywhere; }
.rights-mail-tpl-preview-value { white-space: pre-wrap; }
@media (max-width: 650px) {
  .rights-mail-tpl-preview-fields { grid-template-columns: 1fr; }
  .rights-mail-tpl-preview-fields dd { margin-bottom: 6px; }
}
.rights-mail-tpl-preview-fields dd.is-gap .rights-mail-tpl-preview-value { color: var(--warning); }
/* Project templates: a shared update on this book's version, and
   Compare's line diff (hw-wfrm.15). */
.rights-mail-tpl-update { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.rights-mail-tpl-update.is-update { border-color: var(--warning-dot); }
.rights-mail-tpl-update[hidden], .rights-mail-tpl-compare[hidden] { display: none; }
.rights-mail-tpl-update > p { margin: 0; }
.rights-mail-tpl-update .rights-calc-actions { flex-wrap: wrap; justify-content: flex-start; }
.rights-mail-tpl-update .rights-calc-actions .button { flex: 0 1 auto; white-space: nowrap; }
.rights-mail-tpl-compare { display: grid; gap: 4px; }
.rights-mail-tpl-compare h4 { margin: 4px 0 0; font-size: 12px; }
.rights-mail-tpl-diff { margin: 0; padding: 0; list-style: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rights-mail-tpl-diff li { display: grid; grid-template-columns: 1.5ch 1fr; gap: 6px; padding: 1px 4px; }
.rights-mail-tpl-diff li.is-add { background: var(--added-bg); color: var(--added); }
.rights-mail-tpl-diff li.is-del { background: var(--removed-bg); color: var(--removed); text-decoration: line-through; }
.rights-mail-tpl-diff-op { user-select: none; }
.rights-mail-tpl-diff li.is-same { color: var(--muted); font-style: italic; }
.rights-mail-template-form { display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.rights-mail-template-form[hidden] { display: none; }
.rights-mail-fields summary { font-size: 12px; font-weight: 600; cursor: pointer; }
.rights-mail-fields dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; font-size: 12px; }
.rights-mail-fields dd { margin: 0; color: var(--muted); }
.rights-mail-sending { margin: 6px 0 0; font-size: 12px; }
/* Delete draft sits alone at the foot of the letter, under a rule, and
   asks before it deletes (Dan, desk note 227cc4, hw-wm7m.363). */
.rights-mail-write-delete { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.rights-mail-write-delete > .text-button { color: var(--removed); }
.rights-mail-write-delete-ask:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rights-mail-write-delete-ask > p { flex: 1 1 100%; margin: 0; font-size: 13px; }
/* Write a letter (hw-uq6s.126, S4): Save draft and Approve and send
   only (mapux 212). A desktop gives the letter a taller box. */
.rights-mail-write-actions { flex-wrap: wrap; }
@media (min-width: 1001px) and (pointer: fine) {
  .rights-ask-field textarea.rights-mail-write-body { min-height: 320px; }
}
/* The docked composer (Dan, desk note 019934, hw-wfrm.63): Write a
   letter is not modal. On a desktop it sits on the foot of the desk at
   the right edge, over the card, and the list, the card, and the tabs
   stay usable behind it. Minimize folds it to a 44 px bar that names the
   administrator and the subject; a press on the bar brings it back. A
   phone keeps the bottom sheet, edge to edge, and the bar clears the
   safe area. Only a modal dialog scrolls by itself, so the docked one
   says overflow: auto, or its lower controls sit below the viewport. */
dialog.rights-mail-write-sheet[data-docked][open] { position: fixed; inset: auto 16px 0 auto; margin: 0; z-index: 30; width: min(560px, calc(100vw - 32px)); max-height: 72vh; overflow: auto; overscroll-behavior: contain; border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: 0 -6px 30px var(--shadow); }
dialog.rights-mail-write-sheet[data-minimized] { width: min(380px, calc(100vw - 32px)); max-height: none; }
dialog.rights-mail-write-sheet[data-minimized] > form { display: none; }
dialog.rights-mail-write-sheet[data-minimized] > header { min-height: 44px; padding: 4px 8px 4px 14px; border-bottom: 0; cursor: pointer; }
dialog.rights-mail-write-sheet[data-minimized] h2 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rights-mail-write-head { display: flex; flex: none; gap: 2px; }
@media (max-width: 650px) {
  dialog.rights-mail-write-sheet[data-docked][open] { inset: auto 0 0 0; width: 100vw; max-width: 100vw; max-height: 92dvh; border-radius: 14px 14px 0 0; }
  dialog.rights-mail-write-sheet[data-minimized] { width: 100vw; }
  dialog.rights-mail-write-sheet[data-minimized] > header { padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
}
/* The letter editor (hw-wfrm.18): Format, and for Markdown the Write
   and Preview tabs and the toolbar over the one text box. The preview
   and a sent Markdown letter read as formatted text, not pre-wrapped
   source. */
.rights-mail-md { display: grid; gap: 6px; }
.rights-mail-md-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.rights-mail-md-format { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rights-mail-md-tabs { display: inline-flex; gap: 2px; border-bottom: 1px solid var(--line); }
.rights-mail-md-tabs[hidden], .rights-mail-md-bar[hidden], .rights-mail-md-preview[hidden], .rights-mail-md-keep[hidden] { display: none; }
.rights-mail-md-tab { border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); padding: 4px 10px; min-height: 32px; cursor: pointer; font: inherit; }
.rights-mail-md-tab.is-on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.rights-mail-md-bar { display: flex; flex-wrap: wrap; gap: 4px; }
.rights-mail-md-button { min-width: 32px; min-height: 32px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--button); color: var(--button-ink); cursor: pointer; font: inherit; }
.rights-mail-md-button.is-bold { font-weight: 700; }
.rights-mail-md-button.is-italic { font-style: italic; font-family: Georgia, serif; }
/* hw-wfrm.33: button:hover's light ground left white ink invisible. */
.rights-mail-md-button:hover:not(:disabled) { background: var(--button-hover); color: var(--button-ink); }
.rights-mail-md-button.is-list { font-size: 22px; line-height: 1; }
.rights-mail-md-icon { display: block; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rights-mail-md-preview { min-height: 150px; max-height: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; }
.rights-mail-md-preview, .rights-mail-body.is-formatted { white-space: normal; }
.rights-mail-body.is-formatted > :first-child { margin-top: 0; }
.rights-mail-body.is-formatted blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }
.rights-mail-body.is-formatted h2 { font-size: 1.2em; margin: 10px 0 4px; }
.rights-mail-body.is-formatted h3 { font-size: 1.05em; margin: 8px 0 4px; }
.rights-mail-body.is-formatted ul, .rights-mail-body.is-formatted ol { padding-left: 1.6em; margin: 6px 0; }
.rights-mail-body.is-formatted p { margin: 6px 0; }
@media (max-width: 700px) {
  .rights-mail-md-button { min-width: 40px; min-height: 40px; }
}
.rights-mail-due { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 8px 0; padding: 6px 10px; border-left: 3px solid var(--line); font-size: 13px; }
/* The Needs action lines at the top of the conversation stack, one per
   reason (hw-wfrm.64.2). */
.rights-mail-needs { display: grid; gap: 6px; margin: 8px 0; }
.rights-mail-needs > .rights-mail-due { margin: 0; }
.rights-mail-needs ul { margin: 0; padding-left: 18px; flex-basis: 100%; }
/* Each line reads plain on the rule, no pill around a sentence
   (hw-wfrm.64.7); a bounce reads in the warning color. */
.rights-mail-need { font-weight: 600; }
.rights-mail-need.is-failure { color: var(--warning); }
.rights-mail-due.is-today, .rights-mail-due.is-overdue { border-left-color: var(--accent); }
.rights-mail-due.is-overdue > span { font-weight: 600; }
/* A delivery failure (hw-uq6s.163) reads in the warning color. */
.rights-mail-due.is-failure { border-left-color: var(--warning-dot); }
.rights-mail-marker.is-failure { background: transparent; border: 1px solid var(--warning-dot); color: var(--warning); }
/* A bounced notice's two moves, Update contact and Write again, on a
   line of their own under the failure pill (hw-wfrm.64.4). */
.rights-mail-failure-moves { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 0 6px; font-size: 13px; }
.rights-authority-row.is-failing > .rights-sub { color: var(--warning); }
.rights-mail-subhead { margin: 10px 0 4px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rights-mail-drafts { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
/* A draft sets its subject over its state and author, with Set aside
   beside both, so a long subject never pushes Set aside to a line of
   its own. */
.rights-mail-draft { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 6px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.rights-mail-draft.is-failed { border-style: solid; border-color: var(--danger, #b42318); }
.rights-mail-draft.is-queued, .rights-mail-draft.is-approved { border-style: solid; border-color: var(--accent); }
.rights-mail-draft-open { grid-column: 1; justify-self: start; font-weight: 600; text-align: left; }
.rights-mail-draft-rest { grid-column: 1; }
.rights-mail-draft-discard { grid-column: 2; grid-row: 1 / span 2; font-size: 12px; }
/* The Mail inbox and a mail thread (hw-uq6s.52, track B): the threads
   as one button each, the Reply received marker, the filters, and
   File with. Letters are text, wrapped as written. */
dialog.rights-mail-inbox-sheet, dialog.rights-mail-thread-sheet { width: min(720px, calc(100vw - 28px)); }
.rights-mail-correspondent-sheet { overflow-wrap: anywhere; }
.rights-mail-correspondent-sheet .rights-ask-form { grid-template-columns: minmax(0, 1fr); }
.rights-mail-correspondent-sheet .bar-button { white-space: normal; }
.rights-mail-shows { display: flex; flex-wrap: wrap; gap: 6px; }
.rights-mail-shows .bar-button.is-on { border-color: var(--accent); background: var(--accent-soft); }
/* The inbox's search and pages (hw-wfrm.19, P20): words, a project, and
   two days on one wrapping row, a range line, and Previous and Next. */
.rights-mail-search { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.rights-mail-search-field { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.rights-mail-search-field:first-child { flex: 1 1 220px; }
.rights-mail-search-field input, .rights-mail-search-field select { min-height: 30px; font: inherit; font-size: 13px; color: var(--ink); }
.rights-mail-range { margin: 0; }
.rights-mail-pages { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 650px) {
  .rights-mail-search-field input, .rights-mail-search-field select { font-size: 16px; min-height: 36px; }
  .rights-mail-search-field { flex: 1 1 40%; }
}
.rights-mail-inbox-list, .rights-mail-suggestions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rights-mail-inbox-line { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--subtle); color: inherit; font: inherit; font-size: 13px; line-height: 1.45; text-align: left; cursor: pointer; }
.rights-mail-inbox-line:hover { border-color: var(--accent); }
.rights-mail-inbox-line.is-unfiled { border-left: 3px solid var(--accent); }
/* The Drafts view (hw-uq6s.126, M2): a draft of this book is a button to
   its card; another book's is a link to its card in that book's desk
   (hw-wfrm.5), or words alone without the hand when the desk gives no
   link, and a failed one is marked as the card marks it. */
span.rights-mail-inbox-line.is-elsewhere { cursor: default; }
span.rights-mail-inbox-line.is-elsewhere:hover { border-color: var(--line); }
a.rights-mail-inbox-line { text-decoration: none; }
.rights-mail-open-project { color: var(--accent); font-weight: 600; text-decoration: underline; }
.rights-mail-inbox-line.is-failed { border-color: var(--danger, #b42318); }
.rights-mail-inbox-line b { font-weight: 650; overflow-wrap: anywhere; }
.rights-mail-who { font-weight: 600; }
.rights-mail-marker { justify-self: start; margin: 0; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 600; }
.rights-mail-inbox-sending { margin: 2px 0 0; font-size: 12px; }
/* The card's reply line (hw-uq6s.126, S3): the marker, what to do, and
   Set status, on the due line's rule. */
.rights-mail-reply-line { align-items: center; }
/* A Holders row with a reply the person signed in has not read is
   tinted, its name bold, as an inbox marks a new letter (hw-wfrm.25),
   strong enough to find at a glance, with a filled dot before the name
   (Dan's desk note adc13e, hw-kgp6.49). The accent is the theme's own,
   so one rule serves light and dark. */
.rights-row.is-holders.is-unread { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.rights-row.is-holders.is-unread .rights-title { font-weight: 700; }
.rights-unread { display: inline-flex; align-items: center; align-self: center; }
.rights-unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
/* Needs me (Dan's desk note fc3811, hw-glxt, mapux's spec sections 2
   to 4): a flagged Admins row gets a 4px warning edge where the cursor's
   accent edge sits, an amber flag after the unread dot, and its note under
   the name, two lines at most. The cursor's and the selection's edge win;
   the flag and the note still say it. The warning tokens are the theme's
   own, so one rule serves light and dark, and the unread tint stays the
   only row background. */
.rights-row.is-holders.is-needs-me { box-shadow: inset 4px 0 0 var(--warning); }
.rights-row.is-holders.is-needs-me[aria-current="true"], .rights-row.is-holders.is-needs-me.is-selected { box-shadow: inset 3px 0 0 var(--accent); }
.rights-needs { display: inline-flex; align-items: center; align-self: center; }
.rights-needs-flag { color: var(--warning); font-size: 12px; line-height: 1; }
.rights-needs-note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin-top: 2px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rights-row.is-holders > .rights-needs-phone { display: none; }
.rights-needs-card { margin: 6px 0 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.rights-needs-card > .rights-needs-flag { font-size: 13px; }
.rights-needs-card-label { color: var(--warning); font-weight: 600; }
#rights-needs-me[open] { display: flex; flex-direction: column; overflow: hidden; }
#rights-needs-me > header, #rights-needs-me > p, #rights-needs-me > footer { flex: none; }
#rights-needs-me > p { margin: 12px 0 0; padding-bottom: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
#rights-needs-me .rights-needs-me-body { padding-bottom: 12px; }
#rights-needs-me > footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
/* A thread's handling (hw-wfrm.6, P7): the state and its words, Next
   action, and Handle, Snooze until a day, or Reopen on one wrapping row.
   Handled and Snoozed read quieter than Needs action; an inbox line's
   next action sits under its words. */
.rights-mail-outcome { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.rights-mail-outcome-row { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.rights-mail-outcome-row legend { max-width: 100%; font-weight: 600; }
.rights-mail-outcome-row textarea { min-height: 4.5em; }
.rights-permission-evidence { margin: 8px 0; }
.rights-mail-handling { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.rights-mail-handling-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.rights-mail-handling-moves { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rights-mail-snooze { display: inline-flex; align-items: center; gap: 4px; }
.rights-mail-snooze input { min-height: 30px; font: inherit; font-size: 13px; color: var(--ink); }
.rights-mail-marker.is-handled, .rights-mail-marker.is-snoozed { background: var(--subtle); color: var(--muted); border: 1px solid var(--line); }
.rights-mail-next { font-size: 12px; color: var(--ink); }
@media (max-width: 650px), (max-height: 520px) and (max-width: 1000px) {
  .rights-mail-handling-moves .bar-button { min-height: 44px; }
  .rights-mail-snooze input { min-height: 44px; font-size: 16px; }
}
.rights-mail-file summary { font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.rights-mail-file { display: grid; gap: 8px; }
.rights-mail-suggestions .bar-button { width: 100%; text-align: left; white-space: normal; }
/* The letters that wait to send, each with Set aside beside its words. */
.rights-mail-queue { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 6px; }
.rights-mail-queue .rights-mail-subhead { margin: 0; }
.rights-mail-queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rights-mail-queue-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; font-size: 13px; line-height: 1.45; }
.rights-mail-queue-text { display: grid; overflow-wrap: anywhere; }
.rights-mail-queue-aside { font-size: 12px; }

.primary.button.is-danger, .primary.button.is-danger:hover:not(:disabled) { border-color: var(--removed); background: var(--removed); color: #fff; }
/* A narrow list, an iPad's beside the card or a phone's, folds each row
   into two lines: the name or title with its chips, then the facts. */
@container (max-width: 640px) {
  .rights-sort-head { display: none; }
  .rights-sort-menu { display: flex; }
  .rights-row { padding: 10px 16px; }
  .rights-row.is-titles { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "marker main units" "marker tune tune" "marker holder holder" "marker words words" "marker music music" "marker status status"; }
  /* Folded, a credit names its column, and an empty one leaves no line. */
  .rights-row.is-titles > .rights-tune-cell { grid-area: tune; }
  .rights-row.is-titles > .rights-holder-cell { grid-area: holder; display: flex; flex-wrap: wrap; gap: 2px 8px; }
  .rights-row.is-titles > .rights-words { grid-area: words; }
  .rights-row.is-titles > .rights-music { grid-area: music; }
  .rights-row.is-titles > .rights-credit:empty { display: none; }
  .rights-row.is-titles { row-gap: 0; }
  .rights-row.is-titles > .rights-status-cell { margin-top: 4px; }
  .rights-row.is-titles > .rights-credit { margin-top: 2px; }
  .rights-row.is-titles > .rights-credit::before { content: attr(data-label) " "; font-weight: 600; }
  .rights-row.is-titles > .rights-marker { grid-area: marker; align-self: start; }
  .rights-row.is-titles > .rights-main-cell { grid-area: main; }
  .rights-row.is-titles > .rights-units { grid-area: units; align-self: start; }
  .rights-row.is-titles > .rights-status-cell { grid-area: status; }
  /* Three lines (hw-kgp6.12): the name with the royalty, the relation,
     and the state. Units, Titles, and the Last contact column do not
     draw; Last contact rides the state line (hw-kgp6.48). */
  .rights-row.is-holders { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main money" "relation relation" "status status"; row-gap: 4px; }
  .rights-row.is-holders > .rights-main-cell { grid-area: main; }
  .rights-row.is-holders > .rights-money { grid-area: money; align-self: start; }
  .rights-row.is-holders > .rights-relation { grid-area: relation; }
  .rights-row.is-holders > .rights-relation:empty { display: none; }
  /* A dash says nothing on a stacked row, so the line folds away, and
     its words stay for a screen reader (mapux, hw-kgp6.32). */
  .rights-row.is-holders > .rights-relation:has(> .rights-relation-none) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .rights-row.is-holders > .rights-status-cell { grid-area: status; }
  .rights-row.is-holders > .rights-units, .rights-row.is-holders > .rights-titles, .rights-row.is-holders > .rights-contact { display: none; }
  .rights-row.is-holders .rights-state-contact { display: inline; font-weight: 400; }
  /* A flagged row's note is its own line between the relation and the
     status, full width (hw-glxt, mapux's spec section 3). */
  .rights-row.is-holders.is-needs-me { grid-template-areas: "main money" "relation relation" "needs needs" "status status"; }
  .rights-row.is-holders > .rights-needs-phone { display: -webkit-box; grid-area: needs; margin-top: 0; }
  .rights-row.is-holders > .rights-main-cell .rights-needs-note { display: none; }
  .rights-group-head { top: 0; padding: 10px 16px 6px; }
}
@media (max-width: 1000px) {
  .rights-head { --page-pad: 16px; padding-block: 10px 8px; }
}
@media (max-width: 650px) {
  .rights-head { --page-pad: 12px; padding-block: 8px; }
  /* A phone is narrower than the column, so Wide would change nothing. */
  .rights-more-menu .rights-wide { display: none; }
  .rights-run { font-size: 13px; }
  .rights-bar { flex-wrap: wrap; }
  .rights-views { flex: 1; }
  .rights-views .index-view { flex: 1; justify-content: center; }
  /* The views take the first row, the search the second, and Filters,
     Select, and More share the third (hw-kgp6.12). */
  .rights-bar > .rights-views { flex-basis: 100%; }
  .rights-rule-form input, .rights-rule-form select, .rights-rule-form textarea { font-size: 16px; }
  .rights-add-match, .account-match { min-height: 44px; }
  .rights-status-select { max-width: 100%; min-height: 44px; font-size: 16px; }
  .rights-contract-select { min-height: 44px; font-size: 16px; }
  .rights-holder-actions .text-button, .rights-work-edit, .rights-footer-toggle { min-height: 44px; }
  /* A holder row's controls take their own line under the facts. */
  .rights-psalter button, .rights-psalter summary { min-height: 44px; }
  .rights-table.is-permissions tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
  .rights-table.is-permissions thead { display: none; }
  .rights-table.is-permissions td { border-bottom: 0; }
  .rights-table.is-permissions td:nth-child(n+4) { grid-column: 1 / -1; padding-top: 0; }
  .rights-table.is-permissions tr { border-bottom: 1px solid var(--line); }
  .rights-filter { order: 3; flex: 1 1 100%; font-size: 16px; }
  .rights-bar > .rights-filters, .rights-bar > .rights-select-mode, .rights-bar > .rights-more-wrap { order: 4; flex: 1; }
  .rights-more-wrap > .rights-more { flex: 1; justify-content: center; }
  .rights-sort-menu .sort-select-field { flex: 1; font-size: 16px; }
  .rights-card { position: absolute; inset: 0; z-index: 2; width: auto; border-left: 0; }
  .rights-card-body { padding: 4px 16px calc(32px + env(safe-area-inset-bottom)); }
  .rights-gens { left: 8px; right: 8px; width: auto; max-height: calc(100dvh - 160px); }
  .rights-gens-form select { font-size: 16px; }
  .rights-gen-line { grid-template-columns: 52px minmax(0, 1fr); }
  .rights-gen-acted { grid-column: 2; }
  dialog.rights-calc { width: 100vw; max-width: 100vw; max-height: 88dvh; margin: auto 0 0; border-width: 1px 0 0; border-radius: 14px 14px 0 0; }
  .rights-calc-form { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .rights-calc-field input { font-size: 16px; }
  .rights-calc-out { grid-template-columns: 1fr 1fr; }
  .rights-calc-out .is-amount { grid-column: 1 / -1; }
  .rights-calc-actions .button { flex: 1; min-height: 44px; }
  dialog.rights-ask { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-width: 1px 0 0; border-radius: 14px 14px 0 0; }
  .rights-ask-form, .rights-ask-done { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .rights-ask-grid { grid-template-columns: 1fr; }
  .rights-ask-field :is(input, select, textarea) { font-size: 16px; }
  .rights-portal-bar .rights-portal-button { flex: 1 1 auto; }
  .rights-mail-bar .rights-mail-button { flex: 1 1 auto; }
  .rights-mail-fields dl { grid-template-columns: 1fr; }
  .rights-mail-draft { padding: 2px 10px 6px; }
  .rights-mail-draft-open { display: inline-flex; align-items: center; }
}
@media (pointer: coarse) {
  .rights-row { min-height: 48px; }
  .rights-sort-menu .sort-select-field { min-height: 44px; }
  .rights-card-back, .rights-columns-open, .rights-pd-confirm, .rights-pd-undo, .rights-pd-ask button, .rights-columns-list label, .rights-filters, .rights-group, .rights-calc-open, .rights-export, .rights-copy-copyrighted, .rights-views .index-view, .rights-gens-open, .rights-review-open, .rights-rule button, .rights-review-item button, .rights-review-bulk button, .rights-gen-show, .rights-gens-cutoff-set, .rights-gen-accept, .rights-gens-form .button, .rights-gens-form select { min-height: 44px; }
  .rights-gens-close { width: 44px; height: 44px; }
  .rights-gens-cutoff-set { display: block; }
  .rights-portal-button, .rights-ask .button, .rights-ask-field :is(input, select), .rights-ask-scope, .rights-countersign-consent { min-height: 44px; }
  .rights-mail-button, .rights-mail-template-names .bar-button, .rights-mail-template-retired > summary, .rights-mail-tpl-preview > summary, .rights-mail-tpl-defaults > summary, .rights-mail-thread > summary, .rights-mail-contact, .rights-mail-draft-open, .rights-mail-draft-discard, .rights-mail-due-draft, .rights-mail-letter-reply { min-height: 44px; }
  .rights-mail-letter { padding-block: 0; }
  .rights-mail-letter-line { padding-block: 12px; }
  .rights-mail-letter-fold[open] { padding-bottom: 8px; }
  .rights-mail-inbox-line, .rights-mail-shows .bar-button, .rights-mail-suggestions .bar-button, .rights-mail-file summary, .rights-mail-queue-aside { min-height: 44px; }
  .rights-gen-line { min-height: 36px; }
  .rights-rule .text-button, .rights-review-item .text-button, .rights-gen-accept { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; font-size: 13px; }
}
/* The status workflow (hw-uq6s.4.4): the selection bar, the line that
   says what the last change did, the status menu, a popover from the
   head on a desktop and a bottom sheet on a phone, and Paid's payment
   form inside it. */
.rights-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.rights-selection[hidden] { display: none; }
.rights-selection-count { font-weight: 600; }
.rights-notice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0; font-size: 13px; }
.rights-notice:empty { display: none; }
.rights-selection-status:disabled { opacity: .55; }
/* Select in the Holders list (desk note 0caafd, hw-uq6s.98): a checkbox
   left of every holder's name while Select is on. The row is the button
   that ticks it, and is-selected ticks the drawn box. */
.rights-select-mode { flex: none; }
.rights-select-mode[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 650; }
/* Hide done on Titles (hw-wm7m.365) leads the counts line's tools, so
   it takes the push right, and Select follows it. Pressed, it reads as
   Select does. */
.rights-hide-done { flex: none; margin-left: auto; font-size: 12px; min-height: 22px; }
.rights-hide-done[aria-pressed="true"] { color: var(--accent); font-weight: 650; }
.rights-mail-due-filter, .rights-mail-needs-filter { flex: none; font-size: 12px; min-height: 22px; }
.rights-mail-due-filter[aria-pressed="true"], .rights-mail-needs-filter[aria-pressed="true"] { color: var(--accent); font-weight: 650; }
.rights-check { display: none; }
.rights-list.is-selecting .rights-check { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 18px; height: 18px; box-sizing: border-box; border: 1.5px solid var(--control-line); border-radius: 4px; background: var(--surface); }
.rights-list.is-selecting .rights-row.is-holders > .rights-main-cell { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; }
/* In Select a flagged row's note stays under the name, past the box. */
.rights-list.is-selecting .rights-row.is-holders > .rights-main-cell > .rights-needs-note { grid-column: 2; }
/* Select in Titles (hw-uq6s.138): the checkbox sits left of the title. */
.rights-list.is-selecting .rights-row.is-titles > .rights-main-cell { display: flex; align-items: center; gap: 10px; }
.rights-list.is-selecting .rights-row.is-selected .rights-check { border-color: var(--accent); background: var(--accent); }
.rights-list.is-selecting .rights-row.is-selected .rights-check::after { content: ""; width: 5px; height: 9px; margin-top: -2px; border: solid var(--surface); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rights-row.is-selected { box-shadow: inset 3px 0 0 var(--accent); }
.rights-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.rights-card-select[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.rights-status-menu { position: absolute; z-index: 6; top: calc(100% - 4px); right: 24px; width: min(420px, calc(100% - 48px)); max-height: min(78vh, 680px); overflow: auto; display: grid; gap: 8px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px rgb(0 0 0 / .18); font-size: 13px; }
.rights-status-menu[hidden] { display: none; }
.rights-status-menu:focus { outline: none; }
.rights-status-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rights-status-head h2 { margin: 0; font-size: 15px; }
.rights-status-for { margin: 0; color: var(--muted); }
.rights-status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rights-status-item { display: grid; grid-template-columns: 18px auto minmax(0, 1fr); align-items: center; gap: 4px 10px; width: 100%; padding: 6px 8px; border-radius: 6px; text-align: left; color: var(--ink); }
.rights-status-item:hover:not(:disabled), .rights-status-item.is-hand { background: var(--accent-soft); }
.rights-status-item:disabled { opacity: .55; cursor: default; }
.rights-status-item .rights-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rights-status-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--muted); text-align: center; }
.rights-status-label { font-weight: 600; }
.rights-status-note { width: 100%; box-sizing: border-box; }
.rights-payment { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 6px 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.rights-payment[hidden] { display: none; }
.rights-payment-title { grid-column: 1 / -1; margin: 0; font-weight: 600; }
.rights-payment .button { grid-column: 1 / -1; justify-self: start; }
.rights-status-error { margin: 0; color: var(--removed); }
.rights-status-error:empty { display: none; }
@media (max-width: 650px) {
  .rights-status-menu { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82dvh; border-radius: 14px 14px 0 0; border-bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  /* On a phone the Columns menu is a bottom sheet, as the status menu is. */
  .rights-gens.rights-columns { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82dvh; border-radius: 14px 14px 0 0; border-bottom: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .rights-status-note, .rights-payment input, .rights-payment select { font-size: 16px; }
}
@media (pointer: coarse) {
  .rights-status-item { min-height: 44px; }
  .rights-status-close { width: 44px; height: 44px; }
  .rights-selection .bar-button, .rights-selection .text-button, .rights-card-actions .bar-button, .rights-notice-undo, .rights-payment .button { min-height: 44px; }
  .rights-select-mode, .rights-more, .rights-more-item, .rights-hide-done, .rights-mail-due-filter, .rights-mail-needs-filter { min-height: 44px; }
  .rights-list.is-selecting .rights-row.is-holders, .rights-list.is-selecting .rights-row.is-titles { min-height: 44px; }
  .rights-list.is-selecting .rights-check { width: 24px; height: 24px; }
}
/* The rights manager's page (hw-uq6s.23): the Rights package alone, under
   a bar with the project, the project list, Your account, and Sign out. */
.rights-desk-page .workspace { position: relative; }
.rights-desk-page .appbar { gap: 10px; }
.rights-desk-page .publication { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Preferences and Your account are words on a wide screen and icons on a
   phone, so the bar keeps Sign out in view (hw-wfrm.46). */
.rights-desk-page .rd-bar-icon { display: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.rd-none { margin: 48px auto; padding: 0 24px; max-width: 560px; }
.rd-none-title { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.rd-none-lead { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.rd-projects-list { list-style: none; margin: 0; padding: 4px 0 8px; display: grid; gap: 2px; }
.rd-project { display: block; padding: 10px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 14px; }
.rd-project:hover { background: var(--subtle); }
.rd-project[aria-current="page"] { background: var(--accent-soft); font-weight: 600; }
@media (max-width: 600px) {
  .rights-desk-page .rd-environment { display: none; }
  .rights-desk-page .appbar { gap: 8px; }
  .rights-desk-page #preferences-open, .rights-desk-page #account-open, .rights-desk-page #sign-out, .rights-desk-page #help-open { min-height: 36px; }
  .rights-desk-page #help-open, .rights-desk-page #preferences-open, .rights-desk-page #account-open { min-width: 36px; }
  .rights-desk-page .rd-bar-label { display: none; }
  .rights-desk-page .rd-bar-icon { display: block; margin: 0 auto; }
  /* The project switcher is its chevron alone on a phone, as it was
     before the icons left it room for a clipped letter of the name. Its
     aria-label still names it. */
  .rights-desk-page .project-switch-name { display: none; }
  .rd-project { padding: 12px; min-height: 44px; box-sizing: border-box; }
  .rd-none { margin: 28px auto; padding: 0 16px; }
}
/* With the Rights package's tab the bar holds three package tabs. Below
   a desktop they take the phone's icon form. On a phone the bar leaves
   them to the desk menu, which lists the other two packages (Stephen,
   2026-10-17), so the bar keeps its fit (hw-59nc). */
.menu-packages { display: none; }
@media (max-width: 1000px) {
  .mode-switch:has(> #mode-rights:not([hidden])) { height: 36px; gap: 2px; }
  .mode-switch:has(> #mode-rights:not([hidden])) > .mode-tab { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 6px; border-bottom: 0; }
  .mode-switch:has(> #mode-rights:not([hidden])) > .mode-tab[aria-selected="true"] { background: var(--accent-soft); }
  .mode-switch:has(> #mode-rights:not([hidden])) .mode-icon { display: block; }
  .mode-switch:has(> #mode-rights:not([hidden])) .mode-word { display: none; }
}
@media (max-width: 650px) {
  .appbar .mode-switch:has(> #mode-rights:not([hidden])) { display: none; }
  .menu-packages:not([hidden]) { display: grid; }
}

@media (max-width: 650px) {
  /* The menu fills a phone's screen under the bar, which keeps the menu
     button, and stacks its columns (hw-kyy3.5.1). app.js sets --menu-top
     to the bar's foot. */
  .desk-menu { position: fixed; inset: var(--menu-top, 52px) 0 0 0; width: auto; max-height: none; border: 0; border-radius: 0; box-shadow: none; font-size: 14px; }
  .menu-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 4px; }
  .menu-head-title { font-size: 18px; }
  .menu-columns { grid-template-columns: 1fr; }
  .menu-app { border-left: 0; border-top: 1px solid var(--line); }
  .menu-item { font-size: 14px; }
}

/* The Users panel (hw-kyy3.9): a top bar over the list and the chosen
   person's card. A phone shows the list, then the card with a way
   back. */
dialog.users-panel { width: min(1120px, calc(100vw - 48px)); height: min(760px, calc(100dvh - 48px)); max-height: none; padding: 0; overflow: hidden; font-size: 13px; }
dialog.users-panel[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.users-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.users-head h2 { margin: 0; font-size: 17px; }
.users-total { padding: 1px 8px; border-radius: 999px; background: var(--subtle); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.users-scope { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 12px; }
.users-head .grow { flex: 1; }
.users-close { width: 32px; height: 32px; font-size: 22px; line-height: 1; color: var(--muted); }
.users-body { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 0; }
.users-list-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line); background: var(--subtle); }
.users-list { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 0 8px 12px; list-style: none; }
.users-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.users-row:hover { background: var(--hover); }
.users-row[aria-selected="true"] { background: var(--accent-soft); }
.users-row[aria-selected="true"]::before { content: ""; position: absolute; left: 3px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--accent); }
.users-row[data-disabled="true"] .users-row-name { color: var(--muted); }
.users-row-text { display: grid; min-width: 0; }
.users-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.users-row-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.users-initials { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 700; }
.users-initials-big { width: 46px; height: 46px; font-size: 15px; }
.users-chip { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.users-chip[data-chip="No password yet"], .users-chip[data-chip="You"] { border-color: var(--accent); color: var(--accent); }
.users-chip[data-chip="Must change"], .users-chip[data-chip="Locked"] { border-color: transparent; background: var(--hover); color: var(--ink); }
.users-chip[data-chip="Password set"] { border-color: transparent; background: transparent; color: var(--added); }
.users-card { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.users-card-body { position: relative; }
.users-empty { margin: 30px; }
.users-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.users-back { display: none; }
.users-card-name { margin: 2px 0 6px; font-size: 22px; font-weight: 650; }
.users-card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.users-card-actions { position: relative; display: flex; gap: 8px; }
.users-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 3; display: grid; min-width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px var(--shadow); }
.users-menu-item { justify-content: flex-start; padding: 8px 10px; border-radius: 6px; text-align: left; font-size: 13px; }
.users-menu-item:hover { background: var(--hover); }
.users-banner { margin: 16px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); }
.users-link, .users-form { display: grid; gap: 6px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.users-link input, .users-form input { min-width: 0; padding: 6px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.users-link-note { margin: 0; color: var(--muted); font-size: 12px; }
.users-section-head { display: flex; align-items: baseline; justify-content: space-between; }
.users-lines { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.users-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 12px; }
.users-line + .users-line { border-top: 1px solid var(--line); }
.users-line[data-live="false"] { color: var(--faint); }
.users-line-what { display: grid; min-width: 0; }
.users-line-acts { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: flex-end; }
.users-line-what small, .users-ends-text { color: var(--muted); font-size: 12px; }
.users-ends-input { padding: 3px 6px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; }
.users-events { margin: 0; padding: 0; list-style: none; }
.users-events li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.users-event-when { color: var(--muted); font-variant-numeric: tabular-nums; }
/* Add to projects and New user (hw-kyy3.10). */
/* dialog header button makes a 36 px square for close buttons; New user
   sizes to its label instead. */
.users-head .users-new { flex: none; width: auto; height: auto; min-height: 32px; font-size: 12px; white-space: nowrap; }
.users-add { margin: 10px 0 12px; }
.users-field { display: grid; gap: 4px; }
.users-label, .users-projects legend, .users-sees legend { padding: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.users-seg { display: inline-flex; justify-self: start; border: 1px solid var(--control-line); border-radius: 7px; overflow: hidden; }
.users-seg button { min-height: 32px; padding: 5px 12px; border: 0; border-radius: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; }
.users-seg button + button { border-left: 1px solid var(--control-line); }
.users-seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.users-seg button.users-struck { color: var(--faint); text-decoration: line-through; cursor: not-allowed; }
.users-hint-line { color: var(--muted); font-size: 12px; }
.users-projects, .users-sees { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.users-group { display: grid; gap: 4px; }
.users-group-title { color: var(--faint); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.users-check { display: flex; gap: 8px; align-items: center; }
.users-locked { color: var(--muted); }
.users-summary { margin: 4px 0 0; font-weight: 600; }
.users-form-foot { display: flex; justify-content: flex-end; gap: 8px; }
.users-status { margin: 0; padding: 0 18px; min-height: 0; color: var(--muted); font-size: 12px; }
.users-tabs { flex: none; }
/* dialog header button sizes the tabs to a 36 px close square too. */
.users-head .users-tabs button { width: auto; height: auto; min-height: 32px; font-size: 12px; white-space: nowrap; }
.users-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.users-log { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px 18px; overflow: auto; }
.users-log[hidden], .users-body[hidden] { display: none; }
.users-log-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.users-log-search { flex: 1 1 240px; }
.users-log-bar select { min-height: 32px; padding: 4px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.users-log-csv { display: inline-flex; align-items: center; min-height: 32px; margin-left: auto; padding: 0 12px; border: 1px solid var(--control-line); border-radius: 7px; color: var(--ink); font-size: 12px; text-decoration: none; white-space: nowrap; }
.users-log-csv:hover { background: var(--hover); }
.users-log-table { width: 100%; border-collapse: collapse; }
.users-log-table th { padding: 6px 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; }
.users-log-table td { padding: 8px; border-bottom: 1px dashed var(--line); vertical-align: top; }
.users-log-when { width: 110px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.users-log-what { display: grid; gap: 2px; }
.users-log-what small { color: var(--muted); font-size: 12px; }
.users-log-where { width: 200px; color: var(--muted); }
.users-log-older { align-self: center; }
.users-open-log { justify-self: start; margin-top: 6px; }
.users-status:not(:empty) { padding: 8px 18px; border-top: 1px solid var(--line); }
@media (max-width: 650px) {
  dialog.users-panel { width: 100vw; height: 100dvh; max-width: none; margin: 0; border: 0; border-radius: 0; }
  .users-body { grid-template-columns: minmax(0, 1fr); }
  dialog.users-panel[data-view="list"] .users-card, dialog.users-panel[data-view="card"] .users-list-pane { display: none; }
  .users-list-pane { border-right: 0; background: var(--surface); }
  .users-search input { font-size: 16px; }
  .users-hint { display: none; }
  .users-back { display: block; grid-column: 1 / -1; justify-self: start; min-height: 44px; }
  .users-card-head { grid-template-columns: auto minmax(0, 1fr); }
  .users-card-actions { grid-column: 1 / -1; }
  .users-line { grid-template-columns: minmax(0, 1fr) auto; }
  .users-ends, .users-ends-text { grid-column: 1; }
  .users-row, .users-menu-item, .users-close, .users-seg button, .users-check { min-height: 44px; }
  .users-head { flex-wrap: wrap; }
  .users-scope { flex: 1 1 0; min-width: 0; }
  .users-tabs { order: 10; flex-basis: 100%; }
  .users-tabs button { flex: 1; }
  .users-log { padding: 12px; }
  .users-log-search input { font-size: 16px; }
  .users-log-table thead { display: none; }
  .users-log-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
  .users-log-table td { padding: 0; border: 0; }
  .users-log-what { grid-column: 1 / -1; grid-row: 2; }
  .users-log-when, .users-log-where { width: auto; }
}
/* Threads on rights rows (hw-uq6s.4.21): the index threads' component
   (threadview.js) on a title card, a holder card, and under a Review strip
   line. The ithread-* rules draw it; these fit it to the card. */
.rights-threads { display: grid; gap: 8px; }
.rights-threads-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.rights-card-section.rights-threads h3 { margin: 0; }
.rights-threads p { margin: 0; }
.rights-threads .ithread-quote { white-space: pre-line; }
.rights-threads .ithread { font-size: 13px; }
.rights-threads .ithread-meta, .rights-threads .ithread-now-label, .rights-threads .isuggest-head { font-size: 11px; }
.rights-threads .ithread-desk p, .rights-threads .ithread-event p { font-size: 12px; }
.rights-thread-composer select, .rights-thread-value { font: inherit; font-size: 13px; min-width: 0; padding: 5px 8px; border: 1px solid var(--control-line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.rights-thread-composer .icomposer-modes { justify-self: start; }
.rights-thread-value[hidden] { display: none; }
.rights-review-item > .rights-threads { flex-basis: 100%; margin: 4px 0 6px; padding: 8px 0 0 24px; border-top: 0; }
.rights-gens-threads { display: grid; gap: 6px; margin-top: 10px; }
.rights-gens-threads[hidden] { display: none; }
.rights-gens-threads h4 { margin: 0; font-size: 12px; }
.rights-gens-thread-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.rights-gen-thread { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; }
@media (pointer: coarse) {
  .rights-comment, .rights-thread-composer select, .rights-thread-value, .rights-gen-thread .text-button { min-height: 44px; }
  .rights-thread-composer select, .rights-thread-value { font-size: 16px; }
}

/* The Client view's closed page, which GET /client/ answers when the
   Client's package read is refused: no session, a replaced link, or a
   desk taken offline (clientshell.go, writeClientClosed, hw-fswv.14.14).
   The bar and the words alone, and in a View as the banner above them. */
body[data-closed] { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--ground); color: var(--ink); }
.client-closed-bar { flex: none; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; box-sizing: border-box; background: var(--surface); border-bottom: 1px solid var(--line); }
.client-closed-logo { display: block; width: 32px; height: 32px; }
.client-closed-name { font-size: 16px; font-weight: 600; }
.client-closed { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.client-closed-words { max-width: 30em; margin: 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 16px; line-height: 1.5; text-align: center; }

/* Administered by, a field of the holder card (hw-kgp6.11, mapux
   design hw-kgp6.5 unit 4): the administrator's name links its card, and
   the sheets' question waits in a box with an amber edge, as the mock
   question-* draws it. Decide later folds it to one line. */
.rights-adminfield .rights-facts { margin: 0; }
.rights-holder-link { font: inherit; padding: 0; text-align: left; }
/* Show all on the card's Administers matches Set administrator…
   (hw-kgp6.32). */
.rights-adminfield-set, .rights-adminfield-all { font-size: 13px; }
.rights-adminfield-loop { display: block; margin-top: 4px; font-size: 13px; }
.rights-adminfield-question { display: grid; gap: 6px; margin: 8px 0 0; padding: 10px 14px; border: 1px solid var(--warning); border-left-width: 4px; border-radius: 8px; background: var(--surface); font-size: 13px; }
.rights-adminfield-question > p { margin: 0; }
.rights-adminfield-choice { display: flex; align-items: center; gap: 8px; }
.rights-adminfield-actions { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.rights-adminfield-later { margin: 6px 0 0; font-size: 13px; }
/* hw-kgp6.19: the field's History, the dated administrator rows, folded
   to one quiet line under the field. */
.rights-admin-history { margin: 6px 0 0; font-size: 13px; }
.rights-admin-history > summary { cursor: pointer; min-height: 44px; padding: 12px 0; box-sizing: border-box; color: var(--muted); }
.rights-admin-history > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rights-admin-history > .rights-authority-list { margin-top: 4px; }
.rights-history-tail { color: var(--muted); font-size: 12px; white-space: pre-wrap; }
.rights-needs-answer { font-weight: 600; color: var(--warning); }
/* A file from a computer in a letter (hw-uq6s.208): the link and each
   added file's Remove take a finger's 44px, and an empty refusal line
   takes no room. */
.rights-mail-attach-add { margin: 8px 0 0; }
.rights-mail-attach-status:empty { display: none; }
@media (pointer: coarse) {
  .rights-mail-attach-add .text-button, .rights-mail-upload .text-button { min-height: 44px; }
}
