/* /css/lg-loan-analysis.css
   ChatGPT's pros and cons of two loans, drawn by /scripts/lg-loan-analysis.js. Shared by Compare
   Rates and the Loan Comparison calculator. Put class "lgla" on the element it fills; add
   "lgla-panel" for the tinted card look (Compare Rates). Each loan keeps its color from the rest
   of the page: A green, B blue, C orange, D violet, E pink. */

.lgla { --la-a:#2f9e44; --la-a-d:#166534; --la-a-l:#ebf8ee; --la-b:#1a56db; --la-b-d:#1e3a8a; --la-b-l:#eaf1ff;
    --la-c:#e8590c; --la-c-l:#fff1e6; --la-d:#7048e8; --la-d-l:#f1edff; --la-e:#c2255c; --la-e-l:#fdecf3;
    --la-ink:#14181f; --la-muted:#5b6472; --la-line:#e3e7ec; --la-warn:#7c4a03; --la-warn-l:#fff4db; --la-red:#c92a2a;
    font-family:Poppins, sans-serif; color:var(--la-ink); text-align:left; }
.lgla *, .lgla *::before, .lgla *::after { box-sizing:border-box; }
.lgla.lgla-panel { background:linear-gradient(180deg, #f7f9ff 0%, #fff 160px); border-radius:22px; padding:20px 22px;
    box-shadow:0 0 0 1px #dfe6f5, 0 10px 30px rgba(26,86,219,.06); }

.lgla .lgla-badge { display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
    color:#4c3fd1; background:#efedff; border-radius:999px; padding:4px 10px; }
.lgla .lgla-head h3 { font-size:24px; line-height:1.3; font-weight:600; margin:12px 0 8px; color:var(--la-ink); text-align:left; }
.lgla .lgla-head p { font-size:17px; line-height:1.6; color:#343b46; margin:0; max-width:980px; }
.lgla b { font-weight:700; color:var(--la-ink); font-variant-numeric:tabular-nums; }

.lgla .lgla-tag { flex:none; display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:7px;
    color:#fff; font-size:13px; font-weight:700; }
.lgla .lgla-tag-a { background:var(--la-a); }
.lgla .lgla-tag-b { background:var(--la-b); }
.lgla .lgla-tag-c { background:var(--la-c); }
.lgla .lgla-tag-d { background:var(--la-d); }
.lgla .lgla-tag-e { background:var(--la-e); }

.lgla .lgla-cols { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; margin-top:20px; }
/* Three or more loans: as many columns as fit (all of them on a wide page), wrapping when narrow. */
.lgla .lgla-cols.lgla-n3 { grid-template-columns:repeat(auto-fit, minmax(min(250px,100%), 1fr)); }
.lgla .lgla-cols:is(.lgla-n4, .lgla-n5) { grid-template-columns:repeat(auto-fit, minmax(min(200px,100%), 1fr)); gap:12px; }
.lgla .lgla-cols:is(.lgla-n4, .lgla-n5) .lgla-col { padding:0 14px 12px; }
.lgla .lgla-cols:is(.lgla-n4, .lgla-n5) .lgla-col h4 { margin:0 -14px 10px; padding:9px 14px; font-size:16px; }
.lgla .lgla-cols:is(.lgla-n4, .lgla-n5) .lgla-list { font-size:14px; }
/* Each loan's column: its name on a header tinted in the loan's color, then the pros and cons. */
.lgla .lgla-col { --la-c1:var(--la-a-l); --la-c2:var(--la-a-d); background:#fff; border:1px solid var(--la-line); border-radius:16px; padding:0 16px 14px; min-width:0; overflow:hidden; }
.lgla .lgla-col.lgla-b { --la-c1:var(--la-b-l); --la-c2:var(--la-b-d); }
.lgla .lgla-col.lgla-c { --la-c1:var(--la-c-l); --la-c2:#9a3412; }
.lgla .lgla-col.lgla-d { --la-c1:var(--la-d-l); --la-c2:#4c1d95; }
.lgla .lgla-col.lgla-e { --la-c1:var(--la-e-l); --la-c2:#8a1c44; }
.lgla .lgla-col h4 { display:flex; align-items:center; gap:8px; margin:0 -16px 12px; padding:10px 16px; background:var(--la-c1); font-size:17px; font-weight:600; color:var(--la-c2); }
.lgla .lgla-list { list-style:none; margin:0; padding:0; display:grid; gap:8px; font-size:15px; line-height:1.5; }
.lgla .lgla-list li { position:relative; padding-left:28px; margin:0; }
.lgla .lgla-list li::before { position:absolute; left:0; top:1px; width:20px; height:20px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; }
.lgla .lgla-pros li::before { content:"✓"; background:#e6f6ea; color:#1f7a33; }
.lgla .lgla-cons li::before { content:"–"; background:#fdecec; color:var(--la-red); }
.lgla .lgla-cons { margin-top:10px; padding-top:10px; border-top:1px dashed var(--la-line); }

.lgla h5 { font-size:14px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--la-muted); margin:22px 0 10px; }
.lgla .lgla-choices { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(280px,100%), 1fr)); gap:12px; }
.lgla .lgla-choice { border-radius:16px; padding:14px 16px; background:var(--la-a-l); font-size:15px; line-height:1.5; }
.lgla .lgla-choice.lgla-b { background:var(--la-b-l); }
.lgla .lgla-choice.lgla-c { background:var(--la-c-l); }
.lgla .lgla-choice.lgla-d { background:var(--la-d-l); }
.lgla .lgla-choice.lgla-e { background:var(--la-e-l); }
.lgla .lgla-choice strong { display:flex; align-items:center; gap:8px; font-size:16px; font-weight:600; margin-bottom:4px; }
.lgla .lgla-choice p { margin:0; }
.lgla .lgla-choice .lgla-why { color:#343b46; margin-top:4px; }
/* The lender's logo on a white tile, at the top of its "Choose Loan X if…" box. */
.lgla .lgla-choice .lgla-logo { display:block; height:44px; max-width:170px; object-fit:contain; background:#fff; border-radius:10px; padding:5px 10px; margin:0 0 10px; }
.lgla .lgla-two { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; }
.lgla .lgla-two ul { margin:0; padding-left:20px; font-size:15px; line-height:1.55; display:grid; gap:6px; }

.lgla .lgla-foot { margin:20px 0 0; font-size:13px; line-height:1.5; color:var(--la-muted); }
.lgla .lgla-stale { margin:14px 0 0; display:flex; gap:12px; align-items:center; flex-wrap:wrap; background:var(--la-warn-l); color:var(--la-warn);
    border-radius:12px; padding:10px 14px; font-size:15px; font-weight:500; }
.lgla .lgla-btn { display:inline-flex; align-items:center; justify-content:center; height:40px; padding:0 18px; border-radius:12px; border:1px solid var(--la-line);
    background:#fff; color:var(--la-ink); font:600 14px Poppins, sans-serif; cursor:pointer; margin-top:4px; text-transform:none; letter-spacing:normal; }
.lgla .lgla-btn:hover { background:#f5f7f9; }

.lgla .lgla-msg { font-size:15px; color:var(--la-muted); margin:14px 0 0; }
.lgla .lgla-skel { margin-top:14px; display:grid; gap:10px; }
.lgla .lgla-skel i { display:block; height:14px; border-radius:7px; background:linear-gradient(90deg, #edf0f5 25%, #f7f8fb 50%, #edf0f5 75%);
    background-size:200% 100%; animation:lgla-shine 1.3s infinite linear; }
.lgla .lgla-skel i:nth-child(2) { width:92%; }
.lgla .lgla-skel i:nth-child(3) { width:76%; }
.lgla .lgla-skel i:nth-child(4) { width:84%; }
@keyframes lgla-shine { to { background-position:-200% 0; } }
@media (prefers-reduced-motion: reduce) { .lgla .lgla-skel i { animation:none; } }

/* "lgla-lead": the analysis as the lead of the page (Compare Rates), right under the lenders: shaded
   a light purple (the AI badge's color family), a firmer edge and shadow, and a bigger headline so it
   reads first. The badge turns white so it still stands out on the purple; the loan columns stay white. */
.lgla.lgla-panel.lgla-lead { background:#efebff; border:1px solid #d6cefd; box-shadow:0 14px 40px rgba(76,63,209,.12); padding:26px 30px; }
.lgla.lgla-lead .lgla-badge { font-size:14px; padding:5px 12px; background:#fff; }
.lgla.lgla-lead .lgla-head h3 { font-size:30px; line-height:1.25; letter-spacing:-.3px; margin:14px 0 10px; max-width:1040px; }
.lgla.lgla-lead .lgla-head p { font-size:18px; }

/* Narrow: one column. Container queries would be nicer, but the calculator modal and the compare
   page both narrow with the window. */
@media (max-width: 991.98px) {
    .lgla .lgla-cols, .lgla .lgla-two { grid-template-columns:minmax(0,1fr); }
}
@media (max-width: 767.98px) {
    .lgla.lgla-panel, .lgla.lgla-panel.lgla-lead { padding:16px; }
    .lgla.lgla-lead .lgla-head h3 { font-size:22px; }
    .lgla .lgla-head h3 { font-size:20px; }
    .lgla .lgla-head p { font-size:16px; }
}
