/* Projects view, on the design tokens (tokens.css, DESIGN.md): paper and type
   are neutral; the person's ink is the action colour; green means shared.
   Tokens the console doesn't define yet fall back to their light values here,
   so this page follows the console's palette until it moves onto tokens.css. */
.pj {
  --pj-hair: 1px solid var(--line);
  --pj-shared-wash: var(--shared-wash, #e6f0e9);
  --pj-card: var(--r-card, 16px);
  --pj-chip: var(--r-chip, 8px);
  --pj-lift: var(--lift, 0 1px 2px rgb(29 29 27 / 0.06), 0 6px 20px rgb(29 29 27 / 0.08));
}
.pj-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pj-glyph {
  width: 40px; height: 40px; flex: none; padding: 9px; border-radius: var(--r-ctl);
  background: var(--sunk); color: var(--ink-2);
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* header and tabs */
.pj-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s5); }
.pj-head .lede { margin-bottom: var(--s5); }
.pj-tabs { display: flex; gap: var(--s1); border-bottom: var(--pj-hair); margin-bottom: var(--s5); }
.pj-tabs a {
  display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3) var(--s3);
  text-decoration: none; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.pj-tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--me); }
.pj-tabs a:hover { color: var(--ink); }
.pj-count { font-size: var(--step--1); color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 500; }

/* buttons */
.pj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-ctl); border: 0; cursor: pointer;
  font-weight: 500; text-decoration: none; white-space: nowrap;
  /* Quiet by default: one filled button (.me) per screen at most. */
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
}
.pj-btn.me { background: var(--me); color: var(--on-ink, #fff); box-shadow: none; font-weight: 600; }
.pj-btn:not(.me):hover { background: var(--sunk); }
.pj-btn.me:hover { filter: brightness(1.08); }
.pj-btn:disabled { opacity: .5; cursor: default; }
.pj-btn.sm { min-height: 32px; padding: 0 var(--s3); font-size: var(--step--1); }
.pj-link { background: none; border: 0; padding: 0; color: var(--me); font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.pj-link.danger { color: var(--danger); }
.pj-icon {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--pj-chip);
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer; flex: none;
}
.pj-icon:hover { background: var(--sunk); color: var(--ink); }

/* project cards */
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
.pj-card {
  display: flex; flex-direction: column; gap: var(--s3); padding: var(--s4) var(--s5) var(--s4);
  background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card);
  text-decoration: none; color: inherit; min-height: 190px;
}
a.pj-card:hover { border-color: var(--ink-3); }
.pj-card-top { display: flex; gap: var(--s3); align-items: center; }
.pj-card-title { min-width: 0; }
.pj-card-title h3 { margin: 0; font-size: var(--step-1); line-height: 1.25; overflow-wrap: anywhere; }
.pj-card-title span { font-size: var(--step--1); color: var(--ink-3); }
.pj-preview { list-style: none; margin: 0; padding: 0; color: var(--ink-2); font-size: var(--step--1); display: grid; gap: 2px; }
.pj-preview li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-preview li::before { content: "·"; margin-right: var(--s2); color: var(--ink-3); }
.pj-progress { height: 4px; border-radius: 4px; background: var(--sunk); overflow: hidden; margin-top: auto; }
.pj-progress span { display: block; height: 100%; background: var(--ink-3); border-radius: 4px; }
.pj-meta { margin: 0; font-size: var(--step--1); color: var(--ink-3); }
.pj-card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.pj-desc { margin: 0; color: var(--ink-2); font-size: var(--step--1); }
.pj-tpl { min-height: 0; }
.pj-note { color: var(--ink-3); font-size: var(--step--1); margin: 0 0 var(--s4); max-width: 64ch; }

/* who sees it */
.pj-scope {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  font-size: var(--step--1); font-weight: 500; background: var(--sunk); color: var(--k, var(--ink-2));
}
.pj-scope .pj-i { width: 14px; height: 14px; }
.pj-scope.shared { background: var(--pj-shared-wash); color: var(--shared); }
.pj-badge {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--k); color: #fff; font-size: 13px; font-weight: 600; line-height: 1;
}
.pj-badge.sm { width: 24px; height: 24px; font-size: 11px; }
.pj-badge.xs { width: 18px; height: 18px; font-size: 10px; }
.pj-faces { display: inline-flex; }
.pj-faces .pj-badge { box-shadow: 0 0 0 2px var(--surface); }
.pj-faces .pj-badge + .pj-badge { margin-left: -6px; }

/* detail */
.pj-back { display: inline-flex; align-items: center; gap: var(--s1); margin-bottom: var(--s4); color: var(--ink-2); text-decoration: none; font-size: var(--step--1); }
.pj-back::before { content: "‹"; font-size: 1.3em; line-height: 1; }
.pj-back:hover { color: var(--ink); }
.pj-dhead { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s5); }
.pj-dhead .pj-glyph { width: 52px; height: 52px; padding: 12px; }
.pj-dtitle { flex: 1; min-width: 0; }
.pj-dtitle h1 { margin: 0; }
.pj-titlebtn { all: unset; cursor: text; border-radius: var(--pj-chip); padding: 0 var(--s1); margin-left: calc(-1 * var(--s1)); overflow-wrap: anywhere; }
.pj-titlebtn:hover { background: var(--sunk); }
.pj-titlebtn:focus-visible { outline: 2px solid var(--me); }
.pj-dactions { display: flex; align-items: center; gap: var(--s2); }
.pj-dtitle .pj-meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: 2px; }
/* Who sees it: a small muted chip by the subtitle (glyph and words); Share opens from it. */
.pj-scopechip { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: var(--step--1); color: var(--ink-3); background: none; border: 0; padding: 0; }
.pj-scopechip .pj-i { width: 12px; height: 12px; }
.pj-scopechip.shared .pj-i { color: var(--shared); }
button.pj-scopechip { cursor: pointer; border-radius: var(--pj-chip); }
button.pj-scopechip:hover { color: var(--ink); }
button.pj-scopechip:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.pj-card-meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: auto; }
.pj-main { position: relative; min-width: 0; }
.pj-descr {
  width: 100%; resize: none; border: 0; background: transparent; color: var(--ink-2); padding: var(--s1) 0; margin-bottom: var(--s4);
  font-size: var(--step-0); line-height: 1.5; overflow: hidden; border-radius: var(--pj-chip);
}
.pj-descr:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding: var(--s2); }

.pj-section { margin-bottom: var(--s5); }
.pj-shead { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s2); font-size: var(--step--1); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
.pj-blocks { list-style: none; margin: 0; padding: 0; background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); overflow: hidden; }
.pj-blocks:empty { display: none; }
.pj-block { display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: var(--s1) var(--s2) var(--s1) var(--s1); border-top: var(--pj-hair); }
.pj-block:first-child { border-top: 0; }
.pj-block > .pj-i { color: var(--ink-3); margin: 0 7px; }
.pj-block.dragging { opacity: .45; }
.pj-grip { cursor: grab; opacity: 0; width: 24px; }
.pj-block:hover .pj-grip, .pj-grip:focus-visible { opacity: 1; }
.pj-rm { opacity: 0; }
.pj-block:hover .pj-rm, .pj-rm:focus-visible { opacity: 1; }
.pj-text {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: var(--s2) var(--s1); border-radius: var(--pj-chip);
  font-size: var(--step-0); line-height: 1.4; color: var(--ink);
}
.pj-text:focus { outline: none; background: var(--paper); }
.pj-text.done { color: var(--ink-3); text-decoration: line-through; }
/* An entry's words open its item sheet (nothing is edited in the row). */
.pj-open-item { font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.pj-open-item:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pj-open-item:focus-visible { outline: 2px solid var(--me); outline-offset: 1px; }
.pj-main-line .pj-open-item { align-self: flex-start; }
.pj-block:has(.pj-open-item) { cursor: pointer; }
.pj-notetext { resize: none; overflow: hidden; white-space: pre-wrap; }
.pj-main-line { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: var(--s2) var(--s1); }
.pj-main-line .pj-text { padding: 0; }
.pj-main-line a { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.pj-main-line a.pj-meta { color: var(--ink-3); font-weight: 400; text-decoration: none; }
.pj-main-line a.pj-meta:hover { text-decoration: underline; }
.pj-strong { font-weight: 500; }
.pj-open { all: unset; cursor: pointer; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; overflow-wrap: anywhere; }
.pj-open:hover { text-decoration-color: var(--ink-3); }
.pj-open:focus-visible { outline: 2px solid var(--me); border-radius: 4px; }
.pj-private { display: inline-flex; align-items: center; gap: var(--s1); flex-wrap: wrap; font-size: var(--step--1); color: var(--ink-2); margin-top: 2px; }
.pj-private .pj-i { width: 13px; height: 13px; }
.pj-by { display: inline-flex; }

/* checkbox: a real input, drawn as a rounded square in the person's ink */
.pj-check { position: relative; display: grid; place-items: center; width: 36px; height: 36px; flex: none; cursor: pointer; }
.pj-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pj-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--ink-3); transition: background .12s, border-color .12s; }
.pj-check input:checked + .pj-box { background: var(--me); border-color: var(--me); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 10.5 3.2 3L15 6.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pj-check input:focus-visible + .pj-box { outline: 2px solid var(--me); outline-offset: 2px; }

/* quick add */
.pj-add { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); padding: 0 var(--s2) 0 var(--s3); border-radius: var(--r-ctl); }
.pj-add:focus-within { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.pj-add-plus { color: var(--ink-3); font-size: 1.2em; width: 20px; text-align: center; }
.pj-add input { flex: 1; min-width: 0; width: auto; border: 0; background: transparent; padding: var(--s3) 0; font-size: var(--step-0); box-shadow: none; }
.pj-add input:focus { outline: none; }
.pj-add input::placeholder { color: var(--ink-3); }
.pj-add .pj-date { flex: none; width: auto; color: var(--ink-2); }
.pj-kind { flex: none; width: auto; min-height: 0; border: 0; background: transparent; color: var(--ink-3); font-size: var(--step--1); padding: var(--s1); border-radius: var(--pj-chip); opacity: 0; }
.pj-add:focus-within .pj-kind, .pj-add:hover .pj-kind { opacity: 1; }

/* drop files */
.pj-dropzone {
  display: none; position: absolute; inset: 0; place-items: center; border-radius: var(--pj-card);
  border: 2px dashed var(--me); background: color-mix(in srgb, var(--me-wash) 85%, transparent); color: var(--me); font-weight: 600; pointer-events: none;
}
.pj-main.over .pj-dropzone { display: grid; }

/* mail or events that may belong here: one small inline row each, only when there is one */
.pj-sugg { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s1); }
.pj-sugg li { display: flex; align-items: center; gap: var(--s3); padding: var(--s1) var(--s1) var(--s1) var(--s3); border: var(--pj-hair); border-radius: var(--r-ctl); background: var(--surface); }
.pj-sugg li .pj-open { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-sugg li .pj-meta { margin-right: auto; white-space: nowrap; }

.pj-summary { background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); padding: var(--s4) var(--s5); margin-bottom: var(--s5); }
.pj-summary-head { display: flex; justify-content: space-between; align-items: center; }
.pj-summary h2 { margin: 0; font-size: var(--step-0); }
.pj-status { margin: 0; color: var(--ink-2); }
.pj-answer p { margin: var(--s2) 0; max-width: 68ch; }

/* dialogs */
.pj-dialog {
  position: fixed; inset: 0; margin: auto; height: fit-content; overflow: auto;
  width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0;
  border-radius: var(--pj-card); background: var(--surface); color: var(--ink); box-shadow: var(--pj-lift);
}
.pj-dialog::backdrop { background: rgb(29 29 27 / 0.32); }
.pj-form { padding: var(--s5); display: grid; gap: var(--s4); }
.pj-form h2 { margin: 0; font-size: var(--step-2); }
.pj-field { display: grid; gap: var(--s1); }
.pj-field span { font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.pj-field input { border: var(--pj-hair); border-radius: var(--r-ctl); padding: var(--s3); background: var(--paper); font-size: var(--step-1); }
.pj-field input:focus { outline: 2px solid var(--me); outline-offset: -1px; }
.pj-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.pj-form legend { font-size: var(--step--1); font-weight: 600; color: var(--ink-2); margin-bottom: var(--s2); padding: 0; }
.pj-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pj-tplopt, .pj-opt {
  position: relative; display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); cursor: pointer;
  border: var(--pj-hair); border-radius: var(--r-ctl); background: var(--surface);
}
.pj-tplopt .pj-glyph { width: 34px; height: 34px; padding: 7px; }
.pj-tplopt span, .pj-opt span { display: grid; gap: 2px; min-width: 0; }
.pj-tplopt small, .pj-opt small { color: var(--ink-3); font-size: var(--step--1); line-height: 1.35; }
.pj-tplopt input, .pj-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pj-tplopt:has(input:checked), .pj-opt:has(input:checked) { border-color: var(--me); box-shadow: inset 0 0 0 1px var(--me); background: var(--me-wash); }
.pj-tplopt:has(input:focus-visible), .pj-opt:has(input:focus-visible) { outline: 2px solid var(--me); outline-offset: 2px; }
.pj-opt:has(input:disabled) { opacity: .5; cursor: default; }
.pj-opt .pj-i { margin-top: 2px; color: var(--ink-2); }
.pj-people { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s1) 0 0 var(--s6); }
.pj-person { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3) var(--s1) var(--s1); border: var(--pj-hair); border-radius: 999px; cursor: pointer; }
.pj-person input { position: absolute; opacity: 0; }
.pj-person:has(input:checked) { border-color: var(--me); background: var(--me-wash); }
.pj-person:has(input:focus-visible) { outline: 2px solid var(--me); outline-offset: 2px; }
.pj-form-foot { display: flex; justify-content: flex-end; gap: var(--s2); }

@media (max-width: 640px) {
  .pj-head { flex-direction: column; }
  .pj-dhead { flex-wrap: wrap; }
  .pj-dtitle { flex-basis: calc(100% - 52px - var(--s4)); }
  .pj-dactions { flex-wrap: wrap; width: 100%; }
  .pj-tpls { grid-template-columns: 1fr; }
}
/* On touch, an entry has one control, its ⋯ (Remove and Move are in it); Edit brings the drag handle. */
@media (hover: none) { .pj-kind { opacity: 1; } .pj-block > .pj-grip, .pj-block > .pj-rm { display: none; } .pj-editing .pj-block > .pj-grip { display: inline-grid; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pj-box { transition: none; } }

/* weekly projects: the planned week, and each day's date by its heading */
.pj-week { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); color: var(--ink-2); font-size: var(--step--1); }
.pj-week strong { color: var(--ink); font-weight: 600; }
.pj-week .pj-icon { font-size: 1.2em; }
.pj-sdate { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.pj-sdate::before { content: "·"; margin: 0 var(--s2) 0 var(--s1); }
.pj-main-line > .pj-meta a { color: inherit; }
/* an empty day: one quiet slot, in place of the entry it will hold */
.pj-add-day { margin-top: 0; border: 1px dashed var(--line); border-radius: var(--pj-card); }
.pj-add-day:focus-within { border-style: solid; }
.pj-day { margin-bottom: var(--s4); }

/* a removal can be taken back */
.pj-undo {
  position: fixed; left: 50%; bottom: var(--s5); transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: var(--s4); padding: var(--s3) var(--s5);
  background: var(--surface); color: var(--ink); border: var(--pj-hair, 1px solid var(--line)); border-radius: 999px; box-shadow: var(--pj-lift);
}
.pj-removed { margin-top: var(--s2); font-size: var(--step--1); color: var(--ink-2); }
.pj-removed summary { cursor: pointer; }
.pj-removed ul { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s2); }
.pj-removed li { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.pj-removed small { display: block; color: var(--ink-3); }

/* ---------- typed collections (trackers and logs) ---------- */
.pj-coll { margin: 0 0 var(--s6); }
.pj-coll-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.pj-coll-head h2 { margin: 0; font-size: var(--step-1); display: flex; align-items: baseline; gap: var(--s2); }
.pj-coll-tools { display: flex; align-items: center; gap: var(--s2); }
.pj-seg { display: inline-flex; padding: 2px; border-radius: var(--r-ctl); background: var(--sunk); }
.pj-seg button { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: var(--step--1); font-weight: 500; padding: 6px var(--s3); border-radius: calc(var(--r-ctl) - 2px); cursor: pointer; min-height: 32px; }
.pj-seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.pj-coll-empty { margin: var(--s2) 0 var(--s3); }

/* summary rows: average, least, most */
.pj-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s2); margin: 0 0 var(--s3); }
.pj-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card, 16px); padding: var(--s3) var(--s4); }
.pj-stats dt { font-size: var(--step--1); color: var(--ink-2); }
.pj-stats dd { margin: 2px 0 0; font-size: var(--step-2); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.pj-stats dd.pj-meta { font-size: var(--step--1); font-weight: 400; color: var(--ink-3); }

/* list view */
.pj-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card, 16px); }
.pj-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pj-table th, .pj-table td { text-align: left; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); white-space: nowrap; font-size: var(--step-0); }
.pj-table thead th { border-top: 0; font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.pj-table tbody th { font-weight: 500; color: var(--ink); }
.pj-table .t-number, .pj-table .t-currency, .pj-table .t-duration { text-align: right; }
.pj-table .t-text { white-space: normal; min-width: 10ch; }
.pj-table .pj-computed { color: var(--ink-2); }
.pj-table thead .pj-computed::after { content: " ·auto"; font-weight: 400; color: var(--ink-3); }
.pj-row-actions { text-align: right; width: 1%; }
.pj-row-actions .pj-icon { opacity: 0; }
.pj-table tr:hover .pj-icon, .pj-row-actions .pj-icon:focus-visible { opacity: 1; }
@media (hover: none) { .pj-row-actions .pj-icon { opacity: 1; } }

/* add / edit a record: typed inputs */
.pj-rec-form { margin-top: var(--s3); display: flex; align-items: flex-end; gap: var(--s3); flex-wrap: wrap; padding: var(--s3); border: 1px dashed var(--line); border-radius: var(--r-card, 16px); }
.pj-rec-edit { border-style: solid; margin: 0; }
.pj-rec-fields { display: flex; flex-wrap: wrap; gap: var(--s3); flex: 1; }
.pj-rec-field { display: grid; gap: 2px; font-size: var(--step--1); color: var(--ink-2); }
.pj-rec-field input, .pj-rec-field select {
  min-height: 40px; padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--paper); color: var(--ink); font: inherit; font-size: var(--step-0);
}
.pj-rec-field input[type="checkbox"] { min-height: 0; width: 22px; height: 22px; margin: 9px 0; accent-color: var(--me); }
.pj-rec-field.t-text input { width: 16ch; }
.pj-rec-field.t-duration input, .pj-rec-field.t-number input, .pj-rec-field.t-currency input { width: 9ch; }
.pj-rec-field input:focus, .pj-rec-field select:focus { outline: 2px solid var(--me); outline-offset: -1px; }
.pj-rec-edit-foot { display: flex; gap: var(--s2); }

/* calendar view */
.pj-cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card, 16px); padding: var(--s3); }
.pj-cal-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.pj-cal-head .pj-meta { margin-left: auto; }
.pj-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.pj-cal-w { font-size: var(--step--1); color: var(--ink-3); text-align: center; padding: var(--s1) 0; }
.pj-cal-cell { min-height: 56px; border-radius: var(--r-chip, 8px); padding: var(--s1) var(--s2); display: flex; flex-direction: column; gap: 2px; background: var(--paper); }
.pj-cal-pad { background: transparent; }
.pj-cal-cell.has { background: var(--sunk); }
.pj-cal-cell.today .pj-cal-d { color: var(--me); font-weight: 700; }
.pj-cal-d { font-size: var(--step--1); color: var(--ink-3); }
.pj-cal-v { font-size: var(--step--1); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* chart: one series, neutral marks (colour means "whose" here), the average as a dashed line */
.pj-chart { position: relative; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card, 16px); padding: var(--s3); }
.pj-chart svg { width: 100%; height: auto; display: block; }
.pj-bar path { fill: var(--ink-3); }
.pj-bar:hover path, .pj-bar:focus path { fill: var(--ink-2); }
.pj-bar:focus { outline: none; }
.pj-bar-hit { fill: transparent; }
.pj-grid { stroke: var(--line); stroke-width: 1; }
.pj-axis { fill: var(--ink-3); font-size: 11px; font-family: var(--sans); }
.pj-avg { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; }
.pj-avg-label { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--sans); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.pj-tip { position: absolute; transform: translate(-50%, calc(-100% - 6px)); background: var(--ink); color: var(--paper); font-size: var(--step--1); padding: 4px 8px; border-radius: var(--r-chip, 8px); pointer-events: none; white-space: nowrap; }

/* field editor */
.pj-fields { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.pj-fields li { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.pj-fields input, .pj-add-field input, .pj-own-row input, .pj-fields select, .pj-add-field select, .pj-own-row select {
  min-height: 40px; padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--paper); color: var(--ink); font: inherit;
}
.pj-add-field, .pj-own { display: flex; gap: var(--s2); flex-wrap: wrap; }
.pj-own-row { display: flex; gap: var(--s2); width: 100%; }
.pj-own-row input { flex: 1; }
.pj-check-row { display: flex; align-items: center; gap: var(--s2); font-size: var(--step--1); color: var(--ink-2); }

/* what the project works out by itself: the budget */
.pj-auto { display: grid; gap: var(--s3); margin: 0 0 var(--s4); }
.pj-auto:empty { display: none; }
.pj-budget { background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); padding: var(--s4) var(--s5); }
.pj-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink-3); animation: pj-spin .8s linear infinite; }
@keyframes pj-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pj-spin { animation-duration: 2.4s; } }
.pj-budget-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.pj-month { display: inline-flex; align-items: center; gap: var(--s1); }
.pj-budget-total { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pj-budget-total strong { color: var(--ink); }
.pj-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.pj-bars li { display: grid; grid-template-columns: minmax(110px, 1.1fr) 3fr minmax(120px, auto); align-items: center; gap: var(--s3); font-variant-numeric: tabular-nums; }
.pj-bar-name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-bar { position: relative; height: 12px; background: var(--sunk); border-radius: 0 4px 4px 0; }
.pj-bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--ink-2); border-radius: 0 4px 4px 0; min-width: 1px; }
.pj-bar-limit { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); }
.pj-bar-val { text-align: right; white-space: nowrap; }
.pj-bar-val small { display: block; color: var(--ink-3); font-size: var(--step--1); }
.pj-bar-val small.over { color: var(--danger); font-weight: 600; }
.pj-toggle { display: flex; align-items: flex-start; gap: var(--s2); padding: var(--s2) 0; cursor: pointer; }
.pj-toggle input { margin-top: 3px; accent-color: var(--me); }
.pj-toggle span { display: flex; flex-direction: column; font-weight: 500; }
.pj-toggle small { color: var(--ink-3); font-weight: 400; font-size: var(--step--1); }
@media (max-width: 640px) { .pj-bars li { grid-template-columns: 1fr auto; } .pj-bar { grid-column: 1 / -1; grid-row: 2; } }

/* the data engine: chips, saved views, boards, history */
.pj-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--sunk); color: var(--ink); font-size: var(--step--1); line-height: 1.6; white-space: nowrap; }
.pj-viewpick select { min-height: 32px; border-radius: var(--pj-chip); border: var(--pj-hair); background: var(--surface); color: var(--ink); padding: 0 var(--s2); font: inherit; font-size: var(--step--1); }
.pj-more { position: relative; }
.pj-more > summary { list-style: none; cursor: pointer; }
.pj-more > summary::-webkit-details-marker { display: none; }
.pj-more-menu { position: absolute; right: 0; top: 36px; z-index: 5; display: grid; min-width: 180px; padding: var(--s1); background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-chip); box-shadow: var(--pj-lift); }
.pj-more-menu button, .pj-more-menu .pj-file-btn { text-align: left; background: none; border: 0; padding: var(--s2) var(--s3); border-radius: 6px; color: var(--ink); font: inherit; cursor: pointer; }
.pj-more-menu button:hover, .pj-more-menu .pj-file-btn:hover { background: var(--sunk); }
.pj-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: var(--s3); overflow-x: auto; padding-bottom: var(--s2); }
.pj-board-col { background: var(--sunk); border-radius: var(--pj-card); padding: var(--s3); min-height: 80px; }
.pj-board-col h3 { margin: 0 0 var(--s2); font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.pj-board-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.pj-card-rec { display: grid; gap: 4px; background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-chip); padding: var(--s2) var(--s3); }
.pj-card-rec .pj-move select { width: 100%; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: var(--step--1); padding: 0; }
.pj-history { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); max-height: 60vh; overflow: auto; }
.pj-history s { color: var(--ink-3); }
.pj-view-form fieldset { border: 0; padding: 0; margin: var(--s3) 0; display: grid; gap: var(--s2); }
.pj-view-form legend { font-weight: 600; margin-bottom: var(--s1); }
.pj-seg-field { grid-auto-flow: column; justify-content: start; }
.pj-cond { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s2); }
.pj-inline { display: flex; align-items: center; gap: var(--s2); }
.pj-new-extra { display: grid; gap: var(--s2); margin-top: var(--s2); }

/* ---------- editing by hand: Edit mode, selection, menus, the activity ---------- */
/* Simple by default: handles, menus and checkboxes show on hover, on focus, or in Edit mode. */
.pj-btn.danger { color: var(--danger); }
.pj-dactions .pj-btn .pj-i { width: 16px; height: 16px; }
.pj-banner { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin: calc(-1 * var(--s3)) 0 var(--s5); padding: var(--s2) var(--s4); border-radius: var(--r-ctl); background: var(--sunk); color: var(--ink-2); font-size: var(--step--1); }
.pj-about { display: grid; gap: 2px; margin: calc(-1 * var(--s3)) 0 var(--s4); }
.pj-about > span { font-size: var(--step--1); font-weight: 600; color: var(--ink-3); }
.pj-about .pj-descr { margin: 0; }
.pj-about .pj-descr[readonly] { cursor: default; }
.pj-editing .pj-abouttext { background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding: var(--s2); }

/* sections */
.pj-shead { min-height: 32px; }
.pj-smenu { width: 26px; height: 26px; margin-left: auto; opacity: 0; }
.pj-smenu .pj-i { width: 16px; height: 16px; }
.pj-shead:hover .pj-smenu, .pj-smenu:focus-visible, .pj-editing .pj-smenu { opacity: 1; }
.pj-shead-edit { text-transform: none; letter-spacing: 0; gap: var(--s1); }
.pj-sname {
  flex: 1; min-width: 0; max-width: 28ch; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--pj-chip);
  font: inherit; font-size: var(--step-0); font-weight: 600; padding: 4px var(--s2);
}
.pj-sname:focus { outline: 2px solid var(--me); outline-offset: -1px; }
.pj-sgrip { cursor: grab; width: 26px; height: 26px; }
.pj-section.dragging { opacity: .45; }
.pj-add-section { margin: 0 0 var(--s5); border: 1px dashed var(--line); }

/* entries: select, focus, who, menu, details */
.pj-block { flex-wrap: wrap; position: relative; }
.pj-block:focus { outline: none; }
.pj-block:focus-visible, .pj-block:focus { box-shadow: inset 0 0 0 2px var(--me); }
.pj-block.selected { background: var(--me-wash); }
.pj-block.selected .pj-text:focus { background: var(--surface); }
.pj-selbox { display: none; place-items: center; width: 28px; height: 36px; flex: none; cursor: pointer; }
.pj-selbox input { width: 16px; height: 16px; margin: 0; accent-color: var(--me); cursor: pointer; }
.pj-editing .pj-selbox, .pj-selecting .pj-selbox { display: grid; }
.pj-emenu { opacity: 0; }
.pj-emenu .pj-i { width: 16px; height: 16px; }
.pj-block:hover .pj-emenu, .pj-block:focus-within .pj-emenu, .pj-block:focus .pj-emenu, .pj-emenu:focus-visible, .pj-editing .pj-emenu { opacity: 1; }
.pj-whochip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--sunk); color: var(--k, var(--ink-2)); font-size: var(--step--1); font-weight: 500; flex: none; }
.pj-entry-more { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) 60px; border-top: 1px dashed var(--line); }
.pj-entry-more .pj-rec-field.wide { flex: 1 1 220px; }
.pj-entry-more .pj-rec-field.wide input { width: 100%; }
.pj-entry-more .pj-rec-field input:disabled { opacity: .5; }
.pj-entry-more-foot { display: flex; gap: var(--s2); margin-left: auto; }
.pj-block.open { background: var(--paper); }

/* the bar over a list while things are selected */
.pj-bulk-slot { position: sticky; top: var(--s3); z-index: 6; }
.pj-bulk-slot:empty { display: none; }
.pj-bulk {
  display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4);
  background: var(--surface); border: var(--pj-hair, 1px solid var(--line)); border-radius: var(--r-ctl); box-shadow: var(--pj-lift);
}
.pj-bulk strong { margin-right: var(--s2); font-variant-numeric: tabular-nums; }
.pj-bulk .pj-icon { margin-left: auto; }

/* menus and popovers (they float, so they lift) */
.pj-float {
  position: fixed; z-index: 60; min-width: 200px; max-width: min(340px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto;
  padding: var(--s1); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: var(--lift);
  font-size: var(--step-0);
}
.pj-menu { display: grid; }
.pj-menu button { display: flex; align-items: center; gap: var(--s2); text-align: left; background: none; border: 0; padding: var(--s2) var(--s3); border-radius: var(--r-chip); color: var(--ink); font: inherit; cursor: pointer; min-height: 34px; }
.pj-menu button small { margin-left: auto; color: var(--ink-3); font-size: var(--step--1); }
.pj-menu button.sub::after { content: "›"; margin-left: auto; color: var(--ink-3); }
.pj-menu button:hover, .pj-menu button:focus { background: var(--sunk); outline: none; }
.pj-menu button:focus-visible { outline: 2px solid var(--me); outline-offset: -2px; }
.pj-menu button.danger { color: var(--danger); }
.pj-menu button:disabled { color: var(--ink-3); cursor: default; background: none; }
.pj-menu .pj-menu-back { color: var(--ink-2); font-weight: 600; }
.pj-menu-tick { color: var(--me); width: 14px; }
.pj-menu button[aria-checked="false"] { padding-left: calc(var(--s3) + 14px + var(--s2)); }
.pj-menu hr { border: 0; border-top: 1px solid var(--line); margin: var(--s1) 0; }
.pj-pop { padding: var(--s3) var(--s4); }
.pj-pop form { display: grid; gap: var(--s3); }
.pj-pop h3 { margin: 0; font-size: var(--step-0); font-weight: 600; }
.pj-pop input, .pj-pop select { min-height: 36px; padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-chip); background: var(--paper); color: var(--ink); font: inherit; }
.pj-pop input:focus, .pj-pop select:focus { outline: 2px solid var(--me); outline-offset: -1px; }
.pj-pop-row { display: flex; gap: var(--s2); flex-wrap: wrap; }
.pj-pop-row label { display: grid; gap: 2px; font-size: var(--step--1); color: var(--ink-2); }
.pj-pop-foot { display: flex; justify-content: flex-end; gap: var(--s2); }
.pj-files { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.pj-files li { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }

/* the activity: who changed what, from where, with Undo on your own */
.pj-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(400px, 100vw); overflow: auto;
  padding: var(--s4) var(--s5) var(--s6); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--lift);
}
.pj-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s2); }
.pj-drawer-head h2 { margin: 0; font-size: var(--step-2); }
.pj-acts { list-style: none; margin: 0 0 var(--s4); padding: 0; }
.pj-acts li { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: start; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.pj-acts li:first-child { border-top: 0; }
.pj-acts p { margin: 0; overflow-wrap: anywhere; }
.pj-acts li.undone .pj-act-body > p:first-child { text-decoration: line-through; color: var(--ink-3); }
.pj-acts li.undone .pj-badge { opacity: .5; }
.pj-undone { font-weight: 600; color: var(--ink-2); }
.pj-auto-badge { background: var(--sunk); color: var(--ink-2); }
.pj-auto-badge .pj-i { width: 14px; height: 14px; }

/* index: archived and recently deleted, folded away */
.pj-shelf { margin-top: var(--s6); }
.pj-shelf > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: var(--s2) 0; }
.pj-shelf > summary .pj-count { margin-left: var(--s1); }
.pj-shelf > .pj-grid { margin-top: var(--s3); }
.pj-card.archived { opacity: .75; }
.pj-trash-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); }
.pj-trash-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-top: var(--pj-hair); }
.pj-trash-list li:first-child { border-top: 0; }
.pj-trash-list span { display: grid; gap: 2px; min-width: 0; }
.pj-trash-list small { color: var(--ink-3); font-size: var(--step--1); }

/* collections: handle in Edit mode, records select, edit in place, drag */
.pj-coll.dragging { opacity: .45; }
.pj-coll-head h2 { align-items: center; }
.pj-table th.pj-rowpick, .pj-table td.pj-rowpick { width: 1%; padding: 0 0 0 var(--s1); white-space: nowrap; }
.pj-rowpick .pj-grip { width: 22px; height: 28px; }
.pj-rowpick input { width: 15px; height: 15px; margin: 0 var(--s1); vertical-align: middle; accent-color: var(--me); opacity: 0; cursor: pointer; }
.pj-table tr:hover .pj-rowpick input, .pj-table tr:hover .pj-grip, .pj-table tr:focus-within .pj-rowpick input, .pj-rowpick input:focus-visible,
.pj-editing .pj-rowpick input, .pj-table tr.selected .pj-rowpick input, .pj-coll:has(tr.selected) .pj-rowpick input { opacity: 1; }
.pj-table tr:focus { outline: none; box-shadow: inset 0 0 0 2px var(--me); }
.pj-table tr.selected { background: var(--me-wash); }
.pj-table tr.dragging { opacity: .45; }
.pj-table .pj-editable { cursor: text; }
.pj-table tr:hover .pj-editable:hover { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.pj-table td.pj-cell-edit, .pj-table th.pj-cell-edit { padding: 2px var(--s1); }
.pj-cell-edit input, .pj-cell-edit select {
  min-height: 34px; width: 100%; min-width: 9ch; padding: 0 var(--s2); border: 1px solid var(--me); border-radius: var(--pj-chip); background: var(--surface); color: var(--ink); font: inherit;
}
.pj-cell-edit input:focus, .pj-cell-edit select:focus { outline: 2px solid var(--me); outline-offset: -1px; }
.pj-cell-edit input[type="checkbox"] { width: 18px; min-height: 0; min-width: 0; }
.pj-table td > input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--me); cursor: pointer; margin: 0; }
@media (hover: none) { .pj-rowpick input, .pj-smenu, .pj-emenu { opacity: 1; } }

.pj-table tr.tentative th, .pj-table tr.tentative td:not(.pj-row-actions):not(.pj-rowpick) { color: var(--ink-2); font-style: italic; }

/* options: what's decided, then what's still open */
.pj-opts { display: grid; gap: var(--s4); }
.pj-opt-group h3 { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s2); font-size: var(--step--1); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
.pj-decided, .pj-options { list-style: none; margin: 0; padding: 0; background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); overflow: hidden; }
.pj-decided li, .pj-option { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s2) var(--s2) var(--s2) var(--s4); min-height: 52px; border-top: var(--pj-hair); }
.pj-decided li:first-child, .pj-option:first-child { border-top: 0; }
.pj-decided li:focus, .pj-option:focus { outline: none; box-shadow: inset 0 0 0 2px var(--me); }
.pj-decided li.selected, .pj-option.selected { background: var(--me-wash); }
.pj-q { flex: 0 1 30%; min-width: 120px; color: var(--ink-2); font-size: var(--step--1); font-weight: 500; }
.pj-choice { flex: 1; min-width: 0; }
.pj-choice .pj-meta { display: block; }
.pj-tick { color: var(--me); font-weight: 700; margin-right: var(--s2); }
.pj-choice .pj-meta a, .pj-option .pj-meta a { color: inherit; }
.pj-price { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.pj-question { margin-bottom: var(--s4); }
.pj-question h4 { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s2); font-size: var(--step-0); font-weight: 600; }
.pj-option-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pj-option-main strong { font-weight: 500; overflow-wrap: anywhere; }
.pj-status { border: 0; cursor: pointer; font: inherit; font-size: var(--step--1); }
.pj-status::after { content: " ▾"; color: var(--ink-3); }
.pj-option.s-shortlisted .pj-status { background: var(--ink); color: var(--surface); }
.pj-option.s-shortlisted .pj-status::after { color: inherit; }
.pj-option.s-ruled-out .pj-option-main { color: var(--ink-3); text-decoration: line-through; }
.pj-option.s-ruled-out [data-choose] { visibility: hidden; }
.pj-option .pj-icon { opacity: 0; }
.pj-option:hover .pj-icon, .pj-option:focus-within .pj-icon, .pj-option:focus .pj-icon { opacity: 1; }
.pj-opt-add { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); padding: 0 var(--s2) 0 var(--s3); border-radius: var(--r-ctl); }
.pj-opt-add:focus-within { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.pj-opt-add input { border: 0; background: transparent; padding: var(--s3) 0; font: inherit; color: var(--ink); }
.pj-opt-add input[name="title"] { flex: 1; min-width: 14ch; }
.pj-opt-add input:focus { outline: none; }
.pj-opt-add .pj-opt-price { flex: none; width: 9ch; border-left: 1px solid var(--line) !important; padding-left: var(--s2) !important; }
.pj-opt-add .pj-btn { display: none; }
.pj-opt-add:focus-within .pj-btn { display: inline-flex; }
.pj-opt-read { flex-basis: 100%; padding: 0 0 var(--s2) 28px; }
.pj-opt-read:empty { display: none; }
.pj-add-question { margin-top: 0; }

/* field editor: order, settings, choices */
.pj-fields li { padding: var(--s1) 0; }
.pj-fields li.dragging { opacity: .45; }
.pj-fields li.hidden-field > input[name="name"] { color: var(--ink-3); }
.pj-field-move { display: inline-flex; }
.pj-field-move .pj-icon { width: 26px; height: 26px; }
.pj-field-more { flex-basis: 100%; margin-left: 52px; font-size: var(--step--1); color: var(--ink-2); }
.pj-field-more > summary { cursor: pointer; width: fit-content; }
.pj-field-more[open] { display: grid; gap: var(--s2); padding: var(--s2) 0 var(--s3); }
.pj-choices { display: grid; gap: var(--s1); }
.pj-choice-row { display: flex; gap: var(--s1); align-items: center; }
.pj-choice-row input { min-height: 34px; }
.pj-choices .pj-link { justify-self: start; }
.pj-move-list { max-height: min(320px, 45vh); overflow: auto; padding: 2px; align-content: start; }
.pj-move-list .pj-tplopt { padding: var(--s2) var(--s3); align-items: center; }
.pj-move-list legend { position: sticky; top: 0; }

/* ---------------------------------------------------------------- living projects (living.js)
   Summary first: at a glance, then the open questions with their options, what's decided, the
   plan as days, the lists, the logs and the brief. Neutral paper and type; the person's ink only
   on what they can press (Choose, Find options) and their own checkboxes. */
.pj-tpl-more { grid-column: 1 / -1; }
.pj-tpl-more > summary { cursor: pointer; color: var(--ink-2); font-size: var(--step--1); font-weight: 600; padding: var(--s1) 0; }
.pj-tpl-more > .pj-tpls { display: grid; gap: var(--s2); margin-top: var(--s2); }

.lv-eyebrow { margin: 0 0 var(--s3); font-size: var(--step--1); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); }
.lv-sec { margin: 0 0 var(--s6); }
.lv-h { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s3); font-size: var(--step-1); font-weight: 600; }

/* at a glance */
.lv-glance { background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); padding: var(--s5); margin-bottom: var(--s6); }
.lv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s4) var(--s5); margin: 0; }
.lv-facts div { min-width: 0; }
.lv-facts dt { font-size: var(--step--1); color: var(--ink-3); margin-bottom: 2px; }
.lv-facts dd { margin: 0; font-size: var(--step-1); font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.lv-empty { margin: 0; color: var(--ink-2); }
.lv-progress { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s4); border-top: var(--pj-hair); }
.lv-progress p { margin: 0; font-size: var(--step--1); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lv-bar { flex: 0 0 96px; height: 6px; border-radius: 6px; background: var(--sunk); overflow: hidden; }
.lv-bar span { display: block; height: 100%; border-radius: 6px; background: var(--ink-2); }
.lv-next { margin-top: var(--s5); }
.lv-next .lv-eyebrow { margin-bottom: var(--s2); }
.lv-next ul { list-style: none; margin: 0; padding: 0; display: grid; }
.lv-step { display: flex; align-items: center; gap: var(--s2); min-height: 44px; border-top: var(--pj-hair); }
.lv-step:first-child { border-top: 0; }
.lv-step .pj-check { width: 32px; height: 32px; }
.lv-step-i { display: grid; place-items: center; width: 32px; height: 32px; flex: none; color: var(--ink-3); }
.lv-step-text { all: unset; flex: 1; min-width: 0; padding: var(--s2) 0; cursor: pointer; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.lv-step-text:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.lv-step-text:focus-visible { outline: 2px solid var(--me); border-radius: 4px; }
.lv-step.k-find .lv-step-text, .lv-step.k-decide-by .lv-step-text { font-weight: 500; }

/* open questions */
.lv-q { background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); padding: var(--s4) var(--s4) var(--s3) var(--s5); margin-bottom: var(--s3); scroll-margin-top: var(--s8); }
.lv-q-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.lv-q-head h3 { margin: 0; font-size: var(--step-1); font-weight: 600; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lv-q-head .pj-icon { margin-left: auto; }
.lv-tags { display: inline-flex; gap: var(--s2); flex-wrap: wrap; }
.lv-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 6px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); font-size: var(--step--1); white-space: nowrap; }
.lv-tag .pj-i { width: 14px; height: 14px; }
.lv-tag.late { color: var(--danger); }
.lv-criteria { margin: var(--s1) 0 0; color: var(--ink-2); font-size: var(--step-0); max-width: 64ch; }
.lv-none { margin: var(--s3) 0 0; color: var(--ink-3); font-size: var(--step--1); }
.lv-opts { list-style: none; margin: var(--s3) 0 0; padding: 0; border-top: var(--pj-hair); }
.lv-questions { container-type: inline-size; }
.lv-opt { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) 0; border-bottom: var(--pj-hair); }
.lv-opt-side { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s1); flex: none; }
.lv-opt-acts { display: inline-flex; align-items: center; gap: var(--s2); }
@container (max-width: 540px) {
  .lv-opt { flex-wrap: wrap; gap: var(--s2); }
  .lv-opt-side { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
}
.lv-opt:focus { outline: none; box-shadow: inset 0 0 0 2px var(--me); }
.lv-opt.selected { background: var(--me-wash); }
.lv-opt-main { flex: 1 1 0; min-width: 0; display: grid; gap: 2px; padding-top: 2px; }
.lv-opt-main strong { font-weight: 500; overflow-wrap: anywhere; }
.lv-opt-main .pj-meta a { color: inherit; }
.lv-pc { display: flex; flex-wrap: wrap; gap: 2px var(--s3); font-size: var(--step--1); color: var(--ink-2); }
.lv-price { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); white-space: nowrap; line-height: 32px; }
.lv-opt .pj-icon { opacity: 0; }
.lv-opt:hover .pj-icon, .lv-opt:focus-within .pj-icon { opacity: 1; }
.lv-opt.s-shortlisted .pj-status, .lv-compare th.s-shortlisted .pj-status { background: var(--ink); color: var(--surface); }
.lv-opt.s-shortlisted .pj-status::after, .lv-compare th.s-shortlisted .pj-status::after { color: inherit; }
.lv-q-foot { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); }
.lv-q-foot .pj-opt-add { flex: 1 1 260px; margin-top: 0; }
.lv-q-foot .pj-opt-add input[name="title"] { flex: 1 1 0; min-width: 10ch; }
.lv-q-acts { display: inline-flex; gap: var(--s2); margin-left: auto; }

/* side by side */
.lv-compare-wrap { overflow-x: auto; margin: var(--s3) 0 0; border-top: var(--pj-hair); }
.lv-compare { border-collapse: collapse; width: 100%; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.lv-compare th, .lv-compare td { text-align: left; vertical-align: top; padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: var(--pj-hair); }
.lv-compare thead th { font-size: var(--step-0); font-weight: 600; color: var(--ink); min-width: 150px; }
.lv-compare thead th a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
.lv-compare thead th .pj-status { display: table; margin-top: var(--s1); }
.lv-compare tbody th { font-weight: 500; color: var(--ink-3); white-space: nowrap; width: 1%; }
.lv-compare td { color: var(--ink); }
.lv-compare td.t-currency { font-weight: 600; white-space: nowrap; }
.lv-compare td small { font-weight: 400; color: var(--ink-3); }
.lv-compare .lv-nil { color: var(--ink-3); }
.lv-compare-act td, .lv-compare-act th { border-bottom: 0; padding-top: var(--s3); }

.lv-add { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); padding: 0 var(--s2) 0 var(--s3); border-radius: var(--r-ctl); }
.lv-add:focus-within { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.lv-add input { flex: 1; min-width: 0; border: 0; background: transparent; padding: var(--s3) 0; font-size: var(--step-0); color: var(--ink); }
.lv-add input:focus { outline: none; }
.lv-add input::placeholder { color: var(--ink-3); }

/* decided */
.lv-decided { list-style: none; margin: 0; padding: 0; background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); overflow: hidden; }
.lv-decided li { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s3) var(--s3) var(--s5); border-top: var(--pj-hair); }
.lv-decided li:first-child { border-top: 0; }
.lv-topic { flex: 0 0 9.5rem; color: var(--ink-3); font-size: var(--step--1); font-weight: 500; }
.lv-val { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.lv-val strong { font-weight: 600; overflow-wrap: anywhere; }
.lv-val .pj-meta a, .lv-val .pj-meta .pj-link { color: var(--ink-2); font-weight: 400; }
.lv-src-i { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }

/* a timeline: days down a rail; a status at an open stage dashed and lighter, the rest solid */
.lv-day { position: relative; margin: 0 0 var(--s4); }
.lv-day h3 { margin: 0 0 var(--s2); font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.lv-stops { list-style: none; margin: 0; padding: 0 0 0 var(--s5); display: grid; gap: var(--s2); position: relative; }
.lv-stops::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--line); border-radius: 2px; }
.lv-stop { position: relative; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s4); border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); }
.lv-stop:focus { outline: none; box-shadow: 0 0 0 2px var(--me); }
.lv-dot { position: absolute; left: calc(-1 * var(--s5) + 2px); top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 3px var(--paper); }
.lv-time { flex: 0 0 4.75rem; font-size: var(--step--1); font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 500; }
.lv-stop-main { flex: 1 1 0; min-width: 0; display: grid; gap: 2px; }
.lv-stop-main strong { font-weight: 600; overflow-wrap: anywhere; }
.lv-stop.tentative { border-style: dashed; border-color: var(--ink-3); background: transparent; }
.lv-stop.tentative .lv-stop-main strong { font-weight: 500; color: var(--ink-2); }
.lv-stop.tentative .lv-time { color: var(--ink-3); }
.lv-stop.tentative .lv-dot { background: var(--paper); box-shadow: 0 0 0 3px var(--paper), inset 0 0 0 2px var(--ink-3); }
.lv-stop .lv-tag { flex: none; }
/* The Confirmed/Tentative switch takes the tag's place while the row is pointed at or focused. */
.lv-stop:hover .lv-tag, .lv-stop:focus-within .lv-tag, .lv-stop:focus .lv-tag { display: none; }
.lv-stop .pj-icon { opacity: 0; transition: opacity .12s; }
.lv-stop:hover .pj-icon, .lv-stop:focus-within .pj-icon { opacity: 1; }
.lv-plan-add > summary { cursor: pointer; color: var(--ink-2); font-size: var(--step--1); font-weight: 600; padding: var(--s2) 0; }
.lv-plan-add .pj-rec-form { margin-top: var(--s2); }

.lv-lists { margin-bottom: var(--s5); }
.lv-context .lv-brief { background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); padding: var(--s3) var(--s4); color: var(--ink); min-height: 3.5em; }
.lv-context .lv-brief:focus { box-shadow: 0 0 0 2px var(--me); padding: var(--s3) var(--s4); }
.lv-all { margin: 0 0 var(--s6); }
.lv-all > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: var(--s2) 0; }
.lv-all > summary .pj-meta { display: inline; font-weight: 400; margin-left: var(--s2); }
.lv-all[open] > summary { margin-bottom: var(--s4); }
.lv-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.pj-field select, .pj-field textarea { border: var(--pj-hair); border-radius: var(--r-ctl); padding: var(--s3); background: var(--paper); color: var(--ink); font: inherit; font-size: var(--step-0); }
.pj-field textarea { resize: vertical; }

@media (hover: none) {
  .lv-stop .pj-icon, .lv-opt .pj-icon { opacity: 1; }
  .lv-stop .lv-tag { display: none; }
}
@media (max-width: 640px) {
  .lv-glance { padding: var(--s4); }
  .lv-q { padding: var(--s3) var(--s3) var(--s2) var(--s4); }
  .lv-topic { flex-basis: 100%; }
  .lv-decided li { padding-left: var(--s4); }
  .lv-row { grid-template-columns: 1fr; }
  .lv-q-acts { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .lv-stop .pj-icon { transition: none; } }

/* Row actions wait for the pointer (or focus); on touch they always show. */
.lv-opt .lv-choose, .lv-decided .lv-reopen { opacity: 0; transition: opacity .12s; }
.lv-opt:hover .lv-choose, .lv-opt:focus-within .lv-choose, .lv-decided li:hover .lv-reopen, .lv-decided li:focus-within .lv-reopen { opacity: 1; }
@media (hover: none) { .lv-opt .lv-choose, .lv-decided .lv-reopen { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lv-opt .lv-choose, .lv-decided .lv-reopen { transition: none; } }

/* A table's add form opens from one quiet row; a long table shows its first rows. */
.pj-addrec > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); color: var(--ink-3); border-radius: var(--r-ctl); }
.pj-addrec > summary::-webkit-details-marker { display: none; }
.pj-addrec > summary::before { content: "+"; font-size: var(--step-1); line-height: 1; }
.pj-addrec > summary:hover { color: var(--ink); background: var(--sunk); }
.pj-addrec > summary:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.pj-addrec[open] > summary { color: var(--ink-2); }
.pj-more { background: none; border: 0; padding: var(--s2) var(--s3); color: var(--ink-2); font: inherit; font-size: var(--step--1); cursor: pointer; border-radius: var(--r-ctl); }
.pj-more:hover { color: var(--ink); background: var(--sunk); }

/* A planned week: one list, a row per day that has something; the day is a quiet label. */
.pj-weeklist { background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); margin-bottom: var(--s5); overflow: hidden; }
.pj-wrow { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); align-items: start; margin: 0; border-top: var(--pj-hair); }
.pj-wrow:first-child { border-top: 0; }
.pj-wday { margin: 0; padding: 15px 0 0 var(--s4); font-size: var(--step--1); font-weight: 600; color: var(--ink-2); display: grid; line-height: 1.3; }
.pj-wday small { font-weight: 400; color: var(--ink-3); }
.pj-wrow .pj-blocks { background: none; border: 0; border-radius: 0; }
.pj-wrow .pj-block:first-child { border-top: 0; }
/* Narrow: the day sits above its dinner as a small label. */
@media (max-width: 640px) {
  .pj-wrow { grid-template-columns: 1fr; }
  .pj-wday { display: flex; gap: var(--s2); align-items: baseline; padding: var(--s3) var(--s4) 0; }
  .pj-dactions { width: auto; margin-left: auto; }
}

/* The one add row at the end of a project. */
.pj-add-main { margin: 0 0 var(--s5); }
.pj-add-main:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* In-place adds inside a plan wait for the pointer (or focus); on touch they show. */
.lv-q .lv-opt-add, .lv-plan .lv-plan-add { opacity: 0; transition: opacity .12s; }
.lv-q:hover .lv-opt-add, .lv-q:focus-within .lv-opt-add, .lv-plan:hover .lv-plan-add, .lv-plan:focus-within .lv-plan-add, .lv-plan-add[open] { opacity: 1; }
.lv-decided .pj-meta { opacity: 0; transition: opacity .12s; }
.lv-decided li:hover .pj-meta, .lv-decided li:focus-within .pj-meta { opacity: 1; }
@media (hover: none) { .lv-q .lv-opt-add, .lv-plan .lv-plan-add, .lv-decided .pj-meta { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lv-q .lv-opt-add, .lv-plan .lv-plan-add, .lv-decided .pj-meta { transition: none; } }
.pj-tables { margin-top: var(--s6); }

/* Section heads read as titles, like the plan's own ("To do", not "TO DO"). */
.pj-shead { text-transform: none; letter-spacing: 0; font-size: var(--step-0); color: var(--ink); }
.lv-decided li { padding-top: var(--s2); padding-bottom: var(--s2); min-height: 44px; }
.lv-decided .lv-dmeta { margin-left: auto; white-space: nowrap; }

/* Checking off: struck and faded where it is for a moment (Undo in the toast), then it folds away. */
.pj-block.fading .pj-text, .pj-block.fading .pj-main-line { text-decoration: line-through; opacity: .45; transition: opacity .3s ease-out; }
.pj-block.leaving { animation: pj-leave .26s ease-out forwards; overflow: hidden; }
@keyframes pj-leave { to { opacity: 0; max-height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; } }
/* Just added: a short wash where it landed. */
.pj-block.just-added { animation: pj-added 1.6s ease-out; }
@keyframes pj-added { from { background: var(--me-wash); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .pj-block.leaving, .pj-block.just-added { animation: none; } }
/* Checked (n): one collapsed row at the bottom. */
.pj-checked { margin: 0 0 var(--s5); }
.pj-checked > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); color: var(--ink-2); font-weight: 600; border-radius: var(--r-ctl); }
.pj-checked > summary::-webkit-details-marker { display: none; }
.pj-checked > summary::before { content: "›"; color: var(--ink-3); transition: transform .12s; }
.pj-checked[open] > summary::before { transform: rotate(90deg); }
.pj-checked > summary:hover { background: var(--sunk); }
.pj-checked .pj-blocks { margin-top: var(--s2); }
.pj-checked .pj-text { color: var(--ink-3); text-decoration: line-through; }
.pj-add-main { margin: 0 0 var(--s4); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* The projects list: a card each, about a third of the width (one column on a phone): symbol, name and whose
   it is, then what its data says, then its next dated thing. The whole card is the tap target. */
.pj-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s3); }
.pj-pcard { display: grid; align-content: start; gap: 6px; min-height: 112px; padding: var(--s3) var(--s4) var(--s4); border-radius: var(--r-card, 14px);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: inherit; text-decoration: none; }
.pj-pcard:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.pj-pcard:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.pj-pcard-top { display: flex; align-items: center; gap: var(--s3); min-width: 0; margin-bottom: 2px; }
.pj-pcard-top .pj-glyph { width: 36px; height: 36px; padding: 8px; }
.pj-pcard-top .pj-initial { display: grid; place-items: center; padding: 0; font-weight: 600; font-size: var(--step-0); color: var(--ink-2); }
.pj-pcard-top strong { flex: 1; min-width: 0; font-size: var(--step-1); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-pcard-scope svg { width: 16px; height: 16px; display: block; color: var(--ink-3); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pj-pcard-status { color: var(--ink-2); font-size: var(--step--1); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pj-pcard-next { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: var(--step--1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-pcard-next svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pj-pcard.archived { opacity: .7; }

/* Drafts: one compact row each. */
.pj-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 0 var(--s5); }
.pj-row { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 2px var(--s2); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; border-radius: 0; }
.pj-row:hover { background: var(--sunk); }
.pj-row:focus-visible { outline: 2px solid var(--me); outline-offset: -2px; }
.pj-row .pj-glyph { width: 32px; height: 32px; padding: 7px; flex: none; }
.pj-row-main { flex: 1; min-width: 0; display: grid; }
.pj-row-main strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-row-main .pj-meta { overflow-wrap: anywhere; }
.pj-row-main .pj-meta > span { white-space: nowrap; }
.pj-row.archived { opacity: .7; }

/* ---------------------------------------------------------------- a project as data structures
   The page leads with what its data says (a strip of facts: big value, small label), then the open
   questions with their options as cards, then each collection in its layout (table with a totals row,
   timeline by day, board by status, chart over the last entries, cards, checklist), then the entries;
   Context and Activity one click away. Neutral paper and type; the person's ink only on what they press. */
.pj-recbtn { all: unset; cursor: pointer; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; border-radius: 4px; }
.pj-recbtn:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pj-recbtn:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.pj-mono { font-family: var(--mono); font-size: .92em; letter-spacing: .02em; }
.pj-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pj-chip.more { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }

/* facts */
.pj-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s4) var(--s5); margin: var(--s2) 0 var(--s6); padding: var(--s4) var(--s5); background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); }
.pj-fact { min-width: 0; display: flex; flex-direction: column; }
.pj-fact dt { order: 2; font-size: var(--step--1); color: var(--ink-3); margin-top: 2px; }
.pj-fact dd { margin: 0; }
.pj-fact .pj-fact-v { order: 1; font-size: var(--step-3); line-height: 1.1; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pj-fact .pj-fact-v.long { font-size: var(--step-1); line-height: 1.3; }
.pj-fact .pj-fact-v .pj-recbtn { font-weight: inherit; }
.pj-fact > .pj-meta { order: 3; font-size: var(--step--1); }
.pj-fact-acts { order: 4; display: flex; gap: var(--s2); align-items: baseline; min-height: 22px; opacity: 0; transition: opacity .12s; }
.pj-fact-acts .pj-meta a, .pj-fact-acts .pj-link { font-size: var(--step--1); color: var(--ink-2); }
.pj-fact:hover .pj-fact-acts, .pj-fact:focus-within .pj-fact-acts { opacity: 1; }
@media (hover: none) { .pj-fact-acts { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pj-fact-acts { transition: none; } }

/* collections in their layouts */
.pj-coll-head h2 .pj-count { font-weight: 500; }
.pj-viewpick select { border-color: transparent; background: transparent; color: var(--ink-3); }
.pj-viewpick select:hover, .pj-viewpick select:focus-visible { border-color: var(--line); background: var(--surface); color: var(--ink); }
.pj-pinned { margin-bottom: var(--s5); }
.pj-pinned .pj-coll-head { margin-bottom: var(--s2); }
.pj-table td.neg, .pj-table th.neg { color: var(--danger); }
.pj-table tfoot td { border-top: 2px solid var(--line); font-weight: 600; color: var(--ink); font-size: var(--step--1); }
.pj-table tfoot td.t-currency, .pj-table tfoot td.t-number, .pj-table tfoot td.t-duration { text-align: right; font-size: var(--step-0); }
.pj-table td.t-relation { white-space: normal; min-width: 12ch; }
.pj-row-actions .pj-icon { opacity: 0; }

/* timeline */
.pj-timeline .lv-day:last-child { margin-bottom: 0; }
.lv-stop-main .pj-recbtn { font-weight: 600; }
.lv-stop.tentative .lv-stop-main .pj-recbtn { font-weight: 500; color: var(--ink-2); }

/* board */
.pj-board-col { transition: box-shadow .12s; }
.pj-board-col.over { box-shadow: inset 0 0 0 2px var(--me); }
.pj-board-col h3 .pj-count { font-weight: 500; }
.pj-card-rec { cursor: grab; }
.pj-card-rec.dragging { opacity: .45; }
.pj-card-rec:focus { outline: none; box-shadow: 0 0 0 2px var(--me); }
.pj-card-rec .pj-recbtn { font-weight: 500; }
.pj-card-rec .t-currency { color: var(--ink); font-variant-numeric: tabular-nums; }
.pj-card-foot { display: flex; align-items: center; gap: var(--s1); }
.pj-card-foot .pj-move { flex: 1; }
.pj-card-foot .pj-icon, .pj-card-rec .pj-move select { opacity: 0; transition: opacity .12s; }
.pj-card-rec:hover .pj-card-foot .pj-icon, .pj-card-rec:focus-within .pj-card-foot .pj-icon, .pj-card-rec:hover .pj-move select, .pj-card-rec:focus-within .pj-move select { opacity: 1; }
@media (hover: none) { .pj-card-foot .pj-icon, .pj-card-rec .pj-move select { opacity: 1; } }

/* cards (options, recipes) */
.pj-rcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.pj-rcard { display: flex; flex-direction: column; background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); overflow: hidden; min-width: 0; }
.pj-rcard:focus { outline: none; box-shadow: 0 0 0 2px var(--me); }
.pj-rcard.selected { background: var(--me-wash); }
.pj-rcard-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--sunk); }
.pj-rcard-body { flex: 1; display: grid; align-content: start; gap: 4px; padding: var(--s3) var(--s4) var(--s2); }
.pj-rcard-title { font-size: var(--step-0); line-height: 1.35; }
.pj-rcard-price { font-size: var(--step-2); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.pj-rcard-price small { font-size: var(--step--1); font-weight: 400; color: var(--ink-3); }
.pj-rcard .pj-meta a { color: inherit; }
.pj-rcard-foot { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3) var(--s3) var(--s4); min-height: 32px; }
.pj-rcard-foot .pj-icon { margin-left: auto; opacity: 0; }
.pj-rcard .lv-choose { opacity: 0; transition: opacity .12s; }
.pj-rcard:hover .lv-choose, .pj-rcard:focus-within .lv-choose, .pj-rcard:hover .pj-rcard-foot .pj-icon, .pj-rcard:focus-within .pj-rcard-foot .pj-icon { opacity: 1; }
.pj-rcard.s-shortlisted .pj-status { background: var(--ink); color: var(--surface); }
.pj-rcard.s-decided { box-shadow: inset 0 0 0 2px var(--ink); }
.pj-rcard.s-ruled-out { opacity: .6; }
.pj-rcard.s-ruled-out .pj-rcard-title { text-decoration: line-through; text-decoration-color: var(--ink-3); }
@media (hover: none) { .pj-rcard .lv-choose, .pj-rcard-foot .pj-icon { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pj-rcard .lv-choose { transition: none; } }
.lv-cards { margin-top: var(--s3); }

/* checklist kept as records */
.pj-clist { list-style: none; margin: 0; padding: 0; }
.pj-crow { display: flex; align-items: center; gap: var(--s2); min-height: 40px; border-bottom: var(--pj-hair); }
.pj-crow .pj-recbtn { flex: 1; font-weight: 400; }
.pj-crow.done .pj-recbtn { color: var(--ink-3); text-decoration: line-through; }
.pj-crow .pj-icon { opacity: 0; }
.pj-crow:hover .pj-icon, .pj-crow:focus-within .pj-icon { opacity: 1; }

/* chart: the log's numbers, the bars, one add row, the entries */
.pj-l-chart .pj-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.pj-l-chart .pj-stats > div { padding: var(--s2) var(--s3); }
.pj-l-chart .pj-stats dd { font-size: var(--step-1); }
.pj-axis-d { font-size: 10px; }
.pj-l-chart .pj-chart { margin-bottom: var(--s3); }
.pj-rec-inline { margin: 0 0 var(--s2); padding: var(--s2) var(--s3); border-style: solid; background: var(--surface); flex-wrap: nowrap; align-items: flex-end; }
.pj-rec-inline .pj-rec-fields { flex-wrap: wrap; gap: var(--s2); }
.pj-rec-inline .pj-rec-field input { min-height: 34px; }
.pj-rec-inline .pj-rec-field.t-text input { width: 12ch; }

/* meal plan week */

/* Context and Activity, at the bottom */
.pj-foot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s2) var(--s5); margin: var(--s5) 0 var(--s6); padding-top: var(--s3); border-top: var(--pj-hair); }
.pj-context { flex: 1 1 100%; order: 2; }
.pj-context > summary, .pj-foot-act { cursor: pointer; color: var(--ink-2); font-size: var(--step--1); font-weight: 600; padding: var(--s1) 0; }
.pj-context:not([open]) { flex: 0 0 auto; order: 0; }
.pj-context[open] > summary { margin-bottom: var(--s3); }
.pj-foot-act { background: none; border: 0; font-family: inherit; }
.pj-foot-act:hover, .pj-context > summary:hover { color: var(--ink); }

/* An open question with no options yet is one row: its name, then the field to add the first. */
.lv-q.bare { display: flex; align-items: center; flex-wrap: wrap; gap: 0 var(--s4); padding: var(--s2) var(--s3) var(--s2) var(--s5); }
.lv-q.bare .lv-q-head { display: contents; }
.lv-q.bare .lv-q-head h3 { flex: none; }
.lv-q.bare .lv-criteria { order: 4; flex-basis: 100%; margin: 0 0 var(--s2); }
.lv-q.bare .lv-q-foot { order: 2; flex: 1 1 240px; margin-top: 0; }
.lv-q.bare .lv-q-head .pj-icon { order: 3; margin-left: 0; }
.pj-opt-add input::placeholder { color: var(--ink-3); }
/* Tables read as data: compact rows. */
.pj-table th, .pj-table td { padding-top: 6px; padding-bottom: 6px; }
.pj-table .pj-icon { width: 28px; height: 28px; min-width: 28px; min-height: 28px; }
/* A chart on paper: a line for values that barely move, bars otherwise; the numbers in one line above it. */
.pj-line { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pj-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.pj-bar:hover .pj-dot, .pj-bar:focus .pj-dot { fill: var(--ink); }
.pj-avg { stroke: var(--ink-3); stroke-width: 1.5; }
.pj-l-chart .pj-stats { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); margin: 0 0 var(--s3); }
.pj-l-chart .pj-stats > div { background: none; border: 0; padding: 0; display: grid; }
.pj-l-chart .pj-stats dt { order: 2; font-size: var(--step--1); color: var(--ink-3); }
.pj-l-chart .pj-stats dd { order: 1; font-size: var(--step-1); }
.pj-l-chart .pj-stats dd.pj-meta { order: 3; font-size: var(--step--1); }
.pj-l-chart .pj-chart { padding: var(--s2) var(--s3) var(--s1); }
/* The facts: big numbers on the paper, small words under them. */
.pj-facts { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s7); background: none; border: 0; border-radius: 0; padding: 0 0 var(--s5); border-bottom: var(--pj-hair); margin: var(--s3) 0 var(--s5); }
.pj-fact { max-width: 240px; }
/* Open questions with no options yet: one line of names. */
.lv-qchips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; }
.lv-qchip { display: contents; }
.lv-qchip .pj-chip { border: 0; cursor: pointer; font: inherit; font-size: var(--step--1); padding: 4px 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.lv-qchip .pj-chip:hover { background: var(--sunk); }
.lv-qchip .pj-chip:focus-visible { outline: 2px solid var(--me); outline-offset: 1px; }
.lv-qchip small { color: var(--ink-3); }
.lv-qchip small.late { color: var(--danger); }
/* A question with no options yet: its name and Suggest options, one pill (the name opens its menu). */
.lv-qchips .lv-qchip { display: inline-flex; align-items: stretch; margin: 0; padding: 0; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.lv-qchip .pj-chip { background: transparent; box-shadow: none; border-radius: 0; }
.lv-qchip .lv-qchip-sugg { min-height: 0; padding: 4px 12px 4px 9px; gap: 5px; border-radius: 0; box-shadow: inset 1px 0 0 var(--line); color: var(--ink-2); font-weight: 500; }
.lv-qchip .lv-qchip-sugg:hover { color: var(--ink); }
.lv-qchip .lv-qchip-sugg:focus-visible { outline: 2px solid var(--me); outline-offset: -2px; }
.lv-suggest .pj-i { width: 15px; height: 15px; }
.lv-q-foot .lv-suggest { color: var(--ink-2); }
.pj-rcard-note { font-size: var(--step--1); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* One list: section headings stay in view while their entries scroll. */
.pj-main .pj-entries > .pj-section > .pj-shead { position: sticky; top: 0; z-index: 2; background: var(--paper); padding: var(--s1) 0; }
.pj-sadd { opacity: .55; }
.pj-shead:hover .pj-sadd, .pj-sadd:focus-visible { opacity: 1; }
@media (hover: none) { .pj-sadd { opacity: 1; } }
.pj-add-sec { margin: 0 0 var(--s2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
/* Tabs: All, then a chip per section (with what's open in it). */
.pj-tabchips { display: flex; gap: var(--s2); flex-wrap: nowrap; overflow-x: auto; margin: 0 0 var(--s4); padding-bottom: 2px; scrollbar-width: none; }
.pj-tabchips button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--step--1); font-weight: 500; cursor: pointer; }
.pj-tabchips button span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pj-tabchips button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.pj-tabchips button[aria-selected="true"] span { color: inherit; opacity: .7; }
.pj-tabchips button:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.pj-entries.pj-intab > .pj-section > .pj-shead { display: none; }

/* ---------------------------------------------------------------- the page: its blocks in order */
.pj-page { display: flow-root; }
.pj-pb { position: relative; }
.pj-pb + .pj-pb { margin-top: 0; }
/* A block's star and ⋯: quiet until the block is pointed at (a starred one keeps its filled star). */
.pj-pb-tools { position: absolute; top: 0; right: 0; z-index: 3; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.pj-pb:hover > .pj-pb-tools, .pj-pb:focus-within > .pj-pb-tools, .pj-pb-tools.on { opacity: 1; }
.pj-pb-tools.on [data-bmenu] { opacity: 0; }
.pj-pb:hover > .pj-pb-tools.on [data-bmenu], .pj-pb:focus-within > .pj-pb-tools.on [data-bmenu] { opacity: 1; }
@media (hover: none) { .pj-pb-tools { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pj-pb-tools { transition: none; } }
.pj-star { font-size: 17px; line-height: 1; color: var(--ink-3); }
.pj-star.on { color: var(--me); }
.pj-star:hover { color: var(--ink); }
.pj-coll-tools .pj-star:not(.on) { opacity: 0; transition: opacity .12s; }
.pj-coll:hover .pj-coll-tools .pj-star, .pj-coll:focus-within .pj-coll-tools .pj-star { opacity: 1; }
@media (hover: none) { .pj-coll-tools .pj-star:not(.on) { opacity: 1; } }
.pj-pb-summary > .pj-statusline, .pj-pb-checklist .pj-pb-h, .pj-pb-questions .lv-h { padding-right: 72px; }
.pj-statusline { margin: 0 0 var(--s3); color: var(--ink-2); font-size: var(--step-0); }
.pj-pb-h { margin: 0 0 var(--s3); font-size: var(--step-1); display: flex; align-items: baseline; gap: var(--s2); }
.pj-pb-h .pj-count { font-weight: 500; }
.pj-pb-checklist { margin-bottom: var(--s6); }
.pj-pb-note { margin-bottom: var(--s5); }
.pj-pnote-text { max-width: 68ch; color: var(--ink); line-height: 1.5; padding-right: 72px; }
.pj-pnote-text p { margin: 0 0 var(--s2); }
.pj-pb-empty { margin: 0 0 var(--s4); }
/* Edit mode: each block with its handle, ↑ ↓ and ×; Add to the page and Reset layout under them. */
.pj-pb-bar { display: flex; align-items: center; gap: var(--s1); margin: 0 0 var(--s2); padding: 2px var(--s1); border-radius: var(--r-chip); background: var(--sunk); color: var(--ink-2); font-size: var(--step--1); }
.pj-pb-bar .pj-pb-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-pb-bar .pj-icon { width: 28px; height: 28px; }
.pj-pb-bar .pj-icon[disabled] { opacity: .35; cursor: default; }
.pj-pgrip { cursor: grab; }
.pj-editing .pj-pb { padding: var(--s2); margin-bottom: var(--s3); border: 1px dashed var(--line); border-radius: var(--pj-card); }
.pj-pb.dragging { opacity: .45; }
.pj-pb-add { display: flex; align-items: center; gap: var(--s4); margin: var(--s3) 0 var(--s6); }
.pj-pb-add select { border: var(--pj-hair); border-radius: var(--r-ctl); padding: var(--s2) var(--s3); background: var(--surface); color: var(--ink); font: inherit; }
.pj-pnote { width: 100%; }

/* ---------------------------------------------------------------- values by role */
/* A status's stage: open (not started, tentative) dashed; active solid; done green; dropped struck. Words always say it too. */
.pj-stage { border: 0; cursor: pointer; font: inherit; font-size: var(--step--1); }
.pj-chip.st-open, .pj-stage.st-open { background: transparent; box-shadow: inset 0 0 0 1px var(--ink-3); color: var(--ink-2); }
.pj-chip.st-open { box-shadow: none; outline: 1px dashed var(--ink-3); outline-offset: -1px; }
.pj-chip.st-active { background: var(--sunk); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); }
.pj-chip.st-done { background: var(--shared-wash); color: var(--shared); }
.pj-chip.st-dropped { background: transparent; color: var(--ink-3); text-decoration: line-through; }
.pj-stage:focus-visible { outline: 2px solid var(--me); outline-offset: 1px; }
.pj-board-col h3::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; background: var(--ink-3); }
.pj-board-col.st-open h3::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.pj-board-col.st-active h3::before { background: var(--ink-2); }
.pj-board-col.st-done h3::before { background: var(--shared); }
.pj-board-col.st-dropped h3::before { background: var(--line); }
.pj-board-col.st-none h3::before { display: none; }
.pj-card-img { width: 100%; height: 96px; object-fit: cover; border-radius: 6px; background: var(--sunk); }
.pj-card-rec.is-done .pj-recbtn, .pj-wk7-rec.is-done .pj-recbtn { color: var(--ink-3); }
.pj-table tr.is-done th, .pj-table tr.is-done td:not(.pj-row-actions):not(.pj-rowpick) { color: var(--ink-3); }
.pj-table tr.is-dropped th, .pj-table tr.is-dropped td:not(.pj-row-actions):not(.pj-rowpick) { color: var(--ink-3); text-decoration: line-through; }
.pj-table tr.is-dropped .pj-chip, .pj-table tr.is-done .pj-chip { text-decoration: none; }
.pj-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pj-late { color: var(--danger); font-weight: 600; }
.pj-thumb { display: block; width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--sunk); }
.pj-table td.t-image { padding-top: 4px; padding-bottom: 4px; }
.pj-chip.pj-person { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pj-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pj-need.open { background: transparent; outline: 1px dashed var(--ink-3); outline-offset: -1px; color: var(--ink-2); }
.pj-need.ok { background: var(--shared-wash); color: var(--shared); }
.pj-masked { font-family: var(--mono); letter-spacing: .04em; color: var(--ink-2); }
.pj-reveal { font-size: var(--step--1); color: var(--ink-3); margin-left: var(--s1); }
.pj-reveal:hover { color: var(--ink); }
.lv-stop.dropped { opacity: .6; }
.lv-stop.dropped .pj-recbtn { text-decoration: line-through; }
.lv-stop .pj-check { flex: none; }
.lv-stop.is-done .lv-stop-main .pj-recbtn { color: var(--ink-3); text-decoration: line-through; }

/* a card: one record's key facts, a deadline's countdown first */
.pj-factcard { position: relative; }
.pj-factcard .pj-fc { margin: 0 0 var(--s2); }
.pj-fc .pj-fc-lead .pj-fact-v { font-size: var(--step-4); }
.pj-fc .pj-fc-lead.late .pj-fact-v { color: var(--danger); }
.pj-fc .pj-fact-v.long a { color: var(--ink); }
.pj-fc .pj-fact-v .pj-reveal { font-weight: 400; }
.pj-fc-acts { position: absolute; right: var(--s3); bottom: var(--s3); display: flex; gap: var(--s2); align-items: center; opacity: 0; transition: opacity .12s; }
.pj-factcard:hover .pj-fc-acts, .pj-factcard:focus-within .pj-fc-acts { opacity: 1; }
@media (hover: none) { .pj-fc-acts { opacity: 1; } }
.pj-factcard.empty { padding: var(--s3) 0; }
.pj-l-card .pj-coll-head { margin-bottom: var(--s2); }
.pj-l-card .pj-facts { margin-bottom: 0; }

/* a week: Monday to Sunday of what's scheduled */
.pj-wk7-head { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font-size: var(--step--1); color: var(--ink-2); }
.pj-wk7-head strong { color: var(--ink); font-weight: 600; min-width: 9ch; text-align: center; }
.pj-wk7-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s2); }
.pj-wk7-day { display: flex; flex-direction: column; min-height: 112px; background: var(--surface); border: var(--pj-hair); border-radius: var(--r-ctl); padding: var(--s2) var(--s3); min-width: 0; }
.pj-wk7-day.today { box-shadow: inset 0 0 0 2px var(--ink); }
.pj-wk7-day h3 { margin: 0 0 var(--s1); display: flex; align-items: baseline; justify-content: space-between; gap: var(--s1); font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.pj-wk7-day h3 small { font-weight: 400; color: var(--ink-3); }
.pj-wk7-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pj-wk7-rec { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border-radius: 6px; }
.pj-wk7-rec:focus { outline: none; box-shadow: 0 0 0 2px var(--me); }
.pj-wk7-rec .pj-recbtn { font-weight: 500; text-align: left; line-height: 1.3; overflow-wrap: anywhere; }
.pj-wk7-rec.st-open .pj-recbtn { color: var(--ink-2); font-weight: 400; }
.pj-needs { font-size: var(--step--1); color: var(--ink-2); padding: 0 6px; border-radius: 999px; outline: 1px dashed var(--ink-3); outline-offset: -1px; }
.pj-needs.ok { outline: 0; color: var(--shared); background: var(--shared-wash); }
.pj-wk7-add { margin: auto 0 0; padding-top: var(--s1); }
.pj-wk7-add input { width: 100%; border: 0; background: transparent; font: inherit; color: var(--ink); padding: var(--s1) 0; }
.pj-wk7-add input::placeholder { color: var(--ink-3); }
.pj-wk7-add input:focus { outline: none; }
.pj-wk7-undated { margin: var(--s2) 0 0; }
@media (max-width: 900px) { .pj-wk7-days { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); } }

/* ---------------------------------------------------------------- a starred block, compact (compact.js, on Home) */
.cb { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.cb-line { margin: 0; color: var(--ink-2); font-size: var(--step--1); line-height: 1.4; }
.cb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--s2) var(--s4); margin: 0; }
.cb-fact { display: flex; flex-direction: column; min-width: 0; }
.cb-fact dt { order: 2; font-size: var(--step--1); color: var(--ink-3); }
.cb-fact dd { margin: 0; }
.cb-fact .cb-v { order: 1; font-size: var(--step-1); font-weight: 600; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cb-fact.lead .cb-v { font-size: var(--step-2); }
.cb-fact .cb-d { order: 3; font-size: var(--step--1); color: var(--ink-3); }
.cb-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cb-row { display: flex; align-items: baseline; gap: var(--s2); min-width: 0; min-height: 28px; }
.cb-row .cb-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cb-row .cb-m { flex: none; font-size: var(--step--1); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cb-row.done .cb-t { color: var(--ink-3); text-decoration: line-through; }
.cb-check { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin: 0; align-self: center; }
.cb-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--me); cursor: pointer; }
.cb-note { margin: 0; color: var(--ink); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cb-big { margin: 0; display: flex; align-items: baseline; gap: var(--s2); }
.cb-big .cb-n { font-size: var(--step-4); font-weight: 600; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cb-big .cb-u { font-size: var(--step-0); color: var(--ink-2); }

/* a countdown block: the days, big, what it's to, the date */
.pj-cdown { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin: 0 0 var(--s6); padding: var(--s4) var(--s5); background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); padding-right: 72px; }
.pj-cdown-n { font-size: calc(var(--step-4) * 1.25); font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.pj-cdown-w { font-size: var(--step-1); color: var(--ink-2); }
.pj-cdown-l { display: flex; flex-direction: column; margin-left: var(--s2); }
.pj-cdown-l strong { font-size: var(--step-1); font-weight: 600; }
.pj-cdown.past .pj-cdown-n { color: var(--ink-3); }
/* calendar events: an agenda by day */
.pj-agenda { margin: 0 0 var(--s6); }
.pj-agenda-days { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.pj-agenda-days h3 { margin: 0 0 var(--s1); font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.pj-agenda-days ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pj-agenda-ev { display: flex; gap: var(--s3); align-items: baseline; }
.pj-agenda-t { flex: none; width: 7ch; font-size: var(--step--1); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pj-agenda-what { display: flex; flex-direction: column; }
/* spending against the budget */
.pj-budgetblock { margin: 0 0 var(--s6); padding: var(--s4) var(--s5); background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); }
.pj-budgetblock .pj-budget-total { margin: 0 0 var(--s2); }
.pj-budgetblock .over { color: var(--danger); }
.pj-bar-big { display: block; height: 10px; }
.pj-bar-big.over .pj-bar-fill { background: var(--danger); }
.pj-budget-by { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 2px; font-size: var(--step--1); }
.pj-budget-by li { display: flex; justify-content: space-between; gap: var(--s3); }
.pj-budget-by li span { font-variant-numeric: tabular-nums; color: var(--ink-2); }
/* a row starred to Home */
tr.is-starred > th[scope="row"]::after, [data-rid].is-starred .pj-recbtn::after { content: " ★"; color: var(--me); font-size: .85em; }

/* a project drawn read-only (a draft's preview in chat): the page with nothing to change */
.pj-preview .pj-pb-tools, .pj-preview .pj-coll-tools, .pj-preview .pj-addrec, .pj-preview .pj-add, .pj-preview .pj-rec-form, .pj-preview [data-rec-menu],
.pj-preview .pj-grip, .pj-preview .pj-rowpick, .pj-preview .pj-fc-acts, .pj-preview .pj-wk7-add, .pj-preview .pj-wk7-head button, .pj-preview .pj-selbox,
.pj-preview .pj-rm, .pj-preview .pj-emenu, .pj-preview .pj-sadd, .pj-preview .pj-smenu, .pj-preview .pj-move, .pj-preview .pj-removed, .pj-preview .pj-checked,
.pj-preview .lv-q-foot, .pj-preview .lv-choose, .pj-preview .pj-reveal, .pj-preview .pj-row-actions { display: none !important; }
.pj-preview .pj-dhead { margin-bottom: var(--s4); }
.pj-preview .pj-sample { opacity: .55; }
.pj-sample-tag { display: inline-block; margin-left: var(--s2); padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 500; line-height: 1.6; color: var(--ink-2); background: var(--sunk); vertical-align: 1px; font-style: normal; text-decoration: none; }

/* ---------------------------------------------------------------- header, plan, people, money line (GET …/projects/:id header, plan) */
.pj-hmeta { color: var(--ink-3); }
.pj-hprogress { margin: 2px 0 0; font-size: var(--step--1); color: var(--ink-3); }
.pj-details { margin: calc(-1 * var(--s3)) 0 var(--s5); font-size: var(--step--1); }
.pj-details > summary { cursor: pointer; color: var(--ink-2); font-weight: 600; padding: var(--s1) 0; width: max-content; }
.pj-details > summary:hover { color: var(--ink); }
.pj-details dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--s1) var(--s4); margin: var(--s2) 0 0; }
.pj-details dl > div { display: contents; }
.pj-details dt { color: var(--ink-3); }
.pj-details dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* The plan: one timeline, slots with no day first, then by day. */
.pl { margin: 0 0 var(--s6); }
.pl .pj-coll { margin: 0; }
.pl-day + .pl-day { margin-top: var(--s4); }
.pl-dayh { margin: 0 0 var(--s2); font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.pl-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.pl-slot { display: grid; grid-template-columns: 4.5rem 1fr; gap: var(--s3); align-items: start; border-radius: var(--pj-chip); scroll-margin-top: var(--s8); }
.pl-time { font-size: var(--step--1); color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
/* Slots with no day yet: no time column. */
.pl-day-none .pl-slot { grid-template-columns: 1fr; }
.pl-day-none .pl-time { display: none; }
.pl-main { min-width: 0; }
.pl-line { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px var(--s2); }
.pl-name { all: unset; color: inherit; overflow-wrap: anywhere; }
button.pl-name { cursor: pointer; }
button.pl-name:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
button.pl-name:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.pl-of { color: var(--ink-3); }
.pl-of::after { content: ":"; }
.pl-chosen { font-weight: 600; }
.pl-chosen a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pl-q { font-weight: 600; }
.pl-slot.is-open .pl-q .pl-name { color: var(--ink); }
.pl-suggest { align-self: center; }
.pl-suggest.pj-icon { width: 28px; height: 28px; color: var(--ink-3); }
.pl-suggest.pj-btn { color: var(--ink-2); min-height: 28px; }
.pl-criteria { margin: 2px 0 0; }
/* Its options: a row of compact cards that scrolls sideways. */
.pl-cards { list-style: none; margin: var(--s2) 0 0; padding: 0 0 var(--s1); display: flex; gap: var(--s2); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
@media (max-width: 560px) {
  .pl-slot { grid-template-columns: 4.25rem 1fr; gap: var(--s2); }
  .pl-cards.op-cards > .op-card { flex-basis: 13rem; }
}

/* People: one compact row of names, each with its status and what they paid. */
.pj-roster-line { margin: calc(-1 * var(--s2)) 0 var(--s2); }
.pj-roster-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.pj-roster-p { display: inline-flex; align-items: baseline; gap: 6px; border-radius: var(--pj-chip); }
.pj-roster-p.is-dropped .pj-roster-name { color: var(--ink-3); text-decoration: line-through; }
.pj-roster-name { all: unset; cursor: pointer; color: var(--ink); font-weight: 500; }
.pj-roster-name:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pj-roster-name:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.pj-roster-p small { font-size: var(--step--1); color: var(--ink-3); }
.pj-roster-p small .st-open, .pj-roster-p small .st-active { color: var(--ink-2); }

/* The money line: one line, no panel. */
.pj-moneyline { margin: 0 0 var(--s5); font-size: var(--step-0); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px var(--s3); align-items: baseline; }
.pj-moneyline-h { font-weight: 600; color: var(--ink); }
.pj-pb-plan .pl > .pj-pb-h, .pj-pb-budget .pj-moneyline { padding-right: 72px; }

/* ---------------------------------------------------------------- the projects list: quiet filters, shared mark */
.pj-filters { display: flex; gap: var(--s1); margin: 0 0 var(--s4); }
.pj-filter { padding: 4px 12px; border-radius: 999px; color: var(--ink-2); font-size: var(--step--1); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.pj-filter:hover { color: var(--ink); }
.pj-filter[aria-current="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.pj-filter:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.pj-pcard-by { margin-top: -6px; color: var(--ink-3); font-size: var(--step--1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-tplopt { padding-right: var(--s6); }
.pj-tpl-del { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; opacity: 0; color: var(--ink-3); }
.pj-tplopt:hover .pj-tpl-del, .pj-tpl-del:focus-visible { opacity: 1; }
@media (hover: none) { .pj-tpl-del { opacity: 1; } }

/* ---------------------------------------------------------------- an option as a card (items.js) */
.op-cards { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--s2); }
.pl-cards.op-cards { display: flex; overflow-x: auto; padding: 0 0 var(--s1); scroll-snap-type: x proximity; scrollbar-width: thin; }
.pl-cards.op-cards > .op-card { flex: 0 0 15rem; scroll-snap-align: start; }
.op-card { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: var(--pj-hair); border-radius: var(--pj-card); overflow: hidden; font-size: var(--step--1); cursor: pointer; }
.op-card:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.op-card:focus { outline: 2px solid var(--me); outline-offset: 1px; }
.op-card.is-decided { box-shadow: inset 0 0 0 1px var(--ink-2); }
.op-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--sunk); }
.op-body { display: grid; gap: 2px; padding: var(--s2) var(--s3) 0; min-width: 0; }
.op-name { all: unset; cursor: pointer; font-size: var(--step-0); font-weight: 600; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-name:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.op-line { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.op-why { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-foot { display: flex; align-items: center; gap: var(--s1); margin-top: auto; padding: var(--s1) var(--s2) var(--s2) var(--s3); min-height: 40px; }
.op-foot .lv-choose { margin-left: auto; }
.op-link { width: 30px; height: 30px; color: var(--ink-3); }
.op-link:hover { color: var(--ink); }
.op-badge { font-size: var(--step--1); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 0 8px; }
.op-card .lv-choose { opacity: 0; transition: opacity .12s; }
.op-card:hover .lv-choose, .op-card:focus-within .lv-choose, .op-card:focus .lv-choose { opacity: 1; }
@media (hover: none) { .op-card .lv-choose { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .op-card .lv-choose { transition: none; } }
.op-more { margin-top: var(--s2); }
.op-more > summary { cursor: pointer; color: var(--ink-3); font-size: var(--step--1); width: fit-content; }
.op-more > summary:hover { color: var(--ink); }
.pj-question.is-decided h4 { display: flex; align-items: center; gap: var(--s2); }
.pj-question.is-decided h4 [data-reopen] { margin-left: auto; }

/* ---------------------------------------------------------------- sheets at the side (items.js) */
.it-sheet { position: fixed; inset: 0 0 0 auto; margin: 0; z-index: 45; width: min(480px, 100vw); height: 100vh; max-height: none; overflow: auto;
  padding: var(--s5) var(--s5) var(--s7); border: 0; border-left: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
/* The item sheet: a big title to edit, its details, the state and Add detail, Attachments, Notes, and its actions at the foot. */
.it-sheet-item { padding-bottom: 0; display: flex; flex-direction: column; }
.it-sheet-item[open] { display: flex; }
.it-item { display: flex; flex-direction: column; gap: var(--s4); flex: 1; }
.it-title { flex: 1; min-width: 0; margin: 0; padding: 2px var(--s1); border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink);
  font-family: inherit; font-size: var(--step-2); font-weight: 600; line-height: 1.25; resize: none; overflow: hidden; }
.it-title:hover { background: var(--paper); }
.it-title:focus { outline: none; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.it-head .pj-icon { flex: none; }
.it-details { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: var(--s4); row-gap: var(--s2); align-items: center; }
.it-detail { display: contents; }
.it-detail dt { color: var(--ink-3); font-size: var(--step--1); }
.it-detail dd { margin: 0; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.it-detail dd > input, .it-detail dd > select { flex: 1; min-width: 0; height: 36px; padding: 0 var(--s2); border: var(--pj-hair); border-radius: var(--r-ctl); background: var(--paper); color: inherit; font: inherit; box-sizing: border-box; }
.it-detail dd > input[type=time] { flex: 0 1 8.5em; }
.it-detail dd > input[type=checkbox] { flex: none; width: 18px; height: 18px; }
.it-detail dd > input:focus, .it-detail dd > select:focus { outline: 2px solid var(--me); outline-offset: -1px; }
.it-detail.ro dd span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.it-detail-rm { width: 28px; height: 28px; flex: none; color: var(--ink-3); opacity: 0; }
.it-detail:hover .it-detail-rm, .it-detail-rm:focus-visible { opacity: 1; }
@media (hover: none) { .it-detail-rm { opacity: 1; } }
.it-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0; }
.it-acts .it-state-slot, .it-acts .it-state { display: contents; }
.it-acts [hidden] { display: none; }
.it-sec h3 { margin: 0 0 var(--s2); font-size: var(--step--1); font-weight: 600; color: var(--ink-3); }
.it-sec .it-compose { margin-top: 0; }
.it-sec .it-notes { margin-top: var(--s3); }
.it-foot { position: sticky; bottom: 0; margin: auto calc(-1 * var(--s5)) 0; padding: var(--s3) var(--s5); display: flex; flex-wrap: wrap; gap: var(--s2);
  background: var(--surface); border-top: 1px solid var(--line); }
.it-foot .danger { margin-left: auto; }
.it-sheet.over { box-shadow: inset 0 0 0 2px var(--me), var(--lift); }
.it-close { position: absolute; top: var(--s3); right: var(--s3); z-index: 1; background: var(--surface); border-radius: 999px; box-shadow: var(--lift); }
.it-head { display: flex; align-items: flex-start; gap: var(--s2); padding-right: var(--s6); }
.it-head h2 { flex: 1; min-width: 0; margin: 0; font-size: var(--step-2); line-height: 1.25; overflow-wrap: anywhere; }
.op-sheet-img { display: block; width: calc(100% + 2 * var(--s5)); margin: calc(-1 * var(--s5)) calc(-1 * var(--s5)) var(--s4); aspect-ratio: 16 / 10; object-fit: cover; background: var(--sunk); }
.op-sheet p { margin: var(--s2) 0 0; }
.op-sheet-line { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.op-sheet-hours, .op-sheet-link { display: flex; align-items: center; gap: var(--s2); color: var(--ink-2); }
.op-sheet-hours svg, .op-sheet-link svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.op-sheet-why { line-height: 1.5; }
.op-sheet-acts { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }

/* the item sheet: notes, attachments, Waiting on… / Blocked */
.it-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s3) 0 0; }
.it-chip { all: unset; display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 999px; font-size: var(--step--1); line-height: 1.7; cursor: pointer; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  background: var(--sunk); color: var(--ink-2); }
.it-state .pj-link { color: var(--ink-3); }
.it-chip.is-blocked { background: none; color: var(--danger); box-shadow: inset 0 0 0 1px currentColor; }
.it-chip:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.it-compose { margin-top: var(--s4); display: grid; gap: var(--s2); }
.it-compose textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 64px; padding: var(--s2) var(--s3); border: var(--pj-hair); border-radius: var(--r-ctl); background: var(--paper); font: inherit; color: inherit; }
.it-compose textarea:focus { outline: 2px solid var(--me); outline-offset: -1px; }
.it-compose-foot { display: flex; align-items: center; justify-content: space-between; }
.it-pending, .it-atts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.it-pending li { position: relative; display: flex; align-items: center; gap: 4px; }
.it-pending img, .it-att img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-chip); background: var(--sunk); }
.it-pending .pj-icon { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; background: var(--surface); border-radius: 999px; box-shadow: var(--lift); }
.it-att { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: var(--step--1); text-decoration: none; }
.it-att:not(.img) { padding: 4px 10px; border-radius: var(--r-chip); box-shadow: inset 0 0 0 1px var(--line); }
.it-att:focus-visible { outline: 2px solid var(--me); outline-offset: 2px; }
.it-i { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.it-notes { list-style: none; margin: var(--s5) 0 0; padding: 0; }
.it-note { padding: var(--s3) 0; border-top: 1px solid var(--line); display: grid; gap: var(--s2); }
.it-note p { margin: 0; }
.it-note-head { display: flex; align-items: center; justify-content: space-between; color: var(--ink-3); font-size: var(--step--1); }
.it-note-rm { width: 26px; height: 26px; opacity: 0; color: var(--ink-3); }
.it-note:hover .it-note-rm, .it-note-rm:focus-visible { opacity: 1; }
@media (hover: none) { .it-note-rm { opacity: 1; } }
.it-note-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.it-drop { display: none; }
.it-sheet.over .it-drop { display: grid; place-items: center; position: absolute; inset: var(--s3); border: 2px dashed var(--me); border-radius: var(--pj-card); background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink-2); font-weight: 600; pointer-events: none; }

/* a row's preview of its item sheet */
.it-pv { display: flex; align-items: center; gap: var(--s2); min-width: 0; font-size: var(--step--1); color: var(--ink-3); margin-top: 2px; }
.it-pv-n { all: unset; display: inline-flex; align-items: center; gap: 3px; flex: none; cursor: pointer; color: var(--ink-3); font-variant-numeric: tabular-nums; border-radius: var(--r-chip); padding: 0 2px; }
.it-pv-n .it-i + .it-i, .it-pv-n .it-i:not(:first-child) { margin-left: 6px; }
.it-pv-n:hover { color: var(--ink); }
.it-pv-n:focus-visible { outline: 2px solid var(--me); outline-offset: 1px; }
.it-pv-latest { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-pv .it-chip { flex: none; font-size: var(--step--1); line-height: 1.5; }
th .it-pv { font-weight: normal; }
.pj-rec-more { flex-basis: 100%; }
.pj-rec-more > summary { cursor: pointer; color: var(--ink-3); font-size: var(--step--1); width: fit-content; padding: var(--s1) 0; }
.pj-rec-more > summary:hover { color: var(--ink); }
.pj-rec-more > .pj-rec-fields { margin-top: var(--s2); }
.pj-entry-more-rest { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); margin-top: var(--s2); }
@media (max-width: 640px) { .it-sheet { width: 100vw; border-left: 0; } }

/* ---------------------------------------------------------------- one way to add (a heading's +), and room for a block's tools */
.pj-coll-tools .pj-sadd { width: 28px; height: 28px; font-size: 18px; line-height: 1; color: var(--ink-2); }
.pj-coll > .pj-addrec-one, .pj-coll > .pj-addrow { margin: 0 0 var(--s3); }
.pj-addrow .pj-rec-form { padding: var(--s3); border: var(--pj-hair); border-radius: var(--pj-card); background: var(--surface); }
/* A checklist block's star and ⋯ sit at its top right: its first heading or field leaves them room. */
.pj-pb-checklist > .pj-entries > .pj-add-main:first-child,
.pj-pb-checklist > .pj-entries > .pj-section:first-child > .pj-shead,
.pj-pb-checklist > .pj-entries > .pj-section:first-child > .pj-add-sec:first-child { margin-right: 72px; }
.pj-entries > .pj-section + .pj-section { margin-top: var(--s5); }

/* ---------------------------------------------------------------- a picture, large (items.js openLightbox) */
.it-lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0, 0, 0, .88); color: #fff; }
.it-lightbox::backdrop { background: transparent; }
.it-lightbox[open] { display: grid; place-items: center; }
.it-lightbox figure { margin: 0; display: grid; justify-items: center; gap: var(--s2); max-width: calc(100vw - 2 * var(--s8)); }
.it-lightbox img { max-width: 100%; max-height: calc(100vh - 2 * var(--s7)); object-fit: contain; border-radius: var(--r-chip); background: #111; }
.it-lightbox figcaption { font-size: var(--step--1); color: rgba(255, 255, 255, .75); }
.it-lightbox .pj-icon { position: absolute; color: #fff; background: rgba(255, 255, 255, .12); border-radius: 999px; width: 40px; height: 40px; font-size: 24px; }
.it-lightbox .pj-icon:hover { background: rgba(255, 255, 255, .22); }
.it-lightbox .pj-icon:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.it-lb-close { top: var(--s4); right: var(--s4); }
.it-lb-prev { left: var(--s4); top: 50%; transform: translateY(-50%); }
.it-lb-next { right: var(--s4); top: 50%; transform: translateY(-50%); }
.it-atts .it-att.img { cursor: zoom-in; }
/* A reminder's row shows its notes and attachments like any item's. */
.rm-body .it-pv { margin-top: 2px; }
