.hero { grid-template-columns:1fr; padding:32px 0; }
.hero-intro { display:grid; grid-template-columns:1fr 300px; column-gap:48px; align-items:center; }
.hero h1 { font-size:48px; }
.hero .description { grid-column:1; margin:12px 0 0; max-width:62ch; }
.hero .news-photo { grid-column:2; grid-row:1 / span 2; height:112px; margin:0; }
.category-section { padding:30px 0 0; }
.category-section h2 { font-size:18px; margin:0 0 18px; }
.categories { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.categories button { position:relative; display:grid; grid-template-columns:1fr auto; align-content:start; gap:6px; padding:18px; border:1px solid #d9e2dc; border-radius:10px; color:var(--ink); text-align:left; font-weight:400; transition:border-color .18s,box-shadow .18s; }
.categories button:hover { border-color:#7a9d87; box-shadow:0 3px 10px rgb(23 32 27 / .05); }
.categories button[aria-pressed=true] { border:2px solid var(--green); padding:17px; background:#f4f8f5; box-shadow:0 3px 0 #d8e7dd; }
.categories .cover-art { width:62px; height:62px; grid-column:1 / span 2; margin-bottom:4px; }
.category-name { font-size:18px; font-weight:600; }
.category-count { align-self:center; color:#5a6b60; font-size:12px; }
.category-description { grid-column:1 / span 2; font-size:11px; line-height:1.7; color:#5a6b60; max-width:27ch; }
.materials.section { padding-top:32px; }
.category-toolbar { display:flex; align-items:center; gap:24px; margin-bottom:20px; }
.category-toolbar h2 { margin:0; font-size:22px; margin-right:auto; }
.category-toolbar form { width:340px; min-height:42px; padding:0 11px; gap:10px; }
.category-toolbar input { padding:9px 0; font-size:12px; }
.category-toolbar form button { font-size:11px; }
#clear-search { padding:0 3px; font-size:21px; font-weight:400; }
#clear-search[hidden] { display:none; }
#feedback:empty { display:none; }
/* The reading panel slides in first; the paper opens around its vertical crease. */
dialog { position:fixed; inset:0 0 0 auto; margin:0; width:min(700px,100%); max-width:100%; height:100dvh; max-height:100dvh; border:0; border-left:1px solid #bac9bf; border-radius:0; padding:18px; background:#e9eeeb; overflow-x:hidden; overflow-y:auto; box-shadow:-12px 0 50px rgb(17 42 26 / .17); }
dialog[open] { animation:panel-arrive .28s cubic-bezier(.2,.7,.3,1) both; perspective:1800px; }
.paper-sheet { position:relative; min-height:calc(100dvh - 36px); padding:26px; background:#fff; box-shadow:1px 2px 3px rgb(26 44 32 / .12),4px 3px 0 #f8faf8,5px 4px 0 #bdcbbf; transform-origin:left center; }
dialog[open] .paper-sheet { animation:paper-unfold .5s .1s cubic-bezier(.2,.7,.3,1) both; }
.paper-sheet::after { content:''; position:absolute; inset:0 auto 0 49%; width:1px; background:rgb(56 78 63 / .06); box-shadow:2px 0 7px 1px rgb(42 64 48 / .035),-2px 0 5px 1px rgb(255 255 255 / .9); pointer-events:none; }
.dialog-top { position:relative; z-index:3; gap:18px; margin-bottom:26px; font-size:11px; }
.dialog-top button { font-size:12px; white-space:nowrap; padding:6px 0 6px 16px; }
#detail-art { width:90px; height:90px; margin:0 20px 20px 0; }
#detail-title { font-size:23px; line-height:1.4; margin-top:0; }
#detail-description { font-size:13px; }
.detail-toolbar { top:-18px; margin:20px 0 0; background:white; }
#detail-actions { gap:20px; padding:14px 0; }
#detail-actions button,#detail-actions a { font-size:12px; }
#detail-body { position:relative; z-index:1; }
#detail-body h3 { font-size:16px; }
#detail-body p { font-size:13px; line-height:1.8; }
@keyframes panel-arrive { from { transform:translateX(100%); } to { transform:translateX(0); } }
@keyframes paper-unfold { from { transform:rotateY(-32deg) scaleX(.86); opacity:.35; } 60% { opacity:1; } to { transform:rotateY(0) scaleX(1); opacity:1; } }
@media(max-width:850px) { .categories { grid-template-columns:repeat(2,minmax(0,1fr)); } .hero-intro { grid-template-columns:1fr 230px; gap:16px; } .hero h1 { font-size:40px; } .category-toolbar { flex-wrap:wrap; gap:16px; } .category-toolbar h2 { flex:1; } .category-toolbar form { order:3; width:100%; } }
@media(max-width:550px) { .hero-intro { display:block; } .hero .news-photo { height:75px; margin-top:20px; } .hero h1 { font-size:40px; } .category-section { padding-top:24px; } .categories { gap:10px; } .categories button { padding:14px; } .categories button[aria-pressed=true] { padding:13px; } .category-name { font-size:16px; } .categories .cover-art { width:48px; height:48px; } .category-description { font-size:10px; } dialog { padding:10px; } .paper-sheet { padding:20px; min-height:calc(100dvh - 20px); } #detail-title { font-size:20px; } #detail-art { width:68px; height:68px; margin-right:14px; } .detail-toolbar { top:-10px; } }
@media(prefers-reduced-motion:reduce) { dialog[open],dialog[open] .paper-sheet { animation:none; } .categories button { transition:none; } }
/* A single masthead keeps the entrance close to the category browser. */
.hero { padding:32px 0 30px; }
.hero-intro { display:flex; align-items:center; justify-content:space-between; gap:50px; }
.hero h1 { font-size:56px; line-height:1.05; letter-spacing:-1.8px; white-space:nowrap; }
.hero .description { margin:0; max-width:41ch; font-size:13px; line-height:1.8; }
.topic-filter { display:flex; align-items:center; gap:8px; }
.topic-filter[hidden] { display:none; }
.topic-filter label { font-size:11px; color:#5a6b60; }
.topic-filter select { font:12px 'Poppins',sans-serif; color:var(--ink); background:#fff; border:1px solid #cbd5ce; border-radius:7px; padding:10px 28px 10px 10px; max-width:218px; }
.topic-filter select:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.category-toolbar { gap:18px; }
.category-toolbar form { width:280px; }
.recent-grid.rack-view .material .meta { white-space:normal; font-size:10px; }
@media(max-width:1000px) { .hero h1 { font-size:46px; } .hero-intro { gap:30px; } .category-toolbar { flex-wrap:wrap; } .category-toolbar h2 { margin-right:auto; } .category-toolbar form { order:3; width:100%; } }
@media(max-width:650px) { .hero { padding:26px 0; } .hero-intro { display:block; } .hero h1 { font-size:43px; } .hero .description { margin-top:12px; max-width:44ch; font-size:12px; } .category-toolbar { gap:14px; } .category-toolbar h2 { flex:1 1 auto; } .topic-filter { order:2; width:100%; } .topic-filter select { flex:1; max-width:none; } .category-toolbar .views { order:1; } .category-toolbar form { order:3; } }
