/* Study engagement rails — notes, PDF shell, subject indexes */

.study-rail {
  margin: 0 0 22px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
}

.study-rail-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.study-rail-lead {
  margin: 0 0 14px;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 62ch;
}

.study-rail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.study-rail-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: #fff;
  color: #1e40af;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.study-rail-card:hover {
  border-color: #60a5fa;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.study-rail-card strong {
  font-size: 0.92rem;
  line-height: 1.3;
  color: #1e3a8a;
}

.study-rail-card span {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

.study-chapters {
  margin: 24px 0;
  padding: 16px 0 0;
  border-top: 1px solid #e2e8f0;
}

.study-chapters-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.study-chapters-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.study-chapters-all {
  font-size: 0.88rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.study-chapters-all:hover {
  text-decoration: underline;
}

.study-chapter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-chapter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e40af;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.study-chapter-pill:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.study-chapter-pill.is-current {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  pointer-events: none;
}

.study-chapter-pill.is-new:not(.is-current) {
  border-color: #86efac;
}

.notes-page .study-rail {
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .study-rail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .study-chapter-pill {
    font-size: 0.8rem;
  }
}

/* Class book index (book.php) */

.book-class-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.book-class-page .sol-crumb {
  font-size: 0.88rem;
  color: #64748b;
  margin: 12px 0 16px;
}

.book-class-page .sol-crumb a {
  color: #2563eb;
  text-decoration: none;
}

.book-class-page .sol-crumb a:hover {
  text-decoration: underline;
}

.book-class-page .sol-crumb span[aria-hidden="true"] {
  margin: 0 6px;
  color: #cbd5e1;
}

.book-class-hero {
  margin-bottom: 16px;
}

.book-page-jump {
  margin: 0 0 20px;
  padding: 14px 16px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.book-page-jump-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.book-page-jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-page-jump-list a {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e40af;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.book-page-jump-list a:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.book-medium-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.book-class-page .hub-book-block {
  scroll-margin-top: 88px;
}

.book-class-page #books-search,
.book-class-page #books-list,
.book-class-page #books-archive,
.book-class-page #keep-studying {
  scroll-margin-top: 88px;
}

.book-legacy-panel {
  margin-top: 24px;
}

.book-keep-studying-wrap {
  margin-top: 32px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.book-keep-studying-wrap .study-rail {
  margin-bottom: 0;
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
}

.book-keep-studying-wrap .study-rail-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

@media (max-width: 640px) {
  .book-page-jump-list a {
    font-size: 0.82rem;
    padding: 6px 11px;
  }

  .book-keep-studying-wrap .study-rail-grid {
    grid-template-columns: 1fr;
  }
}
