/* Open Library refinement layer — loaded last. */
:root{
  --olr-red:#DC2626;
  --olr-red-dark:#B91C1C;
  --olr-red-soft:#FFF1F2;
  --olr-line:#E2E8F0;
  --olr-text:#0F172A;
  --olr-muted:#64748B;
}

/* Portal journal cards: horizontal cards need breathing room, so use two columns. */
html body.openlib-site-index .pkp_page_index .journals > .openlib_journal_grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:18px!important;
}
html body.openlib-site-index .openlib_journal_card{
  border-radius:14px!important;
  border-color:#E2E8F0!important;
  box-shadow:0 4px 16px rgba(15,23,42,.035)!important;
}
html body.openlib-site-index .openlib_journal_card:before{
  top:0!important;right:0!important;bottom:auto!important;left:0!important;
  width:100%!important;height:3px!important;
  background:linear-gradient(90deg,#DC2626,#F87171)!important;
}
html body.openlib-site-index .openlib_journal_main{
  grid-template-columns:96px minmax(0,1fr)!important;
  gap:16px!important;
  min-height:178px!important;
  padding:18px 18px 14px!important;
}
html body.openlib-site-index .openlib_journal_media a{
  width:92px!important;height:128px!important;
  border-radius:9px!important;
}
html body.openlib-site-index .openlib_journal_media img{
  max-width:88px!important;height:122px!important;max-height:122px!important;
}
html body.openlib-site-index .openlib_journal_content h3{
  min-height:0!important;margin:2px 0 8px!important;
  font-size:14px!important;line-height:1.42!important;
}
html body.openlib-site-index .openlib_journal_content .description{
  -webkit-line-clamp:4!important;
  font-size:11.5px!important;line-height:1.6!important;
}
html body.openlib-site-index .openlib_journal_footer{
  padding:12px 18px 16px!important;
}
html body.openlib-site-index .openlib_journal_actions{gap:10px!important;}
html body.openlib-site-index .openlib_journal_actions a{
  min-height:38px!important;padding:0 12px!important;
  border-radius:9px!important;font-size:10.8px!important;
}

/* New no-image cover: editorial geometric pattern, acronym only. */
html body .openlib_journal_placeholder,
html body .openlib_journal_grid > li:nth-child(n) .openlib_journal_placeholder{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  border:0!important;
  background:
    linear-gradient(155deg,transparent 0 55%,rgba(255,255,255,.16) 55.5% 61%,transparent 61.5% 100%),
    linear-gradient(25deg,transparent 0 62%,rgba(127,29,29,.32) 62.5% 74%,transparent 74.5% 100%),
    linear-gradient(135deg,#7F1D1D 0%,#B91C1C 38%,#DC2626 69%,#FB7185 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)!important;
}
html body .openlib_journal_placeholder:before{
  content:""!important;position:absolute!important;z-index:0!important;
  top:-28px!important;right:-34px!important;left:auto!important;bottom:auto!important;
  width:92px!important;height:92px!important;border:18px solid rgba(255,255,255,.10)!important;
  border-radius:50%!important;background:transparent!important;transform:none!important;
}
html body .openlib_journal_placeholder:after{
  content:""!important;position:absolute!important;z-index:0!important;
  left:-32px!important;bottom:-40px!important;right:auto!important;top:auto!important;
  width:112px!important;height:112px!important;border:1px solid rgba(255,255,255,.18)!important;
  border-radius:28px!important;background:rgba(255,255,255,.055)!important;transform:rotate(22deg)!important;
}
html body .openlib_journal_placeholder strong{
  position:relative!important;z-index:2!important;
  color:#fff!important;font-size:25px!important;font-weight:800!important;
  letter-spacing:.045em!important;text-shadow:0 2px 14px rgba(69,10,10,.22)!important;
}

/* User menu: only open on username click, never because of hover/focus leakage. */
html body #navigationUserWrapper{position:relative!important;overflow:visible!important;}
html body #navigationUserWrapper .pkp_navigation_user{overflow:visible!important;}
html body #navigationUserWrapper .pkp_navigation_user > li{position:relative!important;}
html body #navigationUserWrapper .pkp_navigation_user > li > a.openlib-account-trigger{
  display:inline-flex!important;align-items:center!important;gap:6px!important;
  min-height:30px!important;padding:5px 9px!important;border:1px solid transparent!important;
  border-radius:8px!important;text-decoration:none!important;
}
html body #navigationUserWrapper .pkp_navigation_user > li > a.openlib-account-trigger:after{
  content:"\f107";font-family:FontAwesome;font-size:11px;line-height:1;opacity:.65;
  transition:transform .16s ease;
}
html body #navigationUserWrapper .pkp_navigation_user > li.openlib-account-open > a.openlib-account-trigger:after{transform:rotate(180deg);}
html body #navigationUserWrapper .pkp_navigation_user > li > ul,
html body #navigationUserWrapper .openlib-account-dropdown,
html body #navigationUserWrapper .dropdown-menu{
  display:none!important;position:absolute!important;top:calc(100% + 8px)!important;
  right:0!important;left:auto!important;z-index:99999!important;
  width:208px!important;min-width:208px!important;max-width:240px!important;
  margin:0!important;padding:7px!important;border:1px solid #E2E8F0!important;
  border-radius:11px!important;background:#fff!important;
  box-shadow:0 18px 42px rgba(15,23,42,.16)!important;
  list-style:none!important;
}
html body #navigationUserWrapper .pkp_navigation_user > li.openlib-account-open > ul,
html body #navigationUserWrapper .pkp_navigation_user > li.openlib-account-open > .openlib-account-dropdown,
html body #navigationUserWrapper .openlib-account-dropdown.openlib-account-visible{
  display:block!important;
}
html body #navigationUserWrapper .openlib-account-dropdown li,
html body #navigationUserWrapper .dropdown-menu li{display:block!important;margin:0!important;padding:0!important;}
html body #navigationUserWrapper .openlib-account-dropdown a,
html body #navigationUserWrapper .dropdown-menu a{
  display:flex!important;align-items:center!important;min-height:36px!important;
  width:100%!important;padding:8px 10px!important;border-radius:8px!important;
  color:#334155!important;font-size:11.5px!important;font-weight:700!important;
  line-height:1.35!important;text-decoration:none!important;box-sizing:border-box!important;
}
html body #navigationUserWrapper .openlib-account-dropdown a:hover,
html body #navigationUserWrapper .openlib-account-dropdown a:focus,
html body #navigationUserWrapper .dropdown-menu a:hover,
html body #navigationUserWrapper .dropdown-menu a:focus{
  background:#FFF1F2!important;color:#DC2626!important;outline:0!important;
}

/* Journal homepage/detail makeover. */
html body.openlib-journal-page{--olj-program-accent:#DC2626;--olj-program-soft:rgba(220,38,38,.09);}
html body.openlib-journal-page .page_index_journal.openlib_journal_home{
  display:block!important;
}
html body.openlib-journal-page .openlib_journal_profile{
  position:relative;display:grid;grid-template-columns:190px minmax(0,1fr);gap:28px;
  margin:0 0 26px!important;padding:24px!important;overflow:hidden;
  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:before{
  content:"";position:absolute;top:0;left:0;right:0;height:5px;background:var(--olj-program-accent);
}
html body.openlib-journal-page .openlib_journal_profile__media{display:flex;align-items:flex-start;justify-content:center;}
html body.openlib-journal-page .openlib_journal_profile__cover{
  display:flex;align-items:center;justify-content:center;width:174px;height:232px;padding:8px;
  overflow:hidden;border:2px solid #DC2626!important;border-radius:12px;background:#fff!important;
  box-shadow:0 10px 24px rgba(15,23,42,.08)!important;box-sizing:border-box!important;
}
html body.openlib-journal-page .openlib_journal_profile__cover img{
  display:block;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;
}
html body.openlib-journal-page .openlib_journal_profile__cover--fallback{
  padding:0!important;color:#fff!important;
  background:
    linear-gradient(155deg,transparent 0 55%,rgba(255,255,255,.16) 55.5% 61%,transparent 61.5% 100%),
    linear-gradient(135deg,#7F1D1D,#B91C1C 40%,#DC2626 70%,#FB7185)!important;
}
html body.openlib-journal-page .openlib_journal_profile__cover--fallback strong{font-size:30px;font-weight:800;letter-spacing:.05em;}
html body.openlib-journal-page .openlib_journal_profile__body{min-width:0;padding:6px 4px 4px 0;}
html body.openlib-journal-page .openlib_journal_profile__eyebrow{
  display:inline-flex;align-items:center;gap:8px;margin-bottom:11px;padding:5px 10px;
  border:1px solid color-mix(in srgb,var(--olj-program-accent) 28%, #fff);
  border-radius:999px;background:var(--olj-program-soft);color:var(--olj-program-accent);
  font-size:10.5px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;
}
html body.openlib-journal-page .openlib_journal_profile__dot{width:7px;height:7px;border-radius:50%;background:var(--olj-program-accent);}
html body.openlib-journal-page .openlib_journal_profile h1{
  margin:0 0 12px!important;color:#0F172A!important;font-size:27px!important;line-height:1.25!important;font-weight:800!important;letter-spacing:-.025em!important;
}
html body.openlib-journal-page .openlib_journal_profile__description{
  max-width:820px;color:#64748B!important;font-size:13px!important;line-height:1.75!important;
}
html body.openlib-journal-page .openlib_journal_profile__description p{margin:0 0 9px!important;}
html body.openlib-journal-page .openlib_journal_profile__quicklinks{
  display:flex;flex-wrap:wrap;gap:9px;margin-top:18px;
}
html body.openlib-journal-page .openlib_journal_profile__quicklinks a{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:0 13px;
  border:1px solid #D8E0EA;border-radius:9px;background:#fff;color:#334155!important;
  font-size:10.8px;font-weight:800;text-decoration:none!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:var(--olj-program-accent)!important;color:var(--olj-program-accent)!important;background:var(--olj-program-soft)!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;
}
html body.openlib-journal-page .openlib_current_issue_panel,
html body.openlib-journal-page .openlib_additional_content_panel{
  position:relative;margin:0 0 26px!important;padding:24px!important;overflow:hidden;
  border:1px solid #E2E8F0!important;border-radius:15px!important;background:#fff!important;
  box-shadow:0 5px 20px rgba(15,23,42,.035)!important;
}
html body.openlib-journal-page .openlib_current_issue_panel:before{
  content:"";position:absolute;top:0;left:0;width:100%;height:3px;background:var(--olj-program-accent);
}
html body.openlib-journal-page .openlib_section_heading{
  display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:0 0 18px;padding:0 0 15px;border-bottom:1px solid #EEF2F7;
}
html body.openlib-journal-page .openlib_section_heading__eyebrow{display:block;margin-bottom:3px;color:var(--olj-program-accent);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;}
html body.openlib-journal-page .openlib_section_heading h2{margin:0!important;font-size:21px!important;}
html body.openlib-journal-page .openlib_section_heading .current_issue_title{margin:0!important;color:#64748B!important;font-size:11.5px!important;font-weight:700!important;text-align:right;}
html body.openlib-journal-page .openlib_view_all_issues{
  display:inline-flex!important;align-items:center!important;gap:8px!important;margin-top:16px!important;padding:9px 12px!important;
  border:1px solid #D8E0EA!important;border-radius:8px!important;background:#fff!important;color:#334155!important;font-size:10.8px!important;font-weight:800!important;text-decoration:none!important;
}
html body.openlib-journal-page .openlib_view_all_issues:hover,
html body.openlib-journal-page .openlib_view_all_issues:focus{border-color:#DC2626!important;color:#DC2626!important;background:#FFF1F2!important;}

/* Exact red focus border everywhere, including browser focus-visible and autofill. */
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{
  border-color:#DC2626!important;outline:none!important;box-shadow:0 0 0 3px rgba(220,38,38,.14)!important;
}

/* Dark mode. */
html[data-openlib-color-mode="dark"] body #navigationUserWrapper .openlib-account-dropdown,
html[data-openlib-color-mode="dark"] body #navigationUserWrapper .dropdown-menu{border-color:#334155!important;background:#111827!important;}
html[data-openlib-color-mode="dark"] body #navigationUserWrapper .openlib-account-dropdown a,
html[data-openlib-color-mode="dark"] body #navigationUserWrapper .dropdown-menu a{color:#E2E8F0!important;}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_profile,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_current_issue_panel,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_additional_content_panel{border-color:#334155!important;background:#111827!important;}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_profile h1{color:#F8FAFC!important;}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_profile__cover{background:#0F172A!important;}
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_section_heading{border-color:#263244!important;}

@media(max-width:900px){
  html body.openlib-site-index .pkp_page_index .journals > .openlib_journal_grid{grid-template-columns:1fr!important;}
  html body.openlib-journal-page .openlib_journal_profile{grid-template-columns:150px minmax(0,1fr);gap:20px;padding:20px!important;}
  html body.openlib-journal-page .openlib_journal_profile__cover{width:142px;height:194px;}
}
@media(max-width:640px){
  html body.openlib-journal-page .openlib_journal_profile{grid-template-columns:1fr;}
  html body.openlib-journal-page .openlib_journal_profile__media{justify-content:flex-start;}
  html body.openlib-journal-page .openlib_journal_profile h1{font-size:23px!important;}
  html body.openlib-journal-page .openlib_section_heading{align-items:flex-start;flex-direction:column;gap:6px;}
  html body.openlib-journal-page .openlib_section_heading .current_issue_title{text-align:left;}
}
