/* Open Library Theme — Issue Section Accordion — 2026-08-29 v1
 * Applies to journal Home/Current/issue detail TOCs.
 */
:root{
  --ol54-red:#dc2f3a;
  --ol54-red-deep:#b91f2a;
  --ol54-red-soft:#fff3f4;
  --ol54-line:#e7e9ee;
  --ol54-text:#18202d;
  --ol54-muted:#667085;
}

html body.openlib-journal-page .obj_issue_toc .section{
  overflow:hidden!important;
  margin:0 0 14px!important;
  border:1px solid var(--ol54-line)!important;
  border-radius:13px!important;
  background:#fff!important;
  box-shadow:0 4px 14px rgba(31,38,49,.035)!important;
}

/* Replace old section-banner look with a proper clickable accordion header. */
html body.openlib-journal-page .obj_issue_toc .section > h2.openlib-accordion-heading,
html body.openlib-journal-page .obj_issue_toc .section > h3.openlib-accordion-heading,
html body.openlib-journal-page .obj_issue_toc .section > h4.openlib-accordion-heading{
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-left:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

html body.openlib-journal-page .openlib_section_toggle{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  min-height:48px!important;
  margin:0!important;
  padding:11px 14px!important;
  border:0!important;
  border-left:4px solid var(--ol54-red)!important;
  border-radius:0!important;
  background:linear-gradient(90deg,var(--ol54-red-soft) 0%,#fff 78%)!important;
  color:var(--ol54-red-deep)!important;
  font:inherit!important;
  text-align:left!important;
  cursor:pointer!important;
  box-shadow:none!important;
}
html body.openlib-journal-page .openlib_section_toggle:hover,
html body.openlib-journal-page .openlib_section_toggle:focus-visible{
  background:linear-gradient(90deg,#ffe9eb 0%,#fff8f8 82%)!important;
  outline:none!important;
}
html body.openlib-journal-page .openlib_section_toggle:focus-visible{
  box-shadow:inset 0 0 0 2px rgba(220,47,58,.22)!important;
}
html body.openlib-journal-page .openlib_section_toggle__title{
  min-width:0!important;
  color:inherit!important;
  font-size:13.5px!important;
  font-weight:850!important;
  line-height:1.35!important;
}
html body.openlib-journal-page .openlib_section_toggle__count{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:24px!important;
  padding:0 8px!important;
  border:1px solid #f1c3c7!important;
  border-radius:999px!important;
  background:#fff!important;
  color:var(--ol54-red-deep)!important;
  font-size:10.5px!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
html body.openlib-journal-page .openlib_section_toggle__icon{
  position:relative!important;
  display:block!important;
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  border-radius:50%!important;
  background:var(--ol54-red)!important;
}
html body.openlib-journal-page .openlib_section_toggle__icon::before,
html body.openlib-journal-page .openlib_section_toggle__icon::after{
  content:""!important;
  position:absolute!important;
  top:50%!important;
  left:50%!important;
  width:8px!important;
  height:1.5px!important;
  border-radius:2px!important;
  background:#fff!important;
  transform:translate(-50%,-50%)!important;
  transition:transform .18s ease,opacity .18s ease!important;
}
html body.openlib-journal-page .openlib_section_toggle__icon::after{
  transform:translate(-50%,-50%) rotate(90deg)!important;
}
html body.openlib-journal-page .openlib_section_toggle[aria-expanded="true"] .openlib_section_toggle__icon::after{
  opacity:0!important;
  transform:translate(-50%,-50%) rotate(0deg)!important;
}

html body.openlib-journal-page .obj_issue_toc .section > .articles.openlib_section_panel{
  margin:0!important;
  padding:2px 14px 4px!important;
  border:0!important;
  background:#fff!important;
}
html body.openlib-journal-page .obj_issue_toc .section > .articles.openlib_section_panel[hidden]{
  display:none!important;
}
html body.openlib-journal-page .obj_issue_toc .section > .articles.openlib_section_panel > li{
  padding:15px 0!important;
}
html body.openlib-journal-page .obj_issue_toc .section > .articles.openlib_section_panel > li + li{
  border-top:1px solid #edf0f3!important;
}
html body.openlib-journal-page .obj_issue_toc .section > .articles.openlib_section_panel > li:last-child{
  border-bottom:0!important;
}

/* dark mode */
html[data-openlib-color-mode="dark"] body.openlib-journal-page .obj_issue_toc .section{
  border-color:#34404d!important;
  background:#161d27!important;
  box-shadow:none!important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_section_toggle{
  border-left-color:#ed4652!important;
  background:linear-gradient(90deg,#332126 0%,#1a212b 82%)!important;
  color:#ff8f98!important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_section_toggle:hover,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_section_toggle:focus-visible{
  background:linear-gradient(90deg,#3b252b 0%,#202832 82%)!important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_section_toggle__count{
  border-color:#604048!important;
  background:#211a1f!important;
  color:#ff9aa2!important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_section_toggle__icon{
  background:#ed4652!important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .obj_issue_toc .section > .articles.openlib_section_panel{
  background:#161d27!important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .obj_issue_toc .section > .articles.openlib_section_panel > li + li{
  border-top-color:#303a47!important;
}

@media(max-width:640px){
  html body.openlib-journal-page .openlib_section_toggle{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px!important;
    padding:10px 11px!important;
  }
  html body.openlib-journal-page .openlib_section_toggle__count{display:none!important;}
  html body.openlib-journal-page .openlib_section_toggle__title{font-size:12.5px!important;}
  html body.openlib-journal-page .obj_issue_toc .section > .articles.openlib_section_panel{padding:0 10px 3px!important;}
}
