/* ═══════════════════════════════════════════════════════════
   APR CALCULATOR PAGE
   Built on top of style-new.css design tokens (see :root)
═══════════════════════════════════════════════════════════ */

.apr-page { background: var(--surface); }

/* ── Page banner ─────────────────────────────────────────── */
.apr-banner {
  position: relative;
  overflow: hidden;
  padding: 64px 0 92px;
  background: linear-gradient(135deg, #070b18 0%, #101a3a 55%, #08111f 100%);
  color: #fff;
}
.apr-banner::before {
  content: '';
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: rgba(79,165,220,.16);
  filter: blur(95px);
  top: -140px; left: -90px;
  pointer-events: none;
}
.apr-banner::after {
  content: '';
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: rgba(97,98,219,.18);
  filter: blur(95px);
  bottom: -140px; right: -70px;
  pointer-events: none;
}
.apr-banner .container { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;}

.apr-crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); font-weight: 600;
  color: rgba(255,255,255,.65);
  margin-bottom: 22px;
}
.apr-crumb a { color: rgba(255,255,255,.65); text-decoration: none; }
.apr-crumb a:hover { color: #fff; }
.apr-crumb i { font-size: 11px; opacity: .6; }
.apr-crumb span { color: #fff; }


.apr-banner h1 {
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.16;
  max-width: 720px;
  margin: auto;
  margin-bottom: 16px;
  text-align: center;
}
.apr-banner h1 .hl {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}


/* ── Calculator shell ────────────────────────────────────── */
.apr-wrap {
    max-width: var(--max-w);
    margin: 0px auto 0;
    padding: 50px var(--gutter) 90px;
    position: relative;
    z-index: 2;
}

.apr-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 60px rgba(13,15,34,.16), 0 4px 16px rgba(0,0,0,.06);
  overflow: hidden;
}

.apr-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}

/* ── Left: inputs ────────────────────────────────────────── */
.apr-inputs {
  padding: 48px 46px;
}
.apr-inputs-head { margin-bottom: 34px; }
.apr-inputs-head h2 {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}
.apr-inputs-head p {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.apr-field { margin-bottom: 30px; }
.apr-field:last-child { margin-bottom: 0; }

.apr-field-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
.apr-field-top label {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text);
}
.apr-field-val {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--indigo);
  white-space: nowrap;
}

/* Range slider — themed */
.apr-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--border);
  outline: none;
  cursor: pointer;
  --fill: 0%;
}
.apr-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--indigo) 0%, var(--blue) var(--fill), var(--border) var(--fill), var(--border) 100%);
}
.apr-range::-moz-range-track {
  height: 6px;
  border-radius: var(--r-full);
  background: var(--border);
}
.apr-range::-moz-range-progress {
  height: 6px;
  border-radius: var(--r-full);
  background: var(--grad);
}
.apr-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--indigo);
  box-shadow: 0 2px 10px rgba(97,98,219,.45);
  cursor: pointer;
  transition: transform var(--t) var(--ease);
}
.apr-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.apr-range::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--indigo);
  box-shadow: 0 2px 10px rgba(97,98,219,.45);
  cursor: pointer;
}

.apr-field-minmax {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: 600;
}

.apr-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.apr-note i { color: var(--indigo); font-size: 15px; }
.apr-note b { color: var(--dark); }

/* ── Right: results panel ────────────────────────────────── */
.apr-results {
  background: linear-gradient(180deg, #F4F6FE 0%, #EEF0FC 100%);
  border-left: 1px solid var(--border);
  padding: 48px 42px;
  display: flex;
  flex-direction: column;
}
.apr-results-head {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 22px;
}

.apr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-base);
}
.apr-row span:first-child { color: var(--text-2); font-weight: 600; }
.apr-row span:last-child { color: var(--dark); font-weight: 700; }
.apr-row.apr-row--sub span:first-child { padding-left: 18px; color: var(--muted); font-weight: 500; font-size: var(--fs-sm); }
.apr-row.apr-row--sub span:last-child { color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.apr-row.apr-row--total span { color: var(--dark); font-weight: 800; }
.apr-row.apr-row--total { border-bottom: none; padding-top: 16px; }

.apr-hero-result {
  margin-top: 22px;
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--grad);
  color: #fff;
  box-shadow: 0 14px 34px rgba(97,98,219,.35);
}
.apr-hero-result .apr-hr-label {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  opacity: .9;
  margin-bottom: 8px;
}
.apr-hero-result .apr-hr-value {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
}
.apr-hero-result .apr-hr-value sup { font-size: 20px; font-weight: 700; }

.apr-disclaimer {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(247, 183, 51, .12);
  border: 1px solid rgba(247, 183, 51, .35);
  border-radius: var(--r);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
}
.apr-disclaimer i { color: #C88A00; font-size: 15px; margin-top: 2px; flex-shrink: 0; }
.apr-disclaimer b { color: var(--dark); }

.apr-cta {
  margin-top: 22px;
  width: 100%;
  text-align: center;
  padding: 15px 28px;
}

/* ── Formula strip below the calculator ─────────────────── */
.apr-formula {
  margin-top: 34px;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(97,98,219,.10), 0 2px 8px rgba(0,0,0,.05);
  padding: 34px 40px;
}
.apr-formula h3 {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.apr-formula h3 i { color: var(--indigo); }
.apr-formula-eq {
  font-family: 'Courier New', monospace;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--indigo);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 20px;
  overflow-x: auto;
  white-space: nowrap;
  margin-bottom: 16px;
}
.apr-formula p {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.75;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 980px) {
  .apr-grid { grid-template-columns: 1fr; }
  .apr-results { border-left: none; border-top: 1px solid var(--border); }
  .apr-inputs, .apr-results { padding: 38px 28px; }
  .apr-wrap { margin-top: -40px; }
}

@media (max-width: 560px) {
  .apr-banner { padding: 48px 0 76px; }
  .apr-inputs, .apr-results { padding: 30px 20px; }
  .apr-hero-result .apr-hr-value { font-size: 36px; }
  .apr-formula { padding: 26px 22px; }
  .apr-formula-eq { font-size: 14px; white-space: normal; }
}
