/* ZCYAI R3 editorial interiors. Keep existing content, archive filters and workbench actions. */
body.front-v2.zc25-brand #mainContent :is(#zp9-library,#zpd9-detail,.tools-layout:has(>.tools-main>.art-grid),.detail-layout:has(.zc20-article-body)){
  --r3-ed-gap:clamp(12px,1.7vw,22px);--r3-ed-pad:clamp(16px,2.4vw,30px);--r3-ed-radius:12px;
  --r3-ed-link:var(--z25-link,#105bdc);min-width:0;
}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-hero{
  display:grid;grid-template-columns:minmax(0,1.26fr) minmax(240px,.74fr);gap:var(--r3-ed-gap);align-items:stretch;
  padding:var(--r3-ed-pad);background:linear-gradient(110deg,var(--z25-paper) 40%,var(--z25-tint));border-radius:14px;min-width:0;
}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-hero-copy{min-width:0;align-self:center}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-hero h1{font-size:clamp(29px,3.35vw,50px);line-height:1.16;overflow-wrap:anywhere}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-search{display:flex;min-height:52px;padding:4px;gap:6px;border-color:var(--r3-ed-link);background:var(--z25-paper)}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-search input{flex:1;min-width:0;padding-inline:12px}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-search button{flex:none;min-height:44px}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-hot{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-hot a{color:var(--r3-ed-link);overflow-wrap:anywhere}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-guide{
  padding:clamp(18px,2vw,26px);background:radial-gradient(ellipse at 100% 100%,#14558e 0,transparent 65%),#063565;
  border-color:#3377b2;color:#e6f5ff;min-width:0;
}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-guide :is(h2,h3,b){color:#fff}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-guide :is(li,p,.zp9-guide-top span,.zp9-stats span){color:#ddf1ff}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-guide .zp9-mini-code{background:#124d84;color:#72eef1;border-color:#4e91c2}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-guide .zp9-stats>div{border-color:#467eab;background:#0a3e71;color:#e6f5ff}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-layout{
  display:grid;grid-template-columns:clamp(166px,18%,211px) minmax(0,1fr);gap:var(--r3-ed-gap);align-items:start;
}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-sidebar{
  padding:10px;border-radius:var(--r3-ed-radius);background:var(--z25-paper);min-width:0;box-shadow:none;
}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-sidebar summary{min-height:44px;padding:8px;cursor:pointer}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-nav{min-width:0}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-nav a{min-height:39px;gap:6px;border:1px solid transparent;white-space:normal;overflow-wrap:anywhere}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-nav a[aria-current]{background:var(--z25-tint);color:var(--r3-ed-link);border-color:var(--z25-line)}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-main{min-width:0}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;gap:10px;flex-wrap:wrap}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-toolbar h2{margin:3px 0;font-size:clamp(20px,2.2vw,28px)}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-filters{flex-wrap:wrap;min-width:0}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card{
  display:flex;flex-direction:column;gap:8px;min-width:0;padding:15px;border:1px solid var(--z25-line);
  border-radius:var(--r3-ed-radius);background:var(--z25-paper);box-shadow:none;transform:none;
}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card:is(:hover,:focus-within){border-color:var(--r3-ed-link);transform:none}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card h3{margin:2px 0 0;font-size:17px;line-height:1.4;overflow-wrap:anywhere}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card-top{display:flex;align-items:center;justify-content:space-between;gap:5px}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card-icon{width:34px;height:34px;border:1px solid var(--z25-line);color:var(--r3-ed-link)}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-license{max-width:100%;white-space:normal}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card .zp9-excerpt{
  color:var(--z25-copy);font-size:14px;line-height:1.68;margin:0;overflow-wrap:anywhere;
}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card-tags{display:flex;gap:5px;flex-wrap:wrap;min-width:0}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card-tags a{color:var(--r3-ed-link);background:var(--z25-tint);border-radius:6px;max-width:100%;overflow-wrap:anywhere}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card-meta{margin-top:auto;flex-wrap:wrap}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card-actions{display:flex;gap:5px 8px;flex-wrap:wrap;justify-content:space-between;border-top:1px solid var(--z25-line);padding-top:7px}
body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card-actions :is(a,button){font-size:13px;min-height:36px;color:var(--r3-ed-link);white-space:normal}

/* Prompt detail: compact metadata, source text workbench and a true related-template rail. */
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-hero{
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 18px;
  padding:var(--r3-ed-pad);background:linear-gradient(112deg,var(--z25-paper) 48%,var(--z25-tint));border-radius:14px;
}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-hero :is(h1,.zpd9-mark){grid-column:1/-1;margin:0;min-width:0}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-hero h1{font-size:clamp(27px,3.15vw,48px);line-height:1.2}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-hero-actions{margin:0;flex-wrap:wrap;gap:8px}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(210px,25%,275px);align-items:start;gap:var(--r3-ed-gap)}
body.front-v2.zc25-brand #mainContent #zpd9-detail :is(.zpd9-main,.zpd9-aside,.zpd9-variables){min-width:0}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-card{padding:var(--r3-ed-pad);border-radius:var(--r3-ed-radius);box-shadow:none}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-workbench{border-top:3px solid var(--z25-blue)}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-panel-title{display:flex;gap:10px;align-items:flex-start}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-panel-title>span{flex:none;background:var(--z25-tint);color:var(--r3-ed-link);border-radius:8px}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-preview{display:block;width:100%;min-height:235px;background:var(--z25-bg);font-size:15px;line-height:1.75}
body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-actions{border-top:1px solid var(--z25-line);margin-top:12px;padding-top:12px}

/* News listing: categories above results, a featured first story, then 3/2/1 cards. */
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid){
  display:grid;grid-template-columns:minmax(0,1fr);gap:var(--r3-ed-gap);width:100%;max-width:none;align-items:start;
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) :is(.tools-side,.tools-main){min-width:0;width:100%;max-width:none}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .tools-side{position:static;padding:0;overflow:visible}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .side-card{
  display:flex;gap:10px;align-items:center;padding:8px 12px;background:var(--z25-paper);border-radius:var(--r3-ed-radius);
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .side-title{
  flex:none;margin:0;padding:0;border:0;color:var(--z25-ink);font-size:13px;font-weight:750;
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .side-links{
  display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0;
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .side-link{
  display:inline-flex;align-items:center;justify-content:center;min-height:36px;min-width:0;max-width:100%;
  padding:7px 10px;line-height:1.35;font-size:13px;border:1px solid var(--z25-line);border-radius:7px;
  color:var(--z25-copy);background:var(--z25-paper);white-space:normal;overflow-wrap:anywhere;
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .side-link.current{background:#1767ff;border-color:#1767ff;color:#fff;font-weight:700}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .tools-bar{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:12px 15px}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .list-search{display:flex;align-items:center;padding:3px;min-width:0;flex:0 1 430px;border-color:var(--r3-ed-link)}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .list-search input{flex:1;min-width:0;padding-inline:10px}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .list-search button{flex:none;min-height:44px}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--r3-ed-gap)}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-card{display:flex;flex-direction:column;min-width:0;box-shadow:none;transform:none}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-card:is(:hover,:focus-visible){border-color:var(--r3-ed-link);transform:none}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-card:first-child{
  grid-column:1/-1;display:grid;grid-template-columns:minmax(0,.98fr) minmax(0,1fr);align-items:stretch;background:var(--z25-paper);
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-thumb{position:relative;height:auto;min-width:0;aspect-ratio:16/9}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-thumb img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-card:first-child .art-thumb{aspect-ratio:2.1;min-height:190px}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-body{display:flex;flex-direction:column;align-items:flex-start;gap:9px;min-width:0;padding:clamp(14px,2vw,24px)}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-body h3{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
  font-size:17px;line-height:1.48;margin:0;white-space:normal;overflow-wrap:anywhere;
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-card:first-child .art-body{justify-content:center}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-card:first-child .art-body h3{font-size:clamp(20px,2.7vw,34px)}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .zc25-article-summary{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;
  color:var(--z25-copy);font-size:14px;line-height:1.65;margin:0;overflow-wrap:anywhere;
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-meta{display:flex;gap:5px 9px;flex-wrap:wrap}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-go{
  display:inline-flex;align-items:center;min-height:36px;padding:4px 10px;margin-top:auto;
  color:var(--r3-ed-link);background:var(--z25-tint);border-radius:7px;font-size:13px;font-weight:700;
}

/* Article reading: full title/actions, restrained reading measure and actual metadata/TOC rail. */
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body){
  display:grid;grid-template-columns:minmax(0,1fr) clamp(200px,22%,253px);gap:var(--r3-ed-gap);align-items:start;
}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .detail-main{min-width:0;overflow:visible;background:transparent;border:0;box-shadow:none}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .detail-head{
  margin:0 0 var(--r3-ed-gap);padding:var(--r3-ed-pad);border:1px solid var(--z25-line);border-top:3px solid var(--z25-blue);
  border-radius:var(--r3-ed-radius);background:linear-gradient(113deg,var(--z25-paper) 49%,var(--z25-tint));color:var(--z25-ink);
}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .detail-head h1{font-size:clamp(26px,3.2vw,46px);line-height:1.21;margin-top:0;color:var(--z25-ink);overflow-wrap:anywhere}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .detail-actions{display:flex;flex-wrap:wrap;gap:7px}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .zc20-article-body{
  width:100%;max-width:820px;margin:0 auto;padding:var(--r3-ed-pad);border:1px solid var(--z25-line);border-radius:var(--r3-ed-radius);
  background:var(--z25-paper);font-size:16px;line-height:1.82;min-width:0;
}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .zc20-article-body h2{padding-inline-start:12px;border-inline-start:3px solid #28dde5}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .detail-aside{min-width:0}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) :is(.zc20-article-toc,.aside-card,.article-pager){
  border:1px solid var(--z25-line);border-radius:var(--r3-ed-radius);background:var(--z25-paper);box-shadow:none;
}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .zc20-article-toc a{display:block;padding:5px 8px;overflow-wrap:anywhere}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .article-pager{margin:var(--r3-ed-gap) 0 0;padding:12px;gap:10px}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .article-pager .apager-title{white-space:normal;overflow-wrap:anywhere}
@media(min-width:1050px){
  body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .detail-aside{
    position:sticky;top:calc(var(--z25-head,64px) + 16px);max-height:calc(100dvh - var(--z25-head,64px) - 32px);
    overflow:auto;overscroll-behavior:contain;
  }
}
@media(max-width:1160px){
  body.front-v2.zc25-brand #mainContent #zp9-library .zp9-grid,
  body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1049px){
  body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body){grid-template-columns:minmax(0,1fr)}
}
@media(max-width:767px){
  body.front-v2.zc25-brand #mainContent #zp9-library :is(.zp9-hero,.zp9-layout,.zp9-grid),
  body.front-v2.zc25-brand #mainContent #zpd9-detail :is(.zpd9-hero,.zpd9-layout),
  body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) :is(.art-grid,.art-card:first-child){grid-template-columns:minmax(0,1fr)}
  body.front-v2.zc25-brand #mainContent #zp9-library .zp9-nav{display:flex;flex-wrap:wrap;gap:4px}
  body.front-v2.zc25-brand #mainContent #zp9-library :is(.zp9-nav a,.zp9-card-actions a,.zp9-card-actions button,.zp9-hot a){min-height:44px;display:inline-flex;align-items:center}
  body.front-v2.zc25-brand #mainContent #zp9-library .zp9-card{padding:14px}
  body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-preview{min-height:190px}
  body.front-v2.zc25-brand #mainContent #zpd9-detail .zpd9-back{display:inline-flex;align-items:center;min-height:44px}
  body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .side-card{align-items:flex-start;flex-direction:column;gap:3px}
  body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .side-link{min-height:44px}
  body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .list-search{flex:1 1 100%}
  body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-card:first-child .art-thumb{min-height:0;aspect-ratio:16/9}
  body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .zc20-article-toc a{min-height:44px}
  body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .article-pager{display:grid;grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){
  body.front-v2.zc25-brand #mainContent :is(#zp9-library .zp9-card,.tools-layout:has(.art-grid) .art-card){transition:none;animation:none;transform:none}
}
/* Resolve pre-R3 compact article widths and vertical side-link direction from legacy CSS. */
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .side-links {
  display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:center;
  flex:1 1 auto;width:100%;min-width:0;gap:6px;
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-card .art-thumb {
  width:100%;max-width:none;align-self:stretch;
}
body.front-v2.zc25-brand #mainContent .tools-layout:has(>.tools-main>.art-grid) .art-card:first-child .art-thumb {
  aspect-ratio:16/9;min-height:0;
}
body.front-v2.zc25-brand #mainContent .detail-layout:has(.zc20-article-body) .zc20-article-body {max-width:760px}
