/* Row receipt and cost calculator (_includes/row-cost/). Used on /pricing and /compare/build-it-yourself/. */
.rcost { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; max-width: 64rem; margin-inline: auto; text-align: left; }
.rcost-inputs { display: grid; gap: 1rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.rcost-fields { display: grid; gap: .75rem; }
.rcost-field { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; align-items: center; gap: .25rem .75rem; }
.rcost-field label { font-size: .9375rem; color: var(--text-soft); line-height: 1.35; }
.rcost-field input[type="number"], .rcost-field input[type="text"], .rcost-build input { width: 100%; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: 1rem; text-align: right; font-variant-numeric: tabular-nums; }
.rcost-field input:focus-visible, .rcost-build input:focus-visible, .rcost-presets button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rcost-field input:disabled { color: var(--text-soft); background: #FAF9FC; }
.rcost-field-rows { grid-template-columns: minmax(0, 1fr) 8rem; }
.rcost-field-rows label { font-weight: 600; color: var(--text); }
.rcost-slider { grid-column: 1 / -1; width: 100%; accent-color: var(--brand); }
.rcost-rows-follow { margin: 0; font-size: .9375rem; color: var(--text-soft); }
.rcost-rows-follow b { color: var(--text); font-variant-numeric: tabular-nums; }
.rcost-presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.rcost-presets button { padding: .35rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text-soft); font: inherit; font-size: .875rem; cursor: pointer; }
.rcost-presets button:hover, .rcost-presets button[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); }
.rcost-hint, .rcost-note { margin: 0; font-size: .8125rem; line-height: 1.45; color: var(--muted); }
.rcost-bill { display: grid; gap: .9rem; }
.rcost-bill table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: #fff; font-size: .9375rem; }
.rcost-bill th, .rcost-bill td { padding: .7rem .9rem; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; vertical-align: baseline; }
.rcost-bill thead th { font-size: .8125rem; font-weight: 600; color: var(--muted); background: #FAF9FC; }
.rcost-bill tbody th, .rcost-bill tfoot th { text-align: left; font-weight: 400; color: var(--text); }
.rcost-bill td:last-child { color: var(--text-soft); }
.rcost-bill .rcost-sub th, .rcost-bill .rcost-sub td { font-weight: 600; }
.rcost-bill tfoot th, .rcost-bill tfoot td { border-bottom: 0; font-size: 1.0625rem; font-weight: 600; color: var(--text); background: #FAF9FC; }
.rcost-bill tfoot td:last-child { color: var(--brand); }
.rcost-vendor { margin-left: .4rem; font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.rcost-vendor:hover { color: var(--brand); }
.rcost-cheaper { margin: 0; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: #FAF9FC; font-size: .9375rem; color: var(--text); }
.rcost-build { margin: 0; font-size: .9375rem; color: var(--text-soft); }
.rcost-build input { display: inline-block; width: 4.25rem; margin-inline: .25rem; padding-block: .3rem; }
.rcost-actions { margin: .25rem 0 0; justify-content: flex-start; }
.rcost-receipt { max-width: 26rem; margin: 0 auto clamp(1.5rem, 3vw, 2.5rem); padding: 1.25rem 1.5rem; border: 1px dashed var(--border); border-radius: 12px; background: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9375rem; text-align: left; }
.rcost-receipt figcaption { margin-bottom: .75rem; font-weight: 600; color: var(--text); }
.rcost-receipt dl { margin: 0; display: grid; gap: .35rem; }
.rcost-receipt dl div { display: flex; justify-content: space-between; gap: 1rem; }
.rcost-receipt dt { color: var(--text-soft); }
.rcost-receipt dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.rcost-receipt .rcost-receipt-total { margin-top: .5rem; padding-top: .6rem; border-top: 1px dashed var(--border); font-weight: 600; }
.rcost-receipt .rcost-note { margin-top: .9rem; font-family: inherit; }
.rcost-volumes { max-width: 48rem; margin-inline: auto; overflow-x: auto; }
.rcost-volumes table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.rcost-volumes th, .rcost-volumes td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
.rcost-volumes th:first-child, .rcost-volumes td:first-child { text-align: left; }
.rcost-volumes thead th { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.rcost-lines, .rcost-sources { max-width: 44rem; margin-inline: auto; text-align: left; }
.rcost-lines h3 { margin: 1.5rem 0 .35rem; font-size: 1.0625rem; }
.rcost-lines p { margin: 0; color: var(--text-soft); line-height: 1.6; }
.rcost-sources ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; color: var(--text-soft); line-height: 1.5; }
@media (max-width: 860px) { .rcost { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) {
  .rcost-bill th, .rcost-bill td { padding: .6rem .5rem; font-size: .875rem; }
  .rcost-vendor { display: block; margin-left: 0; }
  .rcost-field { grid-template-columns: minmax(0, 1fr) 5.25rem; }
  .rcost-volumes th, .rcost-volumes td { padding: .5rem .4rem; font-size: .8125rem; }
}
.cx-section .rcost, .cx-section .rcost-volumes, .cx-section .rcost-lines, .cx-section .rcost-sources { margin-inline: 0; }
.rcost-placeholder { margin: 0 0 .75rem; padding: .4rem .6rem; border-radius: 6px; background: #FFF0EE; color: #B42318; font-family: inherit; font-size: .75rem; font-weight: 600; }
.rcost-receipt figcaption b { display: block; }
.rcost-receipt figcaption span { display: block; margin-top: .25rem; font-weight: 400; font-size: .8125rem; color: var(--text-soft); }
.rcost-receipt .rcost-receipt-head { margin-bottom: .2rem; font-size: .8125rem; color: var(--muted); }
.rcost-receipt { max-width: 30rem; }

/* /pricing: small run-it-yourself card under the monthly estimate, in the pricing pane's right column. */
.rc-side { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.rc-side > .rc-quote { flex: 1; }
.rcv-mini { display: grid; gap: .6rem; padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: 14px; background: #fff; text-align: left; }
.rcv-mini-top { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: .875rem; color: var(--muted); }
.rcv-mini-top b { font-size: 1.375rem; font-weight: 500; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.rcv-mini-top small { margin-left: .15rem; font-size: .8125rem; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.rcv-bar { display: flex; height: 8px; border-radius: 999px; background: #F1EEF6; overflow: hidden; }
.rcv-bar i { display: block; height: 100%; transition: width .2s; }
.rcv-bar-tools { width: calc(var(--rc-tools, .13) * 100%); background: #B9A8E8; }
/* The bar: one outlined segment per purchased tool, sized by its cost (with a floor so it stays readable) and
   filled by how much of its plan's allowance the volume uses. Flat-fee tools are always full. Colours follow each vendor's brand. */
.rcv-mini { --c-search: #377FEA; --c-unblock: #2F6BFF; --c-assistant: #D97757; --c-fetch: #FA5D19; --c-glue: #EA4B71; --c-server: #FF9900; --c-upkeep: #3B3550; }
.rcv-bar-fill { height: 14px; gap: 3px; border-radius: 0; background: none; overflow: visible; }
.rcv-seg { box-sizing: border-box; min-width: 0; border: 1.5px solid var(--c); border-radius: 4px; background: linear-gradient(to right, var(--c) calc(var(--used, 1) * 100%), color-mix(in srgb, var(--c) 10%, #fff) 0); transition: flex-grow .2s; }
.rcv-seg-search { --c: var(--c-search); --used: var(--rc-search-used, 1); flex: calc(var(--rc-search, .045) * 1000) 0 34px; }
.rcv-seg-fetch { --c: var(--c-fetch); --used: var(--rc-fetch-used, 1); flex: calc(var(--rc-fetch, .035) * 1000) 0 34px; }
.rcv-seg-unblock { --c: var(--c-unblock); flex: calc(var(--rc-unblock, .002) * 1000) 0 34px; }
.rcv-seg-assistant { --c: var(--c-assistant); --used: var(--rc-assistant-used, 1); flex: calc(var(--rc-assistant, .03) * 1000) 0 34px; }
.rcv-seg-glue { --c: var(--c-glue); flex: calc(var(--rc-glue, .036) * 1000) 0 34px; }
.rcv-seg-server { --c: var(--c-server); --used: var(--rc-server-used, 1); flex: calc(var(--rc-server, .011) * 1000) 0 34px; }
.rcv-seg-upkeep { --c: var(--c-upkeep); flex: calc(var(--rc-upkeep, .87) * 1000) 0 34px; }
.rcv-c-search { background: var(--c-search); } .rcv-c-fetch { background: var(--c-fetch); } .rcv-c-unblock { background: var(--c-unblock); } .rcv-c-assistant { background: var(--c-assistant); } .rcv-c-glue { background: var(--c-glue); } .rcv-c-server { background: var(--c-server); } .rcv-c-upkeep { background: var(--c-upkeep); }
.rcv-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .8125rem; color: var(--text-soft); }
.rcv-lines li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: .1rem; }
.rcv-lines .rcv-sw { width: 8px !important; align-self: center; }
.rcv-lines small { margin-left: .2rem; font-size: inherit; color: var(--muted); }
.rcv-lines b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rcv-bar-upkeep { width: calc(var(--rc-upkeep, .87) * 100%); background: #3B3550; }
.rcv-split { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .8125rem; color: var(--text-soft); }
.rcv-split b { margin-left: .25rem; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rcv-sw { display: inline-block; width: 8px; height: 8px; margin-right: .4rem; border-radius: 2px; }
.rcv-sw-tools { background: #B9A8E8; } .rcv-sw-upkeep { background: #3B3550; }
.rcv-mini-month { margin: 0; font-size: .8125rem; color: var(--text-soft); }
.rcv-mini-month span { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rcv-mini-month a:hover { color: var(--brand); }
/* Two headline prices, per 1,000 published rows. */
.rcost { grid-template-areas: "head head" "inputs bill"; }
.rcost-headline { grid-area: head; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 16px; background: #fff; overflow: hidden; }
.rcost-head-side { padding: 1.25rem 1.5rem; display: grid; gap: .35rem; }
.rcost-head-side + .rcost-head-side { border-left: 1px solid var(--border); }
.rcost-head-own { background: #FAF8FF; }
.rcost-head-label { margin: 0; font-size: .875rem; color: var(--muted); }
.rcost-head-rate { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .5rem; }
.rcost-head-rate b { font-size: clamp(1.75rem, 4.5vw, 2.5rem); font-weight: 500; line-height: 1.05; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.rcost-head-own .rcost-head-rate b { color: var(--brand); }
.rcost-head-rate span, .rcost-head-month { font-size: .875rem; color: var(--text-soft); }
.rcost-head-month { margin: 0; font-variant-numeric: tabular-nums; }
.rcost-inputs { grid-area: inputs; } .rcost-bill { grid-area: bill; }
.rcost-group { margin: .5rem 0 0; font-size: .8125rem; font-weight: 600; color: var(--text); }
.rcost-plan { display: block; font-size: .8125rem; font-weight: 400; color: var(--muted); }
.rcost-vendor + .rcost-plan { display: inline; margin-left: .25rem; }
.rcost + .rcost-receipt, .rcost ~ .rcost-receipt { margin-top: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: 0; }
.cx-section .rcost-receipt { margin-inline: 0; }
@media (max-width: 860px) { .rcost { grid-template-areas: "head" "inputs" "bill"; } }
@media (max-width: 480px) { .rcost-headline { grid-template-columns: 1fr; } .rcost-head-side + .rcost-head-side { border-left: 0; border-top: 1px solid var(--border); } }
/* Comparison table at the top of the calculator: Jsonify, DIY tools only, DIY with upkeep. */
.rcost-headline { display: block; padding: 1.1rem 1.5rem 1.25rem; }
.rcost-scenario { margin: 0 0 .6rem; font-size: .875rem; color: var(--muted); }
.rcost-compare { width: 100%; border-collapse: collapse; }
.rcost-compare th, .rcost-compare td { padding: .55rem 0; border-top: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; font-size: 1.125rem; color: var(--text); }
.rcost-compare thead th { border-top: 0; padding-top: 0; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.rcost-compare tbody th { text-align: left; font-weight: 400; }
.rcost-compare-own th, .rcost-compare-own td { color: var(--brand); font-weight: 600; }
.rcost-evidence { margin: 0 0 .35rem; color: var(--text); font-family: inherit; }

/* Compare page, tidied: one card (volume, one bill table, folded assumptions), then short sections. */
.rcost-section { margin-top: 0 !important; padding-block: clamp(1.25rem, 3vw, 2.25rem) !important; }
.rcost-section .section-head { margin-bottom: 1rem; }
.rcost.rcost-card { display: block; max-width: 44rem; margin-inline: 0; padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.rcost-volume { display: grid; grid-template-columns: minmax(0, 1fr) 9rem; align-items: center; gap: .6rem 1rem; margin-bottom: 1.25rem; }
.rcost-volume-label { font-weight: 600; color: var(--text); }
.rcost-volume input[type="text"] { width: 100%; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: 1.0625rem; text-align: right; font-variant-numeric: tabular-nums; }
.rcost-volume input:focus-visible, .rcost-assume input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.rcost-volume .rcost-slider, .rcost-volume .rcost-presets { grid-column: 1 / -1; }
.rcost-card .rcost-bill table { border: 0; border-radius: 0; }
.rcost-card .rcost-bill th, .rcost-card .rcost-bill td { padding: .65rem 0 .65rem .75rem; border-bottom: 1px solid var(--border); background: none; }
.rcost-card .rcost-bill tr > :first-child { padding-left: 0; }
.rcost-card .rcost-bill thead th { background: none; padding-top: 0; }
.rcost-card .rcost-bill td { color: var(--text); white-space: nowrap; }
.rcost-card .rcost-bill tbody tr:not(.rcost-sub) td:last-child { color: var(--muted); }
.rcost-card .rcost-plan { display: inline; margin-left: .3rem; }
.rcost-card .rcost-sub th, .rcost-card .rcost-sub td { font-weight: 600; background: #FAF9FC; }
.rcost-card .rcost-sub th { padding-left: .6rem !important; } .rcost-card .rcost-sub td:last-child { padding-right: .6rem; }
.rcost-card .rcost-bill tfoot th, .rcost-card .rcost-bill tfoot td { padding-block: .9rem; border-bottom: 0; background: #F7F4FE; color: var(--brand); font-size: 1.0625rem; font-weight: 600; }
.rcost-card .rcost-bill tfoot th { padding-left: .6rem !important; border-radius: 10px 0 0 10px; } .rcost-card .rcost-bill tfoot td:last-child { padding-right: .6rem; border-radius: 0 10px 10px 0; }
.rcost-card .rcost-bill tfoot .rcost-plan { font-size: .8125rem; font-weight: 400; color: var(--text-soft); }
.rcost-assume { margin-top: 1rem; font-size: .875rem; color: var(--text-soft); }
.rcost-assume summary { cursor: pointer; width: fit-content; }
.rcost-assume-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .6rem 2rem; margin-top: .9rem; }
.rcost-assume-grid label { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.rcost-assume input { width: 5.5rem; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font: inherit; text-align: right; font-variant-numeric: tabular-nums; }
.rcost-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.rcost-foot .rcost-note { flex: 1 1 14rem; }
.rcost-foot .rcost-actions { margin: 0; }
.cx-section .rcost-volumes { max-width: 44rem; }
.rcost-volumes .rcost-note { margin-top: .6rem; }
dl.rcost-lines { max-width: 44rem; margin: 0; display: grid; gap: 0; }
dl.rcost-lines > div { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: .25rem 1.5rem; padding: 1rem 0; border-top: 1px solid var(--border); }
dl.rcost-lines dt { font-weight: 600; color: var(--text); }
dl.rcost-lines dd { margin: 0; }
dl.rcost-lines dd p { margin: 0; color: var(--text-soft); line-height: 1.55; }
dl.rcost-lines .rcost-source { margin-top: .4rem; font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.rcost-source-links { white-space: normal; }
@media (max-width: 600px) { dl.rcost-lines > div { grid-template-columns: 1fr; } .rcost-card .rcost-plan { display: block; margin-left: 0; } }
.rcv-lines .rcv-subtotal { margin: .15rem 0; padding: .4rem 0; border-block: 1px solid var(--border); color: var(--text); font-weight: 600; }
.rcv-lines .rcv-subtotal i { width: 8px; margin-right: .4rem; }
/* Vendor chips: favicon and name in an outlined pill. */
.rcost-card .rcost-vendor, .rcost-chip { display: inline-flex; align-items: center; gap: .35rem; margin-left: .45rem; padding: .12rem .55rem .12rem .4rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: .8125rem; line-height: 1.4; color: var(--text-soft); text-decoration: none; white-space: nowrap; vertical-align: middle; }
.rcost-card .rcost-vendor img, .rcost-chip img { width: 14px; height: 14px; border-radius: 3px; }
.rcost-card a.rcost-vendor:hover { border-color: var(--brand); color: var(--brand); }
.rcost-source .rcost-chip { margin: 0 .35rem .15rem 0; }
@media (max-width: 600px) { .rcost-card .rcost-vendor { margin: .2rem .35rem 0 0; } .rcost-card .rcost-plan { display: inline; } }
