/* ══════════════════════════════════════════════════════
   PERCENTILE CALCULATOR — single-page tool
   ══════════════════════════════════════════════════════ */

.calc-page {
  max-width: 720px;
}

.calc-intro {
  font-size: 16px;
  line-height: 1.7;
  color: var(--lp-text-muted);
  margin: 8px 0 32px;
}

/* ── Tool widget ─────────────────────────────────────── */
.calc-tool {
  background: var(--lp-white);
  border: 1px solid var(--lp-border);
  border-radius: 14px;
  padding: 28px 28px 24px;
  margin: 0 0 40px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.calc-input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--lp-text-faint);
  margin-bottom: 10px;
}

.calc-input-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 24px;
}

#calc-raw {
  font-family: inherit;
  font-size: 36px;
  font-weight: 700;
  color: var(--lp-text);
  width: 110px;
  padding: 8px 12px;
  border: 2px solid var(--lp-border);
  border-radius: 10px;
  background: #fafbff;
  outline: none;
  text-align: center;
  -moz-appearance: textfield;
}
#calc-raw::-webkit-outer-spin-button,
#calc-raw::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#calc-raw:focus {
  border-color: var(--lp-accent);
  background: #fff;
}

.calc-input-suffix {
  font-size: 18px;
  color: var(--lp-text-muted);
  font-weight: 500;
}

/* ── Result block ────────────────────────────────────── */
.calc-result {
  padding-top: 20px;
  border-top: 1px solid var(--lp-border);
}

.calc-percentile-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.calc-percentile-num {
  font-size: 44px;
  font-weight: 800;
  color: var(--lp-text);
  letter-spacing: -1px;
  line-height: 1;
}

.calc-percentile-suffix {
  font-size: 16px;
  color: var(--lp-text-muted);
}

.calc-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.calc-label--top5 { background: #E8F5EE; color: #0F6E56; }
.calc-label--top10 { background: #E8F5EE; color: #0F6E56; }
.calc-label--top25 { background: #E6F1FB; color: #185FA5; }
.calc-label--aboveAverage { background: #EEEDFE; color: #534AB7; }
.calc-label--average { background: #F3F4F6; color: #4B5563; }
.calc-label--belowAverage { background: #FFF1E8; color: #B45309; }

.calc-blurb {
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
  margin: 0 0 10px;
}

.calc-role-fit {
  font-size: 14px;
  line-height: 1.6;
  color: var(--lp-text-muted);
  margin: 0;
}

/* ── CTA below the tool ──────────────────────────────── */
/* Selector includes `a` so it beats `.blog-article a { color: var(--lp-accent) }`. */
a.calc-cta {
  display: inline-block;
  margin-top: 22px;
  padding: 12px 22px;
  background: var(--lp-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s;
}
a.calc-cta:hover {
  background: var(--lp-accent-hover);
  color: #fff;
  text-decoration: none;
}

/* ── Source / methodology footnote ────────────────────── */
.calc-source {
  font-size: 13px;
  color: var(--lp-text-muted);
  line-height: 1.6;
  padding: 14px 16px;
  background: #fafbff;
  border-left: 3px solid var(--lp-border);
  border-radius: 6px;
  margin: 16px 0 24px;
}

/* ── Reference table ─────────────────────────────────── */
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0 32px;
}
.calc-table th,
.calc-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--lp-border);
}
.calc-table th {
  font-weight: 700;
  color: var(--lp-text-faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #fafbff;
}
.calc-table td:first-child,
.calc-table td:nth-child(2) {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--lp-text);
}
a.calc-table-link {
  color: var(--lp-accent);
  text-decoration: none;
}
a.calc-table-link:hover {
  text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  .calc-tool { padding: 22px 20px 20px; }
  .calc-percentile-num { font-size: 36px; }
  #calc-raw { font-size: 30px; width: 90px; }
}
