/* Scoped integration styles. Existing theme, lesson pages and CBT selectors are unchanged. */
.kbhome-library,.kbhome-must,.kbhome-portal{color:#173849;font-family:inherit;line-height:1.65}
.kbhome-library *,.kbhome-must *,.kbhome-portal *,.kbsite-book-bridge *{box-sizing:border-box}
.kbhome-library a,.kbhome-must a,.kbhome-portal a{text-decoration:none;color:#173849}
.kbhome-library a:focus-visible,.kbhome-must a:focus-visible,.kbhome-portal a:focus-visible{outline:3px solid #17858a;outline-offset:3px}
.kbhome-library{background:#f5f8f8}.kbhome-must{background:#f8f6f1}
.kbhome-section-head{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:24px}
.kbhome-section-head>div{min-width:0}.kbhome-section-head small,.kbhome-must-track>header small{display:block;font-size:11px;letter-spacing:.10em;font-weight:800;color:#657b80}
.kbhome-section-head h2{margin:9px 0 12px;font-size:clamp(26px,3vw,35px);line-height:1.35;letter-spacing:-.04em;color:#173849;word-break:keep-all;overflow-wrap:break-word}
.kbhome-section-head p{margin:0;font-size:14px;color:#536c75;max-width:760px}
a.kbhome-all{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:10px 14px;flex-shrink:0;border:1px solid #aec5cb;border-radius:6px;background:#fff;color:#173849;font-size:13px;font-weight:800;white-space:normal}
.kbhome-book-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
.kbhome-book{display:flex;flex-direction:column;min-width:0;padding:20px 18px;border:1px solid #d8e3e6;border-radius:12px;background:#fff}
.kbhome-book-top{display:grid;grid-template-columns:106px minmax(0,1fr);gap:16px;align-items:start;flex:1}
.kbhome-book-cover,.kbhome-must-cover{display:block;width:100%;min-width:0}
.kbhome-book-cover img,.kbhome-must-cover img{display:block;width:100%;height:auto;aspect-ratio:335/500;object-fit:contain;box-shadow:0 8px 20px #153e491a}
.kbhome-book-copy{min-width:0}.kbhome-book-copy>small{display:block;color:#687a80;font-size:11px;font-weight:800}
.kbhome-book-copy h3{margin:7px 0 10px;font-size:18px;line-height:1.45;color:#173849;letter-spacing:-.03em;word-break:keep-all;overflow-wrap:anywhere}
.kbhome-book-copy p{margin:0 0 12px;font-size:12px;line-height:1.8;color:#536c75;word-break:keep-all;overflow-wrap:break-word}
.kbhome-free-badge{display:inline-block;font-size:11px;font-weight:800;color:#126a6e;background:#edf7f5;padding:4px 6px;border-radius:4px}
.kbhome-paper-spec{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px 12px;margin:19px 0 12px;padding-top:13px;border-top:1px solid #e4ebed;font-size:12px;color:#546b72}.kbhome-paper-spec strong{color:#173849;font-size:13px}
.kbhome-book-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.kbhome-book-actions a,.kbhome-must-actions a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 8px;background:#fff;border:1px solid #c8d8dd;border-radius:5px;color:#214c59;font-size:12px;font-weight:800;line-height:1.5;text-align:center;white-space:normal;overflow-wrap:break-word}
.kbhome-book-actions a.buy{grid-column:1/-1}.kbhome-book-actions a.buy,.kbhome-must-actions a.buy{background:#173849;color:#fff;border-color:#173849}
.kbhome-book-actions a:hover,.kbhome-must-actions a:hover,a.kbhome-all:hover{background:#eaf3f4;color:#173849;border-color:#739ea8}
.kbhome-book-actions a.buy:hover,.kbhome-must-actions a.buy:hover{background:#245a68;color:#fff}
.kbhome-book-note{margin:18px 0 0;font-size:12px;color:#586e74;line-height:1.85}
.kbhome-text-cover{display:flex;flex-direction:column;justify-content:center;gap:15px;min-height:150px;aspect-ratio:335/500;background:#ecf2f3;padding:10px;border:1px solid #d6e0e2;overflow-wrap:break-word}
.kbhome-text-cover small{font-size:8px}.kbhome-text-cover strong{font-size:13px;line-height:1.5;color:#173849}
.kbhome-must-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
.kbhome-must-track{min-width:0;display:flex;flex-direction:column;background:#fff;border:1px solid #dce3e4;border-radius:12px;overflow:hidden;scroll-margin-top:100px}
.kbhome-must-track>header{padding:23px 21px 18px;border-bottom:1px solid #e2e9ea;background:#f0f5f5;min-height:160px}
.kbhome-must-track>header h3{font-size:24px;line-height:1.35;letter-spacing:-.03em;margin:8px 0 10px;color:#173849}
.kbhome-must-track>header>span{display:inline-block;font-size:11px;font-weight:800;color:#25614c;background:#e1f0e8;padding:4px 7px;border-radius:3px}
.kbhome-must-books{padding:0 20px;flex:1}.kbhome-must-book{padding:21px 0}.kbhome-must-book+.kbhome-must-book{border-top:1px solid #e2e9ea}
.kbhome-must-book-top{display:grid;grid-template-columns:72px minmax(0,1fr);gap:18px;align-items:center}
.kbhome-must-book-top>div{min-width:0}.kbhome-must-book-top h4{font-size:20px;color:#173849;margin:0 0 8px}
.kbhome-must-book-top p{font-size:12px;color:#546e76;margin:4px 0}.kbhome-must-price strong{font-size:18px;color:#173849}
.kbhome-must-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:15px}
.kbhome-must-track-links{display:grid;gap:5px;padding:14px 20px 18px;border-top:1px solid #e2e9ea;background:#fcfdfd}
.kbhome-must-track-links a{display:flex;align-items:center;min-height:40px;font-size:12px;font-weight:800;color:#205967}
.kbhome-must-track-links a:hover{text-decoration:underline}
.kbhome-portal{max-width:1180px;margin:auto;padding:36px 18px 65px}.kbhome-portal .kbhome-section-head{display:block;background:#f3f7f7;padding:32px;border:1px solid #d7e3e5;border-radius:12px;margin-bottom:24px}
.kbhome-portal .kbhome-section-head h1{font-size:clamp(30px,4vw,44px);line-height:1.3;margin:10px 0;color:#173849;letter-spacing:-.04em}
.kbhome-portal-crumb{font-size:12px;color:#557078;margin-bottom:20px}.kbhome-portal-crumb a{color:#245866}
.kbhome-portal-nav{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}.kbhome-portal-nav a{padding:9px 15px;min-height:44px;background:#fff;border:1px solid #c8d8dd;border-radius:6px;font-size:13px;font-weight:800}
.kbsite-book-bridge{width:min(1180px,calc(100% - 32px));margin:30px auto;padding:24px;background:#f4f8f8;border:1px solid #d7e3e5;border-radius:10px}
.kbsite-book-bridge>header h2{font-size:23px;margin:8px 0;color:#173849}.kbsite-book-bridge>header p{font-size:13px;color:#536e76}
.kbsite-bridge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:20px}
.kbsite-bridge-grid article{padding:20px;background:#fff;border:1px solid #dce6e8;border-radius:8px;min-width:0}.kbsite-bridge-grid small{font-size:11px;color:#647b83}.kbsite-bridge-grid h3{font-size:18px;margin:8px 0;line-height:1.5}.kbsite-bridge-grid p{font-size:12px;color:#536c75}
@media(max-width:1050px){.kbhome-book-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kbhome-must-grid{gap:12px}.kbhome-must-track>header{padding:20px 16px}.kbhome-must-books{padding:0 16px}.kbhome-must-track-links{padding:12px 16px}.kbhome-must-book-top{gap:12px;grid-template-columns:65px minmax(0,1fr)}}
@media(max-width:760px){.kbhome-section-head{display:block}.kbhome-section-head .kbhome-all{margin-top:18px}.kbhome-must-grid{grid-template-columns:1fr}.kbhome-must-track>header{min-height:0}.kbhome-must-track>header h3 br{display:none}.kbhome-must-track>header h3{font-size:23px}.kbhome-must-track>header h3 br:after{content:' '}.kbhome-must-book-top{grid-template-columns:80px minmax(0,1fr)}.kbsite-bridge-grid{grid-template-columns:1fr}.kbhome-portal .kbhome-section-head{padding:24px 20px}}
@media(max-width:590px){.kbhome-book-grid{grid-template-columns:1fr}.kbhome-book{padding:20px 16px}.kbhome-book-top{grid-template-columns:96px minmax(0,1fr);gap:15px}.kbhome-book-copy h3{font-size:18px}.kbhome-book-note{font-size:12px}.kbhome-portal{padding:24px 14px 48px}.kbsite-book-bridge{padding:20px}.kbhome-book-actions a,.kbhome-must-actions a{font-size:13px}}
@media(prefers-reduced-motion:reduce){.kbhome-library *,.kbhome-must *,.kbhome-portal *{scroll-behavior:auto!important;transition:none!important}}
/* Keep a missing legacy cover inside its own column as well. */
.kbhome-text-cover{width:100%;min-width:0;overflow:hidden;overflow-wrap:anywhere}
.kbhome-must-cover{aspect-ratio:335/500;overflow:hidden}
.kbhome-must-cover .kbhome-text-cover{height:100%;min-height:0;aspect-ratio:auto;padding:7px;gap:5px}
.kbhome-must-cover .kbhome-text-cover strong{font-size:10px;line-height:1.4;overflow-wrap:anywhere}
.kbhome-must-cover .kbhome-text-cover small{font-size:7px;line-height:1.2}
