/* Pipeline ROI calculator. Namespaced .pqroi so it cannot collide with page styles.
   Fonts resolve through the site tokens so the widget matches whatever page hosts it.
   Loaded directly by /roi-calculator/ and injected by assets/pipeline-roi-calculator.js
   on embedded pages. */

.pqroi, .pqroi * { box-sizing: border-box; }

.pqroi {
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  color: #0D0F14;
  background: #fff;
  border: 1px solid rgba(13, 15, 20, 0.10);
  border-radius: 6px;
  padding: clamp(22px, 3.4vw, 40px);
}

.pqroi-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1B45B8;
  margin: 0 0 10px;
}

.pqroi h3 {
  font-family: var(--font-serif, "Instrument Serif", Georgia, serif);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 33px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.pqroi-sub {
  font-size: 15px;
  line-height: 1.6;
  color: #5B5F78;
  margin: 0 0 28px;
  max-width: 62ch;
}

.pqroi-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: clamp(24px, 3.4vw, 44px);
  align-items: start;
}

.pqroi-field { margin-bottom: 20px; }
.pqroi-field:last-child { margin-bottom: 0; }

.pqroi-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0D0F14;
  margin-bottom: 4px;
}

.pqroi-desc { font-size: 12px; line-height: 1.5; color: #5B5F78; margin: 0 0 7px; }
.pqroi-src { font-size: 11px; line-height: 1.5; color: #8A8FA3; margin: 6px 0 0; }
.pqroi-src a { color: #8A8FA3; text-decoration: underline; }

.pqroi input[type="number"],
.pqroi select {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 15px;
  border: 1px solid rgba(13, 15, 20, 0.16);
  border-radius: 4px;
  background: #F8F7F4;
  color: #0D0F14;
}

.pqroi input[type="number"]:focus,
.pqroi select:focus,
.pqroi input[type="range"]:focus { outline: 2px solid #1B45B8; outline-offset: 2px; }

.pqroi select {
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  cursor: pointer;
}

.pqroi input[type="range"] { width: 100%; accent-color: #1B45B8; margin: 4px 0 0; }

.pqroi-readout {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 14px;
  font-weight: 600;
  color: #1B45B8;
}

.pqroi-headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.pqroi-stat {
  border: 1px solid rgba(13, 15, 20, 0.10);
  border-radius: 5px;
  padding: 15px 16px;
  background: #F8F7F4;
}

.pqroi-stat.is-lead { background: #0D0F14; border-color: #0D0F14; }

.pqroi-stat-k {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5B5F78;
  margin-bottom: 7px;
}

.pqroi-stat.is-lead .pqroi-stat-k { color: #9AA0B4; }

.pqroi-stat-v {
  display: block;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 600;
  line-height: 1.1;
  color: #0D0F14;
}

.pqroi-stat.is-lead .pqroi-stat-v { color: #fff; }

.pqroi-stat-n {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: #5B5F78;
  margin-top: 7px;
}

.pqroi-stat.is-lead .pqroi-stat-n { color: #9AA0B4; }

.pqroi-table-wrap { overflow-x: auto; }

.pqroi table { width: 100%; border-collapse: collapse; font-size: 14px; }

.pqroi th,
.pqroi td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(13, 15, 20, 0.09);
  vertical-align: top;
}

.pqroi th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5B5F78;
}

.pqroi td.num {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  text-align: right;
  white-space: nowrap;
}

.pqroi tr.is-key td { background: #F8F7F4; font-weight: 600; }

.pqroi-truth {
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 3px solid #1B45B8;
  background: #F8F7F4;
  border-radius: 0 4px 4px 0;
}

.pqroi-truth p { font-size: 13px; line-height: 1.6; color: #0D0F14; margin: 0 0 9px; }
.pqroi-truth p:last-child { margin-bottom: 0; }

.pqroi-note { font-size: 12px; line-height: 1.6; color: #5B5F78; margin: 24px 0 0; }
.pqroi-note a { color: #1B45B8; }

@media (max-width: 820px) {
  .pqroi-grid { grid-template-columns: 1fr; }
}
