/* Neural Critic — Category Editorial Layout V2
   Reframes the lower half of section/category pages as a publication archive,
   replacing the narrow feed + sticky sidebar composition with a wider editorial grid
   and a compact supporting utility row. */

.category-work-content{
  display:block!important;
}

#category-feed-section{
  width:100%;
}

.category-section-head{
  position:relative;
  align-items:end;
  padding-bottom:18px;
  border-bottom:1px solid rgba(128,141,167,.25);
}
.category-section-head::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-1px;
  width:112px;
  height:2px;
  border-radius:99px;
  background:linear-gradient(90deg,var(--nc-desk-cyan),var(--nc-desk-violet),transparent);
}
.category-section-head h2{
  font-size:clamp(30px,3vw,40px)!important;
  letter-spacing:-.052em!important;
}
.category-section-head>span{
  padding-bottom:4px;
  color:#78849a;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.category-feed{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  padding-top:22px;
}
.category-feed-card{
  position:relative;
  display:flex!important;
  min-width:0;
  flex-direction:column;
  gap:0!important;
  padding:0!important;
  overflow:hidden;
  border:1px solid rgba(124,142,255,.18)!important;
  border-radius:19px;
  background:
    radial-gradient(circle at 100% 0,rgba(119,104,255,.08),transparent 33%),
    linear-gradient(150deg,rgba(15,20,39,.94),rgba(7,11,24,.98));
  box-shadow:0 16px 42px rgba(2,6,18,.12);
  transition:transform .24s cubic-bezier(.16,1,.3,1),border-color .22s,box-shadow .24s!important;
}
.category-feed-card::before{
  content:"";
  position:absolute;
  z-index:4;
  inset:0 auto auto 0;
  width:82px;
  height:2px;
  background:linear-gradient(90deg,var(--nc-desk-cyan),var(--nc-desk-violet));
}
.category-feed-card:hover{
  transform:translateY(-4px)!important;
  border-color:rgba(82,226,247,.42)!important;
  box-shadow:0 24px 54px rgba(2,6,18,.22);
}
.category-feed-media{
  position:relative;
  width:100%;
  height:auto!important;
  aspect-ratio:16/9;
  border:0!important;
  border-radius:0!important;
  background:#070b16;
}
.category-feed-media::after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:42%;
  background:linear-gradient(180deg,transparent,rgba(6,9,20,.46));
  pointer-events:none;
}
.category-feed-media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.category-feed-copy{
  display:flex;
  min-height:220px;
  flex:1;
  flex-direction:column;
  align-items:flex-start;
  padding:20px 20px 21px;
}
.category-feed-copy>span{
  min-height:23px!important;
  padding:0 8px!important;
  font-size:7px!important;
}
.category-feed-copy h3{
  margin:12px 0 10px!important;
  font-size:clamp(20px,1.75vw,25px)!important;
  line-height:1.04!important;
  letter-spacing:-.045em!important;
}
.category-feed-copy p{
  display:-webkit-box;
  margin:0 0 18px!important;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  color:#929db1!important;
  font-size:10.5px!important;
  line-height:1.52!important;
}
.category-feed-copy small{
  margin-top:auto;
  color:#758097!important;
  font-size:7px!important;
  line-height:1.35!important;
}

/* Supporting material becomes a deliberate lower-page utility band rather than a sidebar. */
.category-sidebar{
  position:relative!important;
  top:auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr)!important;
  gap:18px!important;
  margin-top:42px;
}
.category-side-card{
  min-width:0;
  padding:25px 26px!important;
  border-color:rgba(124,142,255,.18)!important;
  border-radius:19px!important;
  background:
    radial-gradient(circle at 100% 0,rgba(119,104,255,.075),transparent 34%),
    linear-gradient(150deg,rgba(14,19,37,.93),rgba(8,12,26,.97))!important;
  box-shadow:0 16px 42px rgba(2,6,18,.11)!important;
}
.category-side-card::before{
  width:92px!important;
  background:linear-gradient(90deg,var(--nc-desk-cyan),var(--nc-desk-violet),transparent)!important;
}
.category-side-title{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:20px;
  padding-bottom:15px!important;
}
.category-side-title h2{
  margin-top:7px!important;
  font-size:27px!important;
}
.category-trending{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0;
}
.category-trending a{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr)!important;
  align-content:start;
  gap:10px!important;
  min-width:0;
  padding:18px 17px 5px 0!important;
  border-right:1px solid color-mix(in srgb,var(--line) 78%,transparent);
  border-bottom:0!important;
}
.category-trending a+a{
  padding-left:17px!important;
}
.category-trending a:last-child{
  padding-right:0!important;
  border-right:0;
}
.category-trending b{
  font-size:22px!important;
}
.category-trending strong{
  display:-webkit-box!important;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  font-size:10.5px!important;
  line-height:1.36!important;
}
.category-trending small{
  margin-top:7px!important;
}

.category-weekly{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-areas:
    "icon eyebrow"
    "icon title"
    "copy copy"
    "form form";
  column-gap:14px;
  align-content:start;
  background:
    radial-gradient(circle at 92% 5%,rgba(119,104,255,.18),transparent 38%),
    radial-gradient(circle at 15% 100%,rgba(82,226,247,.08),transparent 34%),
    linear-gradient(145deg,#111629,#0a0f20)!important;
}
.category-weekly>b{
  grid-area:icon;
  width:38px!important;
  height:38px!important;
  margin:0!important;
}
.category-weekly>small{grid-area:eyebrow;align-self:end}
.category-weekly h3{
  grid-area:title;
  align-self:start;
  margin:7px 0 0!important;
  font-size:24px!important;
}
.category-weekly>p{
  grid-area:copy;
  max-width:510px;
  margin:17px 0 16px!important;
  font-size:10.5px!important;
}
.category-weekly form{
  grid-area:form;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 112px;
  gap:8px!important;
}
.category-weekly input,
.category-weekly button{
  min-height:42px;
}

/* Prevent the old two-column grid from producing an oversized sidebar when the archive has no remainder. */
.category-work-content:has(#category-feed-section[hidden]) .category-sidebar{
  margin-top:0;
}

html[data-theme="light"] .category-feed-card{
  border-color:#dde3ea!important;
  background:radial-gradient(circle at 100% 0,rgba(119,104,255,.055),transparent 33%),linear-gradient(150deg,#fff,#f7f9fc);
  box-shadow:0 15px 36px rgba(38,49,69,.06);
}
html[data-theme="light"] .category-feed-card:hover{
  border-color:#82cfdb!important;
  box-shadow:0 22px 46px rgba(38,49,69,.10);
}
html[data-theme="light"] .category-feed-copy p{color:#687584!important}
html[data-theme="light"] .category-feed-copy small{color:#84909e!important}
html[data-theme="light"] .category-side-card:not(.category-weekly){
  border-color:#dde3ea!important;
  background:linear-gradient(150deg,#fff,#f8fafc)!important;
  box-shadow:0 15px 36px rgba(38,49,69,.06)!important;
}
html[data-theme="light"] .category-trending a{border-color:#e2e7ec}

@media(max-width:1060px){
  .category-feed{grid-template-columns:repeat(2,minmax(0,1fr))}
  .category-sidebar{grid-template-columns:1fr!important}
  .category-trending{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:720px){
  .category-section-head{align-items:start}
  .category-section-head>span{display:none}
  .category-feed{grid-template-columns:1fr;gap:15px;padding-top:18px}
  .category-feed-copy{min-height:0;padding:18px 18px 20px}
  .category-feed-copy p{-webkit-line-clamp:2}
  .category-sidebar{margin-top:30px!important}
  .category-side-card{padding:22px 20px!important}
  .category-side-title{display:block}
  .category-trending{grid-template-columns:1fr}
  .category-trending a,
  .category-trending a+a{
    grid-template-columns:35px minmax(0,1fr)!important;
    padding:15px 0!important;
    border-right:0;
    border-bottom:1px solid color-mix(in srgb,var(--line) 80%,transparent)!important;
  }
  .category-trending a:last-child{border-bottom:0!important;padding-bottom:0!important}
  .category-weekly{grid-template-columns:auto minmax(0,1fr)}
  .category-weekly form{grid-template-columns:1fr}
}
