/* hire-purchase-calculator.html - the business hire purchase calculator (WEB-125, register S577).
   Martin, 18 November 2026: "We want a lot of strong Donnie branding ... more colour than usual, it needs to be visually
   drawing in anyone that lands on the page". House variables only (mcf-house.css): the blue, the green and the amber,
   each with its tint, flat fills, no gradients. Donnie beside the title (he says each new guide), the picker first (the
   drawing swaps for what the business is buying), Donnie beside the table under the tool (he says a tapped figure and
   offers the tool), and a blue band to Apply.
   The Fable review of 18 November 2026 set the order. On a phone the table is 13 pixel figures with 4 pixel gaps and no
   minimum width - a little wider than its box at 390 and 375, so the amount column stays put while it scrolls and the
   script shows a swipe hint while it overflows.
   Under reduced motion nothing moves; on a phone nothing scrolls sideways (the table scrolls in its own box). */
/* WAVE 0 OF THE PAGE UPGRADE (19 November 2026, docs/website/Page_upgrade_standard_19nov2026.md Part C): the tinted
   bands, the eyebrow pill, Donnie as a guide with his bubble, the coloured chips, the edged cards, the checklist card,
   the picks, the two-line Apply, the closing path and the print frame moved to site-v2.css section 20, where every page
   can use them (Donnie's moves: assets/guide.js). What stays here is this page's alone: the picker's drawings, the guide
   table, the call-us box's layout, and the two-column "how it works". The checklist band is the green tint now, and
   "what is not in the guide" white, so no two coloured or grey bands touch (the standard, item 3). */

.hpc-eg{max-width:60ch;line-height:1.5}
.prose ul,.prose ol{padding-left:1.25em;display:flex;flex-direction:column;gap:var(--mcf-s2)}

/* ---- how it works: the sum, and the answers it asks for ---- */
.hpc-two{display:grid;grid-template-columns:7fr 4fr;gap:var(--mcf-s8);align-items:start}

/* ---- the guide table, on green, with Donnie ---- */
.hpc-table-head{display:grid;grid-template-columns:1fr auto;gap:var(--mcf-s6);align-items:end}
.hpc-table-wrap{overflow-x:auto;border-radius:var(--mcf-r-card);background:var(--mcf-card);border:2px solid var(--mcf-ok)}
.hpc-table{width:100%;min-width:500px;font-size:var(--mcf-size-table);border-collapse:collapse}
.hpc-table caption{text-align:left;font-weight:600;padding:var(--mcf-s4) var(--mcf-s4) var(--mcf-s2);line-height:1.4}
.hpc-table th,.hpc-table td{padding:4px var(--mcf-s2);text-align:right;border-bottom:1px solid var(--mcf-line-soft)}
.hpc-table thead th{background:var(--mcf-ok);color:var(--mcf-card);font-weight:600;padding-block:var(--mcf-s3)}
.hpc-table th[scope="row"],.hpc-table thead th:first-child{text-align:left;padding-left:var(--mcf-s4)}
.hpc-table tbody th{font-weight:600;color:var(--mcf-ink);white-space:nowrap}
.hpc-table tbody tr:last-child th,.hpc-table tbody tr:last-child td{border-bottom:0}
.hpc-cell{min-height:44px;width:100%;padding:0 var(--mcf-s2);border:0;border-radius:var(--mcf-r-control);background:transparent;color:var(--mcf-blue);font:inherit;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;text-align:right;cursor:pointer}
.hpc-cell:hover{background:var(--mcf-blue-tint)}
.hpc-cell[aria-pressed="true"]{background:var(--mcf-blue);color:var(--mcf-card)}
.hpc-swipe{margin:var(--mcf-s4) 0 calc(-1 * var(--mcf-s3));font-size:var(--mcf-size-table);font-weight:600;color:var(--mcf-ok-text)}
.hpc-swipe[hidden]{display:none}
/* a guide on a call: the table's footer (the card and its amber edge: .card-edge.card-edge-left) */
.hpc-call-box{display:grid;grid-template-columns:1fr auto;gap:var(--mcf-s6);align-items:center}
.hpc-call-line{margin:0;max-width:66ch;line-height:1.5}
.hpc-call-btn{min-height:56px;font-size:var(--mcf-size-heading)}

/* ---- the picker, first: the drawing swaps for what the business is buying (never the sum) ---- */
.band.hpc-buy{background:var(--mcf-card);padding-block:var(--mcf-s7)}
.hpc-buy .hpc-picker{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--mcf-s7);align-items:center}
.hpc-stage{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:var(--mcf-s4)}
.hpc-asset{margin:0;background:var(--mcf-blue-tint);border-radius:var(--mcf-r-card);padding:var(--mcf-s4);display:grid;gap:var(--mcf-s3);align-content:start}
.hpc-asset .illo{display:block;width:100%;max-width:420px;height:auto;margin-inline:auto}
.hpc-asset figcaption{line-height:1.5}
.hpc-asset figcaption a{display:inline-block;margin-left:4px;font-weight:600}
/* once the script runs, one drawing at a time, large */
.hpc-picker.is-on .hpc-stage{display:block}
.hpc-picker.is-on .hpc-asset{display:none;padding:var(--mcf-s6)}
.hpc-picker.is-on .hpc-asset.is-picked{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;text-align:center;gap:var(--mcf-s3);padding:var(--mcf-s4) var(--mcf-s5)}
.hpc-picker.is-on .hpc-asset .illo{max-width:300px}
.hpc-picker.is-on .hpc-asset[data-asset="lorry"],.hpc-picker.is-on .hpc-asset[data-asset="coach"]{background:var(--mcf-ok-tint)}
.hpc-picker.is-on .hpc-asset[data-asset="plant"],.hpc-picker.is-on .hpc-asset[data-asset="machines"]{background:var(--mcf-wait-tint)}
.hpc-picker.is-on .hpc-asset.is-picked figcaption{font-size:var(--mcf-size-body)}
.hpc-asset.is-picked.is-arriving .illo{animation:hpc-drive .8s var(--ease-out)}
@keyframes hpc-drive{from{transform:translateX(30%);opacity:0}to{transform:none;opacity:1}}

/* ---- tablet and phone ---- */
@media (max-width:900px){
  .hpc-two,.hpc-table-head,.hpc-call-box,.hpc-buy .hpc-picker{grid-template-columns:1fr}
  .hpc-picker.is-on .hpc-asset.is-picked{grid-template-columns:1fr}
}
@media (max-width:640px){
  .band.hpc-buy{padding-block:var(--mcf-s5)}
  .hpc-buy .hpc-picker{gap:var(--mcf-s4)}
  .hpc-picker.is-on .hpc-asset,.hpc-picker.is-on .hpc-asset.is-picked{padding:var(--mcf-s3) var(--mcf-s4)}
  .hpc-picker.is-on .hpc-asset.is-picked{grid-template-columns:120px minmax(0,1fr);justify-items:start;text-align:left;gap:var(--mcf-s4)}
  .hpc-picker.is-on .hpc-asset .illo{max-width:120px}
  .hpc-picker.is-on .hpc-asset.is-picked figcaption{font-size:var(--mcf-size-table)}
  .hpc-call-btn{width:100%}
  /* the table on a phone: 13 pixel figures with 4 pixels between them, no minimum width - readable, so a little wider
     than a 390 or 375 box (the fresh reader found 12 pixel figures with 1 pixel gaps ran into each other). The amount
     column stays put while it scrolls, and the script shows the swipe hint while it overflows */
  .hpc-table{min-width:0;font-size:var(--mcf-size-small)}
  .hpc-table th,.hpc-table td{padding:4px 4px}
  .hpc-table th:last-child,.hpc-table td:last-child{padding-right:var(--mcf-s2)}
  .hpc-table th[scope="row"],.hpc-table thead th:first-child{padding-left:var(--mcf-s2);position:sticky;left:0;z-index:1}
  .hpc-table th[scope="row"]{background:var(--mcf-card)}
  .hpc-table caption{padding-inline:var(--mcf-s2)}
  .hpc-cell{padding:0 2px;font-size:inherit}
}

/* still, under reduced motion (the bubble's pop is stilled in site-v2.css section 20) */
@media (prefers-reduced-motion:reduce){
  .hpc-asset.is-picked.is-arriving .illo{animation:none}
}
