/* Set-up, the bank-file upload, the payee questions and Settings (chunk 12b), drawn from the demo's
   SetUp, Upload2, UploadPhone2 and Settings2 screens. Tokens only (static/tokens.css); no shadows,
   no gradients. */

/* The page keeps the shell's full width and margins; only the form's own blocks are held to a
   readable measure (15 Nov 2026: capping the main squeezed it to a sliver on wide screens, because
   its side padding grows with the screen). */
.ps-form-main > * { max-width: 760px; }
.ps-form { display: flex; flex-direction: column; gap: 0; }

.ps-q { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 18px 0;
  border: 0; border-top: 1px solid var(--ps-line); min-width: 0; }
.ps-q legend { display: contents; }
.ps-qn { font-size: var(--ps-size-11); letter-spacing: .14em; text-transform: uppercase; color: var(--ps-ink-muted); }
.ps-qt { display: block; margin: 0; font-family: var(--ps-font-body); font-weight: var(--ps-weight-regular);
  font-size: var(--ps-size-19); line-height: 1.4; color: var(--ps-ink); }
.ps-qnote { font-size: var(--ps-size-13); color: var(--ps-ink-muted); line-height: 1.5; }
.ps-lead > .ps-pill-quiet { margin-top: 10px; }
.ps-problem { margin: 0; padding: 10px 14px; border: 1px solid var(--ps-pink-deep); border-radius: var(--ps-radius-card);
  color: var(--ps-ink); background: var(--ps-cream); }

/* Choices as pills (SetUp's chips) and the 1 to 7 scale as dots, each a real radio underneath. */
.ps-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-chip, .ps-dot { position: relative; display: inline-flex; cursor: pointer; }
.ps-chip input, .ps-dot input, .ps-tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ps-chip span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; box-sizing: border-box;
  border: 1px solid var(--ps-ink); border-radius: var(--ps-radius-pill); font-size: var(--ps-size-14); color: var(--ps-ink); }
.ps-dot span { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; box-sizing: border-box;
  border: 1px solid var(--ps-ink); border-radius: var(--ps-radius-pill); font-family: var(--ps-font-display);
  font-weight: var(--ps-weight-light); font-size: var(--ps-size-14); color: var(--ps-ink); }
.ps-chip input:checked + span, .ps-dot input:checked + span { background: var(--ps-ink); color: var(--ps-cream); }
.ps-chip input:focus-visible + span, .ps-dot input:focus-visible + span, .ps-tick input:focus-visible + span {
  outline: 2px solid var(--ps-ink); outline-offset: 2px; }
.ps-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.ps-field { display: flex; flex-direction: column; gap: 6px; }
.ps-label-in { font-size: var(--ps-size-13); color: var(--ps-ink-muted); }
.ps-field input[type=text], .ps-field input[type=email], .ps-field input[type=date], .ps-field textarea, .ps-field select {
  box-sizing: border-box; width: 100%; border: 0; border-bottom: 1px solid var(--ps-ink); border-radius: 0;
  padding: 6px 2px; background: transparent; font: inherit; font-size: var(--ps-size-18); line-height: 1.45; color: var(--ps-ink); resize: vertical; }
.ps-field-short input[type=text], .ps-field-short input[type=date] { max-width: 320px; height: 44px; font-family: var(--ps-font-display); font-weight: var(--ps-weight-light); }
.ps-field input:focus-visible, .ps-field textarea:focus-visible, .ps-field select:focus-visible {
  outline: 2px solid var(--ps-ink); outline-offset: 2px; }

.ps-form-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 18px; border-top: 1px solid var(--ps-line); }
/* The one act a form offers: the filled deep-green pill (shell design v2, answer 2), walnut under the pointer. */
.ps-go { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 24px; border: 0; border-radius: var(--ps-radius-pill);
  background: var(--ps-mean-normal-ink); color: var(--ps-cream); font: inherit; font-size: var(--ps-size-15); text-decoration: none; cursor: pointer;
  transition: background-color var(--ps-move-hover) var(--ps-ease); }
.ps-go:hover { background: var(--ps-ink); color: var(--ps-cream); }
.ps-go:focus-visible { outline: 2px solid var(--ps-ink); outline-offset: 3px; }
.ps-go-link { margin-left: 8px; height: 40px; }

/* The four steps of reading a statement. */
/* As the demo's Upload2: four equal parts, a 2px bar over each name; walnut once done, the deep
   green on the step reached (the demo's pink is kept for attention, 2.3). */
.ps-steps { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ps-step { flex: 1 1 0; min-width: 0; font-size: var(--ps-size-11); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ps-ink-muted); padding-top: 8px; border-top: 2px solid var(--ps-line); }
.ps-step-done { color: var(--ps-ink-muted); border-top-color: var(--ps-ink); }
.ps-step-on { color: var(--ps-ink); border-top-color: var(--ps-mean-normal-ink); }

/* A payee question: the answers as rows, as on UploadPhone2. */
.ps-choices { display: flex; flex-direction: column; }
.ps-choice { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 52px; padding: 0 2px;
  border: 0; border-bottom: 1px solid var(--ps-line-mid); background: transparent; font: inherit; font-size: var(--ps-size-16);
  color: var(--ps-ink); text-align: left; cursor: pointer; }
.ps-choice:hover { color: var(--ps-mean-normal-ink); }
.ps-choice:focus-visible, .ps-skip:focus-visible { outline: 2px solid var(--ps-ink); outline-offset: 2px; }
.ps-skip { align-self: flex-start; min-height: 44px; padding: 0 2px; border: 0; background: transparent; font: inherit;
  font-size: var(--ps-size-13); color: var(--ps-ink-muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.ps-tick { position: relative; display: flex; align-items: center; min-height: 44px; cursor: pointer; }
.ps-tick span { padding-left: 30px; position: relative; }
.ps-tick span::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 18px; margin-top: -10px;
  border: 1px solid var(--ps-ink); border-radius: 4px; }
.ps-tick input[type=radio] + span::before { border-radius: var(--ps-radius-pill); }
.ps-tick input:checked + span::before { background: var(--ps-ink); }
.ps-stop p { margin: 0; }
.ps-rest-row { display: flex; align-items: flex-end; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ps-line-mid); }
.ps-rest-row .ps-field { flex-grow: 1; min-width: 0; }

/* How much is known: money in and money out, against the gate. */
.ps-known, .ps-answered, .ps-set { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--ps-line); }
.ps-known h2, .ps-answered h2, .ps-set h2 { margin: 0; }
/* Will's answer 13 (17 Nov): answers after the third fold under a pill; open, the pill stays to fold them again */
.ps-answered-more > summary { list-style: none; align-self: flex-start; width: fit-content; cursor: pointer; }
.ps-answered-more > summary::-webkit-details-marker { display: none; }
.ps-answered-more[open] > summary { margin-bottom: 10px; }
/* ... and each answer is a compact row, the question in small type and the answer at its end, so the done page
   fits 1280x720 (727px with three answers before) */
.ps-answered .ps-row { align-items: baseline; flex-wrap: nowrap; gap: 4px 16px; padding: 6px 0; font-size: var(--ps-size-13);
  line-height: 18px; border-bottom: 1px solid var(--ps-line-light); }
.ps-answered .ps-row-figure { flex-shrink: 0; font-size: var(--ps-size-14); white-space: nowrap; }
.ps-known-row { display: flex; align-items: center; gap: 12px; }
.ps-known-row > span:first-child { min-width: 92px; }
.ps-segs { display: flex; gap: 2px; flex-grow: 1; height: 10px; max-width: 360px; }
.ps-segs span { flex: 1 1 0; background: var(--ps-sage); }
.ps-segs span.ps-seg-off { background: var(--ps-line-soft); }
.ps-set .ps-row { align-items: center; gap: 12px; flex-wrap: wrap; }
.ps-set-val { flex-grow: 1; color: var(--ps-ink-muted); }

@media (max-width: 720px) {
  .ps-qt { font-size: var(--ps-size-17); }
  .ps-steps { gap: 6px; }
  .ps-rest-row { flex-direction: column; align-items: stretch; }
}

/* Now's "Start here" (chunk 12b): three calm steps, gone once the first answer is reached. */
.ps-start { display: flex; flex-direction: column; gap: 8px; max-width: 560px; padding: 14px 18px;
  border: 1px solid var(--ps-line-firm); border-radius: var(--ps-radius-card); }
.ps-start h2 { margin: 0; }
.ps-start-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.ps-start-step { font-size: var(--ps-size-15); }
.ps-start-done { color: var(--ps-ink-muted); }
.ps-start-tick { margin-left: 10px; font-size: var(--ps-size-11); letter-spacing: .14em; text-transform: uppercase; color: var(--ps-green); }

/* The sample business's note on Now (chunk 12b). */
.ps-sample { margin: 0; max-width: 760px; padding: 10px 14px; border: 1px solid var(--ps-mean-normal-ink);
  border-radius: var(--ps-radius-card); font-size: var(--ps-size-14); color: var(--ps-ink); }
/* The upload page (upload.js): the button hides when choosing a file sends it; the status shows while it reads. */
.ps-go[hidden], .ps-upload-status[hidden] { display: none; }
/* The upload page, laid out as the demo's Upload2: the steps with "Reading your statements" and Later
   beside them, and pills where the demo had text links (2.3: no text links). */
.ps-upload-top { display: flex; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; }
.ps-upload-top .ps-steps { flex: 1 1 420px; max-width: 880px; }
.ps-upload-where { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: var(--ps-size-14); color: var(--ps-ink-muted); }
.ps-upload-row { gap: 16px; flex-wrap: wrap; }
/* Across the width, as Upload2 (15 Nov 2026 render audit: the page used only the left half): the file
   step on the left, and beside it, over a hairline, what Plainsong has read so far and the other ways in. */
.ps-upload-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: 0 88px; align-items: start; }
.ps-upload-step { display: flex; flex-direction: column; gap: 18px; min-width: 0; max-width: 760px; }
.ps-upload-step .ps-form .ps-q:first-child { border-top: 0; padding-top: 0; }
.ps-upload-step .ps-upload-q .ps-qt { font-family: var(--ps-font-display); font-weight: var(--ps-weight-light);
  font-size: var(--ps-size-24); line-height: 1.2; }
.ps-upload-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; padding-left: 48px;
  border-left: 1px solid var(--ps-line); }
.ps-upload-found { display: flex; flex-direction: column; }
.ps-upload-found h2 { margin: 0 0 4px; }
.ps-upload-found .ps-row { align-items: center; gap: 6px 14px; padding: 8px 0; font-size: var(--ps-size-14);
  border-bottom: 1px solid var(--ps-line-light); }
.ps-upload-found .ps-row:last-child { border-bottom: 0; }
.ps-upload-found .ps-set-val { flex-grow: 0; margin-left: auto; color: var(--ps-ink-muted); text-align: right; }
.ps-upload-found .ps-pill { margin-left: auto; height: auto; min-height: 30px; padding: 4px 13px; box-sizing: border-box;
  border-color: var(--ps-line-35); text-align: left; }
.ps-upload-found .ps-pill:hover { border-color: var(--ps-mean-normal-ink); }
.ps-upload-found .ps-qnote { margin: 4px 0 0; }
.ps-upload-side > section:first-child { border-top: 0; padding-top: 0; }
/* A long list of answers takes two columns on a laptop, so the question fits the window. */
@media (min-width: 1001px) { .ps-upload-q .ps-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }
/* Night run 3: on a laptop one question fits 1280x720 without a scroll: shorter answer rows, a tighter lead. */
@media (min-width: 1001px) {
  .ps-upload-q .ps-choice { min-height: 38px; }
  .ps-upload-q.ps-q { padding: 12px 0; }
  .ps-upload-step { gap: 10px; }
  .ps-upload-step .ps-lead { gap: 8px; }
  .ps-upload-step .ps-lead .ps-headline { font-size: var(--ps-size-30); }
}
.ps-upload-side .ps-segs { max-width: none; }
@media (max-width: 1000px) {
  .ps-upload-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ps-upload-side { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--ps-line); }
}
@media (max-width: 700px) {
  .ps-upload-where { margin-left: 0; }
  .ps-upload-found .ps-pill { min-height: 44px; }
}
/* Settings, as the demo's Settings2 (15 Nov 2026 render audit: the page was 2.7k px tall in the left 58%):
   the sections in columns across the width, balanced by the browser, each a list of compact rows with the
   label, the value and a quiet pill on one line. From 1280 x 720 up it should need little or no scroll. */
.ps-set-main { gap: 10px; }
.ps-set-main .ps-lead .ps-headline { font-size: var(--ps-size-30); }
.ps-set-stop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; max-width: 980px; }
.ps-set-stop .ps-qnote { margin: 0; }
.ps-set-cols { column-count: 3; column-gap: 48px; }
.ps-set-cols .ps-set { break-inside: avoid; gap: 0; padding: 6px 0 8px; border-top: 1px solid var(--ps-line); }
.ps-set-cols .ps-set h2 { margin: 0 0 2px; }
/* Night run 3: rows kept compact so the page fits 1280x720 without a scroll (the rule from 1280x720 up). */
.ps-set-cols .ps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-height: 28px;
  padding: 1px 0; box-sizing: border-box; border-bottom: 1px solid var(--ps-line-light);
  font-size: var(--ps-size-13); line-height: 1.3; }
.ps-set-cols .ps-row:last-child { border-bottom: 0; }
.ps-set-cols .ps-row > span:first-child { flex: 0 0 32%; min-width: 0; color: var(--ps-ink-muted); }
.ps-set-cols .ps-set-val { flex: 1 1 120px; min-width: 0; color: var(--ps-ink); overflow-wrap: anywhere; }
/* The pill ends the row; when the value needs the room, it drops under the value, still at the right. */
.ps-set-cols .ps-row > .ps-pill, .ps-set-cols .ps-row > .ps-inline-form { flex: 0 0 auto; margin-left: auto; }
.ps-set-cols .ps-inline-form { margin: 0; }
.ps-set-cols .ps-qnote { margin: 2px 0 4px; font-size: var(--ps-size-12); line-height: 1.45; }
/* The quiet pill: the same shape everywhere on the page, a soft walnut edge, firm under the pointer. */
.ps-set-main .ps-pill { height: 26px; padding: 0 11px; border-color: var(--ps-line-35); font-size: var(--ps-size-12);
  white-space: nowrap; transition: border-color var(--ps-move-hover) var(--ps-ease); }
.ps-set-main .ps-pill:hover { border-color: var(--ps-mean-normal-ink); color: var(--ps-ink); }
@media (max-width: 1100px) { .ps-set-cols { column-count: 2; column-gap: 40px; } }
@media (max-width: 700px) {
  .ps-set-cols { column-count: 1; }
  .ps-set-cols .ps-row { padding: 6px 0; }
  .ps-set-cols .ps-row > span:first-child { flex-basis: 36%; }
  .ps-set-cols .ps-set-val { flex-basis: 90px; }
  .ps-set-main .ps-pill { height: auto; min-height: 44px; }
}

/* Settings in tabs (Will, 16 Nov): one section group at a time, using the full width. Without script every
   group shows, one after another, and the tab bar stays hidden. */
.ps-stabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 14px; border-bottom: 1px solid var(--ps-line); }
.ps-stabs[hidden] { display: none; }
.ps-stab { min-height: 36px; padding: 0 16px; border: 1px solid var(--ps-line-strong, var(--ps-line)); border-radius: 999px; background: transparent;
  color: var(--ps-ink); font: inherit; font-size: var(--ps-size-14, 14px); cursor: pointer; }
.ps-stab[aria-selected="true"] { background: var(--ps-green-deep, #2F3B2B); border-color: var(--ps-green-deep, #2F3B2B); color: var(--ps-cream, #F6F2EC); }
.ps-stab:focus-visible { outline: 2px solid var(--ps-ink); outline-offset: 2px; }
.ps-set-cols.ps-set-tabs { column-count: 1; }
.ps-set-tabs.is-tabbed .ps-tabpanel[hidden] { display: none; }
.ps-set-tabs .ps-tabpanel { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.ps-set-tabs .ps-row > span:first-child { flex: 0 0 min(320px, 34%); }
.ps-set-tabs .ps-qnote { max-width: 80ch; }

/* Evening run 1, 17 Nov: the payee questions one at a time, as the demo's Upload2. The count ("Question 2
   of 4") with a meter beside it: one short bar a question, walnut once answered, deep green on this one.
   The question is the page's headline; its answers are the rows under it. */
.ps-upload-step .ps-lead:empty { display: none; }
.ps-upload-one.ps-q { border-top: 0; padding-top: 0; gap: 14px; }
.ps-qmeter-row { display: flex; align-items: center; gap: 14px; }
.ps-qmeter { display: flex; gap: 4px; }
.ps-qmeter span { width: 22px; height: 2px; background: var(--ps-line-mid); }
.ps-qmeter span.ps-qm-done { background: var(--ps-ink); }
.ps-qmeter span.ps-qm-on { background: var(--ps-mean-normal-ink); }
.ps-upload-step .ps-upload-one .ps-headline { margin: 0; font-family: var(--ps-font-display); font-weight: var(--ps-weight-light);
  font-size: var(--ps-size-36, 36px); line-height: 1.15; letter-spacing: -0.02em; }
.ps-upload-one .ps-sentence { margin: 0; max-width: 600px; }
.ps-upload-one .ps-choices { margin-top: 6px; border-top: 1px solid var(--ps-line-mid); }
.ps-upload-one { animation: ps-ans-in 420ms var(--ps-ease) both; }
@keyframes ps-ans-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ps-upload-one { animation: none; } }
/* The gate on the meter of how much is known: a walnut mark where the forecast opens. */
.ps-segs span.ps-seg-gate { position: relative; }
.ps-segs span.ps-seg-gate::before { content: ""; position: absolute; left: -2px; top: -4px; width: 1px; height: 18px; background: var(--ps-ink); }
@media (max-width: 720px) {
  .ps-upload-step .ps-upload-one .ps-headline { font-size: var(--ps-size-24); }
}
/* Evening run 1, 17 Nov: Upload on a phone as the demo's UploadPhone2: "Reading your statements" and Later
   on one line above the steps, and each meter of how much is known with its name and figure over its bar. */
@media (max-width: 700px) {
  .ps-upload-top { flex-direction: column; align-items: stretch; gap: 16px; }
  .ps-upload-top .ps-steps { flex: 0 0 auto; order: 2; }
  .ps-upload-where { order: 1; width: 100%; justify-content: space-between; font-size: var(--ps-size-13); }
  .ps-known-row { flex-wrap: wrap; gap: 6px 12px; }
  .ps-known-row > span:first-child { min-width: 0; font-size: var(--ps-size-13); }
  .ps-known-row > .ps-figure { margin-left: auto; font-size: var(--ps-size-13); }
  .ps-known-row > .ps-segs { order: 3; flex: 1 0 100%; }
  .ps-upload-step .ps-upload-one .ps-headline { font-size: var(--ps-size-30); }
}
