/* Layout: one working surface. Tabs on top (Dashboard first, then tables), a filter bar, then a wide item/subitem grid that scrolls sideways on its own. */
:root {
  --bg: #f3f5f6;
  --surface: #ffffff;
  --surface-2: #f8fafa;
  --fg: #18222b;
  --muted: #5a6873;
  --line: #dfe5e8;
  --line-strong: #c7d0d5;
  --accent: #0d6b73;
  --accent-soft: #e2f1f2;
  --danger: #b8392f;
  --danger-soft: #fbe9e7;
  --on-st: #ffffff;
  --st-none: #c9d1d6;
  --st-start: #6f7f8c;
  --st-work: #d08700;
  --st-wait: #3769b8;
  --st-stuck: #c2402f;
  --st-done: #2f8a55;
  --font-ui: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 6px;
  --scrim: rgba(16, 24, 30, 0.22);
  --shadow: rgba(16, 24, 30, 0.14);
  --rule: #e6008a;
  --txt-mark: #e3b52a; --num-mark: #6f9fd8; --colline-sub: #9eabb3; --sub-tint: #d1d147;
  --lift: rgba(16, 24, 30, 0.22); --lift-hi: rgba(255, 255, 255, 0.85); --lift-sheen: rgba(255, 255, 255, 0.5); --lift-face: rgba(16, 24, 30, 0.2); --well: rgba(16, 24, 30, 0.04); --well-in: rgba(16, 24, 30, 0.22); --well-lip: rgba(255, 255, 255, 0.6); --well-pill: rgba(0, 0, 0, 0.3);
  --rec-in: #2d62b0; --rec-out: #2a7d4b; --rec-gen: #6b52b8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161a; --surface: #182026; --surface-2: #1c252c; --fg: #e5ebee; --muted: #94a3ad;
    --line: #283239; --line-strong: #36424a; --accent: #4fb5bd; --accent-soft: #173438;
    --danger: #ec7c70; --danger-soft: #3a1f1c; --on-st: #ffffff;
    --st-none: #3a464e; --st-start: #5d6d79; --st-work: #b87800; --st-wait: #3b6cb5; --st-stuck: #b23b2c; --st-done: #2c7d4e;
    --scrim: rgba(0, 0, 0, 0.45); --shadow: rgba(0, 0, 0, 0.5); --rule: #ff5cc0; --txt-mark: #b38f22; --num-mark: #4f7fb8;
    --colline-sub: #4f5d66; --sub-tint: #d8d870; --lift: rgba(0, 0, 0, 0.5); --lift-hi: rgba(255, 255, 255, 0.1); --lift-sheen: rgba(255, 255, 255, 0.04); --lift-face: rgba(0, 0, 0, 0.55); --well: rgba(0, 0, 0, 0.16); --well-in: rgba(0, 0, 0, 0.55); --well-lip: rgba(255, 255, 255, 0.07); --well-pill: rgba(0, 0, 0, 0.45);
    --rec-in: #7fa8ea; --rec-out: #6cc38f; --rec-gen: #ab97ec;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161a; --surface: #182026; --surface-2: #1c252c; --fg: #e5ebee; --muted: #94a3ad;
  --line: #283239; --line-strong: #36424a; --accent: #4fb5bd; --accent-soft: #173438;
  --danger: #ec7c70; --danger-soft: #3a1f1c; --on-st: #ffffff;
  --scrim: rgba(0, 0, 0, 0.45); --shadow: rgba(0, 0, 0, 0.5); --rule: #ff5cc0; --txt-mark: #b38f22; --num-mark: #4f7fb8;
    --colline-sub: #4f5d66; --sub-tint: #d8d870; --lift: rgba(0, 0, 0, 0.5); --lift-hi: rgba(255, 255, 255, 0.1); --lift-sheen: rgba(255, 255, 255, 0.04); --lift-face: rgba(0, 0, 0, 0.55); --well: rgba(0, 0, 0, 0.16); --well-in: rgba(0, 0, 0, 0.55); --well-lip: rgba(255, 255, 255, 0.07); --well-pill: rgba(0, 0, 0, 0.45);
  --rec-in: #7fa8ea; --rec-out: #6cc38f; --rec-gen: #ab97ec;
  --st-none: #3a464e; --st-start: #5d6d79; --st-work: #b87800; --st-wait: #3b6cb5; --st-stuck: #b23b2c; --st-done: #2c7d4e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-ui); font-size: 14px; }   /* no margin, as in the artifact, so the top bar starts at the top of the window */
.wrap { max-width: var(--page-w, 1280px); margin: 0 auto; padding-block: 10px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 10px; }
#notes:empty, #drawer:empty { display: none; }   /* nothing to show: no gap for them either */
/* One bar at the top: Undo and Redo, the tabs, then the counts and the "more" menu. */
header.top { display: flex; align-items: flex-end; gap: 6px 10px; flex-wrap: nowrap; border-bottom: 1px solid var(--line); }
/* The bar stays at the top while the page scrolls (a frozen pane). A layer behind it (::before) reaches from one edge
   of the window to the other (render.js measures --hl and --cw), so rows, and their tick boxes out in the margin,
   pass under it unseen. Once the page has scrolled, a soft shadow under it (::after, .stuck) shows the rows go on
   beneath. It sits under dialogs and their scrim (20 and up) and over the floating subitem column names (18). */
header.top { position: sticky; top: 0; z-index: 19; background: var(--bg); padding-top: 10px; margin-top: -10px; }   /* at the very top from the start, so it never moves */
header.top::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: -1px; left: var(--hl, 0px); width: var(--cw, 100%); background: var(--bg); pointer-events: none; }
header.top::after { content: ""; position: absolute; top: 100%; left: var(--hl, 0px); width: var(--cw, 100%); height: 10px; margin-top: 1px; pointer-events: none;
  background: linear-gradient(var(--shadow), transparent); opacity: 0; transition: opacity 150ms ease; }
header.top.stuck::after { opacity: 0.55; }
html { scroll-padding-top: var(--headh, 56px); }   /* focus and jumps land below the bar */
/* Room for the page's scrollbar is kept even when the page is short, so a view that scrolls and one that doesn't sit in
   the same place (where scrollbars always show, the centred page would otherwise move by half a scrollbar's width). */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }
header.top .tabs { flex: 1 1 auto; border-bottom: 0; }
.top-right { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-left: auto; padding-bottom: 5px; }
.backup { display: flex; align-items: center; gap: 6px; position: relative; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent;
  border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
.iconbtn:hover:not([disabled]), .iconbtn[aria-expanded="true"] { color: var(--fg); border-color: var(--line-strong); background: var(--surface); }
.iconbtn[disabled] { opacity: 0.35; cursor: default; }
.moremenu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 40; width: 280px; padding: 4px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px var(--shadow); }
.moremenu .dnote { margin: 6px 8px; }
.mitem { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border: 0; border-radius: 5px;
  background: none; color: var(--fg); cursor: pointer; }
.mitem:hover:not([disabled]), .mitem:focus-visible { background: var(--accent-soft); outline: none; }
.mitem[disabled] { opacity: 0.55; cursor: default; }
.mi-t { font-weight: 600; font-size: 13.5px; }
.mi-d { font-size: 12px; color: var(--muted); line-height: 1.35; }
.export-msg { font-size: 12px; color: var(--muted); max-width: 320px; }
.snaplist { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.snaprow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.snap-when { font-weight: 600; font-size: 13.5px; }
.summary { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; padding: 2px 4px 8px; }
.summary:empty { display: none; }
.summary b { color: var(--fg); font-weight: 600; }
.summary .late { color: var(--danger); }

.tabs { display: flex; gap: 4px; flex-wrap: nowrap; border-bottom: 1px solid var(--line); min-width: 0; overflow-x: clip; }
.tabs > * { flex: none; }
.tab { font: inherit; font-weight: 500; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  padding: 8px 12px; cursor: pointer; margin-bottom: -1px; }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.tab.dash { font-weight: 600; }
.tab.new { color: var(--accent); }
.tab-sep { width: 1px; background: var(--line-strong); margin: 8px 6px; }

.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.board-name { font: inherit; font-size: 17px; font-weight: 600; color: var(--fg); background: transparent; border: 1px solid transparent;
  border-radius: var(--radius); padding: 5px 8px; min-width: 0; flex: 1 1 220px; }
.board-name:hover { border-color: var(--line); }
.board-name:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.board-name.static:hover { border-color: transparent; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { font: inherit; font-size: 13px; background: var(--surface); color: var(--muted); border: 0; padding: 6px 11px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-st); }
.ctl { font: inherit; font-size: 13px; background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 6px 9px; }
.ctl.search { width: 180px; max-width: 100%; }
.btn { font: inherit; font-size: 13px; border-radius: var(--radius); padding: 6px 11px; cursor: pointer; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--fg); white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-st); font-weight: 600; }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn.ghost-danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn.ghost-danger.armed, .x.armed { background: var(--danger); border-color: var(--danger); color: var(--on-st); }

.panel { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.prow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plabel { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); width: 58px; flex: none; }
.chip { font: inherit; font-size: 12.5px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg);
  border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.vchip { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.vchip.on { border-color: var(--accent); background: var(--accent-soft); }
.vchip .vname { font: inherit; font-size: 12.5px; background: none; border: 0; color: var(--fg); padding: 4px 6px 4px 11px; cursor: pointer; }
.vchip.on .vname { font-weight: 600; }
.vchip .x { border-radius: 0 999px 999px 0; padding: 3px 9px 3px 5px; }
.hint { font-size: 12.5px; color: var(--muted); }
.modified { font-size: 12px; color: var(--st-work); font-weight: 600; }
.name-input { width: 200px; max-width: 100%; }

.note { font-size: 13px; padding: 8px 12px; border-radius: var(--radius); background: var(--accent-soft); color: var(--fg); }
.note.err { background: var(--danger-soft); }
.note.sortbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 5px 10px; font-size: 12.5px; }

.grid-scroll { overflow-x: auto; overflow-y: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
th { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz { position: absolute; top: 0; right: 0; width: 6px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
.rz.rzl { right: auto; left: 0; }
.rz:hover, .rz.hov, .rz.on { background: linear-gradient(var(--accent), var(--accent)) right center / 1px 100% no-repeat; }
.rz.rzl:hover, .rz.rzl.hov, .rz.rzl.on { background-position: left center; }
body.resizing, body.resizing * { cursor: col-resize !important; user-select: none; }
/* dragging a column's title to move the column (render.js colDragWire) */
body.coldragging, body.coldragging * { cursor: grabbing !important; user-select: none; }
th.coldrag { opacity: 0.4; }
.coldrop { position: fixed; z-index: 60; width: 4px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); pointer-events: none; }
.colghost { position: fixed; z-index: 61; padding: 3px 9px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 6px 18px rgba(0,0,0,.18); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg); pointer-events: none; white-space: nowrap; }
tr.item > td { border-top: 1px solid var(--line-strong); padding-top: 5px; padding-bottom: 5px; }
tr.item .cell.name-item { font-size: 14px; }
tr.nest > td { padding: 0; background: var(--surface-2); }
/* An item's subitems sit in one box that starts just below the item, joined to it by an elbow line. The box has no
   frame (its border is kept, clear, so nothing shifts): the row tints already set items and subitems apart. */
.nestwrap { padding: 0 12px 12px 30px; position: relative; }
.nestwrap::before { content: ""; position: absolute; left: 13px; top: 0; width: 15px; height: 15px; border-left: 2px solid color-mix(in srgb, var(--tc, var(--line-strong)) 60%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--tc, var(--line-strong)) 60%, transparent); border-bottom-left-radius: 7px; }
.nestbox { width: fit-content; border: 1.5px solid transparent; border-radius: 8px; background: var(--surface); }
table.subtable { border: 1px solid var(--line-strong); border-top: 0; background: var(--surface); }
/* separate borders so the corner cells can be rounded to the frame (cells only draw bottom and left borders, so nothing doubles);
   no overflow clipping, the select-all box sits in the margin outside the frame */
.nestbox > table.subtable, .nestbox > table.subtable.nohead { border: 0; border-collapse: separate; border-spacing: 0; background: transparent; }
.nestbox > table > thead > tr:first-child > :first-child, .nestbox > table.nohead > tbody > tr:first-child > :first-child { border-top-left-radius: 6.5px; }
.nestbox > table > thead > tr:first-child > :last-child, .nestbox > table.nohead > tbody > tr:first-child > :last-child { border-top-right-radius: 6.5px; }
.nestbox > table > :last-child > tr:last-child > :first-child { border-bottom-left-radius: 6.5px; }
.nestbox > table > :last-child > tr:last-child > :last-child { border-bottom-right-radius: 6.5px; }
.nestbox > table > :last-child > tr:last-child > td { border-bottom: 0; }
table.subtable th { font-size: 10.5px; padding-top: 4px; padding-bottom: 4px; }
.plabel.wide { width: auto; }
.thin { display: flex; align-items: center; gap: 4px; min-width: 0; padding-right: 4px; }
.thl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
.hx { font: inherit; font-size: 11px; border: 0; background: none; color: var(--muted); border-radius: 3px; padding: 0 4px; cursor: pointer;
  opacity: 0; flex: none; letter-spacing: 0; text-transform: none; }
th:hover .hx, .hx:focus-visible, .hx.armed { opacity: 1; }
.hx:hover { color: var(--danger); }
.hx.armed { background: var(--danger); color: var(--on-st); }
.thin-input { font-size: 12px; padding: 1px 5px; width: 100%; text-transform: none; letter-spacing: 0; }
th.th-add { text-align: left; padding-top: 2px; padding-bottom: 2px; padding-left: 4px; }
.addcol { border: 1px dashed var(--accent) !important; }
.addcol { color: var(--accent); font-weight: 600; text-transform: none; letter-spacing: 0; }
.addcol.on, .addcol.on:hover { background: var(--accent); color: var(--surface); border-style: solid !important; }
.panel.newcol { background: var(--accent-soft); border: 1px solid var(--accent); border-left-width: 4px; box-shadow: 0 2px 10px var(--shadow); }
.panel.newcol .nc-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.panel.newcol .nc-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--surface); font-size: 14px; line-height: 1; }
.panel.newcol .ctl { background: var(--surface); }
.panel.newcol .hint { margin: 0; }
/* a linked column's source: which subitem and its column, or which item column (columns.js linkPicker) */
.linkpick { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.linkpick .lp-l { font-size: 12px; color: var(--muted); }
.linkpick select { max-width: 200px; }
.cmenu .linkpick select { max-width: 150px; }
th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  padding: 6px 8px; border-bottom: 1px solid var(--line-strong); background: var(--surface-2); }
td { padding: 2px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.15; font-size: 13px; }
th + th, td + td { border-left: 1px solid var(--line-strong); }
th:last-child, td:last-child:not(:first-child) { border-left-color: var(--line); }
tr.item td { background: var(--surface); }
tr.item td:first-child, tr.sub.flat td:first-child { box-shadow: inset 3px 0 0 var(--tc, var(--accent)); }
tr.sub td { background: var(--surface-2); }
tr.add td { background: var(--surface); padding-top: 0; padding-bottom: 0; }
.cwrap { height: 21px; position: relative; overflow: hidden; flex: 1 1 auto; min-width: 0; }
.cwrap > .cell { position: absolute; inset: 0; height: 100%; }
tr.add .cwrap { height: 19px; }
tr.add .cell.adder { height: 17px; font-size: 12px; }
tr.add .caret, tr.add .indent { height: 17px; }
.namebox .grow.with-label { flex-direction: row; align-items: center; gap: 6px; }
.grow.with-label .cwrap { flex: 1 1 60%; min-width: 72px; }
.grow.with-label .parent-label { flex: 0 1 auto; max-width: 45%; padding: 0 6px 0 0; font-size: 11px; line-height: 21px; }
.mini, .x { padding-top: 0; padding-bottom: 0; line-height: 17px; font-size: 11.5px; }
.count, .tag { padding-top: 0; padding-bottom: 0; line-height: 15px; }
.cell.date { font-size: 12px; }
td .namebox { gap: 2px; }
tr.add .caret, tr.add .indent { height: 20px; }
.tag { flex: none; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cell { font: inherit; line-height: 1.15; color: var(--fg); background: transparent; border: 1px solid transparent; border-radius: 3px;
  padding: 0 5px; height: 21px; width: 100%; min-width: 0; margin: 0; }
input.cell[type="date"]::-webkit-datetime-edit, input.cell[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
input.cell[type="date"]::-webkit-date-and-time-value { margin: 0; text-align: left; min-height: 0; }
input.cell[type="date"]::-webkit-calendar-picker-indicator { margin: 0; padding: 0; }
.cell:hover { border-color: var(--line); }
.cell:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.cell.date { font-family: var(--font-data); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cell.date.empty { color: var(--muted); }
.cell.date.late { color: var(--danger); font-weight: 500; }
.cell.date.today { color: var(--accent); font-weight: 500; }
.cell.name-item { font-weight: 600; }
.cell.adder { color: var(--muted); }
.cell.adder:focus { color: var(--fg); }

.namebox { display: flex; align-items: center; gap: 4px; min-width: 0; }
.namebox .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.parent-label { font-size: 11px; color: var(--muted); padding-left: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caret { width: 18px; height: 17px; padding: 0; flex: none; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 4px; font-size: 11px; }
.caret:hover { background: var(--accent-soft); color: var(--fg); }
.caret.blank { visibility: hidden; }
.indent { width: 30px; flex: none; align-self: stretch; position: relative; }
.indent::before { content: ""; position: absolute; left: 13px; top: -4px; bottom: 50%; border-left: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); width: 10px; border-bottom-left-radius: 4px; }
/* v301: the dots for an item's subitems (cells.js subDots), rows of three; four rows reach past the text's height without
   making the row taller */
.subdots { flex: none; align-self: center; display: grid; grid-template-columns: repeat(var(--sdc, 3), 6px); grid-auto-rows: 6px; gap: 2px;
  margin: -5px 2px; padding: 0 1px; }
.subdots > i { display: block; width: 6px; height: 6px; box-sizing: border-box; border-radius: 50%; border: 1.25px solid color-mix(in srgb, var(--muted) 75%, transparent); }
.subdots > i.on { background: var(--st-done); border-color: var(--st-done); }
.count { flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 1px 7px; }

select.status { appearance: none; -webkit-appearance: none; width: 100%; font: inherit; font-size: 12.5px; font-weight: 600; text-align: center; text-align-last: center;
  border: 0; border-radius: 3px; padding: 0 4px; height: 19px; line-height: 19px; font-size: 11.5px; margin: 0; cursor: pointer; background: var(--st-none); color: var(--fg); }
select.status[data-status="Not started"] { background: var(--st-start); color: var(--on-st); }
select.status[data-status="Working on it"] { background: var(--st-work); color: var(--on-st); }
select.status[data-status="Waiting"] { background: var(--st-wait); color: var(--on-st); }
select.status[data-status="Stuck"] { background: var(--st-stuck); color: var(--on-st); }
select.status[data-status="Done"] { background: var(--st-done); color: var(--on-st); }
select.status option { background: var(--surface); color: var(--fg); }

.acts { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.mini { font: inherit; font-size: 12px; border: 1px solid transparent; background: none; color: var(--muted); border-radius: 4px; padding: 3px 7px; cursor: pointer; white-space: nowrap; }
.mini:hover { border-color: var(--line-strong); color: var(--fg); }
.x { font: inherit; font-size: 12px; border: 1px solid transparent; background: none; color: var(--muted); border-radius: 4px; padding: 3px 7px; cursor: pointer; }
.x:hover { color: var(--danger); border-color: var(--line-strong); }
.mini, .x { padding: 0 6px; line-height: 19px; }

/* Activity drawer */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; }
.drawer { position: fixed; top: 0; right: var(--dockr, 0px); bottom: 0; width: min(460px, 100vw); z-index: 21; background: var(--surface);
  border-left: 1px solid var(--line-strong); box-shadow: -10px 0 28px var(--shadow); display: flex; flex-direction: column; gap: 12px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 16px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  padding-left: 18px; padding-right: max(18px, env(safe-area-inset-right, 0px)); }
.dhead { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.dhead .eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.dhead h2 { margin: 2px 0 0; font-size: 17px; line-height: 1.25; text-wrap: balance; }
.dclose { font: inherit; font-size: 15px; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--fg);
  width: 30px; height: 30px; cursor: pointer; flex: none; }
.evlist { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.evday { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  padding: 12px 0 5px; border-bottom: 1px solid var(--line-strong); }
.evday:first-child { padding-top: 0; }
.ev { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.ev time { font-family: var(--font-data); font-size: 11.5px; color: var(--muted); padding-top: 1px; font-variant-numeric: tabular-nums; }
.ev .who { display: block; font-size: 11.5px; color: var(--muted); }
.ev .val { background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; overflow-wrap: anywhere; }
.ev .val.none { color: var(--muted); font-style: italic; }
.ev .kind-created { color: var(--st-done); font-weight: 600; }
.ev .kind-deleted { color: var(--danger); font-weight: 600; }
.pill { display: inline-block; border-radius: 3px; padding: 0 6px; font-size: 11.5px; font-weight: 600; background: var(--st-none); color: var(--fg); }
.pill[data-status="Not started"] { background: var(--st-start); color: var(--on-st); }
.pill[data-status="Working on it"] { background: var(--st-work); color: var(--on-st); }
.pill[data-status="Waiting"] { background: var(--st-wait); color: var(--on-st); }
.pill[data-status="Stuck"] { background: var(--st-stuck); color: var(--on-st); }
.pill[data-status="Done"] { background: var(--st-done); color: var(--on-st); }
.dnote { font-size: 12px; color: var(--muted); margin: 0; }

/* Status button, picker and label editor */
.sbtn { display: block; width: 100%; height: 19px; border: 0; border-radius: 3px; padding: 0 6px; margin: 0; cursor: pointer;
  font: inherit; font-size: 11.5px; font-weight: 600; line-height: 19px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbtn.none { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-strong); line-height: 17px; }
.sbtn:hover { filter: brightness(1.06); }
.sbtn.open { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }
.pop { position: fixed; z-index: 30; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 10px 28px var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.sopt { height: 26px; border: 0; border-radius: 4px; padding: 0 10px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; text-align: center; }
.sopt:hover { filter: brightness(1.08); }
.sopt.cur { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--fg); }
.sopt.none { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-strong); }
.pop-edit { margin-top: 2px; align-self: center; }
.dbtn { display: block; width: 100%; height: 21px; margin: 0; padding: 0 5px; border: 1px solid transparent; border-radius: 3px; background: transparent;
  color: var(--fg); font-family: var(--font-data); font-size: 12px; font-variant-numeric: tabular-nums; text-align: left; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbtn:hover { border-color: var(--line); }
.dbtn.open { border-color: var(--accent); background: var(--surface); }
.dbtn.late { color: var(--danger); font-weight: 500; }
.dbtn.today { color: var(--accent); font-weight: 500; }
.dbtn.auto { color: var(--muted); font-style: italic; }
.sbtn.locked { cursor: default; }
.sbtn.locked::after { content: "rule"; font: 600 8px var(--font-ui); text-transform: uppercase; letter-spacing: 0.06em; margin-left: 5px; opacity: 0.75; }
.pop-locked { max-width: 240px; }
.rule optgroup { font-weight: 600; }
.conds { display: flex; flex-direction: column; gap: 4px; align-items: stretch; min-width: 0; }
.cond { display: grid; grid-template-columns: 1fr 1fr 22px; gap: 4px; align-items: center; }
.cond > :nth-child(3) { grid-column: 1 / 3; grid-row: 2; }
.cond.noval > :nth-child(3) { display: none; }
.cond .x { grid-column: 3; grid-row: 1; }
.cond .ctl { width: 100%; min-width: 0; font-size: 12px; }
.cond + .cond { border-top: 1px dashed var(--line); padding-top: 4px; }
.cond-add { align-self: flex-start; color: var(--accent); }
.dbtn.auto::after { content: "rule"; font: 600 8.5px var(--font-ui); font-style: normal; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent); margin-left: 6px; vertical-align: 1px; }
.dpop { min-width: 300px; max-width: 360px; max-height: 70vh; overflow-y: auto; gap: 6px; padding: 10px 12px; }
.dp-title { font-weight: 600; font-size: 13px; }
.dp-row { display: flex; gap: 6px; align-items: center; }
.dp-quick .btn { flex: 1; }
.dp-quick .btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.dp-input { flex: 1; min-width: 0; }
.dp-sub { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 6px;
  padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.dp-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; width: 100%; font: inherit; font-size: 12.5px;
  background: none; border: 0; border-radius: 4px; padding: 4px 6px; text-align: left; color: var(--fg); cursor: pointer; }
button.dp-h:hover { background: var(--accent-soft); }
.dp-h.static { cursor: default; }
.dp-l { min-width: 0; }
.dp-d { font-family: var(--font-data); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dp-foot { display: flex; gap: 8px; align-items: center; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.dp-foot select { flex: 1; min-width: 0; }
.dp-hint { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
/* several dates in one cell: the list in the picker */
.dp-list { display: flex; flex-direction: column; gap: 2px; }
.dp-mrow { display: flex; gap: 8px; align-items: center; padding: 2px 2px 2px 6px; border-radius: 4px; }
.dp-mrow:hover { background: var(--accent-soft); }
.dp-mrow.past .dp-md { color: var(--muted); }
.dp-md { flex: 1; min-width: 0; font-family: var(--font-data); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dp-mrow .dp-time { width: 104px; flex: none; font-size: 12px; padding: 2px 4px; }
.dp-mrow .dp-addt { width: 104px; flex: none; text-align: right; opacity: 0; }
.dp-mrow:hover .dp-addt, .dp-addt:focus-visible { opacity: 1; }
.dp-mx { flex: none; width: 22px; padding: 0; color: var(--muted); }
.dp-mx:hover { color: var(--danger); }
.dp-addl { font-size: 12px; color: var(--muted); }
.thbtn { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 1px 3px; margin-left: -3px;
  border-radius: 3px; cursor: pointer; text-align: left; max-width: 100%; }
.thbtn:hover, .thbtn.open { color: var(--accent); background: var(--surface); }
.thbtn:hover::after, .thbtn.open::after { content: " \25BE"; opacity: 0.7; }
.cmenu { width: 330px; max-width: calc(100vw - 16px); gap: 7px; padding: 10px 12px; max-height: 80vh; overflow-y: auto; }
/* only the lists scroll: everything else keeps its height, and the lists give up theirs down to a few lines */
.cmenu > *, .cmenu .rules > * { flex: none; }
.cmenu > .cm-scroll, .cmenu > .rules, .cmenu .rules > .rules-list { flex: 0 1 auto; min-height: 0; }
.cmenu > .rules:has(.rules-list) { min-height: 150px; }
.cm-scroll { overflow-y: auto; overscroll-behavior: contain; }
.cm-tables { max-height: 150px; min-height: 48px; padding-right: 2px; }
.cm-head { display: flex; gap: 2px; align-items: center; }
.cm-head .ctl { flex: 1; min-width: 0; font-weight: 600; margin-right: 4px; }
.cm-ic { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; font-size: 14px; line-height: 1; }
.cm-ic[disabled] { opacity: 0.35; cursor: default; border-color: transparent; }
.cm-with { display: flex; gap: 6px; align-items: center; min-width: 0; }
.cm-with > :first-child { flex: 1; min-width: 0; }
.cm-subh { display: flex; align-items: center; gap: 4px; }
.cm-subh > button:last-child { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.cm-add { color: var(--accent); }
.infoi { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--muted); cursor: help; }
.infoi:hover, .infoi:focus-visible { color: var(--accent); background: var(--accent-soft); }
.tip.infotip { max-width: min(300px, calc(100vw - 16px)); }
.offset { display: grid; grid-template-columns: 56px 1fr 1fr; gap: 4px; width: 100%; }
.offset .ctl { width: 100%; min-width: 0; font-size: 12px; }
.rules { display: flex; flex-direction: column; gap: 7px; }
.rules-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; overscroll-behavior: contain; }
.rule { display: flex; flex-direction: column; gap: 4px; flex: none; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.rule-line { display: flex; gap: 4px; align-items: center; }
.rule-line > .ctl, .rule-line > .offset { flex: 1; min-width: 0; }
.rule-line .offset { grid-template-columns: 52px 1fr 1fr; }
.rule-line.two > select:first-child { flex: 1.4; }
.rule-to { flex: none; color: var(--muted); font-size: 13px; }
.rule .conds:has(> .cond-group) { padding-top: 2px; }
.rule .ctl { width: 100%; min-width: 0; font-size: 12px; }
.rule .rule-set { font-weight: 600; }
.ev-auto { color: var(--muted); font-style: italic; }
.cm-row { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: center; }
.cm-l { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cm-row .ctl { width: 100%; min-width: 0; }
.cm-seg { display: flex; }
.cm-seg button { flex: 1 1 auto; padding: 4px 6px; font-size: 12px; }
.cm-seg button[disabled] { opacity: 0.4; cursor: not-allowed; }
.cm-foot { justify-content: space-between; }
/* v301: no dot before the name of a column kept to some tables (its tip names them) */
.tpick { display: flex; flex-direction: column; gap: 2px; }
.tp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; min-height: 22px; }
.tp-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tp-row input[disabled] + * , .tp-row input[disabled] { cursor: default; }
.tp-all { font-weight: 600; padding-bottom: 3px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.tp-dis { color: var(--accent); }
.panel .tpick { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; }
.panel .tp-all { border-bottom: 0; margin: 0; padding: 0; }
td.na { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px); }
.scrim.top { z-index: 30; }
.modal { position: fixed; z-index: 31; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 16px 40px var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.optlist { display: flex; flex-direction: column; }
.optrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.optprev { min-width: 96px; text-align: center; padding: 2px 8px; }
.optlabel { width: 150px; }
.swatches { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.sw { width: 16px; height: 16px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.sw.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--fg); }
.swcustom { width: 22px; height: 18px; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: none; cursor: pointer; }
.opttools { display: flex; gap: 2px; align-items: center; margin-left: auto; }
.opttools .mini[disabled] { opacity: 0.35; cursor: default; }
.donebox { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin: 0 6px; cursor: pointer; }
.grow-sp { flex: 1; }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty h2 { margin: 0; color: var(--fg); font-size: 17px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 560px) { h1 { font-size: 19px; } .ctl.search { width: 100%; } .plabel { width: 100%; } }

/* Highlight of values a rule set (column setting "Highlight"): a solid line under the value's text (v297, was a dashed
   frame). Flash phases are kept in step across redraws by a negative animation-delay set on the cell. */
@keyframes ruleflash { 0%, 100% { text-decoration-color: var(--rule); } 50% { text-decoration-color: transparent; } }
@keyframes rulebrief { 0%, 100% { text-decoration-color: transparent; } 50% { text-decoration-color: var(--rule); } }
.by-rule, .by-rule-flash, .by-rule-brief { text-decoration: underline solid var(--rule); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-skip-ink: none; }
.by-rule-flash { animation: ruleflash 1.2s ease-in-out infinite; }
.by-rule-brief { text-decoration-color: transparent; animation: rulebrief 1s ease-in-out 5; }
@media (prefers-reduced-motion: reduce) {
  .by-rule-flash { animation: none; }
  .by-rule-brief { animation: none; text-decoration-color: var(--rule); }
}
.cond-group { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.cond-and, .cond-or { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cond-or { text-align: center; color: var(--accent); }
.cond-group .cond + .cond { border-top: 0; padding-top: 0; }

/* Table colours: a dot on tabs and filter chips, a tinted tag on the Dashboard, the left bar of rows, and a swatch
   beside the table name. Each element carries the table's colour as --tc. */
.tdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tc); margin-right: 6px; vertical-align: 1px; flex: none; }
.tab.ttab[aria-selected="true"] { border-bottom-color: var(--tc); }
.chip.tchip:hover { border-color: var(--tc); }
.chip.tchip[aria-pressed="true"] { background: color-mix(in srgb, var(--tc) 16%, var(--surface)); border-color: var(--tc); }
.ttag { flex: none; display: inline-block; font-size: 11px; line-height: 15px; padding: 0 6px; border-radius: 4px; color: var(--fg);
  background: color-mix(in srgb, var(--tc) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent);
  white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.parent-label .ttag { margin-right: 5px; }
.tname { display: flex; align-items: center; gap: 6px; }
.tswatch { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--surface); background: var(--tc); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; flex: none; }
.tswatch:hover { box-shadow: 0 0 0 2px var(--tc); }
.tcpop { gap: 8px; padding: 10px 12px; max-width: 260px; }
.tcolors { display: flex; flex-wrap: wrap; gap: 6px; }

/* Per-type cell formats. Names are bold, filled text has a marker bar at its left edge, dates sit in an oval.
   Statuses keep their coloured pills. Sizes stay within the 21px row. */
.cell.name-sub { font-weight: 600; }
tr.item .cell.name-item { font-weight: 700; }
/* filled text: a short bar at the left edge in the column's mark colour (yellow unless chosen), with the row's tint showing through */
.cell.txt:not(:placeholder-shown):not(:focus) { background: transparent; border-color: transparent; box-shadow: inset 3px 0 0 var(--txtmark, var(--txt-mark)); }
/* Numbers: right-aligned in the data font with a blue bar at their right edge (as text has a yellow one at its left), so they
   line up and read apart from text, with the row's tint showing through. */
.cell.num { text-align: right; font-family: var(--font-data); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cell.num:not(:placeholder-shown):not(:focus) { background: transparent; border-color: transparent; box-shadow: inset -3px 0 0 var(--num-mark); padding-right: 7px; }
.cell.num.bad:not(:focus) { color: var(--danger); font-style: italic; }
.cell.num.refused { outline: 2px solid var(--danger); outline-offset: -2px; }
.val.num, .ctl.num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.dbtn:not(.blank) { display: inline-block; width: auto; max-width: 100%; height: 19px; line-height: 17px; margin-top: 1px; padding: 0 9px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); }
.dbtn:not(.blank):hover { border-color: var(--accent); }
.dbtn:not(.blank).late { border-color: color-mix(in srgb, var(--danger) 60%, transparent); background: var(--danger-soft); }
.dbtn:not(.blank).today { border-color: var(--accent); background: var(--accent-soft); }
.dbtn:not(.blank).auto { border-style: dashed; }

/* Category cells: a tinted tag with a colour stripe, unlike the solid status pill. */
.selbtn { display: block; width: 100%; height: 21px; margin: 0; padding: 0 2px; border: 1px solid transparent; border-radius: 3px; background: transparent;
  text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; font: inherit; }
.selbtn:hover { border-color: var(--line); }
.selbtn.open { border-color: var(--accent); }
.cat { display: inline-block; max-width: 100%; font-size: 12px; font-weight: 500; line-height: 17px; padding: 0 7px 0 6px; border-radius: 4px;
  color: var(--fg); background: color-mix(in srgb, var(--cc) 18%, var(--surface)); border-left: 3px solid var(--cc);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.selpop { width: 240px; gap: 6px; padding: 8px; }
.sellist { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.selopt { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 4px; padding: 3px 4px; cursor: pointer; font: inherit; color: var(--fg); }
.selopt:hover { background: var(--surface-2); }
.selopt.cur { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.selopt.add { color: var(--muted); font-size: 12px; }
.logbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* Keyboard: the cell that has focus gets a ring, like a spreadsheet's selected cell. */
#main td[data-col]:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
#main td[data-col] .sbtn:focus-visible, #main td[data-col] .dbtn:focus-visible, #main td[data-col] .selbtn:focus-visible { outline: none; }
.paste-msg { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; padding: 6px 12px; border-radius: var(--radius);
  background: var(--fg); color: var(--bg); font-size: 12.5px; box-shadow: 0 4px 14px var(--shadow); pointer-events: none; }

/* Row actions (delete, Log) sit at the far right in a cell that takes the page background, outside the row's panel.
   It stays pinned to the right edge of the visible area when the table is wider than the window. */
tr > td.tdacts, th.th-add { position: sticky; right: 0; z-index: 2; background: var(--bg); border-left-color: var(--line-strong); }
tr > td.tdacts { border-bottom-color: transparent; padding-right: 6px; }
th.th-fill + th.th-add { border-left-color: var(--line-strong); }
.undo { display: flex; gap: 2px; align-self: center; }
.logbtn, .rowact { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 22px; padding: 0; border: 1px solid transparent;
  border-radius: 4px; background: none; color: var(--muted); cursor: pointer; }
.logbtn:hover, .rowact:hover { color: var(--accent); border-color: var(--line-strong); }

/* ---------- sections ----------
   A table split into sections shows each one under a title bar in the table's colour, all inside one scrolling box.
   The bar stays at the left edge when the grid is scrolled sideways. */
.sechead { position: sticky; left: 0; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 16px 10px 6px 8px;
  background: var(--bg); border-top: 1px solid var(--line-strong); }
.sechead:first-child { border-top: 0; padding-top: 10px; }
.seccaret { color: var(--tc); font-size: 15px; width: 22px; height: 24px; }
.secname { font: inherit; font-size: 15.5px; font-weight: 650; color: var(--tc); background: transparent; border: 1px solid transparent;
  border-radius: 5px; padding: 2px 6px; min-width: 6ch; max-width: 100%; }
.secname:hover, .secname.open { border-color: var(--line-strong); }
.secname:focus { outline: none; border-color: var(--accent); background: var(--surface); color: var(--fg); }
.secname::placeholder { color: var(--muted); font-weight: 500; }
.seccount { font-size: 12px; color: var(--muted); white-space: nowrap; }
/* the name as a button: a click opens the section's menu; the box shows on hover and while the menu is open */
button.secname { cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48ch; }
.secadd { margin-top: 8px; }
/* + Add item under the last item of a section (views.js addItemBtn): quiet until pointed at */
tr.addrow > td { padding: 3px 0 4px; border: 0; background: transparent; }
.addrowbtn { margin-left: 24px; padding: 3px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted);
  font: 500 12.5px var(--font-ui); cursor: pointer; }
.addrowbtn:hover, .addrowbtn:focus-visible { color: var(--accent); background: var(--accent-soft); }
.empty .addrowbtn { margin: 6px 0 0; }
.secpop { padding: 4px; gap: 2px; }
.secpop .dp-title { padding: 5px 10px 3px; color: var(--muted); font-size: 12px; }
.secpop .mitem { font-size: 13px; }
.mitem.cur { font-weight: 650; background: var(--accent-soft); }
.mitem.danger { color: var(--danger); }
.mitem.danger.armed { background: var(--danger); color: var(--on-st); }

/* ---------- controls on the section bar, table menu, renaming in the tab ---------- */
.ctls { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }   /* one line: what doesn't fit goes under More (views.js fitCtls) */
.sechead { flex-wrap: wrap; row-gap: 6px; }
.secctls { margin-left: auto; }
.secctls .ctls { justify-content: flex-end; }
.tmenubtn { font-size: 15px; line-height: 26px; }
.tmenubtn[aria-expanded="true"] { border-color: var(--line-strong); color: var(--fg); }
.tcpop.secpop { padding: 4px; gap: 2px; max-width: 280px; }
.tcpop .dp-title { margin-top: 4px; }
.tcpop .tcrow { padding: 2px 10px 4px; }
.tcpop .tcnote { padding: 0 10px 6px; }
.tab.editing { display: inline-flex; align-items: center; padding-top: 4px; padding-bottom: 4px; color: var(--fg); border-bottom-color: var(--tc); cursor: default; }
.tabname { font: inherit; font-weight: 500; color: var(--fg); background: var(--surface); border: 1px solid var(--accent); border-radius: 5px; padding: 3px 6px; outline: none; }
.secctls .seg button { font-size: 12.5px; padding: 4px 9px; }
.secctls .ctl { font-size: 12.5px; padding-top: 4px; padding-bottom: 4px; }
.secctls .ctl.search { width: 150px; }
.secctls .ctls { gap: 6px; }

/* ---------- subitem column names once, plus a pinned copy while scrolling ---------- */
table.subtable.nohead { border-top: 1px solid var(--line-strong); }
.subfloat { position: fixed; top: var(--headh, 0px); z-index: 18; overflow: hidden; pointer-events: none; }
.subfloat table.subtable { border-bottom: 0; }
.subfloat button, .subfloat input { pointer-events: auto; }
/* the section bar pinned under the top bar (render.js floatHead), over the rows and under the column names' copies */
.sechead.pinned { z-index: 18; }
/* The first section bar (its name, the views and the search) hangs right under the top bar, one block with it: the
   table's frame opens upward into the bar's line, and render.js fixes the bar there from the start, so only the rows
   move. With a note in between, the frame keeps its top and the bar joins once the note has gone. */
:root:not(.sidetabs) #notes:empty + #main:has(> .gridpanel:first-child > .grid-scroll:first-child > .sechead:first-child) { margin-top: -10px; }
:root:not(.sidetabs) #notes:empty + #main > .gridpanel:first-child > .grid-scroll:first-child:has(> .sechead:first-child) { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
/* a bar turning fixed must not make the browser shift the page to keep its place */
#main { overflow-anchor: none; }
/* the window's margins beside the pinned stack (render.js sets the grid's edges, --ga and --gb, and its height) */
#pinbg { position: fixed; left: 0; right: 0; z-index: 17; pointer-events: none;
  background: linear-gradient(to right, var(--bg) var(--ga), transparent var(--ga), transparent var(--gb), var(--bg) var(--gb)); }
#pinbg[hidden] { display: none; }
.sechead.pinned > .swapout { display: none; }   /* its own name, while another section's shows */
.subfloat .itemframe::after { content: none; }   /* no Wide frame around the copy of the item names */
/* the top bar's shadow falls under the whole pinned stack (--stackh, its height below the bar), across the window */
header.top::after { margin-top: calc(1px + var(--stackh, 0px)); }
.subfloat .rz { display: none; }

/* ---------- narrow row actions: log, and a "⋯" menu ---------- */
.rowbtn { font-size: 15px; line-height: 1; }
.rowbtn[aria-expanded="true"] { color: var(--fg); border-color: var(--line-strong); }
th.th-add { text-align: center; padding-left: 2px; padding-right: 2px; }
th.th-add .addcol { padding: 0 8px; font-size: 14px; line-height: 20px; }
.msep { height: 1px; background: var(--line); margin: 3px 6px; }

/* ---------- notes in the activity panel ---------- */
.ev.note-ev { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); margin: 2px -8px; padding: 7px 8px; border-radius: 6px; border-bottom: 0; }
.notehead { display: flex; align-items: center; gap: 8px; }
.notetag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.notex { margin-left: auto; opacity: 0.55; }
.note-ev:hover .notex, .notex:focus-visible, .notex.armed { opacity: 1; }
.notetext { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.composer { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.notearea { width: 100%; resize: vertical; min-height: 64px; font: inherit; font-size: 13px; line-height: 1.45; }
.composer-row { display: flex; align-items: center; gap: 8px; }
.noteday { width: auto; }
.grow-hint { margin-left: auto; }

/* ---------- full text of a cut-off cell, shown at once on hover ---------- */
.tip { position: fixed; z-index: 35; max-width: min(480px, calc(100vw - 16px)); padding: 6px 9px; border-radius: 6px; pointer-events: none;
  background: var(--fg); color: var(--bg); font-size: 12.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere;
  box-shadow: 0 6px 18px var(--shadow); }

/* ---------- ticking rows ---------- */
.rsel { flex: none; width: 14px; height: 14px; margin: 0 2px 0 0; accent-color: var(--accent); cursor: pointer; opacity: 0.45; }
.rsel:hover, .rsel:focus-visible, .rsel:checked, .rsel:indeterminate, tr.ticked .rsel { opacity: 1; }
.rsel[disabled] { opacity: 0.2; cursor: default; }
.rsel-gap { flex: none; width: 16px; }
th .thin .rsel { margin-right: 6px; vertical-align: -2px; }
tr.ticked > td:not(.tdacts) { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.selbar { position: sticky; bottom: 12px; z-index: 15; margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); box-shadow: 0 8px 24px var(--shadow); font-size: 13px; }
.selbar .hint { flex: 1 1 220px; }
/* an item's "tick all subitems" box, in the margin left of its first subitem */
td.has-grpsel { position: relative; overflow: visible; }
.grpsel { position: absolute; left: -24px; top: 50%; transform: translateY(-50%); display: flex; padding: 2px; border-radius: 4px; background: var(--surface-2); }
.grpsel .rsel { margin: 0; opacity: 0.7; }

/* ---------- filter button and menu ---------- */
.fltbtn, .dtbtn { display: inline-flex; align-items: center; gap: 6px; }
.fltbtn.on, .fltbtn[aria-expanded="true"], .dtbtn.on, .dtbtn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
/* The Filter button keeps one size whatever it shows (a count of filters, the sort mark, both or neither), so the
   controls on its right stay put when a view changes; the count fits within the button's own height. */
.fltbtn { min-width: 86px; justify-content: flex-start; }
.fcount { min-width: 20px; padding: 0 5px; margin: -2px 0; border-radius: 10px; background: var(--accent); color: var(--on-st); font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
.fcount:has(.fclr) { display: inline-flex; align-items: center; gap: 4px; padding: 0 2px 0 7px; }   /* v287: taller, the × bigger */
.fclr { width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1;
  background: color-mix(in srgb, var(--on-st) 22%, transparent); cursor: pointer; }
.fclr:hover { background: var(--on-st); color: var(--accent); }
.fsorted { color: var(--muted); font-size: 12px; }
.fsortic { font-size: 13px; line-height: 1; margin-left: -2px; }
/* the table search: one width, at the start of the controls */
#flt-q { width: 200px; }
#flt-q.has { border-color: var(--accent); }
.ctlpanel #flt-q { width: 220px; }
.fpop { width: 440px; max-width: calc(100vw - 16px); max-height: min(80vh, 640px); overflow-y: auto; padding: 10px 12px; gap: 10px; }
.fp-sort { display: flex; align-items: center; gap: 8px; }
.fp-label { font-weight: 600; font-size: 13px; }
.fp-sort .ctl { flex: 1; }
.fp-sec { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.fp-row { display: flex; flex-direction: column; gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.fp-top { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: center; }
.fp-top .ctl { width: 100%; min-width: 0; font-size: 12.5px; }
.fp-row > input.ctl { font-size: 12.5px; }
.fp-vals { display: flex; flex-wrap: wrap; gap: 4px; }
.fp-val { font: inherit; font-size: 12px; font-weight: 600; border-radius: 4px; padding: 2px 8px; cursor: pointer; border: 2px solid transparent; opacity: 0.4; }
.fp-val.on { opacity: 1; border-color: var(--fg); }
.fp-val.catv { background: color-mix(in srgb, var(--cc) 22%, var(--surface)); color: var(--fg); }
.fp-sec .cond-add { align-self: flex-start; }
.fp-foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.fp-foot .dnote { flex: 1; }
/* The title of a section or a group, with its count under it, a little smaller. The first title bar also holds the
   controls, after the title: the views close to it, the search and Customize view at the far right. There the title
   has a slot of one width, whatever the section or group is called, so the views start at the same place in every case
   and view (Items only in a section, Subitems only grouped by Status...); a longer title ends in "…". */
.grptitle { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; flex: none; }
.grpline { display: inline-flex; align-items: center; gap: 6px; }
.grptitle .seccount { font-size: 11px; line-height: 1.1; padding-left: 2px; }
.sechead.with-ctls .grptitle { width: 170px; min-width: 0; }
.sechead.with-ctls.stack .grptitle { width: 130px; }
.sechead.with-ctls .grpline { min-width: 0; flex: 0 1 auto; height: 28px; max-width: 100%; }   /* a section's name and a status pill stand as tall */
.sechead.with-ctls .grpline > * { min-width: 0; }
.sechead.with-ctls .grplabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.sechead.with-ctls .grptitle:has(input.secname) { width: auto; min-width: 170px; }   /* while renaming, the box can grow */
.sechead.with-ctls .seccount { flex: none; }
.sechead.with-ctls .secctls { margin-left: 16px; margin-right: auto; }
.sechead.with-ctls .secctls .ctls { justify-content: flex-start; }
/* the view button: three dots show which of the three views is on */
.viewbtn { display: inline-flex; align-items: center; gap: 7px; min-width: 150px; }

/* ---------- a table tab with its "⋯" menu, shown on hover ---------- */
/* a table tab; a click on the open one opens its menu (no ⋯ of its own) */
.tabwrap { position: relative; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabwrap.sel { border-bottom-color: var(--tc); }
/* on hover, and while its menu is open, a box around the whole name */
.tabwrap::before { content: ""; position: absolute; inset: 5px 4px 7px 6px; border: 1px solid transparent; border-radius: 5px; pointer-events: none; }
.tabwrap:hover::before, .tabwrap.open::before { border-color: var(--line-strong); }
.tabwrap .tab { border-bottom: 0; margin-bottom: 0; padding-bottom: 10px; }
.tabwrap.sel .tab, .tabwrap:hover .tab, .tabwrap.open .tab { color: var(--fg); }

/* ---------- moving rows: handle, drop line ---------- */
.grip { flex: none; width: 7px; height: 15px; cursor: grab; opacity: 0; color: var(--muted); touch-action: none;
  background: radial-gradient(circle, currentColor 1px, transparent 1.2px) -0.5px 0 / 4px 5px; }   /* v291: narrow, three rows of two dots */
tr:hover > td > .namebox > .grip:not(.off), tr:hover > td > div > .namebox > .grip:not(.off) { opacity: 0.8; }
.grip.off { visibility: hidden; cursor: default; }
tr.dragging > td { opacity: 0.45; }
body.rowdrag, body.rowdrag * { cursor: grabbing !important; user-select: none; }
.dropline { position: fixed; z-index: 25; height: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; box-shadow: 0 0 0 2px var(--surface); }
/* text column background swatches */
.bgsw .bgs { border: 1px solid var(--line-strong); }
.bgsw .bgs.none { background-image: linear-gradient(135deg, transparent 45%, var(--danger) 45%, var(--danger) 55%, transparent 55%) !important; }

/* ---------- email cells ---------- */
.ecell { display: flex; align-items: center; gap: 4px; min-width: 0; height: 21px; overflow: hidden; }
.echip { flex: none; display: inline-flex; align-items: baseline; gap: 4px; max-width: 100%; padding: 0 6px; border-radius: 10px; font-size: 12px; line-height: 19px;
  color: var(--accent); background: var(--accent-soft); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.echip:hover { text-decoration: underline; }
.echip.bad { color: var(--danger); background: var(--danger-soft); }
.elab { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.ebtn { flex: 1 1 auto; min-width: 18px; align-self: stretch; border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; padding: 0; color: var(--muted); font: inherit; font-size: 12px; }
.ebtn:hover, .ebtn.open, .ebtn:focus-visible { border-color: var(--line-strong); }
.ebtn:hover::after, .ebtn.open::after { content: "+"; }
.epop { width: 380px; max-width: calc(100vw - 16px); }
.em-row { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 6px; align-items: center; }
.em-row .ctl { width: 100%; min-width: 0; font-size: 12.5px; }
.em-row .ctl.bad { border-color: var(--danger); }
.em-go { text-decoration: none; font-size: 14px; }
.em-add { padding-top: 6px; border-top: 1px solid var(--line); }
.em-err:empty { display: none; }
.em-err { color: var(--danger); }
.mailtools { display: inline-flex; align-items: center; gap: 6px; }
button.echip { font: inherit; font-size: 12px; border: 0; cursor: copy; }
.em-go { font-size: 11.5px; }
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ---------- copy and default-value dialogs ---------- */
.dlg { width: min(620px, calc(100vw - 32px)); }
.dlg-body { max-height: min(46vh, 420px); overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; }
.cp-mode { align-self: flex-start; flex-wrap: wrap; }
.cp-find { display: flex; align-items: center; gap: 10px; }
.cp-find .ctl { flex: 1; }
.cp-table { display: flex; align-items: center; font-weight: 650; font-size: 13px; padding: 8px 0 3px; color: var(--fg); }
.cp-table:first-child { padding-top: 2px; }
.cp-line { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 18px; border-radius: 5px; cursor: pointer; font-size: 13.5px; }
.cp-line:hover { background: var(--surface-2); }
.cp-line.on { background: var(--accent-soft); }
.cp-line .rsel { opacity: 1; }
.cp-line .hint { margin-left: auto; font-size: 11.5px; }
.dflist { display: flex; flex-direction: column; padding: 0 10px; }
.dfrow { display: grid; grid-template-columns: 120px 1fr 190px auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.dfrow:last-child { border-bottom: 0; }
.dfrow.set .df-col { color: var(--accent); }
.dfrow.set .df-col::after { content: " \2022"; }
.df-col { font-weight: 600; }
.df-cur { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dfrow .ctl { width: 100%; min-width: 0; font-size: 12.5px; }
@media (max-width: 560px) { .dfrow { grid-template-columns: 1fr 1fr; } }

/* ---------- Columns button and menu ---------- */
.colsbtn { display: inline-flex; align-items: center; gap: 5px; }
.colsbtn.on, .colsbtn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.colspop { width: 280px; max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; }
.colspop .dp-title { padding: 6px 6px 2px; color: var(--muted); font-size: 12px; }
.colspop .cp-line { padding-left: 6px; }
.colspop .btn { align-self: flex-start; margin: 6px 6px 2px; }
/* optional time of day in the date picker */
.dp-timerow { align-items: center; }
.dp-time { width: 110px; }
/* the × that empties a date, shown while the pointer is over the cell (cells.js dateClearBtn) */
td.has-dx { position: relative; }
.dclr { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); z-index: 2; display: none; align-items: center; justify-content: center;
  width: 16px; height: 16px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--muted);
  font: 600 12px/1 var(--font-ui); cursor: pointer; }
td.has-dx:hover > .dclr { display: inline-flex; }
td.has-rv > .dclr { right: 20px; }
.dclr:hover { border-color: var(--danger); background: var(--danger); color: var(--surface); }
.dbtn.timed { font-size: 11px; letter-spacing: -0.02em; padding-left: 4px; padding-right: 4px; }

/* ---------- routines ---------- */
/* The buttons hang off the left side of the pinned actions cell, on the row's own background. */
/* Routine buttons are made by the user, so they look it: a loud sticker that stands apart from the board's own controls
   (level, not tilted). */
.runbtn { flex: none; display: inline-flex; align-items: center; gap: 5px; max-width: 170px; padding: 0 9px; height: 22px; border-radius: 4px;
  border: 1.5px solid #1b1b1b; background: #ffd23f; color: #1b1b1b; box-shadow: 2px 2px 0 #1b1b1b; font: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .08s, box-shadow .08s; }
.runbtn:hover { background: #ffc300; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #1b1b1b; }
.runbtn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #1b1b1b; }
.runic { font-size: 9px; }
.runtx { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* a Routine column's cell: its button, a pencil to edit it on hover, or "+ Set up" when empty */
.rtcell { display: flex; align-items: center; gap: 4px; min-width: 0; height: 22px; padding: 0 2px 0 4px; }
.rtcell .runbtn { max-width: calc(100% - 26px); min-width: 0; }
.rtedit { flex: none; width: 20px; height: 20px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--muted);
  font-size: 12px; cursor: pointer; opacity: 0; }
tr:hover > td > .rtcell > .rtedit, .rtedit:focus-visible { opacity: 1; }
.rtedit:hover { color: var(--accent); background: var(--surface-2); border-color: var(--line); }
.rtset { border: 0; background: none; padding: 0 4px; height: 20px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; opacity: 0; border-radius: 4px; }
tr:hover > td > .rtcell > .rtset, .rtset:focus-visible { opacity: 0.8; }
.rtset:hover { opacity: 1; color: var(--accent); background: var(--surface-2); }
.rtdlg .rt-head .hint { flex: none; }
.hint.warn { color: var(--danger, #c2402f); }
.rtdlg { width: min(760px, calc(100vw - 32px)); }
.rtlist { max-height: min(56vh, 560px); display: flex; flex-direction: column; gap: 12px; padding: 10px; }
.rt { border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.rt-head { display: flex; align-items: center; gap: 8px; }
.rt-name { flex: 1; font-weight: 600; }
.rt-step { display: flex; flex-direction: column; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.rt-top { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr auto auto; gap: 6px; align-items: center; }
.rt-top .ctl, .rt-params .ctl { min-width: 0; font-size: 12.5px; }
.rt-params { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rt-days { display: inline-flex; gap: 3px; }
.rt-day { font: inherit; font-size: 12px; width: 30px; height: 26px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--muted); cursor: pointer; }
.rt-day.on { background: var(--accent); border-color: var(--accent); color: var(--on-st); font-weight: 600; }
.rt-tl { display: inline-flex; align-items: center; gap: 4px; }
.rt-time { width: 100px; }
.rt-n { width: 60px; }
.rt-sum { font-size: 12px; }

/* ---------- instructions: write changes, check them, review one by one ---------- */
.instrbtn { position: relative; color: var(--accent); }
.instrbtn.on { color: var(--surface); background: var(--accent); border-color: var(--accent); }
.instrbtn.on:hover:not([disabled]) { color: var(--surface); background: var(--accent); }
.instrbtn .ibadge { position: absolute; top: -5px; right: -6px; min-width: 15px; height: 15px; padding: 0 3px; font-size: 9.5px; border-width: 1px; }
.ipdot { position: absolute; bottom: -4px; right: -5px; font-size: 7px; line-height: 11px; padding: 0 2px; border-radius: 3px; background: var(--st-work); color: #fff; }
.fabbtn .ipdot { bottom: -1px; right: -2px; font-size: 8px; line-height: 13px; padding: 0 3px; }
.ibadge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ffd23f; color: #1b1b1b; border: 1.5px solid #1b1b1b;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.idock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 2px solid var(--accent);
  box-shadow: 0 -8px 28px var(--shadow); max-height: 52vh; display: flex; flex-direction: column; }
.idock-in { width: 100%; max-width: 1180px; margin: 0 auto; padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; overflow-y: auto; }
/* on a side (instructions.js dockPlace): full height, a width you drag, the board beside it */
.idock.side { top: 0; bottom: 0; width: var(--dockw, 420px); max-height: none; border-top: 0; }
.idock.at-right { left: auto; right: 0; border-left: 2px solid var(--accent); box-shadow: -8px 0 28px var(--shadow); }
.idock.at-left { left: 0; right: auto; border-right: 2px solid var(--accent); box-shadow: 8px 0 28px var(--shadow); }
.idock.side .idock-in { max-width: none; padding: 12px 14px; }
.idock.side.paused { border-left-color: #b38f00; border-right-color: #b38f00; }
/* v300: the panel slides in from its side and back out (instructions.js renderInstrIn), past its shadow */
.idock { --idock-off: translateY(calc(100% + 32px)); }
.idock.at-right { --idock-off: translateX(calc(100% + 32px)); }
.idock.at-left { --idock-off: translateX(calc(-100% - 32px)); }
@keyframes idockin { from { transform: var(--idock-off); } to { transform: none; } }
.idock.entering { animation: idockin 240ms cubic-bezier(0.2, 0.75, 0.25, 1) both; }
@keyframes idockout { from { transform: none; } to { transform: var(--idock-off); } }
.idock.leaving { transform: var(--idock-off); animation: idockout 220ms cubic-bezier(0.5, 0, 0.9, 0.6) both; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .idock.entering { animation: none; } .idock.leaving { display: none; } }
.idock-grip { position: absolute; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 1; }
.idock.at-right .idock-grip { left: -4px; }
.idock.at-left .idock-grip { right: -4px; }
.idock-grip:hover { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.idock.side .ichat { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; flex: 1; height: auto; min-height: 260px; }
.idock.side .chat-r { order: -1; }   /* answers above, the question box under them, as in a chat */
.idock.side .chat-in { flex: none; height: 96px; resize: vertical; }
.idock.side .itext { height: 40vh; }
.idock.side .ih { grid-template-columns: 1fr; gap: 2px; }
.idock.side .idots { max-width: 100%; }
.idock.side .ihead .isides { order: 5; flex-basis: 100%; }   /* title, place and close on the first line, the views under them */
.idock.side .ihead #in-help { order: 6; }
.iend { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.iplace { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.iplacebtn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 24px; padding: 0; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; }
.iplacebtn + .iplacebtn { border-left: 1px solid var(--line); }
.iplacebtn:hover { color: var(--accent); }
.iplacebtn.on { color: var(--accent); background: var(--accent-soft); }
.iplacebtn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ihead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ihead h2 { font-size: 15px; margin: 0; }
.ihead .grow, .ifoot .grow { flex: 1; }
.ihead .dclose { width: 30px; height: 30px; }
.btn.on { border-color: var(--accent); color: var(--accent); }
.itext { font-family: var(--font-data); font-size: 12.5px; line-height: 1.5; width: 100%; height: 22vh; min-height: 90px; resize: vertical; padding: 8px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--fg); }
.itext:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.ihelp { display: grid; gap: 4px; max-height: 18vh; overflow-y: auto; font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.ih { display: grid; grid-template-columns: minmax(0, 330px) 1fr; gap: 12px; align-items: baseline; }
.ih code { font-family: var(--font-data); font-size: 11.5px; color: var(--accent); white-space: pre-wrap; }
.iwait { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; padding: 6px 10px; border-radius: var(--radius);
  background: color-mix(in srgb, #ffd23f 22%, var(--surface)); border: 1px dashed #b38f00; }
.iwait .btn { margin-left: auto; }
.ifoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ilist { overflow-y: auto; min-height: 0; flex: 1; border: 1px solid var(--line); border-radius: var(--radius); }
.ilist.one { flex: none; border-color: var(--accent); }
.ichg { display: grid; grid-template-columns: 26px 62px minmax(0, 1fr) auto; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line);
  font-size: 13px; align-items: baseline; }
.ichg:last-child { border-bottom: 0; }
.ichg.bad { background: var(--danger-soft); }
.ichg.applied .iop, .ichg.applied .ist { color: var(--st-done); }
.ichg.skipped, .ichg.already { opacity: 0.55; }
.ichg.failed .ist, .ichg.bad .ist { color: var(--danger); }
.ichg.cur { box-shadow: inset 3px 0 0 var(--accent); }
.idock.review .ichg[data-i], .idock.done .ichg { cursor: default; }
.inum { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.iop { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ist { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.ibody { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; min-width: 0; }
.ipath { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.idet { min-width: 0; }
.ikey { color: var(--muted); }
.iold { text-decoration: line-through; color: var(--danger); }
.inew { font-weight: 600; background: color-mix(in srgb, #ffd23f 40%, transparent); padding: 0 3px; border-radius: 3px; }
.ierr { color: var(--danger); font-size: 12.5px; flex-basis: 100%; }
.ihead .ierr { flex-basis: auto; }
.isrc { font-family: var(--font-data); font-size: 11.5px; color: var(--muted); flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idots { display: flex; gap: 4px; flex-wrap: wrap; max-width: 50%; }
.idot { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); cursor: pointer; }
.idot.cur { outline: 2px solid var(--fg); outline-offset: 1px; }
.idot.applied { background: var(--st-done); }
.idot.skipped, .idot.already { background: var(--muted); opacity: 0.45; }
.idot.failed, .idot.bad { background: var(--danger); }
.ikeys { margin: 0; font-size: 11.5px; }
/* the change under review, highlighted in the grid in the same sticker style as other things the user made */
#main tr.rv-row > td:not(.tdacts):not(.tdfill), #main tr.rv-add > td:not(.tdacts):not(.tdfill) { background: color-mix(in srgb, #ffd23f 26%, var(--surface)); }
#main tr.rv-del > td:not(.tdacts):not(.tdfill) { background: var(--danger-soft); }
#main tr.rv-del .cell { text-decoration: line-through; }
#main { position: relative; }
#main td.rv-cell { position: relative; outline: 2.5px solid var(--danger); outline-offset: -2px; z-index: 3; }
#rvlayer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 15; }
.rv-copy { position: absolute; background: var(--surface); border: 2.5px solid var(--danger); border-radius: 6px; box-shadow: 0 8px 20px var(--shadow); padding-top: 5px; }
.rv-copy table { table-layout: fixed; border-collapse: collapse; }
.rv-copy tr > td { border: 0; background: color-mix(in srgb, var(--danger) 5%, var(--surface)); padding: 3px 4px; }
.rv-copy tr > td + td { border-left: 1px solid var(--line); }
.rv-tag { position: absolute; top: -10px; left: 6px; z-index: 1; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--danger); color: #fff; padding: 0 6px; border-radius: 3px; line-height: 16px; white-space: nowrap; }
.rv-copy.text { padding: 9px 12px 7px; font-size: 13px; max-width: 520px; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.rv-note { font-style: italic; white-space: pre-wrap; }
.rv-step { font-size: 12px; color: var(--muted); }
.rv-del-t { color: var(--danger); font-weight: 600; }
.rv-why { position: absolute; max-width: 560px; min-width: 200px; background: #ffd23f; color: #1b1b1b; border: 1.5px solid #1b1b1b; box-shadow: 3px 3px 0 #1b1b1b;
  border-radius: 4px; padding: 6px 10px; font-size: 13px; line-height: 1.4; }
.iwhy { flex-basis: 100%; font-size: 12.5px; }
.idock.paused { border-top-color: #b38f00; }
.idock.paused .idock-in { padding-top: 8px; padding-bottom: 8px; }
.ipause-ic { font-size: 11px; letter-spacing: -1px; color: #1b1b1b; background: #ffd23f; border: 1.5px solid #1b1b1b; border-radius: 4px; padding: 2px 5px; }
.rv-copy, .rv-copy * { cursor: default !important; }
.rv-copy .cell:hover { border-color: transparent; }

/* ---------- grouping ---------- */
.groupsel { font-size: 12.5px; font-weight: 500; padding: 4px 6px; max-width: 220px; }
.groupsel.on { border-color: var(--accent); color: var(--accent); }
.grphead .grplabel { font-size: 15px; font-weight: 650; color: var(--tc, var(--fg)); display: inline-flex; align-items: center; gap: 6px; padding: 0 2px; }
.grphead .grplabel.pill { font-size: 13px; padding: 3px 10px; border-radius: 4px; }
.grphead .grplabel .tdot { background: var(--tc); }
.fp-sort .fp-label { min-width: 104px; }
/* sort arrows in column titles: shown on hover, and always when that column sorts the rows */
.sortbtn { flex: none; font: inherit; font-size: 12px; line-height: 1; text-transform: none; letter-spacing: 0; border: 0; background: none;
  color: var(--muted); padding: 2px 3px; border-radius: 3px; cursor: pointer; opacity: 0; }
th:hover .sortbtn, .sortbtn:focus-visible { opacity: 0.75; }
.sortbtn:hover { opacity: 1; color: var(--accent); background: var(--surface); }
.sortbtn.on { opacity: 1; color: var(--accent); font-weight: 700; }

/* ---------- Info log column (clips.js) ---------- */
.rec-in { --rc: var(--rec-in); } .rec-out { --rc: var(--rec-out); } .rec-gen { --rc: var(--rec-gen); }
.icell { display: flex; align-items: center; gap: 4px; padding: 0 6px; height: 100%; }
.recpill { display: inline-flex; align-items: stretch; height: 22px; border-radius: 11px; overflow: hidden; flex: none;
  border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent); background: color-mix(in srgb, var(--rc) 10%, transparent); }
.recpill button { font: inherit; font-size: 11.5px; font-weight: 600; color: var(--rc); background: transparent; border: 0; cursor: pointer; padding: 0; }
.recq { width: 21px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1;
  border-right: 1px solid color-mix(in srgb, var(--rc) 40%, transparent) !important; }
.recpill .recbtn { padding: 0 8px 0 6px; }
.recpill.armed .recq { width: auto; padding: 0 6px; background: var(--rc); color: var(--surface); font-size: 10.5px; animation: recpulse 1.1s ease-in-out infinite; }
@keyframes recpulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .recpill.armed .recq { animation: none; } }
.rec-catch { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; resize: none; }
.recpill button:hover, .recpill.open .recbtn { background: var(--rc); color: var(--surface); }
.recpill button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.reccount { min-width: 22px; height: 22px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg);
  font: 600 11.5px var(--font-data); cursor: pointer; margin-left: 2px; }
.reccount.zero { color: var(--muted); border-style: dashed; cursor: default; }
.reccount:not(.zero):hover { border-color: var(--accent); color: var(--accent); }
.recai { position: relative; width: 26px; height: 22px; border-radius: 4px; border: 1px solid #1b1b1b; background: #ffd23f; color: #1b1b1b; font-size: 13px; cursor: pointer; }
.recai[disabled] { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); cursor: default; }
.recain { position: absolute; top: -6px; right: -6px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: #1b1b1b; color: #ffd23f;
  font-size: 9.5px; font-weight: 700; line-height: 14px; text-align: center; }
.rectag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rc);
  background: color-mix(in srgb, var(--rc) 12%, transparent); padding: 1px 6px; border-radius: 3px; }
.clippop { width: 400px; display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.recpop { border-top: 3px solid var(--rc); }
.recpop.rp-in { --rc: var(--rec-in); } .recpop.rp-out { --rc: var(--rec-out); } .recpop.rp-gen { --rc: var(--rec-gen); }
.recpop .dp-title .rectag { margin-right: 2px; }
.recpop > .hint { margin: 0; font-size: 12px; }
.clip-in { width: 100%; min-height: 110px; resize: vertical; font: inherit; font-size: 13px; }
.clip-foot { display: flex; align-items: center; gap: 8px; }
.clip-foot .hint { font-size: 11.5px; }
.clip-foot .hint:nth-last-child(2) { flex: 1; text-align: right; }
.clip-foot input[type=date] { width: auto; }
.info-ev { margin: 2px -8px; padding: 7px 8px; border-radius: 6px; border-bottom: 0; border-left: 3px solid var(--rc); background: color-mix(in srgb, var(--rc) 6%, transparent); }
.info-ev.info-in { --rc: var(--rec-in); } .info-ev.info-out { --rc: var(--rec-out); } .info-ev.info-gen { --rc: var(--rec-gen); }
.info-ev:hover .notex { opacity: 1; }
.infotext { cursor: pointer; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.infotext.open { display: block; -webkit-line-clamp: none; }
.infotog { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg); cursor: pointer; }
.infotog.none { color: var(--muted); }
.iasking { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--accent-soft); font-size: 13px; }
.iasking .btn { margin-left: auto; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.itabs button { padding: 5px 11px; font-size: 13px; }
.clist { padding: 6px 10px; display: flex; flex-direction: column; gap: 6px; }
.chead { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 6px; }
.chead .tdot { background: var(--tc); }
.citem { display: flex; flex-direction: column; gap: 3px; padding-left: 14px; }
.citem.used { opacity: 0.55; }
.cmeta { display: flex; align-items: center; gap: 8px; }
.cmeta .hint { flex: 1; }
.ctext { width: 100%; font: inherit; font-size: 12.5px; line-height: 1.4; resize: vertical; }

/* ---------- guidance for Claude (guides.js) ---------- */
.gdlg { display: flex; flex-direction: column; gap: 10px; }
.glist { display: flex; flex-direction: column; gap: 8px; }
.ilist.glist { padding: 6px 10px; }
.gentry { display: flex; flex-direction: column; gap: 2px; }
.gtext { width: 100%; font: inherit; font-size: 13px; line-height: 1.4; resize: vertical; }
/* the Guidance tab (guides.js guidesPanel): the new rule on top, saved guidance below behind a toggle, one scroll */
.gpanel { gap: 12px; padding: 2px 0 8px; }
.gnew { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1.5px solid var(--accent); border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.gnew-h { margin: 0; font-size: 14px; font-weight: 700; }
.gnew .gpick { margin: 0; }
.gnew .gwhen { font-size: 12px; }
.gnewtext { min-height: 76px; background: var(--surface); }
.gsaved-tog { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 4px; border: 0; border-top: 1px solid var(--line); background: transparent;
  font: inherit; font-size: 13.5px; font-weight: 650; color: var(--fg); cursor: pointer; text-align: left; }
.gsaved-tog:disabled { cursor: default; color: var(--muted); font-weight: 500; }
.gsaved-tog:hover:not(:disabled) { color: var(--accent); }
.gsaved-tog:disabled .gcaret { visibility: hidden; }
.gcaret { display: inline-block; width: 12px; font-size: 11px; color: var(--muted); transition: transform .12s; }
.gsaved-tog.open .gcaret { transform: rotate(90deg); }
.gcount { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; text-align: center; }
.ggroup { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.ggroup.cur { border-color: var(--accent); }
.gghead { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.gghead .gname { font-weight: 650; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gghead .linkbtn, .gwhere { margin-left: auto; font-size: 12px; }
.gwhere { color: var(--accent); }
.gmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.gmeta .gdel { margin-left: auto; opacity: 0; }
.gentry:hover .gdel, .gentry:focus-within .gdel, .gdel.armed { opacity: 1; }
.gread { resize: none; overflow: hidden; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; margin-left: -7px; width: calc(100% + 7px);
  background: transparent; color: var(--fg); line-height: 1.45; }
.gread:hover { border-color: var(--line); }
.gread:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.ggroup .gentry + .gentry { border-top: 1px dashed var(--line); padding-top: 8px; }
.gtag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 1px 6px; border-radius: 3px;
  color: var(--accent); background: var(--accent-soft); }
.gtag.g-feedback { color: var(--rec-gen); background: color-mix(in srgb, var(--rec-gen) 12%, transparent); }
.gtag.scope { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.gadd { display: flex; flex-direction: column; gap: 6px; }
.gadd-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.gscope { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.gscope .gname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ifb { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--rec-gen) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--rec-gen) 30%, transparent); }
.ifb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ifb-row .grow { flex: 1; }
.ifb-row select { width: auto; max-width: 260px; }
#in-fb.on { background: var(--accent-soft); }
.linkbtn { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.tipwhen { margin-top: 3px; padding-top: 3px; border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); font-size: 11.5px; opacity: 0.8; }

/* ---------- saved views (saved.js) ---------- */
.vwpill { display: inline-flex; align-items: stretch; height: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.vwpill.open, .vwpill:focus-within { border-color: var(--accent); }
.vwbtn { font: inherit; font-size: 13px; color: var(--fg); background: transparent; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.vwname { padding: 0 9px; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vwname { font-size: 13.5px; font-weight: 650; }   /* the view's name reads as the title of what is shown */
.vwmore { padding: 0 7px; border-left: 1px solid var(--line-strong); color: var(--muted); }
.vwbtn:hover { background: var(--surface-2); color: var(--accent); }
.vwbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.vwname .fixlab { justify-items: start; }   /* the name beside the dots, its button as wide as the longest name */
/* the case, on the left of the same control as the view: its dots show which of the three it is */
.vwpos { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Revert and Save: icons at the end of the view control; hovering names them */
.vwic-btn { position: relative; padding: 0 8px; border-left: 1px solid var(--line-strong); color: var(--muted); }
.vwic { display: inline-flex; }
.vwrevert[disabled] { opacity: 0.4; cursor: default; background: transparent; color: var(--muted); }
.vwsave.on { color: var(--accent); }
.vwpill.changed { border-color: var(--accent); }
.vwpill.changed .vwic-btn { border-left-color: var(--accent); }
.vwdot { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #ffd23f; border: 1px solid #1b1b1b; }
/* the Views frame: every view a label of coloured glass, each its own colour, the one on screen lit up; a small
   category label before each case's group (saved.js, viewChips) */
.vwchips { display: inline-flex; align-items: stretch; gap: 0; flex-wrap: nowrap; }
.vwcase { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 2px 8px 3px; border-radius: 5px; }
.vwcase:first-child { padding-left: 2px; }
.vwcase + .vwcase { border-left: 1px solid color-mix(in srgb, var(--line-strong) 65%, transparent); }
.vwcap { font-size: 10px; font-weight: 400; line-height: 12px; color: color-mix(in srgb, var(--muted) 70%, var(--bg)); white-space: nowrap; padding-left: 1px; transition: color 120ms ease; }
.vwcase.cur .vwcap { color: var(--fg); }
.vwcase.cur { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.vwtabs { display: inline-flex; align-items: center; gap: 4px; }
.vtab { --vc: var(--accent); position: relative; font: inherit; font-size: 12.5px; font-weight: 550; height: 24px; padding: 0 9px; cursor: pointer;
  white-space: nowrap; border-radius: 7px;
  color: color-mix(in srgb, var(--vc) 45%, var(--muted));
  background: linear-gradient(180deg, color-mix(in srgb, var(--vc) 10%, transparent), color-mix(in srgb, var(--vc) 5%, transparent));
  border: 1px solid color-mix(in srgb, var(--vc) 20%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 2px color-mix(in srgb, var(--vc) 12%, transparent);
  transition: background 120ms ease, box-shadow 120ms ease, color 120ms ease; }
.vtab::before { content: ""; position: absolute; inset: 1px 1px 50% 1px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--glass-sheen), transparent); pointer-events: none; }
.vtab:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--vc) 26%, transparent), color-mix(in srgb, var(--vc) 15%, transparent)); }
.vtab:focus-visible { outline: 2px solid var(--vc); outline-offset: 1px; }
.vtab[aria-pressed="true"] { color: var(--fg); font-weight: 650; cursor: default;
  background: linear-gradient(180deg, color-mix(in srgb, var(--vc) 20%, var(--glass-lit)), color-mix(in srgb, var(--vc) 42%, var(--glass-lit)));
  border-color: color-mix(in srgb, var(--vc) 70%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 0 5px color-mix(in srgb, var(--glass-lit) 45%, transparent), 0 0 0 1px color-mix(in srgb, var(--vc) 22%, transparent), 0 0 8px color-mix(in srgb, var(--vc) 36%, transparent); }
/* a view's name: as wide as in its bolder, chosen look, whichever it is now, so the row never moves */
.vtl { display: inline-grid; max-width: 130px; }
.vtn, .vtl::after { grid-area: 1 / 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.vtn { text-overflow: ellipsis; }
.vtl::after { content: attr(data-l); font-weight: 650; visibility: hidden; height: 0; }
.vtab .vwdot { top: -3px; right: -3px; }
.vtab.drag { cursor: grab; }
.vtab.drag[aria-pressed="true"] { cursor: default; }
.vtab.dragging { opacity: 0.4; }
.vtab.dropbefore { box-shadow: -3px 0 0 -1px var(--accent); }
.vtab.dropafter { box-shadow: 3px 0 0 -1px var(--accent); }
.vtab.vwplus { --vc: var(--muted); padding: 0 6px; font-size: 14px; color: var(--muted); background: none; border-color: transparent; box-shadow: none; }
.vtab.vwplus::before { display: none; }
.vtab.vwplus:hover { color: var(--accent); background: var(--surface-2); }
/* More, for the views of a case not in the row: overlapping dots of their colours, as on the tab bar */
.vtab.vfmore { --vc: var(--muted); display: inline-flex; align-items: center; gap: 5px; padding: 0 6px; font-size: 11.5px; font-weight: 500; color: var(--muted);
  background: none; border-color: transparent; box-shadow: none; overflow: visible; }
.vtab.vfmore::before { display: none; }
.vtab.vfmore:hover, .vtab.vfmore[aria-expanded="true"] { color: var(--fg); background: var(--surface-2); }
.vfdots { position: relative; height: 9px; flex: none; }
.vfdot { position: absolute; top: 0; width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--vc) 55%, var(--surface)); border: 1px solid color-mix(in srgb, var(--vc) 70%, transparent); box-sizing: border-box; box-shadow: 0 0 0 1px var(--surface); }
.ctls.tight .vfmore-l { display: none; }
.ctls.tight .vtab.vfmore { padding: 0 4px; }
.ctls.tight .adjpill .adjbtn { width: 76px; }
.ctls.tight .vwcase { padding: 0 5px; }
.vfmorepop { padding: 6px; gap: 4px; align-items: flex-start; min-width: 160px; }
.vfmorepop .vtab { max-width: 240px; }
.vfirst { margin-right: 3px; font-size: 11px; opacity: 0.8; }
.vmenu { min-width: 230px; }
.vmenu .vwnew { display: flex; gap: 6px; padding: 4px 6px; }
.vmenu .vwnew .ctl { flex: 1; }
.vwnewin { width: 120px; height: 24px; padding: 2px 7px; font-size: 12.5px; }
:root { --glass-hi: rgba(255, 255, 255, 0.55); --glass-sheen: rgba(255, 255, 255, 0.35); --glass-lit: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glass-hi: rgba(255, 255, 255, 0.10); --glass-sheen: rgba(255, 255, 255, 0.07); --glass-lit: #2a343c; } }
:root[data-theme="dark"] { --glass-hi: rgba(255, 255, 255, 0.10); --glass-sheen: rgba(255, 255, 255, 0.07); --glass-lit: #2a343c; }
.vwlist { height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: var(--radius); }
.vwlist.open { border-color: var(--accent); color: var(--accent); }
/* Customize, joined to the view's Revert and Save icons (views.js) */
.adjpill { display: inline-flex; align-items: stretch; height: 34px; border: 1.5px solid var(--tc, var(--accent)); border-radius: var(--radius); background: var(--surface); }
.adjpill .adjbtn { display: inline-flex; align-items: center; gap: 6px; height: 100%; border: 0; border-radius: var(--radius) 0 0 var(--radius); background: transparent; }
.adjpill .adjbtn:hover { background: var(--surface-2); }
.adjpill .adjbtn { width: 76px; justify-content: center; padding: 0 6px; }   /* room for the count and ↕, so they appear without moving the views */
.adjpill .adjbtn.on, .adjpill .adjbtn[aria-expanded="true"] { color: var(--accent); }
.adjpill .adjbtn[aria-expanded="true"] { background: var(--accent-soft); }
.adjpill .vwic-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.adjpill .vwic-btn { border-left-color: color-mix(in srgb, var(--tc, var(--accent)) 45%, var(--line-strong)); }
/* the Customize panel: tabs on top, then the chosen menu, flush (popovers.js, adjPanel) */
.adjpop { box-sizing: border-box; width: 460px; max-width: calc(100vw - 16px); max-height: min(80vh, 640px); overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.adjtabs { display: flex; width: 100%; flex: none; }
.adjtabs button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 8px; font-size: 12.5px; font-weight: 600; }
.adjtabs button[aria-pressed="true"] .adjnote { background: color-mix(in srgb, var(--on-st) 25%, transparent); color: inherit; }
.adjnote { font-size: 10.5px; font-weight: 600; padding: 0 5px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); line-height: 16px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adjpop .adjbody { display: flex; flex-direction: column; position: static; width: auto; min-width: 0; max-width: none; max-height: none; overflow: visible; border: 0; box-shadow: none; background: transparent; padding: 2px 2px 0; }
.adjpop .adjbody .dp-title { padding-left: 6px; }
.grppop .cp-line { padding-left: 6px; }
/* the controls, in one faint frame, with room above for the labels of the case switch and the view */
.vwset { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 2px; border: 1px solid color-mix(in srgb, var(--line-strong) 55%, transparent); border-radius: calc(var(--radius) + 3px); }
.ctlcap { position: relative; display: inline-flex; }
.ctlcap::before { content: attr(data-cap); position: absolute; left: 3px; bottom: calc(100% + 1px); font-size: 9.5px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; line-height: 1; color: var(--muted); pointer-events: none; white-space: nowrap; }
.caseseg { height: 28px; }
.caseseg button { font-size: 12.5px; padding: 0 9px; }
.secctls .caseseg button { padding: 0 8px; }
.vwpop { min-width: 280px; max-height: min(70vh, 520px); overflow-y: auto; }
.vwline { display: flex; align-items: center; gap: 4px; }
.vwline .vwgo { flex: 1; }
.vwline.on .vwgo { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.vwline input { flex: 1; }
.vwnew { display: flex; gap: 6px; margin-top: 8px; }
.vwnew input { flex: 1; }
.othbox { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.othlist { display: flex; flex-direction: column; gap: 2px; max-height: 180px; overflow-y: auto; }
.othline { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 2px 4px; border-radius: 4px; cursor: pointer; }
.othline:hover { background: var(--surface-2); }
.othline .tdot { background: var(--tc); }
.othfoot { display: flex; align-items: center; gap: 8px; }
.othfoot .hint { flex: 1; font-size: 11.5px; }
.wic { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.recai .wic svg { width: 14px; height: 14px; }
.btn.withic { display: inline-flex; align-items: center; gap: 6px; }

/* A tick box column (cells.js tickCell): a rounded square, filled with the done colour and a white tick when ticked. */
.tickbtn { display: flex; align-items: center; justify-content: center; width: 100%; height: 21px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; }
.tickbtn:focus-visible { border-color: var(--line-strong); }
.tickbtn .tickbox { position: relative; width: 15px; height: 15px; box-sizing: border-box; border-radius: 4px; border: 1.5px solid color-mix(in srgb, var(--muted) 70%, transparent); background: var(--surface); transition: background 0.12s, border-color 0.12s; }
.tickbtn:hover .tickbox { border-color: var(--muted); }
.tickbtn.on .tickbox { background: var(--st-done); border-color: var(--st-done); }
.tickbtn.on .tickbox::after { content: ""; position: absolute; left: 4.2px; top: 1.2px; width: 3.5px; height: 7.5px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
/* ---------- Grid and Long text cells, and the window they open into (expand.js) ---------- */
.xbtn { display: flex; align-items: center; gap: 6px; width: 100%; height: 21px; min-width: 0; padding: 0 5px; border: 1px solid transparent; border-radius: 4px;
  background: none; color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; text-align: left; overflow: hidden; }
.xbtn:hover, .xbtn:focus-visible { border-color: var(--line-strong); }
.xbtn.open { border-color: var(--accent); background: var(--accent-soft); }
.xbtn .xic { display: inline-flex; flex: 0 0 auto; color: var(--muted); }
.xbtn.open .xic { color: var(--accent); }
.xbtn.empty .xic { opacity: 0; }
.xbtn.empty:hover .xic, .xbtn.empty:focus-visible .xic, .xbtn.empty.open .xic { opacity: 1; }
.xdim { flex: 0 0 auto; font-family: var(--font-data); font-size: 11px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; line-height: 15px; }
.xtxt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xbtn.sheet .xtxt { color: var(--muted); font-size: 12.5px; }

.xwin { position: fixed; z-index: 28; display: flex; flex-direction: column; overflow: hidden; resize: both; min-width: 340px; min-height: 240px;
  max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 20px 50px var(--shadow), 0 2px 6px var(--shadow); transform-origin: top left; }
.xwin.max { left: 12px !important; top: 12px !important; right: 12px; bottom: 12px; width: auto !important; height: auto !important; max-width: none; max-height: none; resize: none; }
.xwin.moving { user-select: none; opacity: 0.96; }
.xhead { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); cursor: move; user-select: none; touch-action: none; }
.xwin.max .xhead { cursor: default; }
.xhead .xic { display: inline-flex; color: var(--accent); }
.xtitle { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; overflow: hidden; white-space: nowrap; }
.xname { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.xcol { color: var(--muted); font-size: 12.5px; flex: 0 0 auto; }
.xhead .ttag { flex: 0 1 auto; }
.xstate { font-size: 12px; color: var(--muted); white-space: nowrap; }
.xstate.busy { color: var(--accent); }
.xstate.bad { color: var(--danger); font-weight: 600; }
.xhbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: 6px;
  background: none; color: var(--muted); cursor: pointer; }
.xhbtn:hover, .xhbtn:focus-visible { color: var(--fg); border-color: var(--line-strong); background: var(--surface); }
.xtools { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.xtool { font: inherit; font-size: 12.5px; min-width: 28px; padding: 3px 8px; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--fg); cursor: pointer; white-space: nowrap; }
.xtool:hover, .xtool:focus-visible { border-color: var(--line-strong); }
.xtool[aria-pressed="true"], .xtool.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.xtool.fmt { font-family: Georgia, "Times New Roman", serif; font-size: 14px; padding: 1px 7px; }
.xtool.b { font-weight: 700; } .xtool.i { font-style: italic; } .xtool.u { text-decoration: underline; } .xtool.s { text-decoration: line-through; }
.xsep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.xbody { flex: 1 1 auto; min-height: 0; overflow: auto; }
.xfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.xfoot .hint { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xstats { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* the grid */
.shwrap { padding-bottom: 10px; }
table.sheet { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; font-size: 13px; }
table.sheet th, table.sheet td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; height: 28px; }
table.sheet thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); border-bottom-color: var(--line-strong); }
table.sheet th.shrn { position: sticky; left: 0; z-index: 1; background: var(--surface-2); font-family: var(--font-data); font-size: 11px; font-weight: 400; color: var(--muted); text-align: center; }
table.sheet th.shcorner { left: 0; z-index: 3; }
table.sheet td.shpad, table.sheet th.shplus { border-right: 0; background: none; }
table.sheet td.shpad { border-bottom-color: transparent; }
.shin { display: block; width: 100%; height: 27px; border: 0; margin: 0; padding: 0 7px; background: transparent; color: var(--fg); font: inherit; outline: none; text-overflow: ellipsis; }
.shin:focus { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }
.shin.hd { font-weight: 600; }
.shin.hd::placeholder { color: var(--muted); font-weight: 500; font-family: var(--font-data); font-size: 11.5px; }
.shin.num { text-align: right; font-family: var(--font-data); font-size: 12.5px; }
.shh { position: relative; }
.shh.cur, .shrn.cur { background: var(--accent-soft) !important; color: var(--accent); }
.shrz { position: absolute; top: 0; right: -4px; width: 7px; height: 100%; cursor: col-resize; z-index: 2; touch-action: none; }
.shrz:hover { background: color-mix(in srgb, var(--accent) 40%, transparent); }
td.shsum { font-family: var(--font-data); font-size: 12.5px; font-weight: 500; text-align: right; padding: 0 7px !important; background: var(--surface-2); border-top: 2px solid var(--line-strong); }
.shadd { font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 1px dashed transparent; border-radius: 5px; cursor: pointer; }
.shplus .shadd { width: 100%; height: 100%; font-size: 15px; }
.shadd:hover { color: var(--accent); border-color: var(--line-strong); }
.shadd.row { margin: 8px 0 0 48px; padding: 3px 10px; border-color: var(--line-strong); }

/* the long text */
.ltwrap { padding: 20px 28px 28px; }
.lted { position: relative; max-width: 74ch; min-height: 100%; margin: 0 auto; outline: none; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.lted.blank::before { content: attr(data-ph); position: absolute; left: 0; top: 0; color: var(--muted); pointer-events: none; }
.lted > :first-child { margin-top: 0; }
.lted p { margin: 0 0 0.65em; }
.lted h3 { font-size: 17px; font-weight: 650; margin: 1.1em 0 0.4em; }
.lted ul, .lted ol { margin: 0 0 0.65em; padding-left: 1.5em; }
.lted li { margin: 0.15em 0; }
.lted blockquote { margin: 0 0 0.65em; padding: 2px 0 2px 12px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.lted a { color: var(--accent); text-decoration: underline; }
.ltlink { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ltlink[hidden] { display: none; }
.ltlink .ctl { width: min(280px, 50vw); }
@media (max-width: 700px) { .xfoot .hint { display: none; } .ltwrap { padding: 14px 14px 20px; } }

/* ---------- the Calendar tab (calendar.js) ---------- */
.caldone { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); cursor: pointer; }
.calwrap { display: flex; flex-direction: column; gap: 8px; }
.calnav { display: flex; align-items: center; gap: 6px; }
.calnav .btn { min-width: 30px; }
.caltitle { margin: 0 0 0 8px; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.calcount { margin: 2px 0 0; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.calwd { padding: 6px 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.calday { min-height: 116px; padding: 4px 4px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.calday:nth-child(7n) { border-right: 0; }
.calgrid.week .calday { min-height: 420px; }
.calday.wkend { background: color-mix(in srgb, var(--surface-2) 70%, var(--bg)); }
.calday.out { background: var(--bg); }
.calday.out .calnum { opacity: 0.5; }
.calnum { display: flex; align-items: center; gap: 5px; padding: 1px 3px 3px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.calnum span:first-child { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 11px; }
.calday.today .calnum span:first-child { background: var(--accent); color: var(--on-st); font-weight: 700; }
.calmon { font-weight: 600; color: var(--fg); }
.caldrop { outline: 2px dashed var(--accent); outline-offset: -3px; background: var(--accent-soft) !important; }
.calent { display: flex; align-items: stretch; min-width: 0; border-radius: 4px; background: color-mix(in srgb, var(--tc) 11%, var(--surface)); box-shadow: inset 3px 0 0 var(--tc); }
.calent.dragging { opacity: 0.4; }
.calmain { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 7px; border: 1px solid transparent; border-radius: 4px; background: none;
  color: var(--fg); font: inherit; font-size: 12px; line-height: 16px; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; }
.calmain[draggable="true"] { cursor: grab; }
.calmain:hover, .calmain:focus-visible, .calmain.open { border-color: color-mix(in srgb, var(--tc) 55%, transparent); }
.calent.item .calname { font-weight: 600; }
.calname { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.calpar { color: var(--muted); overflow: hidden; text-overflow: ellipsis; flex: 0 1000 auto; min-width: 0; font-size: 11.5px; }
.calpar::before { content: "\2039  "; }
.caltime { font-family: var(--font-data); font-size: 11px; color: var(--muted); flex: none; }
.calst { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.caltag { flex: none; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 3px; line-height: 13px; margin-left: auto; }
.calent.done .calname { text-decoration: line-through; color: var(--muted); }
.calent.late .calname { color: var(--danger); }
.calgo { flex: none; width: 0; padding: 0; overflow: hidden; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; }
.calent:hover .calgo, .calgo:focus-visible { width: 20px; }
.calgo:hover { color: var(--accent); }
.calmore { align-self: flex-start; font: inherit; font-size: 11.5px; color: var(--accent); background: none; border: 0; padding: 1px 6px; cursor: pointer; border-radius: 4px; }
.calmore:hover { background: var(--accent-soft); }
/* the week: whole names */
.calgrid.week .calmain { white-space: normal; flex-wrap: wrap; align-items: baseline; }
.calgrid.week .calname, .calgrid.week .calpar { white-space: normal; overflow-wrap: anywhere; }
.calgrid.week .calpar { flex-basis: 100%; }
.calgrid.week .calpar::before { content: ""; }
/* the list */
.callist { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.callday { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.callday:last-child { border-bottom: 0; }
.calldate { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.calldn { font-size: 18px; font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; min-width: 22px; }
.caltoday { font-size: 11px; font-weight: 600; color: var(--on-st); background: var(--accent); border-radius: 9px; padding: 0 7px; }
.calldays { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calldays.past .calent:not(.late) { opacity: 0.8; }
/* Time (calendar.js calTime): the period's total and each table's share, then the sessions by day */
.calspan { margin-right: 6px; }
.ctview { display: flex; flex-direction: column; gap: 10px; }
.cts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.ctstot { display: flex; flex-direction: column; gap: 2px; min-width: 130px; }
.ctsbig { font-family: var(--font-data); font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--fg); line-height: 1.1; }
.ctssub { font-size: 12.5px; color: var(--muted); }
.ctsbars { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ctsrow { display: grid; grid-template-columns: minmax(90px, 30%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.ctsname { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctsname .tdot, .ctrow .tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); flex: none; }
.ctsbar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.ctsbar > span { display: block; height: 100%; background: var(--tc); border-radius: 999px; opacity: 0.85; }
.ctsdur { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) { .cts { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.ctday .calldate { align-content: flex-start; align-self: start; }
.ctdaytot { flex-basis: 100%; font-family: var(--font-data); font-size: 12.5px; font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }
.ctsess { gap: 2px; }
.ctrow { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 3px 6px; margin: 0 -6px; border-radius: 6px; }
.ctrow:hover { background: color-mix(in srgb, var(--tc) 7%, var(--surface)); }
.ctrow.running { background: color-mix(in srgb, var(--tc) 11%, var(--surface)); box-shadow: inset 3px 0 0 var(--tc); }
.cthm { font-family: var(--font-data); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctname { display: flex; align-items: center; gap: 8px; min-width: 0; font: inherit; text-align: left; background: none; border: 0; padding: 0; color: var(--fg); cursor: pointer; }
.ctname:hover .ctn { text-decoration: underline; text-underline-offset: 2px; }
.cttext { display: flex; flex-direction: column; min-width: 0; }
.ctn { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctp { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctdur { font: inherit; font-family: var(--font-data); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; padding: 2px 8px; border-radius: 6px;
  border: 1px solid transparent; background: none; color: var(--fg); cursor: pointer; }
.ctdur:hover, .ctdur[aria-expanded="true"] { border-color: var(--line-strong); background: var(--surface); }
.ctdur.live { color: var(--accent); font-weight: 600; }
.ctstop { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line-strong)); }
.hcountgo { font: inherit; font-size: 12.5px; font-weight: 600; border: 0; cursor: pointer; }
.hcountgo:hover, .hcountgo:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.calent.wide .calmain { font-size: 13px; padding: 4px 6px 4px 9px; gap: 7px; }
.calent.wide .caltag { margin-left: auto; }
.calpill { flex: none; font-size: 11px; padding: 0 7px; line-height: 17px; border-radius: 9px; }
@media (max-width: 700px) { .callday { grid-template-columns: 1fr; gap: 4px; } .calent.wide .calpar { display: none; } }
/* a row opened from the Calendar flashes in its table */
#main tr.flash > td { animation: rowflash 1.8s ease-out; }
@keyframes rowflash { 0%, 30% { background: var(--accent-soft); } 100% { background: transparent; } }
.calgrid.month .calpar { display: none; }   /* the item is in the tooltip; the week and the list show it */

/* The left of the top bar: the logo (intro.js) | Undo, Redo, the clock | the tabs, and the ⋯ menu at the far
   right. At rest every icon there is the same distance (19px) from the next icon and from the dividing lines, measured
   between what can be seen. The clock's two side buttons are tucked away, with no width, until the pointer is over the
   clock (or one of them has the keyboard, or its menu is open). Then the clock grows by 34px plus its frame, and the
   gaps to its left (logo to Undo, Redo to the clock) and to its right draw in by about the same
   amount each, so the tabs do not move. The values are set on the bar (--tb-*) and read by each part. */
header.top { --tb-undo-l: 2.5px; --tb-clock-l: -4px; --tb-clock-r: 11.5px; }
header.top:has(#timebtn:hover), header.top:has(.tmarrow[aria-expanded="true"]), header.top:has(.tmarrow:focus-visible), header.top:has(.tmright:focus-visible) {
  --tb-undo-l: -8.8px; --tb-clock-l: -15.3px; --tb-clock-r: 0.1px; }
header.top > .undo { gap: 6px; margin-left: var(--tb-undo-l); transition: margin-left 150ms ease; }
header.top > #timebtn { margin-left: var(--tb-clock-l); padding-right: var(--tb-clock-r); transition: margin-left 150ms ease, padding-right 150ms ease; }
/* the ⋯ menu: at the far right of the bar, its menu opening leftwards */
header.top > .backup { align-self: center; margin-left: 4px; }
/* the clock's right part (▶ to start the last timer) takes no room at rest; a running timer's ■ always shows */
#timebtn .tmright:not(.timestop) { width: 0; border-width: 0; overflow: hidden; transition: width 150ms ease; }
#timebtn:hover .tmright, #timebtn .tmright:focus-visible, #timebtn .tmarrow[aria-expanded="true"] ~ .tmright { width: 20px !important; border-width: 1px 1px 1px 0 !important; }
@media (prefers-reduced-motion: reduce) { header.top > .undo, header.top > #timebtn, .tmarrow, #timebtn .tmright { transition: none !important; } }
header.top > .backup .moremenu { right: 0; left: auto; }
.pwrow { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 6px; margin-top: 2px; border-top: 1px solid var(--line); }
.pwseg button { padding: 4px 9px; font-size: 12.5px; }
.pwseg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* the tab bar's ▾ list (views.js tabsPop) */
header.top > .undo, header.top > #timebtn, header.top > .backup { flex: none; }
header.top .tabs { flex: 1 1 0; }
.tab.tmore { padding-left: 10px; padding-right: 10px; display: inline-flex; align-items: center; gap: 7px; color: var(--fg); }
.tmore-dots { position: relative; flex: none; }
.tmdot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 0 1.5px var(--bg); }
.tab.new { font-size: 17px; line-height: 1; padding-left: 10px; padding-right: 10px; }
.tabspop { min-width: 260px; padding: 4px 6px 6px; display: flex; flex-direction: column; gap: 0; max-height: min(70vh, 560px); overflow-y: auto; }
.tp-dash { display: flex; gap: 4px; padding-bottom: 2px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.tprow { display: flex; align-items: center; gap: 6px; }
.tprow .tabwrap { margin-bottom: 0; }
.tprow.hid .tab { opacity: 0.6; }
.tpstate { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tptools { margin-left: auto; display: inline-flex; gap: 2px; opacity: 0; }
.tprow:hover .tptools, .tptools:focus-within { opacity: 1; }
.tphide { min-width: 44px; }

/* activity log: More buttons, grid and long text entries */
.logmore { font: inherit; font-size: 12px; color: var(--accent); background: none; border: 0; padding: 0 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.logmore:hover { color: var(--fg); }
.logsteps { margin: 4px 0 2px; padding-left: 18px; font-size: 12.5px; }
.logsteps li { margin: 2px 0; }
.logstep { overflow-wrap: anywhere; }
.logvers { display: flex; gap: 10px; margin-top: 3px; }
.logver { margin-top: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--surface); }
.logver-t { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.miniwrap { overflow-x: auto; }
.minisheet { border-collapse: collapse; font-size: 12px; }
.minisheet th, .minisheet td { border: 1px solid var(--line); padding: 2px 6px; text-align: left; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.minisheet th { background: var(--surface-2); font-weight: 600; }
.minisheet td.num { text-align: right; font-family: var(--font-data); }
.ltview { font-size: 13px; line-height: 1.5; max-height: 320px; overflow-y: auto; }
.ltview p, .ltview ul, .ltview ol, .ltview blockquote { margin: 0 0 0.5em; }
.ltview h3 { font-size: 14px; margin: 0.6em 0 0.3em; }
.ltview blockquote { border-left: 3px solid var(--line-strong); padding-left: 8px; color: var(--muted); }
.ltview a { color: var(--accent); }
.xtool.hist { font-size: 15px; }
.xtool[disabled] { opacity: 0.35; cursor: default; }

/* ---------- progress reports (report.js): the whole page, or a small tab when minimized ---------- */
.repwin { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; background: var(--bg); }
.rephead { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding: 14px max(16px, 3vw) 12px;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.reptitle h2 { margin: 2px 0 2px; font-size: 21px; font-weight: 650; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.repacts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reppick { display: inline-flex; align-items: center; gap: 4px; }
.reppick select { max-width: 220px; }
.repbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 16px 48px; }
.repcard { max-width: 780px; margin: 0 auto 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px clamp(18px, 4vw, 40px); }
.repart { max-width: 980px; margin: 0 auto; }
.repart > .repmd { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px clamp(18px, 4vw, 40px); max-width: 780px; margin: 0 auto; }
.repmd { font-size: 15px; line-height: 1.62; }
.repmd h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin: 1.6em 0 0.5em; padding-top: 0.9em; border-top: 1px solid var(--line); }
.repmd h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.repmd h4 { font-size: 15px; font-weight: 650; margin: 1.1em 0 0.3em; }
.repmd p { margin: 0 0 0.7em; }
.repmd ul, .repmd ol { margin: 0 0 0.7em; padding-left: 1.3em; }
.repmd li { margin: 0.25em 0; }
.repmd code { font-family: var(--font-data); font-size: 13px; background: var(--surface-2); padding: 0 4px; border-radius: 3px; }
.repwriting { color: var(--muted); display: flex; align-items: center; gap: 8px; margin: 1em 0 0; }
.reperr { max-width: 780px; margin: 0 auto 12px; color: var(--danger); background: var(--danger-soft); border-radius: 8px; padding: 8px 12px; }
.reppaste, .repfmt { width: 100%; font-family: var(--font-data); font-size: 13px; line-height: 1.5; margin: 8px 0; resize: vertical; }
.repfmtbox .dnote { margin: 4px 0; }
.repchip { position: fixed; left: calc(16px + var(--dockl, 0px)); bottom: 16px;   /* left: the activity panel's note box is on the right */
  z-index: 45; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 10px; box-shadow: 0 10px 28px var(--shadow); overflow: hidden; }
.repchip-open { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 0; background: none; color: var(--fg); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; max-width: 60vw; }
.repchip-open span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repchip-open:hover { background: var(--accent-soft); }
.repic { display: inline-flex; color: var(--accent); }
.repchip-x { border: 0; border-left: 1px solid var(--line); background: none; color: var(--muted); padding: 9px 11px; cursor: pointer; font: inherit; }
.repchip-x:hover { color: var(--fg); background: var(--surface-2); }
.repopen { margin-left: auto; margin-right: 6px; align-self: center; }

/* the report as an infographic (repInfographic) */
.rinfo { display: flex; flex-direction: column; gap: 14px; }
.rhero { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; }
.rbadge { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; background: var(--rc); color: #fff; font-weight: 700; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.rbadge.pending { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-weight: 600; }
.rheadline { font-size: 20px; font-weight: 650; line-height: 1.35; margin: 10px 0 2px; letter-spacing: -0.01em; }
.rsummary { font-size: 15px; line-height: 1.6; margin: 6px 0 0; max-width: 72ch; }
.rtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rtile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; min-width: 0; }
.rtile.wide { grid-column: span 2; }
.rtile-big { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.rtile-l { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.rtile.bad .rtile-big { color: var(--danger); }
.rtile.wait .rtile-big { color: var(--st-wait); }
.rbar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; margin: 9px 0 6px; }
.rlegend { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: 11.5px; color: var(--muted); }
.rlegend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.rpanel { --pc: var(--muted); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--pc); border-radius: 12px; padding: 12px 14px 14px; min-width: 0; }
.rdone { --pc: var(--st-done); } .rprog { --pc: var(--st-work); } .rnext { --pc: var(--accent); } .rwait { --pc: var(--st-wait); }
.rrisk { --pc: var(--danger); } .rq { --pc: #7a5cc6; } .rtime { --pc: var(--line-strong); } .rsubs { --pc: var(--line-strong); }
.rptitle { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--pc) 80%, var(--fg)); display: flex; align-items: center; gap: 8px; }
.rtime .rptitle, .rsubs .rptitle { color: var(--muted); }
.rcount { background: color-mix(in srgb, var(--pc) 16%, var(--surface)); border-radius: 9px; padding: 0 7px; font-size: 11px; letter-spacing: 0; }
.rflow { display: grid; gap: 4px; align-items: stretch; }
.rflow.n2 { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); }
.rflow.n3 { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) 40px minmax(0, 1fr); }
.rarrow { display: flex; align-items: center; justify-content: center; color: var(--line-strong); }
.rcards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rcards li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 7px 9px; border-radius: 7px; background: color-mix(in srgb, var(--pc) 7%, var(--surface)); font-size: 13.5px; line-height: 1.4; }
.rwhat { flex: 1 1 10em; min-width: 0; }
.rcheck { color: var(--st-done); font-weight: 700; }
.rnum, .rqmark { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--pc); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; align-self: center; }
.rsubtag { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.rdate { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rdate.late { color: var(--danger); font-weight: 600; }
.rstat { font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--st-work) 85%, var(--fg)); }
.rwcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.rwcard { display: flex; gap: 10px; padding: 10px; border-radius: 8px; background: color-mix(in srgb, var(--pc) 7%, var(--surface)); font-size: 13.5px; }
.ravatar { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--pc); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rwho { font-weight: 650; }
.rwmeta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.rtl { list-style: none; margin: 0; padding: 0; position: relative; }
.rtl::before { content: ""; position: absolute; left: 81px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.rtl li { display: grid; grid-template-columns: 64px 22px minmax(0, 1fr); gap: 8px; align-items: start; padding: 4px 0; position: relative; font-size: 13.5px; }
.rtl-d { text-align: right; font-size: 12px; color: var(--muted); padding-top: 3px; white-space: nowrap; }
.rtl-dot { --kc: var(--muted); position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--kc); color: var(--kc); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.rtl .k-done .rtl-dot { --kc: var(--st-done); } .rtl .k-in .rtl-dot { --kc: var(--rec-in); } .rtl .k-out .rtl-dot { --kc: var(--rec-out); } .rtl .k-info .rtl-dot { --kc: var(--rec-gen); }
.rtl-w { padding-top: 2px; }
.rlevel { flex: none; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; color: #fff; background: var(--st-start); align-self: center; }
.lv-high .rlevel { background: var(--danger); } .lv-medium .rlevel { background: var(--st-work); }
.rpair { display: grid; gap: 14px; }
.rpair.n2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rsubgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.rsubrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; background: var(--surface-2); font-size: 13px; min-width: 0; }
.rsubrow.isdone .rsubname { color: var(--muted); text-decoration: line-through; }
.rsubname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpill { flex: none; font-size: 11px; padding: 0 8px; line-height: 18px; border-radius: 9px; }
.rpill.none { color: var(--muted); border: 1px dashed var(--line-strong); }
.rdate.none { opacity: 0.6; }
.rskel span { display: block; height: 12px; border-radius: 6px; margin: 9px 0; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: rshimmer 1.4s linear infinite; }
@keyframes rshimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .rskel span { animation: none; } }
@media (max-width: 760px) {
  .rflow.n2, .rflow.n3, .rpair.n2 { grid-template-columns: minmax(0, 1fr); }
  .rarrow { height: 26px; } .rarrow svg { transform: rotate(90deg); }
  .rtile.wide { grid-column: auto; }
}

.gpick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; }
.gpick select { max-width: 210px; }
.gpick .hint { margin-right: 2px; }
.gwhen { margin: 0 0 2px; }
.gother { margin-top: 12px; }

/* ---------- subitem layout "Tab" (⋯ menu): the item is a tab sitting on a wider box of its subitems ----------
   The box starts at the table's left edge, right under the item, with a tinted strip down its left side that
   continues the tab and holds the select-all box. The rest of the item row is drawn and tinted like any row. */
:root.subtabs tr.item > td.tdacts { border-top-color: transparent; border-bottom-color: transparent; }
:root.subtabs tr.nest > td { border-bottom-color: transparent; }
:root.subtabs tr.nest > td { background: transparent; }
:root.subtabs .nestwrap { padding: 0 0 14px 0; }
/* the box takes the whole width of the table, under the item's buttons too, so the item is the narrower of the two */
:root.subtabs .nestbox { width: auto; }
:root.subtabs .nestbox > table.subtable { width: 100% !important; }
:root.subtabs .nestwrap::before { display: none; }
:root.subtabs .nestbox { border-radius: 0 8px 8px 8px; padding-left: 26px; margin-top: -1.5px;
  background: color-mix(in srgb, var(--tc, var(--accent)) 8%, var(--surface)); }
:root.subtabs .nestbox > table > thead > tr:first-child > :first-child, :root.subtabs .nestbox > table.nohead > tbody > tr:first-child > :first-child,
:root.subtabs .nestbox > table > :last-child > tr:last-child > :first-child { border-radius: 0; }
:root.subtabs .nestbox > table.subtable { background: var(--surface); }
:root.subtabs .grpsel { left: -25px; background: transparent; }

/* ---------- subitem layout "Wide" (⋯ menu, the default): the box reaches a little past the item on both sides ----------
   The grid keeps a 17px margin each side, items stay inside it, and each subitem box steps out into it. The box is as
   wide as the table, whatever the subitem columns add up to (the empty column takes the rest), so resizing a column
   never resizes the box; it grows only if the columns no longer fit. Its tinted left strip holds the select-all box. */
:root.subwide .grid-scroll { padding: 0 17px; }
:root.subwide .nestwrap { margin: 0 -12px; padding: 0 0 12px 0; }
:root.subwide .nestwrap::before { display: none; }
:root.subwide .nestbox { width: auto; min-width: fit-content; padding-left: 26px; margin-top: -1px;
  background: color-mix(in srgb, var(--tc, var(--accent)) 8%, var(--surface)); }
:root.subwide .nestbox > table.subtable { width: 100% !important; background: var(--surface); }
:root.subwide .nestbox > table > thead > tr:first-child > :first-child, :root.subwide .nestbox > table.nohead > tbody > tr:first-child > :first-child,
:root.subwide .nestbox > table > :last-child > tr:last-child > :first-child { border-radius: 0; }
:root.subwide .grpsel { left: -25px; background: transparent; }
:root.subwide tr.nest > td { background: transparent; border-bottom-color: transparent; }
/* the subitems' sticky button column may go into the grid's margin, out to the box's frame */
:root.subwide .nestbox td.tdacts, :root.subwide .nestbox th.th-add { right: -12px; }

/* Wide: one frame around each section's whole item region, from the column names down to "+ Add item". The subitem
   boxes reach past it on both sides and are drawn over it, so its sides run under them. */
:root.subwide .itemframe { position: relative; }
.itemframe { width: fit-content; min-width: 100%; }   /* as wide as its table, also when the table is wider than the window and scrolls */
:root.subwide .itemframe::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; border-radius: 8px;
  border: 1.5px solid color-mix(in srgb, var(--tc, var(--line-strong)) 55%, var(--line-strong)); }
:root.subwide .itemframe > table > thead > tr:first-child > th:first-child { border-top-left-radius: 8px; }
:root.subwide .itemframe > table > thead > tr:first-child > th:last-child { border-top-right-radius: 8px; }
:root.subwide .nestwrap { position: relative; z-index: 3; }
/* Wide: the section's frame in a darker shade of the table's colour */
:root.subwide .itemframe::after { border-color: color-mix(in srgb, var(--tc, var(--line-strong)) 72%, #000); border-width: 2px; }

/* ---------- Rows "Clean" (the default): no row ⋯, a click on a name renames it and opens the row's menu ----------
   v290: the drag handle and tick box sit in the name cell, folded to nothing. Hovering a name opens them and the name
   slides right; once anything is ticked every tick box stays open (the handles still only on hover). The select-alls
   sit by the name columns' titles and open the same way. Nothing reaches out past the table, so the grid needs no
   margin on its left. */
:root.cleanrows .rowbtn { display: none; }
:root.cleanrows .rsel-gap, :root.cleanrows tr.add .namebox > .grip { display: none; }
:root.cleanrows td[data-col="name"] > .namebox > .grip, :root.cleanrows td[data-col="name"] > .namebox > .rsel, :root.cleanrows th .thin > .rsel {
  width: 0; min-width: 0; margin: 0 -2px 0 0; opacity: 0; overflow: hidden; pointer-events: none;
  transition: width 0.28s ease, margin 0.28s ease, opacity 0.28s ease; }
:root.cleanrows td[data-col="name"]:hover > .namebox > .grip:not(.off) { width: 7px; margin-right: 0; opacity: 0.8; pointer-events: auto; }
/* where rows cannot be dragged (sorted, grouped by a column, the Dashboard) the handle shows faintly, its tip says why */
:root.cleanrows td[data-col="name"]:hover > .namebox > .grip.off { visibility: visible; width: 7px; margin-right: 0; opacity: 0.3; cursor: not-allowed; pointer-events: auto; }
:root.cleanrows td[data-col="name"]:hover > .namebox > .rsel, :root.cleanrows td[data-col="name"] > .namebox > .rsel:focus-visible,
:root.cleanrows.selon #main td[data-col="name"] > .namebox > .rsel,
:root.cleanrows th:hover > .thin > .rsel, :root.cleanrows th .thin > .rsel:focus-visible, :root.cleanrows.selon #main th .thin > .rsel {
  width: 14px; margin-right: 4px; opacity: 1; pointer-events: auto; }
:root.cleanrows th .thin > .rsel:not(:checked):not(:indeterminate) { accent-color: #fff; }
@media (prefers-reduced-motion: reduce) { :root.cleanrows td[data-col="name"] > .namebox > .grip, :root.cleanrows td[data-col="name"] > .namebox > .rsel, :root.cleanrows th .thin > .rsel { transition: none; } }
:root.cleanrows.subwide .nestbox, :root.cleanrows.subtabs .nestbox { padding-left: 0; }   /* subitems' names line up with the items' */
.gridpanel { min-width: 0; }
.rm-hint { margin: 2px 10px 6px; font-size: 12px; }
/* the items' column names in the same hue as the subitems', much deeper, with white names */
/* deep enough for white names: the accent itself, a little lighter in the light theme, darkened in the dark one */
:root { --ihead: color-mix(in srgb, var(--accent) 88%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ihead: color-mix(in srgb, var(--accent) 50%, #000); } }
:root[data-theme="dark"] { --ihead: color-mix(in srgb, var(--accent) 50%, #000); }
.itemframe > table > thead > tr > th { background: var(--ihead); color: #fff; border-bottom-color: var(--ihead); }
.itemframe > table > thead > tr > th + th { border-left-color: color-mix(in srgb, #fff 28%, var(--ihead)); }
.itemframe > table > thead .thbtn:hover, .itemframe > table > thead .thbtn.open { color: #fff; background: color-mix(in srgb, #fff 16%, var(--ihead)); }
.itemframe > table > thead .addcol { color: #fff; border-color: color-mix(in srgb, #fff 60%, var(--ihead)); }
/* the subitems' column names a lighter shade of the same hue */
table.subtable th { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }

/* renaming the name column's title */
.namepop { padding: 8px 10px 6px; }
.namepop-row { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.namepop-row .ctl { flex: 1; min-width: 0; }
.namepop .dnote { margin: 2px 0 4px; }

/* clean rows: no actions column at the right end; the "+" heads the spare column after the last one, on the left */
:root.cleanrows td.tdacts, :root.cleanrows th.th-add { padding: 0; border: 0; width: 0; overflow: hidden; }
:root.cleanrows td.tdacts > * { display: none; }
:root.cleanrows th.th-fill { text-align: left; padding: 2px 4px; }
:root.cleanrows th.th-fill .addcol { padding: 0 8px; font-size: 14px; line-height: 20px; }
/* the item's history button by its name: faint until the row is hovered */
:root.cleanrows .namebox > .logbtn { flex: none; opacity: 0.35; }
:root.cleanrows tr:hover .namebox > .logbtn, :root.cleanrows .namebox > .logbtn:focus-visible { opacity: 1; }

/* a slimmer subitem header row: less padding, and a smaller "+" so it does not set the height */
table.subtable > thead > tr > th { padding-top: 0.5px; padding-bottom: 0.5px; }
:root table.subtable > thead > tr > th.th-fill { padding-top: 0.5px; padding-bottom: 0.5px; }
table.subtable > thead .sortbtn { padding-top: 1px; padding-bottom: 1px; }
:root table.subtable > thead > tr > th .addcol { height: 14px; min-height: 0; line-height: 1; font-size: 12px; padding-top: 0; padding-bottom: 0; vertical-align: middle;
  display: inline-flex; align-items: center; justify-content: center; }

/* Column names centred, for items and subitems. The sort arrow sits at the right edge and a select-all at the left,
   out of the flow, so the name is centred in its column whether they show or not. */
/* The right side keeps room for the sort arrow. On the left a spacer of the same size keeps the name centred, and it is
   the first thing to give way when the column narrows, so the name can use the room up to the left border. */
th > .thin { justify-content: center; padding: 0 13px 0 0; margin-left: -6px; }
th > .thin::before { content: ""; flex: 0 1000 15px; min-width: 0; }
th > .thin:has(> .rsel)::before { flex: 0 0 20px; }   /* a select-all box sits there */
th > .thin > .thl { margin-left: 0; flex: 0 1 auto; }
th > .thin > .sortbtn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }
th > .thin > .rsel { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); margin: 0; }
/* v301: the arrow's room is the name's until the arrow shows: on hover, while the column is sorted, or with the
   keyboard on it. Then the name gives way (it is cut short sooner) */
th > .thin:not(:has(> .sortbtn.on)):not(:focus-within) { padding-right: 0; }
th > .thin:not(:has(> .sortbtn.on)):not(:focus-within):not(:has(> .rsel))::before { flex-basis: 0; }
th:hover > .thin:not(:has(> .sortbtn.on)):not(:focus-within) { padding-right: 13px; }
th:hover > .thin:not(:has(> .sortbtn.on)):not(:focus-within):not(:has(> .rsel))::before { flex-basis: 15px; }

/* No add rows: new rows come from the name titles and the row menus. The end lines that take dropped rows are invisible,
   and the subitem boxes sit flush on the next item. */
tr.dropend > td { padding: 0 !important; border: 0 !important; height: 0; line-height: 0; font-size: 0; background: none !important; }
tr.dropend > td::before { display: none !important; }
.nestwrap, :root.subwide .nestwrap, :root.subtabs .nestwrap { padding-bottom: 0; }   /* in every layout */

/* Info log buttons (In, Out, Info, the count and the pencil), a size smaller */
.icell { gap: 3px; }
.recpill { height: 18px; border-radius: 9px; }
.recpill button { font-size: 10.5px; }
.recq { width: 17px; font-size: 9.5px; }
.recpill .recbtn { padding: 0 6px 0 5px; }
.recpill.armed .recq { padding: 0 5px; font-size: 9.5px; }
.reccount { min-width: 18px; height: 18px; padding: 0 4px; font-size: 10.5px; border-radius: 3px; }
.recai { width: 22px; height: 18px; font-size: 11px; border-radius: 3px; }

/* the grid of a section: its own positioning box (the Wide frame and the lift's shades are drawn against it) */
.itemframe { position: relative; }

/* the fold arrow beside an item's name, larger and darker so an open item reads as open */
tr.item .caret { width: 20px; height: 20px; font-size: 16px; line-height: 1; color: color-mix(in srgb, var(--fg) 72%, transparent); }
tr.item .caret:hover { color: var(--fg); }

/* Revert: a small round badge in the bottom-right corner of a cell an automation rule just changed (rules.js); it
   widens to "Revert change" under the pointer */
td.has-rv { position: relative; }
.rvbtn { position: absolute; right: 1px; bottom: 1px; z-index: 2; display: inline-flex; align-items: center; gap: 3px; height: 16px; min-width: 16px;
  padding: 0; justify-content: center; border-radius: 8px; font: inherit; font-size: 9.5px; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none;
  cursor: pointer; white-space: nowrap; color: var(--accent); background: var(--surface); border: 1px solid var(--accent); box-shadow: 0 1px 2px var(--shadow); }
.rvic { display: inline-flex; width: 10px; height: 10px; }
/* the label opens just below the badge, so the value in the cell stays readable */
.rvtx { display: none; position: absolute; top: calc(100% + 3px); right: -1px; padding: 3px 7px; border-radius: 8px;
  background: var(--accent); color: var(--surface); box-shadow: 0 2px 6px var(--shadow); }
/* nothing to cross between the badge and its label: the label is part of the button, and a click on it reverts too */
.rvtx::before { content: ""; position: absolute; left: -4px; right: -4px; top: -6px; height: 6px; }
.rvtx::after { content: ""; position: absolute; left: -6px; right: -6px; top: 0; bottom: -6px; z-index: -1; }   /* a little slack around it */
.rvbtn:hover, .rvbtn:focus-visible { z-index: 7; background: var(--accent); color: var(--surface); }
.rvbtn:hover .rvtx, .rvbtn:focus-visible .rvtx { display: block; }

/* Rows on their way out of the filters (views.js, leaveCheck). The contents of the row fade after a wait, the row's
   own box stays, and then a spacer of the row's height closes. --lvd is the wait still left (negative once the fade
   is under way, so a redraw carries on where it was), --lvf how long the fade takes. */
@keyframes wbleave { from { opacity: 1; } to { opacity: 0; } }
@keyframes wbgap { from { height: var(--h, 0px); } to { height: 0; } }
tr.leaving > td > *:not(.lvbtn):not(.edgezone) { animation: wbleave var(--lvf, 5s) linear var(--lvd, 0ms) both; }
td.has-lv { position: relative; }
td.has-lv:hover, td.has-lv:has(.lvbtn:focus-visible) { z-index: 5; }   /* the arrow's label opens over the rows below */
/* the arrow takes the place of the drag handle; with clean rows it sits out on the grey, where the tick box shows */
.rvbtn.lvbtn { left: 1px; right: auto; bottom: 1px; height: 15px; min-width: 15px; }
.rvbtn.lvbtn .rvtx { left: -1px; right: auto; }
td.has-lv > .namebox > .grip { visibility: hidden; }
:root.cleanrows .rvbtn.lvbtn { left: -22px; bottom: 2px; }
:root.cleanrows.subwide tr.item .rvbtn.lvbtn { left: -32px; }
:root.cleanrows td.has-lv > .namebox > .rsel { visibility: hidden; }
/* a row that has gone leaves its arrow on the line where it was: a row of no height, the arrows hanging from it */
tr.lvmark > td { padding: 0 !important; border: 0 !important; height: 0; line-height: 0; position: relative; overflow: visible; background: none !important; }
.lvmarks { position: absolute; left: 1px; top: -8px; display: flex; gap: 2px; z-index: 3; }
.lvmarks:hover, .lvmarks:focus-within { z-index: 7; }
tr.lvmark.end .lvmarks { top: -17px; }
.lvmarks .rvbtn.lvbtn { position: relative; left: auto; bottom: auto; flex: none; opacity: 0.75; }
.lvmarks .rvbtn.lvbtn:hover, .lvmarks .rvbtn.lvbtn:focus-visible { opacity: 1; }
:root.cleanrows .lvmarks { left: auto; right: calc(100% + 7px); flex-direction: row-reverse; }
:root.cleanrows .lvmarks .rvbtn.lvbtn { left: auto; bottom: auto; }
tr.lvgap > td { padding: 0 !important; border: 0 !important; height: 0; background: none !important; }
tr.lvgap > td > div { height: 0; overflow: hidden; animation: wbgap 350ms ease-in-out both; }
/* A row on its way to another group: it pulses slowly over the whole wait (--lvf), each pulse a little fainter, and
   ends faded out, while "Moving to" and the new group's name stay on the right of the name until the last moment. */
@keyframes wbmove {
  0% { opacity: 1; } 10% { opacity: 0.3; } 20% { opacity: 1; } 30% { opacity: 0.3; } 40% { opacity: 1; }
  50% { opacity: 0.28; } 60% { opacity: 0.9; } 70% { opacity: 0.25; } 80% { opacity: 0.7; } 90% { opacity: 0.15; } 100% { opacity: 0; }
}
tr.leaving.moving > td > *:not(.lvbtn):not(.edgezone):not(.mvtag) { animation: wbmove var(--lvf, 7.5s) ease-in-out var(--lvd, 0ms) both; }
.mvtag { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 4px 2px 8px; border-radius: 999px; background: var(--surface, #fff); box-shadow: 0 0 0 1px var(--line-strong, #c9d2d7), 0 2px 6px rgba(0, 0, 0, 0.08);
  font-size: 11.5px; font-weight: 500; line-height: 1.2; color: var(--muted, #5b6770); white-space: nowrap; pointer-events: none; }
.mvtag .mvto { font-weight: 650; color: var(--fg); }
.mvtag .mvto.pill { padding: 1px 7px; border-radius: 999px; font-size: 11px; }
.mvtag .mvto:not(.pill) { padding-right: 4px; }
tr.leaving.moving > td > .mvtag { animation: wbleave 700ms linear calc(var(--lvd, 0ms) + var(--lvf, 7.5s) - 700ms) both; }
@media (prefers-reduced-motion: reduce) { tr.leaving > td > *:not(.lvbtn):not(.edgezone), tr.leaving.moving > td > *:not(.lvbtn):not(.edgezone):not(.mvtag), tr.leaving.moving > td > .mvtag { animation: none; } }

/* Ask Claude (chat.js): the question on the left, the answers on the right */
.ichat { display: grid; grid-template-columns: minmax(220px, 30%) 1fr; gap: 12px; height: 30vh; min-height: 180px; }
.chat-l { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.chat-in { flex: 1; min-height: 60px; resize: none; font: inherit; font-size: 13px; line-height: 1.45; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--surface); color: var(--fg); }
.chat-in:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.chat-lfoot, .chat-rfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-rfoot { justify-content: flex-end; }
.chat-r { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); padding: 8px 10px; display: flex;
  flex-direction: column; gap: 4px; }
.chat-q { align-self: flex-end; max-width: 85%; margin-top: 6px; padding: 4px 9px; border-radius: 10px 10px 2px 10px; background: var(--accent-soft); color: var(--fg);
  font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-a { max-width: 92%; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg); }
.chat-a.live { color: var(--muted); }
.chat-instr { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--accent); font-weight: 600; }
.chat-log > .dnote { margin: auto 0; }
@media (max-width: 640px) { .ichat { grid-template-columns: 1fr; height: auto; } .chat-log { max-height: 40vh; } }

/* the panel header: Ask Claude on the left, small buttons for the other views on the right */
.ititle { margin: 0; font-size: 14px; font-weight: 700; color: var(--fg); }
.iback { display: flex; align-items: center; gap: 10px; }
.isides { display: flex; gap: 4px; }
.iside { font-size: 12px; padding: 3px 9px; color: var(--muted); }
.iside.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Ask Claude dictation (chat.js): a mic beside Send, filled while listening; the live guess replaces the hint */
.chat-btns { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.micbtn { display: inline-flex; align-items: center; justify-content: center; padding: 3px 7px; color: var(--muted); }
.micbtn:hover { color: var(--accent); border-color: var(--accent); }
.micbtn .micic { display: inline-flex; }
.micbtn.on, .micbtn.on:hover { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.micbtn.on .micic { animation: micpulse 1.4s ease-in-out infinite; }
@keyframes micpulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .micbtn.on .micic { animation: none; } }
#chat-partial { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#chat-partial.partial { color: var(--fg); font-style: italic; }
.chat-l > .ierr { margin: 0; }

/* Table groups (columns.js): chips above a list of tables, and the dialog that edits them */
.tp-groups { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 4px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.tp-groups > .hint { margin-right: 2px; }
.tchip { font: inherit; font-size: 12px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); cursor: pointer; }
.tchip:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.tchip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.tchip[disabled] { opacity: .5; cursor: default; }
.panel .tpick > .tp-groups { flex-basis: 100%; }
.grpdlg { width: min(520px, calc(100vw - 32px)); }
.grplist { display: flex; flex-direction: column; gap: 12px; }
.grp { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.grp-head { display: flex; align-items: center; gap: 8px; }
.grpname { flex: 1; min-width: 0; font-weight: 600; }

/* Guidance added to several tables (guides.js) */
.galso-open { align-self: flex-start; font-size: 12px; }
.galso { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface-2); }
.galso-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.galso-head .dp-sub { margin: 0; }
.galsoin { font-style: italic; }
.galso .tpick, .grp .tpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 16px; }
.galso .tp-groups, .grp .tp-groups { grid-column: 1 / -1; }
.galso-head .linkbtn, .tp-groups .linkbtn { font-size: 12px; }

/* The line under an item (views.js edgeTools): a thin hover strip on the border, at the name column, that shows small
   buttons: + Subitem, All subitems, All items */
td.has-edge { position: relative; }
.edgezone { position: absolute; left: 0; bottom: -6px; width: min(380px, 100%); height: 12px; z-index: 6; }
.edgezone.last { bottom: 0; }
.edgebar { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); display: none; gap: 4px; white-space: nowrap; }
.edgezone.last .edgebar { top: auto; bottom: 1px; transform: none; }
.edgezone:hover .edgebar, .edgezone:focus-within .edgebar { display: flex; }
.edgezone:hover::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent); }
.edgezone.last:hover::before { top: auto; bottom: 0; }
.edgebtn { font: inherit; font-size: 10.5px; line-height: 15px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--muted); cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.edgebtn:hover, .edgebtn:focus-visible { color: var(--accent); border-color: var(--accent); }
.edgebtn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }


/* Tags columns (cells.js tagsCell, popovers.js tagsPop): several category-style chips in one cell */
.selbtn.tagbtn { display: flex; align-items: center; gap: 3px; }
.tagbtn > .cat { flex: 0 1 auto; min-width: 22px; }
.cat.missing { opacity: .55; }
.tagvals { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: middle; }
.tagopt { display: flex; align-items: center; gap: 6px; }
.tagtick { width: 12px; flex: none; text-align: center; color: var(--accent); font-weight: 700; font-size: 12px; }
.tagpop .dp-foot { justify-content: flex-end; }

/* ---------- time tracking (timer.js) ---------- */
#timebtn { position: relative; display: flex; align-self: center; gap: 2px; align-items: center; padding-right: 8px; border-right: 1px solid var(--line-strong); }
.timebtn { color: var(--accent); }
.timebtn.running { width: auto; gap: 5px; padding: 0 8px 0 6px; }
.timebtn .tmlabel { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.timebtn.on { color: var(--surface); background: var(--accent); border-color: var(--accent); }
.timebtn.on:hover:not([disabled]) { color: var(--surface); background: var(--accent); }
.timebtn.running:not(.on) { color: var(--danger); }
.timebtn.running .tmlabel::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: tmpulse 1.6s ease-in-out infinite; }
@keyframes tmpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.tmcell { display: flex; align-items: center; gap: 7px; height: 100%; padding: 0 8px; }
.tmbtn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0 0 0 1px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent); cursor: pointer; }
.tmbtn:hover { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.tmbtn.on { padding: 0; background: var(--danger); border-color: var(--danger); color: #fff; }
.tmbtn.on:hover { filter: brightness(1.1); }
.tmbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tmtot { min-width: 0; padding: 2px 4px; border: 0; border-radius: 4px; background: none; color: var(--fg); font: inherit; font-size: 13px;
  font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmtot:hover, .tmtot[aria-expanded="true"] { background: var(--accent-soft); }
.tmtot.zero { color: var(--muted); }
.tmcell.running .tmtot { color: var(--danger); font-weight: 600; }
.tmcell.subrun .tmtot { color: var(--danger); }
.tmpop { width: 440px; max-width: calc(100vw - 16px); padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.tm-sum { font-size: 12.5px; color: var(--muted); }
.tm-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.tm-row { display: flex; align-items: center; gap: 4px; }
.tm-row .ctl, .tm-addrow .ctl { padding: 3px 4px; font-size: 12px; }
.tm-row .tm-day, .tm-addrow input[type="date"] { width: 128px; }
.tm-row .tm-t, .tm-addrow input[type="time"] { width: 92px; }
.tm-runs { width: 92px; font-size: 12px; color: var(--danger); font-weight: 600; padding-left: 4px; }
.tm-dash { color: var(--muted); }
.tm-dur { flex: 1; text-align: right; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.tm-x { padding: 2px 6px; }
.tm-addrow { display: flex; align-items: center; gap: 4px; }
.cp-time { margin: 0 0 4px; }
.tmsplit { display: inline-flex; align-items: stretch; }
.tmarrow { width: 0; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0 solid transparent;
  border-radius: var(--radius) 0 0 var(--radius); background: none; color: var(--muted); cursor: pointer; opacity: 0; overflow: hidden;
  transition: width 150ms ease, opacity 150ms ease; }
#timebtn:hover .tmarrow, .tmarrow[aria-expanded="true"], .tmarrow:focus-visible { width: 14px; border-width: 1px 0 1px 1px; opacity: 1; border-color: var(--line-strong); background: var(--surface); }
.tmarrow:hover { color: var(--fg); background: var(--accent-soft) !important; }
#timebtn:hover .timebtn, .tmarrow[aria-expanded="true"] + .timebtn { border-radius: 0; border-color: var(--line-strong); }
#timebtn:hover .timebtn:not(.on), .tmarrow[aria-expanded="true"] + .timebtn:not(.on) { background: var(--surface); }
.tmqpop { width: 340px; max-width: calc(100vw - 16px); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.tmqpop .tmq-sec { margin-top: 6px; }
.tmq-none { margin: 2px 4px 4px; }
.tmq-row { display: flex; align-items: center; gap: 4px; margin: 1px 0; border-radius: 6px; border-left: 3px solid var(--tc);
  background: color-mix(in srgb, var(--tc) 9%, var(--surface)); }
.tmq-row:hover { background: color-mix(in srgb, var(--tc) 18%, var(--surface)); }
.tmq-go, .tmq-hit { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--fg);
  font: inherit; text-align: left; cursor: pointer; }
.tmq-hit { border-left: 3px solid var(--tc); margin: 1px 0; }
.tmq-hit:hover { background: color-mix(in srgb, var(--tc) 14%, var(--surface)); }
.tmq-tbl { color: color-mix(in srgb, var(--tc) 80%, var(--fg)); font-weight: 600; }
.tmq-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding-left: 1px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent); }
.tmq-go:hover .tmq-ic { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.tmq-go.on .tmq-ic { padding: 0; background: var(--danger); border-color: var(--danger); color: #fff; }
.tmq-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tmq-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmq-path { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmq-tot { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tmq-row.running .tmq-tot { color: var(--danger); font-weight: 600; }
.tmq-star { flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 15px; cursor: pointer; }
.tmq-star:hover { color: var(--fg); }
.tmq-star.on { color: #d08700; }
.tmq-t { padding: 2px 6px; }
.tmq-plus { flex: none; width: 20px; text-align: center; color: var(--accent); font-weight: 700; }
.tmq-find { margin: 6px 0 2px; }
.tmq-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }

/* the views menu: the three cases as headings, their views indented under them (saved.js viewsPop) */
.vwgroup + .vwgroup { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-strong); }
.vwhead { padding: 4px 6px 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.vwgroup.cur .vwhead { color: var(--fg); }
/* the arrows that order the cases, and the mark on the one a place opens with */
.vwhead { display: flex; align-items: center; gap: 4px; }
.vwhead .vwhname { flex: 1; }
.vwhead .vwmove { padding: 0 5px; font-size: 12px; line-height: 16px; letter-spacing: 0; opacity: 0.55; }
.vwhead .vwmove:hover:not([disabled]), .vwhead .vwmove:focus-visible { opacity: 1; background: var(--accent-soft); color: var(--accent); }
.vwhead .vwmove[disabled] { opacity: 0.2; cursor: default; }
.vwviews { display: flex; flex-direction: column; gap: 1px; margin-left: 10px; padding-left: 8px; border-left: 2px solid var(--line); }
.vwgroup.cur .vwviews { border-left-color: var(--accent); }
.vwviews .vwgo { flex-direction: row; align-items: center; gap: 7px; padding: 5px 8px; font-size: 13px; }
/* each view numbered in the order the name button steps through them: 1 is what the place opens with */
.vwnum { width: 16px; flex: none; text-align: right; font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.vwline.on .vwnum { color: var(--accent); }
/* + New at the bottom of each case */
.vwviews .vwadd { padding: 4px 8px 4px 28px; font-size: 12.5px; color: var(--muted); }
.vwviews .vwadd:hover, .vwviews .vwadd:focus-visible { color: var(--accent); }
.vwviews .vwnew { margin: 4px 0 2px 20px; }
.vwviews > .dnote { margin: 2px 0 4px 22px; }

/* the stopped timer folds away (timer.js TM_CLOSE) */
.timebtn.closing { width: 30px; padding: 0 0 0 6px; gap: 5px; justify-content: flex-start; overflow: hidden; white-space: nowrap; pointer-events: none;
  animation: tmshrink 380ms cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.timebtn.closing svg { flex: none; }
.timebtn.closing .tmlabel { animation: tmfade 200ms ease forwards; }
.timestop.closing { display: inline-flex; overflow: hidden; border: 0; padding: 0; animation: tmshrinkstop 380ms cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes tmshrink { from { width: var(--bw); } to { width: 30px; } }
/* a timer starts: the clock opens out to its running width, the time and the stop button coming in (timer.js, S.tmOpen) */
.timebtn.opening { justify-content: flex-start; overflow: hidden; white-space: nowrap; animation: tmgrow 380ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.timebtn.opening svg { flex: none; }
.timebtn.opening .tmlabel { animation: tmshow 260ms ease 120ms both; }
.timestop.opening { overflow: hidden; animation: tmgrowstop 380ms cubic-bezier(0.4, 0, 0.2, 1) both; }
.tmwhat.opening { animation: tmshow 260ms ease 120ms both; }
@keyframes tmgrow { from { width: 30px; padding-right: 0; } to { width: var(--bw); } }
@keyframes tmgrowstop { from { width: 0; opacity: 0; } to { width: 20px; opacity: 1; } }
@keyframes tmshow { from { opacity: 0; } to { opacity: 1; } }
@keyframes tmfade { to { opacity: 0; } }
@keyframes tmshrinkstop { from { width: var(--sw); opacity: 1; } to { width: 0; opacity: 0; margin-left: -2px; } }
@media (prefers-reduced-motion: reduce) { .timebtn.closing, .timebtn.closing .tmlabel, .timestop.closing, .timebtn.opening, .timebtn.opening .tmlabel, .timestop.opening, .tmwhat.opening { animation-duration: 1ms; animation-delay: 0ms; } }
.tmqpop .tmq-sec { display: flex; align-items: center; justify-content: space-between; }
.tmq-clear { padding: 1px 8px; font-size: 12px; font-weight: 500; }
/* the right part of the Time button: ▶ quick start (on hover), ■ while a timer runs */
.tmright { width: 20px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0; background: none; color: var(--accent); cursor: pointer; opacity: 0; }
.tmright.timestop { opacity: 1; color: var(--danger); }
#timebtn:hover .tmright, .tmright:focus-visible, .tmarrow[aria-expanded="true"] ~ .tmright { opacity: 1; border-color: var(--line-strong); background: var(--surface); }
.tmright:hover { background: var(--accent-soft) !important; }
.tmarrow[aria-expanded="true"] + .timebtn { border-radius: 0; }
.tmq-deftag { margin-left: 6px; padding: 0 5px; border-radius: 8px; font-size: 10.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); vertical-align: 1px; }
.tmq-def.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.tmwhat { position: absolute; left: calc(50% - 4px); transform: translateX(-50%); width: max-content; max-width: 240px; bottom: calc(100% - 1px); font-size: 10px; line-height: 1.2; font-weight: 600; text-align: center;
  color: color-mix(in srgb, var(--tc) 75%, var(--fg)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; }
.tmwhat.closing { animation: tmfade 200ms ease forwards; pointer-events: none; }
.tmwhat .tmw-item { font-weight: 500; opacity: 0.85; }
.tmq-maxrow { display: flex; align-items: center; gap: 6px; padding: 2px 4px 6px; font-size: 12.5px; color: var(--muted); }
.tmq-maxrow .tmq-max { width: 52px; padding: 2px 4px; font-size: 12.5px; }
/* Subitems only: the item column (render.js ITEM_COL) */
td.itemref { padding: 0 8px; }
/* no groups: the title bar holds only the count and the controls (views.js), its fold arrow kept for the room it takes */
.plainhead .seccaret { visibility: hidden; }
.plainhead .grpline { display: none; }   /* no title: the count alone, beside the views */
/* Subitems only: the item's own columns, drawn like its cells, to read (render.js parentCols); text in the muted ink */
td.pcell .pval, td.pcell .pval * { cursor: default; }
td.pcell .pval input, td.pcell .pval .cell { color: var(--muted); }
/* Connection cells (connect.js connCell): the connected rows as small tags in their table's colour; picked by hand,
   the whole cell is a button that opens the picker */
.connbox { display: flex; align-items: center; gap: 4px; min-height: 26px; height: 100%; padding: 0 6px; overflow: hidden; border-radius: 4px; }
.connbox.pick { cursor: pointer; }
.connbox.pick:hover, .connbox.open { box-shadow: inset 0 0 0 1px var(--accent); }
.connbox:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.connbox.pick.none:hover::after { content: "Connect\2026"; color: var(--muted); font-size: 12px; }
.conn-tag { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 18px;
  padding: 0 7px; border-radius: 9px; background: color-mix(in srgb, var(--tc, var(--accent)) 14%, var(--surface)); border-left: 3px solid var(--tc, var(--accent)); }
.conn-tag.sub { font-style: italic; }
.conn-more { flex: none; font-size: 11px; color: var(--muted); }
/* From a connection cells (connect.js lookupCell): the value to read */
.lookbox { display: flex; align-items: center; gap: 6px; min-height: 26px; height: 100%; padding-right: 6px; }
.lookbox .pval { flex: 1 1 auto; min-width: 0; }
.lookbox .lookname { padding: 0 8px; }
.mp-sub.is-sub { padding-left: 22px; }
.mp-sub.is-item .mp-name { font-weight: 600; }
.mp-tick { flex: none; width: 12px; color: var(--accent); font-weight: 700; }
/* the picker of a hand-picked connection (connect.js connPop): rings from the row out to other folders */
.mirpop { width: 340px; gap: 6px; padding: 8px; display: flex; flex-direction: column; }
.mirpop .mp-rings { display: flex; }
.mirpop .mp-rings button { flex: 1 1 0; font-size: 12px; padding: 4px 2px; }
.mp-list { display: flex; flex-direction: column; gap: 1px; max-height: 300px; overflow-y: auto; }
.mp-head { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 6px 4px 2px; }
.mp-sub { display: flex; align-items: center; gap: 8px; text-align: left; padding: 5px 8px; border-radius: 5px; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }
.mp-sub:hover, .mp-sub:focus-visible { background: var(--accent-soft); }
.mp-sub.cur { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.mp-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-val { flex: 0 1 auto; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.mp-val.none { font-style: italic; }
.mp-foot { display: flex; flex-wrap: wrap; gap: 6px; }
.itemcell { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 30px; }
.itemcell .ttag { margin-right: 6px; }
/* Dashboard and Calendar as icons, the word shown under the icon on hover (views.js placeIcon) */
.tab.icontab { position: relative; display: inline-flex; align-items: center; justify-content: center; padding-left: 10px; padding-right: 10px; }
.tabicon { display: inline-flex; }
.tablab { position: absolute; left: 50%; top: calc(100% + 3px); transform: translateX(-50%); z-index: 60; padding: 3px 8px; border-radius: 5px;
  background: var(--fg); color: var(--bg); font-size: 11.5px; font-weight: 500; line-height: 1.3; letter-spacing: 0; text-transform: none; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity 0.1s; }
.tab.icontab:hover .tablab, .tab.icontab:focus-visible .tablab { opacity: 1; transition-delay: 0.15s; }
.tab.icontab:first-child .tablab { left: 2px; transform: none; }   /* the bar clips anything left of its edge */

/* ---------- the Data tab (library.js), first draft ---------- */
.libpage { display: flex; flex-direction: column; gap: 14px; padding: 14px 0 30px; }
.libhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.libtitle h2 { margin: 0 0 2px; font-size: 20px; }
.libtitle .dnote { margin: 0; max-width: 560px; }
.libtools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.libtools .search { width: 200px; }
.libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.libcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer; border-top: 3px solid var(--kc, var(--accent)); }
.libcard:hover { box-shadow: 0 4px 14px var(--shadow); }
.libcard.k-text { --kc: #3769b8; } .libcard.k-sheet { --kc: #2f8a55; } .libcard.k-file { --kc: #d08700; }
.libcard.open { grid-column: 1 / -1; cursor: default; box-shadow: 0 6px 20px var(--shadow); }
.libcard-title { font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.libmeta { font-size: 11.5px; color: var(--muted); }
.libtext { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--fg); white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; }
.libnone { margin: 0; font-size: 12.5px; color: var(--muted); font-style: italic; }
.libfile { margin: 0; font-size: 12.5px; }
table.libsheet { border-collapse: collapse; font-size: 11.5px; width: 100%; table-layout: auto; }
table.libsheet th, table.libsheet td { border: 1px solid var(--line); padding: 2px 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;
  text-transform: none; letter-spacing: 0; font-size: 11.5px; }
table.libsheet th { background: var(--surface-2); color: var(--fg); font-weight: 600; }
.libedit-top { display: flex; gap: 6px; align-items: center; }
.libtitle-in { flex: 1; font-size: 15px; font-weight: 600; }
.libta { width: 100%; min-height: 120px; resize: vertical; font: inherit; font-size: 13px; line-height: 1.5; }
.libta.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; white-space: pre; }
.libprev { max-height: 420px; overflow: auto; }
.libempty .dnote { max-width: 440px; }
.libcard:not(.open) { overflow: hidden; }
.libcard:not(.open) table.libsheet { table-layout: fixed; }

/* ---------- who did what (people.js) ---------- */
.whochip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font-size: 11.5px; color: var(--muted); vertical-align: middle; }
.whoimg { flex: none; width: 16px; height: 16px; border-radius: 50%; object-fit: cover; background: var(--line-strong); }
.whoimg:not([src]) { display: inline-block; }
.whoname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evwho { margin-top: 3px; }
.mewho { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.mewho .whochip { font-size: 13px; color: var(--fg); font-weight: 600; }
.mewho .whoimg { width: 22px; height: 22px; }
/* the Person column (people.js) */
.personbtn { display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; }
.pchip { font-size: 12.5px; color: var(--fg); }
.pchip .whoimg { width: 18px; height: 18px; }
.pinit { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; background: #8a96a0; }
.personpop .selopt .pchip { font-size: 13px; }

/* ---------- the Posts tab (posts.js) ---------- */
.postpage { display: flex; flex-direction: column; gap: 14px; padding: 14px 0 30px; max-width: 760px; }
.postfor { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.postfeed { display: flex; flex-direction: column; gap: 12px; }
.postcard { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); border-left: 3px solid var(--tc, var(--line-strong)); }
.postcard.composer-card { border-left-color: var(--accent); box-shadow: 0 2px 10px var(--shadow); }
.posthead { display: flex; align-items: center; gap: 8px; min-width: 0; }
.postwho { font-size: 13px; color: var(--fg); font-weight: 600; }
.postwho .whoimg { width: 22px; height: 22px; }
.postwhen { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.posttools { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.postcard:hover > .posthead .posttools, .postreply:hover > .posthead .posttools, .posttools:focus-within { opacity: 1; }
.postedited { font-size: 11px; color: var(--muted); font-style: italic; margin-right: 4px; }
.postbody { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.posttext { width: 100%; resize: vertical; font: inherit; font-size: 14px; line-height: 1.5; min-height: 60px; }
.postfoot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.postfoot .hint { margin-right: auto; font-size: 11.5px; }
.postlinks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.postlink { display: inline-flex; align-items: center; max-width: 100%; min-width: 0; gap: 0; padding: 2px 9px; border-radius: 999px; font: inherit; font-size: 12px;
  border: 1px solid color-mix(in srgb, var(--tc, var(--line-strong)) 45%, transparent); background: color-mix(in srgb, var(--tc, var(--line-strong)) 10%, var(--surface));
  color: var(--fg); cursor: pointer; }
.postlink:hover { background: color-mix(in srgb, var(--tc, var(--line-strong)) 20%, var(--surface)); }
.postlink.ptable { font-weight: 600; }
.postlink .pllabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postlink .px { margin-left: 6px; font-size: 10px; color: var(--muted); }
.postlink.gone { --tc: var(--line-strong); color: var(--muted); text-decoration: line-through; cursor: default; }
.plinkbtn { color: var(--accent); }
.plinkfind { display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, var(--bg)); }
.plinkfind .ctl { margin-bottom: 4px; }
.plinkfind .dnote { margin: 2px 4px; }
.plinkhit { display: flex; align-items: baseline; gap: 0; min-width: 0; padding: 4px 6px; border: 0; border-radius: 5px; background: none; font: inherit; font-size: 13px;
  color: var(--fg); text-align: left; cursor: pointer; }
.plinkhit:hover, .plinkhit:focus-visible { background: color-mix(in srgb, var(--tc) 14%, transparent); }
.plh-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plh-path { margin-left: 8px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.postreplies { display: flex; flex-direction: column; gap: 8px; margin-left: 14px; padding-left: 12px; border-left: 2px solid var(--line); }
.postreply { display: flex; flex-direction: column; gap: 4px; }
.postreply .postbody { font-size: 13.5px; }
.postreply .postwho { font-size: 12.5px; }
.postreply .postwho .whoimg { width: 18px; height: 18px; }
.postactions { display: flex; gap: 4px; }
@media (max-width: 600px) { .postreplies { margin-left: 4px; } }
#log-posts { margin-left: auto; align-self: center; }
#log-posts .wic svg { width: 15px; height: 15px; display: block; }
#log-posts + .repopen { margin-left: 0; }
/* attachments on posts (posts.js) */
.postfiles { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.postimgs { display: grid; gap: 6px; width: 100%; max-width: 560px; }
.postimgs.n1 { grid-template-columns: minmax(0, 1fr); }
.postimgs.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.postimgs.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.postimg { position: relative; display: block; min-width: 0; }
.postimg a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2, var(--bg)); }
.postimg img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
.postimgs:not(.n1) .postimg img { aspect-ratio: 4 / 3; height: 100%; }
/* while writing or editing, pictures are small squares */
.composer-card .postimgs, .postcard .postfiles.editing .postimgs { grid-template-columns: repeat(auto-fill, 84px); max-width: none; }
.composer-card .postimg img, .postcard .postfiles.editing .postimg img { width: 84px; height: 84px; aspect-ratio: 1; object-fit: cover; }
.postfile { position: relative; display: inline-flex; max-width: 100%; }
.postfile a { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 5px 10px 5px 6px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--fg); text-decoration: none; font-size: 12.5px; }
.postfile a:hover { border-color: var(--accent); }
.pfext { flex: none; padding: 3px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; }
.pfname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pfsize { flex: none; color: var(--muted); font-size: 11.5px; }
.pfx { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--muted); font-size: 10px; line-height: 18px; text-align: center; cursor: pointer; box-shadow: 0 1px 4px var(--shadow); }
.pfx:hover { color: var(--danger); border-color: var(--danger); }
.postfile .pfx { top: -7px; right: -7px; }
.postup { margin: 0; }
.composer-card.dropping { outline: 2px dashed var(--accent); outline-offset: 3px; background: var(--accent-soft); }
.plinkbtn.withic { display: inline-flex; align-items: center; gap: 4px; }
.plinkbtn .wic { display: inline-flex; }
.postbody a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
/* Person cells show faces only, the name on hover (people.js personFace) */
.selbtn.personbtn { flex-wrap: nowrap; gap: 0; overflow: hidden; padding-left: 3px; }
.personbtn .pface { flex: none; width: 18px; height: 18px; box-shadow: 0 0 0 1.5px var(--surface); }
.personbtn .pface + .pface { margin-left: -3px; }   /* a little overlap, like a hand of cards */
.personbtn .pface.pinit { display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; line-height: 1; }

/* ---------- the website version's test note (web/webplatform.js) ---------- */
.webnote { padding: 6px 16px; background: var(--accent-soft); color: var(--fg); font-size: 12.5px; text-align: center; border-bottom: 1px solid var(--line); }
.webnote.bad { background: var(--danger-soft); color: var(--danger); }

/* ---------- the website version's sign-in screen (web/graph.js) ---------- */
.wbms { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: var(--bg);
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.wbms-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 28px 26px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 40px var(--shadow); }
.wbms-card h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.wbms-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.wbms-btn { font: inherit; font-weight: 600; font-size: 14px; padding: 10px 14px; border-radius: 8px; border: 0; background: var(--accent); color: #fff; cursor: pointer; }
.wbms-btn:focus-visible, .wbms-link:focus-visible, .wbms-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wbms-link { font: inherit; font-size: 13px; border: 0; background: none; color: var(--accent); cursor: pointer; padding: 2px 0; text-align: left; }
.wbms-in { font: inherit; font-size: 14px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg); }
.wbms-err { color: var(--danger) !important; }
.wbms-err:empty { display: none; }
.wbms-wait { font-style: italic; }

/* ---------- the Home page (home.js) ----------
   A greeting, then the person's cards in a grid: three columns on a wide screen, two on a medium one, one on a phone.
   A wide card takes two columns. Edit home shows each card's controls and the cards that can be added. */
.home { padding: 18px 0 36px; display: flex; flex-direction: column; gap: 18px; }
.hhead { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.hhead .grow { flex: 1; }
.hhello { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -0.01em; color: var(--fg); }
.hdate { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
/* Rows of 6px: each card spans the rows its height needs (home.js homePack), so every column fills from the top; the
   space under a card is its margin, counted in its span. A card is a third (w1), two thirds (w2) or the whole row (w3). */
.hgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 6px; column-gap: 14px; row-gap: 0; align-items: start; }
@media (max-width: 1100px) { .hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .hgrid { grid-template-columns: minmax(0, 1fr); } .hcard.w2, .hcard.w3 { grid-column: auto; } }
.hcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px 16px; min-width: 0;
  margin-bottom: 14px; position: relative; display: flex; flex-direction: column; }
.hcard.w2 { grid-column: span 2; }
.hcard.w3 { grid-column: 1 / -1; }
.hcard.fixed .hcbody { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* dragged by the title bar; the corner resizes */
.hchead { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.hchead button, .hchead input { cursor: pointer; }
.hcard.hdragging { z-index: 30; cursor: grabbing; opacity: 0.94; box-shadow: 0 22px 48px rgba(16, 24, 30, 0.28), 0 3px 10px rgba(16, 24, 30, 0.16); }
.hcard.hdragging .hchead { cursor: grabbing; }
.hcard.hresizing { z-index: 30; outline: 2px dashed color-mix(in srgb, var(--hc) 60%, transparent); outline-offset: 3px; }
.hresize { position: absolute; right: 4px; bottom: 4px; width: 14px; height: 14px; cursor: nwse-resize; touch-action: none; opacity: 0; transition: opacity .12s;
  background: linear-gradient(135deg, transparent 0 45%, color-mix(in srgb, var(--hc) 70%, var(--fg)) 45% 55%, transparent 55% 68%, color-mix(in srgb, var(--hc) 70%, var(--fg)) 68% 78%, transparent 78%); }
.hcard:hover .hresize, .hcard.hresizing .hresize { opacity: 0.75; }
/* Empty space: nothing to see until the pointer is over it (or Edit home is on); then a dashed outline, its title bar
   to drag it by and its corner to size it */
.hcard.hc-spacer { --hc: var(--muted); background: transparent; border: 1.5px dashed transparent; box-shadow: none; }
.hcard.hc-spacer .hchead { opacity: 0; transition: opacity .12s; }
.hcard.hc-spacer:hover, .home.editing .hcard.hc-spacer, .hcard.hc-spacer.hdragging, .hcard.hc-spacer.hresizing {
  border-color: var(--line-strong); background: color-mix(in srgb, var(--surface) 45%, transparent); }
.hcard.hc-spacer:hover .hchead, .home.editing .hcard.hc-spacer .hchead, .hcard.hc-spacer.hdragging .hchead { opacity: 1; }
.home.editing .hcard.hc-spacer { outline: none; }
.hwseg { display: inline-flex; }
.hwseg .hw { border-radius: 0; margin-left: -1px; padding: 2px 7px; }
.hwseg .hw:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.hwseg .hw:last-child { border-radius: 0 6px 6px 0; }
.hwseg .hw[aria-pressed="true"] { background: color-mix(in srgb, var(--hc) 16%, var(--surface)); border-color: color-mix(in srgb, var(--hc) 60%, var(--line-strong)); font-weight: 650; position: relative; }
.home.editing .hcard { outline: 1px dashed var(--line-strong); outline-offset: 3px; }
.hchead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 24px; }
.hchead h2 { margin: 0; font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.hcount { font-size: 12.5px; font-weight: 600; color: var(--fg); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.hctl { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.hctl .iconbtn { width: 26px; height: 26px; font-size: 13px; border-color: var(--line); }
.hctl .iconbtn[disabled] { opacity: 0.35; cursor: default; }
.hctl .hrm:hover { color: var(--danger); border-color: var(--danger); }
.hempty { margin: 2px 0; color: var(--muted); font-size: 13.5px; }
.hmore { margin: 8px 0 0 10px; color: var(--muted); font-size: 12.5px; }
.hlist { display: flex; flex-direction: column; }
.hrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 9px; width: 100%; text-align: left; font: inherit;
  background: none; border: 0; border-radius: 8px; padding: 6px 8px; margin: 0 -8px; width: calc(100% + 16px); cursor: pointer; color: var(--fg); }
.hrow:hover, .hrow:focus-visible { background: var(--surface-2); }
.hrow .tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); }
.hrtext { display: flex; flex-direction: column; min-width: 0; }
.hrname { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrpath { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrst { font-size: 11px; padding: 1px 7px; border-radius: 4px; white-space: nowrap; }
.hrwhen { font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.hrwhen.late { color: var(--danger); font-weight: 600; }
.hacts { display: flex; flex-direction: column; gap: 8px; }
.hact { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 13.5px; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.hposts { display: flex; flex-direction: column; gap: 4px; }
.hpost { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; background: none; border: 0; border-radius: 8px; padding: 7px 8px; margin: 0 -8px; cursor: pointer; color: var(--fg); }
.hpost:hover, .hpost:focus-visible { background: var(--surface-2); }
.hpmeta { font-size: 12px; color: var(--muted); }
.hpmeta b { color: var(--fg); font-weight: 600; }
.hptext { font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.htime { display: flex; flex-direction: column; gap: 8px; }
.htrow { display: grid; grid-template-columns: minmax(80px, 38%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.htname { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htname .tdot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); flex: none; }
.htbar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.htbar > span { display: block; height: 100%; background: var(--tc); border-radius: 999px; opacity: 0.85; }
.htdur { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }
.hnote, .hnoteempty { display: block; width: 100%; text-align: left; font: inherit; background: none; border: 0; padding: 4px 0; cursor: text; color: var(--fg); }
.hnote span { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.hnoteempty { color: var(--muted); font-size: 13.5px; border: 1px dashed var(--line-strong); border-radius: 8px; padding: 12px; }
.hnoteempty:hover, .hnote:hover { background: var(--surface-2); border-radius: 8px; }
/* Each kind of card has its own colour (--hc): a band along its top, a border and a soft wash of it under the title,
   the title and count in it, and its rows taking a tint of it under the pointer. The title's colour is mixed with the
   text colour, so it reads deeper in light mode and lighter in dark mode. */
.hcard { --hc: var(--accent); }
.hcard.hc-today { --hc: #d2463c; } .hcard.hc-coming { --hc: #3769b8; } .hcard.hc-waiting { --hc: #d08700; } .hcard.hc-posts { --hc: #7b57c9; }
.hcard.hc-time { --hc: #2f8a55; } .hcard.hc-note { --hc: #c9a000; } .hcard.hc-image { --hc: #c2477f; }
.hcard.hc-calendar { --hc: #0f8b8d; } .hcard.hc-activity { --hc: #5560d0; } .hcard.hc-timer { --hc: #e0662b; } .hcard.hc-clock { --hc: #2b8fc9; }
.hcard { border-color: color-mix(in srgb, var(--hc) 30%, var(--line)); border-top: 4px solid var(--hc);
  background: linear-gradient(color-mix(in srgb, var(--hc) 9%, var(--surface)), var(--surface) 70px); }
.hchead h2 { color: color-mix(in srgb, var(--hc) 72%, var(--fg)); display: flex; align-items: center; gap: 8px; }
.hchead h2::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--hc); flex: none; }
.hcount { background: color-mix(in srgb, var(--hc) 16%, var(--surface)); color: color-mix(in srgb, var(--hc) 72%, var(--fg)); }
.hrow:hover, .hrow:focus-visible, .hpost:hover, .hpost:focus-visible, .hnoteempty:hover, .hnote:hover { background: color-mix(in srgb, var(--hc) 9%, var(--surface)); }
.hact { background: color-mix(in srgb, var(--hc) 8%, var(--surface)); }
.hempty { padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--hc) 6%, var(--surface)); }
.hnoteempty { border-color: color-mix(in srgb, var(--hc) 45%, var(--line-strong)); background: color-mix(in srgb, var(--hc) 5%, var(--surface)); }
.htbar { background: color-mix(in srgb, var(--hc) 10%, var(--surface-2)); }

/* a card's own switch in its title row (the Timer's and Clock's face) */
.hfacebtn { margin-left: auto; font: inherit; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--hc) 40%, var(--line)); background: var(--surface); color: color-mix(in srgb, var(--hc) 72%, var(--fg)); }
.hfacebtn:hover, .hfacebtn:focus-visible { background: color-mix(in srgb, var(--hc) 12%, var(--surface)); }

/* Calendar: the month, seven columns from Monday; today filled in the card's colour, the chosen day ringed; a dot per
   table under a day's number; past days faded, and a red number where something is late */
.hcalnav { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.hcalmonth { font-weight: 650; font-size: 14px; min-width: 120px; text-align: center; }
.hcaltoday { margin-left: auto; }
.hlink { font: inherit; font-size: 12.5px; border: 0; background: none; padding: 2px 0; color: color-mix(in srgb, var(--hc, var(--accent)) 75%, var(--fg)); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.hcalgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.hcalwd { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); text-align: center; padding-bottom: 2px; }
.hcalday { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 3px; border-radius: 8px; border: 1.5px solid transparent;
  background: color-mix(in srgb, var(--hc) 4%, var(--surface)); color: var(--fg); cursor: pointer; min-height: 36px; }
.hcalday:hover, .hcalday:focus-visible { background: color-mix(in srgb, var(--hc) 14%, var(--surface)); }
.hcalday.out { opacity: 0.4; }
.hcalday.past .hcaln { color: var(--muted); }
.hcalday.late .hcaln { color: var(--danger); font-weight: 650; }
.hcalday.today { background: var(--hc); }
.hcalday.today .hcaln { color: #fff; font-weight: 700; }
.hcalday.on { border-color: color-mix(in srgb, var(--hc) 80%, var(--fg)); }
.hcaln { font-size: 12.5px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hcaldots { display: flex; gap: 2px; height: 6px; }
.hcaldots i { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); }
.hcalday.today .hcaldots i { box-shadow: 0 0 0 1.5px #fff; }
.hcalsel { margin-top: 10px; border-top: 1px solid color-mix(in srgb, var(--hc) 25%, var(--line)); padding-top: 8px; }
.hcalselhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }

/* Recent activity: a timeline, a line down the left with a dot per change in its table's colour */
.halist { display: flex; flex-direction: column; position: relative; }
.haday { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: color-mix(in srgb, var(--hc) 70%, var(--fg)); margin: 8px 0 2px 22px; }
.haday:first-child { margin-top: 0; }
.haline { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: start; text-align: left; font: inherit; color: var(--fg);
  background: none; border: 0; border-radius: 8px; padding: 5px 8px; margin: 0 -8px; cursor: pointer; position: relative; }
.haline:disabled { cursor: default; }
.haline::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: color-mix(in srgb, var(--hc) 22%, var(--line)); }
.hadot { width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; background: var(--tc); border: 2px solid var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tc) 50%, transparent); position: relative; z-index: 1; }
.hatext { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.haname { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hawhat { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hawhat .val { font-size: 12px; }
.hawhat .kind-created { color: var(--st-done); font-weight: 600; }
.hawhat .kind-deleted { color: var(--danger); font-weight: 600; }
.hanote { font-weight: 600; color: color-mix(in srgb, var(--hc) 70%, var(--fg)); }
.hawhere { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hawhen { font-size: 11.5px; color: var(--muted); white-space: nowrap; padding-top: 2px; font-variant-numeric: tabular-nums; }

/* Timer and Clock faces: big numbers in the data font, or a dial with hands; the Timer's run of the current hour fills
   the dial in the card's colour, and the faces are faint while no timer runs */
.hface { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0 8px; }
.hdig { display: flex; align-items: baseline; gap: 2px; font-family: var(--font-data); font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--hc) 80%, var(--fg)); }
.hdigmain { font-size: 46px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.hdigsec { font-size: 22px; opacity: 0.7; }
.hdigsec::before { content: ":"; }
.hfacesub { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hfacesub:empty { display: none; }
.hdial { width: 150px; height: 150px; display: block; }
.hdial svg { width: 100%; height: 100%; display: block; }
.hdface { fill: color-mix(in srgb, var(--hc) 6%, var(--surface)); stroke: color-mix(in srgb, var(--hc) 55%, var(--line)); stroke-width: 2; }
.hdarc { fill: color-mix(in srgb, var(--hc) 22%, transparent); }
.hdt { stroke: color-mix(in srgb, var(--hc) 30%, var(--line-strong)); stroke-width: 1; stroke-linecap: round; }
.hdt.big { stroke: color-mix(in srgb, var(--hc) 60%, var(--fg)); stroke-width: 2.2; }
.hdh, .hdm { stroke: var(--fg); stroke-linecap: round; }
.hdh { stroke-width: 4; } .hdm { stroke-width: 2.6; }
.hds { stroke: var(--hc); stroke-width: 1.2; stroke-linecap: round; }
.hdpin { fill: var(--hc); stroke: var(--surface); stroke-width: 1; }
.hface.idle .hdig, .hface.idle .hdial { opacity: 0.35; }
.hface.idle .hds { display: none; }
.htwhat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: center; width: calc(100% + 16px); margin: 0 -8px; padding: 6px 8px; font: inherit; color: var(--fg);
  text-align: left; background: color-mix(in srgb, var(--tc) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); border-radius: 8px; cursor: pointer; }
.htwhat .tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--tc); }
.htidle { margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
.htbtns { display: flex; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.htbtns .btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htstop { border-color: color-mix(in srgb, var(--danger) 50%, var(--line-strong)); color: var(--danger); }
.htsq { width: 9px; height: 9px; border-radius: 2px; background: currentColor; }
.httri { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.hcard.hc-timer .htgo { background: var(--hc); border-color: var(--hc); color: #fff; }
.hnoteta { width: 100%; box-sizing: border-box; font: inherit; font-size: 14.5px; line-height: 1.5; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; resize: vertical; background: var(--surface); color: var(--fg); }
.hnotebar { display: flex; justify-content: flex-end; margin-top: 6px; }
.himg { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 8px; }
.hpick { display: flex; align-items: center; justify-content: center; min-height: 110px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.hpick:hover, .hpick:focus-within { background: var(--surface-2); color: var(--fg); }
.hfile { position: absolute; width: 1px; height: 1px; opacity: 0; }
.hadd { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 14px 16px 16px; }
.hadd h2 { margin: 0 0 10px; font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.haddlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.haddbtn { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; cursor: pointer; color: var(--fg); }
.haddbtn b { font-size: 13.5px; font-weight: 600; }
.haddbtn span { font-size: 12px; color: var(--muted); }
.haddbtn:hover:not([disabled]) { border-color: var(--accent); }
.haddbtn[disabled] { opacity: 0.45; cursor: default; }
/* the name in Home's greeting, which changes it (people.js keeps it) */
.hname, .hnameadd { font: inherit; color: inherit; background: none; border: 0; padding: 0 2px; margin: 0 -2px; border-radius: 6px; cursor: pointer; }
.hname:hover, .hname:focus-visible { background: var(--surface-2); }
.hpen { font-size: 14px; color: var(--muted); margin-left: 6px; opacity: 0; transition: opacity 120ms ease; vertical-align: 3px; }
.hname:hover .hpen, .hname:focus-visible .hpen { opacity: 1; }
.hnameadd { font-size: 15px; font-weight: 500; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; vertical-align: 2px; }
.hnameedit { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hnamerow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hnamelab { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.hnameedit .hnamein { font-size: 15px; font-weight: 500; padding: 5px 10px; width: 280px; }
.hcalladd { margin-top: 8px; }
.hlink { font: inherit; font-size: 12.5px; color: var(--accent); background: none; border: 0; padding: 0; margin-top: 8px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.hnamebtns { display: flex; gap: 6px; margin-top: 8px; }
.hnamein { font: inherit; font-size: 20px; font-weight: 600; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 8px; width: 240px; max-width: 100%; background: var(--surface); color: var(--fg); }
.hnamehint { margin: 0; font-size: 12.5px; color: var(--muted); }
.hcbody > .btn { margin-top: 8px; }

/* the Dashboard's Tables button and its popover (views.js): a chosen table's chip fills with the table's colour */
.dtpop { padding: 4px 4px 6px; max-width: 420px; }
.dtchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 6px; }
.dtpop .chip.tchip[aria-pressed="true"] { background: var(--tc); border-color: var(--tc); color: var(--tci, #fff); }
.dtpop .chip.tchip[aria-pressed="true"] .tdot { background: var(--tci, #fff); }
.dtnote { padding: 0 10px 4px; margin: 0; }

/* a label as wide as its widest choice (views.js fixedLabel): the others take the same cell, unseen */
.fixlab { display: inline-grid; white-space: nowrap; }
.fixlab > span { grid-area: 1 / 1; }
.fixw::before { content: attr(data-l); visibility: hidden; }
/* the controls stay on one line; a title bar holding them doesn't wrap either, the controls give way */
.sechead.with-ctls { flex-wrap: nowrap; }
.sechead.with-ctls .secctls { flex: 1 1 auto; min-width: 0; }
.sechead.with-ctls .secctls .ctls { width: 100%; }
.ctls > .vwset { margin-right: auto; }   /* the views by the title; the search and Customize view at the far right */
/* More: the controls that don't fit, in a dropdown under it, as they are in the bar */
.ctlmorewrap { position: relative; flex: none; display: inline-flex; }
.ctlmore { display: inline-flex; align-items: center; gap: 6px; }
.ctlmore.on, .ctlmore[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.ctlpanel { position: fixed; z-index: 25; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 6px 18px var(--shadow); }
.ctlpanel[hidden] { display: none; }
.ctlpanel .ctl.search { width: 220px; }
.ctls > *, .ctls .vwset > * { flex: none; }
.ctls .vwset { flex-wrap: nowrap; }
.ctls > .vwset, .ctls .vwset > .vwchips { flex: none; }   /* a narrow window wraps the groups of views, so Customize stays */
.sechead.with-ctls > :not(.secctls) { flex: none; white-space: nowrap; }
/* the title bar holding the controls rises over the rows below while the dropdown is open (under the top bar) */
.sechead:has(.ctlpanel:not([hidden])), .bar:has(.ctlpanel:not([hidden])) { z-index: 18; position: relative; }
.sechead:has(.ctlpanel:not([hidden])) { position: sticky; }

/* ---------- Rows: tints, hover and lift ----------
   Item rows carry a tint of their table's colour (--tc); every subitem row carries the same soft yellow (--tco, from
   --sub-tint), whatever its table, so items and subitems read apart. Across the whole row except the sticky ⋯ cell;
   ticked rows keep the selection colour. */
tr.item:not(.ticked) > td:not(.tdacts) { background-color: color-mix(in srgb, var(--tc, var(--accent)) 8%, var(--surface)); }
tr.sub { --tco: var(--sub-tint); }
/* on the Dashboard's Subitems only, where rows of several tables mix and no items set them apart, each takes its own
   table's colour, as its stripe does; inside a table they keep the yellow */
:root.ondash tr.sub.flat { --tco: var(--tc, var(--accent)); }
tr.sub:not(.ticked) > td:not(.tdacts) { background-color: color-mix(in srgb, var(--tco) 7%, var(--surface)); }
/* The row under the pointer takes a stronger wash of its colour, in every Items setting (under the lift's sheen). */
tr.item > td:not(.tdacts) { --hovc: color-mix(in srgb, var(--tc, var(--accent)) 10%, transparent); }
tr.sub > td:not(.tdacts) { --hovc: color-mix(in srgb, var(--tco) 9%, transparent); }
tr.item:hover > td:not(.tdacts), tr.sub:hover > td:not(.tdacts) { background-image: linear-gradient(var(--hovc), var(--hovc)); }

/* Raised (⋯ menu, Items): the item under the pointer (On hover, the default) or every item (Always) stands a little
   above its subitems, like a slab seen from slightly above: a light catch along its top edge and a lighter top half,
   its front face as a band in its colour along the bottom, then a soft shade on what lies below. A subitem under the
   pointer rises a little less (thinner edge, shorter fainter shade) with either setting.
   The whole row rises, its empty end too (not the sticky ⋯ cell). The shade is a strip hanging under each cell (a
   cell's own box-shadow is not drawn outside it in a collapsed table), so the cells are positioned. At rest they sit
   at level 0, under the subitem box that follows (which paints later), so a resting item never covers the box's edge;
   under the pointer they rise to level 2, over the next rows. Leaving, the shade fades out first and the cell drops
   back once it has gone (the delayed z-index). */
:root.lifthov tr.item > td:not(.tdacts), :root.lift tr.sub > td:not(.tdacts), :root.lifthov tr.sub > td:not(.tdacts) {
  position: relative; z-index: 0; transition: box-shadow .15s ease, z-index 0s linear .15s; }
:root.lift tr.item > td:not(.tdacts) { position: relative; z-index: 1; }
:root.lifthov tr.item:hover > td:not(.tdacts), :root.lift tr.sub:hover > td:not(.tdacts), :root.lifthov tr.sub:hover > td:not(.tdacts) {
  z-index: 2; transition: box-shadow .15s ease, z-index 0s; }
/* the top light and sheen */
:root.lift tr.item > td:not(.tdacts), :root.lifthov tr.item:hover > td:not(.tdacts),
:root.lift tr.sub:hover > td:not(.tdacts), :root.lifthov tr.sub:hover > td:not(.tdacts) { box-shadow: inset 0 1px 0 var(--lift-hi); }
:root.lift tr.item > td:first-child:not(.tdfill):not(.tdacts), :root.lifthov tr.item:hover > td:first-child:not(.tdfill):not(.tdacts),
:root.lift tr.sub.flat:hover > td:first-child:not(.tdfill):not(.tdacts), :root.lifthov tr.sub.flat:hover > td:first-child:not(.tdfill):not(.tdacts) {
  box-shadow: inset 3px 0 0 var(--tc, var(--accent)), inset 0 1px 0 var(--lift-hi); }
:root.lift tr.item > td:not(.tdacts) { background-image: linear-gradient(var(--lift-sheen), transparent 60%); }
:root.lift tr.item:hover > td:not(.tdacts), :root.lifthov tr.item:hover > td:not(.tdacts),
:root.lift tr.sub:hover > td:not(.tdacts), :root.lifthov tr.sub:hover > td:not(.tdacts) {
  background-image: linear-gradient(var(--lift-sheen), transparent 60%), linear-gradient(var(--hovc), var(--hovc)); }
/* the front edge and shade: there all along, shown by fading in */
:root.lift tr.item > td:not(.tdacts)::after, :root.lifthov tr.item > td:not(.tdacts)::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 11px; pointer-events: none; opacity: 0; transition: opacity .15s ease;
  background: linear-gradient(color-mix(in srgb, var(--tc, var(--accent)) 45%, var(--lift-face)) 0 3px, var(--lift) 3px, transparent); }
:root.lift tr.sub > td:not(.tdacts)::after, :root.lifthov tr.sub > td:not(.tdacts)::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; pointer-events: none; opacity: 0; transition: opacity .15s ease;
  background: linear-gradient(color-mix(in srgb, var(--tco) 40%, var(--lift-face)) 0 2px, var(--lift) 2px, transparent); }
:root.lift tr.item > td:not(.tdacts)::after, :root.lifthov tr.item:hover > td:not(.tdacts)::after { opacity: 1; }
:root.lift tr.sub:hover > td:not(.tdacts)::after, :root.lifthov tr.sub:hover > td:not(.tdacts)::after { opacity: .75; }
/* Wide draws each subitem box over the item rows (so its frame passes over the section's frame), which would hide the
   item's shade: there it is drawn at the top of the box instead, under the item's width (the box reaches 12px past the
   item on each side, less its border). */
:root.lift.subwide tr.item + tr.nest .nestbox, :root.lifthov.subwide tr.item + tr.nest .nestbox { position: relative; }
:root.lift.subwide tr.item + tr.nest .nestbox::before, :root.lifthov.subwide tr.item + tr.nest .nestbox::before { content: ""; position: absolute;
  left: 10.5px; right: 10.5px; top: 0; height: 11px; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .15s ease;
  background: linear-gradient(color-mix(in srgb, var(--tc, var(--accent)) 45%, var(--lift-face)) 0 3px, var(--lift) 3px, transparent); }
:root.lift.subwide tr.item + tr.nest .nestbox::before, :root.lifthov.subwide tr.item:hover + tr.nest .nestbox::before { opacity: 1; }

/* The values of a raised row sit in it as in wells: while a row is under the pointer (with either Raised setting), each
   value's box, empty ones too, sinks a little (a shade along its top, a light lip along its bottom), and the status and
   date pills look pressed in. Only the row's own cells: the subitem table inside an item's nest row is left alone. */
:root:is(.lift, .lifthov) :is(tr.item, tr.sub):hover > td :is(.cell:not(:focus), .selbtn, .dbtn.blank) {
  background-color: var(--well); box-shadow: inset 0 1px 2px var(--well-in), inset 0 -1px 0 var(--well-lip); }
:root:is(.lift, .lifthov) :is(tr.item, tr.sub):hover > td .cell.txt:not(:placeholder-shown):not(:focus) {
  box-shadow: inset 3px 0 0 var(--txtmark, var(--txt-mark)), inset 0 1px 2px var(--well-in), inset 0 -1px 0 var(--well-lip); }
:root:is(.lift, .lifthov) :is(tr.item, tr.sub):hover > td .cell.num:not(:placeholder-shown):not(:focus) {
  box-shadow: inset -3px 0 0 var(--num-mark), inset 0 1px 2px var(--well-in), inset 0 -1px 0 var(--well-lip); }
:root:is(.lift, .lifthov) :is(tr.item, tr.sub):hover > td :is(.sbtn:not(.none):not(.open), .dbtn:not(.blank)) {
  box-shadow: inset 0 1px 2px var(--well-pill), inset 0 -1px 0 var(--well-lip); }

/* The column-name rows (the items' dark one, the subitems' light one) answer the pointer the same way: a wash (lighter
   on the dark row), and with a lift setting the light top edge, the sheen and the shade over the row below. A name
   cell clips its text, so it lets its shade out only while hovered. */
.itemframe > table > thead > tr:hover > th { background-image: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)); }
table.subtable > thead > tr:hover > th { background-image: linear-gradient(color-mix(in srgb, var(--accent) 9%, transparent), color-mix(in srgb, var(--accent) 9%, transparent)); }
:root.lift thead > tr:hover > th, :root.lifthov thead > tr:hover > th { z-index: 3; overflow: visible; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
:root.lift .itemframe > table > thead > tr:hover > th, :root.lifthov .itemframe > table > thead > tr:hover > th {
  background-image: linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 60%); }
:root.lift table.subtable > thead > tr:hover > th, :root.lifthov table.subtable > thead > tr:hover > th {
  background-image: linear-gradient(var(--lift-sheen), transparent 60%), linear-gradient(color-mix(in srgb, var(--accent) 9%, transparent), color-mix(in srgb, var(--accent) 9%, transparent)); }
:root.lift .itemframe > table > thead > tr:hover > th::after, :root.lifthov .itemframe > table > thead > tr:hover > th::after,
:root.lift table.subtable > thead > tr:hover > th::after, :root.lifthov table.subtable > thead > tr:hover > th::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; pointer-events: none; animation: liftin .15s ease both;
  background: linear-gradient(color-mix(in srgb, var(--accent) 55%, var(--lift-face)) 0 2px, var(--lift) 2px, transparent); }
:root.lift .itemframe > table > thead > tr:hover > th::after, :root.lifthov .itemframe > table > thead > tr:hover > th::after {
  height: 11px; background: linear-gradient(color-mix(in srgb, var(--ihead) 55%, #000) 0 3px, var(--lift) 3px, transparent); }   /* the dark row's edge, darker still */
@keyframes liftin { from { opacity: 0; } }

/* ---------- Column lines: an item's in its table's colour, solid; a subitem's neutral and dashed, so the two kinds of
   row read apart where both show. Both 2px, bolder than the faint row lines. ---------- */
tr.item > td + td:not(.tdacts) { border-left: 2px solid color-mix(in srgb, var(--tc, var(--accent)) 55%, var(--line-strong)); }
tr.sub > td + td:not(.tdacts), table.subtable > thead > tr > th + th:not(.th-add) { border-left: 2px dashed var(--colline-sub); }

/* ---------- Link cells: the address reads as a link (underlined, in the accent), and ↗ at the left end opens it ---------- */
.cwrap.haslnk > .cell.lnk { padding-left: 22px; }
.cell.lnk:not(:placeholder-shown):not(:focus) { color: var(--accent); text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); border-color: transparent; }
.lnkgo { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); z-index: 1; width: 17px; height: 17px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 4px; color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 600; }
.lnkgo:hover, .lnkgo:focus-visible { background: var(--accent); color: var(--on-st); }

/* ---------- the archive (archive.js) ----------
   Opened from Archive in the ⋯ menu at the top. In archive mode the page goes quiet, a little faded and warm, like an old
   photograph, under a banner saying where you are; an item shown only because one of its subitems is archived is
   faint. Outside it, archived rows a view shows ("Show archived") are faded and marked. */
:root.archmode body { background: color-mix(in srgb, #b39a6b 10%, var(--bg)); }
:root.archmode #main, :root.archmode #tabs, :root.archmode #summary { filter: saturate(0.55) sepia(0.14); }
.archbar { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; padding: 10px 14px; border-radius: 10px;
  border: 1.5px dashed color-mix(in srgb, #8a6d3b 60%, var(--line-strong)); background: color-mix(in srgb, #b39a6b 14%, var(--surface)); color: var(--fg); }
.archbar-ic { color: #8a6d3b; display: flex; }
.archbar-ic svg { width: 22px; height: 22px; }
.archbar-t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; font-size: 13px; }
.archbar-t b { font-size: 14.5px; letter-spacing: 0.02em; }
.archbar-t span { color: var(--muted); }
:root.archmode tr.archctx > td { opacity: 0.45; }
:root.archmode tr.archctx > td:first-child .namebox::after { content: "not archived"; flex: none; font-size: 10.5px; font-weight: 600; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
tr.archrow > td:not(.tdacts) { opacity: 0.62; }
tr.archrow > td:first-child .namebox::after { content: "Archived"; flex: none; font-size: 10.5px; font-weight: 650; color: #8a6d3b;
  background: color-mix(in srgb, #b39a6b 18%, var(--surface)); border-radius: 4px; padding: 0 6px; margin-left: 4px; }
.fp-arch { display: flex; align-items: center; gap: 7px; font-size: 12.5px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); cursor: pointer; }
.rm-archnote { margin: 4px 10px; font-size: 12px; }
.kind-archived { color: #8a6d3b; font-weight: 600; }
.kind-restored { color: var(--st-done); font-weight: 600; }

/* ---------- walkthroughs (tour.js) ----------
   A layer over the page that lets clicks through. The dimming is the shadow of a hole around the first mark, kept
   under the menus and the Ask Claude panel (z-index 30), so they stay clear; the marks and the label go over all. */
/* the layer makes no stacking context of its own: the dimming stays under the menus (30), the marks and the label go
   over them */
.tour { pointer-events: none; }
.tour-dim { position: fixed; z-index: 26; pointer-events: none; border-radius: 10px; box-shadow: 0 0 0 200vmax rgba(12, 18, 24, 0.42); transition: all .25s ease; }
.tour-mark { position: fixed; z-index: 65; pointer-events: none; box-sizing: border-box; transition: all .25s ease; }
.tour-frame { border: 3px solid var(--accent); border-radius: 10px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent), 0 0 22px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: tourpulse 1.6s ease-in-out infinite; }
.tour-circle { border: 3px solid #e0662b; border-radius: 50%; box-shadow: 0 0 16px color-mix(in srgb, #e0662b 55%, transparent); animation: tourpulse 1.6s ease-in-out infinite; }
.tour-underline { height: 4px; border-radius: 3px; background: #e0662b; box-shadow: 0 0 10px color-mix(in srgb, #e0662b 60%, transparent); }
@keyframes tourpulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 30px color-mix(in srgb, var(--accent) 45%, transparent); } }
@media (prefers-reduced-motion: reduce) { .tour-frame, .tour-circle, .tour-frame.tour-do { animation: none; } .tour-dim, .tour-mark { transition: none; } }
.tour-num { position: absolute; top: -11px; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.tour-circle .tour-num { background: #e0662b; top: 0; left: 0; }
.tour-bub { position: fixed; z-index: 66; pointer-events: auto; box-sizing: border-box; padding: 12px 14px 10px; border-radius: 12px; background: var(--surface); color: var(--fg);
  border: 2px solid var(--accent); box-shadow: 0 14px 40px rgba(12, 18, 24, 0.35); font-size: 13.5px; line-height: 1.45; }
.tour-bub::before { content: ""; position: absolute; width: 12px; height: 12px; background: var(--surface); border: 2px solid var(--accent); transform: rotate(45deg); }
.tour-bub.at-below::before { top: -8px; left: calc(var(--ax, 50%) - 7px); border-right: 0; border-bottom: 0; }
.tour-bub.at-above::before { bottom: -8px; left: calc(var(--ax, 50%) - 7px); border-left: 0; border-top: 0; }
.tour-bub.at-right::before { left: -8px; top: 16px; border-right: 0; border-top: 0; }
.tour-bub.at-left::before { right: -8px; top: 16px; border-left: 0; border-bottom: 0; }
.tour-bub.at-center::before { display: none; }
.tour-text p { margin: 0 0 4px; }
.tour-miss { margin: 4px 0 0; color: var(--muted); font-style: italic; font-size: 12.5px; }
/* a click step: the person clicks the target, the frame pulses in the click colour */
.tour-frame.tour-do { border-color: #e0662b; box-shadow: 0 0 0 4px color-mix(in srgb, #e0662b 28%, transparent), 0 0 22px color-mix(in srgb, #e0662b 55%, transparent); animation: tourdo 1.2s ease-in-out infinite; }
@keyframes tourdo { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, #e0662b 14%, transparent), 0 0 30px color-mix(in srgb, #e0662b 50%, transparent); } }
.tour-hint { margin: 2px 0 0; color: #c2551f; font-weight: 600; font-size: 12.5px; }
:root[data-theme="dark"] .tour-hint { color: #f08a52; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tour-hint { color: #f08a52; } }
#tour-ask { margin-top: 6px; }
.tour-chg { margin: 2px 0 6px; padding-left: 18px; font-size: 13px; }
.tour-chg li { margin: 1px 0; }
@media (prefers-reduced-motion: reduce) { .tour-frame.tour-do { animation: none; } }
.tour-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.tour-pos { flex: 1; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tour-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 4px; }
.tour-x:hover { color: var(--fg); background: var(--surface-2); }
.chat-show { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

/* ---------- the views as tabs on the table (saved.js, views.js) ----------
   The first title bar loses its space below: the views stand on the table's top edge, rounded on top, and the one on
   screen is outlined in its colour and raised a little, like an open folder's tab. The title and its count stand on
   the same edge, so the two read as one. The search and Customize view sit apart, in a box of their own, centred on
   the bar. */
.sechead.with-ctls { align-items: flex-end; padding-top: 8px; padding-bottom: 0; }
.sechead.with-ctls .grptitle { padding-bottom: 5px; }
.sechead.with-ctls .secctls { align-self: stretch; display: flex; align-items: flex-end; }
.ctls { align-items: flex-end; }
.ctls > .vwset { border: 0; border-radius: 0; padding: 0; background: none; align-self: flex-end; }
.vwcase { padding: 0 3px; border-radius: 0; gap: 2px; justify-content: flex-end; }
.vwcase + .vwcase { border-left: 0; margin-left: 12px; }
.vwcase.cur { background: none; }
.vwtabs { gap: 2px; align-items: flex-end; }
.vtab { height: 25px; border-radius: 8px 8px 0 0; border-bottom: 0; box-shadow: inset 0 1px 0 var(--glass-hi); }
.vtab::before { border-radius: 7px 7px 2px 2px; }
.vtab[aria-pressed="true"] { height: 29px; padding-bottom: 2px; z-index: 1;
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 0 5px color-mix(in srgb, var(--glass-lit) 45%, transparent), 0 -2px 8px color-mix(in srgb, var(--vc) 28%, transparent); }
.vtab .vwdot { top: 2px; right: 2px; }
.vtab.vwplus, .vtab.vfmore { height: 25px; border-radius: 6px 6px 0 0; }
.vwcap { padding-left: 4px; }
.ctlright { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 3px; margin-left: 16px;
  background: color-mix(in srgb, var(--fg) 4%, transparent); border: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent); border-radius: calc(var(--radius) + 3px); }
.ctlright #flt-q { height: 34px; }   /* taller than other controls: easier to hit, using the room above them in the bar */
.vwtabs { height: 29px; }   /* every group as tall as a raised tab, so their labels line up */
.sechead.with-ctls .seccaret { align-self: flex-end; margin-bottom: 21px; }   /* beside the title, not its count */
.vfmorepop .vtab { height: 24px; border-radius: 7px; border-bottom: 1px solid color-mix(in srgb, var(--vc) 20%, transparent); }   /* in More's list, whole labels, not tabs */
.ctls.tight .ctlright { margin-left: 8px; }
.sechead.with-ctls.stack.plainhead .grptitle { width: auto; }   /* narrow, no title: only the count takes room */

/* ---------- the views in a frame of their own (saved.js fitViews) ----------
   The views get their own place on the bar, between the title and the search: a frame open at the bottom, so it
   stands on the table like the tabs inside it. Its three parts, one per case, share the room, each centred in its
   part, so they sit evenly spaced. A part with more views is wider and the others give way. While fitViews measures,
   the frame and its parts take only the room they need (.fitting). */
.ctls > .vwset { flex: 1 0 auto; margin-right: 0; padding: 0 4px; align-self: stretch; display: flex; align-items: stretch;
  border: 1px solid color-mix(in srgb, var(--line-strong) 75%, transparent); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--fg) 4%, transparent), color-mix(in srgb, var(--fg) 1.5%, transparent)); }
.ctls .vwset > .vwchips { flex: 1 0 auto; display: flex; align-items: stretch; }
.vwset .vwcase { flex: 1 0 auto; align-items: center; justify-content: flex-end; padding: 5px 10px 0; margin-left: 0; }
.vwset .vwcase:first-child { padding-left: 10px; }
.vwset .vwcase + .vwcase { margin-left: 0; border-left: 0; position: relative; }
.vwset .vwcase + .vwcase::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px;
  background: color-mix(in srgb, var(--line-strong) 70%, transparent); }
.vwset .vwcap { padding-left: 0; }
.vwset.fitting, .vwset.fitting > .vwchips, .vwset.fitting .vwcase { flex: none; }
.ctls.tight > .vwset .vwcase { padding: 5px 6px 0; }
.ctls.tight > .vwset .vwcase:first-child { padding-left: 6px; }

/* ---------- the views by case colour, with one + (saved.js viewChips, newViewPop) ----------
   No captions now: a case's Main view carries its name, and its views share its colour. The frame is only as tall
   as the tabs. */
.vwset .vwcase { padding-top: 6px; }
.vwset .vwcase + .vwcase::before { top: 9px; bottom: 6px; }
.vwset .vwplus { align-self: flex-end; flex: none; margin: 0 4px 0 2px; }
.vwnewpop { min-width: 260px; }
.vwnew-q { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.vwkinds { display: flex; gap: 4px; flex-wrap: wrap; }
.vwnewpop .vtab { height: 26px; border-radius: 7px; border-bottom: 1px solid color-mix(in srgb, var(--vc) 20%, transparent); }
.vwnewpop .vtab[aria-pressed="true"] { height: 26px; padding-bottom: 0; }
.vwnew-row { display: flex; gap: 6px; margin-top: 8px; }
.vwnew-row .vwnewin { flex: 1 1 auto; min-width: 0; width: auto; height: 28px; border-color: color-mix(in srgb, var(--vc) 55%, var(--line-strong)); }
.vwset .vwcase, .vwset .vwcase:first-child { padding-left: 6px; padding-right: 6px; }   /* the case names make the groups wider: less space around them */
.ctls.tight > .vwset .vwcase, .ctls.tight > .vwset .vwcase:first-child { padding-left: 4px; padding-right: 4px; }
/* the tight row changes only the views: Customize and its gap keep their size, so going to another view never moves them */
.ctls.tight .adjpill .adjbtn { width: 76px; }
.ctls.tight .ctlright { margin-left: 16px; }

/* ---------- the title bar in regions (views.js secHead, groupHead; saved.js viewChips) ----------
   The bar that holds the controls is in up to three regions side by side, a small gap between them, each with its own
   tint and frame, open at the bottom so it stands on the table: the section's name (left out when the rows have no
   sections), the views, and at the far right the search and Customize. The views region is left aligned and only as
   wide as its tabs, so it grows to the right as views are added. Inside it the groups of views (one per case) touch,
   each tinted in its case's colour with a line between them, and the tabs of a group run on without gaps. The + stands
   a little apart, for all the groups together. */
.sechead.with-ctls { gap: 6px; }
.sechead.with-ctls:not(.plainhead) .grptitle { width: auto; min-width: 110px; max-width: 280px; align-self: stretch; justify-content: flex-end;
  padding: 6px 12px 5px; border: 1px solid color-mix(in srgb, var(--line-strong) 75%, transparent); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--tc) 9%, transparent), color-mix(in srgb, var(--tc) 3%, transparent)); }
.sechead.with-ctls.stack:not(.plainhead) .grptitle { width: auto; max-width: 180px; }
.sechead.with-ctls:not(.plainhead) .seccaret { margin-right: -2px; }
.sechead.with-ctls.plainhead .grptitle, .sechead.with-ctls.plainhead .seccaret { display: none; }
.sechead.with-ctls .secctls { margin-left: 0; }
.ctls > .vwset { flex: 0 1 auto; padding: 0; margin-right: auto; }
.ctls .vwset > .vwchips { flex: none; }
.vwset .vwcase, .vwset .vwcase:first-child, .ctls.tight > .vwset .vwcase, .ctls.tight > .vwset .vwcase:first-child { flex: none; padding: 6px 6px 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--vc) 11%, transparent), color-mix(in srgb, var(--vc) 4%, transparent)); }
.vwset .vwcase:first-child { border-top-left-radius: 9px; }
.vwset .vwcase + .vwcase::before { top: 0; bottom: 0; background: color-mix(in srgb, var(--line-strong) 85%, transparent); }
.vwset .vwtabs { gap: 0; }
.vwset .vwtabs > .vtab + .vtab { margin-left: -1px; }   /* neighbouring tabs share their edge */
.vwset .vwplus { margin: 0 6px 0 12px; }

/* ---------- folders, in a bar down the left (folders.js) ----------
   The bar holds All and the folders, + New folder, and at its foot the switch that lists the tables there instead of
   at the top. With the tables on the left (:root.sidetabs) the top bar itself becomes the bar: the logo, its buttons
   in a row (.sidetools), the places as four icons, then each folder with its tables under it. Only the tree scrolls,
   so the ⋯ menu above it is never cut off. */
:root { --sidew: 192px; }
body { padding-left: var(--sidew); }
@media (max-width: 900px) { :root { --sidew: 150px; } }
.side, :root.sidetabs header.top { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidew); z-index: 19; display: flex; flex-direction: column; gap: 2px;
  padding: 16px 10px 12px; background: color-mix(in srgb, var(--fg) 3%, var(--bg)); border-right: 1px solid var(--line); }
.side { overflow-y: auto; }
.side[hidden] { display: none; }
.fhead { font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 2px 8px 6px; }
.frow { --fc: var(--muted); font: inherit; font-size: 13.5px; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 5px 8px;
  border: 1px solid transparent; border-radius: 8px; background: none; color: var(--fg); cursor: pointer; text-align: left; flex: none; }
.frow:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.frow.sel { background: color-mix(in srgb, var(--fc) 22%, var(--surface)); border-color: color-mix(in srgb, var(--fc) 65%, transparent);
  box-shadow: inset 3px 0 0 var(--fc); font-weight: 650; }
.frow.sel .ficon svg { fill: color-mix(in srgb, var(--fc) 30%, transparent); }
.frow.sel[aria-expanded="true"] { border-color: var(--fc); }
.frow.fall { --fc: var(--accent); }
.frow .fpin { display: inline-flex; flex: none; color: var(--muted); margin-left: -4px; }
.fmenupop .mitem[role="menuitemcheckbox"] { display: flex; align-items: center; gap: 6px; }
.fmcheck { display: inline-block; width: 14px; flex: none; color: var(--accent); font-weight: 700; }
.frow .ficon { color: var(--fc); display: inline-flex; flex: none; }
.frow .fname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .fcnt { flex: none; font-size: 11.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.frow.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
input.frow.fname-in { cursor: text; background: var(--surface); border-color: var(--accent); outline: none; }
.fnew, .sidetoggle { font: inherit; font-size: 12.5px; text-align: left; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; gap: 8px; flex: none; }
.fnew:hover, .sidetoggle:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.fnew[aria-expanded="true"] { color: var(--fg); background: var(--surface-2); }
.fgrow { flex: 1 1 auto; min-height: 12px; }
.sidetoggle { margin-top: 4px; }
.sidetoggle .ficon { display: inline-flex; }
.fpsub { font-size: 11px; color: var(--muted); flex-basis: 100%; margin-top: 4px; }
.fpick { margin-bottom: 4px; }
.libfolders { margin: 0 0 12px; }
.tabwrap.dragging { opacity: 0.4; }

/* the top bar as the bar on the left */
:root.sidetabs header.top { margin: 0; align-items: stretch; flex-wrap: nowrap; gap: 0; border-bottom: 0; }
:root.sidetabs header.top::before, :root.sidetabs header.top::after { display: none; }
:root.sidetabs header.top > .wblogo { align-self: flex-start; border-right: 0; margin: 0 0 10px 6px; padding-right: 0; }
:root.sidetabs header.top > .wblogo.on::after { right: 0; }
.sidetools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 0 0 10px; margin-bottom: 8px; border-bottom: 1px solid var(--line); flex: none; }
.sidetools > * { flex: none; margin: 0 !important; padding: 0 !important; }
.sidetools .backup { margin-left: auto !important; }
.sidetools .backup .moremenu { left: 0; right: auto; }
:root.sidetabs header.top .tabs.tree { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; overflow-x: hidden; overflow-y: auto; border: 0; margin: 0 -4px; padding: 0 4px; }
.tabs.tree > * { flex: none; }
.tabs.tree .splaces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-bottom: 12px; }
.tabs.tree .tab.icontab { margin: 0; padding: 7px 0; border-bottom: 0; border-radius: 8px; justify-content: center; }
.tabs.tree .tab.icontab:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.tabs.tree .tab.icontab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.tabs.tree .tab.icontab:first-child .tablab { left: 50%; transform: translateX(-50%); }
.tabs.tree .fgroup { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; }
.tabs.tree .ftables { display: flex; flex-direction: column; gap: 1px; margin-left: 15px; padding-left: 6px; border-left: 1px solid color-mix(in srgb, var(--fc, var(--line-strong)) 40%, var(--line)); }
.tabs.tree .tabwrap { display: flex; border-bottom: 0; margin: 0; border-radius: 7px; }
.tabs.tree .tabwrap::before { display: none; }
.tabs.tree .tabwrap .tab { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 7px; text-align: left; padding: 5px 8px; font-size: 13px; border-radius: 7px; }
.tabs.tree .tabwrap .tab .ttname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs.tree .tabwrap:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.tabs.tree .tabwrap.sel { background: color-mix(in srgb, var(--tc) 14%, var(--surface)); }
.tabs.tree .tabwrap.sel .tab { font-weight: 600; }
.tabs.tree .tabwrap.open { box-shadow: inset 0 0 0 1px var(--line-strong); }
.tabs.tree .ttab.editing { padding: 3px 6px; }
.tabs.tree .ttab.editing .tabname { width: 100%; min-width: 0; }
.tabs.tree .sfoot { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }

/* the open folder's colour behind the bar: the tables, the places and the buttons, not the logo (folders.js) */
header.top > .fband { display: none; }
:root.fhue:not(.sidetabs) header.top > .fband { display: block; position: absolute; z-index: -1; top: 1px; bottom: 0; left: var(--fbl, 0px); right: 0; pointer-events: none;
  border-radius: 12px 12px 0 0; border: 1px solid color-mix(in srgb, var(--fh) 30%, transparent); border-bottom: 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--fh) 16%, var(--bg)), color-mix(in srgb, var(--fh) 8%, var(--bg))); }
:root.fhue:not(.sidetabs) header.top > .undo { margin-left: calc(var(--tb-undo-l) + 6px); }
:root.fhue:not(.sidetabs) header.top > .backup { margin-right: 6px; }
:root.fhue.sidetabs .sidetools { background: color-mix(in srgb, var(--fh) 13%, transparent); border: 1px solid color-mix(in srgb, var(--fh) 30%, transparent);
  border-radius: 10px; padding: 3px 4px !important; }
/* with the tables on the left: the clock at the top right, level with the logo; it grows leftwards */
:root.sidetabs header.top > #timebtn { position: absolute; top: 16px; right: 10px; height: 30px; margin: 0; padding: 0; border-right: 0; transition: none; }
:root.sidetabs header.top > #timebtn .tmwhat { left: auto; right: 0; transform: none; top: calc(100% + 2px); bottom: auto; max-width: calc(var(--sidew) - 24px); text-align: right; }
:root.sidetabs header.top > .wblogo { margin-bottom: 15px; }
/* each folder in the list: its own colour behind it while unfolded, its places first, then its tables */
.tabs.tree .sposts { margin-bottom: 10px; }
.tabs.tree .sposts.sel { --fc: var(--accent); }
.tabs.tree .fgroup.open { background: color-mix(in srgb, var(--fc) 7%, transparent); border-radius: 10px; padding-bottom: 4px; }
.tabs.tree .fgroup.open > .frow:not(.sel) { border-radius: 10px 10px 8px 8px; }
.tabs.tree .ftables { border-left-color: color-mix(in srgb, var(--fc) 45%, var(--line)); }
.tabs.tree .fplaces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 2px 4px 3px 0; padding-bottom: 3px; border-bottom: 1px dashed color-mix(in srgb, var(--fc) 30%, var(--line)); }
.tabs.tree .fplaces .tab.icontab { padding: 5px 0; color: color-mix(in srgb, var(--fc) 70%, var(--fg)); }
.tabs.tree .fplaces .tab.icontab[aria-selected="true"] { background: color-mix(in srgb, var(--fc) 22%, var(--surface)); color: var(--fc); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fc) 50%, transparent); }
.tabs.tree .fplaces .tab.icontab:first-child .tablab { left: 50%; transform: translateX(-50%); }
.tabs.tree .fgroup .tabwrap:not(.sel):hover { background: color-mix(in srgb, var(--fc) 12%, transparent); }

/* ---------- the title bar as one group, lower (views.js secHead, groupHead; saved.js viewChips) ----------
   The name and the views read as one group: the name first, on a block of its own colour with light (or dark) text,
   always as wide, so going from view to view never moves the tabs; the views join it on the right. Every view has a
   name block: a view without sections says what its rows are (All items). No count here, the total is at the bottom
   right. The bar is lower: less room above the tabs (the tabs themselves keep their size) and a lower search box. */
.sechead.with-ctls { gap: 0; padding-top: 4px; }
.sechead.with-ctls .seccaret { margin: 0 3px 5px 0 !important; align-self: flex-end; }
.sechead.with-ctls .seccount { display: none; }
.sechead.with-ctls .grptitle, .sechead.with-ctls:not(.plainhead) .grptitle, .sechead.with-ctls.stack:not(.plainhead) .grptitle, .sechead.with-ctls.stack.plainhead .grptitle {
  display: flex; width: 124px; min-width: 0; max-width: none; align-self: stretch; justify-content: center; padding: 0 8px 0 10px; gap: 0;
  border: 0; border-radius: 10px 0 0 0; background: var(--tc, var(--accent)); color: var(--tci, #fff); }
.sechead.with-ctls.stack .grptitle { width: 104px !important; }
.sechead.with-ctls .grptitle:has(input.secname) { width: auto !important; min-width: 124px; }
.sechead.with-ctls.plainhead .grpline { display: inline-flex; }
.sechead.with-ctls .grpline { height: auto; max-width: 100%; }
.sechead.with-ctls .grplabel, .sechead.with-ctls button.secname { color: var(--tci, #fff); font-size: 14px; font-weight: 650; }
.sechead.with-ctls .grplabel.pill { background: none !important; border: 0; box-shadow: none; padding: 0; }
.sechead.with-ctls .grplabel .tdot { background: var(--tci, #fff); }
.sechead.with-ctls button.secname { padding: 1px 5px; margin-left: -6px; max-width: calc(100% + 6px); border-color: transparent; }
.sechead.with-ctls button.secname:hover, .sechead.with-ctls button.secname.open { border-color: color-mix(in srgb, var(--tci, #fff) 55%, transparent); }
.sechead.with-ctls .tabletag { opacity: 0.9; }
/* the views, joined to the name */
.sechead.with-ctls .ctls > .vwset { border-left: 0; border-top-left-radius: 0; }
.sechead.with-ctls .vwset .vwcase:first-child { border-top-left-radius: 0; }
.vwset .vwcase, .vwset .vwcase:first-child, .ctls.tight > .vwset .vwcase, .ctls.tight > .vwset .vwcase:first-child { padding-top: 2px; }
.vwset .vwtabs { height: 27px; }
.vtab[aria-pressed="true"] { height: 27px; padding-bottom: 0; }
/* a lower search and Customize */
.ctlright { padding: 2px; }
.ctlright #flt-q { height: 28px; }
.ctlright .adjpill { height: 28px; }
.sechead.with-ctls.plainhead .grptitle { display: flex; }
.sechead.with-ctls.plainhead .seccaret { display: inline-flex; visibility: hidden; }   /* nothing to fold, but its room kept, so the name block stays put */
.ctls > .vwset { flex: none; }   /* never squeezed: fitViews sees its real width and puts what does not fit under More */

/* ---------- the clock in the bar on the left (timer.js renderTimeBtn) ----------
   The clock stays where it is when the pointer comes over it: the ▾ comes in on its left and the ▶ (or a running
   timer's ■) out to its right, into the bar's margin, neither moving it. While a timer runs the clock face slides out
   behind the button's left edge, leaving the time, so the button stays clear of the logo. */
:root.sidetabs header.top > #timebtn { right: 26px; }
:root.sidetabs #timebtn .tmsplit { position: relative; }
:root.sidetabs #timebtn .tmarrow { position: absolute; top: 0; right: 100%; }
:root.sidetabs #timebtn .tmright { position: absolute; top: 0; left: 100%; }
:root.sidetabs #timebtn .timebtn.running { overflow: hidden; }
:root.sidetabs #timebtn .timebtn.running > svg { flex: none; margin-left: -24px; opacity: 0; }
:root.sidetabs #timebtn .timebtn.running.opening > svg { animation: tmfaceout 380ms cubic-bezier(0.4, 0, 0.2, 1) both; }
:root.sidetabs #timebtn .timebtn.running.closing > svg { animation: tmfaceout 380ms cubic-bezier(0.4, 0, 0.2, 1) reverse both; }
:root.sidetabs #timebtn .timestop.opening, :root.sidetabs #timebtn .timestop.closing { animation: none; }
:root.sidetabs header.top > #timebtn .tmwhat { right: -20px; }
@keyframes tmfaceout { from { margin-left: 0; opacity: 1; } to { margin-left: -24px; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { :root.sidetabs #timebtn .timebtn > svg { animation-duration: 1ms !important; } }
.ctls > .vwset { display: flex; }
.ctls .vwset > .vwchips { flex: 1 0 auto; }
.ctls .vwset.fitting > .vwchips { flex: none; }
.vwset .vwchips > .vwcase:last-of-type { margin-right: 12px; }
.vwset .vwplus { margin: 0 6px 0 auto; }   /* at the frame's right end, for all the groups, and never moving */

/* ---------- v284: the round Posts and Chat buttons at the bottom right, and the chat window (talk.js) ---------- */
.fab { position: fixed; right: calc(18px + var(--dockr, 0px)); bottom: 18px; z-index: 22; display: flex; flex-direction: column; gap: 10px; }
.fabbtn { position: relative; width: 46px; height: 46px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: var(--accent); color: #fff; cursor: pointer;   /* v287: solid, so they stand out */
  box-shadow: 0 4px 14px var(--shadow), 0 1px 3px var(--shadow); transition: transform 120ms ease, background 120ms ease; }
.fabbtn:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--accent) 85%, #000); }
.fabbtn.on { background: color-mix(in srgb, var(--accent) 70%, #000); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85), 0 4px 14px var(--shadow), 0 1px 3px var(--shadow); }
.fabbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fabbtn .fabic { display: inline-flex; }
.fabbtn .fabic svg { width: 22px; height: 22px; }
.fabn { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; box-sizing: border-box;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
body:has(.drawer) .fab, body:has(.drawer) .talkwin, body:has(.repwin) .fab { display: none; }
body:has(.selbar) .fab { bottom: 74px; }
@media print { .fab, .talkwin { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .fabbtn { transition: none; } }

.talkwin { position: fixed; right: calc(18px + var(--dockr, 0px)); bottom: 76px; z-index: 23; width: min(360px, calc(100vw - 36px)); height: min(480px, calc(100vh - 140px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 14px 40px var(--shadow), 0 2px 6px var(--shadow); overflow: hidden; }
body:has(.selbar) .talkwin { margin-bottom: 56px; }
.talkhead { display: flex; align-items: center; gap: 8px; padding: 10px 10px 9px 14px; border-bottom: 1px solid var(--line); }
.talktitle { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.talktitle h2 { margin: 0; font-size: 15px; }
.talktitle .dnote { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talkx { width: 26px; height: 26px; padding: 0; border-radius: 50%; }
.talklist { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.talkempty { margin: auto 8px; text-align: center; }
.talkday { align-self: center; margin: 8px 0 4px; padding: 1px 8px; border-radius: 9px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); }
.tmsg { position: relative; display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; margin-top: 6px; }
.tmsg.cont { margin-top: 0; }
.tmsg.mine { align-self: flex-end; align-items: flex-end; }
.tmsg .talkwho { margin: 0 0 2px 2px; font-size: 12px; }
.tbub { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 8px; padding: 5px 10px 4px; border-radius: 14px; background: var(--surface-2);
  border: 1px solid var(--line); overflow-wrap: anywhere; }
.tmsg.mine .tbub { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.tmsg.mine .tbub a { color: inherit; }
.tbub .postbody { margin: 0; white-space: pre-wrap; font-size: 13.5px; line-height: 1.35; }
.twhen { margin-left: auto; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tmsg.mine .twhen { color: color-mix(in srgb, var(--surface) 75%, transparent); }
.tdel { position: absolute; top: 50%; transform: translateY(-50%); right: calc(100% + 2px); width: 22px; height: 22px; padding: 0; border-radius: 50%; opacity: 0; }
.tmsg:not(.mine) .tdel { right: auto; left: calc(100% + 2px); }
.tmsg:hover .tdel, .tdel:focus-visible { opacity: 1; }
.talkfoot { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px 10px; border-top: 1px solid var(--line); }
.talktext { flex: 1; min-height: 34px; max-height: 120px; resize: none; padding: 7px 10px; border-radius: 17px; font: inherit; font-size: 13.5px; line-height: 1.35; }
.talksend { flex: none; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 0; background: var(--accent); color: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.talksend span { display: inline-flex; }
.talksend[disabled] { background: var(--line-strong); cursor: default; }

/* v284: the left-bar clock reacts as soon as the pointer reaches where ▾ and ▶ appear, so ▶ is clicked straight away */
:root.sidetabs #timebtn .tmarrow { width: 14px; transition: opacity 150ms ease; }
:root.sidetabs header.top > #timebtn .tmright:not(.timestop) { width: 20px; transition: opacity 150ms ease; }

/* v284: every section's title bar looks like the first one's: its name on a block of the section's colour with light
   (or dark) text, always as wide, no count. The first one's views sit beside it; the others' have a line in the
   section's colour along their foot instead, so the block still stands on something. */
.sechead:not(.with-ctls) { align-items: flex-end; gap: 0; padding-bottom: 0; }
.sechead:not(.with-ctls) .seccaret { margin: 0 3px 4px 0; align-self: flex-end; }
.sechead:not(.with-ctls) .seccount { display: none; }
.sechead:not(.with-ctls) .grptitle { display: flex; flex-direction: row; align-items: center; justify-content: center; width: 124px; height: 31px; box-sizing: border-box;
  padding: 0 8px 0 10px; gap: 0; border-radius: 10px 0 0 0; background: var(--tc, var(--accent)); color: var(--tci, #fff); }
.sechead.stack:not(.with-ctls) .grptitle { width: 104px; }
.sechead:not(.with-ctls) .grptitle:has(input.secname) { width: auto; min-width: 124px; }
.sechead:not(.with-ctls) .grpline { min-width: 0; max-width: 100%; height: auto; }
.sechead:not(.with-ctls) .grpline > * { min-width: 0; }
.sechead:not(.with-ctls) .grplabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.sechead:not(.with-ctls) .grplabel, .sechead:not(.with-ctls) button.secname { color: var(--tci, #fff); font-size: 14px; font-weight: 650; }
.sechead:not(.with-ctls) .grplabel.pill { background: none !important; border: 0; box-shadow: none; padding: 0; }
.sechead:not(.with-ctls) .grplabel .tdot { background: var(--tci, #fff); }
.sechead:not(.with-ctls) button.secname { padding: 1px 5px; margin-left: -6px; max-width: calc(100% + 6px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-color: transparent; }
.sechead:not(.with-ctls) button.secname:hover, .sechead:not(.with-ctls) button.secname.open { border-color: color-mix(in srgb, var(--tci, #fff) 55%, transparent); }
.sechead:not(.with-ctls) .tabletag { opacity: 0.9; }
.sechead:not(.with-ctls)::after { content: ""; flex: 1 1 auto; align-self: flex-end; height: 2px; background: color-mix(in srgb, var(--tc, var(--accent)) 55%, transparent); }
/* v284: the number of items (or subitems) in a grid, beside the name column's title, like an item's subitem count */
.thin.thname .hcount { margin-left: 6px; padding: 0 6px; border-radius: 8px; font-size: 10.5px; font-weight: 650; letter-spacing: 0; text-transform: none;
  color: inherit; background: color-mix(in srgb, currentColor 16%, transparent); border-color: color-mix(in srgb, currentColor 35%, transparent); }
/* v285: the left bar's buttons: ⋯ on the left, undo, redo and the robot on the right */
.sidetools .backup { margin-left: 0 !important; margin-right: auto !important; order: -1; }
/* v285: Posts left of Chat, in a row */
.fab { flex-direction: row; }
/* v285: while another section's name is pinned in the first bar, the first one's own name stays hidden (the name
   block's display: flex above outweighed the older rule) */
.sechead.pinned > .swapout, .sechead.with-ctls.pinned > .grptitle.swapout, .sechead.with-ctls.pinned > .seccaret.swapout { display: none !important; }

/* ---------- v286: Calm colours (⋯ > Colours, backup.js setColorMode) ----------
   Colour means data (the statuses) plus one identity colour, the table's. The views go grey, the folder's colour stays
   in the left bar, teal is left to actions. Sections take shades of the table's colour (store.js sectionColor). */
/* v287: the column names in the colour of the section's name beside them (--shc, set by views.js), the subitems'
   names a light shade of it. The rows keep Lively's tints. */
:root.calm { --ihead0: #4b565e; }
@media (prefers-color-scheme: dark) { :root.calm:not([data-theme="light"]) { --ihead0: #2e383f; } }
:root.calm[data-theme="dark"] { --ihead0: #2e383f; }
:root.calm table { --ihead: var(--shc, var(--ihead0)); }
:root.calm .itemframe > table > thead > tr > th, :root.calm .itemframe > table > thead .thbtn,
:root.calm .itemframe > table > thead .thbtn:hover, :root.calm .itemframe > table > thead .thbtn.open, :root.calm .itemframe > table > thead .addcol { color: var(--shci, #fff); }
:root.calm .itemframe > table > thead > tr > th + th { border-left-color: color-mix(in srgb, var(--shci, #fff) 28%, var(--ihead)); }
:root.calm table.subtable th { background: color-mix(in srgb, var(--shc, var(--fg)) 18%, var(--surface)); }
:root.calm table.subtable > thead > tr:hover > th { background-image: linear-gradient(color-mix(in srgb, var(--shc, var(--fg)) 9%, transparent), color-mix(in srgb, var(--shc, var(--fg)) 9%, transparent)); }
/* the views: grey glass, the one on screen in the table's (or section's) colour */
:root.calm .vwset .vwcase, :root.calm .vwset .vtab, :root.calm .vfdot { --vc: var(--muted) !important; }
:root.calm .vwset .vtab[aria-pressed="true"] { --vc: var(--tc, var(--accent)) !important; }
/* Customize in plain lines */
:root.calm .adjpill { border-color: var(--line-strong); }
:root.calm .adjpill .vwic-btn { border-left-color: var(--line-strong); }
/* in the left bar, only the open folder is tinted */
:root.calm .tabs.tree .fgroup.open:not(.cur) { background: none; }

/* ---------- v289: in Calm the views are plain words, like the tables at the top ----------
   No frame and no glass. The one on screen is darker and bold, underlined in the table's colour a little above the
   column names, so the line does not run into them. */
:root.calm .ctls > .vwset, :root.calm .sechead.with-ctls .ctls > .vwset { border: 0; background: none; }
:root.calm .vwset .vwcase, :root.calm .vwset .vwcase:first-child, :root.calm .ctls.tight > .vwset .vwcase, :root.calm .ctls.tight > .vwset .vwcase:first-child { background: none; padding-left: 4px; padding-right: 4px; }
:root.calm .vwset .vwcase + .vwcase::before { top: 9px; bottom: 9px; background: color-mix(in srgb, var(--line-strong) 70%, transparent); }
:root.calm .vwset .vwtabs { gap: 2px; align-items: flex-end; }
:root.calm .vwset .vwtabs > .vtab + .vtab { margin-left: 0; }
:root.calm .vtab, :root.calm .vtab[aria-pressed="true"] { height: 23px; margin-bottom: 3px; padding: 0 7px; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; box-shadow: none; color: var(--muted); }
:root.calm .vtab::before { display: none; }
:root.calm .vtab:hover { background: none; color: var(--fg); }
:root.calm .vtab[aria-pressed="true"] { color: var(--fg); font-weight: 650; border-bottom-color: var(--vc); }
:root.calm .vtab .vwdot { top: 0; right: 0; }
:root.calm .vtab.vwplus:hover, :root.calm .vtab.vfmore:hover, :root.calm .vtab.vfmore[aria-expanded="true"] { background: none; color: var(--fg); }

/* ---------- v291: items in clean rows ----------
   The coloured line on an item's left is its drag handle, a little thicker (wider still while the name is hovered).
   The arrow that shows or hides the subitems sits on the right, by the count, shown on hover or while they are
   hidden. The activity log has a strip of its own at the right end of the name cell, bolder. */
:root.cleanrows tr.item > td[data-col="name"] { position: relative; padding-left: 12px; }   /* room between the line and the name */
:root.cleanrows tr.item > td[data-col="name"] > .namebox > .grip, :root.cleanrows tr.item > td[data-col="name"]:hover > .namebox > .grip {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 1; width: 5px; height: auto; margin: 0; background: var(--tc, var(--accent));
  overflow: visible; opacity: 1; visibility: visible; pointer-events: auto; cursor: grab; transition: width 0.2s ease; }
:root.cleanrows tr.item > td[data-col="name"]:hover > .namebox > .grip:not(.off) { width: 7px; }
:root.cleanrows tr.item > td[data-col="name"] > .namebox > .grip.off, :root.cleanrows tr.item > td[data-col="name"]:hover > .namebox > .grip.off { cursor: default; }
:root.cleanrows tr.item > td[data-col="name"] > .namebox > .caret { order: 2; opacity: 0; transition: opacity 0.2s ease; }
:root.cleanrows tr.item > td[data-col="name"]:hover > .namebox > .caret, :root.cleanrows tr.item > td[data-col="name"] > .namebox > .caret[aria-expanded="false"],
:root.cleanrows tr.item > td[data-col="name"] > .namebox > .caret:focus-visible { opacity: 1; }   /* a closed item always shows its arrow */
:root.cleanrows tr.item > td[data-col="name"] > .namebox > .caret.blank { display: none; }
:root.cleanrows tr.item > td[data-col="name"] > .namebox > .logbtn { order: 3; align-self: stretch; width: 30px; height: auto; margin: calc(-1 * var(--cpy-i, 5px)) calc(-1 * var(--cpx, 4px)) calc(-1 * var(--cpy-i, 5px)) 2px;
  border: 0; border-left: 1px solid var(--line); border-radius: 0; opacity: 1; color: color-mix(in srgb, var(--fg) 70%, transparent); }
:root.cleanrows tr.item > td[data-col="name"] > .namebox > .logbtn svg { stroke-width: 2.4; width: 16px; height: 16px; }
:root.cleanrows tr.item > td[data-col="name"] > .namebox > .logbtn:hover, :root.cleanrows tr.item > td[data-col="name"] > .namebox > .logbtn:focus-visible {
  color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
@media (prefers-reduced-motion: reduce) { :root.cleanrows tr.item > td[data-col="name"] > .namebox > .grip, :root.cleanrows tr.item > td[data-col="name"] > .namebox > .caret { transition: none; } }
/* v292: subitems drag by a line too, lighter and thinner than an item's, and only while the name is hovered (wider
   while the line itself is). Where they cannot move it shows faintly, its tip says why. */
:root.cleanrows tr.sub:not(.flat) > td[data-col="name"] { position: relative; padding-left: 10px; }
:root.cleanrows tr.sub:not(.flat) > td[data-col="name"] > .namebox > .grip, :root.cleanrows tr.sub:not(.flat) > td[data-col="name"]:hover > .namebox > .grip {
  position: absolute; left: 0; top: 0; bottom: 0; z-index: 1; width: 0; height: auto; margin: 0; overflow: visible; visibility: visible;
  background: color-mix(in srgb, var(--tc, var(--accent)) 50%, var(--surface)); opacity: 1; pointer-events: none; cursor: grab;
  transition: width 0.2s ease, opacity 0.2s ease; }
:root.cleanrows tr.sub:not(.flat) > td[data-col="name"]:hover > .namebox > .grip { width: 5px; pointer-events: auto; }
:root.cleanrows tr.sub:not(.flat) > td[data-col="name"]:hover > .namebox > .grip:not(.off):hover { width: 8px; }
/* v293: the line catches the pointer a little past what it shows, so it is easier to take hold of */
:root.cleanrows tr.item > td[data-col="name"] > .namebox > .grip::after, :root.cleanrows tr.sub:not(.flat) > td[data-col="name"] > .namebox > .grip::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; }
:root.cleanrows tr.sub:not(.flat) > td[data-col="name"]:hover > .namebox > .grip.off { opacity: 0.45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { :root.cleanrows tr.sub:not(.flat) > td[data-col="name"] > .namebox > .grip { transition: none; } }

/* ---------- v292: the tick box as a small dot ----------
   At rest each row has a small dot where its tick box goes, the name just after it. Hovering the name (or ticking
   anything) grows the dot into the box and the name slides on. .selon (views.js) is put on a frame after the first
   tick, so every box grows from its dot instead of appearing at once. Rows in a flat list cannot be dragged and show
   no handle at all. */
:root.cleanrows td[data-col="name"] > .namebox > .rsel {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; display: inline-block; vertical-align: middle;
  width: 5px; height: 5px; margin: 0 6px 0 1px; padding: 0; border: 0 solid color-mix(in srgb, var(--muted) 80%, transparent); border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 50%, transparent) no-repeat center / 0 0; opacity: 1; overflow: visible; pointer-events: auto; cursor: pointer;
  transition: width 0.28s ease, height 0.28s ease, margin 0.28s ease, border-radius 0.28s ease, border-width 0.28s ease, background-color 0.28s ease; }
:root.cleanrows td[data-col="name"]:hover > .namebox > .rsel, :root.cleanrows td[data-col="name"] > .namebox > .rsel:focus-visible,
:root.cleanrows td[data-col="name"] > .namebox > .rsel:checked, :root.cleanrows.selon #main td[data-col="name"] > .namebox > .rsel {
  width: 14px; height: 14px; margin: 0 5px 0 0; border-width: 1.5px; border-radius: 3px; background-color: var(--surface); opacity: 1; }
:root.cleanrows td[data-col="name"] > .namebox > .rsel:checked, :root.cleanrows.selon #main td[data-col="name"] > .namebox > .rsel:checked { border-color: var(--accent); background-color: var(--accent); background-size: 10px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6 9.6 3.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:root.cleanrows td[data-col="name"] > .namebox > .rsel:hover { border-color: var(--accent); }
:root.cleanrows td[data-col="name"] > .namebox > .rsel:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
:root.cleanrows tr.sub.flat > td[data-col="name"] > .namebox > .grip { display: none; }
@media (prefers-reduced-motion: reduce) { :root.cleanrows td[data-col="name"] > .namebox > .rsel { transition: none; } }

/* v294: hovering a name opens its tick box only after half a second, so moving the pointer across the rows leaves them
   still. Leaving closes it at once. Once anything is ticked (.selon) every box is open and nothing waits. Same for the
   select-all by a column's name. */
:root.cleanrows:not(.selon) td[data-col="name"]:hover > .namebox > .rsel:not(:checked):not(:focus-visible),
:root.cleanrows:not(.selon) th:hover > .thin > .rsel:not(:checked):not(:focus-visible) { transition-delay: 0.5s; }

/* v295: more room inside the cells (clean rows). The values keep their size, the cells grow around them: about a fifth
   taller, a little wider inside. The activity strip in an item's name cell reaches the cell edges through the same numbers. */
:root.cleanrows { --cpy: 6px; --cpy-i: 9px; --cpx: 8px; }   /* v296: a little more */
:root.cleanrows #main tr.item > td, :root.cleanrows #main tr.sub > td { padding: var(--cpy) var(--cpx); }
:root.cleanrows #main tr.item > td { padding-top: var(--cpy-i); padding-bottom: var(--cpy-i); }
:root.cleanrows #main tr.item > td[data-col="name"] { padding-left: 12px; }
:root.cleanrows #main tr.sub:not(.flat) > td[data-col="name"] { padding-left: 10px; }

/* v296: a status fills its whole cell with its colour, the label the same size in the middle. The rule highlight sits
   inside the colour, along the cell's edges. With no status the dashed placeholder stays a label in the middle. */
:root.cleanrows #main tr.item > td:has(> .sbtn), :root.cleanrows #main tr.sub > td:has(> .sbtn) { position: relative; padding: 0; }
:root.cleanrows #main td > .sbtn { position: absolute; inset: 0; width: auto; height: auto; border-radius: 0; line-height: normal; }
:root.cleanrows #main td > .sbtn.none { inset: var(--cpy) var(--cpx); border-radius: 3px; }
:root.cleanrows #main tr.item > td > .sbtn.none { inset: var(--cpy-i) var(--cpx); }
:root.cleanrows #main td > .sbtn.open { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 3px var(--surface); }
:root.cleanrows:is(.lift, .lifthov) #main :is(tr.item, tr.sub):hover > td > .sbtn:not(.none):not(.open) { box-shadow: none; }

/* v298: names not bold in clean rows. Items a touch stronger (and a size larger) than subitems. */
:root.cleanrows tr.item .cell.name-item { font-weight: 500; }
:root.cleanrows .cell.name-sub, :root.cleanrows tr.sub .cell.name-item { font-weight: 400; }
/* v298: no dot at rest. The tick box grows from nothing where the name starts (after the hover wait, or at once for
   every row once something is ticked) and the name slides along. */
:root.cleanrows td[data-col="name"] > .namebox > .rsel { width: 0; height: 0; margin: 0; border-width: 0; opacity: 0;
  transition: width 0.28s ease, height 0.28s ease, margin 0.28s ease, border-radius 0.28s ease, border-width 0.28s ease, background-color 0.28s ease, opacity 0.28s ease; }
:root.cleanrows td[data-col="name"]:hover > .namebox > .rsel, :root.cleanrows td[data-col="name"] > .namebox > .rsel:focus-visible,
:root.cleanrows td[data-col="name"] > .namebox > .rsel:checked, :root.cleanrows.selon #main td[data-col="name"] > .namebox > .rsel {
  width: 14px; height: 14px; margin: 0 5px 0 0; border-width: 1.5px; opacity: 1; }
:root.cleanrows #main tr.addrow .addrowbtn { margin-left: 12px; }   /* "+ Add item" lines up with the names again */

/* v311: Rewind (rewind.js). The bar floats at the bottom; the grid is read only, cells that differ from now tinted. */
:root.rwmode body { padding-bottom: 190px; }
:root.rwmode #main { --rw-hue: #c98a12; }
.rwbar { position: fixed; z-index: 45; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(920px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 12px; border-radius: 14px; color: var(--fg);
  background: color-mix(in srgb, #c98a12 9%, var(--surface)); border: 1.5px solid color-mix(in srgb, #c98a12 45%, var(--line-strong));
  box-shadow: 0 10px 34px var(--shadow), 0 2px 6px var(--shadow); }
.rw-top { display: flex; align-items: center; gap: 10px; }
.rw-ic { color: #a86f0a; display: flex; }
.rw-title { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; font-size: 13px; }
.rw-title b { font-size: 14.5px; letter-spacing: 0.01em; }
.rw-when { font-family: var(--font-data); font-size: 12.5px; color: var(--muted); }
.rw-track { display: flex; align-items: center; gap: 8px; }
.rw-slider { flex: 1; min-width: 0; accent-color: #c98a12; height: 22px; cursor: pointer; }
.rw-step { min-width: 30px; font-size: 16px; line-height: 1; }
.rw-day { width: auto; max-width: 150px; }
.rw-next-change { font-size: 12.5px; margin: 0; min-height: 1.3em; }
.rw-foot { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.rw-plan { font-size: 12px; margin: 0; flex: 1; min-width: 200px; }
#rw-restore-all.armed { background: var(--danger); border-color: var(--danger); color: #fff; }
:root.rwmode #main td.rw-diff { background-image: linear-gradient(color-mix(in srgb, #c98a12 22%, transparent), color-mix(in srgb, #c98a12 22%, transparent));
  outline: 2px solid color-mix(in srgb, #c98a12 75%, transparent); outline-offset: -2px; }
:root.rwmode .paste-msg { bottom: 200px; }
:root.rwmode #main tr.rw-gone > td { background-image: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--danger) 9%, transparent) 0 6px, transparent 6px 12px); }
:root.rwmode #main tr.rw-gone > td:first-child .namebox::after { content: "deleted since"; flex: none; font-size: 10.5px; font-weight: 600; color: var(--danger); margin-left: 6px; }
:root.rwmode #main .grid-scroll { cursor: default; }
.rw-restore { flex: none; margin-left: 6px; padding: 1px 8px; font: 600 11px/18px var(--font-ui); border-radius: 9px; cursor: pointer;
  color: #7a5208; background: color-mix(in srgb, #c98a12 18%, var(--surface)); border: 1px solid color-mix(in srgb, #c98a12 50%, var(--line-strong)); }
.rw-restore:hover { background: color-mix(in srgb, #c98a12 30%, var(--surface)); }
:root[data-theme="dark"] .rw-restore, :root[data-theme="dark"] .rw-ic { color: #f0c46a; }
.snap-auto { margin-left: 8px; padding: 0 6px; font-size: 10.5px; font-weight: 600; border-radius: 8px; color: var(--muted); border: 1px solid var(--line-strong); }

/* v312: the bin (bin.js) */
.binrow { align-items: flex-start; gap: 14px; }
.bin-t { flex: 1; min-width: 0; }
.bin-t .dnote { margin: 2px 0 0; }
.bin-why { color: var(--danger); }
.bin-acts { display: flex; gap: 6px; flex: none; }
.bin-acts .armed { background: var(--danger); border-color: var(--danger); color: #fff; }
.bin-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.bin-foot .armed { background: var(--danger); border-color: var(--danger); color: #fff; }
.binrow .btn:disabled { opacity: 0.45; cursor: default; }
