/* Book and project guides use the existing catalog typography and surfaces. */
.book-filters {grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto;align-items:end}
.catalog-filters .book-free-filter {display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:9px;min-height:44px;color:#263d46}
.catalog-filters .book-free-filter input {width:18px;height:18px;min-height:0;margin:0;accent-color:#2459bf}
.book-shelf + .book-shelf {margin-top:33px}
.book-shelf-heading {display:flex;align-items:baseline;gap:8px 18px;flex-wrap:wrap;margin:0 0 12px}
.book-shelf-heading h2 {margin:0;color:#192b34;font-size:clamp(20px,2.3vw,26px)}
.book-shelf-heading a,.major-study-links a {display:inline-flex;align-items:center;gap:6px;color:#1946a6;font-size:14px;font-weight:650;text-decoration:underline;text-underline-offset:3px}
.book-shelf-heading svg,.major-study-links svg,.book-links svg {width:15px;height:15px;flex:none}
.book-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
.book-card {display:flex;flex-direction:column;min-width:0;background:#fff}
.book-card-meta {display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.book-card-meta .tile-icon {flex:none;width:39px;height:39px}
.book-card-meta .catalog-tags {margin:0}
.book-card h3 {color:#192b34;font-size:clamp(17px,1.7vw,21px);line-height:1.3;overflow-wrap:anywhere;margin:0 0 7px}
.book-topic {color:#405661;font-size:14px;line-height:1.55;margin:0 0 13px}
.resource-guide {display:grid;gap:12px;margin:0 0 15px;color:#34434b}
.resource-guide dt {font-size:14px;font-weight:740;color:#253741;margin-bottom:3px}
.resource-guide dd {font-size:16px;line-height:1.6;margin:0}
.book-card .book-links {margin-top:auto;margin-bottom:5px}
.book-card .book-links a {display:inline-flex;align-items:center;gap:5px}
.book-credits { color:#405752; font-size:14px; line-height:1.55; overflow-wrap:anywhere; }
.book-credits p { margin:0 0 4px; }
[data-view="search"] .book-shelf-heading h2 {font-size:17px}
[data-view="search"] .book-shelf {margin-bottom:21px}
.major-study-links {display:flex;gap:10px 16px;flex-wrap:wrap;margin:13px 0 16px}
.knowledge-major-filter {display:inline-flex;gap:8px 12px;align-items:center;flex-wrap:wrap;margin:0 0 12px;font-weight:650;color:#2c444e;font-size:14px}
.knowledge-major-filter select {min-height:42px;border:1px solid #a8bfcb;border-radius:9px;background:#fff;color:#263d46;padding:5px 10px;font:inherit}
@media(max-width:1200px) {.book-grid {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px) {
  .book-grid {grid-template-columns:minmax(0,1fr)}
  .book-filters {grid-template-columns:minmax(0,1fr);gap:10px}
  .book-shelf + .book-shelf {margin-top:27px}
}
@media(max-width:350px) {.section-switcher a {padding-inline:7px}}

.repo-actions .readme-open { min-height:42px; white-space:normal; }
.readme-dialog {
  width:min(800px, calc(100% - 32px)); max-height:min(86vh, 900px);
  height:auto; max-width:none; padding:0; margin:auto;
  border:1px solid #bfd3c6; border-radius:20px; background:#fff; color:#283a35;
  box-shadow:0 20px 70px #13292d35;
}
.readme-dialog[open] { display:flex; flex-direction:column; overflow:hidden; }
.readme-dialog::backdrop { background:#162b2966; }
.readme-header {
  display:flex; gap:12px; justify-content:space-between; align-items:center;
  padding:12px 22px; background:#f0f7f3; border-bottom:1px solid #d6e4db;
}
.readme-heading { display:grid; min-width:0; gap:3px; }
.readme-heading strong { font-size:17px; line-height:1.25; }
.readme-heading span { color:#465d53; font-size:13px; overflow-wrap:anywhere; }
.readme-close { flex:none; min-height:42px; }
.readme-scroll { overflow:auto; overscroll-behavior:contain; }
.readme-links, .readme-markdown { width:min(100% - 40px, 660px); margin-inline:auto; }
.readme-links { display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px; padding:16px 0; border-bottom:1px solid #e1ebe4; }
.readme-links .button { min-height:42px; }
.readme-links > a:not(.button), .readme-markdown a { color:#285b75; text-decoration:underline; text-underline-offset:3px; }
.readme-markdown { padding:16px 0 26px; font-size:16px; line-height:1.6; overflow-wrap:anywhere; }
.readme-markdown h1 { margin:0 0 16px; font-size:clamp(22px, 3vw, 30px); }
.readme-markdown h2 { margin:22px 0 7px; font-size:19px; }
.readme-markdown :is(p, ul, ol, pre, blockquote) { margin:0 0 12px; }
.readme-markdown ul, .readme-markdown ol { padding-inline-start:24px; }
.readme-markdown pre {
  max-width:100%; overflow:auto; padding:12px; white-space:pre;
  border:1px solid #dce7df; background:#f3f7f4; border-radius:10px;
  font-size:14px; line-height:1.5; tab-size:4;
}
.readme-markdown code { font-family:ui-monospace, Consolas, monospace; }
.readme-markdown :not(pre) > code { padding:2px 4px; background:#f0f5f1; border-radius:4px; }
@media (max-width:600px) {
  .readme-dialog { width:calc(100% - 18px); max-height:91dvh; border-radius:14px; }
  .readme-header { padding-inline:14px; }
  .readme-links, .readme-markdown { width:calc(100% - 28px); }
}
