/* THE CLIENT SHEET, and nothing else.

 Loaded by BOTH the broker's presentation page (/presentation) and the client's
 published copy (/p/<token>), because the client's copy is literally the markup
 the broker's page produced — see dscr/api/share.py. Two stylesheets would mean
 the sheet a borrower reads could drift from the sheet the broker approved, one
 rule at a time, with nothing to notice it.

 It carries its own custom properties so it stands up on the public page, which
 loads no other stylesheet of ours. They are the same values shell.css uses, so
 loading both changes nothing.

 The @media print block at the bottom is the PDF, and the PDF is still the
 document of record. Nothing here may regress it. */

:root { --navy:#002A68; --green:#2f855a; --amber:#b7791f;
      --red:#c53030; --bg:#f7fafc; --line:#e2e8f0; }

/* Status pills, used by the sheet's Items to Confirm block. */
.pill { display:inline-block; font-size:10px; border-radius:4px; padding:1px 6px; margin-left:5px; }
.pill.cond { background:#fefcbf; color:#744210; }
.pill.hr { background:#e9d8fd; color:#44337a; }
.pill.ver { background:#fed7d7; color:#742a2a; }
.pill.n { background:var(--navy); color:#fff; }

/* ---- the client sheet ---- */
.sheet { background:#fff; border:1px solid var(--line); border-radius:10px; padding:26px 28px 30px; }
.sheet h1.doc { margin:0 0 2px; font-size:20px; font-weight:700; letter-spacing:.01em; }
.sheet .docsub { font-size:12.5px; color:#4a5568; margin:0 0 4px; }

/* The broker's letterhead.
   The logo sits at the RIGHT of the document header, beside the title, at a
   size a letterhead actually uses. It was briefly its own full-width band
   above the title, with the size rules accidentally nested inside @media
   print where they never applied — which printed the logo at its natural
   size and filled the first page with it. Hence the explicit height cap in
   BOTH units: px governs the screen, mm governs paper, and a print stylesheet
   that ignores one will not ignore both. */
.dochead { display:flex; align-items:flex-start; justify-content:space-between;
           gap:20px; margin:0 0 6px; }
.docheadL { min-width:0; }
.docheadR { flex:none; text-align:right; max-width:210px; }
.docheadR .lhlogo { display:block; max-height:46px; max-width:200px; width:auto;
                    height:auto; object-fit:contain; margin-left:auto; }
.docheadR .lhco { font-size:12px; font-weight:600; color:var(--navy); margin-top:4px;
                  line-height:1.35; }

.brokerfoot { display:flex; justify-content:space-between; align-items:flex-end; gap:24px;
              margin-top:26px; padding-top:14px; border-top:1px solid var(--line);
              font-size:11px; color:#4a5568; line-height:1.6; }
.brokerfoot .bfname { font-weight:700; color:var(--navy); font-size:12px; }
/* Where the licences run. Set apart from the address above it, because it is
   a compliance statement and not part of the letterhead. */
.brokerfoot .bflic { margin-top:7px; font-size:10.5px; color:#4a5568; }
.brokerfoot .bflic b { color:var(--navy); font-weight:600; }
/* Two licence lines are one block, not two: the gap belongs above the pair. */
.brokerfoot .bflic + .bflic { margin-top:0; }
.brokerfoot svg { flex:none; }
.ehmark { display:inline-flex; align-items:center; gap:6px; font-size:9.5px;
          font-weight:700; letter-spacing:.03em; color:#4a5568; white-space:nowrap; }
.band { background:var(--navy); color:#fff; box-shadow:inset 0 -3px 0 var(--b2, transparent); font-size:11.5px; font-weight:700; letter-spacing:.05em;
        text-transform:uppercase; padding:6px 11px; border-radius:5px; margin:22px 0 3px; }
.bandlead { font-size:11.5px; color:#718096; margin:0 0 8px; }
table.pres { width:100%; border-collapse:collapse; font-size:12px; }
table.pres th, table.pres td { border:1px solid var(--line); padding:5px 8px; text-align:left;
                               vertical-align:top; }
table.pres thead th { background:#edf2f7; font-size:11px; font-weight:700; }
table.pres tbody th { background:#f7fafc; font-weight:600; width:230px; color:#2d3748; }
/* The three comparison sections carry the SAME <colgroup>, so Option 2 sits
   directly under Option 2 in all of them. Without a fixed layout each table
   sized its own columns to its own content and the three grids stepped in and
   out as the eye moved down the page. Fixed layout means long guideline text
   wraps instead of widening its column, which is the trade that buys the
   alignment. Tables with their own shape (Items to Confirm) opt out. */
table.pres.aligned { table-layout:fixed; }
table.pres.aligned th, table.pres.aligned td { overflow-wrap:anywhere; }
table.pres.aligned tbody th { width:auto; }
table.pres td.num { text-align:right; font-variant-numeric:tabular-nums; }
table.pres tr.total th, table.pres tr.total td { background:#edf2f7; font-weight:700; }
/* Colour says GOOD NEWS or BAD NEWS, never the arithmetic sign — a negative
   Cash to Close is money BACK to the borrower and green, while a negative
   monthly cashflow is the borrower feeding the property and red. Naming
   these .neg/.pos would invert on one row or the other. */
table.pres .good { color:var(--green); }
table.pres .bad  { color:var(--red); }
/* One row emphasised without the grey of a total row, which would read as
   a subtotal. Rate is what a borrower shops on, so it carries weight. */
table.pres tr.em th, table.pres tr.em td { font-weight:700; }
table.pres td.gl { font-size:11.5px; line-height:1.4; }
table.pres td.gl .syn { color:#2d3748; }
table.pres td.gl .inf { display:block; margin-top:3px; font-size:10.5px; color:#744210; }
.summarygrid { display:grid; grid-template-columns:repeat(6,1fr); gap:0; border:1px solid var(--line);
               border-radius:6px; overflow:hidden; }
@media (max-width:760px){ .summarygrid { grid-template-columns:repeat(2,1fr); } }
.summarygrid > div { padding:6px 9px; border-right:1px solid var(--line); border-bottom:1px solid var(--line);
                     font-size:12px; }
.summarygrid .k { background:#f7fafc; font-weight:600; color:#4a5568; font-size:11px; }
/* A field the queued scenarios disagree on. Stating one of them once, at the
   top of a client's page, would be a plain misstatement of the other. */
.varies { color:#744210; font-style:italic; }
/* pre-wrap: the wording is the broker's own, typed in a textarea, and a
   paragraph break they put in is one they meant. */
.disclaim { font-size:11px; color:#4a5568; line-height:1.5; margin-top:10px; }
.disclaim p { margin:0 0 6px; }
.disclaim h3 { margin:8px 0 4px; font-size:13px; color:var(--navy); }
.disclaim h4 { margin:8px 0 3px; font-size:12px; color:var(--navy); }
.disclaim h5 { margin:6px 0 3px; font-size:11px; color:var(--navy); }
.disclaim ul { margin:4px 0; padding-left:20px; }

/* The formatting box, on the two windows that carry prose. Its toolbar sits
   UNDER the box, where Jack asked for it. Screen only — none of this is on
   the client's sheet, which is what .expl and .disclaim above print. */
.expl { font-size:11.5px; color:#2d3748; line-height:1.55; }
.expl h3 { margin:16px 0 5px; font-size:14px; color:var(--navy); }
.expl h4 { margin:16px 0 4px; font-size:12.5px; color:var(--navy); }
.expl h5 { margin:12px 0 3px; font-size:11.5px; color:var(--navy); }
.expl p { margin:0 0 8px; }
.expl ul { margin:0 0 8px; padding-left:18px; }
.expl li { margin:0 0 4px; }
.condlist { margin:0; padding-left:15px; }
.condlist li { font-size:11px; margin:0 0 3px; }

/* The broker's own line under an option number. Lighter and smaller than the
   heading it hangs off, because it explains the column rather than naming it. */
.optnote { display:block; margin-top:3px; font-size:10px; font-weight:500;
           line-height:1.35; color:#4a5568; text-transform:none; letter-spacing:0;
           white-space:normal; }
table.pres thead th .optnote { color:#4a5568; }

/* ---- ROWS THAT OPEN -------------------------------------------------------
   Lender Fees, Prepaids and Est. Full PITI Payment each state a total worked
   out from parts. Clicking one shows the parts under it, lined up in the same
   columns — which is the whole reason this is table rows and not a <details>
   block: <details> is not valid inside a table and would not align.

   The behaviour is in web/assets/sheetrows.js. Everything here is appearance,
   and CLOSED IS THE DEFAULT so the sheet renders correctly in the moment before
   that script runs, and for anyone it never runs for. */
/* THE WHOLE ROW READS AS A CONTROL — Jack, 2026-09-08: "expander buttons need
   to be more visible. Make the entire row underline and bold." A caret alone
   was a mark beside a word, and on a sheet of forty numbers nobody found it. */
/* `table.pres tbody th` above sets font-weight:600 and outranks a bare
   `tr.xrow > th` on specificity — three element selectors against two — so the
   row heading came out semibold while its figures were bold. Matching the
   table's own selector depth is what makes the whole row read as one control. */
table.pres tbody tr.xrow > th, table.pres tbody tr.xrow > td {
  cursor:pointer; user-select:none;
  font-weight:700; text-decoration:underline;
  text-underline-offset:2px; text-decoration-color:#a0aec0; }
table.pres tbody tr.xrow:hover > th, table.pres tbody tr.xrow:hover > td {
  background:var(--b1tint, #eef2f9); text-decoration-color:var(--navy); }
tr.xrow:focus-visible { outline:2px solid var(--navy); outline-offset:-2px; }
/* The caret is its own span inside the heading rather than a ::before on the
   cell, so it follows the words instead of pushing them along. */
.xmark { display:inline-block; margin-left:7px; font-size:9px; color:#718096;
         transition:transform .12s ease; }
.xmark::before { content:"\25B8"; }
tr.xrow.xopen .xmark { transform:translateY(-1px) rotate(90deg); }
tr.xrow.xopen > th, tr.xrow.xopen > td { background:var(--b1tint, #eef2f9); }

/* `table-row` and not `block`: a row forced to block collapses the column
   alignment this whole approach exists to keep. */
tr.xdetail { display:none; }
tr.xdetail.xshow { display:table-row; }
tr.xdetail > th { font-weight:500; padding-left:22px; color:#4a5568; font-size:11.5px; }
tr.xdetail > td { font-size:11.5px; color:#4a5568; }
.brknote { display:block; font-size:10px; color:#718096; font-weight:400;
           font-variant-numeric:normal; }

/* Two rows the screen no longer needs and the PDF still carries — Jack,
   2026-09-08. The full PITI row opens to show both of them broken out, so on
   screen they were the same numbers twice. The print block puts them back. */
tr.pdfonly { display:none; }

/* The denominator actually in use, among the three shown under Cash invested. */
tr.xdetail.cashon > th, tr.xdetail.cashon > td { background:var(--b1tint, #eef2f9); font-weight:600; }

/* ---- PROJECTED RETURNS ----------------------------------------------------
   Two bar charts the broker picks, drawn as SVG rather than as an image.

   SVG so it prints at the printer's resolution rather than the screen's — this
   sheet is a PDF first — and so the labels are text a screen reader can read
   and a client can search. It costs a narrow allowlist in dscr/api/share.py,
   which is nine drawing primitives with a value check on every attribute; the
   alternative was 80KB of base64 per chart that prints blurred. */
.chartwrap { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:10px 0 4px; }
@media (max-width:760px){ .chartwrap { grid-template-columns:1fr; } }
.chartbox { border:1px solid var(--line); border-radius:7px; padding:10px 12px 8px;
            background:#fff; min-width:0; }
.charttitle { font-size:11.5px; font-weight:700; color:var(--navy); margin:0 0 2px; }
.chartsub { font-size:10.5px; color:#718096; margin:0 0 6px; }
.chartbox svg { display:block; width:100%; height:auto; }
.chartlegend { display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:7px;
               font-size:10.5px; color:#4a5568; }
.chartlegend span { display:inline-flex; align-items:center; gap:5px; }
.chartlegend i { width:9px; height:9px; border-radius:2px; display:inline-block;
                 -webkit-print-color-adjust:exact; print-color-adjust:exact; }
/* THESE MUST MATCH LENDER_COLORS in web/presentation.html, name for hex — the
   bar takes the hex as an SVG fill and the swatch takes the class, because the
   frozen client copy is sanitized and cannot carry an inline style. A test pins
   the two lists together, since nothing else can: CSS cannot read the array and
   the array cannot read this file. A legend that disagrees with its bars is
   worse than no legend at all. */
.chartlegend i.lg-blue   { background:#002A68; }
.chartlegend i.lg-green  { background:#2f855a; }
.chartlegend i.lg-orange { background:#c05621; }
.chartlegend i.lg-purple { background:#6b46c1; }
.chartlegend i.lg-red    { background:#c53030; }
.chartlegend i.lg-yellow { background:#b7791f; }
.chartlegend i.lg-brown  { background:#7b341e; }
.chartlegend i.lg-black  { background:#1a202c; }

/* ---- HIGHLIGHT DIFFERENCES ----
   Green for the best figure in a row, red for the worst, three steps between.
   Classes and not a computed colour: the published copy is frozen HTML run
   through a sanitizer that drops `style`, so a per-cell gradient has nowhere to
   live. Backgrounds are pale enough that the figure stays the thing being read
   — this is a client's document, not a heat map. */
/* THE CLASSES ARE ALWAYS IN THE MARKUP AND THE PAINT IS SWITCHED ON HERE, by a
   class on the TABLE. That is what lets a borrower turn the highlighting on and
   off on a page whose figures are frozen: nothing is recomputed, one class
   moves. Grading at publish time and baking the colours in would have made the
   reader's switch impossible.

   On the table rather than on the sheet since 2026-09-10 — Jack: "3 separate
   toggles for the 3 sections". The options, the closing costs and the
   projection answer different questions, and a broker walking a client through
   the costs has no reason to have the forecast painted at the same time. */
table.pres.hl td.g1 { background:#d7f0e0; }
table.pres.hl td.g2 { background:#eaf6ea; }
table.pres.hl td.g3 { background:#fdf6e3; }
table.pres.hl td.g4 { background:#fdeadf; }
table.pres.hl td.g5 { background:#fbdedb; }
/* The assumptions the projection rests on, under the charts rather than in a
   footnote: a number nobody can trace back to a rate is a number nobody should
   rely on. */
.projnote { font-size:10.5px; color:#718096; line-height:1.5; margin:8px 0 0; }

@media print {
  .no-print { display:none !important; }
  body { background:#fff; }
  .shell { max-width:none; padding:0; }
  .sheet { border:none; border-radius:0; padding:0; }
  .band { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  table.pres thead th, table.pres tbody th, table.pres tr.total th, table.pres tr.total td,
  .summarygrid .k { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  table.pres { font-size:9.5px; }
  table.pres th, table.pres td { padding:3px 5px; }
  table.pres tbody th { width:auto; }
  /* Paper units as well as pixels: a print engine that disregards the px cap
     will not disregard this one, and an uncapped logo took the whole page. */
  .docheadR { max-width:56mm; }
  .docheadR .lhlogo { max-height:14mm; max-width:52mm; }
  .dochead { break-inside:avoid; }
  .brokerfoot { break-inside:avoid; }
  /* A heading must not be the last thing on a sheet. Now that Information and
     Explanations flows rather than starting its own page, it lands wherever
     there is room — and "Information and Explanations" alone at the foot of a
     page, with its first paragraph overleaf, is a worse version of the
     problem this change fixes. */
  .band { break-after:avoid; page-break-after:avoid; }
  /* The broker's own subheadings inside that section, for the same reason and
     newly able to hit it: the section used to start on a fresh sheet and run
     to the end of the document, so it rarely crossed a page at all. */
  .expl h4, .expl h5 { break-after:avoid; page-break-after:avoid; }
  /* And no single stranded line at either end of a break. */
  .disclaim, .expl, .expl p, .expl li { orphans:3; widows:3; }
/* The print viewport is narrow enough to trip the phone breakpoint, which
     folded the six-column summary into two columns and made the first page a
     ladder. Print is a fixed 8.5in sheet, so pin it back. */
  .summarygrid { grid-template-columns:repeat(6,1fr); }
  /* Keep a band with the table it introduces, and keep short tables whole. */
  .band { break-after:avoid; page-break-after:avoid; }
  .summarygrid, table.pres { break-inside:avoid; page-break-inside:avoid; }
  table.pres thead { display:table-header-group; }
  @page { size: letter portrait; margin: 0.45in; }
  /* PAPER IS NOT A SCREEN, and the difference is that nothing on it opens.
     A row that expands has nothing to expand into on paper, so it prints as the
     plain total it always was — and the two rows the screen drops come back,
     because the PDF is a settled document and Jack asked for them kept on it. */
  tr.pdfonly { display:table-row; }
  tr.xdetail, tr.xdetail.xshow { display:none !important; }
  table.pres tbody tr.xrow > th, table.pres tbody tr.xrow > td {
    cursor:auto; text-decoration:none; }
  tr.xrow:hover > th, tr.xrow:hover > td,
  tr.xrow.xopen > th, tr.xrow.xopen > td { background:inherit; }
  .xmark { display:none; }
  /* Two charts across a letter sheet, kept whole and kept with their heading. */
  .chartwrap { grid-template-columns:1fr 1fr; break-inside:avoid; page-break-inside:avoid; }
  .chartbox { break-inside:avoid; page-break-inside:avoid; }
  /* A chart printed in white bars is not a chart. Same opt-in the bands and
     table headers already take. */
  .chartbox svg rect { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  /* A sheet printed without its grading is a sheet the broker did not choose. */
  table.pres.hl td.g1, table.pres.hl td.g2, table.pres.hl td.g3,
  table.pres.hl td.g4, table.pres.hl td.g5 {
    -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  /* And the same for the badges and the banner on the cards. The colour is the
     signal now, not decoration on top of one — a printed card whose badges came
     out grey would be three identical pills again, on the copy most likely to
     be the one read. */
  .otag, .ochosen { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}


/* A NAME THAT EXPLAINS ITSELF — Jack, 2026-09-10: "add descriptions of what
   these terms mean when a mouse hovers over the names."

   The description rides on `title`, which is a native tooltip and needs no
   script on a frozen page that has none. What a native tooltip cannot do is
   announce itself, so the label is marked: a hover nobody thinks to try is a
   description nobody reads. `help` rather than `pointer` because nothing
   happens on click.

   The dotted rule is grey rather than hairline-pale: at #e2e8f0 on white it was
   there in the DOM and invisible on the page, which is the same as not having
   it. `help` is the cursor where nothing else happens; on the client's sheet
   these rows are also click-to-chart, and THAT cursor wins on purpose — it is
   the one describing what a click does.

   It prints as ordinary text — the underline is dropped in @media print, where
   there is no hovering and a dotted rule under half the row names is noise. */
table.pres tbody th.defn {
  text-decoration:underline dotted #a0aec0;
  text-underline-offset:3px;
  cursor:help;
}
table.pres tbody tr.xrow > th.defn { text-decoration-color:rgba(255,255,255,.6); }
/* The same marking on a SPAN, for the rows where only part of the cell carries
   an explanation — the prepayment penalty, whose every cell means something
   different and whose heading carries the legend for all of them. */
table.pres tbody th span.defn,
table.pres tbody td span.defn {
  text-decoration:underline dotted #a0aec0;
  text-underline-offset:3px;
  cursor:help;
}
@media print {
  table.pres tbody th.defn,
  table.pres tbody th span.defn,
  table.pres tbody td span.defn { text-decoration:none; cursor:auto; }
}

/* ---- the controls that live inside the sheet ----
   Built into the table by sheetcontrols.js after it renders, never by the
   renderer: the published markup is frozen and sanitized, and a document a
   borrower reads must not arrive carrying form elements. See that file.

   They are deliberately quiet. A sheet covered in widgets stops reading as a
   document, and most readers will never touch one — so a control is a small
   grey thing beside a name until it is used, and none of it prints. */
.sc-ctl, .sc-inline {
  display:inline-flex; align-items:center; gap:5px; margin-left:9px;
  font-weight:400; font-size:10.5px; color:#718096; white-space:nowrap;
  cursor:pointer; vertical-align:middle; text-decoration:none;
}
th.hlcell .sc-ctl { margin:0; font-size:10px; }
/* Prepended rather than appended — it reads as "use this: Cash to close" — so
   the gap it needs is on the other side. */
tr.xdetail-cash th > .sc-ctl:first-child { margin:0 8px 0 0; }
.sc-box { width:12px; height:12px; margin:0; accent-color:var(--navy,#002A68); cursor:pointer; }
.sc-lab { letter-spacing:.01em; }
.sc-num {
  width:62px; padding:1px 4px; font:inherit; font-size:11px; font-weight:600;
  color:var(--navy,#002A68); border:1px solid #cbd5e0; border-radius:4px; background:#fff;
}
.sc-num.sc-wide { width:94px; }
.sc-range { width:118px; accent-color:var(--navy,#002A68); cursor:pointer; }
.sc-out { font-weight:700; color:var(--navy,#002A68); min-width:52px; }
/* The corner cell is the table's own heading row, which is painted navy on the
   projection band and white elsewhere; the control has to read on both. */
table.pres thead th.hlcell { font-weight:400; }
@media print {
  .sc, .sc-ctl, .sc-inline { display:none !important; }
}

/* ---- the loan option cards ----
   Jack, 2026-09-11. The table below says everything; these say the four things
   a borrower decides on, and which option wins on each. */
.ocards { margin:10px 0 14px; }
.ocardrow { display:flex; flex-wrap:wrap; gap:10px; }
.ocard {
  flex:1 1 168px; min-width:150px; background:#fff; border:2px solid var(--border,#cbd5e0);
  border-radius:9px; padding:11px 13px 12px;
}
.oname { margin:0; font-size:14px; font-weight:700; color:var(--navy,#002A68); line-height:1.25; }
.onum { margin:1px 0 0; font-size:10.5px; color:#718096; letter-spacing:.04em;
        text-transform:uppercase; }
.ofigs { display:grid; grid-template-columns:auto 1fr; gap:2px 10px; margin:9px 0 0; }
.ofigs dt { font-size:11.5px; color:#718096; }
.ofigs dd { margin:0; font-size:12.5px; font-weight:600; color:#1a202c; text-align:right; }
.otags { display:flex; flex-wrap:wrap; gap:4px; margin:9px 0 0; }
.otag {
  font-size:9.5px; font-weight:700; letter-spacing:.03em; text-transform:uppercase;
  background:var(--b1tint, #eef2f9); color:var(--navy,#002A68); border-radius:20px; padding:2px 8px;
  border:1px solid transparent;
}
/* ONE COLOUR PER QUESTION — Jack, 2026-09-11: "the Highest Cash Flow, Lowest
   Rate, Highest Cash Back indicators on the cards, can you give those some
   color?"

   Three identical grey pills made a reader read all three to find out what each
   card won at. A colour is read before the words are, and these are the same
   three colours on every card, so the eye can compare across them.

   Green for the money the property puts in the borrower's pocket every month,
   teal for the money that stays in it at closing, amber for the rate. All three
   are the LIGHT ground with dark text rather than solid blocks: the sheet is
   built to be printed, and three saturated badges on a document read as a
   warning rather than as a note. Deliberately NOT the green of `.ocard.ochoice`
   — that green means "this is the one you picked", and a badge wearing it would
   be a second thing claiming to be the answer. */
.otag-flow { background:#e6f4ec; color:#22694f; border-color:#a7d7bd; }
.otag-cash { background:#e4f2f7; color:#1c5670; border-color:#a3cfdf; }
.otag-rate { background:#fbf0da; color:#7a5410; border-color:#e3c887; }
/* THE CHOICE. Green is the whole signal, so it is the border rather than a
   badge: the card a borrower picked should be findable from across the room. */
.ocard.ochoice { border-color:#2f855a; box-shadow:0 0 0 3px rgba(47,133,90,.14); }
.ochosen {
  margin:0 0 11px; padding:11px 14px; border-radius:8px;
  background:#e8f5ee; border:1px solid #9ed3b5; color:#1c4532;
  font-size:18px; font-weight:700; line-height:1.35;
}
/* THE ASK IS NOT THE ANSWER. Both are the same big letters in the same place —
   Jack, 2026-09-11, the one turns into the other — but green is the signal that
   a choice has been made, and a sheet that arrives already looking answered is
   a sheet that has told the borrower they are finished. */
.ochosen.oasking { background:#f7fafc; border-color:var(--border,#cbd5e0); color:#2d3748; }
/* Only where a tap does something: the broker's own sheet and the preview do
   not offer it, and a card that looks pressable and is not is a lie. */
.ocard.opick { cursor:pointer; }
.ocard.opick:hover { border-color:var(--navy,#002A68); }
.ocard.opick:focus-visible { outline:2px solid var(--navy,#002A68); outline-offset:2px; }

/* The question. A dialog rather than a confirm(): it has to carry the option's
   own name, and it has to be legible on a phone. */
.oask { position:fixed; inset:0; background:rgba(10,20,40,.45); display:flex;
        align-items:center; justify-content:center; padding:20px; z-index:60; }
.oask-box { background:#fff; border-radius:12px; padding:22px 24px; max-width:380px;
            width:100%; box-shadow:0 18px 44px rgba(0,0,0,.24); }
.oask-box h2 { margin:0 0 6px; font-size:17px; color:var(--navy,#002A68); }
.oask-box p { margin:0 0 18px; font-size:13.5px; color:#4a5568; line-height:1.55; }
.oask-btns { display:flex; gap:9px; }
.oask-btns button { flex:1; font:inherit; font-size:13.5px; font-weight:600; cursor:pointer;
                    border-radius:7px; padding:10px 12px; border:1px solid var(--border,#cbd5e0); }
.oask-yes { background:#2f855a; border-color:#2f855a !important; color:#fff; }
.oask-no { background:#fff; color:#2d3748; }
/* What a chart is worth under the pointer. It follows the pointer, so it must
   never be able to take one: a readout that swallowed the move that positions
   it would flicker and fight back. */
.pctip { position:absolute; z-index:5; pointer-events:none; min-width:180px; max-width:260px;
         background:#fff; border:1px solid var(--line,#e2e8f0); border-radius:9px; padding:8px 10px;
         box-shadow:0 8px 24px rgba(0,42,104,.16); font-size:11.5px; color:var(--navy,#002A68); }
.pctiph { font-weight:700; margin-bottom:5px; padding-bottom:4px; border-bottom:1px solid #edf2f7; }
.pctipr { display:flex; align-items:baseline; gap:6px; padding:1px 0; }
.pctipd { width:8px; height:8px; border-radius:50%; flex:none; }
.pctipl { flex:1; min-width:0; color:#4a5568; }
.pctipv { font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }
.pctipr.pctips .pctipl, .pctipr.pctips .pctipv { color:var(--navy,#002A68); font-weight:700; }
@media print { .pctip { display:none !important; } }

/* THE WAY BACK. Small on purpose: the loud thing on this page is the answer
   the borrower gave, and an undo shouted as loudly as the confirmation reads as
   the sheet asking whether they are sure — which is not the question once they
   have answered it. Plain text rather than a button, sitting under the banner
   where somebody who has just realised will look. */
.oundo {
  display:block; margin:-4px 0 12px; padding:0; background:none; border:0;
  font:inherit; font-size:12.5px; color:#4a5568; text-decoration:underline;
  text-underline-offset:2px; cursor:pointer;
}
.oundo:hover { color:var(--navy,#002A68); }
.oundo:focus-visible { outline:2px solid var(--navy,#002A68); outline-offset:2px; }
/* Clearing is not the green action. Green says a decision was made. */
.oask-yes.oask-clear { background:#c53030; border-color:#c53030 !important; }
@media print {
  .ocard.opick { cursor:auto; }
  .oask { display:none !important; }
  /* A printed sheet is a record of the answer, not a control. */
  .oundo { display:none !important; }
}
