/* University comparison tool */
.cmp-add { position: relative; margin-bottom: 22px; max-width: 480px; }
.cmp-search { position: relative; }
.cmp-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; display: none; }
.cmp-results.show { display: block; }
.cmp-res { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  padding: 10px 14px; background: none; border: none; border-bottom: 1px solid var(--border); cursor: pointer; }
.cmp-res:last-child { border-bottom: none; }
.cmp-res:hover { background: var(--accent-soft); }
.cmp-res span { font-weight: 600; color: var(--fg); font-size: .92rem; }
.cmp-res small { color: var(--muted-fg); font-size: .8rem; }
.cmp-res.dis { opacity: .5; cursor: default; }
.cmp-empty { padding: 12px 14px; color: var(--muted-fg); font-size: .9rem; }

.cmp-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cmp-table th, .cmp-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border);
  vertical-align: top; font-size: .92rem; }
.cmp-table tbody tr:last-child td { border-bottom: none; }
.cmp-table tbody tr:nth-child(even) { background: #f6f8fb; }
.cmp-rowhead { background: #f6f8fb; font-weight: 600; color: var(--muted-fg); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; position: sticky; left: 0; z-index: 1; }
.cmp-table tbody tr:nth-child(even) .cmp-rowhead { background: #e7f0fb; }
.cmp-unihead { position: relative; background: var(--surface); min-width: 190px; vertical-align: top; }
.cmp-uniname { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 600; font-size: 1.05rem;
  color: var(--primary); line-height: 1.25; padding-right: 18px; }
.cmp-uniloc { color: var(--muted-fg); font-size: .84rem; margin-top: 4px; }
.cmp-remove { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: #e7f0fb; color: var(--muted-fg); font-size: 13px; }
.cmp-remove:hover { background: #fbe9e7; color: var(--danger); }

/* small compare button used on university cards/detail */
.compare-add { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600;
  color: var(--accent); }

/* ---- admit chances estimator ---- */
.ch-form { margin-bottom: 8px; }
.ch-formgrid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 14px; align-items: end; }
.ch-scores { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 4px; }
.ch-scoregrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 12px; }
.ch-score label { display: block; margin-bottom: 4px; }
.ch-intro-note { margin-top: 20px; }
.ch-results { margin-top: 26px; display: flex; flex-direction: column; gap: 26px; }
.ch-band-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.ch-band-head h2 { margin: 0; font-size: 1.2rem; }
.ch-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.ch-dot.ch-safe { background: #1e8e4b; } .ch-dot.ch-target { background: #3871c1; } .ch-dot.ch-reach { background: #c98a2e; }
.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.ch-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.ch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ch-chance { flex: none; width: 74px; border-radius: var(--radius); display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700;
  font-size: 1.5rem; line-height: 1; color: #fff; padding: 12px 0; }
.ch-chance small { font-family: 'Hanken Grotesk', sans-serif; font-weight: 500; font-size: .62rem; margin-top: 5px;
  text-transform: uppercase; letter-spacing: .04em; opacity: .9; }
.ch-chance.ch-safe { background: linear-gradient(180deg, #27a35a, #1e8e4b); }
.ch-chance.ch-target { background: linear-gradient(180deg, #3871c1, #2d5da3); }
.ch-chance.ch-reach { background: linear-gradient(180deg, #d69a3e, #b7791f); }
.ch-card-body { flex: 1; min-width: 0; }
.ch-uni { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 600; font-size: 1.02rem; color: var(--primary); line-height: 1.25; }
.ch-meta { color: var(--muted-fg); font-size: .82rem; margin-top: 3px; }
.ch-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: .84rem; color: var(--muted-fg); }
.ch-stats strong { color: var(--fg); }
.ch-links { display: flex; gap: 14px; margin-top: 10px; font-size: .85rem; font-weight: 600; }
.ch-disclaimer { margin-top: 24px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .86rem; color: var(--muted-fg); line-height: 1.6; }

@media (max-width: 720px) {
  .ch-formgrid { grid-template-columns: 1fr; }
  .ch-scoregrid { grid-template-columns: 1fr 1fr; }
}

/* ---- education-loan marketplace ---- */
.loan-filters { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.loan-fgroup { display: flex; flex-wrap: wrap; gap: 6px; background: #e7f0fb; padding: 4px; border-radius: 999px; }
.loan-chip { border: none; background: none; padding: 7px 15px; border-radius: 999px; font-weight: 600;
  font-size: .85rem; color: var(--muted-fg); cursor: pointer; transition: background .18s var(--ease-out), color .18s var(--ease-out); }
.loan-chip:hover { color: var(--primary); }
.loan-chip.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
/* min(360px,100%) so the track floor can never exceed the container: on a 360px
   phone the plain 360px minimum pushed each card past the viewport. */
.loan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 18px; }
.loan-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm);
  transition: transform .24s var(--ease-out), box-shadow .24s var(--ease-out); }
.loan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.loan-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.loan-name { font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 600; font-size: 1.08rem; color: var(--primary);
  line-height: 1.25; margin-bottom: 8px; }
.loan-head .badge { margin-right: 5px; }
.loan-rate { flex: none; text-align: right; font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700;
  font-size: 1.5rem; color: var(--primary); line-height: 1; }
.loan-rate span { display: block; font-family: 'Hanken Grotesk', sans-serif; font-weight: 500; font-size: .72rem; color: var(--muted-fg); }
.loan-rate small { display: block; font-family: 'Hanken Grotesk', sans-serif; font-weight: 500; font-size: .66rem; color: var(--faint-fg); margin-top: 4px; }
.loan-note { color: var(--muted-fg); font-size: .88rem; margin: 14px 0; line-height: 1.5; }
.loan-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(92px, 100%), 1fr)); gap: 10px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.loan-specs .k { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--faint-fg); }
.loan-specs .v { display: block; font-size: .85rem; font-weight: 600; color: var(--fg); margin-top: 3px; }
.loan-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.loan-tags span { font-size: .72rem; font-weight: 600; color: var(--primary-600); background: #e7f0fb; padding: 4px 9px; border-radius: 999px; }
.loan-foot { display: flex; gap: 8px; margin-top: auto; }
.loan-empty { text-align: center; color: var(--muted-fg); padding: 30px; }
.linkish { background: none; border: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; font-size: inherit; }
