/* Armstrong Financial — Irregular Cash-Flow IRR Calculator.
   Scoped under .calc-* so it can't clash with site/Tailwind utilities. */

.calc-page {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.calc-title {
  font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.15;
  color: #1c2127;
  letter-spacing: -0.01em;
  margin: 0;
}
@media (min-width: 768px) {
  .calc-title {
    font-size: 2.5rem;
  }
}

.calc-intro {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #475569;
}

.calc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.calc-share {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: #7792A6;
  color: #ffffff;
  border: 1px solid #7792A6;
  border-radius: 8px;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.calc-share:hover {
  background: #647f92;
  border-color: #647f92;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
  align-items: stretch;
}
@media (max-width: 700px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calc-card {
  background: #ffffff;
  border: 1px solid #e4e7dd;
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.calc-card h2 {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #140d08;
  margin: 0 0 1.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #e4e7dd;
}
.calc-card h2::before {
  content: "";
  width: 4px;
  height: 1rem;
  border-radius: 2px;
  background: #7792A6;
  flex-shrink: 0;
}

.calc-section-title {
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin: 1.25rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e4e7dd;
}
.calc-card .calc-section-title:first-of-type {
  margin-top: 0;
}

.calc-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.calc-input-row--three {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 460px) {
  .calc-input-row {
    grid-template-columns: 1fr;
  }
}

.calc-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.calc-field label {
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #475569;
  margin-bottom: 0.35rem;
}
.calc-field input {
  width: 100%;
  height: 42px;
  padding: 0 0.8rem;
  border: 1px solid #d9dcd0;
  border-radius: 4px;
  font-family: "PT Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  color: #1c2127;
  background: #ffffff;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.calc-field input:focus {
  outline: none;
  border-color: #7792A6;
  box-shadow: 0 0 0 3px rgba(119, 146, 166, 0.2);
}
.calc-field input[readonly] {
  background: #f1f3ec;
  color: #647f92;
  cursor: default;
}
.calc-field input::placeholder {
  color: #94a3b8;
}

.calc-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  background: #f1f3ec;
  border: 1px solid #e4e7dd;
  border-radius: 8px;
}
.calc-checkbox input {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
  accent-color: #7792A6;
}
.calc-checkbox label {
  font-family: "PT Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  color: #1e293b;
  cursor: pointer;
}

.calc-results {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}
.calc-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #e4e7dd;
}
.calc-result:first-child {
  padding-top: 0;
}
.calc-result:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.calc-result--highlight {
  padding: 0.9rem 1rem;
  background: rgba(119, 146, 166, 0.08);
  border: 1px solid rgba(119, 146, 166, 0.28);
  border-radius: 8px;
  margin: 0.35rem 0;
}
.calc-result--highlight .calc-result-label {
  font-weight: 700;
  color: #647f92;
}
.calc-result--highlight .calc-result-value {
  color: #647f92;
  font-weight: 700;
}

.calc-result-label {
  font-family: "PT Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.4;
}
.calc-result-label small {
  display: block;
  color: #94a3b8;
  font-size: 0.78rem;
  margin-top: 0.2rem;
}
.calc-result-label small + small {
  margin-top: 0;
}
.calc-result-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1c2127;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.calc-date {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-weight: 600;
  color: #647f92;
}

.calc-explainer {
  margin-top: 1.25rem;
}
.calc-explainer h2 {
  margin-bottom: 1rem;
}

.calc-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.calc-step:last-child {
  margin-bottom: 0;
}
.calc-step-num {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: #7792A6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.calc-step-text {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.65;
}
.calc-step-text strong {
  color: #1c2127;
}

.calc-dyn {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-weight: 700;
  color: #647f92;
  background: rgba(119, 146, 166, 0.1);
  border: 1px solid rgba(119, 146, 166, 0.25);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.calc-step-math {
  margin-top: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  color: #475569;
  background: #f1f3ec;
  border: 1px solid #e4e7dd;
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.calc-note {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.calc-note:last-child {
  margin-bottom: 0;
}
.calc-note strong {
  color: #1c2127;
}
.calc-note em {
  color: #647f92;
}

.calc-disclaimer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d9dcd0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #64748b;
  font-style: italic;
}

