/* Pricing calculator, Pin & Ball (spec §5, palette §0). Port of the approved food-truck calculator v2
   (portal-landing-page/public/calculator.css) onto the bowling.styles.css tokens. Loaded after bowling.styles.css,
   which owns tokens, base, buttons, chips, header/nav, closing, footer and the demo modal (never redefine them here).
   Flow: who pays what -> your numbers -> your monthly bill -> the same month elsewhere (bars) -> method -> partners.
   Bands: paper hero -> sunk inputs band -> paper bars -> sunk partners -> night-deep closing + footer.
   One dark focal block in the top half: the "You pay" card.
   calculator.js hooks (keep): [data-preset], [data-orders]/[data-ticket] inputs, #orders-error/#ticket-error, [data-gross],
   [data-orders-display], [data-provider-list] > .provider-row[data-provider], [data-fee], [data-loss][data-sign],
   .provider-bar, [data-hero-fee], [data-peek-fee], [data-savings][data-rank], [data-line-*], [data-receipt-total],
   [data-customer-orders], [data-service-fee-range], .cv2-customer-line, [data-calc-status].
   Page-scoped (not in bowling.styles.css): --i-burst (rank chip), .partner-* cards (the landing's stat cards live in
   bowling.styles.css under .partner-grid--stats; never put that class on this page's partner grid). */

/* ?embed=1: the calculator alone. Bowling's embed also hides the hero ("Who pays what" included): open question 8. */
html.calculator-embed .skip-link,
html.calculator-embed .site-header,
html.calculator-embed .pricing-hero,
html.calculator-embed .closing,
html.calculator-embed .site-footer { display: none !important; }
/* Carried from the old calculator.css embed rules: no sticky header in an iframe, so anchors, the sticky inputs
   card and the first band sit close to the top (the old main padding-top was clamp(20px, 5vw, 36px)). */
html.calculator-embed { scroll-padding-top: 12px; }
html.calculator-embed .cv2-calc { padding-top: clamp(20px, 5vw, 36px); }
@media (min-width: 961px) { html.calculator-embed .cv2-inputs { top: 12px; } }

/* ---------- Hero ---------- */

.calc-hero { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 96px); }
.cv2-hero-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px clamp(32px, 5vw, 80px); align-items: end;
}
.cv2-hero h1 { margin-top: 22px; font-size: clamp(2.4rem, 1.2rem + 3.5vw, 4.1rem); }
.cv2-hero h1 .line { display: block; }
.cv2-lead { max-width: 36ch; padding-bottom: 6px; font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem); line-height: 1.5; color: var(--ink-2); }

/* ---------- Who pays what ---------- */

.cv2-who { margin-top: clamp(40px, 5vw, 64px); }
.cv2-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: var(--ink); }
.cv2-kicker::after { content: ""; flex: 1; height: 2px; background: var(--ink); }

.cv2-who-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; }
.cv2-pay { --pad: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-md); }
.cv2-pay-key { font-size: 14px; }
.cv2-pay-value {
  white-space: nowrap; font-family: var(--font-display); font-weight: 800; font-stretch: 100%;
  line-height: 0.95; letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
}
.cv2-pay-note { font-size: 16px; line-height: 1.45; }
/* Figures inside sentences: Archivo digits (no slashed zero), one step lighter than headline figures. */
.cv2-pay-note .fig, .cv2-customer-line .fig, .cv2-rank span > .fig { font-weight: 600; }

/* You pay: the merchant's money. Ball-black body under a deep yoke, so the card reads as one dark block. */
.cv2-pay--you { padding: 0 var(--pad) var(--pad); overflow: hidden; background: var(--night); box-shadow: var(--e3); }
.cv2-pay--you .yoke { margin: 0 calc(-1 * var(--pad)); padding: 15px var(--pad) 14px; }
.cv2-pay-title {
  margin-top: 30px; font: 750 clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem)/1.15 var(--font-ui); font-stretch: 100%;
  letter-spacing: -0.015em; color: var(--on-night);
}
.cv2-pay--you .cv2-pay-value { margin-top: 16px; font-size: clamp(3.4rem, 2.2rem + 3.6vw, 5.5rem); color: var(--on-night); }
/* "+ 5¢" is part of the rate: same pin white as "2.7%" (spec §13), only smaller. */
.cv2-pay-plus { font-size: 0.56em; font-weight: 750; letter-spacing: -0.01em; }
.cv2-pay--you .cv2-pay-note { margin-top: 14px; color: var(--on-night-2); }
.cv2-ticks {
  list-style: none; display: flex; flex-wrap: wrap; gap: 12px 28px;
  margin-top: auto; padding-top: 22px; border-top: 1px solid var(--night-line);
}
.cv2-pay--you .cv2-pay-note { margin-bottom: 28px; }
.cv2-ticks li { display: flex; align-items: center; gap: 12px; font: 700 18px/1.3 var(--font-ui); font-stretch: 100%; color: var(--on-night); }
.cv2-ticks .fig { font-weight: 800; }

/* Your customer pays: somebody else's money. Hatched surface, dashed edge, no yoke. */
.cv2-pay--customer {
  padding: 13px var(--pad) var(--pad);
  background: var(--surface) var(--hatch); border: 2px dashed var(--line-strong); color: var(--ink-2);
}
.cv2-pay--customer .cv2-pay-key { color: var(--ink-3); }
.cv2-stamp { align-self: flex-start; margin-top: 30px; }
.cv2-pay--customer .cv2-pay-value { margin-top: auto; padding-top: 22px; font-size: clamp(2.4rem, 1.7rem + 2vw, 3.4rem); color: var(--ink); }
.cv2-pay-to { margin-inline: 0.28em; font-size: 0.42em; font-weight: 700; letter-spacing: 0; color: var(--ink-3); }
.cv2-pay--customer .cv2-pay-note { margin-top: 12px; color: var(--ink-2); }
/* Why the customer fee exists: a quiet compliance assurance, not a disclaimer. */
.cv2-compliance {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line-strong); font-size: 15px; line-height: 1.5; color: var(--ink-2);
}
.cv2-compliance strong { font-family: var(--font-ui); font-weight: 750; font-stretch: 100%; color: var(--ink); }
.cv2-shield { width: 22px; height: 22px; color: var(--night); }

/* ---------- Your numbers + your monthly bill (sunk band) ---------- */

.cv2-calc { padding-block: clamp(56px, 7vw, 96px); background: var(--sunk); }
.cv2-calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
/* Desktop: the inputs stay in view beside the taller bill. */
@media (min-width: 961px) { .cv2-inputs { position: sticky; top: calc(var(--nav-h) + 20px); } }

.cv2-card {
  --pad: clamp(22px, 2.6vw, 32px);
  padding: 0 var(--pad) var(--pad); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e2);
}
/* Light yoke on the existing header: sunk band, ball-black step disc, hairline under it. */
.cv2-card-head.yoke { align-items: flex-start; margin: 0 calc(-1 * var(--pad)) 24px; padding: 18px var(--pad); }
/* Side by side, both yokes share one height so their hairlines line up across the two cards. */
@media (min-width: 961px) { .cv2-card-head.yoke { min-height: 90px; } }
/* Top-aligned like food-truck v2, so both step titles sit on one line; the margin centres the title's first line on the 32px disc. */
.cv2-card-head h2 { margin-top: calc((32px - 1.1em) / 2); font: 750 clamp(1.375rem, 1.2rem + 0.5vw, 1.625rem)/1.1 var(--font-ui); font-stretch: 100%; letter-spacing: -0.015em; }
.cv2-card-head p { margin-top: 3px; font-size: 15px; line-height: 1.4; color: var(--ink-2); }

.cv2-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cv2-chip {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px;
  min-width: 0; min-height: 76px; padding: 14px 16px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
  text-align: left; cursor: pointer;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease);
}
.cv2-chip:hover { border-color: var(--field-border); background: var(--paper); }
.cv2-chip-label { display: flex; align-items: center; gap: 9px; font: 700 17px/1.2 var(--font-ui); font-stretch: 100%; }
.cv2-chip-meta { font: 650 14px/1.35 var(--font-ui); font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.cv2-chip.is-active { background: var(--night); border-color: var(--night); box-shadow: var(--e2); }
.cv2-chip.is-active .cv2-chip-label { color: var(--on-night); }
/* The lit lane: a pin-red dot on the active preset. */
.cv2-chip.is-active .cv2-chip-label::before {
  content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%;
  background: var(--mark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mark) 30%, transparent);
}
.cv2-chip.is-active .cv2-chip-meta { color: var(--on-night-2); }

/* Stacked layouts: the bill is far below, so the total shows right under the presets. */
.cv2-peek { display: none; }
@media (max-width: 960px) {
  .cv2-peek {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
    min-height: 56px; margin-top: 16px; padding: 12px 16px; border-radius: var(--r-sm);
    background: var(--mark-wash); box-shadow: inset 0 0 0 1px var(--mark-line); color: var(--ink); text-decoration: none;
    font: 700 16px/1.3 var(--font-ui); font-stretch: 100%;
  }
  .cv2-peek b { font: 800 22px/1 var(--font-ui); font-stretch: 100%; letter-spacing: -0.02em; color: var(--night); font-variant-numeric: tabular-nums; }
  .cv2-peek-unit { font-size: 14px; font-weight: 650; color: var(--ink-3); }
  .cv2-peek-go { font-size: 15px; color: var(--night); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
  .cv2-peek-go::after { content: " \2193"; content: " \2193" / ""; }
}

.cv2-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.calc-field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.calc-field-label { font: 650 16px/1.25 var(--font-ui); font-stretch: 100%; color: var(--ink); }
.calc-field-control { position: relative; display: block; }
.calc-field-control input {
  width: 100%; height: 60px; margin: 0; padding: 0 16px;
  border: 1.5px solid var(--field-border); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
  font: 700 24px/1 var(--font-ui); font-stretch: 100%; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
.calc-field-control input::-webkit-inner-spin-button, .calc-field-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.calc-field-control input:hover { border-color: var(--ink-2); }
.calc-field-control input:focus-visible {
  outline: none; border-color: var(--night);
  box-shadow: 0 0 0 1px var(--night), 0 0 0 5px color-mix(in srgb, var(--night) 20%, transparent);
}
.calc-field-control input[aria-invalid="true"] { border-color: var(--foul); box-shadow: 0 0 0 1px var(--foul); }
.calc-field-control input[aria-invalid="true"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.calc-field-control--prefix > span {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font: 700 24px/1 var(--font-ui); font-stretch: 100%; color: var(--ink-3);
}
.calc-field-control--prefix input { padding-left: 38px; }
.calc-field-hint { font-size: 14px; line-height: 1.45; color: var(--ink-3); }
/* Bowling's inline errors; the icon is CSS so calculator.js keeps setting textContent. */
.calc-field-error { display: flex; gap: 6px; font-size: 14px; line-height: 1.4; color: var(--foul); }
.calc-field-error::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; background: currentColor;
  -webkit-mask: var(--i-alert) center / contain no-repeat; mask: var(--i-alert) center / contain no-repeat;
}

/* The bill: a lane tab, not a torn slip. Its figures size down with the bill's length (--len, set by calculator.js)
   against the card width (cqi), so no amount ever breaks mid-number or leaves the card. */
.cv2-receipt { container-type: inline-size; }
.cv2-receipt-meta {
  display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; padding-bottom: 16px;
  border-bottom: 1.5px dashed var(--line-strong);
}
.cv2-receipt-meta > div { display: flex; align-items: baseline; gap: 10px; }
.cv2-receipt-meta dt {
  font: 650 13px/1.2 var(--font-ui); font-stretch: 72%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.cv2-receipt-meta dd { margin: 0; font: 700 17px/1.2 var(--font-ui); font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--ink); }

.cv2-bill { display: grid; gap: 6px; margin-top: 22px; }
.cv2-bill-key { font: 700 18px/1.2 var(--font-ui); font-stretch: 100%; color: var(--ink); }
.cv2-bill-fee { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cv2-bill-fee [data-hero-fee] {
  min-width: 0; white-space: nowrap;
  font: 850 min(clamp(3.25rem, 2rem + 3.4vw, 5rem), 100cqi / (var(--len, 7) * 0.6))/0.95 var(--font-display); font-stretch: 100%;
  letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--ink);
}
.cv2-bill-unit { font: 650 17px/1 var(--font-ui); font-stretch: 100%; color: var(--ink-3); }

.cv2-lines { margin: 18px 0 0; }
.cv2-lines > div { display: flex; align-items: baseline; gap: 12px; padding: 12px 0; }
.cv2-lines > div::after { content: ""; order: 1; flex: 1 1 16px; min-width: 16px; border-bottom: 2px dotted var(--line-strong); }
.cv2-lines dt { order: 0; min-width: 0; font: 700 17px/1.3 var(--font-ui); font-stretch: 100%; color: var(--ink); }
.cv2-lines dt span { display: block; margin-top: 4px; font: 650 14px/1.35 var(--font-ui); font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.cv2-lines dd { order: 2; margin: 0 0 0 auto; white-space: nowrap; font: 750 min(19px, 100cqi / var(--len, 7))/1 var(--font-ui); font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--ink); }
/* Where it adds up: a 2px ink Total rule. */
.cv2-lines .cv2-lines-total { flex-wrap: wrap; margin-top: 8px; padding-top: 20px; border-top: 2px solid var(--ink); }
.cv2-lines-total::after { display: none; }
.cv2-lines-total dt { font-size: 21px; font-weight: 800; }
.cv2-lines-total dd { font-size: min(28px, 100cqi / (var(--len, 7) * 0.6)); font-weight: 850; font-stretch: 100%; letter-spacing: -0.02em; }

/* The customer's fee: visibly outside the bill (hatched, dashed, tagged). */
.cv2-customer-line {
  margin-top: 20px; padding: 14px 16px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--paper) var(--hatch);
  font-size: 15px; line-height: 1.6; color: var(--ink-2);
}
.cv2-customer-line b { white-space: nowrap; font: 750 15px/1 var(--font-ui); font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--ink); }
.cv2-customer-tag { margin-right: 8px; vertical-align: 1px; }

/* Rank line: a ball-black chip with a red burst while TABL ranks first, a plain sunk chip otherwise. */
.cv2-rank {
  --i-burst: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0c.6 5.2 4.2 8.8 10 10-5.8 1.2-9.4 4.8-10 10-.6-5.2-4.2-8.8-10-10C5.8 8.8 9.4 5.2 10 0Z'/%3E%3C/svg%3E");
  display: grid; justify-items: start; gap: 12px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 16px; line-height: 1.55; color: var(--ink-2);
}
.cv2-rank b { font-family: var(--font-ui); font-weight: 750; font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--ink); }
.cv2-rank a { font-weight: 700; color: var(--night); text-underline-offset: 3px; white-space: nowrap; }
.result-rank {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px;
  border-radius: var(--pill); background: var(--ink); color: var(--on-night);
  font: 700 14px/1 var(--font-ui); font-stretch: 72%; letter-spacing: 0.08em; text-transform: uppercase;
}
.cv2-rank[data-rank="1"] .result-rank { padding-left: 11px; }
.cv2-rank[data-rank="1"] .result-rank::before {
  content: ""; width: 16px; height: 16px; flex: none; background: var(--accent);
  -webkit-mask: var(--i-burst) center / contain no-repeat; mask: var(--i-burst) center / contain no-repeat;
}
.cv2-rank:not([data-rank="1"]) .result-rank { background: var(--sunk); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); }

/* ---------- The same month on other POS systems: zero-based bars ---------- */

.cv2-compare { padding-block: clamp(56px, 7vw, 96px) var(--section-pad); }
.cv2-compare-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.cv2-compare-head h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); font-weight: 820; font-stretch: 82%; line-height: 1.06; letter-spacing: -0.005em; word-spacing: 0.04em; }
.cv2-compare-head p { font-size: 16px; color: var(--ink-3); }

.provider-list { list-style: none; }
.cv2-chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1); overflow: hidden; }
.cv2-chart .provider-row {
  display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr) 7.5rem 13rem; grid-template-areas: "main bar total delta";
  column-gap: 24px; row-gap: 10px; align-items: center; padding: 17px 28px;
}
.provider-row + .provider-row { border-top: 1px solid var(--line); }
.provider-main { grid-area: main; display: grid; gap: 3px; min-width: 0; }
.provider-name { font: 700 17px/1.25 var(--font-ui); font-stretch: 100%; color: var(--ink); }
.provider-row__rate { font: 600 14px/1.4 var(--font-ui); font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.cv2-nowrap { white-space: nowrap; }
.provider-bar { grid-area: bar; display: flex; align-items: center; gap: 10px; height: 14px; border-radius: var(--pill); background: var(--track); }
.provider-bar i { flex: none; height: 100%; border-radius: var(--pill); background: var(--bar); transition: width 420ms var(--ease-roll); }
.provider-bar em {
  font: 750 13px/1 var(--font-ui); font-style: normal; font-stretch: 72%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--night);
}
.provider-total {
  grid-area: total; justify-self: end; white-space: nowrap;
  font: 750 19px/1 var(--font-ui); font-stretch: 100%; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--ink);
}
.provider-delta { grid-area: delta; font-size: 14px; line-height: 1.35; color: var(--ink-3); }
.provider-delta b { font: 750 15px/1 var(--font-ui); font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--ink); }

/* The TABL row is the black lane, lit red. */
.cv2-chart .provider-row--tabl { background: var(--night); box-shadow: inset 5px 0 0 var(--accent); }
.provider-row--tabl .provider-name { font-size: 18px; font-weight: 800; color: var(--on-night); }
.provider-row--tabl .provider-row__rate { color: var(--on-night-2); }
/* Track as an outline, not a fill: the red end stays against black (3.36:1); a lifted fill would drop it to 2.2:1. */
.provider-row--tabl .provider-bar { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(246, 244, 241, 0.3); }
.provider-row--tabl .provider-bar i { background: var(--accent); }
.provider-row--tabl .provider-bar em { color: var(--on-night); }
.provider-row--tabl .provider-total { font-size: 22px; font-weight: 850; color: var(--on-night); }
.provider-row--tabl .provider-delta { font: 750 15px/1.3 var(--font-ui); font-stretch: 100%; color: var(--on-night); }

/* Unranked rows (Avocado, Fuego): hatched, dashed rule, no bar. */
.provider-row--unranked { background-image: var(--hatch); }
.provider-row:not(.provider-row--unranked) + .provider-row--unranked { border-top: 1.5px dashed var(--line-strong); }
.provider-row--unranked + .provider-row--unranked { border-top-style: dashed; }
.provider-row--unranked .provider-name { color: var(--ink-2); }
.cv2-chart .provider-row--unranked .provider-total { font-size: 15px; font-weight: 650; letter-spacing: 0; color: var(--ink-3); }

/* ---------- How we calculated this (the FAQ's round toggle) ---------- */

.cv2-method { margin-top: 28px; border-block: 1px solid var(--line-strong); }
.cv2-method summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 6px 0;
  cursor: pointer; list-style: none; font: 700 18px/1.3 var(--font-ui); font-stretch: 100%; color: var(--ink);
}
.cv2-method summary::-webkit-details-marker { display: none; }
.cv2-method summary::after {
  content: "+"; content: "+" / ""; display: grid; place-items: center; flex: none; width: 28px; height: 28px;
  border: 1.5px solid var(--field-border); border-radius: 50%; font: 700 18px/1 var(--font-ui); color: var(--ink-2);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.cv2-method summary:hover::after { border-color: var(--ink); color: var(--ink); }
.cv2-method[open] summary::after { content: "\2212"; content: "\2212" / ""; background: var(--night); border-color: var(--night); color: var(--on-night); }
.cv2-method-body { display: grid; gap: 20px; padding: 4px 0 28px; }
.cv2-formula { max-width: 72ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.results-footnote { columns: 2 380px; column-gap: 48px; font-size: 15px; line-height: 1.6; color: var(--ink-3); }
.cv2-sources { padding-top: 20px; border-top: 1px solid var(--line); }
.cv2-sources-label { font-size: 13px; color: var(--ink-3); }
/* Sized so all 11 fit one row in the 1180px column. */
.sources { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sources a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 11px 0 13px;
  border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface);
  font: 650 14px/1 var(--font-ui); font-stretch: 100%; color: var(--night); text-decoration: none;
  transition: border-color 120ms var(--ease);
}
.sources a:hover { border-color: var(--night); }
.sources .icon { width: 14px; height: 14px; }

/* ---------- Partners (sunk band): two groups side by side, one card each column ---------- */

.page-calculator .partners { background: var(--sunk); }
.partners-header { margin-bottom: 40px; }
.partner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.partner-group-label { align-self: end; }
.partner-group-label:first-child { grid-row: 1; grid-column: 1 / 3; }
.partner-card + .partner-group-label { grid-row: 1; grid-column: 3; }
.partner-card { min-width: 0; }
.partner-card__link {
  position: relative; display: flex; flex-direction: column; gap: 20px; height: 100%; padding: 14px 14px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1);
  color: inherit; text-decoration: none;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.partner-card__link:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--e2); }
.partner-card__logo {
  display: grid; place-items: center; height: 128px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
}
.partner-card__logo--dark { background: var(--night-deep); border-color: var(--night-deep); }
.partner-card__logo picture { display: block; }
.partner-card__logo img { width: auto; max-width: 100%; max-height: 80px; }
.partner-card__logo--stripe img { max-height: 64px; }
.partner-card__logo--doordash img { max-height: 22px; }
.partner-card__body { display: grid; gap: 10px; min-width: 0; padding: 0 10px; }
.partner-card__kind { font: 650 13px/1.2 var(--font-ui); font-stretch: 72%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.partner-card__description { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
/* Outbound cue: a small ring in the corner of the logo plate. */
.partner-card__go {
  position: absolute; top: 24px; right: 24px; width: 30px; height: 30px; padding: 7px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-2);
  transition: transform 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.partner-card__link:hover .partner-card__go { color: var(--night); border-color: var(--night); transform: translate(2px, -2px); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .cv2-chart .provider-row { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) 7rem 12rem; column-gap: 20px; padding-inline: 24px; }
}

@media (max-width: 960px) {
  .cv2-hero-head { grid-template-columns: minmax(0, 1fr); }
  .cv2-lead { max-width: 46ch; padding-bottom: 0; }
  .cv2-calc-grid { grid-template-columns: minmax(0, 1fr); }
  /* Tablet: the bar gets the whole left column, the amount and the difference stack on the right. */
  .cv2-chart .provider-row {
    grid-template-columns: minmax(0, 1fr) 12.5rem; grid-template-areas: "main total" "bar delta";
    column-gap: 24px; row-gap: 12px; padding: 16px 24px;
  }
  .cv2-chart .provider-delta { justify-self: end; text-align: right; }
  /* Partners: one column of wide cards, logo plate beside the text. */
  .partner-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .partner-group-label:first-child, .partner-card + .partner-group-label { grid-row: auto; grid-column: auto; }
  .partner-card + .partner-group-label { margin-top: 16px; }
  .partner-card__link { flex-direction: row; align-items: center; gap: 28px; padding: 14px 28px 14px 14px; }
  .partner-card__logo { flex: 0 0 40%; }
  .partner-card__body { padding: 0 32px 0 0; }
  .partner-card__go { top: 14px; right: 14px; }
}

@media (max-width: 720px) {
  .cv2-hero h1 .line { display: inline; }
  .cv2-lead { display: none; }
  .cv2-who-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cv2-pay { --pad: 22px; }
  .cv2-pay-title { margin-top: 24px; }
  .cv2-pay--you .cv2-pay-value { font-size: clamp(2.75rem, 1.5rem + 7vw, 3.5rem); }
  .cv2-pay--customer .cv2-pay-value { font-size: 2.5rem; }
  .cv2-stamp { margin-top: 20px; }
  .cv2-pay--you .cv2-pay-note { margin-bottom: 24px; }
  .cv2-ticks { padding-top: 18px; }

  .cv2-card { --pad: 20px; }
  .cv2-card-head.yoke { padding-block: 16px; }
  .cv2-presets { gap: 8px; }
  .cv2-chip { min-height: 72px; padding: 12px 14px; }
  .cv2-fields { grid-template-columns: minmax(0, 1fr); }
  .cv2-lines-total dd { font-size: min(26px, 100cqi / (var(--len, 7) * 0.6)); }

  /* Phone: name and amount on one line, the bar full width, the difference under it. */
  .cv2-compare-head { margin-bottom: 18px; }
  .cv2-chart .provider-row {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main total" "bar bar" "delta delta";
    column-gap: 12px; row-gap: 10px; align-items: start; padding: 16px;
  }
  .cv2-chart .provider-total { padding-top: 1px; }
  .cv2-chart .provider-delta { justify-self: start; text-align: left; }
  .provider-row--tabl .provider-total { font-size: 21px; }

  /* Partners: logo beside category and name, description full width underneath. */
  .partner-card__link {
    display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "logo kind" "logo name" "desc desc";
    align-items: center; column-gap: 16px; row-gap: 14px; padding: 12px 12px 18px;
  }
  .partner-card__logo { grid-area: logo; height: 72px; padding: 10px; }
  .partner-card__logo img { max-height: 48px; }
  .partner-card__logo--stripe img { max-height: 44px; }
  .partner-card__logo--doordash img { max-height: 13px; }
  .partner-card__body { display: contents; }
  .partner-card__body .partner-card__name { grid-area: name; align-self: start; padding-right: 20px; }
  .partner-card__kind { grid-area: kind; align-self: end; padding-right: 36px; }
  .partner-card__description { grid-area: desc; padding: 0 4px; }
  .partner-card__go { top: 12px; right: 12px; width: 28px; height: 28px; padding: 6px; }
}

/* Small phones: presets as one list. */
@media (max-width: 480px) {
  /* Bowling labels run long ("Busy Family Center"), so every chip keeps label over numbers: one consistent list. */
  .cv2-presets { grid-template-columns: minmax(0, 1fr); }
  .cv2-chip { gap: 4px; min-height: 64px; }
  .cv2-chart .provider-row--unranked { grid-template-areas: "main main" "total total" "delta delta"; }
  .cv2-chart .provider-row--unranked .provider-total { justify-self: start; }
}
/* Smallest phones: the dotted leader gives its width back to the line label. */
@media (max-width: 380px) { .cv2-lines > div::after { display: none; } }

/* ---------- Forced colors / more contrast (on top of bowling.styles.css) ---------- */

@media (forced-colors: active), (prefers-contrast: more) {
  .provider-row--unranked { background-image: none; }
}
/* Windows High Contrast: keep the bars, the selected preset's dot, the burst and the card edges visible. */
@media (forced-colors: active) {
  .cv2-pay--you, .cv2-card, .cv2-chart, .partner-card__link { border: 1px solid CanvasText; }
  .provider-bar { border: 1px solid CanvasText; }
  .provider-bar i { forced-color-adjust: none; background: CanvasText; }
  .provider-row--tabl .provider-bar i { background: Highlight; }
  .result-rank { border: 1px solid CanvasText; }
  .cv2-rank[data-rank="1"] .result-rank::before,
  .cv2-chip.is-active .cv2-chip-label::before,
  .calc-field-error::before { forced-color-adjust: none; background: CanvasText; }
  .partner-card__logo--dark { forced-color-adjust: none; }
  /* Focus is a box-shadow ring, which forced colors drops: use an outline instead. */
  .calc-field-control input:focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
}
