/* Commercial + industrial calculator surfaces */
.ci-hero {
  padding: var(--space-8) 0 var(--space-6);
  border-bottom: 1px solid var(--line);
}

.ci-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: var(--space-7);
  align-items: end;
}

.ci-hero-note {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-5);
}

.ci-hero-note strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  margin-bottom: var(--space-2);
  color: var(--ember);
}

.ci-hero-note p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(250, 247, 242, 0.72);
}

.ci-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: var(--space-6);
  align-items: start;
  padding: var(--space-7) 0 var(--space-9);
}

.ci-inputs {
  background: var(--card);
  border: 1px solid var(--line);
  position: sticky;
  top: 88px;
}

.ci-panel-head {
  padding: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.ci-panel-head h2 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.ci-panel-head p {
  color: var(--mute);
  font-size: 0.875rem;
  line-height: 1.5;
}

.ci-step {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.ci-step:last-of-type { border-bottom: 0; }

.ci-step-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ci-step-number { color: var(--ember); }

.ci-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.ci-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ci-field-wide { grid-column: 1 / -1; }

.ci-field label {
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.ci-field input,
.ci-field select {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.ci-field input:focus,
.ci-field select:focus {
  outline: 2px solid var(--ember);
  outline-offset: 1px;
}

.ci-hint {
  min-height: 1.2em;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.4;
}

.ci-run {
  width: calc(100% - (var(--space-5) * 2));
  min-height: 48px;
  margin: var(--space-5);
}

.ci-results {
  min-width: 0;
}

.ci-verdict {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--ink);
  color: var(--paper);
  margin-bottom: var(--space-5);
}

.ci-verdict-main {
  padding: var(--space-6);
}

.ci-verdict-label,
.ci-kpi-label,
.ci-section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ci-verdict-label { color: var(--ember); }

.ci-verdict-value {
  margin: var(--space-3) 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-feature-settings: "tnum";
}

.ci-verdict-sub {
  color: rgba(250, 247, 242, 0.68);
  font-size: 0.9rem;
}

.ci-verdict-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-left: 1px solid rgba(250,247,242,0.14);
}

.ci-verdict-stat {
  padding: var(--space-5);
  border-bottom: 1px solid rgba(250,247,242,0.14);
}

.ci-verdict-stat:nth-child(odd) {
  border-right: 1px solid rgba(250,247,242,0.14);
}

.ci-verdict-stat:nth-last-child(-n+2) { border-bottom: 0; }

.ci-verdict-stat span {
  display: block;
  color: rgba(250,247,242,0.55);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ci-verdict-stat strong {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
  font-feature-settings: "tnum";
}

.ci-system-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: var(--space-5);
}

.ci-system {
  background: var(--card);
  padding: var(--space-5);
}

.ci-system h3 {
  font-size: 1.1rem;
  margin: var(--space-2) 0 var(--space-4);
}

.ci-ledger {
  list-style: none;
}

.ci-ledger li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.62rem 0;
  border-bottom: 1px dashed var(--line);
  color: var(--mute);
  font-size: 0.85rem;
}

.ci-ledger li:last-child { border-bottom: 0; }

.ci-ledger strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 500;
  text-align: right;
  font-feature-settings: "tnum";
}

.ci-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: var(--space-5);
}

.ci-kpi {
  background: var(--card);
  padding: var(--space-4);
}

.ci-kpi-label { color: var(--mute); }

.ci-kpi-value {
  display: block;
  margin-top: var(--space-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 500;
  font-feature-settings: "tnum";
}

.ci-break-even {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: var(--space-5);
}

.ci-break-even-copy {
  padding: var(--space-5);
  border-right: 1px solid var(--line);
  min-width: 0;
}

.ci-break-even-copy h2 {
  margin: var(--space-2) 0;
  font-size: 1.3rem;
}

.ci-break-even-copy p {
  color: var(--mute);
  font-size: 0.85rem;
  line-height: 1.5;
}

.ci-thresholds {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.ci-threshold {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-5);
  min-width: 0;
}

.ci-threshold + .ci-threshold { border-left: 1px solid var(--line); }

.ci-threshold span {
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ci-threshold strong {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  font-weight: 500;
  font-feature-settings: "tnum";
}

.ci-tco {
  border: 1px solid var(--line);
  background: var(--card);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.ci-tco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.ci-tco-item {
  background: var(--paper);
  padding: var(--space-4);
  border-top: 2px solid var(--line-strong);
}

.ci-tco-item span,
.ci-tco-item small {
  display: block;
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.ci-tco-item strong {
  display: block;
  margin: 0.4rem 0;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 500;
  font-feature-settings: "tnum";
}

.ci-method {
  padding: var(--space-5);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--mute);
  font-size: 0.8rem;
  line-height: 1.6;
}

.ci-method a { color: var(--ink); border-bottom: 1px solid var(--line-strong); }

.ci-applications {
  padding: var(--space-8) 0;
  background: var(--ink);
  color: var(--paper);
}

.ci-application-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(250,247,242,0.15);
  margin-top: var(--space-5);
}

.ci-application {
  min-height: 120px;
  padding: var(--space-4);
  background: var(--ink);
  font-size: 0.9rem;
}

.ci-application span {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.recovery-case {
  padding: var(--space-9) 0;
}

.recovery-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--space-7);
  align-items: start;
}

.recovery-ledger {
  border: 1px solid var(--line);
  background: var(--card);
}

.recovery-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px dashed var(--line);
}

.recovery-row strong {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}

.recovery-row.is-total {
  border-bottom: 0;
  background: var(--ink);
  color: var(--paper);
}

.recovery-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.recovery-node {
  min-height: 120px;
  padding: var(--space-4);
  border: 1px solid var(--line);
  background: var(--card);
}

.recovery-node strong {
  display: block;
  margin-bottom: var(--space-2);
}

.recovery-arrow {
  color: var(--ember);
  font-family: var(--font-mono);
  font-size: 1.4rem;
}

@media (max-width: 1100px) {
  .ci-layout { grid-template-columns: 1fr; }
  .ci-inputs { position: static; }
  .ci-kpis { grid-template-columns: 1fr 1fr; }
  .ci-application-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .ci-hero-grid,
  .ci-verdict,
  .ci-system-grid,
  .ci-break-even,
  .recovery-grid { grid-template-columns: 1fr; }
  .ci-verdict-side,
  .ci-break-even-copy { border-left: 0; border-right: 0; border-top: 1px solid rgba(250,247,242,0.14); }
  .ci-break-even-copy { border-color: var(--line); }
  .ci-fields,
  .ci-thresholds,
  .ci-tco-grid { grid-template-columns: 1fr; }
  .ci-threshold + .ci-threshold { border-left: 0; border-top: 1px solid var(--line); }
  .ci-application-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
  .ci-kpis,
  .ci-application-grid,
  .ci-verdict-side { grid-template-columns: 1fr; }
  .ci-verdict-stat,
  .ci-verdict-stat:nth-child(odd) { border-right: 0; border-bottom: 1px solid rgba(250,247,242,0.14); }
  .ci-verdict-stat:last-child { border-bottom: 0; }
  .recovery-flow { grid-template-columns: 1fr; }
  .recovery-arrow { transform: rotate(90deg); justify-self: center; }
}
