/* =====================================================================================================================
   Product page group: loans/, the five product pages, emi-calculator/ and repay-loan/.
   Only the pieces these pages share and psl-site.css does not have; tokens and every other component come from psl-site.css
   (the hero card head .pl-card__*, the quick-start card .pl-start-card, the navy box .pl-box--navy and the four-step
   .pl-timeline--4 live there; the general loan calculator is psl-calculator.css).
   sp-best     "Best for" cards under the product intro
   sp-glance   "at a glance" panel placed beside its section head
   sp-calc-*   emi-calculator hero: intro, the general loan calculator, then the formula list + quick-start card
   sp-formula  the calculator formula list (emi-calculator)
   sp-warn     amber warning callout with an icon (repay-loan)
   sp-repay    the repay card (repay-loan)
   sp-explore  "Explore loans" link block above the footer (its link texts differ from the footer's, so it stays)
===================================================================================================================== */

/* ---------------------------------------------------------------- "Best for" cards */
.sp-best { margin-top: 32px; }
.sp-best .pl-h3 { margin-bottom: 14px; }
.sp-best__list { margin-bottom: 20px; }
.sp-best__list > li { display: flex; align-items: center; gap: 14px; }
.sp-best__list .pl-badge { flex: none; }
.sp-best__list p { font-weight: 600; color: var(--psl-ink); }

/* ---------------------------------------------------------------- at a glance beside its head */
.sp-glance { margin: 0; }
.sp-glance .pl-glance__grid { border-top: 0; border-bottom: 0; }
.sp-glance .pl-glance__grid dd { font-size: 1.12rem; }
.pl-table-wrap + .sp-glance { margin-top: 24px; }

/* ---------------------------------------------------------------- formula (emi-calculator) */
.pl-hero--calc { padding-bottom: 40px; }
.pl-hero--calc::before { display: none; }
.sp-calc-intro { max-width: 760px; margin-bottom: 20px; }
.sp-calc-intro .pl-lead { margin-bottom: 0; }
.sp-calc-more { display: grid; gap: 20px; margin-top: 24px; }
.sp-calc-more > * { min-width: 0; margin: 0; }
@media (min-width: 992px) {
    .pl-hero--calc { padding-bottom: 56px; }
    .sp-calc-intro { margin-bottom: 28px; }
    .sp-calc-more { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 28px; align-items: start; margin-top: 28px; }
    .sp-calc-more .sp-formula { max-width: none; }
}
.sp-formula { max-width: 520px; margin-top: 8px; }
.sp-formula .pl-h3 { margin-bottom: 10px; }
.sp-formula ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-formula li { position: relative; padding-left: 18px; font-size: .92rem; line-height: 1.5; color: var(--psl-ink-2); }
.sp-formula li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--psl-grad); }
.sp-formula b { color: var(--psl-navy-900); }

/* ---------------------------------------------------------------- warning callout (repay-loan) */
.sp-warn { display: flex; gap: 10px; align-items: flex-start; max-width: 560px; }
.sp-warn svg { margin-top: 2px; color: var(--psl-amber); }
.sp-warn p { margin: 0; }

/* ---------------------------------------------------------------- repay card (repay-loan): identify form + inline flow
   The card reuses .pl-card (white, large radius, soft shadow, blue->green gradient accent bar on top).
   The identify form shows by default; psl-repay-inline.js swaps server-rendered step fragments into .sp-repay__inline. */
.sp-repay .pl-card__sub { margin-bottom: 18px; }
.sp-repay__form { margin: 0; }
.sp-repay__label { display: block; font-weight: 700; font-size: .92rem; margin: 0 0 7px; color: var(--psl-ink); }
.sp-repay__input { box-sizing: border-box; width: 100%; min-height: 50px; padding: 12px 14px; font-size: 1rem; color: var(--psl-ink);
    border: 1px solid var(--psl-line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.sp-repay__input::placeholder { color: var(--psl-ink-3); }
.sp-repay__input:focus-visible { outline: 0; border-color: var(--psl-blue); box-shadow: 0 0 0 3px var(--psl-blue-100); }
.sp-repay__cta { width: 100%; margin-top: 16px; min-height: 52px; color: #fff; background: var(--psl-grad); box-shadow: var(--psl-shadow-btn); }
.sp-repay__cta:hover { filter: brightness(1.03); }
.sp-repay__cta[disabled] { opacity: .65; cursor: default; }

/* subtle workflow strip under the button: Verify -> OTP -> Amount -> Pay securely */
.sp-repay__flow { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 9px; margin: 16px 0 0; padding: 0; list-style: none;
    font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--psl-ink-3); }
.sp-repay__flow li { display: flex; align-items: center; }
.sp-repay__flow li + li::before { content: ""; width: 6px; height: 6px; margin-right: 9px; flex: none;
    border-right: 1.6px solid var(--psl-blue-200); border-top: 1.6px solid var(--psl-blue-200); transform: rotate(45deg); }

/* server-rendered step fragment injected into the card (OTP -> running loan -> amount -> pay) */
.sp-repay__inline { margin: 6px 0 0; }
.sp-repay__inline .orr-step__title { font-size: 1rem; font-weight: 700; margin: 0 0 10px; color: var(--psl-navy-900); }
.sp-repay__inline p { margin: 0 0 12px; font-size: .9rem; line-height: 1.5; color: var(--psl-ink-2); }
.sp-repay__inline label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 6px; color: var(--psl-ink); }
.sp-repay__inline label.opt { font-weight: 400; display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 4px 0; }
.sp-repay__inline label.opt input { width: 20px; height: 20px; min-height: 0; margin: 0; }
.sp-repay__inline input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 11px 13px; font-size: 1rem;
    border: 1px solid var(--psl-line); border-radius: 12px; }
.sp-repay__inline input:focus-visible { outline: 0; border-color: var(--psl-blue); box-shadow: 0 0 0 3px var(--psl-blue-100); }
.sp-repay__inline button, .sp-repay__inline .btn { display: block; box-sizing: border-box; width: 100%; min-height: 50px; margin-top: 14px;
    padding: 13px 16px; color: #fff; background: var(--psl-grad); border: 0; border-radius: 12px; font-size: 1rem; font-weight: 700;
    text-align: center; text-decoration: none; cursor: pointer; }
.sp-repay__inline button[disabled] { opacity: .65; cursor: default; }
.sp-repay__inline .err { color: #b00020; font-weight: 700; }
.sp-repay__inline .small { font-size: .8rem; color: var(--psl-ink-3); }
.sp-repay__inline .big { font-size: 1.5rem; }
.sp-repay__inline a { color: var(--psl-blue); }
.sp-repay__msg { margin: 10px 0 0; font-size: .9rem; line-height: 1.5; color: var(--psl-ink-2); }
.sp-repay__msg strong { color: var(--psl-ink); }

/* "Didn't get a code?" fallback on the OTP step (psl-repay-inline.js injects it into .orr-step). Neutral by
   design: shown identically whether or not a loan matched, so it never reveals that one exists. Rules are scoped
   under .sp-repay__inline so the toggle beats the full-width gradient ".sp-repay__inline button" styling and
   reads as a quiet text link, not a second CTA competing with Verify. */
.sp-repay__inline .orr-help { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--psl-line, #e4e9f0); }
.sp-repay__inline .orr-help__toggle { display: inline-flex; align-items: center; gap: 7px; width: auto;
    min-height: 0; margin: 0; padding: 0; background: none; box-shadow: none; border: 0; border-radius: 4px;
    color: var(--psl-blue); font-size: .85rem; font-weight: 700; text-align: left; text-decoration: underline;
    text-underline-offset: 2px; cursor: pointer; }
.sp-repay__inline .orr-help__toggle:hover { filter: none; text-decoration: none; }
.sp-repay__inline .orr-help__toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; margin-top: -3px; }
.sp-repay__inline .orr-help--open .orr-help__toggle::after { transform: rotate(-135deg); margin-top: 2px; }
.sp-repay__inline .orr-help__toggle:focus-visible { outline: 3px solid var(--psl-focus); outline-offset: 2px; }
.sp-repay__inline .orr-help__panel { margin-top: 10px; }
.sp-repay__inline .orr-help__panel p { margin: 0 0 8px; font-size: .84rem; line-height: 1.55; color: var(--psl-ink-3); }
.sp-repay__inline .orr-help__panel p:last-child { margin-bottom: 0; }
.sp-repay__inline .orr-help__panel a { font-weight: 700; white-space: nowrap; }

/* ways-to-pay cards: two of the four are tap-to-act (call / email) */
.sp-ways__act { padding: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.sp-ways__act > a { display: block; height: 100%; padding: 18px; border-radius: inherit; color: inherit; text-decoration: none; }
.sp-ways__act:hover { border-color: var(--psl-blue-200); box-shadow: var(--psl-shadow-sm); transform: translateY(-2px); }
.sp-ways__act > a:hover { text-decoration: none; }
.sp-ways__act > a:focus-visible { outline: 3px solid var(--psl-focus); outline-offset: 2px; }
/* exactly four cards read best two-up on wide screens (the shared grid would make it 3 + 1) */
@media (min-width: 992px) { .pl-features.sp-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- explore links */
.sp-explore__title { margin: 0 0 18px; font-family: var(--psl-font-display); font-size: 1.25rem; font-weight: 800; color: var(--psl-navy-900); }
.sp-explore__grid { display: grid; gap: 22px; }
.sp-explore__grid h3 { margin: 0 0 10px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--psl-ink-3); }
.sp-explore__grid ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sp-explore__grid .sp-explore__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.sp-explore__grid a { font-size: .92rem; font-weight: 500; color: var(--psl-navy-800); text-decoration: none; }
.sp-explore__grid a:hover { color: var(--psl-blue); text-decoration: underline; }

@media (min-width: 768px) {
    .sp-best__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sp-explore__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
}

/* responsive audit: 14 px minimum text on phones */
@media (max-width: 767.98px) {
    .sp-explore__grid h3 { font-size: .875rem; }
}

/* responsive audit: at 992-1199 px the side panel is narrow, so the six facts go two-up ("₹30,000/month" fits) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .sp-glance .pl-glance__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* phones under 400 px: one fact per row, so "₹30,000/month" never spills out of its cell */
@media (max-width: 399.98px) {
    .sp-glance .pl-glance__grid { grid-template-columns: minmax(0, 1fr); }
}
