/* Jingsxians R1518.2 — final full-site layout governance.
   Loaded after legacy styles. It separates directory cards, article lists,
   research cards, panels and reading pages instead of giving every grid
   the former 240px auto-fit rule. */
html[data-jx-layout-system="r1518"]{
  --jx18-page:var(--jx-comfort-page,#f5f6f3);
  --jx18-surface:var(--jx-comfort-surface,#fff);
  --jx18-soft:var(--jx-comfort-soft-2,#f8f9f7);
  --jx18-text:var(--jx-comfort-text,#20231f);
  --jx18-body:var(--jx-comfort-body,#30342e);
  --jx18-muted:var(--jx-comfort-secondary,#50564d);
  --jx18-meta:var(--jx-comfort-tertiary,#687067);
  --jx18-line:var(--jx-comfort-line,#d6dbd3);
  --jx18-accent:var(--jx-comfort-accent,#315c4e);
  --jx18-radius:12px;
  --jx18-shell:1120px;
  --jx18-gap:18px;
  color-scheme:light;
}
html[data-jx-layout-system="r1518"],
html[data-jx-layout-system="r1518"] body{
  background:var(--jx18-page)!important;
  color:var(--jx18-body)!important;
}
html[data-jx-layout-system="r1518"] *,
html[data-jx-layout-system="r1518"] *::before,
html[data-jx-layout-system="r1518"] *::after{box-sizing:border-box}
html[data-jx-layout-system="r1518"] :is(main,.jxPublicMain){min-width:0;background:transparent!important}
html[data-jx-layout-system="r1518"] :is(.wrap,.shell,.jxMajorShell,.jxMajorDirectory){
  width:min(calc(100% - 48px),var(--jx18-shell))!important;
  max-width:var(--jx18-shell)!important;
  min-width:0!important;
  margin-inline:auto!important;
}
html[data-jx-layout-system="r1518"] :is(.wrap,.shell) :is(.wrap,.shell){width:100%!important;max-width:none!important}

/* Stable page rhythm. */
html[data-jx-layout-system="r1518"] body:not(.jxHomePage) :is(.pageHero,.subHero,.askHero,.jxHeroRegion){
  padding-block:46px 34px!important;
}
html[data-jx-layout-system="r1518"] main :is(.section,.category,.jxSection,.jxEvidenceSection,.jxZiweiSection){
  min-width:0;
}
html[data-jx-layout-system="r1518"] main :is(.categoryBlock,.jxResearchGroup,.jxEvidenceSubsection){
  min-width:0;
}
html[data-jx-layout-system="r1518"] main .categoryBlock{
  padding:34px 0!important;
  border-top:1px solid var(--jx18-line)!important;
  background:transparent!important;
}
html[data-jx-layout-system="r1518"] main .categoryBlock:first-child{border-top:0!important}
html[data-jx-layout-system="r1518"] main .categoryBlock>span{
  display:block!important;
  margin:0 0 8px!important;
  color:var(--jx18-meta)!important;
  font:650 10px/1.5 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif!important;
  letter-spacing:.12em!important;
}
html[data-jx-layout-system="r1518"] main :is(.categoryBlock,.jxResearchGroup)>h2{
  margin-bottom:10px!important;
}
html[data-jx-layout-system="r1518"] main :is(.categoryBlock,.jxResearchGroup)>p{
  max-width:760px!important;
  margin:0 0 18px!important;
  color:var(--jx18-muted)!important;
  font-size:15px!important;
  line-height:1.85!important;
}

/* Standard card surface. */
html[data-jx-layout-system="r1518"] main :is(
 [data-jx18-card],[data-jx17-card],[data-jx-ui="card"],
 .card,.pathCard,.pathItem,.routeCard,.guideCard,.entryCard,.startCard,.topicCard,
 .lectureCard,.libraryCard,.lectureTile,.lectureItem,.lectureLink,.ziweiLectureCard,.jxLectureCard,.starCard,.stateCard,.exampleCard,.translationCard,
 .compareCard,.featureCard,.sourceCard,.stepCard,.portalCard,.jx17GeneratedCard,
 .topicList>a,.topicGrid>a,.linkGrid>a,.cardGrid>a,[data-article],
 .postCard,.jxAutoCard,.jxPlainCard,.jxMajorCard,.jxLatestReportCard,
 .jxAchievementCard,.jxDataCard,.jxUnifiedCard,.jxTraditionalEntrance,
 .r1512-card,.jxSupportCard,.jxEvidenceCard,.jxZiweiCard,.jxZiweiStep
):not(.jxSmartReader){
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:20px!important;
  border:1px solid var(--jx18-line)!important;
  border-radius:var(--jx18-radius)!important;
  background:var(--jx18-surface)!important;
  background-image:none!important;
  color:var(--jx18-text)!important;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
  text-decoration:none!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
}
html[data-jx-layout-system="r1518"] main :is([data-jx18-card],[data-jx17-card],[data-jx-ui="card"]) :is(h2,h3,h4,[data-jx17-title]){
  margin:0 0 9px!important;
  color:var(--jx18-text)!important;
  font:600 18px/1.48 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif!important;
  letter-spacing:0!important;
}
html[data-jx-layout-system="r1518"] main :is([data-jx18-card],[data-jx17-card],[data-jx-ui="card"]) :is(p,[data-jx17-desc]){
  margin:0 0 11px!important;
  color:var(--jx18-muted)!important;
  font:400 15px/1.76 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif!important;
}
html[data-jx-layout-system="r1518"] main :is([data-jx18-card],[data-jx17-card],[data-jx-ui="card"]) :is(small,.meta,.label,.status,[data-jx17-meta]){
  color:var(--jx18-meta)!important;
  font:400 13px/1.58 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif!important;
}
html[data-jx-layout-system="r1518"] main :is([data-jx18-card],[data-jx17-card]) :is(a,em):last-child{
  margin-top:auto!important;
  padding-top:10px!important;
  color:var(--jx18-accent)!important;
  font-style:normal!important;
  font-size:14px!important;
}
html[data-jx-layout-system="r1518"] main [data-jx18-card="summary"] :is(h2,h3,h4,[data-jx17-title]),
html[data-jx-layout-system="r1518"] main :is(.postCard,.jxAutoCard,.jxLatestReportCard,.jxMajorCard,.jxDataCard) :is(h2,h3,h4){
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
}
html[data-jx-layout-system="r1518"] main [data-jx18-card="summary"] :is(p,[data-jx17-desc]),
html[data-jx-layout-system="r1518"] main :is(.postCard,.jxAutoCard,.jxLatestReportCard,.jxMajorCard,.jxDataCard)>p{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:3!important;
  overflow:hidden!important;
}

/* Panels are not article cards. */
html[data-jx-layout-system="r1518"] main :is(
 [data-jx18-panel],[data-jx17-panel],[data-jx-ui="panel"],
 .askBox,.askPanel,.sourceBox,.safetyBox,.contactBox,.contactCard,
 .huaPanel,.palacePanel,.translationPanel,.comparePanel,.readerPanel,
 .jxEvidenceStatusCol,.jxRoadCol,.plain,.files
){
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  max-height:none!important;
  padding:20px!important;
  border:1px solid var(--jx18-line)!important;
  border-radius:var(--jx18-radius)!important;
  background:var(--jx18-surface)!important;
  background-image:none!important;
  color:var(--jx18-body)!important;
  box-shadow:none!important;
  overflow:visible!important;
}

/* Grid roles. These override R1517's former minmax(240px) rule. */
html[data-jx-layout-system="r1518"] [data-jx18-grid]{
  display:grid!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  gap:var(--jx18-gap)!important;
  grid-auto-rows:auto!important;
}
html[data-jx-layout-system="r1518"] [data-jx18-grid="wide"]{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
html[data-jx-layout-system="r1518"] [data-jx18-grid="standard"]{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
html[data-jx-layout-system="r1518"] [data-jx18-grid="status"]{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
}
html[data-jx-layout-system="r1518"] [data-jx18-grid="chain"]{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
html[data-jx-layout-system="r1518"][data-jx-layout-system="r1518"] body [data-jx18-grid][data-jx18-count="1"]{
  grid-template-columns:minmax(0,min(100%,760px))!important;
}
html[data-jx-layout-system="r1518"] [data-jx18-grid="standard"][data-jx18-count="2"]{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}

/* First-paint, page-specific fallbacks before JS assigns grid roles. */
html[data-jx-layout-system="r1518"] body:is(.jxPage-modern-research-html,.jxPage-tradition-research-html)
 :is(.topicList,.jxAutoCards){
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
  align-items:stretch!important;
  width:100%!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-modern-research-html :is(.topicList>a,.jxAutoCard),
html[data-jx-layout-system="r1518"] body.jxPage-tradition-research-html :is(.topicList>a,.jxAutoCard){
  min-width:0!important;
}
html[data-jx-layout-system="r1518"] body:is(.jxPage-research-html,.jxPage-research-results-html,.jxPage-data-html,.jxPage-reports-download-html)
 :is(.jxUnifiedGrid,.jxCardsGrid,.postGrid,.r1511-grid){
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
}
html[data-jx-layout-system="r1518"] body:is(.jxPage-posts-html,.jxPage-articles-html)
 :is(.postGrid,.articleGrid,.jxArticlesGrid){
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-traditional-html :is(.jxPortalGrid,.topicList,.portalGrid){
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
}

/* Modern/traditional knowledge directories: spacious two-column cards. */
html[data-jx-layout-system="r1518"] body:is(.jxPage-modern-research-html,.jxPage-tradition-research-html) .category{
  padding-bottom:66px!important;
}
html[data-jx-layout-system="r1518"] body:is(.jxPage-modern-research-html,.jxPage-tradition-research-html) .topicList{
  margin-top:16px!important;
}
html[data-jx-layout-system="r1518"] body:is(.jxPage-modern-research-html,.jxPage-tradition-research-html) .topicList>a{
  padding:21px!important;
}
html[data-jx-layout-system="r1518"] body:is(.jxPage-modern-research-html,.jxPage-tradition-research-html) .topicList>a>small{
  display:block!important;
  margin-top:6px!important;
  color:var(--jx18-muted)!important;
  font-size:14px!important;
  line-height:1.7!important;
}
html[data-jx-layout-system="r1518"] body:is(.jxPage-modern-research-html,.jxPage-tradition-research-html) .jxAutoFeed{
  margin-top:20px!important;
  padding-top:18px!important;
  border-top:1px dashed var(--jx18-line)!important;
}
html[data-jx-layout-system="r1518"] body:is(.jxPage-modern-research-html,.jxPage-tradition-research-html) .jxAutoFeedLabel{
  margin-bottom:12px!important;
  color:var(--jx18-meta)!important;
  font-size:12px!important;
  letter-spacing:.08em!important;
}

/* Research and report cards need room for long academic titles. */
html[data-jx-layout-system="r1518"] body:is(.jxPage-research-html,.jxPage-research-results-html,.jxPage-data-html,.jxPage-reports-download-html)
 :is(.jxLatestReportCard,.jxMajorCard,.jxDataCard,.r1511-report-card){
  padding:22px!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-research-html .jxResearchGroup{
  grid-column:1/-1!important;
  width:100%!important;
  margin:28px 0 0!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-research-html .jxResearchGroup>h3{
  margin-bottom:14px!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-research-html :is(.jxResearchRoadmap,.jxEvidenceStatus){
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
}

/* Evidence hard-rebuild and Ziwei hard-rebuild remain explicit, but avoid narrow five-column cards. */
html[data-jx-layout-system="r1518"] body.jxPage-evidence-html .jxEvidenceCards{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-evidence-html :is(.jxEvidenceStatusR15164,.jxEvidenceArchiveStatus){
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-evidence-html .jxEvidenceLayers{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-ziwei-dynamic-html .jxZiweiGrid.isFive{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-ziwei-dynamic-html .jxZiweiChain{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

/* Ask page: buttons remain controls; information stays panels. */
html[data-jx-layout-system="r1518"] body.jxPage-ask-html :is(.askGrid,.askLayout){
  display:grid!important;
  grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr)!important;
  gap:20px!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-ask-html :is(.promptBtns,.quickPrompts,.askActions,.jxControlRow){
  display:flex!important;
  flex-wrap:wrap!important;
  gap:9px!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}

/* Controls: same size and contrast across templates. */
html[data-jx-layout-system="r1518"] main :is(
 button:not(.menuBtn),.btn,.filterBtn,.promptBtn,.tabBtn,
 [data-jx-ui="control"],input[type="button"],input[type="submit"]
){
  box-sizing:border-box!important;
  display:inline-flex;
  align-items:center!important;
  justify-content:center!important;
  min-height:42px!important;
  min-width:42px!important;
  max-width:100%!important;
  height:auto!important;
  padding:9px 13px!important;
  border:1px solid var(--jx18-line)!important;
  border-radius:8px!important;
  background:#fff!important;
  background-image:none!important;
  color:var(--jx18-text)!important;
  box-shadow:none!important;
  font:550 14px/1.45 system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif!important;
  text-decoration:none!important;
  white-space:normal!important;
}
html[data-jx-layout-system="r1518"] main :is(
 #askSubmit,.btn.primary,button.primary,.filterBtn.active,.tabBtn.active,
 [aria-pressed="true"],[data-hua].active,[data-palace].active
){
  background:var(--jx18-accent)!important;
  border-color:var(--jx18-accent)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* No accidental warm/orange paper or square legacy card survives. */
html[data-jx-layout-system="r1518"] main :is(
 .yellow,.orange,.tintCard,.oldCard,.oldPanel,
 [data-jx18-card],[data-jx17-card],[data-jx18-panel],[data-jx17-panel]
){
  background-color:var(--jx18-surface)!important;
  background-image:none!important;
  border-color:var(--jx18-line)!important;
}
html[data-jx-layout-system="r1518"] main :is(img,video,canvas,iframe,svg){max-width:100%}
html[data-jx-layout-system="r1518"] main :is(pre,.tableWrap,[data-jx-table-scroll]){max-width:100%;overflow:auto}
html[data-jx-layout-system="r1518"] [hidden],
html[data-jx-layout-system="r1518"] [style*="display: none"],
html[data-jx-layout-system="r1518"] [style*="display:none"]{display:none!important}

/* Reading pages stay narrow and are not turned into cards. */
html[data-jx-layout-system="r1518"] body[class*="jxPage-articles-"] :is(main.jxArticlePage>article,main .jxArticlePage>article,main>article.jxArticlePage),
html[data-jx-layout-system="r1518"] .jxReadingArticle,
html[data-jx-layout-system="r1518"] article.articleText{
  width:100%!important;
  max-width:780px!important;
  margin-inline:auto!important;
}
html[data-jx-layout-system="r1518"] body[class*="jxPage-articles-"] :is(main.jxArticlePage,main .jxArticlePage,main>article.jxArticlePage) .content :is(p,li){
  font-size:18px!important;
  line-height:1.95!important;
}

/* Responsive column policy. */
@media(max-width:1024px){
  html[data-jx-layout-system="r1518"] [data-jx18-grid="standard"]{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html[data-jx-layout-system="r1518"] [data-jx18-grid="status"]{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html[data-jx-layout-system="r1518"] body:is(.jxPage-posts-html,.jxPage-articles-html)
   :is(.postGrid,.articleGrid,.jxArticlesGrid){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html[data-jx-layout-system="r1518"] body.jxPage-evidence-html :is(.jxEvidenceCards,.jxEvidenceStatusR15164,.jxEvidenceArchiveStatus){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:720px){
  html[data-jx-layout-system="r1518"][data-jx-layout-system="r1518"] body.jxPage-ziwei-dynamic-html .jxZiweiGrid.isFive,
  html[data-jx-layout-system="r1518"][data-jx-layout-system="r1518"] body.jxPage-ziwei-dynamic-html .jxZiweiChain{grid-template-columns:minmax(0,1fr)!important;}
  html[data-jx-layout-system="r1518"][data-jx-layout-system="r1518"] body [data-jx18-grid],
  html[data-jx-layout-system="r1518"][data-jx-layout-system="r1518"] body :is(.topicList,.jxAutoCards,.postGrid,.articleGrid,.jxArticlesGrid,.jxUnifiedGrid,.jxCardsGrid,.r1511-grid,.jxPortalGrid,.portalGrid,.jxEvidenceCards,.jxEvidenceStatusR15164,.jxEvidenceArchiveStatus,.jxEvidenceLayers,.jxResearchRoadmap,.jxEvidenceStatus,.jxSupportGrid,.jxSupportPrinciples,.jxZiweiGrid,.jxZiweiChain){
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-jx-layout-system="r1518"] :is(.wrap,.shell,.jxMajorShell,.jxMajorDirectory){
    width:calc(100% - 30px)!important;
  }
  html[data-jx-layout-system="r1518"] [data-jx18-grid],
  html[data-jx-layout-system="r1518"] body :is(
    .topicList,.jxAutoCards,.postGrid,.articleGrid,.jxArticlesGrid,
    .jxUnifiedGrid,.jxCardsGrid,.r1511-grid,.jxPortalGrid,.portalGrid,
    .jxEvidenceCards,.jxEvidenceStatusR15164,.jxEvidenceArchiveStatus,.jxEvidenceLayers,
    .jxResearchRoadmap,.jxEvidenceStatus,.jxSupportGrid,.jxSupportPrinciples,
    .jxZiweiGrid,.jxZiweiChain
  ){
    grid-template-columns:minmax(0,1fr)!important;
    gap:13px!important;
  }
  html[data-jx-layout-system="r1518"] body.jxPage-ask-html :is(.askGrid,.askLayout){
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-jx-layout-system="r1518"] main :is(
    [data-jx18-card],[data-jx17-card],[data-jx-ui="card"],
    .card,.topicList>a,.postCard,.jxAutoCard,.jxUnifiedCard,.jxZiweiCard
  ){padding:18px!important}
  html[data-jx-layout-system="r1518"] body:not(.jxHomePage) :is(.pageHero,.subHero,.askHero,.jxHeroRegion){
    padding-block:30px 24px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  html[data-jx-layout-system="r1518"] *{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}


/* ===== R1518.1 final defects: article collection + Ziwei library ===== */
html[data-jx-layout-system="r1518"] body.jxPage-articles-html :is(
 .postGrid,.articleGrid,.articlesGrid,.articles-grid,.articleList,.article-list,
 .articleCards,.articlesCards,.worksGrid,.writingGrid,.contentGrid,
 .jxArticlesGrid,.jxV8ArticlesLatest .grid,.jxV8ArticlesLatest>.wrap,
 .jxV8ArticlesLatest>.grid,.r1512-grid,[data-articles-grid],[data-jx18-auto-grid]
){
 display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:18px!important;
 align-items:stretch!important;
 width:100%!important;
 min-width:0!important;
 max-width:100%!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-articles-html :is([data-article],[data-jx18-card]){
 min-width:0!important;
 width:100%!important;
 max-width:none!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-ziwei-library-html :is(
 [data-jx18-card],[data-jx17-card],.lectureCard,.libraryCard,.lectureTile,
 .lectureItem,.lectureLink,.ziweiLectureCard,.jxLectureCard,.topicList>a
){
 box-sizing:border-box!important;
 min-width:0!important;
 padding:20px!important;
 border:1px solid var(--jx18-line)!important;
 border-radius:12px!important;
 background:var(--jx18-surface)!important;
 background-image:none!important;
 box-shadow:none!important;
 overflow:visible!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-ziwei-library-html :is(
 .lectureGrid,.libraryGrid,.lectureList,.libraryList,.ziweiLibraryGrid,
 .jx17GeneratedGrid,[data-jx18-auto-grid]
){
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:18px!important;
 width:100%!important;
 min-width:0!important;
 max-width:100%!important;
}
@media(max-width:1024px){
 html[data-jx-layout-system="r1518"] body.jxPage-articles-html :is(
  .postGrid,.articleGrid,.articlesGrid,.articles-grid,.articleList,.article-list,
  .articleCards,.articlesCards,.worksGrid,.writingGrid,.contentGrid,
  .jxArticlesGrid,.jxV8ArticlesLatest .grid,.jxV8ArticlesLatest>.wrap,
  .jxV8ArticlesLatest>.grid,.r1512-grid,[data-articles-grid],[data-jx18-auto-grid]
 ){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:720px){
 html[data-jx-layout-system="r1518"] body.jxPage-articles-html :is(
  .postGrid,.articleGrid,.articlesGrid,.articles-grid,.articleList,.article-list,
  .articleCards,.articlesCards,.worksGrid,.writingGrid,.contentGrid,
  .jxArticlesGrid,.jxV8ArticlesLatest .grid,.jxV8ArticlesLatest>.wrap,
  .jxV8ArticlesLatest>.grid,.r1512-grid,[data-articles-grid],[data-jx18-auto-grid]
 ),
 html[data-jx-layout-system="r1518"] body.jxPage-ziwei-library-html :is(
  .lectureGrid,.libraryGrid,.lectureList,.libraryList,.ziweiLibraryGrid,
  .jx17GeneratedGrid,[data-jx18-auto-grid]
 ){grid-template-columns:minmax(0,1fr)!important}
}


/* ===== R1518.2: articles collection nesting repair ===== */
html[data-jx-layout-system="r1518"] body.jxPage-articles-html :is(
 .jxV8ArticlesLatest>.wrap,.jxV8ArticlesLatest .wrap,
 .jxArticlesLatest>.wrap,.r1512-latest>.wrap,
 [data-jx-latest-preview]>.wrap
){
 display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;grid-template-columns:none!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-articles-html [data-jx18-articles-grid]{
 display:grid!important;width:100%!important;max-width:100%!important;min-width:0!important;
 gap:18px!important;align-items:stretch!important;grid-auto-flow:row!important;grid-column:1/-1!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-articles-html [data-jx18-articles-grid="latest"]{
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-articles-html [data-jx18-articles-grid="catalog"]{
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
html[data-jx-layout-system="r1518"] body.jxPage-articles-html [data-jx18-articles-grid]>*{
 min-width:0!important;max-width:none!important;width:auto!important;
}
@media(max-width:1024px){
 html[data-jx-layout-system="r1518"] body.jxPage-articles-html [data-jx18-articles-grid="catalog"]{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
}
@media(max-width:720px){
 html[data-jx-layout-system="r1518"] body.jxPage-articles-html [data-jx18-articles-grid]{
  grid-template-columns:minmax(0,1fr)!important;gap:13px!important;
 }
}
