/* buy: Choose (4.12), Check and buy (4.13), the purchase's green moment and the all-underwriter page (4.14).
   The frame, the dark panel's rows (.cbar), the Price card (.price), choice cards, amounts and the green moment's
   layout (.gm-*) come from flow.css; this file adds what the purchase has of its own. No font-size in a query. */

/* =================================================================
   Choose: the answers box, the sections, the buy cards (3.16)
   ================================================================= */
.buy-ans { padding: var(--pad-tile); container-type: inline-size; }
.ba-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-4); flex-wrap: wrap; }
.ba-head h2 { font-size: var(--fs-body); line-height: var(--lh-ui); }                /* Label: a container's name, not a section */
.ba-sub { margin-top: 2px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.ba-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-4); }
@container (max-width: 239px) { .ba-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ba-fig { display: grid; align-content: start; }                                                           /* the figure first, its label under it */
.ba-fig .fig { font-size: var(--fs-lead); line-height: var(--lh-lead); font-variant-numeric: tabular-nums; }
.ba-fig .lbl { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.ba-edit { margin-top: var(--s-5); }
.ba-edit .amount-q + .amount-q { margin-top: var(--s-6); }
.ba-acts { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3) var(--s-5); margin-top: var(--s-5); }

.bsec { margin-top: var(--s-7); }
.bsec > .sub { margin-top: var(--s-1); }
.bsec > .buy-list-wrap, .bsec > .bsec-fit { margin-top: var(--s-4); }
.bsec-line { margin-top: var(--s-4); color: var(--ink-2); }
.bsec-line .link { display: inline; }
.bsec-fit { display: flex; align-items: flex-start; gap: var(--s-2); }
.bsec-fit svg.i { width: 16px; height: 16px; margin-top: 4px; color: var(--green); }
.bsec-fit.off svg.i { color: var(--ink); }            /* too low or too high: the verdict's arrow in ink, as on Your coverage (F61) */
.bsec > .case-legend { margin-top: var(--s-3); }      /* the bars' legend under the section's heading or line (F2) */
#buy-lists > .err { margin-top: var(--s-4); }
.buy-more { margin-top: var(--s-7); }
.buy-more .link { display: inline; }
.buy-work { margin-top: var(--s-4); }
.bwk-acts { margin-top: var(--s-4); }

/* The buy card: <label class="buy-card"> wrapping the native checkbox, nothing else interactive.
   Left the DS checkbox (24) and a 40 mint tile; the middle (.mid): the title (Label in every state),
   the kind line, the why, and where the change moves a case, a .casebar at up to 360 with one line
   under it; right the price, top aligned with the title. Unchecked, a change's part of the bar is
   lime; checked it turns green, so she sees the gap close. No tier tags on Choose. */
.buy-list-wrap { container-type: inline-size; }
.buy-cards { display: grid; gap: var(--s-2); }
.buy-card { display: grid; grid-template-columns: 24px 40px minmax(0, 1fr) auto; column-gap: var(--s-4); row-gap: 4px; align-items: start; padding: 20px; border-radius: var(--r-lg); background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: box-shadow var(--t-hover); }
.buy-card:hover { box-shadow: var(--edge-hover); }
.buy-card:has(input:checked) { box-shadow: inset 0 0 0 2px var(--green); background: var(--wash); }
/* The gap closes as she ticks: a green fill covers the lime part; its width moves across the re-render (data-morph-w),
   so it wipes in from the left (motion.js). The white hairline where the change starts stays */
.buy-card .casebar .chg { position: relative; }
.bb-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--case-pay); }
.buy-card:has(input:focus-visible) { outline: var(--v8-focus); outline-offset: 0; box-shadow: var(--v8-focus-glow); }
.buy-card > .cbox { margin-top: 8px; }         /* centered on the tile */
.buy-card .mid { min-width: 0; padding-top: 9px; }   /* the title's first line centers on the tile */
.buy-card .mid > span { display: block; }
.buy-card .t { font-weight: 700; line-height: var(--lh-ui); }
.buy-card .kind { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.buy-card .why { margin-top: var(--s-2); font-size: var(--fs-small); line-height: var(--lh-small); max-width: 52ch; }
.buy-card .bar { margin-top: 14px; max-width: 360px; }
.buy-card .bar-l { margin-top: 6px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.buy-card .price { padding: 9px 0 0; border-radius: 0; background: none; color: var(--ink); text-align: right; white-space: nowrap; }   /* not the mint Price card of flow.css */
.buy-card .price b { font-weight: 700; font-variant-numeric: tabular-nums; }
.buy-card .price i, .bi-price i { font-style: normal; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
@container (max-width: 479px) {
  .buy-card { grid-template-columns: 24px minmax(0, 1fr); }
  .buy-card .it { display: none; }
  .buy-card > .cbox { margin-top: 0; }
  .buy-card .mid { padding-top: 1px; }
  .buy-card .price { grid-column: 2; padding-top: var(--s-2); text-align: left; }
}

/* The dark panel's rows: today's price in light green, what the order adds in white, what a lowering takes off as an outline */
.bp-row .bp-sub { display: block; margin-top: 2px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--inverse-ink-2); }
.bp-new { display: inline-flex; align-items: center; height: 24px; margin-left: var(--s-2); padding: 0 8px; border-radius: var(--r-sm); background: var(--g-10); color: var(--green-strong); font-size: var(--fs-small); line-height: var(--lh-small); vertical-align: 1px; }
.bp-bar { display: flex; gap: 2px; height: 4px; margin-top: 10px; max-width: 100%; }
.bp-bar > i { display: block; height: 100%; flex: none; border-radius: 2px; }
.bp-bar .old { background: var(--green-line); }
.bp-bar .add { background: var(--inverse-ink); }
.bp-bar .cut, .bp-bar .wait { box-shadow: inset 0 0 0 1px var(--inverse-ink-2); }
.bp-bar > i + i { flex: 1 1 auto; }

/* =================================================================
   Check and buy
   ================================================================= */
.bi-box { padding: 0 var(--pad-tile); container-type: inline-size; }
.bi-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--s-4); align-items: start; padding: var(--s-5) 0; }
.bi-row + .bi-row { border-top: 1px solid var(--line); }
.bi-mid { min-width: 0; padding-top: 9px; }
.bi-t { font-size: var(--fs-body); line-height: var(--lh-ui); }
.bi-t:focus { outline: none; }
.bi-k { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.bi-d { margin-top: var(--s-2); font-size: var(--fs-small); line-height: var(--lh-small); max-width: 56ch; }
.bi-note { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-top: var(--s-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.bi-note > svg.i { width: 16px; height: 16px; color: var(--green); }
.bi-acts { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin-top: var(--s-2); }
.bi-p { padding-top: 9px; text-align: right; white-space: nowrap; }
.bi-price b { font-weight: 700; font-variant-numeric: tabular-nums; }
.bi-amounts { margin-top: var(--s-4); }
.bi-amounts .choice { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4); }
.bi-amounts .choice .t { display: grid; }
.bi-amounts .fits { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--green-text); font-weight: 400; }
.bi-amounts .choice .p { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 400; }
@container (max-width: 479px) {
  .bi-row { grid-template-columns: 40px minmax(0, 1fr); }
  .bi-p { grid-column: 2; padding-top: 0; text-align: left; }
  .bi-p:empty { display: none; }
}

.bq-list { margin-top: var(--s-5); }
.bq legend { font-weight: 400; line-height: var(--lh-body); }                        /* the question is Body */
.bq-box { margin-top: var(--s-4); }
.bst { margin-top: var(--s-4); }
.bs-date { margin-top: var(--s-4); max-width: 320px; }
.bs-hint { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); }
.bp-card { margin-top: var(--s-4); }
.bp-fine { margin-top: var(--s-3); font-size: var(--fs-small); line-height: var(--lh-small); }
.buy-terms { margin-top: var(--s-5); }
.bf-box { margin-top: var(--s-4); }

/* =================================================================
   The green moment: the paragraph, the list, what an underwriter has
   ================================================================= */
.gm-msg .gm-p.left { text-align: left; }
.bd-tot > span:last-child { white-space: nowrap; }
.gm-uw { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s-3); margin-top: var(--s-4); padding: 20px; border-radius: var(--r-lg); background: var(--canvas); }
.gm-uw > svg.i { width: 24px; height: 24px; color: var(--ink); }
.gm-uw .ttl { font-weight: 700; line-height: var(--lh-ui); }
.gm-uw p { margin-top: 2px; }
.gm-uw-chip { margin-top: var(--s-3); }

/* Everything waits for an underwriter: Fennia's Functional page, white, the piece on its mint disc */
.bw-main { flex: 1; padding: var(--s-9) var(--page-x); }
.bw-main:focus { outline: none; }
.bw-in { max-width: 480px; margin: 0 auto; display: grid; justify-items: center; text-align: center; }
.bw-in h1 { margin-top: var(--s-6); color: var(--green); }
.bw-in p { margin-top: var(--s-4); }
.bw-acts { margin-top: var(--s-6); }
@media (max-width: 639px) { .bw-main { padding-top: var(--s-7); padding-bottom: var(--s-7); } .bw-acts, .bw-acts .btn { width: 100%; } }
