
.math-companion-welcome,.math-companion-banner,.math-companion-grade,.math-companion-feedback{box-sizing:border-box;color:#24463f;font-family:system-ui,"PingFang TC","Microsoft JhengHei",sans-serif}
.math-companion-welcome{display:grid;grid-template-columns:180px minmax(0,1fr);gap:2rem;align-items:center;background:#fffdf4;border:1px solid #cfddbc;border-radius:24px;overflow:hidden;margin:1.25rem 0 1.5rem;box-shadow:0 12px 30px #132e2d1a}
.math-companion-welcome>img{display:block;width:180px;height:220px;object-fit:cover}
.math-companion-welcome>div{padding:1.2rem 1.5rem 1.2rem 0}.companion-eyebrow{margin:0 0 .35rem!important;font-size:.9rem!important;font-weight:750;letter-spacing:.08em;color:#567344!important}
.math-companion-welcome h2{font-size:clamp(1.5rem,3vw,2.25rem);margin:.2rem 0 .5rem;line-height:1.4}.math-companion-welcome p{margin:.35rem 0;line-height:1.8;font-size:1.05rem}.companion-note{display:block;color:#57706a;font-size:.875rem;margin-top:.7rem}
.math-companion-grade{grid-column:1/-1;display:flex;gap:.8rem;align-items:center;min-width:0;border-radius:14px;background:#fffdf6;padding:.45rem;margin-bottom:.2rem}.math-companion-grade img{width:76px;height:95px;object-fit:cover;flex:none;border-radius:10px}.math-companion-grade strong{font-size:1rem}.math-companion-grade p{font-size:.875rem;line-height:1.6;margin:.3rem 0;color:#536b62}
.math-companion-banner{display:flex;align-items:center;gap:1.25rem;grid-column:1/-1;width:100%;min-width:0;padding:1rem;background:#f8fbed;border:1px solid #c4d4b2;border-radius:20px;margin:0 0 1rem;box-shadow:0 5px 16px #21483e08}.math-companion-banner>img{width:104px;height:130px;object-fit:cover;border-radius:14px;flex:none}.math-companion-banner>div{min-width:0}.math-companion-banner h2{font-size:1.4rem;margin:.1rem 0 .4rem!important;line-height:1.4}.math-companion-banner p{margin:.25rem 0;font-size:1rem;line-height:1.7}.math-companion-controls{margin-left:auto;display:flex;flex-direction:column;align-items:center;gap:.65rem;flex:none}.math-companion-controls small{font-size:.8rem;color:#65745d}.math-companion-change{border:1px solid #34725a!important;background:#fffefa!important;color:#28523f!important;border-radius:100px!important;padding:.65rem 1rem!important;font:700 1rem/1.4 system-ui!important;cursor:pointer;white-space:nowrap}.math-companion-change:hover{background:#eaf3dc!important}.math-companion-change:focus-visible{outline:3px solid #bc7e32;outline-offset:4px}
.math-companion-feedback{display:flex;gap:1rem;align-items:center;background:#f0f6e8;border:1px solid #cbdabb;border-radius:16px;padding:.65rem 1rem;margin:.8rem 0}.math-companion-feedback[hidden]{display:none!important}.math-companion-feedback img{width:60px;height:75px;object-fit:cover;border-radius:10px;flex:none}.math-companion-feedback p{margin:0;font-size:1rem;line-height:1.8}
@media(max-width:650px){.math-companion-welcome{grid-template-columns:115px minmax(0,1fr);gap:1rem}.math-companion-welcome>img{width:115px;height:100%;min-height:220px;object-position:50% 60%}.math-companion-welcome>div{padding:1rem .8rem 1rem 0}.math-companion-welcome h2{font-size:1.35rem}.math-companion-welcome p{font-size:1rem}.math-companion-banner{gap:.85rem;flex-wrap:wrap}.math-companion-banner>img{width:82px;height:103px}.math-companion-banner>div:not(.math-companion-controls){flex:1}.math-companion-controls{width:100%;flex-direction:row;justify-content:flex-end}.math-companion-banner h2{font-size:1.2rem}.math-companion-banner .companion-eyebrow{font-size:.8rem!important}}
@media print{.math-companion-welcome,.math-companion-banner,.math-companion-grade,.math-companion-feedback{display:none!important}}

.publisher-hero .publisher-forest.math-companion-hero{object-fit:cover;object-position:50% 65%}
