/* Project analysis (analysis.js): what the design system (ds/bundle.css) has no class for: the question steps, one
   question and its options, the page viewer, the rows that fold open. Tokens only. */
.pa { background: var(--page); color: var(--ink); font: 14px/1.45 var(--font-body); padding: var(--space-16); min-height: 100%; }
.pa .num { font-family: inherit; font-size: inherit; }      /* the desk's own .num is its mono face */
.pa-back { margin: 0 0 var(--space-8); font-size: 13px; }
.pa-top { margin-bottom: var(--space-14); }
/* the landing page: the drop area (a dashed box; blue while a file is held over it), then the projects analysed here */
.pa-drop { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); margin-top: var(--space-16);
  padding: var(--space-40) var(--space-16); border: 1.5px dashed var(--ghost); border-radius: var(--radius-10); background: var(--page);
  text-align: center; cursor: pointer; }
.pa-drop:hover { border-color: var(--blue-line); }
.pa-drop.hot { border-color: var(--blue); background: var(--blue-bg); }
.pa-drop:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pa-drop-ico { color: var(--mute); display: inline-flex; }
.pa-drop-t { font-size: 16px; font-weight: 600; color: var(--ink); }
.pa-drop-s { font-size: 13px; color: var(--mute); }
.pa-drop-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-8); margin-top: var(--space-8); }
.pa-listhead { display: flex; justify-content: flex-end; margin-bottom: var(--space-8); }
.pa-code { color: var(--mute); font-weight: 400; margin-left: var(--space-6); }
.pa-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--space-14); align-items: start; }
.pa-cols-t { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.pa-narrow .pa-cols { grid-template-columns: minmax(0, 1fr); }
.pa-pad { padding: var(--space-12) var(--space-16); }
.pa-dropped { color: var(--ink2); margin: 0 0 var(--space-14); }
.pa .ctabs button { font: inherit; font-weight: 500; }

/* the steps: 1 to N, then the review; a step's state is its mark and its name (title, aria-label) */
.pa-steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8) var(--space-16); margin: 0 0 var(--space-14); }
.pa-steprow { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.pa-step { min-width: 38px; height: 36px; padding: 0 var(--space-10); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-4);
  border: 1px solid var(--line); border-radius: var(--radius-7); background: var(--card); color: var(--ink2); font: 600 14px var(--font-body);
  font-variant-numeric: tabular-nums; cursor: pointer; }
.pa-step:hover { border-color: var(--blue-line); background: var(--page); }
.pa-step.settled { background: var(--ok-bg); border-color: var(--ok-bg); color: var(--ok); }
.pa-step.waiting { background: var(--gap-bg); border-color: var(--gap-bg); color: var(--gap); }
.pa-step.waiting i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pa-step[aria-current="step"] { border: 2px solid var(--blue); }
.pa-step[aria-current="step"]:not(.settled):not(.waiting) { color: var(--blue-d); }
.pa-step-review { padding: 0 var(--space-12); font-weight: 500; }
.pa-ck { font-weight: 700; }
.pa-done { color: var(--ok); font-weight: 700; }

/* one question: who answers, the question, its options as checkboxes, Other's fields, what it means, Back and Next */
.pa-qcard { display: flex; flex-direction: column; gap: var(--space-14); }
.pa-qhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8); }
.card h2.pa-qtext { font-size: 17px; line-height: 1.35; font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: -.01em; margin: 0; overflow-wrap: anywhere; }
.pa-more { color: var(--ink2); }
.pa-more p { margin: 0 0 var(--space-6); }
.pa-more .srcs { margin: 0 0 var(--space-8); }
.pa-opts { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--space-6); }
.pa-opts legend { padding: 0; margin-bottom: var(--space-6); font-size: 11.5px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.pa-opt { display: flex; align-items: flex-start; gap: var(--space-10); padding: var(--space-10) var(--space-12); border: 1px solid var(--line);
  border-radius: var(--radius-8); cursor: pointer; }
.pa-opt:hover { background: var(--page); }
.pa-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-bg); }
.pa-opt input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); cursor: pointer; }
.pa-ol { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.pa-ol .chip { margin-left: var(--space-4); vertical-align: 1px; }
.pa-ol small { display: block; margin-top: var(--space-2); font-size: 12.5px; font-weight: 400; color: var(--mute); }
.pa-oa { flex: none; text-align: right; font-weight: 600; white-space: nowrap; }
.pa-otherf { display: flex; flex-direction: column; gap: var(--space-10); padding: var(--space-4) 0 0 var(--space-12); }
.pa-otherf .fld { max-width: 420px; }
.pa-says { margin: 0; color: var(--ink2); }
.pa-saved { margin: calc(-1 * var(--space-10)) 0 0; min-height: 18px; color: var(--mute); font-size: 12.5px; }
.pa-saved.bad { color: var(--bad); }
.pa-undo { margin-left: var(--space-8); font-size: 12.5px; }
.pa-buys { font: inherit; padding: 0; text-decoration: underline dotted; text-underline-offset: 3px; }
.pa-says[hidden] + .pa-saved { margin-top: 0; }
.pa-nav { display: flex; justify-content: space-between; gap: var(--space-8); padding-top: var(--space-4); }
.pa-review { margin-bottom: var(--space-14); }
.pa-review td:first-child, .pa-review th:first-child { width: 36px; }
.pa-review td.r { white-space: nowrap; }
.pa-review td .dim + small { margin-top: var(--space-4); }

/* a group of rows, each folding open in place (the bids items) */
.pa-group { padding: var(--space-12) var(--space-10) var(--space-6); }
.pa-group h2 { padding: 0 var(--space-8); }
.pa-n { color: var(--mute); font-weight: 500; margin-left: var(--space-4); }
.pa-row { display: flex; align-items: baseline; gap: var(--space-14); padding: var(--space-8) 30px var(--space-8) var(--space-8); }
.pa-q { flex: 1; min-width: 0; color: var(--blue-d); font-weight: 600; overflow-wrap: anywhere; }
.pa-row:hover .pa-q { text-decoration: underline; }
.pa-fold.open > .pa-row::after, .pa-fold.open > .pa-row:hover::after { transform: rotate(45deg); }
.pa-fold + .pa-fold { border-top: 1px solid var(--line2); }
.pa-fold.cur > .pa-row, tr.cur > td { background: var(--page); }
.pa-figs { flex: none; display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.pa-amt { font-weight: 600; }
.pa-sub { color: var(--mute); font-size: 12.5px; }
.pa-body { padding: var(--space-4) var(--space-8) var(--space-12); display: flex; flex-direction: column; gap: var(--space-10); }
.pa-src.on { font-weight: 700; }
.pa-src.on::before { content: "› "; }
.pa-ctx { display: flex; align-items: center; gap: var(--space-8); margin: var(--space-8) 0 var(--space-2); color: var(--mute); font-size: 12px; }
.pa-ctx::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.pa-srcs .ds + .ds { margin-top: var(--space-4); padding-top: var(--space-4); }

/* the trades */
.pa-trades .linkbtn { padding: 0; text-align: left; font-weight: 600; }
.pa-trades td:nth-child(3) { white-space: nowrap; }
.pa-trades .pa-code { margin-left: var(--space-4); }
.pa-qs .linkbtn { padding: 0; font-weight: 500; }
.pa-goline { white-space: nowrap; }
.pa-goline + .pa-goline { margin-top: var(--space-4); }
.pa-st { color: var(--mute); }
.pa-st.open { color: var(--gap); }                      /* not answered: the attention colour */
.pa-trades .pa-edit { font-weight: 400; text-align: right; color: inherit; }
.pa-trades .pa-edit:hover { color: var(--blue-d); text-decoration: underline dotted; text-underline-offset: 3px; }
.pa-trades .pa-putback { font-weight: 400; font-size: inherit; margin-left: var(--space-4); }
.pa-ed { display: inline-flex; gap: var(--space-6); align-items: center; }
.pa-edin { width: 110px; text-align: right; }
.pa-ederr { color: var(--bad); }
.pa-part th { background: var(--card); color: var(--ink2); position: static; }
.pa-tsrc > td { padding-top: 0; }

/* the viewer: beside the list and kept in view; under the selected row when narrow */
.pa-viewer { position: sticky; top: var(--space-12); height: calc(100vh - 120px); min-height: 420px; display: flex; flex-direction: column; overflow: hidden; }
.pa-narrow .pa-viewer { position: static; height: 60vh; min-height: 320px; }
.pa-vhead { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-12); padding: var(--space-10) var(--space-16); border-bottom: 1px solid var(--line); font-size: 13px; }
.pa-what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }
.pa-ctl { display: flex; gap: var(--space-14); white-space: nowrap; }
.pa-ctl .linkbtn { padding: 0; }
.pa-stage { flex: 1; min-height: 0; }
.pv-stage { position: relative; overflow: hidden; background: var(--card); touch-action: none; cursor: grab; user-select: none; }
.pv-stage.drag { cursor: grabbing; }
.pv-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pv-world img { position: absolute; display: block; max-width: none; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.pv-base { left: 0; top: 0; width: 100%; height: 100%; }
.pv-box { position: absolute; outline: 3px solid var(--ink); background: rgba(253, 230, 138, .35); pointer-events: none; }  /* --mark, faint */
.pv-mark { position: absolute; width: 30px; height: 30px; border: 3px solid var(--ink); border-radius: 50%; pointer-events: none; }
.pv-msg { position: absolute; left: var(--space-16); top: var(--space-12); margin: 0; color: var(--mute); font-size: 13px; }
.pv-ctl { position: absolute; right: var(--space-12); bottom: var(--space-12); z-index: 2; display: flex; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-7); overflow: hidden; }
.pv-ctl button { min-width: 34px; height: 32px; padding: 0 var(--space-10); border: 0; background: none; cursor: pointer; color: var(--ink); font-size: 16px; }
.pv-ctl button + button { border-left: 1px solid var(--line); }
.pv-ctl button:hover { background: var(--page); }
.pv-text { position: absolute; inset: 0; margin: 0; overflow: auto; padding: var(--space-14) var(--space-16); white-space: pre-wrap;
  overflow-wrap: anywhere; font: 13px/1.55 var(--font-mono); }

/* the page of its own (estimator-workbook/): the person stays named at every width */
@media (max-width: 760px) { .pa-page .top .who { display: flex; } }
/* approvals: the header card's Approve estimate (what is left inside it while disabled), a trade's tick */
.pa-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-8); }
.pa-appr { color: var(--ok); font-weight: 600; }
.pa-left { margin-left: var(--space-8); font-weight: 400; }
.pa-left::before { content: "· "; }
.pa-apl { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-6); margin-top: var(--space-6); cursor: pointer;
  color: var(--ink2); font-size: 12.5px; text-align: right; white-space: normal; }
.pa-apl.on { color: var(--ok); }
.pa-apl input { margin: 0; }
.pa-narrow .pa-goline, .pa-narrow td.pa-tamt small { white-space: normal; }
