/* Open Library final consolidated revision layer. Loaded last. */
:root{
  --olu-red:#DC2626;
  --olu-red-dark:#B91C1C;
  --olu-red-soft:#FFF1F2;
  --olu-red-line:#FECACA;
  --olu-text:#0F172A;
  --olu-muted:#64748B;
  --olu-line:#E2E8F0;
}

/* ===== Publisher portal: force exactly two journal cards per row ===== */
html body.openlib-site-index .pkp_page_index .journals > ul.openlib_journal_grid.openlib_journal_grid--two,
html body.openlib-site-index #openlib-journals > ul.openlib_journal_grid.openlib_journal_grid--two{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
  width:100%!important;
}
html body.openlib-site-index .openlib_journal_grid--two > .openlib_journal_card{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  flex:initial!important;
}
@media(max-width:820px){
  html body.openlib-site-index .pkp_page_index .journals > ul.openlib_journal_grid.openlib_journal_grid--two,
  html body.openlib-site-index #openlib-journals > ul.openlib_journal_grid.openlib_journal_grid--two{
    grid-template-columns:1fr!important;
  }
}

/* Card accent: red only, no blue/purple/green variants. */
html body.openlib-site-index .openlib_journal_card:before{
  background:#DC2626!important;
  height:3px!important;
}

/* Fallback cover: a new red editorial pattern; acronym only. */
html body.openlib-site-index .openlib_journal_placeholder{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  border:1px solid rgba(127,29,29,.16)!important;
  background:
    radial-gradient(circle at 78% 16%,rgba(255,255,255,.18) 0 14%,transparent 14.5%),
    radial-gradient(circle at 18% 78%,rgba(255,255,255,.10) 0 21%,transparent 21.5%),
    linear-gradient(153deg,transparent 0 54%,rgba(255,255,255,.12) 54.5% 64%,transparent 64.5%),
    linear-gradient(135deg,#7F1D1D 0%,#991B1B 34%,#DC2626 70%,#EF4444 100%)!important;
}
html body.openlib-site-index .openlib_journal_placeholder:before{
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  width:120px!important;
  height:34px!important;
  top:20px!important;
  left:-22px!important;
  right:auto!important;
  bottom:auto!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.06)!important;
  transform:rotate(-24deg)!important;
}
html body.openlib-site-index .openlib_journal_placeholder:after{
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  width:92px!important;
  height:92px!important;
  right:-38px!important;
  bottom:-38px!important;
  left:auto!important;
  top:auto!important;
  border:18px solid rgba(255,255,255,.10)!important;
  border-radius:50%!important;
  background:transparent!important;
  transform:none!important;
}
html body.openlib-site-index .openlib_journal_placeholder strong{
  position:relative!important;
  z-index:2!important;
  color:#fff!important;
  font-size:24px!important;
  font-weight:800!important;
  letter-spacing:.045em!important;
  text-shadow:0 2px 12px rgba(69,10,10,.22)!important;
}

/* ===== Journal detail/home: horizontal banner identity, red accent only ===== */
html body.openlib-journal-page{
  --olj-program-accent:#DC2626!important;
  --olj-program-soft:rgba(220,38,38,.08)!important;
}
html body.openlib-journal-page .openlib_journal_profile.openlib_journal_profile--banner{
  display:block!important;
  position:relative!important;
  margin:0 0 26px!important;
  padding:22px!important;
  overflow:hidden!important;
  border:1px solid #E2E8F0!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 8px 28px rgba(15,23,42,.045)!important;
}
html body.openlib-journal-page .openlib_journal_profile.openlib_journal_profile--banner:before{
  content:""!important;
  position:absolute!important;
  top:0!important;
  right:0!important;
  left:0!important;
  height:4px!important;
  background:#DC2626!important;
}
html body.openlib-journal-page .openlib_journal_profile__media{
  display:block!important;
  width:100%!important;
}
html body.openlib-journal-page .openlib_journal_profile__cover{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:230px!important;
  max-width:none!important;
  margin:0!important;
  padding:10px!important;
  overflow:hidden!important;
  border:2px solid #DC2626!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
}
html body.openlib-journal-page .openlib_journal_profile__cover img{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:100%!important;
  max-height:100%!important;
  margin:0!important;
  border:0!important;
  border-radius:7px!important;
  object-fit:contain!important;
  object-position:center!important;
}
html body.openlib-journal-page .openlib_journal_profile__cover--fallback{
  color:#fff!important;
  background:
    radial-gradient(circle at 82% 22%,rgba(255,255,255,.16) 0 12%,transparent 12.5%),
    linear-gradient(160deg,transparent 0 57%,rgba(255,255,255,.10) 57.5% 65%,transparent 65.5%),
    linear-gradient(135deg,#7F1D1D 0%,#B91C1C 42%,#DC2626 72%,#EF4444 100%)!important;
}
html body.openlib-journal-page .openlib_journal_profile__cover--fallback strong{
  font-size:36px!important;
  font-weight:800!important;
  letter-spacing:.06em!important;
}
html body.openlib-journal-page .openlib_journal_profile__body{
  min-width:0!important;
  padding:20px 4px 2px!important;
}
/* Acronym badge is intentionally not shown on the detail hero; it confused users (eg. EOE). */
html body.openlib-journal-page .openlib_journal_profile__eyebrow{display:none!important;}
html body.openlib-journal-page .openlib_journal_profile h1{
  margin:0 0 12px!important;
  color:#0F172A!important;
  font-size:28px!important;
  line-height:1.25!important;
  font-weight:800!important;
  letter-spacing:-.025em!important;
}
html body.openlib-journal-page .openlib_journal_profile__quicklinks{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  margin-top:17px!important;
}
html body.openlib-journal-page .openlib_journal_profile__quicklinks a{
  min-height:40px!important;
  padding:0 14px!important;
  border:1px solid #D8E0EA!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#334155!important;
  gap:8px!important;
}
html body.openlib-journal-page .openlib_journal_profile__quicklinks a:hover,
html body.openlib-journal-page .openlib_journal_profile__quicklinks a:focus{
  border-color:#DC2626!important;
  color:#DC2626!important;
  background:#FFF1F2!important;
}
html body.openlib-journal-page .openlib_journal_profile__quicklinks .openlib_journal_profile__primary{
  border-color:#DC2626!important;
  background:#DC2626!important;
  color:#fff!important;
}
html body.openlib-journal-page .openlib_journal_profile__quicklinks .openlib_journal_profile__primary:hover,
html body.openlib-journal-page .openlib_journal_profile__quicklinks .openlib_journal_profile__primary:focus{
  border-color:#B91C1C!important;
  background:#B91C1C!important;
  color:#fff!important;
}

/* Current issue / article sections: make each Prodi/section visually unmistakable. */
html body.openlib-journal-page .obj_issue_toc .sections{
  display:block!important;
  margin-top:12px!important;
}
html body.openlib-journal-page .obj_issue_toc .sections > .section{
  margin:0 0 22px!important;
  padding:0 0 10px!important;
  overflow:hidden!important;
  border:1px solid #E2E8F0!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 3px 12px rgba(15,23,42,.025)!important;
}
html body.openlib-journal-page .obj_issue_toc .sections > .section > h2,
html body.openlib-journal-page .obj_issue_toc .sections > .section > h3,
html body.openlib-journal-page .obj_issue_toc .sections > .section > h4{
  position:relative!important;
  margin:0!important;
  padding:13px 16px 13px 18px!important;
  border:0!important;
  border-top:3px solid #DC2626!important;
  border-bottom:1px solid #FECACA!important;
  background:#FFF1F2!important;
  color:#991B1B!important;
  font-size:16px!important;
  line-height:1.35!important;
  font-weight:800!important;
  letter-spacing:-.01em!important;
}
html body.openlib-journal-page .obj_issue_toc .sections > .section > h2:before,
html body.openlib-journal-page .obj_issue_toc .sections > .section > h3:before,
html body.openlib-journal-page .obj_issue_toc .sections > .section > h4:before{
  content:""!important;
  display:inline-block!important;
  width:7px!important;
  height:7px!important;
  margin-right:9px!important;
  border-radius:50%!important;
  background:#DC2626!important;
  vertical-align:2px!important;
}
html body.openlib-journal-page .obj_issue_toc .sections > .section > .cmp_article_list{
  margin:0!important;
  padding:8px 18px 0!important;
  list-style:none!important;
}
html body.openlib-journal-page .obj_issue_toc .sections > .section > .cmp_article_list > li{
  margin:0!important;
  padding:15px 0!important;
  border-top:1px dashed #E2E8F0!important;
}
html body.openlib-journal-page .obj_issue_toc .sections > .section > .cmp_article_list > li:first-child{
  border-top:0!important;
}

/* User dropdown: compact, and numeric dashboard count becomes a real badge. */
html body #navigationUserWrapper .openlib-account-dropdown,
html body #navigationUserWrapper .dropdown-menu{
  width:220px!important;
  min-width:220px!important;
  padding:8px!important;
}
html body #navigationUserWrapper .openlib-account-dropdown a,
html body #navigationUserWrapper .dropdown-menu a{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  min-height:38px!important;
  padding:8px 11px!important;
}
html body #navigationUserWrapper .openlib-account-label{min-width:0!important;}
html body #navigationUserWrapper .openlib-account-count{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:24px!important;
  height:20px!important;
  padding:0 6px!important;
  border-radius:999px!important;
  background:#FFF1F2!important;
  color:#DC2626!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1!important;
}

/* Red focus state is authoritative everywhere. */
html body input:not([type="checkbox"]):not([type="radio"]):focus,
html body input:not([type="checkbox"]):not([type="radio"]):focus-visible,
html body select:focus,
html body select:focus-visible,
html body textarea:focus,
html body textarea:focus-visible,
html body .openlib_journal_filter input:focus,
html body .openlib_discovery__form input:focus,
html body .openlib_discovery__form select:focus,
html body .page_login input:focus,
html body .page_register input:focus{
  border-color:#DC2626!important;
  outline:none!important;
  box-shadow:0 0 0 3px rgba(220,38,38,.14)!important;
}

/* Icon/text spacing: no glued icons. */
html body .openlib_discovery__form button,
html body .openlib_journal_actions a,
html body .openlib_journal_profile__quicklinks a,
html body .openlib_journal_search,
html body .openlib_color_mode_toggle,
html body .openlib_password_toggle{
  column-gap:8px!important;
}

/* Dark mode equivalents. */
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_profile.openlib_journal_profile--banner,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .obj_issue_toc .sections > .section{
  border-color:#334155!important;
  background:#111827!important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_profile__cover{
  border-color:#DC2626!important;
  background:#0F172A!important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .obj_issue_toc .sections > .section > h2,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .obj_issue_toc .sections > .section > h3,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .obj_issue_toc .sections > .section > h4{
  border-bottom-color:#7F1D1D!important;
  background:#2A1215!important;
  color:#FCA5A5!important;
}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .obj_issue_toc .sections > .section > .cmp_article_list > li{
  border-color:#334155!important;
}

@media(max-width:640px){
  html body.openlib-journal-page .openlib_journal_profile.openlib_journal_profile--banner{padding:16px!important;}
  html body.openlib-journal-page .openlib_journal_profile__cover{height:170px!important;}
  html body.openlib-journal-page .openlib_journal_profile__body{padding-top:16px!important;}
  html body.openlib-journal-page .openlib_journal_profile h1{font-size:23px!important;}
  html body.openlib-journal-page .obj_issue_toc .sections > .section > h2,
  html body.openlib-journal-page .obj_issue_toc .sections > .section > h3,
  html body.openlib-journal-page .obj_issue_toc .sections > .section > h4{font-size:14.5px!important;}
}
