/* ==========================================================================
   Quant Prime · v2 calculators page (calculators.html). Loads after qp-v2.css.
   Scoped under .qp-calc so old page CSS can't leak in.
   ========================================================================== */
.qp-calc { font-family: var(--qp-font); color: var(--qp-text); background: var(--qp-bg); }
.qp-calc *, .qp-calc *::before, .qp-calc *::after { box-sizing: border-box; }
.qp-calc h1, .qp-calc h2, .qp-calc h3, .qp-calc p, .qp-calc ul, .qp-calc table { margin: 0; font-family: var(--qp-font); }
.qp-calc h1, .qp-calc h2, .qp-calc h3 { color: var(--qp-text); }
.qp-calc a { text-decoration: none; }

.qp-cl-eyebrow { font-family: var(--qp-mono); font-size: 13px; letter-spacing: 0.22em; color: var(--qp-dim); }
.qp-cl-eyebrow.gold { color: var(--qp-gold); }

/* hero */
.qp-cl-hero { position: relative; overflow: hidden; padding: var(--qp-header-h) 0 0; margin: 0; }
.qp-cl-hero-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(900px 420px at 50% 0%, rgba(201,168,76,0.10), transparent 70%); }
.qp-cl-hero-inner { position: relative; max-width: 1100px; margin: 0 auto; padding: clamp(48px, 8vh, 96px) var(--qp-gutter) clamp(40px, 6vh, 64px);
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.qp-cl-hero h1 { font-weight: 400; font-size: clamp(44px, 5.2vw, 84px); line-height: 1.02; letter-spacing: -0.035em; }
.qp-cl-hero p { max-width: 760px; font-size: 19px; line-height: 1.6; color: var(--qp-text-2); }
.qp-cl-jump { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* sections + cards */
.qp-cl-sec { max-width: 1240px; margin: 0 auto; padding: 0 var(--qp-gutter) clamp(40px, 6vh, 64px); }
.qp-cl-card { scroll-margin-top: calc(var(--qp-header-h) + 20px); border-radius: 24px; border: 1px solid var(--qp-line-2); background: var(--qp-panel); overflow: hidden; }
.qp-cl-card-head { padding: 32px 36px 26px; border-bottom: 1px solid var(--qp-line); display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.qp-cl-card-head h2 { margin-top: 10px; font-weight: 500; font-size: clamp(26px, 2.4vw, 36px); letter-spacing: -0.02em; }
.qp-cl-card-head p { max-width: 460px; font-size: 16px; line-height: 1.6; color: var(--qp-text-2); }
.qp-cl-card-body { padding: 30px 36px 34px; display: flex; flex-direction: column; gap: 24px; }

/* inputs */
.qp-cl-inputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.qp-cl-inputs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qp-cl-field { display: flex; flex-direction: column; gap: 8px; }
.qp-cl-field label { font-family: var(--qp-mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--qp-muted); }
.qp-cl-field .wrap { position: relative; }
.qp-cl-field input, .qp-cl-field select {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--qp-line-2); background: var(--qp-bg);
  color: var(--qp-text); font-family: var(--qp-mono); font-size: 17px; outline: none; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.qp-cl-field select { font-family: var(--qp-font); font-size: 16px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--qp-muted) 50%), linear-gradient(135deg, var(--qp-muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 23px, calc(100% - 17px) 23px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.qp-cl-field input:focus, .qp-cl-field select:focus { border-color: var(--qp-gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.15); }
.qp-cl-field input::placeholder { color: var(--qp-dim); }
.qp-cl-field .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-family: var(--qp-mono); font-size: 13px; color: var(--qp-dim); pointer-events: none; }
.qp-cl-field .unit.pre { left: 16px; right: auto; }
.qp-cl-field .wrap.has-pre input { padding-left: 34px; }

/* result tiles (filled by the page script) */
.qp-cl-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.summary-card { padding: 22px 20px; border-radius: 16px; border: 1px solid var(--qp-line-2); background: var(--qp-bg-2); }
.summary-card.highlight { border-color: #3a321c; background: linear-gradient(180deg, rgba(201,168,76,0.07), var(--qp-bg-2)); }
.summary-value { font-family: var(--qp-mono); font-size: clamp(24px, 2.2vw, 32px); color: var(--qp-text); white-space: nowrap; }
.summary-value.pos { color: #4ecdc4; }
.summary-value.neg { color: #e5484d; }
.summary-value.gold { color: var(--qp-gold); }
.summary-label { margin-top: 8px; font-size: 13.5px; color: var(--qp-muted); }

.qp-cl-verdict { padding: 16px 20px; border-radius: 14px; font-weight: 500; text-align: center; border: 1px solid transparent; }
.qp-cl-verdict:empty { display: none; }
.qp-cl-verdict.good { color: #4ecdc4; background: rgba(78,205,196,0.08); border-color: rgba(78,205,196,0.25); }
.qp-cl-verdict.warn { color: var(--qp-gold-hi); background: rgba(201,168,76,0.08); border-color: rgba(201,168,76,0.28); }
.qp-cl-verdict.bad { color: #e5484d; background: rgba(229,72,77,0.08); border-color: rgba(229,72,77,0.28); }

.qp-cl-formula { padding: 18px 20px; border-radius: 14px; background: var(--qp-bg-2); border: 1px solid var(--qp-line); font-size: 14.5px; line-height: 1.65; color: var(--qp-text-2); }
.qp-cl-formula code { font-family: var(--qp-mono); font-size: 13.5px; color: var(--qp-gold); }
.qp-cl-formula span { display: block; margin-top: 4px; color: var(--qp-dim); }

/* growth table */
.qp-cl-empty { padding: 28px 20px; border-radius: 14px; border: 1px dashed var(--qp-line-2); text-align: center; font-size: 15px; color: var(--qp-muted); }
.qp-cl-empty[hidden], .qp-cl-results[hidden] { display: none; }
.qp-cl-results { display: flex; flex-direction: column; gap: 20px; }
.qp-cl-table-wrap { border: 1px solid var(--qp-line); border-radius: 16px; overflow: hidden; }
.qp-cl-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.qp-cl-table th { padding: 14px 18px; text-align: right; font-family: var(--qp-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--qp-muted); background: var(--qp-bg-2); }
.qp-cl-table th:first-child, .qp-cl-table td:first-child { text-align: left; }
.qp-cl-table td { padding: 13px 18px; text-align: right; border-top: 1px solid var(--qp-line); font-family: var(--qp-mono); font-size: 14.5px; color: var(--qp-text-2); }
.qp-cl-table td:first-child { font-family: var(--qp-font); color: var(--qp-text); }
.qp-cl-table tr.highlight td { background: rgba(201,168,76,0.06); }
.qp-cl-table td.balance { color: var(--qp-text); }
.qp-cl-table td.profit { color: #4ecdc4; }
.qp-cl-note { font-size: 13px; color: var(--qp-dim); }

/* notes */
.qp-cl-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qp-cl-note-card { padding: 28px; border-radius: 20px; border: 1px solid var(--qp-line-2); background: var(--qp-panel); display: flex; flex-direction: column; gap: 14px; }
.qp-cl-note-card h3 { font-size: 20px; font-weight: 600; }
.qp-cl-note-card p, .qp-cl-note-card li { font-size: 15px; line-height: 1.65; color: var(--qp-text-2); }
.qp-cl-note-card ul { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.qp-cl-note-card .risk { padding-top: 14px; border-top: 1px solid var(--qp-line); font-size: 13.5px; color: var(--qp-dim); }

/* final CTA */
.qp-cl-final { position: relative; overflow: hidden; padding: 0; margin: 0; border-top: 1px solid var(--qp-line); }
.qp-cl-final-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(800px 360px at 50% 100%, rgba(201,168,76,0.12), transparent 70%); }
.qp-cl-final-inner { position: relative; max-width: 900px; margin: 0 auto; padding: clamp(72px, 10vh, 120px) var(--qp-gutter); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.qp-cl-final h2 { font-weight: 600; font-size: clamp(32px, 3.2vw, 48px); letter-spacing: -0.025em; }
.qp-cl-final p { font-size: 18px; line-height: 1.6; color: var(--qp-text-2); }
.qp-cl-final .note { font-size: 14px; color: var(--qp-muted); }

@media (max-width: 1100px) {
  .qp-cl-inputs, .qp-cl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qp-cl-notes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .qp-cl-hero-inner { padding-top: 36px; gap: 16px; }
  .qp-cl-hero h1 { font-size: clamp(36px, 10.5vw, 48px); }
  .qp-cl-hero p { font-size: 17px; }
  .qp-cl-jump { flex-direction: column; width: 100%; }
  .qp-cl-jump .qp-btn { width: 100%; }
  .qp-cl-card { border-radius: 20px; }
  .qp-cl-card-head { padding: 24px 20px 20px; }
  .qp-cl-card-body { padding: 22px 20px 24px; gap: 20px; }
  .qp-cl-inputs.three { grid-template-columns: minmax(0, 1fr); }
  .qp-cl-inputs { gap: 12px; }
  .qp-cl-field input, .qp-cl-field select { height: 50px; font-size: 16px; }   /* 16px stops iOS zooming in on focus */
  .qp-cl-tiles { gap: 10px; }
  .summary-card { padding: 16px 14px; }
  .summary-value { font-size: 22px; }
  .summary-label { font-size: 12.5px; }
  .qp-cl-table th, .qp-cl-table td { padding: 11px 10px; font-size: 13px; }
  .qp-cl-table th { font-size: 10px; letter-spacing: 0.06em; }
  .qp-cl-table td { white-space: nowrap; }
  .qp-cl-table th:nth-child(3), .qp-cl-table td:nth-child(3) { display: none; }   /* phones: period, balance, total return */
  .qp-cl-note-card { padding: 22px; }
  .qp-cl-final .qp-btn { width: 100%; }
}
