.bf-roi {
  --roi-ink: #15203c;
  --roi-sky: #c9e8ff;
  box-sizing: border-box;
  padding: clamp(36px, 5vw, 82px) max(20px, 4vw);
  color: #fff;
  background: #f7f6f2;
  font-family: "DM Sans", sans-serif;
  scroll-margin-top: 85px;
}
.bf-roi *, .bf-roi *::before, .bf-roi *::after { box-sizing: border-box; }
.bf-roi .roi-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(290px, .86fr);
  grid-template-areas: "intro report" "controls report";
  align-items: start;
  gap: 30px clamp(36px, 6vw, 96px);
  max-width: 1330px;
  margin: 0 auto;
  padding: clamp(32px, 5.3vw, 82px);
  border-radius: 26px;
  background: radial-gradient(ellipse at 2% 12%, #263556 0, transparent 53%), #121c35;
}
.bf-roi .roi-intro { grid-area: intro; }
.bf-roi .roi-kicker {
  margin: 0 0 19px;
  color: var(--roi-sky);
  font-size: .79rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.bf-roi h2 { margin: 0; color: #fff; font-family: inherit; font-size: clamp(2.5rem, 4.3vw, 4.7rem); font-weight: 540; line-height: .98; letter-spacing: -.061em; }
.bf-roi h2 em { display: block; color: var(--roi-sky); font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.025em; }
.bf-roi .roi-lead { max-width: 49ch; margin: 20px 0 0; color: #dee4ee; font-size: 1.03rem; line-height: 1.55; }
.bf-roi .roi-controls { grid-area: controls; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.bf-roi .roi-field { display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; color: #ecf1f8; font-size: .91rem; line-height: 1.35; }
.bf-roi .roi-input { display: flex; align-items: center; gap: 7px; min-height: 48px; padding: 0 12px; border: 1px solid #687289; border-radius: 8px; background: #1c2943; color: #d3dfeb; }
.bf-roi .roi-input:focus-within { outline: 2px solid #c6e7ff; outline-offset: 3px; }
.bf-roi .roi-input:has(input[aria-invalid="true"]) { border-color: #ffb1a6; }
.bf-roi .roi-input input {
  display: block; width: 100%; min-width: 0; height: 45px; padding: 0; margin: 0; border: 0; outline: none;
  box-shadow: none; background: transparent; color: #fff; font: 530 1.07rem/1 "DM Sans", sans-serif; font-variant-numeric: tabular-nums; color-scheme: dark;
}
.bf-roi .roi-input > span { flex-shrink: 0; font-size: .83rem; }
.bf-roi .roi-help { grid-column: 1/-1; margin: 4px 0 0; color: #c6d1e2; font-size: .86rem; line-height: 1.5; }
.bf-roi .roi-report { grid-area: report; align-self: center; overflow: hidden; min-width: 0; border-radius: 16px; color: var(--roi-ink); background: #eef5fb; }
.bf-roi .roi-report-body { padding: clamp(22px, 3.2vw, 44px); }
.bf-roi .roi-result-label { margin: 0 0 7px; color: #374765; font-size: .98rem; line-height: 1.4; }
.bf-roi .roi-total { display: block; color: var(--roi-ink); font-size: clamp(2.25rem, 3.8vw, 4.25rem); font-weight: 570; line-height: 1.07; letter-spacing: -.065em; overflow-wrap: anywhere; }
.bf-roi .roi-plot { margin: 25px 0 20px; }
.bf-roi .roi-plot svg { display: block; overflow: visible; width: 100%; height: 100px; }
.bf-roi .roi-guides, .bf-roi .roi-line, .bf-roi .roi-zero { fill: none; vector-effect: non-scaling-stroke; }
.bf-roi .roi-guides { stroke: #c3d2e0; stroke-width: 1; }
.bf-roi .roi-zero { stroke: #697f9e; stroke-width: 1; stroke-dasharray: 4 5; }
.bf-roi .roi-area { fill: #5192ce; opacity: .14; }
.bf-roi .roi-line { stroke: #235785; stroke-width: 2.5; stroke-linecap: round; }
.bf-roi .roi-point { fill: #235785; }
.bf-roi .roi-axis { display: flex; justify-content: space-between; margin-top: 5px; color: #475a74; font-size: .78rem; }
.bf-roi .roi-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid #becdda; padding-top: 17px; }
.bf-roi .roi-stats > div + div { border-left: 1px solid #bdcddb; padding-left: 17px; }
.bf-roi .roi-stats dt { color: #41536a; font-size: .89rem; }
.bf-roi .roi-stats dd { margin: 3px 4px 0 0; color: var(--roi-ink); font-size: clamp(1.05rem, 1.7vw, 1.65rem); line-height: 1.23; letter-spacing: -.028em; font-weight: 570; overflow-wrap: anywhere; }
.bf-roi .roi-issue { margin: 13px 0 0; font-size: .9rem; line-height: 1.4; color: #823e23; }
.bf-roi .roi-method { padding: 0 clamp(22px, 3.2vw, 44px); color: #253953; background: #e2edf6; }
.bf-roi .roi-method summary { padding: 15px 0; cursor: pointer; font-size: .92rem; font-weight: 600; }
.bf-roi .roi-method summary:focus-visible { outline: 2px solid #476da6; outline-offset: 2px; }
.bf-roi .roi-method p { margin: 0; padding-bottom: 14px; color: #30425b; font-size: .9rem; line-height: 1.55; }
@media (max-width: 880px) {
  .bf-roi .roi-shell { gap: 28px; padding: clamp(25px, 4vw, 40px); }
}
@media (max-width: 720px) {
  .bf-roi { padding-inline: max(14px, 4vw); }
  .bf-roi .roi-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "controls" "report"; gap: 25px; padding: 29px clamp(18px, 4.5vw, 32px); border-radius: 18px; }
  .bf-roi .roi-lead { font-size: 1rem; }
  .bf-roi .roi-controls { gap: 15px 10px; }
  .bf-roi .roi-report { border-radius: 12px; }
  .bf-roi .roi-plot svg { height: 75px; }
}
@media (max-width: 360px) {
  .bf-roi .roi-controls { grid-template-columns: minmax(0, 1fr); }
}
