/* Phase 118 (docs/design/PERSIST.md §4.11, §5.9): the goal and repeat chips above the composer,
   their cards, folded "no change" ticks, Planner → Repeats. Theme tokens only; 44 px targets. */
.persist-strip { display: flex; flex-direction: column; gap: 6px; margin: 0 0 6px; }
.ps-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); color: var(--text-1); }
.ps-chip .ps-text { font-weight: 600; flex: 1 1 12rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-chip .ps-icon { font-size: 1.1em; }
.ps-chip button { min-height: 44px; min-width: 44px; }
.ps-chip.ps-paused { border-color: var(--warn); }
.ps-chip.ps-done { border-color: var(--success); }
.ps-chip.ps-done.ps-review, .ps-chip.ps-stuck { border-color: var(--warn); }
.ps-ring { --ps-f: 0%; width: 22px; height: 22px; border-radius: 50%; flex: none; background: conic-gradient(var(--accent-solid) var(--ps-f), var(--line) 0); }
.ps-ring-0 { --ps-f: 0%; } .ps-ring-1 { --ps-f: 10%; } .ps-ring-2 { --ps-f: 20%; } .ps-ring-3 { --ps-f: 30%; }
.ps-ring-4 { --ps-f: 40%; } .ps-ring-5 { --ps-f: 50%; } .ps-ring-6 { --ps-f: 60%; } .ps-ring-7 { --ps-f: 70%; }
.ps-ring-8 { --ps-f: 80%; } .ps-ring-9 { --ps-f: 90%; } .ps-ring-10 { --ps-f: 100%; }
.persist-card { margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-1); color: var(--text-1); }
.ps-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ps-card-head .ps-x { min-width: 44px; min-height: 44px; }
.ps-card-body { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ps-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ps-field > span:first-child { min-width: 9rem; }
.ps-field textarea, .ps-field input, .ps-field select { flex: 1 1 14rem; min-height: 44px; }
.ps-checks { border: 1px solid var(--line); border-radius: var(--r-card); padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }
.ps-radio { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; min-height: 44px; text-align: start; }
.ps-radio input[type=radio] { width: auto; flex: 0 0 auto; margin: 0; min-height: 0; }
.ps-radio input:not([type=radio]) { flex: 1 1 200px; width: auto; }
.ps-checks legend { display: flex; align-items: center; gap: 6px; }
.ps-mono { font-family: var(--font-mono); font-size: 0.9em; padding: 1px 6px; border-radius: var(--r-control); background: var(--surface-2); }
.ps-cmd { flex: 1 1 14rem; min-height: 44px; }
.ps-caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 6px 12px; align-items: end; }
.ps-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ps-actions button { min-height: 44px; }
.ps-err { color: var(--danger); min-height: 1em; }
.ps-line { text-align: center; margin: 4px 0; }
.ps-fold { margin: 2px 0 2px 12px; }
.ps-fold summary { cursor: pointer; min-height: 32px; }
.ps-fold-body { padding: 4px 0 4px 12px; color: var(--text-2); }
.ps-rounds { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 4px; }
.ps-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ps-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 18rem; }
.ps-row-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ps-row-acts button { min-height: 44px; }
.ps-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 600px) {
  .ps-field > span:first-child { min-width: 0; flex-basis: 100%; }
  .ps-chip { gap: 4px 6px; padding: 4px 8px; }
  .ps-chip .ps-text { flex: 1 1 0; white-space: nowrap; }
  .ps-chip .ps-meta { flex-basis: 100%; order: 3; }
  .ps-chip button { order: 4; padding-inline: 10px; }
}

/* Phase 128 PL2c (POLISH2.md N17): Settings → Keep going and repeats as three choice cards (Careful,
   Normal, Long jobs; Custom only when the numbers are your own), the raw numbers under Fine-tune. */
.ps-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 10px; margin: 6px 0 12px; }
.ps-preset { position: relative; display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-1); color: var(--text-1); cursor: pointer; min-width: 0; }
.ps-preset[hidden] { display: none; }
.ps-preset input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ps-preset .ic { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--text-2); }
.ps-preset-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.ps-sum-line { display: block; }
.ps-preset.on { border-color: var(--accent-solid); background: var(--accent-soft); }
.ps-preset.on .ic { color: var(--accent-text); }
.ps-preset:focus-within { outline: 2px solid var(--accent-solid); outline-offset: 2px; }
.ps-fine { margin: 4px 0 10px; }
.ps-fine > summary { display: flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; font-weight: 600; }
.ps-fine h4 { margin: 10px 0 6px; }
/* R1C: what a check ran on, and other chats active on this project (web/project-now.js). */
.ps-basis-stale, .ps-basis-unknown { color: var(--warn); }
.project-now { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--warn-soft); color: var(--text-1); }
.project-now[hidden] { display: none; }
.project-now .pn-lead { font-weight: 600; }
.project-now .pn-item { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 2px; min-width: 0; overflow-wrap: anywhere; }
.project-now .pn-link { padding: 0 4px; min-height: 0; text-decoration: underline; }
/* E5: read together (web/read-together.js): the document above the chat, its bar, Follow and Share. */
.rt-panel { display: flex; flex-direction: column; gap: 4px; width: min(860px, calc(100% - 24px)); margin: 0 auto 6px; padding: 6px 10px; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2, transparent); }
.rt-panel[hidden] { display: none; }
.rt-bar, .rt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rt-now { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rt-follow { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.rt-follow input { margin: 0; width: auto; flex: none; }
.rt-note { margin: 0; }
.rt-text { max-height: 34vh; }
@media (max-width: 600px) { .rt-text { max-height: 28vh; } }
/* E6: the Feed tab (address, Open/Reload, the item list as text). */
.rt-tabs, .rt-feed-open { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rt-tabs [aria-selected="true"] { font-weight: 600; border-color: var(--accent-solid); }
.rt-pane[hidden], .rt-tabs[hidden] { display: none; }
.rt-feed-open input { flex: 1 1 14rem; min-width: 0; }
.rt-feed-title { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.rt-feed-items { list-style: none; margin: 0; padding: 0; max-height: 34vh; overflow: auto; }
.rt-feed-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.rt-feed-item.rt-shared .rt-feed-name { color: var(--accent-solid); }
.rt-feed-name { flex: 1 1 100%; overflow-wrap: anywhere; }
@media (max-width: 600px) { .rt-feed-items { max-height: 28vh; } }

/* ---------- V1 new look (docs/ops/V1_DESIGN.md §5), folded from the former pro.css ----------
   Outside Sara Classic these rules are scoped :where(:root:not([data-palette="classic"])) (zero
   specificity: each ties the rule it replaces and wins by coming later); decoration by
   html[data-decor="off"]. Kept at the end of this sheet on purpose. */
/* [cascade] not in style.css: must come after persist.css `.ps-preset.on` */
:where(:root:not([data-palette="classic"])) :is(.chip[aria-checked="true"], .chip.on, .tag-chip.on) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text-1); }
