/* Fusion layout contract: one outer measure; component-specific inner measures.
 * Shared responsive geometry lives here. studio.css supplies component appearance. */
:root {
  --jj-shell-offset:228px;
  --jj-gutter:32px;
  --jj-reading:var(--jj-wide);
}
.jj-page{margin-left:var(--jj-shell-offset);padding:24px var(--jj-gutter) 40px;min-height:100vh;min-width:0}
.jj-list,.jj-detail,.jj-reader-toolbar,.jj-footer{width:100%;max-width:var(--jj-wide);margin-left:auto;margin-right:auto;min-width:0}
.jj-mobile-context{display:none}
.jj-sidebar{width:var(--jj-sidebar);overscroll-behavior:contain}
.jj-sidebar .jj-brand{flex-shrink:0}
.jj-sidebar nav{flex-shrink:0}
.jj-sidebar-bottom{flex-shrink:0}
.jj-explorer>.jj-list{display:grid;grid-template-columns:minmax(0,1fr) 240px;column-gap:24px;align-items:center}
.jj-section-title{grid-column:1;grid-row:1;margin:0;font-size:16px;line-height:24px;min-width:0}
.jj-list-controls{display:contents}
.jj-page-head{grid-column:2;grid-row:1;order:initial;min-width:0}
.jj-filter-row{grid-column:1/-1;grid-row:2;margin-top:24px;min-width:0}
.jj-list-scroll{grid-column:1/-1;min-width:0}
.jj-search{width:240px;max-width:100%;height:44px;padding-right:0;gap:8px}
.jj-search input[type=search]{font-size:16px}
.jj-search button{width:44px;height:44px;border-radius:999px}
.jj-filters{max-width:100%;scroll-padding-inline:8px;overscroll-behavior-x:contain}
.jj-filters a{flex-shrink:0}
.jj-list-label{padding:24px 0 16px;gap:16px}
.jj-list-label>span:first-child{min-width:0;overflow-wrap:anywhere}
.jj-card,.jj-card-body,.jj-featured>div,.jj-discover-columns>section{min-width:0}
.jj-card h2,.jj-quick-tools strong,.jj-recent>a>span{overflow-wrap:anywhere}
.jj-open{min-height:130px}
.jj-explorer:not(.is-tools) .jj-tool-icon{flex-shrink:0}
.is-tools .jj-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
.is-tools .jj-tool-card .jj-open{min-height:180px}
.is-tools .jj-tool-card p{min-height:0}
.is-tools .jj-card-body{display:flex;flex-direction:column}
.is-tools .jj-card-foot{margin-top:auto;padding-top:14px}
.jj-reader-toolbar{min-height:44px;justify-content:flex-start;gap:16px;padding-bottom:0}
.jj-detail{margin-top:24px}
.jj-single:not(.jj-resource):not(.jj-collection) :is(.jj-detail-head,.jj-prose,.jj-detail-cover,.jj-detail-end){width:100%;max-width:var(--jj-reading);margin-left:auto;margin-right:auto}
.jj-detail-head h1{margin-top:12px}
.jj-byline{border-bottom:1px solid var(--jj-line);margin-bottom:24px}
.jj-detail-cover{max-height:440px}
.jj-prose :is(h2,h3,h4){scroll-margin-top:24px}
.jj-prose :is(ul,ol){padding-left:1.5em}
.jj-prose li+li{margin-top:8px}
.jj-prose .wp-block-image{overflow:visible}
.jj-prose .wp-block-image img{height:auto}
.jj-resource .jj-detail-head{display:grid;grid-template-columns:88px minmax(0,1fr);column-gap:24px;align-items:start;margin-bottom:32px}
.jj-resource .jj-detail-head>*{grid-column:2}
.jj-resource .jj-detail-head>.jj-resource-emblem{grid-column:1;grid-row:1/6;display:grid;place-items:center;width:88px;height:88px;border-radius:20px;background:#eff3ff;color:var(--jj-blue)}
.jj-resource-emblem svg{width:36px;height:36px}
.jj-resource .jj-detail-head h1{margin:8px 0}
.jj-resource .jj-detail-head .jj-lead{margin-bottom:8px}
.jj-resource .jj-detail-head .jj-resource-properties{margin:8px 0 16px}
.jj-resource .jj-detail-head>.jj-primary{justify-self:start;margin-bottom:0}
.jj-resource-layout{grid-template-columns:minmax(0,1fr) 280px;gap:40px}
.jj-resource-info{border-radius:var(--jj-card)}
.jj-resource-info dd{overflow-wrap:anywhere}
.jj-resource-info a{min-height:44px}
.jj-resource .jj-prose>:first-child{margin-top:0}
.jj-collection .jj-detail h1{font-size:24px}
.jj-topics{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:24px}
.jj-topics>a{min-width:0}
.jj-topics h2,.jj-topics p,.jj-series-banner h2{overflow-wrap:anywhere}
.jj-series-banner{margin:24px 0 0;min-width:0}
.jj-series-banner>div{min-width:0}
.jj-discover .jj-series-banner{margin:24px 0}
.jj-featured{grid-template-columns:minmax(0,.85fr) minmax(0,1.35fr);gap:24px;padding:24px;border-radius:var(--jj-card)}
.jj-featured-image{height:240px;min-width:0}
.jj-featured-image img{display:block}
.jj-feature-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.jj-feature-grid .jj-card:last-child{display:block}
.jj-discover-toolbar{min-height:44px;margin-bottom:24px}
.jj-discover-columns{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:40px}
.jj-footer{margin-top:32px}
.jj-page.jj-empty{padding:24px var(--jj-gutter) 40px}
.jj-page.jj-empty>.jj-list{padding:clamp(40px,10vh,100px) 0}
.jj-empty .wp-block-search{width:min(100%,480px);margin:24px auto}
.jj-empty .wp-block-search__input{font-size:16px}
.jj-empty .wp-block-home-link{margin-top:24px}
.jj-pagination a,.jj-section-heading>a{min-height:44px}
.jj-mobile-account,.jj-pill,.jj-nav-item,.jj-open,.jj-topics>a,.jj-quick-tools>a,.jj-recent>a{-webkit-tap-highlight-color:transparent}
.jj-open:focus-visible,.jj-topics>a:focus-visible{outline-offset:3px;border-radius:var(--jj-card)}

.login.jj-auth #login{max-width:460px}
.jj-auth-header .jj-brand{margin:0}
.jj-auth.login .forgetmenot{min-height:32px;display:flex;align-items:center}
.jj-auth.login .forgetmenot label{padding:8px 0;cursor:pointer}
.jj-auth.login #nav a{display:inline-flex;align-items:center;min-height:44px}
.jj-auth.login .language-switcher form{flex-wrap:wrap}
@media(min-width:701px) and (max-width:1100px){
  :root{--jj-sidebar:184px;--jj-shell-offset:212px;--jj-gutter:24px}
  .is-tools .jj-cards,.jj-topics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .jj-featured{grid-template-columns:1fr}
  .jj-featured-image{height:auto;aspect-ratio:16/9}
  .jj-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .jj-discover-columns{grid-template-columns:1fr;gap:8px}
  .jj-resource-layout{grid-template-columns:1fr;gap:24px}
  .jj-resource-info{order:-1}
  .jj-resource-info dl{display:grid;grid-template-columns:64px minmax(0,1fr);gap:10px;margin:0}
  .jj-resource-info :is(dt,dd){margin:0}
}
@media(max-width:700px){
  :root{--jj-shell-offset:0px;--jj-gutter:20px}
  html{scroll-padding-bottom:calc(112px + env(safe-area-inset-bottom))}
  .jj-sidebar{width:auto;padding:12px var(--jj-gutter);min-height:68px}
  .jj-brand-name{display:none}
  .jj-mobile-context{display:inline;font-size:20px;font-weight:700}
  .jj-sidebar nav{max-width:480px;margin-inline:auto}
  .jj-nav-item{font-size:12px;min-height:56px}
  .jj-page{padding:12px var(--jj-gutter) calc(116px + env(safe-area-inset-bottom));min-height:calc(100svh - 68px)}
  .jj-explorer>.jj-list{display:block}
  .jj-section-title{display:none}
  .jj-list-controls{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding-bottom:12px;align-items:center}
  .jj-page-head{grid-column:1;grid-row:1;min-width:0}
  .jj-filter-row{grid-column:2;grid-row:1;margin:0}
  .jj-search{width:100%;max-width:none}
  .jj-list-label{padding:8px 0 16px}
  .jj-filters{display:none}
  .jj-mobile-filter summary{max-width:116px}
  .jj-filter-panel{max-height:min(50dvh,360px);scrollbar-gutter:stable}
  .jj-filter-panel a:focus-visible{outline-offset:1px}
  .is-search .jj-list-controls{grid-template-columns:1fr;gap:12px}
  .is-search .jj-filter-row{grid-column:1;grid-row:2}
  .is-search .jj-mobile-filter{display:none}
  .is-search .jj-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%}
  .is-search .jj-filters a{padding:6px;min-height:44px;font-size:14px}
  .jj-open{min-height:120px}
  .jj-thumb,.jj-explorer:not(.is-tools) .jj-tool-icon{width:88px;height:72px}
  .is-tools .jj-cards{grid-template-columns:1fr}
  .is-tools .jj-tool-card .jj-open{min-height:88px}
  .is-tools .jj-tool-card p{font-size:13px}
  .is-tools .jj-card-body{display:block}
  .jj-reader-toolbar{min-height:44px}
  .jj-detail{margin-top:20px}
  .jj-resource .jj-detail-head{grid-template-columns:56px minmax(0,1fr);column-gap:16px;margin-bottom:24px}
  .jj-resource .jj-detail-head>.jj-resource-emblem{width:56px;height:56px;border-radius:16px;grid-row:1/3}
  .jj-resource-emblem svg{width:28px;height:28px}
  .jj-resource .jj-detail-head h1{font-size:24px}
  .jj-resource .jj-detail-head :is(.jj-lead,.jj-resource-properties,.jj-primary){grid-column:1/-1}
  .jj-resource .jj-detail-head .jj-lead{margin-top:12px}
  .jj-resource-layout{grid-template-columns:1fr;gap:24px}
  .jj-resource-info{padding:20px}
  .jj-resource-info h2{margin-bottom:12px}
  .jj-resource-info a{margin-top:12px}
  .jj-byline{gap:8px;flex-wrap:wrap}
  .jj-topics{grid-template-columns:1fr}
  .jj-topics>a:first-child{padding:20px}
  .jj-topics>a:first-child h2{font-size:22px}
  .jj-series-banner{padding:20px;flex-wrap:wrap}
  .jj-discover .jj-series-banner{flex-wrap:nowrap}
  .jj-discover .jj-series-banner h2{font-size:18px}
  .jj-discover .jj-series-banner .jj-pill{padding-inline:12px}
  .jj-featured{display:flex;padding:0}
  .jj-featured-image{height:auto;aspect-ratio:16/9}
  .jj-feature-grid,.jj-discover-columns{grid-template-columns:1fr;gap:0}
  .jj-discover-toolbar{margin-bottom:16px}
  .jj-footer{margin-top:24px}
  .jj-page.jj-empty{padding:12px var(--jj-gutter) calc(116px + env(safe-area-inset-bottom))}
  .jj-page.jj-empty>.jj-list{padding:40px 0}
  .jj-empty .wp-block-search__inside-wrapper{flex-wrap:nowrap}
  .jj-empty .wp-block-search__button{padding-inline:16px}
  .login.jj-auth #login{width:100%;max-width:460px;margin-inline:auto;padding:20px var(--jj-gutter)}
  .jj-auth-header{padding:20px var(--jj-gutter)}
}

/* Mixed results and collection pages retain their own information hierarchy. */
.jj-tool-card .jj-open::after{order:3}
.jj-explorer.is-search .jj-cards>.jj-card:first-child .jj-open{padding:20px 0;background:transparent;border-radius:0}
.jj-explorer.is-search .jj-open{min-height:108px;gap:16px}
.jj-explorer.is-search :is(.jj-thumb,.jj-tool-icon){order:0;width:48px;height:48px;border-radius:12px}
.jj-explorer.is-search .jj-card-body{order:1}
.jj-explorer.is-search .jj-meta time{display:none}
.jj-explorer.is-search .jj-card-foot{display:none}
.jj-explorer.is-search .jj-open::after{content:'›';order:3;font-size:20px;color:var(--jj-muted)}
.is-series>.jj-list>.jj-series-banner{grid-column:1/-1;grid-row:2}
.is-series .jj-filter-row{grid-row:3}
.jj-collection .jj-reader-toolbar{justify-content:space-between}
.jj-collection .jj-detail-head h1{font-size:20px}
.jj-collection .jj-detail-head .jj-lead{margin-bottom:0}
.jj-empty{text-align:left}
.jj-empty .jj-state-icon{margin-left:0}
.jj-explorer .jj-empty{padding:32px 0}
.jj-empty .wp-block-search{margin-left:0}
.jj-page.jj-empty .jj-404-number{font-size:48px}
@media(max-width:700px){
  .jj-explorer.is-search .jj-cards{gap:10px}
  .jj-explorer.is-search .jj-card{border:1px solid var(--jj-line);border-radius:var(--jj-card)}
  .jj-explorer.is-search .jj-card .jj-open,.jj-explorer.is-search .jj-cards>.jj-card:first-child .jj-open{min-height:96px;padding:14px;gap:12px;border-radius:var(--jj-card)}
  .jj-explorer.is-search :is(.jj-thumb,.jj-tool-icon){width:40px;height:40px}
  .jj-explorer.is-search .jj-meta{font-size:12px}
  .jj-explorer.is-search .jj-card h2{font-size:15px}
  .jj-explorer.is-search .jj-card p{font-size:13px;-webkit-line-clamp:1}
  .is-series .jj-section-title{display:flex;margin-bottom:20px}
  .is-series .jj-list-controls{display:none}
  .is-series>.jj-list>.jj-series-banner{margin:0 0 16px}
  .jj-collection .jj-reader-toolbar{display:none}
  .jj-collection .jj-detail{margin-top:0}
  .jj-collection .jj-detail-head{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .jj-collection .jj-topics{margin-top:0}
  .jj-empty h2{font-size:22px}
}

/* Detail navigation: one title in the content, one mobile return control. */
.jj-mobile-back{display:none}
.jj-collection .jj-reader-toolbar{justify-content:flex-end}
@media(max-width:700px){
  .jj-reading-page .jj-sidebar{position:fixed;inset:0 0 auto;width:auto;z-index:40;padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:8px;min-height:60px;background:var(--jj-paper)}
  .jj-reading-page .jj-sidebar .jj-brand{display:none}
  .jj-reading-page .jj-mobile-back{display:inline-flex;width:44px;height:44px;padding:0;flex-shrink:0}
  .jj-reading-page .jj-reader-toolbar,.jj-reading-page .is-series .jj-section-title{display:none}
  .jj-reading-page .jj-page{padding-top:calc(80px + env(safe-area-inset-top))}
  .jj-reading-page .jj-detail{margin-top:0}
  .jj-reading-page .jj-prose :is(h2,h3,h4){scroll-margin-top:calc(80px + env(safe-area-inset-top))}
  .admin-bar.jj-reading-page .jj-sidebar{top:46px}
}
@media(max-width:600px){
  .admin-bar.jj-reading-page #wpadminbar{position:fixed}
}

/* Hover follows the component shape; it never introduces padding or a new outline. */
.is-tools .jj-tool-card .jj-open{border-radius:inherit}
.jj-feature-grid .jj-open{padding:16px;border-radius:var(--jj-card)}
.jj-feature-grid .jj-card-body{padding:0 0 4px}
.jj-feature-grid .jj-open{transition:background-color .15s}
.jj-open h2,.jj-card-foot,.jj-quick-tools>a,.jj-recent>a{transition:color .15s}
@media(min-width:701px){
  .jj-explorer:not(.is-tools):not(.is-search) .jj-cards>.jj-card:first-child{border-bottom:0;margin-bottom:8px}
}
@media(max-width:700px){
  .jj-feature-grid .jj-open{padding:16px 0;border-radius:0}
  .jj-feature-grid .jj-card-body{padding:0}
}

@media(prefers-reduced-motion:reduce){
  .jj-feature-grid .jj-open,.jj-open h2,.jj-card-foot,.jj-quick-tools>a,.jj-recent>a{transition:none}
}

/* Desktop reading navigation follows the actual article width, including scrollbar gutter. */
.jj-reading-bar{display:none}
@media(min-width:701px){
 .jj-reading-bar:not([hidden]){position:fixed;z-index:30;display:flex;align-items:center;gap:12px;min-height:52px;padding:0;pointer-events:none}
 .jj-reading-bar .jj-reading-back{display:grid;place-items:center;flex:0 0 52px;width:52px;height:52px;padding:0;pointer-events:auto}
 .jj-reading-back svg{width:20px;height:20px}
 .jj-reading-bar-title{display:block;flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:16px;font-weight:600;line-height:26px;padding:12px 24px;pointer-events:auto}
 .single-post .jj-prose :is(h2,h3,h4){scroll-margin-top:100px}
 .admin-bar.single-post .jj-prose :is(h2,h3,h4){scroll-margin-top:132px}
}
.jj-wechat-qr{display:block;width:220px;height:220px;max-width:100%;object-fit:contain;background:#fff;border-radius:16px;padding:8px;margin:20px auto}
.jj-wechat-login [role=status]{min-height:48px}
.jj-prose iframe,.jj-prose video,.jj-legacy-video video{display:block;width:100%;max-width:100%;border:0;border-radius:12px}.jj-prose iframe{aspect-ratio:16/9;height:auto;min-height:220px}.jj-prose audio{max-width:100%}.jj-legacy-video{margin:24px 0}.jj-legacy-video figcaption{font-size:13px;margin-top:8px}.jj-tag-cloud{display:flex;flex-wrap:wrap;gap:12px;margin:28px 0}.jj-tag-cloud small{margin-left:6px;color:var(--jj-muted)}.jj-footer-contact{display:flex;align-items:center;gap:16px;flex-basis:100%;max-width:420px;font-size:13px;line-height:1.7}.jj-footer-contact img{width:80px;height:80px;object-fit:contain;border-radius:8px;flex:none}
/* Public social-only account entry shares the full-screen account layout. */
.jj-provider-actions{display:grid;gap:20px;margin-top:28px}.jj-provider-actions>.jj-pill{width:100%;min-height:48px;justify-content:center;text-decoration:none;box-sizing:border-box}.jj-provider-actions .jj-wechat-panel{padding:16px 0 0}.jj-wechat-panel h2{font-size:18px;margin:0 0 16px;color:var(--jj-ink)}.jj-admin-entry{margin:28px 0 0!important;text-align:center}.jj-admin-entry a{display:inline-flex;align-items:center;min-height:44px;font-size:13px;color:var(--jj-muted);text-decoration:none}.jj-auth-unavailable{line-height:1.8;color:var(--jj-muted)}
/* Configurable identity and common footer. */
.jj-brand-name,.jj-brand-identity{min-width:0}.jj-brand-identity{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.jj-brand-title{overflow-wrap:anywhere;line-height:1.4}.jj-brand-identity small{margin:0;line-height:1.6}.jj-brand-logos{display:block;width:var(--jj-logo-width,104px);max-width:100%;line-height:0}.jj-brand-logo{display:block;width:auto;max-width:100%;height:auto;max-height:48px;object-fit:contain}.jj-brand-logo.jj-logo-dark{display:none}[data-theme=dark] .jj-brand-logo.jj-logo-light{display:none}[data-theme=dark] .jj-brand-logo.jj-logo-dark{display:block}.jj-auth-header .jj-brand{min-width:0;max-width:180px;flex-shrink:1}.jj-footer{flex-wrap:wrap;align-items:flex-start}.jj-footer-copy{min-width:0;overflow-wrap:anywhere}.jj-footer-links{flex-basis:100%;display:flex;flex-wrap:wrap;gap:8px 20px;align-items:center}.jj-footer-links a{display:inline-flex;align-items:center;min-height:32px;overflow-wrap:anywhere;word-break:break-word}.jj-footer-tagline{overflow-wrap:anywhere}.jj-footer a:hover{color:var(--jj-blue)}
@media(max-width:700px){.jj-mobile-context .jj-brand-title{font-size:20px}.jj-mobile-context .jj-brand-identity{gap:0}.jj-mobile-context .jj-brand-logos{max-width:120px}.jj-mobile-context .jj-brand-logo{max-height:30px}.jj-mobile-context .jj-brand-logos+.jj-brand-title{display:none}.jj-auth-header .jj-brand{max-width:140px;font-size:20px}.jj-auth-header .jj-brand-logo{max-height:36px}.jj-footer .jj-footer-links .jj-footer-label{display:inline}.jj-footer-links{gap:2px 16px}.jj-footer-links a{min-height:44px}}
/* Publisher information follows the public-account section on every screen. */
.jj-pr-banner{display:block;margin:24px 0;border-radius:var(--jj-card);overflow:hidden;line-height:0;text-decoration:none;color:var(--jj-ink)}.jj-pr-banner img{display:block;width:100%;height:auto}.jj-pr-banner-caption{display:none}.jj-pr-banner:focus-visible{outline:2px solid var(--jj-blue);outline-offset:4px}
@media(max-width:700px){.jj-discover .jj-pr-banner{order:1;margin:0 0 20px}.jj-pr-banner{margin:20px 0;border-radius:var(--jj-media)}.jj-pr-banner-caption{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;padding:8px 12px;box-sizing:border-box;background:var(--jj-subtle);font-size:14px;line-height:1.5}.jj-pr-banner-caption strong{font-size:14px;font-weight:500}.jj-pr-banner-caption>span{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;font-size:12px}.jj-pr-banner-caption svg{width:16px;height:16px}}
.jj-footer{flex-direction:column;gap:24px}.jj-footer-top{display:flex;align-items:center;justify-content:space-between;gap:24px;width:100%;min-width:0}.jj-footer-top .jj-footer-contact{flex:1 1 auto;min-width:0}.jj-footer .jj-footer-contact span{display:block}.jj-footer .jj-footer-tagline{display:block;text-align:right;line-height:1.7}.jj-footer-legal{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 24px;width:100%;padding-top:16px;border-top:1px solid var(--jj-line)}.jj-footer-legal .jj-footer-links{flex-basis:auto;gap:4px 20px}
@media(max-width:700px){.jj-footer-top{flex-direction:column;align-items:flex-start;gap:16px}.jj-footer .jj-footer-tagline{text-align:left}.jj-footer-legal{flex-direction:column;align-items:flex-start;gap:0}.jj-footer-legal .jj-footer-links{gap:0 16px}}
