/* Topic hub and topic pages; the book cards match the subject pages. */
.tp-wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.tp-crumbs { font-size: 14px; color: #6b7280; margin-bottom: 1.5rem; }
.tp-crumbs a:hover { text-decoration: underline; }
.tp-head h1 { font-size: 1.9rem; line-height: 1.25; color: #111827; margin: 0 0 .6rem; }
.tp-intro { font-size: 16px; line-height: 1.65; color: #374151; max-width: 52rem; margin: 0 0 .75rem; }
.tp-count { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #1349b9; background: #eaf1ff; padding: 4px 12px; border-radius: 999px; }
.tp-count .material-symbols-outlined { font-size: 16px; }

.tp-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.tp-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: #fff; border: 1px solid #3d7bfc26; border-radius: 16px;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .07); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; color: inherit; text-decoration: none; }
.tp-card:hover { transform: translateY(-3px); border-color: #3d7bfc59; box-shadow: 0 14px 30px rgba(53, 101, 200, .18); }
.tp-card__top { display: flex; align-items: center; gap: 10px; }
.tp-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: #eaf1ff; color: #3565c8; flex-shrink: 0; }
.tp-card__title { font-size: 17px; line-height: 1.3; color: #111827; margin: 0; }
.tp-card__intro { font-size: 13.5px; line-height: 1.5; color: #4b5563; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 10px; }
.tp-card__covers { display: flex; }
.tp-card__covers img { width: 34px; height: 44px; object-fit: cover; border-radius: 6px; border: 2px solid #fff; margin-left: -8px; background: #eef2f7; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.tp-card__covers img:first-child { margin-left: 0; }

.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.25rem; list-style: none; padding: 0; margin: 2rem 0 0; }
.tp-book { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid #3d7bfc26;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .07); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.tp-book:hover { transform: translateY(-4px); border-color: #3d7bfc59; box-shadow: 0 14px 30px rgba(53, 101, 200, .20); }
.tp-book__media { position: relative; display: block; aspect-ratio: 5/6; overflow: hidden; background: #eef2f7; }
.tp-book__media img { width: 100%; height: 100%; object-fit: cover; }
.tp-book__badge { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; background: rgba(17, 24, 39, .62); color: #fff;
    font-size: 11px; line-height: 1; padding: 5px 9px; border-radius: 999px; }
.tp-book__badge .material-symbols-outlined { font-size: 14px; line-height: 1; }
.tp-book__body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tp-book__title { font-size: 13.5px; line-height: 1.35; color: #111827; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-book__title a { color: inherit; text-decoration: none; }
.tp-book__title a:hover { color: #3565c8; }
.tp-book__author { font-size: 12px; color: #6b7280; margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tp-book__lang { display: inline-flex; align-self: flex-start; font-size: 11px; color: #3565c8; background: #eaf1ff; padding: 3px 10px; border-radius: 999px; margin-top: auto; }

.tp-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2.5rem 0 0; }
.tp-pager a, .tp-pager span { min-width: 40px; padding: 8px 14px; border-radius: 12px; text-align: center; font-size: 15px; font-weight: 600; }
.tp-pager a { background: #dbeafe; color: #374151; text-decoration: none; }
.tp-pager a:hover { background: #3565c8; color: #fff; }
.tp-pager .on { background: #3565c8; color: #fff; }
.tp-pager .gap { color: #9ca3af; }

.tp-more { margin: 3rem 0 0; }
.tp-more h2 { font-size: 1.2rem; color: #111827; margin: 0 0 .9rem; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-chips a { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; border: 1px solid #3d7bfc5c; background: #fff; color: #3d7bfc;
    font-size: 14px; text-decoration: none; transition: background-color .2s ease; }
.tp-chips a:hover { background: #eff6ff; }

@media (max-width: 639px) {
    .tp-head h1 { font-size: 1.45rem; }
    .tp-intro { font-size: 15px; }
    .tp-hub { grid-template-columns: 1fr; }
    .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    .tp-book__media { aspect-ratio: 1/1; }
    .tp-book__body { padding: 10px 10px 12px; }
    .tp-book__title { font-size: 12.5px; }
    .tp-pager a, .tp-pager span { min-width: 36px; padding: 7px 10px; font-size: 14px; }
}
