/* R22 book-first homepage: one prominent search, native book navigation, compact app links. */
body[data-page="0"] .home-inner{min-width:0}
.mk-book-first-search{max-width:1000px;margin:3px auto 14px;padding:18px clamp(14px,3vw,30px);background:var(--ui);border:1px solid #bfd6d4;border-radius:12px;box-shadow:0 5px 26px #29445512}
.mk-book-first-search h2{font:700 clamp(23px,3vw,33px)/1.25 system-ui,sans-serif;color:var(--ink);margin:0 0 6px;border:0;padding:0}
.mk-first-search-help{font-size:14px;color:var(--muted);margin:0 0 12px}
.mk-book-first-search .searchbar{margin:8px 0;flex-wrap:wrap}
.mk-book-first-search input{min-width:0;flex:2 1 275px;font-size:17px;min-height:52px;border:2px solid #3b9097;border-radius:9px}
.mk-book-first-search select{flex:1 1 160px;font-size:13px;max-width:220px;background:var(--ui);color:var(--ink)}
.mk-book-first-search #matchcount{font-size:13px;color:var(--muted);margin:8px 0}
.mk-book-first-search .search-results{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.mk-book-first-search .search-hit{color:var(--ink);border-radius:8px;overflow-wrap:anywhere}
.mk-book-first-search .search-hit mark{background:#ffdf85;color:#152b31;padding:0 2px;border-radius:2px}
.mk-book-first-search .search-section,.mk-book-first-search .search-snippet{display:block;line-height:1.45;margin-top:4px}
.mk-first-cover{max-width:1000px;margin:16px auto 14px;padding:24px 24px 26px;text-align:left;border-radius:12px;box-shadow:none}
.mk-first-cover h1{font:700 clamp(27px,4vw,42px)/1.15 Georgia,serif;letter-spacing:-.015em;margin:7px 0}
.mk-first-cover .subtitle{font:16px/1.5 system-ui,sans-serif;margin:7px 0;color:#e4f3f4}
.mk-first-cover .kicker{font-size:11px;letter-spacing:.09em}
.mk-first-cover .btns{justify-content:flex-start;margin-top:16px}
.mk-first-cover .btns .btn{padding:8px 14px;font-size:13px}
.mk-first-cover p:not(.subtitle){font-size:13px;margin:8px 0}
.mk-app-strip{max-width:1000px;margin:12px auto 16px;border:1px solid var(--line);border-radius:12px;background:var(--ui);padding:17px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px}
.mk-app-description h2{margin:0 0 5px;color:var(--ink);font:700 17px/1.3 system-ui,sans-serif}
.mk-app-description p{font-size:12px;line-height:1.5;color:var(--muted);max-width:530px;margin:0 0 4px}
.mk-app-description>a{font-size:12px;font-weight:700}
.mk-app-links{display:flex;flex-wrap:wrap;gap:10px}
.mk-store-badge{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:160px;min-height:55px;background:#121821;color:#fff;border-radius:10px;border:1px solid #52616c;padding:8px 13px;text-decoration:none!important;white-space:nowrap}
.mk-store-badge:focus-visible{outline:3px solid #1aaab7;outline-offset:3px}
.mk-store-badge:hover{color:#fff;background:#263d4a}
.mk-store-badge span{display:flex;flex-direction:column;line-height:1.14;align-items:flex-start}
.mk-store-badge small{font-size:9px;font-weight:650;letter-spacing:.04em;color:#e2e9f0}
.mk-store-badge strong{font-size:17px;font-weight:750;color:white}
.mk-first-search-help a{font-weight:700}
body.night .mk-book-first-search{border-color:#48646c}
body.night .mk-book-first-search input{background:#20313c;color:#fff}
@media(max-width:760px){.mk-app-strip{display:block;padding:15px}.mk-app-links{margin-top:13px}.mk-store-badge{flex:1 1 155px}.mk-book-first-search .search-results{grid-template-columns:1fr}.mk-book-first-search{padding:14px}.mk-book-first-search input{min-height:52px}.mk-book-first-search select{max-width:none}.mk-first-cover{padding:16px}}
@media(max-width:420px){.mk-app-links{display:grid;grid-template-columns:1fr 1fr;gap:7px}.mk-store-badge{min-width:0;padding:8px 5px;gap:4px}.mk-store-badge svg{width:22px;height:22px}.mk-store-badge small{font-size:7px}.mk-store-badge strong{font-size:13px}}
@media print{.mk-app-strip{display:none!important}}
/* Only the chapter index button belongs in the compact secondary book header. */
body[data-page="0"] .sitehead{position:relative}
body[data-page="0"] .sitehead .headlinks{display:none!important}
body[data-page="0"] .head-inner{padding:8px 14px;min-height:51px}
body[data-page="0"] .sitehead .brand small{display:none}
body[data-page="0"] .mk-safety-strip{font-size:11px;line-height:1.5;padding:5px 12px}
@media(max-width:1080px){body[data-page="0"] .mk-book-first-search{margin-top:8px}}
/* Older global themes offset the book header even when it is not sticky. Remove that offset on the homepage. */
body[data-page="0"] .sitehead{position:static!important;top:auto!important}
