/* Calculadora de rentabilidad. Misma familia visual que /portfolio/pipeline-runner/. */
.calc-main { padding: 34px 6% 90px; max-width: 1280px; margin: 0 auto; }
.calc-body .language-switch { display: flex; margin-left: auto; }
.calc-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 8%; align-items: end; margin: 46px 0 34px; }
.calc-head h1 { font-size: clamp(46px, 6.4vw, 96px); letter-spacing: -.06em; line-height: .99; }
.calc-head h1 em { color: var(--acid); font-size: 1.08em; letter-spacing: -.045em; }
.calc-head p { font-size: 14px; line-height: 1.75; color: #bfc2b5; max-width: 480px; }
.calc-head p strong { color: var(--paper); font-weight: 500; }

.calc-shell { border: 1px solid #555b484f; background: #1c1f1b; padding: 30px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }

.calc-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.calc-presets button { border: 1px solid #555b484f; background: #14160f; padding: 9px 14px; font-size: 11px; border-radius: 20px; color: #bfc2b5; }
.calc-presets button:hover, .calc-presets button[aria-pressed="true"] { background: var(--acid); color: var(--ink); border-color: var(--acid); }
.calc-presets-note { font-size: 10px; color: #7f8578; margin: -12px 0 22px; }

.calc-field { margin-bottom: 16px; }
.calc-field label { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: #9aa38d; margin-bottom: 7px; }
.calc-field .row { display: flex; align-items: center; gap: 10px; }
.calc-field input { width: 100%; padding: 11px 13px; border: 1px solid #5c6455; border-radius: 4px; background: #0f110e; color: var(--paper); font: 400 15px/1.4 var(--sans); }
.calc-field input:focus { outline: none; border-color: var(--acid); }
.calc-field .hint { font-size: 10px; color: #7f8578; margin-top: 6px; }
.calc-field .live { font-family: var(--mono); font-size: 10px; color: #b3b49f; white-space: nowrap; }

.calc-assumptions { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.calc-assumptions summary { cursor: pointer; font-size: 13px; color: var(--acid); list-style: none; display: flex; align-items: center; gap: 10px; }
.calc-assumptions summary::-webkit-details-marker { display: none; }
.calc-assumptions summary::before { content: '+'; font-size: 16px; width: 18px; }
.calc-assumptions[open] summary::before { content: '−'; }
.calc-assumptions .assumptions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; margin-top: 20px; }
.calc-assumptions .calc-field { margin-bottom: 12px; }
.calc-assumptions .calc-field input { padding: 8px 11px; font-size: 13px; }
.calc-reset { margin-top: 16px; font-size: 11px; color: #9aa38d; border-bottom: 1px solid #5c6455; padding-bottom: 1px; }
.calc-reset:hover { color: var(--acid); border-color: var(--acid); }

.calc-results { border-left: 1px solid var(--line); padding-left: 44px; }
.calc-headline-row { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 30px; }
.calc-headline { flex: 1; min-width: 160px; }
.calc-headline .mono { font-size: 8px; letter-spacing: .14em; color: #9aa38d; }
.calc-headline b { display: block; font-size: 42px; font-weight: 550; letter-spacing: -.03em; margin-top: 8px; color: var(--paper); }
.calc-badge { display: inline-flex; margin-top: 10px; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; padding: 5px 10px; border-radius: 12px; }
.calc-badge[data-rating="excelente"] { background: #d5ed8b; color: var(--ink); }
.calc-badge[data-rating="buena"] { background: #d5ed8b66; color: var(--paper); }
.calc-badge[data-rating="ajustada"] { background: #ff754c55; color: var(--paper); }
.calc-badge[data-rating="negativa"] { background: #ff754c; color: var(--ink); }

.stack-bar-block { margin-bottom: 26px; }
.stack-bar-block h3 { font-size: 11px; font-weight: 550; color: #bfc2b5; margin-bottom: 10px; }
.stack-bar { display: flex; height: 26px; border-radius: 4px; overflow: hidden; background: #0f110e; }
.stack-bar span { display: block; height: 100%; min-width: 2px; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 10px; font-size: 11px; color: #bfc2b5; }
.stack-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; vertical-align: middle; }
.stack-legend b { color: var(--paper); font-weight: 550; }

.calc-detail { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.calc-detail summary { cursor: pointer; font-size: 12px; color: #9aa38d; list-style: none; }
.calc-detail summary::-webkit-details-marker { display: none; }
.calc-detail summary:hover { color: var(--acid); }
.calc-detail table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.calc-detail th, .calc-detail td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 12px; }
.calc-detail td:last-child { text-align: right; font-family: var(--mono); font-size: 11px; }
.calc-detail thead th { font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: #9aa38d; font-weight: 400; }

.calc-disclaimer { margin-top: 40px; font-size: 11px; color: #7f8578; max-width: 720px; line-height: 1.7; }

.legend { margin-top: 64px; }
.legend-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #555b484f; border: 1px solid #555b484f; margin-top: 26px; }
.legend-grid > div { background: var(--ink); padding: 22px 20px; }
.legend-grid h3 { font-size: 15px; letter-spacing: -.01em; margin-bottom: 9px; color: var(--paper); }
.legend-grid p { font-size: 12px; line-height: 1.75; color: #9fa496; }

@media (max-width: 900px) {
  .calc-head { grid-template-columns: 1fr; gap: 22px; margin: 32px 0 24px; }
  .calc-shell { padding: 22px 18px; }
  .calc-grid { grid-template-columns: 1fr; gap: 8px; }
  .calc-results { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 26px; margin-top: 6px; }
  .assumptions-grid { grid-template-columns: 1fr !important; }
  .legend-grid { grid-template-columns: 1fr; }
  .calc-headline b { font-size: 34px; }
}
