.roi-content {
  --roi-teal: #0a786b;
  --roi-navy: #102538;
  --roi-border: #d5e3ea;
}

.roi-content .intro { margin-bottom: 18px; }
.roi-content #roi-download { min-height: 42px; white-space: normal; }
.roi-content #roi-download:disabled { opacity: .55; cursor: default; }

.roi-scope {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
  padding: 11px 15px;
  border: 1px solid var(--roi-border);
  border-radius: 8px;
  background: #fff;
}

.roi-scope label { font-weight: 750; }
.roi-scope select { min-width: min(210px, 100%); max-width: 100%; }
.roi-scope p { margin: 0; color: var(--muted); font-size: 13px; }

.roi-summary {
  margin-bottom: 16px;
  border: 1px solid #2a4a61;
  border-radius: 10px;
  overflow: hidden;
  background: var(--roi-navy);
  color: #fff;
}

.roi-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.roi-kpis article { padding: 20px 19px; }
.roi-kpis article + article { border-left: 1px solid #3a566a; }
.roi-kpis span, .roi-kpis small, .roi-kpis strong { display: block; }
.roi-kpis span { color: #e1edf3; font-size: 13px; font-weight: 700; }
.roi-kpis strong { margin-block: 5px 3px; font-size: clamp(24px, 4vw, 42px); line-height: 1.1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.roi-kpis article:first-child strong { color: #83eadb; }
.roi-kpis small { color: #c1d4e0; font-size: 12px; }

.roi-actual {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 11px 19px;
  border-top: 1px solid #42637a;
  background: #1b374a;
  font-size: 13px;
}

.roi-actual span { font-weight: 750; }
.roi-actual strong { color: #a1efe2; font-size: 18px; overflow-wrap: anywhere; }
.roi-actual small { color: #d0e2ed; font-size: 12px; }

.roi-value, .roi-costs { margin-bottom: 16px; }
.roi-drivers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.roi-driver { min-width: 0; margin: 0; padding: 9px 14px 13px; border: 1px solid var(--roi-border); border-radius: 8px; background: #f7fafb; }
.roi-driver legend { padding-inline: 5px; font-size: 16px; font-weight: 800; }
.roi-guidance { min-height: 2.5em; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.roi-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 12px; }
.roi-costs .roi-inputs { grid-template-columns: repeat(4,minmax(0,1fr)); }
.roi-inputs label { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 4px; color: #344e62; font-size: 12px; font-weight: 700; }
.roi-inputs input { width: 100%; min-width: 0; }
.roi-inputs input:invalid { border-color: #b34839; }
.roi-driver-footer { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-top: 13px; }
.roi-driver-footer output { color: #08665c; font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.roi-driver-footer a { color: #056a60; font-size: 13px; font-weight: 700; }
.roi-validation { color: #912e23; font-size: 14px; font-weight: 700; }

@media (max-width: 1100px) {
  .roi-costs .roi-inputs { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .roi-drivers { grid-template-columns: 1fr; }
  .roi-guidance { min-height: 0; }
}

@media (max-width: 560px) {
  .roi-kpis { grid-template-columns: 1fr; }
  .roi-kpis article { padding-block: 12px; }
  .roi-kpis article + article { border-left: 0; border-top: 1px solid #3a566a; }
}

@media (max-width: 360px) {
  .roi-inputs, .roi-costs .roi-inputs { grid-template-columns: 1fr; }
}

.roi-costs .roi-inputs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.roi-deduction {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(165px, 29%);
  align-items: center;
  gap: 10px 20px;
  margin-top: 15px;
  padding: 12px 14px;
  border-left: 3px solid #27ad99;
  border-radius: 5px;
  background: #e8f7f3;
}
.roi-deduction h3 { margin: 0 0 4px; font-size: 15px; color: #08665c; }
.roi-deduction p { margin: 0; color: var(--muted); font-size: 13px; }
.roi-deduction label { display: grid; gap: 4px; color: #344e62; font-size: 12px; font-weight: 700; }
.roi-deduction input { width: 100%; min-width: 0; }
.roi-deduction input:invalid { border-color: #b34839; }

@media (max-width: 560px) {
  .roi-costs .roi-inputs, .roi-deduction { grid-template-columns: 1fr; }
}

.roi-buckets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #42637a;
  background: #e8f7f3;
  color: var(--roi-navy);
}
.roi-buckets > div { display: grid; gap: 1px; padding: 11px 19px; }
.roi-buckets > div + div { border-left: 1px solid #b8ddd5; }
.roi-buckets span { font-size: 13px; font-weight: 750; }
.roi-buckets strong { color: #08665c; font-size: clamp(18px, 3vw, 26px); overflow-wrap: anywhere; }
.roi-buckets small { color: #344e62; font-size: 12px; }
.roi-driver-bucket { display: inline-block; margin-bottom: 5px; color: #08665c; font-size: 12px; font-weight: 800; }
.roi-deduction-fields { display: grid; gap: 8px; }
.roi-deduction select { width: 100%; min-width: 0; }

.charge-formula { margin: 12px 0; }
.charge-actions { justify-content: flex-start; }
#charge-status { margin: 10px 0 0; }
#charge-status:empty { display: none; }
.charge-review-grid article { padding: 12px; background: #f1f7f8; border-radius: 6px; }
.charge-review-grid h3 { margin: 0 0 4px; }
.charge-review-grid p { margin: 0; }
.charge-review-grid + p { margin-top: 12px; }
#documentation { margin-top: 14px; }
#documentation h3 { margin: 0 0 4px; }
#documentation p { margin: 0; }

.charge-volume { display: grid; gap: 4px; max-width: 260px; margin-bottom: 16px; }
.charge-volume label { font-size: 14px; font-weight: 750; }
.charge-results { margin-bottom: 10px; }
.charge-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#roi-charge-study { margin-top: 6px; }
@media (max-width: 560px) {
  .charge-kpis { grid-template-columns: 1fr; }
}
.charge-details summary { cursor: pointer; font-weight: 750; }
.charge-details[open] summary { margin-bottom: 12px; }
.charge-volume-control { position: relative; }
.charge-volume-control input { width: 100%; padding-right: 44px; }
.charge-volume-steps { position: absolute; inset: 1px 1px 1px auto; display: grid; width: 38px; }
.charge-volume-steps button { display: grid; place-items: center; padding: 0; border: 0; border-left: 1px solid var(--line); background: #edf5f7; color: #214b5c; line-height: 1; }
.charge-volume-steps button:first-child { border-radius: 0 6px 0 0; }
.charge-volume-steps button:last-child { border-top: 1px solid var(--line); border-radius: 0 0 6px 0; }
.charge-volume-steps button:hover { background: #d4efea; }
#charge-volume-error { margin: 0; }
