/* Shitlist app styles. One family, restrained palette, Split View layout. */

:root {
  --paper: #f5f6f4;
  --pane: #ffffff;
  --ink: #1d2220;
  --ink-2: #3b4240;
  --muted: #68706c;
  --faint: #9aa19d;
  --line: #e1e4e1;
  --line-2: #eceeec;
  --hover: #eef0ee;
  --select: #e3ecea;
  --accent: #1f5e5a;
  --accent-ink: #ffffff;
  --started: #a8822a;
  --done: #2f7a6f;
  --focus: #1f5e5a66;
  --list-w: 440px;
  --rail-w: 52px;
  --side-w: 228px;
  --radius: 6px;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font: 14px/1.45 var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ wordmark */
.mark {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.mark s {
  text-decoration: none;
  position: relative;
  color: var(--ink-2);
}
.mark s::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; top: 49%;
  height: 2.5px;
  background: var(--accent);
  transform: rotate(-4deg);
  border-radius: 2px;
}

/* ------------------------------------------------------------ login */
.login {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}
.login-side {
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-side .mark { font-size: 44px; }
.login-side p { color: var(--muted); max-width: 30ch; font-size: 17px; margin: 18px 0 0; }
.login-ledger { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 15px; }
.login-ledger li { padding: 6px 0; }
.login-ledger li.done { text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px; color: var(--faint); }
.login-form {
  background: var(--pane);
  border-left: 1px solid var(--line);
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.login-form h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
.login-form .hint, .settings .hint { color: var(--muted); margin: -4px 0 4px; }
.link-btn { border: 0; background: transparent; color: var(--accent); padding: 4px 0; text-align: left; align-self: flex-start; }
.link-btn:hover { text-decoration: underline; }
.login-form input[readonly] { background: var(--paper); color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-size: 13px; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--pane);
  padding: 8px 10px;
  min-height: 36px;
}
.input:focus, .field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--focus); }
.btn {
  border: 1px solid var(--line);
  background: var(--pane);
  border-radius: var(--radius);
  padding: 6px 12px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { border-color: transparent; background: transparent; }
.btn.quiet:hover { background: var(--hover); }
.btn:disabled { opacity: .4; cursor: default; background: transparent; }
.error { color: var(--ink); background: #f3eedf; border: 1px solid #e6dcc0; border-radius: var(--radius); padding: 8px 10px; font-size: 13px; }

/* ------------------------------------------------------------ split view */
.app {
  height: 100%;
  display: grid;
  grid-template-columns: var(--side-w) var(--list-w) minmax(0, 1fr);
}
.app.rail { --side-w: 76px; }
.app.collapsed { grid-template-columns: var(--side-w) var(--rail-w) minmax(0, 1fr); }

.list {
  background: var(--pane);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.list-top { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line-2); }
.list-row1 { display: flex; align-items: center; gap: 6px; }
.list-title { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-title span { font-size: 14px; font-weight: 500; color: var(--faint); margin-left: 4px; }
.list-row1 .menu-btn { display: none; }
.app.in-settings .list-top { display: none; }
.icon-btn {
  width: 30px; height: 30px;
  border: 0; background: transparent; border-radius: var(--radius);
  display: inline-grid; place-items: center; color: var(--muted);
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.list-row2 { display: flex; gap: 8px; }
.list-row2 select { flex: 1; min-width: 0; }
.search { flex: 1; }
.views { display: flex; gap: 2px; }
.views button {
  border: 0; background: transparent; border-radius: var(--radius);
  padding: 4px 10px; color: var(--muted);
}
.views button:hover { background: var(--hover); color: var(--ink); }
.views button[aria-pressed="true"] { background: var(--select); color: var(--ink); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.filter { display: inline-flex; align-items: center; border: 1px dashed var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); max-width: 100%; }
.filter button { border: 0; background: transparent; color: inherit; padding: 2px 10px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.filter button:hover { color: var(--ink); }
.filter.on { border-style: solid; background: var(--select); color: var(--ink); }
.filter.on button[data-filter] { padding-right: 2px; }
.filter.on button[data-clear] { padding: 2px 8px 2px 4px; color: var(--muted); }
.filter.on button[data-clear]:hover { color: var(--ink); }

.rows { overflow: auto; flex: 1; padding-bottom: 24px; }
.group-h {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 6px;
  background: var(--pane);
  color: var(--ink-2); font-weight: 600; font-size: 13px;
}
.group-h .count { color: var(--faint); font-weight: 400; }
.row {
  display: grid;
  grid-template-columns: 16px 64px minmax(0, 1fr) 22px 24px 40px;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  min-height: 34px;
  cursor: default;
  border-left: 2px solid transparent;
}
.row:hover { background: var(--hover); }
.row.sel { background: var(--select); border-left-color: var(--accent); }
.row .key { color: var(--muted); font-size: 12.5px; }
.row .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.closed .title { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--muted); }
.row .age { color: var(--faint); font-size: 12px; text-align: right; }
.row .sub { color: var(--faint); font-size: 12px; margin-left: 6px; }
.empty { padding: 32px 18px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* collapsed list becomes a rail */
.app.collapsed .list-top > :not(.list-row1),
.app.collapsed .rows,
.app.collapsed .list-row1 > :not(.pin) { display: none; }
.app.collapsed .list-row1 .pin { display: inline-grid; }
.app.collapsed .list-top { padding: 12px 10px; border: 0; }

/* ------------------------------------------------------------ glyphs */
.st { width: 14px; height: 14px; display: inline-block; flex: none; }
.pr { display: inline-flex; gap: 1.5px; align-items: flex-end; height: 12px; }
.pr i { width: 3px; background: var(--line); border-radius: 1px; }
.pr i:nth-child(1) { height: 5px; } .pr i:nth-child(2) { height: 8px; } .pr i:nth-child(3) { height: 11px; }
.pr.p4 i:nth-child(1), .pr.p3 i:nth-child(-n+2), .pr.p2 i { background: var(--ink-2); }
.pr-urgent { width: 13px; height: 13px; border-radius: 3px; background: var(--ink); color: var(--paper); font-size: 10px; font-weight: 800; display: inline-grid; place-items: center; }
.pr-none { color: var(--faint); font-size: 12px; }
.av {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 700;
  background: var(--line-2); color: var(--ink-2);
}
.av.agent { border-radius: 6px; background: var(--select); color: var(--accent); }
.av.none { background: transparent; border: 1px dashed var(--line); }
.lbl { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px 1px 6px; font-size: 12px; color: var(--ink-2); }
.lbl i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }

/* ------------------------------------------------------------ detail pane */
.detail { min-width: 0; min-height: 0; overflow: auto; }
.detail-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 28px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-2);
  color: var(--muted); font-size: 13px;
}
.detail-bar .crumb { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.detail-bar .crumb b { color: var(--ink); font-weight: 600; }
.back { display: none; }

.issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-template-areas: "title props" "main props";
  grid-template-rows: auto 1fr;
  column-gap: 40px;
  padding: 26px 28px 80px;
  max-width: 1180px;
}
.issue > .title-input { grid-area: title; }
.issue-main { grid-area: main; min-width: 0; }
.issue > .props { grid-area: props; }
.title-input {
  width: 100%; border: 0; background: transparent; resize: none; overflow: hidden;
  font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em;
  padding: 2px 0; margin: 0 0 14px;
}
.title-input:focus { outline: none; box-shadow: inset 0 -2px 0 var(--accent); }
.title-input.closed { text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.desc { min-height: 48px; border-radius: var(--radius); padding: 6px 8px; margin: 0 -8px; cursor: text; }
.desc:hover { background: var(--hover); }
.desc.placeholder { color: var(--faint); }
.prose { max-width: 72ch; }
.prose p { margin: 0 0 10px; }
.prose ul, .prose ol { margin: 0 0 10px; padding-left: 22px; }
.prose code { background: var(--line-2); border-radius: 4px; padding: 1px 4px; font-size: 0.92em; }
.prose pre { background: var(--line-2); border-radius: var(--radius); padding: 10px 12px; overflow: auto; }
.prose pre code { background: none; padding: 0; }
.prose a { color: var(--accent); }
.prose h3, .prose h4 { margin: 14px 0 6px; }
.desc-edit { width: 100%; min-height: 160px; resize: vertical; line-height: 1.5; }
.edit-actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; color: var(--faint); font-size: 12px; }

.section { margin-top: 30px; }
.section-h { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.section-h .count { color: var(--faint); font-weight: 400; }
.section-h .grow { flex: 1; }
.mini-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--pane); }
.mini-row { display: grid; grid-template-columns: 16px 64px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--line-2); }
.mini-row:first-child { border-top: 0; }
.mini-row:hover { background: var(--hover); }
a.mini-row, .mini-row a { color: inherit; text-decoration: none; }
.mini-row a.t:hover, a.mini-row:hover .t { text-decoration: underline; text-decoration-color: var(--faint); }
.prop a.prop-btn { color: inherit; text-decoration: none; }
.row .av.none { border-color: transparent; }
.mini-row .key { color: var(--muted); font-size: 12.5px; }
.mini-row > svg { width: 14px; height: 14px; color: var(--muted); }
.mini-row.closed .t { text-decoration: line-through; color: var(--muted); }
.mini-row .rel { color: var(--muted); font-size: 12px; }
.mini-add { display: flex; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--line-2); }
.mini-add input { flex: 1; border: 0; background: transparent; padding: 4px 0; }
.mini-add input:focus { outline: none; }

.timeline { list-style: none; margin: 0; padding: 0; }
.ev { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; color: var(--muted); font-size: 13px; }
.ev b { color: var(--ink-2); font-weight: 600; }
.ev time { color: var(--faint); margin-left: auto; white-space: nowrap; }
.comment { background: var(--pane); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; }
.comment-h { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.comment-h b { color: var(--ink); }
.comment-h time { margin-left: auto; color: var(--faint); }
.comment-h .icon-btn { width: 24px; height: 24px; }
.composer { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.composer textarea { min-height: 70px; resize: vertical; }

.props { display: flex; flex-direction: column; gap: 2px; align-self: start; position: sticky; top: 64px; }
.prop { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; min-height: 34px; }
.prop > span { color: var(--muted); font-size: 13px; }
.prop-btn {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  border: 0; background: transparent; border-radius: var(--radius);
  padding: 5px 8px; margin-left: -8px; text-align: left;
}
.prop-btn:hover { background: var(--hover); }
.prop-btn .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-btn .unset { color: var(--faint); }
.prop input[type="date"], .prop input[type="number"] { border: 0; background: transparent; padding: 5px 8px; margin-left: -8px; border-radius: var(--radius); min-width: 0; }
.prop input:hover { background: var(--hover); }
.prop-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.props hr { border: 0; border-top: 1px solid var(--line-2); margin: 10px 0; width: 100%; }
.props .meta { color: var(--faint); font-size: 12px; line-height: 1.7; }

.blank { height: 100%; display: grid; place-items: center; color: var(--muted); padding: 40px; }
.blank-inner { max-width: 360px; }
.blank-inner h2 { color: var(--ink); font-size: 20px; margin: 0 0 6px; }
.keys { margin-top: 18px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
kbd { font: 600 12px var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--pane); color: var(--ink-2); }

/* ------------------------------------------------------------ popover menu */
.menu {
  position: fixed; z-index: 50;
  width: 260px; max-height: 340px;
  display: flex; flex-direction: column;
  background: var(--pane);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px -12px rgba(29, 34, 32, 0.35), 0 2px 6px -2px rgba(29, 34, 32, 0.12);
}
.menu input { border: 0; border-bottom: 1px solid var(--line-2); padding: 10px 12px; background: transparent; }
.menu input:focus { outline: none; }
.menu ul { list-style: none; margin: 0; padding: 4px; overflow: auto; }
.menu li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; cursor: default; }
.menu li.on { background: var(--hover); }
.menu li .check { margin-left: auto; color: var(--accent); font-weight: 700; }
.menu li.none { color: var(--faint); }

/* ------------------------------------------------------------ dialog & toast */
.scrim { position: fixed; inset: 0; background: rgba(29, 34, 32, 0.28); z-index: 40; display: grid; place-items: start center; padding-top: 12vh; }
.dialog { background: var(--pane); border-radius: 10px; width: min(560px, calc(100vw - 32px)); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 60px -30px rgba(29, 34, 32, 0.5); }
.dialog h2 { margin: 0; font-size: 16px; }
.dialog .row-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.dialog .row-actions .hint { margin-right: auto; color: var(--faint); font-size: 12px; }
.dialog .grow-title { font-size: 18px; font-weight: 600; border: 0; padding: 4px 0; }
.dialog .grow-title:focus { outline: none; }
.dialog textarea { min-height: 110px; resize: vertical; }
.dialog .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dialog .chips .prop-btn { margin: 0; border: 1px solid var(--line); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 60; font-size: 13px; }

/* settings */
.settings { padding: 26px 28px 80px; max-width: 760px; }
.settings h2 { font-size: 22px; margin: 0 0 4px; }
.settings h3 { font-size: 15px; margin: 28px 0 8px; }
.settings p.note { color: var(--muted); margin: 0 0 12px; }
.table { width: 100%; border-collapse: collapse; background: var(--pane); border: 1px solid var(--line); border-radius: var(--radius); }
.table td, .table th { text-align: left; padding: 8px 12px; border-top: 1px solid var(--line-2); font-weight: 400; }
.table th { color: var(--muted); font-size: 13px; border-top: 0; }
.inline-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.inline-form .input { min-width: 0; }
.secret { word-break: break-all; background: var(--select); border-radius: var(--radius); padding: 8px 10px; font-weight: 600; }

/* settings Split View (WTF-899) */
.app.in-settings .list-row2, .app.in-settings .search, .app.in-settings .views, .app.in-settings .filters { display: none; }
.snav-top { padding: 12px 14px 6px; }
.snav-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 13px; padding: 2px 0; }
.snav-back:hover { color: var(--ink); }
.snav-back svg { width: 13px; height: 13px; }
.snav-top h2 { font-size: 20px; margin: 10px 0 0; letter-spacing: -0.01em; }
.snav-sec { padding: 14px 8px 4px; }
.snav-sec + .snav-sec { border-top: 1px solid var(--line-2); margin-top: 8px; }
.snav-h { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.snav-note { margin: -2px 8px 6px; color: var(--faint); font-size: 12px; }
.snav-add { border: 0; background: transparent; color: var(--muted); width: 24px; height: 24px; border-radius: var(--radius); display: grid; place-items: center; }
.snav-add:hover { background: var(--hover); color: var(--ink); }
.snav-add svg { width: 14px; height: 14px; }
.snav {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: var(--radius);
  color: var(--ink-2); text-decoration: none; position: relative;
}
.snav:hover { background: var(--paper); color: var(--ink); }
.snav.sel { background: var(--select); color: var(--ink); }
.snav.sel::before { content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--accent); }
.snav-ic { width: 18px; display: grid; place-items: center; color: var(--muted); flex: none; }
.snav.sel .snav-ic { color: var(--accent); }
.snav-ic svg { width: 16px; height: 16px; }
.snav-ic .dot { width: 9px; height: 9px; border-radius: 50%; display: block; }
.snav-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.snav.sel .snav-t { font-weight: 600; }
.snav-t small { color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snav.prod .snav-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.snav .pkey { color: var(--faint); font-size: 12px; }
.snav.archived { color: var(--faint); }
.muted-tag { color: var(--faint); font-size: 12px; font-weight: 400; margin-left: auto; }
td .muted-tag, .tok .muted-tag { margin-left: 0; }
.settings h2 { display: flex; align-items: center; gap: 10px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.settings .inline-form { align-items: flex-end; }
.field.grow { flex: 1; min-width: 180px; }
.input.color { width: 44px; padding: 2px; height: 36px; cursor: pointer; }
.input.color.sm { width: 16px; height: 16px; min-height: 0; padding: 0; border: 0; background: transparent; border-radius: 50%; flex: none; cursor: pointer; }
.input.color.sm::-webkit-color-swatch-wrapper { padding: 0; }
.input.color.sm::-webkit-color-swatch { border: 0; border-radius: 50%; }
.input.color.sm::-moz-color-swatch { border: 0; border-radius: 50%; }
.input.sm, .btn.sm { padding: 3px 8px; font-size: 13px; }
.input.bare { border-color: transparent; background: transparent; padding: 3px 6px; width: 100%; min-width: 120px; }
.input.bare:hover:not(:disabled) { border-color: var(--line); }
.input.bare:disabled { color: var(--ink); }
.st-name { display: flex; align-items: center; gap: 6px; }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.indent { padding-left: 32px; }
.table tr.retired td { color: var(--faint); }
.table tr.retired .input.bare { color: var(--faint); text-decoration: line-through; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); padding: 6px 0; }
.tok { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; }
.secret-box { margin-top: 14px; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row .secret { flex: 1; min-width: 0; font-weight: 400; font-size: 13px; }
.inline-form .grow { flex: 1; min-width: 200px; }
.invite-form { margin: 0 0 12px; }
[data-invite-link] .secret-box { margin: 0 0 16px; }
.stack-form { display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.own-ws { margin-top: 18px; }
.own-ws summary { cursor: pointer; color: var(--ink-2); }
.own-ws summary:hover { color: var(--ink); }
.btn.danger { color: #8a4b12; border-color: #d9c2a6; background: #f7efe4; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .issue { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "props" "main"; grid-template-rows: auto; }
  .props { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 18px; margin-bottom: 18px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
  .props hr, .props .meta { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .app, .app.collapsed { grid-template-columns: 1fr; }
  .app.has-detail .list { display: none; }
  .app:not(.has-detail) .detail { display: none; }
  .back { display: inline-grid; }
  .pin { display: none; }
  .detail-bar, .issue, .settings { padding-left: 16px; padding-right: 16px; }
  .row { grid-template-columns: 16px 56px minmax(0, 1fr) 22px 24px; }
  .row .age { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-side { padding: 32px 20px 8px; }
  .login-side .mark { font-size: 34px; }
  .login-ledger { display: none; }
  .login-form { border-left: 0; padding: 24px 20px 40px; justify-content: flex-start; }
  .title-input { font-size: 22px; }
  input, select, textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------ sections and docs (WTF-909) */
.app.in-docs .views, .app.in-docs .filters { display: none; }
.row.doc-row { grid-template-columns: 16px minmax(0, 1fr) 40px; color: inherit; text-decoration: none; }
.row.doc-row .title { display: flex; flex-direction: column; white-space: normal; min-width: 0; }
.row.doc-row .title > .sub { margin-left: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-ic { color: var(--muted); display: grid; place-items: center; }
.doc-ic svg { width: 15px; height: 15px; }
.doc { padding: 22px 28px 80px; max-width: 860px; display: flex; flex-direction: column; gap: 14px; }
.doc-title { font-size: 26px; letter-spacing: -0.015em; margin: 0; line-height: 1.2; }
.doc-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.doc-meta .btn { margin-left: auto; }
.doc-body { max-width: 72ch; font-size: 15px; line-height: 1.6; }
.doc-body h3 { font-size: 19px; margin: 22px 0 8px; }
.doc-body h4 { font-size: 16px; margin: 18px 0 6px; }
.doc-body.placeholder { color: var(--faint); }
.prose blockquote { margin: 0 0 12px; padding: 6px 12px; border-left: 3px solid var(--line); color: var(--ink-2); background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.doc-title-input { font: inherit; font-size: 26px; font-weight: 700; letter-spacing: -0.015em; border: 0; background: transparent; padding: 0; width: 100%; }
.doc-title-input:focus { outline: none; box-shadow: inset 0 -2px 0 var(--accent); }
.doc-edit { width: 100%; min-height: 55vh; resize: vertical; line-height: 1.55; font-size: 14px; }
.draft-note { margin: 0; padding: 8px 12px; background: var(--select); border-radius: var(--radius); color: var(--ink-2); }
.mini-row .x { border: 0; background: transparent; color: var(--faint); font-size: 16px; line-height: 1; padding: 0 4px; }
.mini-row .x:hover { color: var(--ink); }
.ver-row { width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line-2); background: transparent; grid-template-columns: minmax(0, 1fr) auto; cursor: pointer; }
.version-body { max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
@media (max-width: 760px) { .doc { padding-left: 16px; padding-right: 16px; } }

/* ------------------------------------------------------------ attachments (SHIT-10) */
.att-row { grid-template-columns: 28px minmax(0, 1fr) auto auto; }
.att-ic { display: grid; place-items: center; color: var(--muted); }
.att-ic svg { width: 15px; height: 15px; }
.att-thumb { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--paper); }
.attach-add { align-items: center; flex-wrap: wrap; }
.attach-add .link-btn { cursor: pointer; }
.grow-form { flex: 1; min-width: 200px; display: flex; }
.grow-form input { flex: 1; border: 0; background: transparent; padding: 4px 0; }
.grow-form input:focus { outline: none; }
.detail.dropping { box-shadow: inset 0 0 0 2px var(--accent); background: var(--select); }
.md-img { max-width: 100%; max-height: 480px; border-radius: var(--radius); border: 1px solid var(--line); display: block; margin: 6px 0; }
.icon-btn.danger { color: #8a4b12; }
.toast-act { margin-left: 12px; border: 0; background: transparent; color: #9fd6cf; font-weight: 600; padding: 0; cursor: pointer; }
.toast-act:hover { text-decoration: underline; }
.table.trash .key { color: var(--muted); font-size: 12.5px; margin-right: 6px; }

/* ------------------------------------------------------------ projects and cycles (SHIT-11) */
:root { --off: #4f5470; }
.row.proj-row { grid-template-columns: 10px minmax(0, 1fr) 48px 32px 22px 44px; color: inherit; text-decoration: none; }
.row.cyc-row { grid-template-columns: 16px 40px minmax(0, 1fr) 48px 32px; color: inherit; text-decoration: none; }
.row .pct { color: var(--muted); font-size: 12px; text-align: right; }
.hdot { width: 9px; height: 9px; border-radius: 50%; background: var(--done); }
.hdot.at_risk { background: var(--started); }
.hdot.off_track { background: var(--off); }
.hdot.none { background: transparent; border: 1.5px solid var(--line); }
.pbar { display: inline-block; height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; width: 100%; min-width: 36px; }
.pbar i { display: block; height: 100%; background: var(--done); border-radius: 3px; }
.pbar.wide { width: 110px; flex: none; }
.health { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.health i { width: 8px; height: 8px; border-radius: 50%; background: var(--done); }
.health.at_risk i { background: var(--started); }
.health.off_track i { background: var(--off); }
.health.none { color: var(--faint); }
.health.none i { background: transparent; border: 1.5px solid var(--line); }
.prop-static { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 0; color: var(--ink-2); }
.prop-static .pct { color: var(--muted); font-size: 12.5px; }
.prop:has(.prop-open) { grid-template-columns: 82px minmax(0, 1fr) 26px; }
.prop-open { width: 26px; height: 26px; opacity: 0.7; }
.prop-open:hover { opacity: 1; }
.prop-open svg { width: 13px; height: 13px; }
.props .link-btn { font-size: 13px; margin-bottom: 4px; }

.issue > .title-wrap { grid-area: title; min-width: 0; margin-bottom: 6px; }
.title-wrap .title-input { margin-bottom: 4px; }
.summary-input { width: 100%; border: 0; background: transparent; padding: 2px 0; color: var(--ink-2); font-size: 15px; }
.summary-input::placeholder { color: var(--faint); }
.summary-input:focus { outline: none; box-shadow: inset 0 -1px 0 var(--accent); }
input.title-input { display: block; }
.cycle-sub { margin: 0; color: var(--muted); }
.section.first { margin-top: 18px; }
.quiet-note { color: var(--muted); margin: 0; }

.update { background: var(--pane); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 8px; }
.update .comment-h .health { margin-right: 4px; }
.update .prose { margin-top: 6px; }
.update-form { display: flex; flex-direction: column; gap: 8px; background: var(--pane); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
.update-form textarea { min-height: 96px; resize: vertical; }
.health-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.health-pick button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 3px 10px; }
.health-pick button:hover { background: var(--hover); }
.health-pick button[aria-checked="true"] { background: var(--select); border-color: var(--accent); }
.health-pick button[aria-checked="true"] .health { color: var(--ink); font-weight: 600; }

.ms-block { margin-bottom: 14px; }
.ms-h { display: flex; align-items: center; gap: 8px; padding: 0 2px 6px; }
.ms-dia { width: 9px; height: 9px; transform: rotate(45deg); border: 1.5px solid var(--accent); border-radius: 1px; flex: none; }
.ms-dia.none { border-color: var(--line); }
.ms-name { font: inherit; font-weight: 600; border: 1px solid transparent; background: transparent; border-radius: var(--radius); padding: 2px 6px; margin-left: -6px; min-width: 0; flex: 1; color: var(--ink); }
input.ms-name:hover { border-color: var(--line); }
input.ms-name:focus { outline: none; border-color: var(--accent); background: var(--pane); }
.ms-name.none { color: var(--muted); font-weight: 500; }
.ms-date { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; padding: 2px 4px; border-radius: var(--radius); }
.ms-date:hover:not(:disabled) { background: var(--hover); }
.ms-count { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.ms-h .pbar { width: 70px; flex: none; }
.ms-h .icon-btn { width: 26px; height: 26px; }
.ms-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.ms-add input[name="name"] { flex: 1; min-width: 200px; }
.mini-end { display: inline-flex; align-items: center; gap: 4px; }
.carry { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: var(--select); border-radius: var(--radius); margin-top: 14px; color: var(--ink-2); }
.carry .rel { color: var(--muted); font-size: 13px; }
.dialog .field-row { display: flex; gap: 12px; }
.dialog .field-row .field { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .row.proj-row { grid-template-columns: 10px minmax(0, 1fr) 40px 32px 22px; }
  .row.proj-row .age { display: none; }
  .ms-h { flex-wrap: wrap; }
}

/* ------------------------------------------------------------ releases (SHIT-16) */
.row.rel-row { grid-template-columns: 16px 40px minmax(0, 1fr) 24px 48px; color: inherit; text-decoration: none; }
.rel-group { margin-bottom: 12px; }
.rel-group-h { font-size: 13px; color: var(--ink-2); font-weight: 600; padding: 0 2px 6px; }
.rel-group-h .count { color: var(--faint); font-weight: 400; }
.rel-add { margin-top: 2px; }
.rel-add .mini-add { border-top: 0; }
.hint-line { color: var(--faint); font-size: 12px; margin: 8px 0 0; }
.rel-notes { background: var(--pane); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; max-width: none; }
.rel-notes.draft { background: transparent; border-style: dashed; }
.rel-notes.draft .prose { color: var(--ink-2); margin-top: 8px; }
.rel-notes h3, .rel-notes h4 { margin: 10px 0 6px; }
.section-h .btn.sm + .btn.sm { margin-left: 6px; }
.mini-end .lbl { margin-right: 2px; }
.prop .prop-text { border: 0; background: transparent; padding: 5px 8px; margin-left: -8px; border-radius: var(--radius); min-width: 0; font: inherit; }
.prop .prop-text:hover:not(:disabled) { background: var(--hover); }
.prop .prop-text:focus { outline: none; background: var(--pane); box-shadow: 0 0 0 1px var(--accent); }
.prop .prop-text::placeholder { color: var(--faint); }
.prop .prop-text:disabled { color: var(--ink); }
@media (max-width: 760px) { .row.rel-row { grid-template-columns: 16px 36px minmax(0, 1fr) 24px; } .row.rel-row .age { display: none; } }

/* ------------------------------------------------------------ inbox and mentions (SHIT-17) */
.inbox-btn { position: relative; }
.inbox-btn[aria-pressed="true"] { background: var(--select); color: var(--accent); }
.inbox-btn .badge { position: absolute; top: 1px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.inbox-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px 8px; background: var(--pane); border-bottom: 1px solid var(--line-2); font-size: 13px; }
.inbox-h .count { color: var(--muted); }
.inbox-h .grow { flex: 1; }
.inbox-h .link-btn { font-size: 13px; padding: 0; }
.inbox-h .link-btn + .link-btn { margin-left: 8px; }
.row.inbox-row { grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.udot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; background: transparent; }
.inbox-row.unread .udot { background: var(--accent); }
.ib-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ib-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ib-top .key { flex: none; }
.ib-top .title { min-width: 0; }
.inbox-row:not(.unread) .ib-top .title { color: var(--ink-2); }
.inbox-row.unread .ib-top .title { font-weight: 600; }
.ib-line { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 21px; }
.ib-more { color: var(--faint); }
.ib-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ib-acts { display: flex; gap: 0; opacity: 0; }
.inbox-row:hover .ib-acts, .inbox-row.sel .ib-acts, .ib-acts:focus-within { opacity: 1; }
.ib-acts .icon-btn { width: 24px; height: 22px; }
.ib-acts .icon-btn svg { width: 13px; height: 13px; }
@media (hover: none) { .ib-acts { opacity: 1; } }
.mention { color: var(--accent); background: var(--select); border-radius: 4px; padding: 0 3px; font-weight: 500; }
.mention.me { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.mention-pop { position: absolute; z-index: 30; list-style: none; margin: 0; padding: 4px; min-width: 240px; background: var(--pane); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px -12px rgba(29, 34, 32, 0.35); }
.mention-pop li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 5px; cursor: default; }
.mention-pop li.on { background: var(--hover); }
.mention-pop li .h { margin-left: auto; color: var(--faint); font-size: 12px; }
.muted-line { color: var(--faint) !important; font-size: 13px; }
.app.in-inbox .list-row2 { display: none; }

/* ------------------------------------------------------------ command palette (SHIT-18) */
.pal-scrim { padding-top: 14vh; background: rgba(29, 34, 32, 0.22); }
.palette { width: min(640px, calc(100vw - 24px)); background: var(--pane); border-radius: 12px; box-shadow: 0 30px 70px -30px rgba(29, 34, 32, 0.55), 0 0 0 1px var(--line); display: flex; flex-direction: column; max-height: 66vh; overflow: hidden; }
.pal-head { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line-2); }
.pal-crumb { flex: none; font-size: 12px; color: var(--accent); background: var(--select); border-radius: 999px; padding: 2px 9px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 15px 0; font: inherit; font-size: 16px; }
.pal-input:focus { outline: none; }
.pal-list { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.pal-group { padding: 10px 10px 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.pal-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; cursor: default; min-width: 0; }
.pal-item.on { background: var(--select); }
.pal-ic { width: 16px; flex: none; display: grid; place-items: center; color: var(--muted); }
.pal-ic svg { width: 15px; height: 15px; }
.pal-ic .av { width: 18px; height: 18px; font-size: 9px; }
.pal-key { color: var(--muted); font-size: 12.5px; flex: none; }
.pal-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pal-sub { color: var(--faint); font-size: 12.5px; white-space: nowrap; flex: none; }
.pal-hint { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.pal-check { color: var(--accent); font-weight: 700; margin-left: auto; }
.pal-check + .pal-hint { margin-left: 8px; }
.pal-item kbd { margin-left: auto; }
.pal-empty { padding: 18px 12px; color: var(--muted); }
.pal-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line-2); color: var(--faint); font-size: 12px; }
.pal-foot kbd { margin-right: 3px; font-size: 11px; }
@media (max-width: 760px) { .pal-scrim { padding-top: 8vh; } .pal-foot { display: none; } .pal-hint { display: none; } }

/* ------------------------------------------------------------ export and backups (SHIT-19) */
.export-row { display: flex; align-items: flex-start; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.export-row > div { flex: 1; }
.export-row .note { margin: 2px 0 0; }
.export-row .btn { text-decoration: none; white-space: nowrap; }
.backup-status { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 12px 14px; background: var(--pane); border: 1px solid var(--line); border-left: 3px solid var(--done); border-radius: var(--radius); margin: 4px 0 8px; }
.backup-status.bad { border-left-color: var(--started); }
.backup-status span { color: var(--muted); grid-column: 1; }
.backup-status .btn { grid-column: 2; grid-row: 1 / 3; }
.table.backups td { font-size: 13px; }
.table.backups .btn.sm { text-decoration: none; margin-left: 4px; }
.settings code { background: var(--line-2); border-radius: 4px; padding: 1px 4px; font-size: 0.92em; word-break: break-all; }
.table.backups td .muted-tag { margin-left: 8px; }
.table.backups a.btn, .export-row a.btn { color: var(--ink-2); }

/* ------------------------------------------------------------ saved views (SHIT-9) */
.saved { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.saved[hidden], .app.in-docs .saved, .app.in-settings .saved { display: none; }
.sv { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--pane); max-width: 100%; }
.sv.on { border-color: var(--accent); background: var(--select); }
.sv-name { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 3px 9px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; border-radius: var(--radius); }
.sv-name:hover { color: var(--ink); }
.sv.on .sv-name { color: var(--ink); font-weight: 600; }
.sv-name svg { width: 12px; height: 12px; color: var(--muted); flex: none; }
.sv-more { border: 0; background: transparent; color: var(--faint); padding: 3px 5px 3px 0; display: grid; place-items: center; }
.sv-more:hover { color: var(--ink); }
.sv-more svg { width: 13px; height: 13px; }
.sv-save { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--line); background: transparent; border-radius: var(--radius); padding: 3px 9px; font-size: 12.5px; color: var(--muted); }
.sv-save:hover { color: var(--ink); border-color: var(--faint); }
.sv-save svg { width: 11px; height: 11px; }

/* ------------------------------------------------------------ time and clients (SHIT-23) */
.time-head { display: flex; align-items: center; gap: 4px; padding: 10px 14px 6px; border-bottom: 1px solid var(--line-2); }
.time-head .grow { flex: 1; }
.seg { display: inline-flex; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: var(--radius); padding: 3px 10px; color: var(--muted); }
.seg button:hover { background: var(--hover); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--select); color: var(--ink); font-weight: 600; }
.week-btn { border: 0; background: transparent; border-radius: var(--radius); padding: 3px 6px; color: var(--ink-2); font-size: 13px; }
.week-btn:hover { background: var(--hover); }
.icon-btn.flip svg { transform: scaleX(-1); }
.group-h .grow { flex: 1; }
.row.time-row { grid-template-columns: 16px 64px minmax(0, 1fr) 62px; color: inherit; text-decoration: none; }
.row.client-row { grid-template-columns: 26px minmax(0, 1fr) 56px 84px; color: inherit; text-decoration: none; }
.row .dur, .row .amt { text-align: right; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.row .amt { color: var(--muted); }
.tdot { display: inline-grid; place-items: center; width: 14px; height: 14px; color: var(--faint); }
.tdot svg { width: 14px; height: 14px; }
.tdot i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); animation: tpulse 2s ease-in-out infinite; }
@keyframes tpulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 6%, transparent); } }
@media (prefers-reduced-motion: reduce) { .tdot i { animation: none; } }
.row.running .dur { color: var(--accent); font-weight: 600; }
.cav { width: 22px; height: 22px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 600; background: var(--line-2); color: var(--ink-2); }
.timer-bar { display: flex; align-items: center; gap: 8px; margin: -2px 0 0; padding: 6px 8px 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: 13px; min-width: 0; }
.timer-bar .timer-key a { color: var(--muted); text-decoration: none; font-size: 12.5px; }
.timer-bar .timer-what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); text-decoration: none; }
.timer-bar .timer-what:hover { text-decoration: underline; }
.timer-clock { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.app.collapsed .timer-bar { display: none; }
.detail-bar .grow { flex: 1; }
.sheet { padding: 22px 28px 40px; max-width: 1040px; }
.sheet h3 { font-size: 15px; margin: 28px 0 8px; }
.sheet-sum { margin: 0 0 16px; color: var(--ink-2); }
.sheet-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--pane); }
.sheet-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.sheet-table th, .sheet-table td { padding: 8px 10px; border-top: 1px solid var(--line-2); text-align: left; font-weight: 400; white-space: nowrap; }
.sheet-table thead th { border-top: 0; color: var(--muted); font-size: 13px; }
.sheet-table th small { display: block; color: var(--faint); font-size: 11.5px; }
.sheet-table tfoot td { color: var(--ink-2); font-weight: 600; background: var(--paper); }
.sheet-table a, .table a { color: var(--ink); text-decoration: none; }
.sheet-table a:hover, .table a:hover { text-decoration: underline; }
.sheet-table .today { background: color-mix(in srgb, var(--select) 55%, transparent); }
.sheet-table .nil { color: var(--line); }
.sheet-table .quiet { color: var(--muted); }
.num { text-align: right !important; }
.entry-sum { margin: 0; color: var(--ink-2); }
.entry-sum a { color: var(--accent); }
.running-box { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.big-clock { font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 600; letter-spacing: -0.01em; color: var(--accent); }
.rate-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rate-form select { flex: 1 1 160px; min-width: 0; }
.rate-form input { flex: 0 1 130px; min-width: 0; }
.table.rates td:first-child { color: var(--ink-2); }
.mini-row.link-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
.mini-row.link-row a.t { color: inherit; text-decoration: none; }
.mini-row.time-mini { grid-template-columns: 56px minmax(0, 1fr) auto; }
textarea.addr { width: 100%; resize: vertical; }
.check-row { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; color: var(--ink-2); }
.check-row input { margin-top: 3px; }
.dialog .check-row { font-size: 13px; }
.table tr.muted-row td { color: var(--faint); }
.input.inline { padding: 3px 8px; border-color: transparent; background: transparent; }
.input.inline:hover { border-color: var(--line); }
@media (max-width: 760px) {
  .sheet { padding: 16px; }
  .row.client-row { grid-template-columns: 26px minmax(0, 1fr) 76px; }
  .row.client-row .dur { display: none; }
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* ------------------------------------------------------------ pricing and invoices (SHIT-24) */
.time-head .seg button { padding: 3px 8px; }
.row.inv-row { grid-template-columns: 16px 96px minmax(0, 1fr) 92px; color: inherit; text-decoration: none; }
.row.inv-row.overdue .sub { color: #8a4b12; }
.row.price-row { grid-template-columns: minmax(0, 1fr) auto; color: inherit; text-decoration: none; }
.row .amt small { color: var(--faint); font-size: 11.5px; }
.warn { color: #8a4b12; }
.table tr.overdue td { background: #fbf6ef; }
.prop-static.quiet, .quiet { color: var(--muted); }
.prop-static.small { font-size: 12.5px; padding-top: 0; }
.prop-static.unset { color: var(--faint); }
.prop-static a { color: var(--ink); text-decoration: none; }
.prop-static a:hover { text-decoration: underline; }
.time-prop { gap: 6px; flex-wrap: wrap; }
.time-prop > span:first-child { margin-right: 4px; }
.prop .prop-select { border: 0; background: transparent; padding: 5px 4px; margin-left: -4px; border-radius: var(--radius); font: inherit; }
.prop .prop-select:hover:not(:disabled) { background: var(--hover); }
.input.wide { width: 100%; }
.check-line { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 8px; }
.inv-preview { max-height: 240px; overflow: auto; margin: 6px 0 4px; }
.table.inv-mini td { padding: 6px 10px; font-size: 13px; }
.table.inv-mini tr.sum td { font-weight: 600; background: var(--paper); }
.mini-row.inv-mini { grid-template-columns: 16px 96px minmax(0, 1fr) auto; }
.inv-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.inv-actions .btn { width: 100%; }
.stack-form { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.stack-form .field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.stack-form .field-row .field { flex: 1 1 180px; }
.stack-form textarea { resize: vertical; }

/* The invoice as a page of paper */
.paper { background: var(--pane); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 36px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.paper.void { opacity: .7; }
.paper-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.paper-from { font-size: 18px; font-weight: 700; }
.paper-small { color: var(--muted); font-size: 13px; white-space: pre-line; margin-top: 2px; }
.paper-title { font-size: 24px; font-weight: 700; color: var(--accent); text-align: right; }
.paper-meta dl { display: grid; grid-template-columns: auto auto; gap: 2px 16px; margin: 6px 0 0; font-size: 13px; }
.paper-meta dt { color: var(--muted); }
.paper-meta dd { margin: 0; text-align: right; font-weight: 600; }
.paper-meta input[type="date"] { border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; font: inherit; font-weight: 400; }
.paper-to { margin: 24px 0 20px; }
.paper-to a { font-weight: 600; color: var(--ink); text-decoration: none; }
.paper-label { color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 2px; }
table.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lines th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.lines td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.lines tr.discount td { color: var(--ink-2); }
table.lines .line-note { color: var(--faint); font-size: 12px; margin-top: 2px; }
table.lines .x-cell { width: 28px; text-align: right; }
table.lines .x { border: 0; background: transparent; color: var(--faint); font-size: 16px; }
table.lines .x:hover { color: var(--ink); }
input.cell { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 2px 4px; margin: -3px -5px; font: inherit; }
input.cell:hover { border-color: var(--line); }
input.cell:focus { outline: none; border-color: var(--accent); background: var(--pane); }
input.cell.num { text-align: right; max-width: 90px; }
input.cell.pct { width: 52px; text-align: right; margin: 0 2px; }
.line-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 4px; padding: 10px; background: var(--paper); border-radius: var(--radius); }
.line-add .line-fields { display: contents; }
.line-add .input { min-width: 0; }
.line-add .grow { flex: 1 1 200px; }
.line-add .qty { width: 64px; }
.line-add .money { width: 110px; }
.line-add select { max-width: 280px; }
.totals { margin: 16px 0 0 auto; max-width: 320px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals > div span { color: var(--muted); }
.totals .grand { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-size: 16px; }
.totals .grand span { color: var(--ink); font-weight: 600; }
.totals .due { background: var(--select); border-radius: var(--radius); padding: 6px 10px; margin-top: 6px; color: var(--accent); }
.totals .due span { color: var(--accent); font-weight: 600; }
.paper-block { margin-top: 18px; }
.paper-block textarea, .paper-block input { width: 100%; }
@media (max-width: 760px) {
  .paper { padding: 18px 16px; }
  .paper-title, .paper-meta dd { text-align: left; }
  table.lines th:nth-child(2), table.lines td:nth-child(2) { display: none; }
  .row.inv-row { grid-template-columns: 16px 84px minmax(0, 1fr) 80px; }
}
@media print {
  .list, .detail-bar, .props, .line-add, .x-cell, table.lines th:last-child:empty, .timer-bar { display: none !important; }
  .app { display: block; }
  .issue.invoice { display: block; padding: 0; }
  .paper { border: 0; box-shadow: none; padding: 0; }
}
a.btn { text-decoration: none; color: var(--ink-2); display: inline-flex; align-items: center; }
a.btn.primary { color: var(--accent-ink); }

/* Autosave note. Tabular figures are off everywhere: in this face they also widen
   commas, periods and colons, which reads as a gap after punctuation. */
.save-pill {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px; border-radius: 999px;
  background: var(--pane); border: 1px solid var(--line); color: var(--muted);
  font-size: 12.5px; box-shadow: 0 2px 8px rgba(0,0,0,.06);
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.save-pill.on { opacity: 1; transform: none; }
.save-pill svg { width: 14px; height: 14px; color: var(--accent); }
.save-pill[data-state="saved"] { color: var(--ink-2); }
.save-pill .spin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); border-top-color: var(--muted); animation: sspin .8s linear infinite; }
@keyframes sspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .save-pill { transition: none; } .save-pill .spin { animation: none; } }
@media print { .save-pill { display: none !important; } }
.paper-logo { display: block; max-width: 220px; max-height: 66px; width: auto; height: auto; margin-bottom: 14px; }
.logo-row { display: flex; gap: 16px; align-items: flex-start; margin: 4px 0 18px; }
.logo-row .note { margin: 8px 0 0; max-width: 46ch; }
.logo-box { width: 220px; height: 80px; flex: none; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; display: grid; place-items: center; padding: 8px; }
.logo-box img { max-width: 100%; max-height: 100%; }
.logo-box span { color: var(--faint); font-size: 13px; }
@media (max-width: 760px) { .logo-row { flex-direction: column; } }

/* ------------------------------------------------------------ GitHub (SHIT-20) */
.mini-row.commit-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
.commit-row .sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--accent); text-decoration: none; }
.commit-row a.sha:hover { text-decoration: underline; }
.commit-row .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.commit-row .closes { font-size: 11.5px; color: var(--done); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.secret-box { background: var(--pane); border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; margin: 4px 0 18px; }
.secret-box ol { margin: 8px 0; padding-left: 20px; line-height: 1.9; }
.tfa-setup { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.tfa-qr svg { display: block; width: 180px; height: 180px; border: 1px solid var(--line); border-radius: var(--radius); }
.tfa-key { font-size: 14px !important; letter-spacing: 0.04em; }
.tfa-setup .inline-form .input { width: 110px; letter-spacing: 0.1em; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 18px; margin: 10px 0 12px; }
.recovery-codes code { font-size: 13.5px !important; }
.tfa-more { margin: 8px 0; }
.tfa-more summary { cursor: pointer; color: var(--ink-2); }
.tfa-more .stack-form { margin-top: 10px; }
.secret-box code { background: var(--line-2); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; word-break: break-all; }
.gh-table td { vertical-align: top; }
.gh-table .input.inline { width: 120px; }

/* Feedback from apps (SHIT-21) */
.inbox-h .link-btn.on { color: var(--ink); font-weight: 600; }
.inbox-h .link-btn .count { margin-left: 2px; }
.fb-row .udot { visibility: hidden; }
.triage-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; padding: 8px 10px; background: var(--pane); border: 1px solid var(--line); border-radius: var(--radius); }
.triage-bar .tb-l { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; color: var(--ink-2); font-weight: 500; }
.fb-list { display: flex; flex-direction: column; }
.fb-item { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.fb-item:last-child { border-bottom: 0; }
.fb-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.fb-who a { color: var(--muted); }
.fb-who .quiet { color: var(--faint); font-size: 12.5px; }
.fb-dev { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.code-block { background: var(--pane); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.6; overflow-x: auto; white-space: pre; }
.gh-table tr.revoked td { color: var(--faint); }
.note code, .secret-box li code:not(.copyable) { word-break: normal; overflow-wrap: anywhere; }

/* ------------------------------------------------------------ sidebar (SHIT-30) */
.side { grid-row: 1; background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 12px 10px 10px; }
.side-top { display: flex; align-items: center; gap: 8px; padding: 0 2px 10px 4px; }
.side-top .mark { flex: 1; font-size: 16px; }
.side-ws { width: 26px; height: 26px; flex: none; border: 0; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; padding: 0; }
.side-ws[tabindex="-1"] { cursor: default; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; }
.side-h { display: flex; align-items: center; padding: 14px 10px 4px; font-size: 12px; font-weight: 600; color: var(--faint); }
.side-add { margin-left: auto; width: 20px; height: 20px; border: 0; background: transparent; border-radius: 4px; color: var(--faint); display: grid; place-items: center; padding: 0; }
.side-add:hover { background: var(--hover); color: var(--ink); }
.side-add svg { width: 12px; height: 12px; }
.side-item { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; text-align: left; padding: 5px 10px; border-radius: var(--radius); color: var(--ink-2); font-weight: 500; font-size: 13.5px; min-height: 30px; position: relative; }
.side-item:hover { background: var(--hover); color: var(--ink); }
.side-item.on { background: var(--select); color: var(--ink); font-weight: 600; }
.side-item.side-more { color: var(--faint); font-weight: 500; }
.side-item.side-more:hover { color: var(--ink-2); }
.side-ic { width: 16px; height: 16px; flex: none; display: grid; place-items: center; color: var(--muted); }
.side-ic svg { width: 16px; height: 16px; }
.side-item.on .side-ic { color: var(--accent); }
.side-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-n { font-size: 12px; font-weight: 600; color: var(--accent); }
.side-k { font-size: 12px; color: var(--faint); font-weight: 500; }
.side-item.sub { padding-left: 35px; color: var(--muted); font-size: 13px; }
.side-item.sub.on { color: var(--ink); }
.pdot { width: 8px; height: 8px; border-radius: 50%; display: block; }
.pdot.all { background: transparent; border: 1.5px solid var(--faint); width: 9px; height: 9px; box-sizing: border-box; }
.side-foot { padding-top: 8px; border-top: 1px solid var(--line-2); margin-top: 6px; }
.rail-only { display: none; }
@media (min-width: 761px) { .app:not(.rail) .time-head .seg { display: none; } .app:not(.rail) .time-head:not(:has(.week-btn)) { display: none; } }
.side-scrim { display: none; }

/* shrunk: a rail of icons, each with its name under it */
@media (min-width: 761px) {
  .app.rail .side { padding: 10px 6px; align-items: stretch; }
  .app.rail .side-top { flex-direction: column; gap: 8px; padding: 2px 0 8px; }
  .app.rail .side-top .mark, .app.rail .full-only, .app.rail .side-add { display: none; }
  .app.rail .side-h { height: 1px; padding: 0; margin: 8px 12px; background: var(--line); font-size: 0; overflow: hidden; }
  .app.rail .rail-only { display: flex; }
  .app.rail .side-item { flex-direction: column; gap: 3px; padding: 7px 2px 6px; text-align: center; font-size: 10.5px; min-height: 0; }
  .app.rail .side-ic, .app.rail .side-ic svg { width: 18px; height: 18px; }
  .app.rail .side-t { flex: none; width: 100%; font-size: 10.5px; }
  .app.rail .side-n { position: absolute; top: 3px; right: 8px; font-size: 10px; }
  .app.rail .side-item.prod .side-t { display: none; }
  .app.rail .side-item.prod .side-k { color: inherit; font-size: 10.5px; }
  .app.rail .side-scroll { gap: 2px; }
  .app.rail .side-foot { border-top: 0; }
}

@media (max-width: 760px) {
  .app, .app.collapsed, .app.rail { grid-template-columns: 1fr; }
  .side { display: none; }
  .list-row1 .menu-btn { display: inline-grid; }
  .app.side-open .side { display: flex; position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(280px, 84vw); box-shadow: 0 10px 40px rgba(29, 34, 32, .18); }
  .app.side-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(29, 34, 32, .25); }
  .side-toggle { display: none; }
}

/* ------------------------------------------------------------ ops board (SHIT-22) */
.ops-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; background: var(--faint); }
.ops-dot.up { background: var(--done); }
.ops-dot.down { background: #9a5a1c; box-shadow: 0 0 0 3px #9a5a1c22; }
.ops-dot.paused, .ops-dot.unchecked { background: transparent; border: 1.5px solid var(--faint); box-sizing: border-box; }
.ops-row .udot { visibility: hidden; }
.ops-row { color: inherit; text-decoration: none; }
.ops-row .ib-top { padding-left: 2px; }
.ops-row .ib-line { padding-left: 18px; }
.ops-tag { font-size: 11px; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; flex: none; }
.ops-site { max-width: 920px; }
.ops-site a:not(.ops-problem):not(.sha) { color: var(--accent); text-decoration: none; }
.ops-site a:not(.ops-problem):not(.sha):hover { text-decoration: underline; }
.ops-h { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 24px; letter-spacing: -0.01em; }
.ops-h .ops-dot { width: 11px; height: 11px; }
.ops-err { margin: 10px 0 0; padding: 8px 12px; background: #f6efe4; border: 1px solid #e6d5bd; border-radius: var(--radius); color: #6e4517; font-size: 13px; }
.ops-problems { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.ops-problem { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--pane); color: var(--ink); text-decoration: none; }
.ops-problem:hover { background: var(--hover); }
.ops-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; margin: 20px 0 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--pane); }
.ops-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-right: 1px solid var(--line-2); }
.ops-stat:last-child { border-right: 0; }
.ops-stat span { font-size: 12px; color: var(--muted); }
.ops-stat b { font-size: 17px; font-weight: 650; }
.ops-stat small { font-size: 12px; color: var(--faint); }
.ops-chart { margin: 0; }
.ops-chart svg { width: 100%; height: 72px; display: block; background: var(--pane); border: 1px solid var(--line-2); border-radius: var(--radius); }
.ops-chart rect.ok { fill: #8fb5ad; }
.ops-chart rect.bad { fill: #9a5a1c; }
.ops-chart figcaption { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.ops-evs { border: 1px solid var(--line); border-radius: var(--radius); background: var(--pane); }
.ops-ev { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 12px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.ops-ev:last-child { border-bottom: 0; }
.ops-ev time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.ops-ev-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.ops-ev-note { color: var(--muted); overflow-wrap: anywhere; }
.ops-ev .sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--accent); text-decoration: none; }
.ops-res { font-size: 12px; font-weight: 600; white-space: nowrap; }
.ops-res.ok { color: var(--done); }
.ops-res.failed { color: #8a4b12; }
.ops-res.skipped { color: var(--faint); font-weight: 500; }
.ops-steps { display: inline-flex; gap: 4px; }
.ops-step { font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; color: var(--muted); }
.ops-step.bad { border-color: #d9c2a6; background: #f7efe4; color: #8a4b12; }
.ops-setup { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13.5px; }
.ops-setup dt { color: var(--muted); }
.ops-setup dd { margin: 0; overflow-wrap: anywhere; }
.ops-setup code { background: var(--line-2); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }
.ops-setup .warn { color: #8a4b12; font-size: 13px; }
@media (max-width: 760px) {
  .ops-ev { grid-template-columns: 76px minmax(0, 1fr); }
  .ops-ev time { grid-column: 2; }
  .ops-setup { grid-template-columns: 1fr; gap: 2px; }
  .ops-setup dd { margin-bottom: 8px; }
}

/* ------------------------------------------------------------ recurring issues (SHIT-26) */
.rec-row { color: inherit; text-decoration: none; }
.rec-row .udot { display: none; }
.row.rec-row { grid-template-columns: minmax(0, 1fr) auto; }
.rec-ic { width: 14px; height: 14px; color: var(--muted); flex: none; display: inline-grid; }
.rec-ic svg { width: 14px; height: 14px; }
.rec-row .ib-line { padding-left: 21px; }
.rec-edit { max-width: 820px; }
.rec-edit .rec-title { font-size: 18px; font-weight: 600; }
.rec-edit h3 { margin: 22px 0 6px; font-size: 15px; }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 14px; }
.rec-inline { display: flex; align-items: center; gap: 8px; }
.rec-inline .input { width: 92px; flex: none; }
.rec-inline span { color: var(--muted); font-size: 13px; }
.rec-slot { display: block; }
.rec-labels { text-align: left; min-height: 36px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; cursor: pointer; }
.rec-labels .unset { color: var(--faint); }
.rec-next { margin: 14px 0 4px; }
.rec-when { margin: 0; padding: 10px 12px; background: var(--pane); border: 1px solid var(--line); border-radius: var(--radius); }
.rec-actions { justify-content: flex-end; margin-top: 12px; }
.rec-dirty { margin-right: auto; color: var(--muted); font-size: 13px; }
.rec-edit .note.warn { color: #8a4b12; }
.rec-slot .input { width: 100%; }

/* ------------------------------------------------------------ weekly rollup (SHIT-27) */
.rollup-row { color: inherit; text-decoration: none; }
.rollup-row .udot { display: none; }
.rollup { max-width: 860px; }
.rollup h2 { margin: 0 0 10px; }
.rollup-summary { font-size: 16px; line-height: 1.55; margin: 0 0 6px; max-width: 70ch; }
.rollup-stats { margin-top: 14px; }
.rollup-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 10px 0 4px; }
.rollup .mini-row { grid-template-columns: 76px minmax(0, 1fr) auto; text-decoration: none; color: inherit; }
.rollup .mini-row .k { color: var(--muted); font-size: 12.5px; }
.rollup .mini-row .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.rollup-row { grid-template-columns: minmax(0, 1fr) auto; }
.rollup-when { display: flex; gap: 12px; max-width: 420px; }
.rollup-when .field { flex: 1; min-width: 0; }

/* ------------------------------------------------------------ secrets inventory (SHIT-25) */
.sec-row { color: inherit; text-decoration: none; }
.row.sec-row { grid-template-columns: minmax(0, 1fr); }
.sec-row .ib-top { padding-left: 2px; }
.sec-row .ib-line { padding-left: 18px; }
.sec-name, .sec-mono, .sec-names code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.sec-svc { font-size: 12px; color: var(--faint); flex: none; }
.sec-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; background: var(--done); }
.sec-dot.none { background: transparent; border: 1.5px solid var(--faint); box-sizing: border-box; }
.sec-dot.unknown { background: transparent; border: 1.5px dashed var(--started); box-sizing: border-box; }
.sec-dot.due { background: var(--started); }
.sec-dot.overdue, .sec-dot.missing { background: #9a5a1c; box-shadow: 0 0 0 3px #9a5a1c22; }
.sec-drift { padding: 10px 14px; border-bottom: 1px solid var(--line-2); display: grid; gap: 6px; justify-items: start; font-size: 13px; color: var(--ink-2); }
.sec-names { display: flex; flex-wrap: wrap; gap: 4px; color: var(--muted); }
.sec-names code { background: var(--line-2); border-radius: 4px; padding: 0 5px; color: var(--ink-2); }
.sec-edit { max-width: 820px; }
.sec-edit .sec-wide { grid-column: span 2; }
.sec-status { margin: 0 0 10px; font-weight: 500; }
.sec-status.overdue { color: #9a5a1c; }
.sec-status.due { color: var(--started); }
.sec-preview { margin-top: 18px; }
.sec-preview summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.sec-preview pre { white-space: pre-wrap; background: var(--line-2); border-radius: var(--radius); padding: 10px 12px; font-size: 12.5px; }
@media (max-width: 700px) { .sec-edit .sec-wide { grid-column: auto; } }
.sec-edit .rec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sec-status a { color: var(--accent); }
.mini-row.sec-rot { grid-template-columns: 92px minmax(0, 1fr) auto; }
.mini-row.sec-rot .key { white-space: nowrap; }
@media (max-width: 700px) { .sec-edit .rec-grid { grid-template-columns: minmax(0, 1fr); } }
.detail-bar .crumb { overflow: hidden; }
.detail-bar .crumb > * { white-space: nowrap; }
@media (max-width: 700px) { .detail-bar .crumb > span:not(:first-child) { display: none; } }

/* ------------------------------------------------------------ outgoing webhooks (SHIT-14) */
.hook-table td { vertical-align: top; }
.hook-table .hint-line { margin-top: 3px; }
.hook-table tr.off td:first-child b { color: var(--muted); }
.hook-table .actions { white-space: normal; }
.hook-table .actions .btn { margin: 0 4px 4px 0; }
.hook-st { font-size: 12.5px; font-weight: 600; color: var(--done); }
.hook-st.pending { color: var(--started); }
.hook-st.failed { color: #9a5a1c; }
.hook-form { margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.hook-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; }
.hook-events { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 4px 0 8px; }
.hook-events code { font-size: 11.5px; color: var(--faint); }
.hook-dels { max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.hook-del { padding: 8px 12px; border-top: 1px solid var(--line-2); }
.hook-del:first-child { border-top: 0; }
.hook-del-top { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.hook-del-top .grow { flex: 1; }
.hook-del .hint-line { margin-top: 3px; word-break: break-word; }
.hook-payload { white-space: pre-wrap; word-break: break-word; background: var(--line-2); border-radius: var(--radius); padding: 8px 10px; font-size: 12px; max-height: 300px; overflow: auto; margin: 8px 0 0; }
@media (max-width: 760px) { .hook-grid { grid-template-columns: minmax(0, 1fr); } }
.hook-table td:nth-child(2) { min-width: 170px; }

/* ------------------------------------------------------------ roadmap (SHIT-32) */
.row.rm-row { grid-template-columns: 10px minmax(0, 1fr) 48px 32px 44px; color: inherit; text-decoration: none; }
.rm-row .age.late { color: #9a5a1c; font-weight: 600; }
.group-note { color: var(--faint); font-weight: 400; margin-left: 6px; font-size: 12px; }
.rm-top { gap: 8px; flex-wrap: wrap; }
.rm-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 18px; border-bottom: 1px solid var(--line-2); font-size: 13px; background: var(--pane); }
.rm-pick .grow { flex: 1; }
.rm-pick .pbar { width: 60px; }
.rm-late { color: #9a5a1c; font-weight: 600; }
.rm-scroll { overflow: auto; position: relative; flex: 1; min-height: 0; max-height: calc(100vh - 150px); border-bottom: 1px solid var(--line-2); }
.rm-canvas { position: relative; min-height: 100%; padding-bottom: 12px; }
.rm-head { position: sticky; top: 0; z-index: 3; height: 30px; background: var(--paper); border-bottom: 1px solid var(--line); }
.rm-tick { position: absolute; top: 8px; font-size: 12px; color: var(--muted); padding-left: 6px; white-space: nowrap; }
.rm-tick.major { color: var(--ink-2); }
.rm-grid { position: absolute; inset: 30px 0 0 0; pointer-events: none; }
.rm-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.rm-today { position: absolute; top: -30px; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); opacity: .55; z-index: 2; }
.rm-prod { position: relative; padding: 4px 0 8px; border-bottom: 1px solid var(--line-2); }
.rm-ph { position: relative; height: 30px; }
.rm-pname { position: sticky; left: 0; z-index: 2; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 14px; font-weight: 600; font-size: 13px; background: linear-gradient(90deg, var(--paper) 85%, transparent); }
.rm-cycle { position: absolute; top: 22px; height: 5px; border-radius: 2px; background: var(--line-2); border: 1px solid var(--line); font-size: 0; overflow: hidden; }
.rm-cycle:hover { background: var(--hover); }
.rm-rel { position: absolute; top: 5px; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; margin-left: -4px; z-index: 1; }
.rm-rel i { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); border: 1.5px solid var(--done); background: var(--pane); }
.rm-rel.shipped i { background: var(--done); }
.rm-rel:hover { color: var(--accent); }
.rm-over { position: absolute; top: 0; height: 30px; background: repeating-linear-gradient(135deg, transparent 0 5px, #a8822a22 5px 7px); pointer-events: auto; }
.rm-lane { position: relative; height: 32px; }
.rm-empty { height: 26px; }
.rm-bar { position: absolute; top: 5px; height: 22px; border-radius: 5px; background: var(--line-2); border: 1px solid var(--line); border-left: 3px solid var(--pc); overflow: hidden; cursor: pointer; display: flex; align-items: center; user-select: none; touch-action: none; }
.rm-bar.can { cursor: grab; }
.rm-bar.dragging { cursor: grabbing; box-shadow: 0 2px 8px #0000001f; z-index: 4; }
.rm-bar:hover { border-color: var(--faint); border-left-color: var(--pc); }
.rm-bar.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.rm-fill { position: absolute; inset: 0 auto 0 0; background: var(--select); }
.rm-bar.done { opacity: .6; }
.rm-bar.late { border-right: 3px solid #9a5a1c; }
.rm-bar.open-s { border-left-style: dashed; }
.rm-bar.open-e { border-right: 1px dashed var(--faint); background: linear-gradient(90deg, var(--line-2) 70%, transparent); }
.rm-name { position: relative; padding: 0 10px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.rm-out { position: absolute; top: 8px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; pointer-events: none; }
.rm-h { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 1; }
.rm-h.l { left: 0; }
.rm-h.r { right: 0; }
.rm-ms { position: absolute; top: 10px; width: 11px; height: 11px; margin-left: -5px; transform: rotate(45deg); background: var(--pane); border: 1.5px solid var(--ink-2); border-radius: 2px; z-index: 3; cursor: grab; touch-action: none; }
.rm-ms.done { background: var(--done); border-color: var(--done); }
.rm-ms.late { border-color: #9a5a1c; }
.rm-tip { position: fixed; z-index: 50; background: var(--ink); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 4px; pointer-events: none; white-space: nowrap; }
.rm-hint { margin: 8px 18px; }
.rm-none { padding: 20px; }

/* ------------------------------------------------------------ client status page (SHIT-33) */
.share-block { display: grid; gap: 6px; justify-items: start; }
.share-h { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.share-on { font-size: 11.5px; color: var(--done); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.share-link { display: flex; gap: 12px; align-items: center; font-size: 13.5px; }
.share-link a { color: var(--accent); }
.share-block .hint-line { margin: 0; }
.row-actions .grow { flex: 1; }

/* SHIT-38 / SHIT-39: widget keys, client portal block, doc and release sharing */
.check-row .hint-line { display: block; font-weight: normal; }
.prop-check { padding: 6px 12px; font-size: 13px; }
.widget-key { margin: 0 0 14px; max-width: 720px; }
.widget-key.revoked { opacity: .6; }
.widget-snippet { white-space: pre-wrap; word-break: break-all; margin: 8px 0; }

/* SHIT-41, SHIT-43: Settings > Server > Workspaces */
.ws-table td.actions .btn + .btn { margin-left: 6px; }
.ws-table tr.ws-inactive td { color: var(--ink-2); }
.ws-off { font-weight: 600; color: #8a4b12; }
.ws-add { margin: 4px 0 18px; }
.ws-warn { border: 1px solid #d9c2a6; background: #fbf6ef; border-radius: var(--radius); padding: 12px 14px; max-width: 640px; }
.ws-warn p { margin: 0 0 10px; }
.ws-danger-h { font-weight: 700; color: #8a4b12; }
.ws-warn .stack-form { margin-top: 6px; }
.ws-table td { vertical-align: top; }
.ws-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ws-table select.input { max-width: 160px; }
.ws-pick td { background: var(--pane); }
.ws-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 16px; }
@media (max-width: 760px) {
  .ws-table, .ws-table tbody, .ws-table tr, .ws-table td { display: block; width: auto; }
  .ws-table tr:first-child { display: none; }
  .ws-table tr[data-ws-row] { border-top: 1px solid var(--line); padding: 10px 0 4px; }
  .ws-table td { border: 0; padding: 4px 12px; }
  .ws-table .num { display: none; }
  .ws-table select.input { max-width: none; width: 100%; }
  .ws-table td.actions { text-align: left; }
  .ws-table tr.ws-pick[hidden] { display: none; }
  .ws-features { grid-template-columns: 1fr 1fr; }
}

/* SHIT-45: plan */
.row.plan-row { grid-template-columns: 16px 64px minmax(0, 1fr) auto 22px 26px; }
.row.plan-row[draggable="true"] { cursor: grab; }
.ptype { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.plan-q { width: 24px; height: 24px; font-size: 15px; line-height: 1; color: var(--muted); }
.plan-q.on { color: var(--accent); }
.plan-list { min-height: 8px; }
.plan-list.drop-into { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 4px; }
.plan-empty { padding: 6px 14px 10px; color: var(--faint); font-size: 12.5px; }
.plan-sub { padding: 4px 14px 2px; color: var(--faint); font-size: 12px; }
.group-h.plan-proj a { color: inherit; text-decoration: none; }
.group-h.plan-proj a:hover { text-decoration: underline; }
.group-h .grow { flex: 1; }
.group-h .plan-later { font-weight: 400; font-size: 12px; color: var(--muted); }
.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.dragging { opacity: .45; }
.ptabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 14px; }
.ptabs button { background: none; border: 0; padding: 8px 10px 9px; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ptabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.ptabs .count { color: var(--faint); font-weight: 400; margin-left: 4px; }
.plan-help { margin-top: 0; }
.plan-sec .section-h { margin-bottom: 4px; }
.prow { display: grid; grid-template-columns: 14px 18px 16px 58px minmax(0, 1fr) auto 22px auto; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 4px; min-height: 34px; border-left: 2px solid transparent; }
.prow:hover { background: var(--hover); }
.prow.sel { background: var(--select); border-left-color: var(--accent); }
.prow:focus { outline: none; }
.prow:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.prow .grip { color: var(--faint); cursor: grab; font-size: 11px; letter-spacing: -2px; }
.prow .pos { color: var(--faint); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.prow .key { color: var(--muted); font-size: 12.5px; text-decoration: none; }
.prow .tcell { min-width: 0; display: flex; flex-direction: column; }
.prow .t { color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pmeta { color: var(--faint); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .t:hover { text-decoration: underline; }
.prow .pacts { display: flex; gap: 4px; justify-content: flex-end; }
@media (max-width: 760px) {
  .prow { grid-template-columns: 14px 16px 52px minmax(0, 1fr) auto; }
  .prow .pos, .prow .ptype, .prow > span[title] { display: none; }
}
.plan-mv { width: 24px; height: 24px; font-size: 14px; color: var(--muted); }
.plan-mv:hover { color: var(--ink); }

/* SHIT-65: an agent session working on the issue */
.claim-v { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 5px 0; min-width: 0; }
.claim-v .v { font-weight: 500; }
.claim-meta { color: var(--muted); font-size: 12px; }
.claim-v .btn { margin-left: auto; }
.agent-spend td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.agent-spend .over { color: var(--ink); font-weight: 600; }
.agent-spend .bar { display: block; height: 4px; border-radius: 2px; background: var(--hover); margin-top: 4px; overflow: hidden; min-width: 80px; }
.agent-spend .bar i { display: block; height: 100%; background: var(--accent); }
.agent-spend .bar.over i { background: var(--ink); }
.budget-input { width: 84px; }
