/* 0.5.3: archive/bookshelf only. Keep single-article sidebars independent. */
.mr-bookshelf { box-sizing:border-box; width:100%; max-width:1320px; margin-inline:auto; padding:48px 20px 80px; display:grid; grid-template-columns:minmax(0,320px) minmax(0,920px); gap:40px; align-items:start; }
.mr-bookshelf.mr-bookshelf-reversed { grid-template-columns:minmax(0,920px) minmax(0,320px); }
.mr-bookshelf > * { min-width:0; margin-block-start:0; }
.mr-bookshelf .mr-index-title { font-size:clamp(24px,3vw,32px); margin:0 0 24px; }
.mr-bookshelf .wp-block-post-template { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px 16px; padding:0; }
.mr-bookshelf .wp-block-post-template > li { min-width:0; margin:0; }
.mr-bookshelf-card { display:flex; flex-direction:column; gap:8px; min-width:0; }
.mr-bookshelf-card > * { margin:0; }
.mr-bookshelf-card .wp-block-post-featured-image img { display:block; width:100%; aspect-ratio:1.91; object-fit:cover; border-radius:5px; }
.mr-bookshelf-card .wp-block-post-title { font-size:17px; line-height:1.45; overflow-wrap:anywhere; }
.mr-bookshelf-card a, .mr-bookshelf-byline a, .mr-bookshelf-authors a { text-decoration:none; }
.mr-bookshelf-byline { display:flex; align-items:center; gap:8px; }
.mr-bookshelf-byline > *, .mr-bookshelf-byline-text > * { margin:0; }
.mr-bookshelf-byline .wp-block-avatar { flex:none; }
.mr-bookshelf-byline .wp-block-avatar img, .mr-bookshelf-authors img, .mr-bookshelf-author-profile img { border-radius:50%; display:block; object-fit:cover; }
.mr-bookshelf-byline-text { min-width:0; font-size:12px; line-height:1.35; }
.mr-bookshelf-byline-text .wp-block-post-date { font-size:11px; color:var(--mr-muted,#777); }
.mr-bookshelf-profile { font-size:14px; overflow-wrap:anywhere; }
.mr-bookshelf-profile .wp-block-site-title { font-size:22px; }
.mr-bookshelf-profile h3 { font-size:16px; }
.mr-bookshelf-authors { list-style:none; padding:0; }
.mr-bookshelf-authors li + li { margin-top:12px; }
.mr-bookshelf-authors a { display:flex; gap:10px; align-items:center; }
.mr-bookshelf-author-profile h2 { font-size:22px; }
.mr-bookshelf .wp-block-query-pagination { margin-top:32px; }

/* 0.5.4: optional home visual and quiet search, scoped to bookshelf. */
.mr-home-visual { box-sizing:border-box; max-width:1320px; margin-inline:auto; padding-inline:20px; }
.mr-home-visual:empty { padding:0; }
.mr-home-visual .wp-block-image { margin-inline:auto; }
.mr-bookshelf-search { width:min(100%,280px); margin:0 0 24px auto; font-size:14px; }
.mr-bookshelf-search .wp-block-search__inside-wrapper { box-sizing:border-box; min-height:36px; padding:0 8px; border:1px solid currentColor; border-color:color-mix(in srgb,currentColor 20%,transparent); border-radius:4px; }
.mr-bookshelf-search .wp-block-search__input { min-width:0; padding:4px 0; border:0; background:transparent; color:inherit; font:inherit; }
.mr-bookshelf-search .wp-block-search__button { margin:0; padding:4px; border:0; background:transparent; color:inherit; }
.mr-bookshelf-search .wp-block-search__button svg { width:20px; height:20px; }
.mr-bookshelf-search .wp-block-search__inside-wrapper:focus-within { outline:1px solid currentColor; }
@media(max-width:1279px) { .mr-home-visual { max-width:960px; } }
@media(max-width:639px) { .mr-home-visual { padding-inline:16px; } }

/* Archive identity. */
.mr-bookshelf-author-heading { display:flex; align-items:center; gap:4px; }
.mr-bookshelf-author-heading > img { flex:none; width:80px; height:80px; }
.mr-bookshelf-author-heading > h2 { margin:0; min-width:0; }
.mr-bookshelf-bio { margin-block-start:0; }
.mr-bookshelf-bio > :first-child { margin-block-start:0; }
.mr-header-left .wp-block-site-logo { margin:0; max-width:100%; }
.mr-header-left .wp-block-site-logo img { display:block; max-width:100%; height:auto; }
.mr-header-left:has(.wp-block-site-logo img) .mr-header-title-fallback { display:none; }

/* 0.5.6: shared profile geometry, round site icon. */
:where(.mr-bookshelf-site-heading) { display:flex; align-items:center; }
.mr-bookshelf-site-heading > * { margin:0; min-width:0; }
.mr-bookshelf-site-heading .mr-bookshelf-site-icon { display:block; flex:none; width:80px; height:80px; object-fit:cover; border-radius:50%; }
.mr-bookshelf-site-heading .wp-block-site-title { font-size:22px; }

/* 0.5.8: compact bookshelf identity and plain category navigation. */
.mr-bookshelf-profile .wp-block-site-tagline { margin-block-start:0; }
.mr-bookshelf-profile .wp-block-categories-list { list-style:none; padding-inline-start:0; }
.mr-bookshelf-profile .wp-block-categories-list a { text-decoration:none; }


.mr-bookshelf-profile .wp-block-archives-list { list-style:none; padding-inline-start:0; }
.mr-bookshelf-profile .wp-block-archives-list a { text-decoration:none; }

/* Desktop right rails: align the entire content group, not its children. */
@media(min-width:1280px) {
  :is(.mr-bookshelf-reversed > .mr-bookshelf-side, .mr-reading-grid > .mr-reading-right) .mr-bookshelf-profile {
    width:fit-content;
    max-width:100%;
    margin-inline-start:auto;
    margin-inline-end:0;
    text-align:left;
  }
  .mr-reading-grid > .mr-reading-right .mr-sidebar-content { max-width:var(--mr-sidebar-content); }
  .mr-bookshelf-reversed > .mr-bookshelf-side .mr-bookshelf-author-profile h2 { overflow-wrap:anywhere; }
}
