/* ================================================================
   IRONMARGIN — EBITDA Leak Calculator (page-specific)
   Load AFTER css/style.css.
   ================================================================ */

/* ---------- nav active state ---------- */
.nav-links a.nav-active { color: var(--orange); }

/* ---------- diagnostic header ---------- */
.calc-hero { padding-bottom: clamp(2.75rem, 6vh, 4.5rem); }

/* ---------- input panel ---------- */
.calc-panel {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}
.calc-panel-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.calc-panel-sub {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}
.lc-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
}
@media (max-width: 560px) {
  .lc-field-row { grid-template-columns: 1fr; gap: 0; }
}
.lc-field { margin-bottom: 1.35rem; min-width: 0; }
.lc-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.45rem;
}
.lc-input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lc-input::placeholder { color: var(--muted); opacity: 0.7; }
.lc-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-tint);
}
.lc-input.invalid { border-color: #d64545; }
.lc-err {
  display: block;
  min-height: 0;
  font-size: 0.82rem;
  color: #d64545;
  margin-top: 0.35rem;
  line-height: 1.45;
}
.lc-submit {
  margin-top: 0.5rem;
  width: 100%;
  cursor: pointer;
}
.calc-privacy {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* ---------- results ---------- */
.lc-results { display: none; }
.lc-results.show { display: block; }
.lc-results-card {
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.lc-total-block {
  text-align: center;
  padding-bottom: 1.9rem;
  margin-bottom: 1.9rem;
  border-bottom: 1px solid var(--border);
}
.lc-total-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.lc-total {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-800);
  line-height: 1.1;
}
.lc-oneliner {
  margin: 0.9rem auto 0;
  font-size: 1.08rem;
  color: var(--text);
  max-width: 560px;
}

/* leak rows */
.lc-rows { list-style: none; margin: 0; padding: 0; }
.lc-row {
  padding: 1rem 0 1.1rem;
  border-bottom: 1px solid var(--border);
}
.lc-row:last-child { border-bottom: none; }
.lc-row-line {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.lc-row-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
}
.lc-row-val {
  margin-left: auto;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy-800);
  white-space: nowrap;
}
.lc-row-top .lc-row-val { color: var(--orange); }
.lc-flag {
  background: var(--orange);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.22rem 0.75rem;
  border-radius: 100px;
  white-space: nowrap;
  transform: translateY(-0.15em);
}
.lc-bar-track {
  height: 10px;
  background: var(--bg-alt);
  border-radius: 100px;
  overflow: hidden;
}
.lc-bar {
  height: 100%;
  width: 0;
  background: var(--navy-700);
  border-radius: 100px;
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.lc-bar-top { background: var(--orange); }
@media (prefers-reduced-motion: reduce) {
  .lc-bar { transition: none; }
}

.lc-footnote {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- CTA after results ---------- */
.lc-cta {
  max-width: 860px;
  margin: 2.5rem auto 0;
  background: var(--orange-tint);
  border: 1px solid #f5d9c6;
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
}
.lc-cta h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.8rem;
}
.lc-cta p {
  color: var(--text);
  max-width: 620px;
  margin: 0 auto 1.4rem;
  font-size: 1rem;
}
.lc-cta p strong { color: var(--ink); }
.lc-cta .text-link { display: inline-block; margin-top: 1.2rem; }

/* mobile: never overflow at 375px */
@media (max-width: 400px) {
  .lc-row-line { gap: 0.45rem; }
  .lc-row-val { font-size: 0.98rem; }
}
