/* Net-yield calculator. Type and data in the site's Montserrat; the sums are pen notes on ruled paper,
   as in the worked examples of the guides; the marker is the comparator's yellow highlighter. */
.cbtp-calc { margin: 8px 0 48px; padding-bottom: 30px; border-bottom: 1px solid var(--line); color: var(--ink); }
.cbtp-calc__intro { color: var(--ink-soft); font-size: 17px; line-height: 1.6; }
.cbtp-calc__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 44px; margin: 22px 0 6px; }
.cbtp-calc fieldset { min-width: 0; margin: 0; padding: 14px 0 8px; border: 0; border-top: 1px solid var(--line); }
.cbtp-calc legend { padding: 0 12px 0 0; color: var(--ink-soft); font-size: 11px; font-weight: 700; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; }
.cbtp-calc__field { display: block; margin: 10px 0 12px; }
.cbtp-calc__field > span { display: block; margin-bottom: 6px; color: #5a6b60; font-size: 13px; font-weight: 600; line-height: 1.35; }
.cbtp-calc__field input, .cbtp-calc__field select { display: block; width: 100%; height: 46px; padding: 8px 12px; border: 1px solid #d6ded4; border-radius: 8px; background: #fff; color: var(--forest-dark); font: 600 16px/1.3 "Montserrat", Arial, sans-serif; font-variant-numeric: tabular-nums; }
.cbtp-calc__field input:hover, .cbtp-calc__field select:hover { border-color: #5a6b60; }
.cbtp-calc__field input:focus-visible, .cbtp-calc__field select:focus-visible, .cbtp-calc button:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.cbtp-calc__field small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.cbtp-calc__manual, .cbtp-calc__sale { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cbtp-calc__manual[hidden], .cbtp-calc__sale[hidden] { display: none; }
.cbtp-calc__actions { grid-column: 1 / -1; margin: 10px 0 6px; }
/* The site's cut-paper label: green paper over a gold offset, slightly turned. */
.cbtp-calc__actions button { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 12px 26px 11px 24px; border: 0; background: transparent; color: #fff; font: 800 16px/1.2 "Montserrat", Arial, sans-serif; letter-spacing: .01em; cursor: pointer; transform: rotate(-1.2deg); }
.cbtp-calc__actions button::before, .cbtp-calc__actions button::after { content: ""; position: absolute; inset: 0; clip-path: polygon(1% 9%, 99% 0, 100% 91%, 2% 100%, 0 58%); }
.cbtp-calc__actions button::after { z-index: -1; background: #173f30; }
.cbtp-calc__actions button::before { z-index: -2; background: #e5b75e; transform: translate(5px, 5px); transition: transform 140ms; }
.cbtp-calc__actions button:hover::before { transform: translate(7px, 7px); }
.cbtp-calc__actions button:active { transform: rotate(-1.2deg) translate(2px, 2px); }
.cbtp-calc__actions button:active::before { transform: translate(3px, 3px); }
.cbtp-calc__actions button span { color: #f0c96a; font-size: 19px; font-weight: 700; line-height: 1; transition: transform 140ms; }
.cbtp-calc__actions button:hover span { transform: translateX(3px); }
.cbtp-calc__result { margin-top: 24px; transition: opacity 120ms; }
.cbtp-calc__result.is-loading { opacity: .5; }
.cbtp-calc__error, .cbtp-calc__notice { margin: 0 0 12px; padding-left: 12px; font-size: 17px; line-height: 1.5; }
.cbtp-calc__error { border-left: 3px solid var(--terra); color: var(--terra); font-weight: 600; }
.cbtp-calc__notice { border-left: 3px solid var(--line); }
.cbtp-calc .cbtp-calc__result-title { margin: 28px 0 8px; }
.cbtp-calc__lead { margin: 0 0 6px; }

/* Three figures in the site's display weight; the net yield carries the highlighter. */
.cbtp-calc__figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 30px; margin: 22px 0 8px; padding: 18px 0 16px; border-top: 2px solid var(--forest); border-bottom: 1px solid var(--line); }
.cbtp-calc__figures dt { color: var(--ink-soft); font-size: 13px; font-weight: 600; line-height: 1.35; }
.cbtp-calc__figures dd { margin: 6px 0 0; color: var(--forest-dark); font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cbtp-calc__figures dd.is-marked span { position: relative; isolation: isolate; padding: 0 5px; margin-left: -5px; }
.cbtp-calc__figures dd.is-marked span::before { content: ""; position: absolute; z-index: -1; inset: 5px 0 2px; background: #f8e27f; opacity: .78; transform: rotate(-1.4deg) skewX(-6deg); clip-path: polygon(1% 9%, 98% 0, 100% 87%, 2% 100%, 0 73%); }
.cbtp-calc__figures dd.cbtp-calc__figure-note { margin-top: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 400; line-height: 1.4; letter-spacing: 0; }

/* The two sums, written on ruled paper: one line of text per rule. */
.cbtp-calc__sheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px 26px; margin: 26px 2px 30px; }
.cbtp-calc__sheet { margin: 0; padding: 10px 16px 14px; border: 1px solid #e6dfd2; border-radius: 6px; background: repeating-linear-gradient(#fffdfa 0 25px, #f1ece1 25px 26px); color: #152820; font: italic 400 17px/26px var(--display, Georgia, serif); transform: rotate(-.5deg); }
.cbtp-calc__sheet + .cbtp-calc__sheet { transform: rotate(.4deg); }
.cbtp-calc__sheet-title { color: #37483e; font: 700 11px/26px var(--ui-font, Arial, sans-serif); letter-spacing: .08em; text-transform: uppercase; }
.cbtp-calc__sheet > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.cbtp-calc__sheet > div dt { min-width: 0; }
.cbtp-calc__sheet dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cbtp-calc__operator { display: inline-block; width: 14px; font-style: normal; }
.cbtp-calc__sheet .is-total { font-style: normal; font-weight: 700; }
.cbtp-calc__sheet .is-total dd span { padding: 0 3px; background: linear-gradient(transparent 58%, rgba(248, 226, 127, .9) 58%); }

/* The dated table keeps the article's table style; only alignment and the decisive column are set here. */
.cbtp-calc .cbtp-calc__flows-title { margin: 32px 0 4px; }
.cbtp-calc__scroll { overflow-x: auto; }
.cbtp-calc .cbtp-calc__flows { min-width: 520px; margin: 10px 0 18px; font-size: 16px; }
.cbtp-calc .cbtp-calc__flows th, .cbtp-calc .cbtp-calc__flows td { padding: 10px 10px; }
.cbtp-calc__flows thead th { color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cbtp-calc__flows td:nth-child(n+3), .cbtp-calc__flows thead th:nth-child(n+3) { text-align: right; white-space: nowrap; }
.cbtp-calc__flows td:first-child { white-space: nowrap; color: var(--ink-soft); }
.cbtp-calc__flows tbody th { font-weight: 500; }
.cbtp-calc__flows td:last-child { color: var(--forest-dark); font-weight: 700; }
.cbtp-calc__flows td:nth-child(3), .cbtp-calc__flows td:nth-child(4) { color: var(--ink-soft); }
.cbtp-calc__flows tfoot th, .cbtp-calc__flows tfoot td { border-top: 2px solid var(--forest); border-bottom: 0; font-weight: 800; }
.cbtp-calc__narrow-note { display: none; margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.cbtp-calc__notes { margin: 8px 0 14px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.cbtp-calc__notes summary { color: var(--ink); font-weight: 700; cursor: pointer; }
.cbtp-calc__notes ul { margin: 10px 0; padding-left: 20px; }
.cbtp-calc__notes li { margin: 6px 0; }
.cbtp-calc__share { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.cbtp-calc__copy { margin-left: 6px; padding: 4px 12px; border: 1px solid #d6ded4; border-radius: 8px; background: #fff; color: #173d2e; font: 600 13px/1.4 "Montserrat", Arial, sans-serif; cursor: pointer; }
@media (max-width: 731px) {
  .cbtp-calc__form { grid-template-columns: 1fr; gap: 0; }
  .cbtp-calc__figures { grid-template-columns: 1fr; gap: 0; padding: 4px 0; }
  .cbtp-calc__figures > div { padding: 13px 0; border-bottom: 1px solid #d5dad1; }
  .cbtp-calc__figures > div:last-child { border-bottom: 0; }
  .cbtp-calc__figures dd { font-size: 29px; }
  .cbtp-calc__sheets { grid-template-columns: 1fr; margin-inline: 3px; }
  .cbtp-calc__sheet { padding-inline: 13px; font-size: 16px; }
}
@media (max-width: 560px) {
  /* Dates, items and net amounts stay readable without sideways scrolling. */
  .cbtp-calc .cbtp-calc__flows { min-width: 0; font-size: 15px; }
  .cbtp-calc__flows th:nth-child(3), .cbtp-calc__flows td:nth-child(3), .cbtp-calc__flows th:nth-child(4), .cbtp-calc__flows td:nth-child(4) { display: none; }
  .cbtp-calc .cbtp-calc__flows th, .cbtp-calc .cbtp-calc__flows td { padding: 9px 6px; }
  .cbtp-calc__narrow-note { display: block; }
}
@media (prefers-reduced-motion: reduce) { .cbtp-calc__result, .cbtp-calc__actions button::before, .cbtp-calc__actions button span { transition: none; } }
.cbtp-calc__actions button:focus-visible { outline-offset: 8px; }
