/* Ehtesham Law — previous year papers (prefix "pq-"): paper cards with Attempt / PDF, the PYQ library,
   a paper's own page and the Free resources hub. Data: Admin → Free resources → Previous year papers. */

/* ---------- Paper card (front/partials/paper-item) ----------
   Same family as the course card: white, rounded, lifts with a gold edge on hover. Top: the exam badge beside the title
   (“JMI B.A.LL.B 2025” / “Question paper”). Then the facts as chips (status first) and two clear actions under a line.
   The title link covers the whole card, so a tap anywhere opens the paper's page; the buttons sit above it. */
.pq-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)) !important; gap: 16px !important; }
.pq-list > li[hidden] { display: none; }
.pq-list--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important; }
.pq-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; height: 100%;
  padding: 16px; border-radius: 18px; border: 1px solid var(--el-line); background: #fff;
  box-shadow: 0 1px 2px rgba(11, 34, 54, .04);
  transition: transform .25s var(--el-ease, ease), box-shadow .25s, border-color .25s;
}
.pq-card:hover { transform: translateY(-3px); border-color: rgba(242, 165, 43, .7); box-shadow: 0 22px 44px -28px rgba(11, 34, 54, .45); }
.pq-card:focus-within { border-color: var(--el-gold-500); }

/* Top: the exam badge (navy when the paper can be taken online) beside “JMI B.A.LL.B 2025 / Question paper”. */
.pq-card__top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pq-card__mono {
  flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--el-bg); border: 1px solid var(--el-line); color: var(--el-navy-800);
  font: 800 12.5px/1 var(--el-font); letter-spacing: .04em; transition: background .25s, color .25s, border-color .25s;
}
.pq-card.is-online .pq-card__mono { background: var(--el-navy-800); border-color: var(--el-navy-800); color: var(--el-gold-400); }
.pq-card__title { margin: 0 !important; min-width: 0; font-size: inherit !important; line-height: 1.2 !important; }
.pq-card__title a { color: inherit !important; text-decoration: none !important; }
.pq-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pq-card__title a:focus-visible { outline: none; }
.pq-card__title a:focus-visible::after { outline: 3px solid var(--el-navy-800); outline-offset: 2px; }
.pq-card__year { display: block; font: 800 17px/1.25 var(--el-font); color: var(--el-ink); letter-spacing: -.01em; font-variant-numeric: lining-nums; overflow-wrap: anywhere; transition: color .2s; }   /* “JMI B.A.LL.B 2025” */
.pq-card:hover .pq-card__year { color: var(--el-navy-800); }
.pq-card__kind { display: block; margin-top: 3px; font: 600 13px/1.3 var(--el-font); color: var(--el-muted); }
.pq-card__detail { margin: -6px 0 0 60px !important; font-size: 13px; line-height: 1.4; color: var(--el-muted); }

/* Facts: soft chips — the status first (green online, amber soon), then questions / minutes / downloads. */
.pq-card__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pq-card__facts li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--el-bg); font: 600 12.5px/1.2 var(--el-font); color: var(--el-body, #3d4a5c); white-space: nowrap; }
.pq-card__facts i { font-size: 11px; color: #c58a1d; }
.pq-card__state.is-online { background: #e7f7ee; color: #146c3c; }
.pq-card__state.is-online i { font-size: 7px; color: #16a34a; }
.pq-card__state.is-soon { background: #fff4df; color: #8a5a00; }

/* Older chips still used on other PYQ pages. */
.pq-card__exam { padding: 5px 9px; border-radius: 8px; background: var(--el-navy-800); color: var(--el-gold-400); font: 800 11.5px/1 var(--el-font); letter-spacing: .06em; }
.pq-tag { padding: 5px 9px; border-radius: 8px; background: var(--el-gold-50, #fff6e6); color: #8a5a00; font: 800 11.5px/1 var(--el-font); }

.pq-card__acts { position: relative; z-index: 1; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--el-line); display: flex; gap: 8px; }
.pq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px;
  font: 800 14px/1 var(--el-font); white-space: nowrap; text-decoration: none !important; transition: background .2s, color .2s, border-color .2s;
}
.pq-btn i { font-size: 13px; transition: color .2s; }
.pq-btn--go { flex: 1; background: var(--el-navy-800); color: #fff !important; }
.pq-btn--go i { color: var(--el-gold-400); }
.pq-btn--go:hover { background: var(--el-gold-500); color: var(--el-navy-950) !important; }
.pq-btn--go:hover i { color: var(--el-navy-950); }
.pq-btn--soon { flex: 1; background: var(--el-bg); color: var(--el-muted) !important; border: 1px dashed #cdd6e1; }
.pq-btn--soon em { font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; padding: 3px 6px; border-radius: 6px; background: #fff; }
.pq-btn--soon:hover { color: var(--el-ink) !important; border-color: var(--el-gold-500); }
.pq-btn--dl { background: #fff; color: var(--el-ink) !important; border: 1px solid var(--el-line); }
.pq-btn--dl:only-child { flex: 1; }
.pq-btn--dl:hover { border-color: var(--el-navy-800); background: var(--el-bg); }
.pq-btn:focus-visible { outline: 3px solid var(--el-navy-800); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pq-card, .pq-card:hover { transition: none; transform: none; } }

/* ---------- Filters ---------- */
.pq-how { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 16px; margin-bottom: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--el-line); font-size: 13.5px; color: var(--el-body, #3d5068); }
.pq-how i { color: var(--el-gold-500); width: 16px; }
.pq-filters { align-items: center; }
.pq-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; border: 1px solid #bfe6cf; background: #f1fbf5; color: #157a43; font-size: 13.5px; font-weight: 700; cursor: pointer; user-select: none; }
.pq-toggle input { accent-color: #157a43; width: 16px; height: 16px; margin: 0; }
.pq-count { margin-left: auto; font-size: 14px; }
.pq-select { height: 40px; border-radius: 999px; border: 1px solid var(--el-line); background: #fff; padding: 0 14px; font: 600 14px var(--el-font); color: var(--el-ink); }

/* ---------- PYQ library ---------- */
.pq-exams { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 172px), 1fr)); margin-bottom: 24px; }
.pq-exam { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--el-line); background: #fff; color: var(--el-ink) !important; text-decoration: none !important; transition: transform .2s, box-shadow .2s, border-color .2s; text-align: left; cursor: pointer; font: inherit; }
.pq-exam:hover, .pq-exam:focus-visible { transform: translateY(-2px); box-shadow: var(--el-shadow); border-color: var(--el-gold-500); }
.pq-exam[aria-pressed="true"] { background: var(--el-navy-800); border-color: var(--el-navy-800); color: #fff !important; }
.pq-exam[aria-pressed="true"] .pq-exam__name, .pq-exam[aria-pressed="true"] .pq-exam__n { color: rgba(255, 255, 255, .78); }
.pq-exam[aria-pressed="true"] .pq-exam__on { background: rgba(111, 211, 160, .18); color: #8ee0b6; }
.pq-exam__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pq-exam strong { font: 800 19px/1.1 var(--el-font-display, var(--el-font)); letter-spacing: -.01em; }
.pq-exam__on { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #e8f7ef; color: #157a43; font-size: 11.5px; font-weight: 700; }
.pq-exam__name { font-size: 12.5px; line-height: 1.35; color: var(--el-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pq-exam__n { margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--el-body); }
.pq-exam__n i { margin-right: 3px; opacity: .7; }
.pq-group { margin-top: 30px; }
.pq-group[hidden] { display: none; }
.pq-group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.pq-group__head h2 { margin: 0 !important; font-size: clamp(20px, 2.4vw, 26px) !important; }
.pq-group__head a { font-weight: 800; font-size: 14px; }
.pq-steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 6px 0 0; padding: 0; list-style: none; counter-reset: pq; }
.pq-steps li { position: relative; padding: 18px 18px 18px 64px; border-radius: 16px; background: #fff; border: 1px solid var(--el-line); font-size: 14px; color: var(--el-body, #3d5068); }
.pq-steps li::before { counter-increment: pq; content: counter(pq); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--el-gold-500); color: #08161f; font-weight: 800; }
.pq-steps strong { display: block; color: var(--el-ink); margin-bottom: 2px; }

/* ---------- A paper's page ---------- */
.pq-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 960px) { .pq-layout { grid-template-columns: 1fr; } }
.pq-panel { background: #fff; border: 1px solid var(--el-line); border-radius: 20px; padding: 24px; }
.pq-panel + .pq-panel { margin-top: 20px; }
.pq-panel h2 { font-size: clamp(20px, 2.2vw, 24px) !important; margin: 0 0 6px !important; }
.pq-panel > p { color: var(--el-muted); margin: 0 0 16px; }
.pq-attempt { position: relative; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, #13416e 0%, var(--el-navy-800) 55%, #071a2e 100%); color: #fff; border: 0; }
.pq-attempt h2 { color: #fff !important; }
.pq-attempt > p { color: rgba(255, 255, 255, .78); }
.pq-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 0 0 18px; }
.pq-facts div { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.pq-facts strong { display: block; font-size: 22px; line-height: 1.1; color: var(--el-gold-400); font-variant-numeric: tabular-nums; }
.pq-facts span { font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.pq-gets { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: rgba(255, 255, 255, .85); }
.pq-gets i { color: #7ee2a8; margin-right: 6px; }
.pq-start { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pq-start .el-btn { min-height: 50px; padding-inline: 26px; font-size: 16px; }
.pq-soon { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px dashed rgba(255, 255, 255, .25); }
.pq-mine { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; color: rgba(255, 255, 255, .85); }
.pq-mine a { color: var(--el-gold-400) !important; font-weight: 800; }
.pq-sections { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.pq-sections th, .pq-sections td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--el-line); }
.pq-sections th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--el-muted); }
.pq-sections td:last-child, .pq-sections th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pq-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.pq-stats div { padding: 14px; border-radius: 14px; background: var(--el-bg); }
.pq-stats strong { display: block; font-size: 24px; color: var(--el-navy-800); font-variant-numeric: tabular-nums; }
.pq-stats span { font-size: 12.5px; color: var(--el-muted); }
.pq-side { display: grid; gap: 20px; position: sticky; top: calc(var(--el-header-h, 72px) + 16px); }
@media (max-width: 960px) { .pq-side { position: static; } }
.pq-dl .el-btn { width: 100%; justify-content: center; }
.pq-note { font-size: 13px; color: var(--el-muted); margin: 10px 0 0; display: flex; gap: 8px; }
.pq-note i { color: var(--el-gold-500); margin-top: 3px; }
.pq-years { display: flex; flex-wrap: wrap; gap: 8px; }
.pq-years a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--el-line); background: var(--el-bg-soft, #f7f9fc); color: var(--el-ink) !important; font-size: 13.5px; font-weight: 700; text-decoration: none !important; }
.pq-years a:hover { border-color: var(--el-blue-600); color: var(--el-blue-600) !important; }
.pq-years a i { color: #157a43; font-size: 11px; }

/* ---------- Free resources hub ---------- */
.pq-hub-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.pq-hub-head h2 { margin: 0 !important; }
.pq-hub-head p { margin: 4px 0 0; color: var(--el-muted); }
.pq-res { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.pq-res a { display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--el-line); color: var(--el-ink) !important; text-decoration: none !important; transition: transform .2s, box-shadow .2s, border-color .2s; }
.pq-res a:hover, .pq-res a:focus-visible { transform: translateY(-3px); box-shadow: var(--el-shadow); border-color: var(--el-gold-500); }
.pq-res i.pq-res__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; background: var(--el-blue-50); color: var(--el-blue-600); }
.pq-res a:nth-child(3n+2) i.pq-res__icon { background: var(--el-gold-50, #fff6e0); color: #a86b00; }
.pq-res a:nth-child(3n+3) i.pq-res__icon { background: var(--el-green-50, #e7f7ee); color: #157a43; }
.pq-res strong { font-size: 17px; }
.pq-res span { font-size: 14px; color: var(--el-muted); line-height: 1.5; }
.pq-res em { font-style: normal; font-weight: 800; font-size: 13.5px; color: var(--el-blue-600); margin-top: 4px; }
.pq-h3 { margin: 0 !important; font-size: clamp(19px, 2vw, 23px) !important; }
.pq-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
