/* ============================================================
   PASSAGE by Khoshà — Institution (DLI) module styles
   All new classes are prefixed inst- ; uses the existing design
   tokens from styles.css (--paper --bone --ink --gold --gold-deep
   --green --red --stroke etc.) so it matches the light-luxury
   gold aesthetic without redefining anything. Mirrors the
   structure of employer.css for the parallel Employer module.
   ============================================================ */

/* ---------- institution directory grid ---------- */
.inst-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.inst-card{position:relative;overflow:hidden;background:linear-gradient(160deg,rgba(255,255,255,.82),rgba(244,240,233,.55));
  border:1px solid var(--stroke-soft);border-radius:24px;padding:20px;cursor:pointer;
  transition:transform .3s cubic-bezier(.2,.9,.3,1),box-shadow .3s,border-color .3s}
.inst-card:hover{transform:translateY(-4px);box-shadow:var(--shadow);border-color:rgba(169,130,76,.35)}
.inst-card-head{display:flex;align-items:flex-start;gap:14px}
.inst-ava{width:52px;height:52px;flex:0 0 52px;border-radius:50%;display:grid;place-items:center;
  font-family:var(--disp);font-weight:800;font-size:16px;color:#FFFDF7;
  background:radial-gradient(circle at 32% 28%,var(--gold-hi),var(--gold) 58%,var(--gold-deep));
  box-shadow:var(--shadow-soft)}
.inst-id{flex:1;min-width:0}
.inst-card-name{font-family:var(--disp);font-weight:700;font-size:16px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inst-card-sub{font-size:12px;color:var(--ink-soft);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inst-warn-chip{flex:0 0 auto;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  background:rgba(140,59,46,.12);color:var(--red);font-size:14px;font-weight:700}
.inst-card-stats{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid var(--stroke-soft)}
.inst-stat-chip{font-size:11.5px;font-weight:600;border-radius:99px;padding:4px 11px;background:rgba(255,255,255,.7);border:1px solid var(--stroke-soft);color:var(--ink-soft)}
.inst-stat-chip.inst-stat-warn{background:rgba(140,59,46,.10);color:var(--red);border-color:transparent}

/* mini PAL meter shown on the directory card */
.inst-pal-mini{margin-top:12px}
.inst-pal-mini-label{font-size:11px;color:var(--ink-faint);letter-spacing:.03em;margin-bottom:4px}
.inst-pal-mini-bar{height:6px;background:var(--bone-2);border-radius:99px;overflow:hidden}
.inst-pal-mini-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--gold-hi),var(--gold-deep));transition:width .4s cubic-bezier(.2,.9,.3,1)}
.inst-pal-mini-fill.inst-pal-warn{background:linear-gradient(90deg,var(--gold),#B9563F)}
.inst-pal-mini-fill.inst-pal-fail{background:var(--red)}

/* ---------- campuses ---------- */
.inst-campus-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.inst-campus-card{background:rgba(255,255,255,.6);border:1px solid var(--stroke-soft);border-radius:var(--r-lg);padding:16px 18px;display:flex;flex-direction:column;gap:8px}
.inst-campus-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.inst-campus-label{font-family:var(--disp);font-weight:700;font-size:14.5px}
.inst-campus-addr{font-size:13px;color:var(--ink-soft);line-height:1.5}
.inst-campus-links{display:flex;gap:14px;flex-wrap:wrap;font-size:12.5px}
.inst-campus-links a{color:var(--gold-deep);font-weight:600;text-decoration:underline}
.inst-campus-actions{display:flex;gap:8px;margin-top:4px}

/* ---------- programs — PGWP pill emphasis ---------- */
.inst-pgwp-pill{font-weight:700;letter-spacing:.02em}

/* ---------- PAL / TAL allocation ---------- */
.inst-explain{background:var(--bone);border-radius:var(--r-md);padding:12px 14px;font-size:12.5px;line-height:1.65;color:var(--ink-soft);margin-bottom:16px}
.inst-pal-big{font-family:var(--disp);font-weight:800;font-size:44px;text-align:center;padding:14px 0 4px;line-height:1}
.inst-pal-ok{color:var(--green)}
.inst-pal-warn{color:var(--gold-deep)}
.inst-pal-fail{color:var(--red)}
.inst-pal-meter{margin-top:10px}
.inst-pal-bar{height:10px;background:var(--bone-2);border-radius:99px;overflow:hidden}
.inst-pal-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--gold-hi),var(--gold-deep));transition:width .4s cubic-bezier(.2,.9,.3,1)}
.inst-pal-fill.inst-pal-warn{background:linear-gradient(90deg,var(--gold),#B9563F)}
.inst-pal-fill.inst-pal-fail{background:var(--red)}
.inst-warn-box{background:rgba(140,59,46,.08);color:var(--red);border-radius:var(--r-md);padding:10px 14px;font-size:12.5px;line-height:1.6;margin-top:12px}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width:760px){
  .inst-grid,.inst-campus-grid{grid-template-columns:1fr}
  .inst-card{padding:16px;border-radius:18px}
  .inst-pal-big{font-size:34px}
  .inst-explain{font-size:12px}
  .inst-card-stats{gap:5px}
}
