/* Textbooks hub + book landing pages (uk-tutor-tools/textbooks_mirror.py). Loaded after notebook.css. */
.tb-subject { font-family: var(--font-head); font-size: 1.25rem; margin: 28px 0 12px; color: var(--ink); }
.tb-subject:first-of-type { margin-top: 0; }
.tb-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tb-card { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 16px 16px 14px; box-shadow: var(--nb-shadow); color: var(--ink); transition: transform .12s, box-shadow .12s; min-width: 0; }
.tb-card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.tb-card strong { font-family: var(--font-head); font-size: 1.08rem; line-height: 1.3; }
.tb-card > span:last-child { font-size: .88rem; color: var(--gray-600); }
.tb-card-tag { align-self: flex-start; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--nb-yellow-soft); border-radius: 4px; padding: 2px 8px; }
.tb-s-english .tb-card-tag, .tb-s-english-language .tb-card-tag, .tb-s-english-reading .tb-card-tag, .tb-s-spag .tb-card-tag, .tb-s-history .tb-card-tag { background: #ffdcec; }
.tb-s-science .tb-card-tag, .tb-s-biology .tb-card-tag, .tb-s-chemistry .tb-card-tag, .tb-s-physics .tb-card-tag { background: #d6f7e8; }
.tb-chapters { list-style: none; margin: 0 auto; padding: 0; max-width: 900px; display: flex; flex-direction: column; gap: 10px; }
.tb-ch { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 12px 14px; box-shadow: 2px 2px 0 var(--ink); }
.tb-no { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--nb-yellow); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; }
.tb-ch-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tb-ch-title { font-weight: 800; color: var(--ink); font-size: 1.02rem; overflow-wrap: anywhere; }
.tb-ch-title:hover { color: var(--primary); text-decoration: underline; }
.tb-strand { font-size: .82rem; color: var(--gray-600); }
.tb-tiers { display: flex; gap: 6px; flex: 0 0 auto; }
.tb-tier { font-size: .82rem; font-weight: 800; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 10px; background: #d6f7e8; color: var(--ink); }
.tb-tier + .tb-tier { background: #d9e3ff; }
.tb-tier:hover { background: var(--nb-yellow); }
.tb-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tb-how > div { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 18px; box-shadow: var(--nb-shadow); }
.tb-how h3 { font-size: 1.1rem; margin-bottom: 6px; }
.tb-how p { color: var(--gray-600); font-size: .95rem; line-height: 1.65; }
#find-by-year .yr-grid { align-items: start; } #find-by-year .yr-row { align-content: flex-start; align-items: flex-start; }
.wa-float { position: fixed; bottom: 28px; right: 28px; z-index: 9999; display: flex; align-items: center; gap: 10px; background: #25D366; color: white; border-radius: 9999px; padding: 14px 22px 14px 18px; font-weight: 700; font-size: .9375rem; box-shadow: 0 6px 24px rgba(37,211,102,.4); text-decoration: none; }
.wa-float:hover { transform: translateY(-3px); color: white; }
.wa-float svg { width: 22px; height: 22px; flex-shrink: 0; }
@media (max-width: 900px) { .tb-how { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .wa-float span { display: none; } .wa-float { padding: 14px; border-radius: 50%; bottom: 18px; right: 16px; } }
@media (max-width: 560px) {
  .tb-books { grid-template-columns: 1fr; gap: 10px; }
  .tb-ch { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .tb-tiers { width: 100%; padding-left: 46px; }
  #find-by-year .yr-grid { grid-template-columns: 1fr; }
}
