/* Site B Editorial v0.2.2 — layout stability after the legacy main.css.
 * Narrow browser windows and browser zoom are intentionally tested.
 * These rules affect the layout only, not user-customized category content.
 */
html{min-width:320px}
body.siteb-editorial{min-width:0;width:100%;max-width:none;overflow-x:clip}
body.siteb-editorial .site-header,
body.siteb-editorial .site-navigation,
body.siteb-editorial .site-footer{display:block;width:100%;max-width:none;margin-inline:0}
/* Never cap a mid-width browser to 760px with large empty exterior margins. */
body.siteb-editorial .content-container,
body.siteb-editorial .site-shell.content-container{
  width:calc(100% - 40px);max-width:1280px;min-width:0;margin-inline:auto;
}
body.siteb-editorial .site-header-top{display:flex;align-items:center;justify-content:space-between;gap:22px;min-width:0}
body.siteb-editorial .site-identity{flex:0 1 450px;min-width:0;max-width:450px;align-items:flex-start;gap:2px}
body.siteb-editorial .siteb-title-logo{display:block;width:min(380px,100%);max-width:100%}
body.siteb-editorial .siteb-title-logo-img{width:100%;height:auto;max-height:none;object-fit:contain}
body.siteb-editorial .site-identity .site-tagline{width:auto;max-width:410px;margin:0 0 0 21px!important;overflow-wrap:normal;font-size:13px;line-height:1.42}
body.siteb-editorial .site-header-right{flex:0 0 auto;min-width:0;display:flex;align-items:center;gap:22px}
body.siteb-editorial .site-navigation{position:relative;z-index:1200;overflow:visible}
body.siteb-editorial .site-navigation .nav-inner{display:flex;position:relative;justify-content:center;align-items:center;width:calc(100% - 40px);max-width:1280px;min-height:53px;padding-inline:40px;gap:0;overflow:visible}
body.siteb-editorial .site-navigation .site-menu{display:flex;align-items:stretch;justify-content:center;flex:0 1 auto;min-width:0;max-width:100%;width:auto;margin:0;flex-wrap:nowrap;overflow:visible}
body.siteb-editorial .site-navigation .site-menu>li{flex:0 0 auto;min-width:0}
body.siteb-editorial .site-navigation .site-menu>li>a{white-space:nowrap;min-height:53px;justify-content:center;text-align:center;padding:14px clamp(8px,1.05vw,16px);font-size:clamp(11px,.94vw,13px)}
body.siteb-editorial .site-navigation .nav-search-wrap{position:absolute;top:50%;right:2px;transform:translateY(-50%);margin:0;z-index:4}
body.siteb-editorial .site-menu .sub-menu{z-index:1300;background:#20343f;max-height:min(70vh,540px);overflow-y:auto}
/* True two-column page with a useful minimum for the reading area. */
body.siteb-editorial .site-shell{display:block;padding-top:28px;padding-bottom:46px;min-width:0}
body.siteb-editorial .site-shell>.journal-intro{display:block;width:100%;min-width:0;max-width:none;margin:0 0 24px;min-height:235px}
body.siteb-editorial .journal-intro .journal-heading{max-width:100%;overflow-wrap:normal;word-break:normal;line-height:1.36}
body.siteb-editorial .site-grid{display:grid;width:100%;max-width:100%;min-width:0;grid-template-columns:minmax(0,1fr) minmax(260px,300px);gap:26px;align-items:start}
body.siteb-editorial .site-main,
body.siteb-editorial .site-sidebar,
body.siteb-editorial .panel{min-width:0;max-width:100%}
body.siteb-editorial .site-main{width:100%}
body.siteb-editorial .site-grid>.site-sidebar{width:100%;display:block}
body.siteb-editorial .site-grid>.site-sidebar .sidebar-widget{margin:0 0 18px}
body.siteb-editorial .front-highlights{width:100%}
body.siteb-editorial .feature-stack{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:16px}
body.siteb-editorial .feature-mini{display:grid;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:12px}
body.siteb-editorial .feature-mini .post-card{display:grid;grid-template-columns:42% minmax(0,1fr)}
body.siteb-editorial .directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
/* Image cropping within decorative covers is intentional and adjustable in admin;
   content thumbnails remain uncropped. */
body.siteb-editorial .lead-image img,
body.siteb-editorial .card-image img,
body.siteb-editorial .row-image img{object-fit:contain;transform:none}
body.siteb-editorial .sb-series-card{width:100%;min-width:0}
body.siteb-editorial .sb-series-grid{min-width:0}
/* Main break point deliberately falls BEFORE insufficient space makes text vertical. */
@media(max-width:1200px){
  body.siteb-editorial .site-navigation .nav-inner{justify-content:space-between;flex-wrap:wrap;padding-inline:0;min-height:49px}
  body.siteb-editorial .siteb-mobile-nav-toggle{display:inline-flex!important;align-items:center;min-height:49px;margin-right:auto}
  body.siteb-editorial .site-navigation .nav-search-wrap{position:relative!important;top:auto;right:auto;transform:none;order:2;margin-left:auto;flex-shrink:0}
  body.siteb-editorial .site-navigation .site-menu{display:none!important;order:3;width:100%;max-width:100%;flex-direction:column;align-items:stretch;flex-wrap:nowrap;overflow:visible;border-top:1px solid rgba(255,255,255,.12)}
  body.siteb-editorial .site-navigation.siteb-nav-open .site-menu,
  body.siteb-editorial .site-navigation:not(.siteb-js) .site-menu{display:flex!important}
  body.siteb-editorial .site-navigation .site-menu>li{display:block!important;width:100%;flex:0 0 auto;border-bottom:1px solid rgba(255,255,255,.10)}
  body.siteb-editorial .site-navigation .site-menu>li>a{display:flex;min-height:43px;justify-content:flex-start;text-align:left;font-size:13px;padding:9px 15px!important;border-right:0}
  body.siteb-editorial .site-menu>li.siteb-has-children>a{padding-right:54px!important}
  body.siteb-editorial .siteb-submenu-toggle{height:43px;right:4px;width:43px}
  body.siteb-editorial .site-menu .sub-menu{position:static;left:auto;top:auto;width:100%;max-width:100%;min-width:0;border:0;box-shadow:none;padding:0 0 5px 14px;margin:0}
  body.siteb-editorial .site-menu li:hover>.sub-menu,
  body.siteb-editorial .site-menu li:focus-within>.sub-menu{display:none!important}
  body.siteb-editorial .site-menu li.siteb-submenu-open>.sub-menu{display:block!important}
  body.siteb-editorial .site-header-top{gap:15px}
  body.siteb-editorial .masthead-edition{display:none}
}
@media(max-width:1080px){
  body.siteb-editorial .site-grid{grid-template-columns:minmax(0,1fr);gap:18px}
  body.siteb-editorial .site-grid>.site-sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  body.siteb-editorial .site-grid>.site-sidebar .sidebar-widget{margin:0}
  body.siteb-editorial .feature-stack{grid-template-columns:1fr}
  body.siteb-editorial .feature-mini{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto}
  body.siteb-editorial .feature-mini .post-card{display:block}
  body.siteb-editorial .feature-mini .card-image{height:auto;aspect-ratio:16/10}
}
@media(max-width:720px){
  body.siteb-editorial .content-container,
  body.siteb-editorial .site-shell.content-container{width:calc(100% - 24px)}
  body.siteb-editorial .site-header-top{align-items:flex-start;flex-wrap:wrap;padding-block:12px;gap:8px 15px}
  body.siteb-editorial .site-identity{flex:1 1 230px;max-width:100%}
  body.siteb-editorial .siteb-title-logo{width:min(280px,100%)}
  body.siteb-editorial .site-identity .site-tagline{font-size:11px;max-width:100%;margin-left:12px!important}
  body.siteb-editorial .site-header-right{align-self:flex-start;margin-top:4px;gap:8px}
  body.siteb-editorial .site-shell{padding-top:14px;padding-bottom:25px}
  body.siteb-editorial .site-shell>.journal-intro{min-height:205px;margin-bottom:14px}
  body.siteb-editorial .journal-intro .journal-heading{font-size:clamp(27px,7vw,37px);line-height:1.38;word-break:normal}
  body.siteb-editorial .journal-intro>p{font-size:12.5px;line-height:1.85}
  body.siteb-editorial .site-grid>.site-sidebar{grid-template-columns:1fr;gap:12px}
  body.siteb-editorial .panel{padding:20px 17px;margin-bottom:14px}
  body.siteb-editorial .feature-mini{grid-template-columns:1fr;gap:10px}
  body.siteb-editorial .feature-mini .post-card{display:grid;grid-template-columns:40% minmax(0,1fr)}
  body.siteb-editorial .feature-mini .card-image{height:100%;min-height:105px;aspect-ratio:auto}
  body.siteb-editorial .directory-grid{grid-template-columns:1fr;gap:10px}
  body.siteb-editorial .sb-series-grid{grid-template-columns:1fr!important}
}
@media(max-width:400px){
  body.siteb-editorial .siteb-title-logo{width:min(250px,100%)}
  body.siteb-editorial .site-header-right{width:100%;justify-content:flex-end}
}

/* Ver.0.2.6: the TOP directory must remain two columns on phones.
 * This declaration deliberately overrides the legacy @media <=720px one-column rule.
 * Keep <picture> sources, so a category's optional phone tile image is used.
 */
@media (max-width:720px){
  body.siteb-editorial .site-main .directory-preview .directory-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px;
  }
  body.siteb-editorial .site-main .directory-preview .directory-tile{
    width:100%;min-width:0;min-height:96px;padding:11px 9px;
  }
  body.siteb-editorial .site-main .directory-preview .directory-name{
    font-size:clamp(11px,3.1vw,14px);
    overflow-wrap:anywhere;
  }
  body.siteb-editorial .site-main .directory-preview .directory-count{
    font-size:10px;
  }
}

/* Ver.0.2.7: render the existing Site B custom-HTML recent-posts widget from PHP.
 * Its old JS depended on .front-highlights, removed in the four-block TOP layout. */
body.siteb-editorial .siteb-rw-native .sidebar-title{margin-bottom:12px}
body.siteb-editorial .siteb-rw-native .siteb-rw-list{list-style:none;margin:0;padding:0}
body.siteb-editorial .siteb-rw-native .siteb-rw-list li{list-style:none;margin:0;padding:0;border-bottom:1px solid #e5ecef}
body.siteb-editorial .siteb-rw-native .siteb-rw-list li:last-child{border-bottom:0}
body.siteb-editorial .siteb-rw-native .siteb-rw-item{display:flex;align-items:flex-start;gap:10px;padding:11px 1px;min-width:0;color:#203542;text-decoration:none}
body.siteb-editorial .siteb-rw-native .siteb-rw-thumb{display:flex;align-items:center;justify-content:center;flex:0 0 90px;width:90px;height:66px;overflow:hidden;border:1px solid #e1e7eb;background:#f3f5f7;border-radius:2px}
body.siteb-editorial .siteb-rw-native .siteb-rw-thumb img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;margin:0;padding:0}
body.siteb-editorial .siteb-rw-native .siteb-rw-copy{flex:1;min-width:0}
body.siteb-editorial .siteb-rw-native .siteb-rw-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-size:12.5px;line-height:1.52;font-weight:730}
body.siteb-editorial .siteb-rw-native .siteb-rw-meta{display:block;margin-top:5px;font-size:10px;line-height:1.5;color:#8a99a3}
body.siteb-editorial .siteb-rw-native .siteb-rw-noimg{font-size:10px;color:#9cabb5}
body.siteb-editorial .siteb-rw-native .siteb-rw-item:hover .siteb-rw-title,body.siteb-editorial .siteb-rw-native .siteb-rw-item:focus-visible .siteb-rw-title{color:#a03d51;text-decoration:underline}
@media(max-width:620px){body.siteb-editorial .siteb-rw-native .siteb-rw-thumb{flex-basis:98px;width:98px;height:73px}}
