/* Free-tool calculator pages (job-cost-calculator). Relies on the
   design tokens in nule.css and the table styles in article.css. */

.calc-hero {
  padding: 140px 0 40px;
  text-align: center;
}

.calc-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  margin: 24px auto 18px;
  max-width: 720px;
}

.calc-hero .calc-subtitle {
  color: var(--grey);
  font-size: 18px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.calc-section {
  padding: 24px 0 60px;
}

.calc-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--surface-3);
  border-radius: 18px;
  padding: 32px 28px;
}

.calc-field { margin-bottom: 22px; }

.calc-field label {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-bottom: 8px;
}

.calc-field label .optional {
  text-transform: none;
  letter-spacing: 0;
  color: var(--grey);
  font-family: var(--font-body);
  font-size: 13px;
}

.calc-field input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.calc-field input::placeholder { color: #777; }
.calc-field input:focus { border-color: var(--orange); }

.calc-hint {
  font-size: 13px;
  color: var(--grey);
  margin-top: 7px;
  line-height: 1.5;
}

/* "Not sure what this job actually cost?" disclosure */
.calc-notsure-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-top: 9px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #3ddc97;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calc-notsure {
  display: none;
  margin-top: 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--mint);
  border-radius: 0 10px 10px 0;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--light-grey);
  line-height: 1.6;
}

.calc-notsure.open { display: block; }

.calc-notsure a { color: var(--mint); }

.calc-error {
  display: none;
  color: var(--red);
  font-size: 14px;
  margin-bottom: 16px;
}

.calc-error.show { display: block; }

.calc-submit {
  width: 100%;
  background: var(--orange);
  color: var(--black);
  border: none;
  border-radius: 8px;
  padding: 16px 32px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.calc-submit:hover { opacity: 0.9; }

/* Result */
.calc-result {
  display: none;
  max-width: 560px;
  margin: 28px auto 0;
}

.calc-result.show { display: block; }

.calc-result-card {
  background: var(--surface);
  border: 1px solid var(--surface-3);
  border-radius: 18px;
  padding: 30px 28px;
  text-align: center;
}

.calc-result-headline {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.calc-result-amount {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  margin: 14px 0 6px;
}

.calc-result-amount.over { color: var(--red); }
.calc-result-amount.under { color: var(--mint); }
.calc-result-amount.exact { color: var(--mint); }

.calc-result-detail {
  color: var(--grey);
  font-size: 15px;
  line-height: 1.65;
}

.calc-result-detail strong { color: var(--light-grey); }

.calc-accuracy {
  margin-top: 16px;
  font-size: 14px;
  color: var(--grey);
}

/* Profit breakdown (shown when customer price supplied) */
.calc-profit {
  display: none;
  margin-top: 18px;
  border-top: 1px solid var(--surface-3);
  padding-top: 18px;
}

.calc-profit.show { display: block; }

.calc-profit dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  max-width: 340px;
  margin: 0 auto 12px;
  font-size: 15px;
  text-align: left;
}

.calc-profit dt { color: var(--grey); }
.calc-profit dd {
  margin: 0;
  text-align: right;
  font-family: var(--font-display);
  color: var(--light-grey);
}

.calc-profit dd.good { color: var(--mint); }
.calc-profit dd.bad { color: var(--red); }

.calc-profit-headline {
  font-size: 16px;
  color: var(--light-grey);
  line-height: 1.6;
}

/* Conversion box under the result */
.calc-pitch {
  margin-top: 22px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 14px;
  padding: 24px 24px 26px;
  text-align: center;
}

.calc-pitch h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 10px;
}

.calc-pitch p {
  color: var(--grey);
  font-size: 15px;
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto 18px;
}

.calc-again {
  display: block;
  margin: 18px auto 0;
  background: none;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 12px 28px;
  color: var(--light-grey);
  font-family: var(--font-display);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.calc-again:hover { border-color: var(--orange); }

/* Job history */
.calc-history {
  display: none;
  max-width: 560px;
  margin: 36px auto 0;
}

.calc-history.show { display: block; }

.calc-history h2 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 4px;
  text-align: center;
}

.calc-history .article-table { min-width: 0; }
.calc-history .over { color: var(--red); }
.calc-history .under { color: var(--mint); }

.calc-history-total {
  text-align: center;
  color: var(--light-grey);
  font-size: 15px;
  line-height: 1.6;
  margin: 4px 0 0;
}

.calc-history-pitch {
  margin-top: 20px;
  text-align: center;
  color: var(--grey);
  font-size: 15px;
  line-height: 1.65;
}

.calc-history-pitch strong { color: var(--white); }

/* Supporting copy */
.calc-copy {
  max-width: 680px;
  margin: 0 auto;
  padding: 30px 0 80px;
}

.calc-copy h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 44px 0 14px;
}

.calc-copy p, .calc-copy li {
  color: var(--grey);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 14px;
}

.calc-copy ul { padding-left: 22px; margin-bottom: 14px; }

.calc-copy strong { color: var(--light-grey); }

.calc-copy a { color: #3ddc97; }

@media (max-width: 640px) {
  .calc-hero { padding: 120px 0 24px; }
  .calc-card, .calc-result-card { padding: 24px 18px; }
  .calc-result-amount { font-size: 32px; }
}
