/* ── Study hub: School, Competitive Exams, College, A–Z Notes ─────────── */
.study-wrap { max-width: 1180px; margin: 0 auto; padding: 40px 20px 64px; }
.study-section { margin-bottom: 48px; }
.study-section > h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 0 0 6px; color: #0f172a; }
.study-section > .study-lead { color: #475569; margin: 0 0 20px; max-width: 760px; }

.study-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.study-grid--wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.study-card { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px; color: #0f172a; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.study-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .08); border-color: #c4b5fd; }
.study-card h3 { font-size: 1.05rem; margin: 0; color: #0f172a; }
.study-card p { margin: 0; color: #475569; font-size: .9rem; line-height: 1.5; }
.study-card .study-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #efeafd; color: #5b21b6; font-size: 1.1rem; margin-bottom: 4px; }
.study-card .study-meta { margin-top: auto; padding-top: 8px; font-size: .8rem; color: #5b21b6; font-weight: 600; }
.study-class-num { font-size: 2rem; font-weight: 800; line-height: 1; color: #5b21b6; }

.study-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.study-pills a, .study-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #334155; font-size: .86rem; text-decoration: none; }
.study-pills a:hover { border-color: #a78bfa; color: #5b21b6; }
.study-pills a.active { background: #5b21b6; border-color: #5b21b6; color: #fff; }

/* Subject accordion with topic rows */
.study-subject { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.study-subject > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; align-items: center; gap: 12px; font-weight: 700; color: #0f172a; }
.study-subject > summary::-webkit-details-marker { display: none; }
.study-subject > summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; font-size: .8rem; color: #64748b; transition: transform .2s; }
.study-subject[open] > summary::after { transform: rotate(180deg); }
.study-subject > summary .count { font-weight: 500; font-size: .82rem; color: #64748b; }
.study-subject-body { border-top: 1px solid #f1f5f9; padding: 6px 18px 16px; }
.study-subject-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; font-size: .85rem; }
.study-subject-links a { color: #5b21b6; font-weight: 600; text-decoration: none; }
.study-subject-links a:hover { text-decoration: underline; }

.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #e2e8f0; }
.topic-row:last-child { border-bottom: 0; }
.topic-row .topic-num { flex: 0 0 28px; height: 28px; border-radius: 8px; background: #f1f5f9; color: #475569; font-size: .78rem; font-weight: 700; display: grid; place-items: center; }
.topic-row .topic-name { flex: 1; color: #0f172a; font-size: .95rem; }
.topic-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.topic-actions a { font-size: .78rem; font-weight: 600; padding: 5px 10px; border-radius: 8px; text-decoration: none; border: 1px solid #e2e8f0; color: #334155; background: #fff; white-space: nowrap; }
.topic-actions a:hover { border-color: #a78bfa; color: #5b21b6; }
.topic-actions a.primary { background: #5b21b6; border-color: #5b21b6; color: #fff; }
.topic-actions a.primary:hover { background: #4c1d95; color: #fff; }

.study-stream { margin-bottom: 28px; }
.study-stream > h3 { font-size: 1.15rem; margin: 0 0 4px; color: #0f172a; }
.study-stream > p { margin: 0 0 12px; color: #475569; font-size: .9rem; }

/* Facts / info blocks */
.study-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 28px; }
.study-fact { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; }
.study-fact .k { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #64748b; margin-bottom: 4px; }
.study-fact .v { color: #0f172a; font-size: .95rem; line-height: 1.5; }
.study-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px 22px; margin-bottom: 18px; }
.study-box h2, .study-box h3 { margin: 0 0 10px; font-size: 1.15rem; color: #0f172a; }
.study-box ul, .study-box ol { margin: 0; padding-left: 20px; color: #334155; line-height: 1.75; }
.study-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.study-note { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; border-radius: 12px; padding: 12px 16px; font-size: .9rem; margin: 0 0 24px; }
.study-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; }

/* Boards table */
.board-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; font-size: .9rem; }
.board-table th, .board-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #f1f5f9; }
.board-table th { background: #f8fafc; color: #334155; font-weight: 700; }
.board-table a { color: #5b21b6; font-weight: 600; }

/* A–Z notes */
.az-bar { position: sticky; top: calc(var(--header-h, 70px) + 8px); z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px; margin-bottom: 16px; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.az-bar button, .az-bar a { min-width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: #334155; font-weight: 700; cursor: pointer; display: grid; place-items: center; text-decoration: none; font-size: .85rem; }
.az-bar button:hover, .az-bar a:hover { background: #efeafd; color: #5b21b6; }
.az-bar button.active { background: #5b21b6; color: #fff; }
.az-bar button:disabled { color: #cbd5e1; cursor: default; background: transparent; }
.az-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.az-tools input, .az-tools select { padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: .95rem; background: #fff; color: #0f172a; }
.az-tools input { flex: 1; min-width: 220px; }
.az-letter { font-size: 1.4rem; font-weight: 800; color: #5b21b6; margin: 22px 0 10px; scroll-margin-top: calc(var(--header-h, 70px) + 70px); }
.az-entry { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.az-entry h3 { margin: 0 0 4px; font-size: 1rem; color: #0f172a; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.az-entry .az-tag { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #efeafd; color: #5b21b6; }
.az-entry p { margin: 0 0 8px; color: #334155; line-height: 1.6; font-size: .93rem; }

@media (max-width: 760px) {
  .study-wrap { padding: 28px 16px 48px; }
  .study-cols { grid-template-columns: 1fr; }
  .topic-row { flex-wrap: wrap; }
  .topic-actions { width: 100%; justify-content: flex-start; padding-left: 40px; }
  .board-table th:nth-child(3), .board-table td:nth-child(3) { display: none; }
}

/* The global reset strips list markers; restore them in study content boxes. */
.study-box ul { list-style: disc; }
.study-box ol { list-style: decimal; }
.study-box li::marker { color: #7c3aed; }
