/*
 * Open Library Publications — Modern Editorial UI 2026-08-28 v1
 * Final override layer. Designed to be loaded last.
 * Concept: editorial clarity + restrained red accents + strong readable typography.
 */

:root {
  --olx-red: #e3262e;
  --olx-red-deep: #b91c1c;
  --olx-red-soft: #fff1f2;
  --olx-ink: #101828;
  --olx-text: #344054;
  --olx-muted: #667085;
  --olx-soft: #98a2b3;
  --olx-line: #e4e7ec;
  --olx-line-strong: #d0d5dd;
  --olx-canvas: #f7f8fa;
  --olx-surface: #ffffff;
  --olx-surface-2: #fcfcfd;
  --olx-radius: 18px;
  --olx-radius-sm: 12px;
  --olx-shadow: 0 12px 32px rgba(16,24,40,.07);
  --olx-shadow-hover: 0 18px 44px rgba(16,24,40,.11);
  --olx-shell: 1280px;
}

/* ---------- page frame / typography ---------- */
html body {
  background: var(--olx-canvas) !important;
  color: var(--olx-text) !important;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html body .pkp_structure_page {
  display: flex !important;
  min-height: 100vh !important;
  flex-direction: column !important;
  background:
    radial-gradient(circle at 8% 6%, rgba(227,38,46,.045), transparent 24rem),
    var(--olx-canvas) !important;
}

html body .pkp_structure_content {
  width: min(var(--olx-shell), calc(100% - 64px)) !important;
  max-width: var(--olx-shell) !important;
  margin: 0 auto !important;
  padding-top: 38px !important;
  padding-bottom: 54px !important;
  flex: 1 0 auto !important;
}

html body .pkp_structure_main {
  min-width: 0 !important;
}

html body .pkp_structure_main h1,
html body .pkp_structure_main h2,
html body .pkp_structure_main h3,
html body .pkp_structure_main h4 {
  color: var(--olx-ink) !important;
  letter-spacing: -.035em !important;
  font-weight: 800 !important;
}

html body .pkp_structure_main h1 { font-size: clamp(30px, 3vw, 42px) !important; line-height: 1.12 !important; }
html body .pkp_structure_main h2 { font-size: clamp(24px, 2.2vw, 31px) !important; line-height: 1.18 !important; }
html body .pkp_structure_main h3 { font-size: 17px !important; line-height: 1.4 !important; }
html body a { text-underline-offset: 3px; }

/* ---------- site header: calmer, cleaner, editorial ---------- */
html body.openlib-site-page .openlib_site_header,
html body.openlib-site-index .openlib_site_header {
  position: sticky !important;
  top: 0 !important;
  z-index: 500 !important;
  border-top: 0 !important;
  border-bottom: 1px solid rgba(208,213,221,.82) !important;
  background: rgba(255,255,255,.94) !important;
  box-shadow: 0 1px 0 rgba(16,24,40,.02) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html body .openlib_site_header__utility {
  height: 34px !important;
  min-height: 34px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(228,231,236,.8) !important;
  background: transparent !important;
}

html body .openlib_site_header__utility_inner,
html body .openlib_site_header__main_inner,
html body .openlib_site_shell {
  width: min(var(--olx-shell), calc(100% - 64px)) !important;
  max-width: var(--olx-shell) !important;
  margin: 0 auto !important;
}

html body .openlib_site_header__utility_inner {
  height: 34px !important;
}

html body .openlib_site_header__main {
  border: 0 !important;
  background: transparent !important;
}

html body .openlib_site_header__main_inner {
  min-height: 72px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

html body .openlib_site_brand__text {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  color: var(--olx-ink) !important;
  text-decoration: none !important;
}

html body .openlib_site_brand__mark {
  display: inline-flex !important;
  width: 42px !important;
  height: 42px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 13px !important;
  background: linear-gradient(145deg, #ef3340 0%, #c81e2a 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(227,38,46,.20) !important;
  font-size: 17px !important;
}

html body .openlib_site_brand__text strong {
  display: block !important;
  color: var(--olx-ink) !important;
  font-size: 17px !important;
  line-height: 1.2 !important;
  letter-spacing: -.025em !important;
  font-weight: 800 !important;
}

html body .openlib_site_brand__text small {
  display: block !important;
  margin-top: 3px !important;
  color: var(--olx-muted) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
}

html body .openlib_color_mode_toggle {
  display: inline-flex !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #475467 !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.04) !important;
  font-size: 13px !important;
}

html body .openlib_color_mode_toggle:hover,
html body .openlib_color_mode_toggle:focus {
  border-color: #fda4af !important;
  background: #fff7f8 !important;
  color: var(--olx-red) !important;
  outline: none !important;
}

html body .openlib_site_header__account .pkp_navigation_user > li > a {
  color: #344054 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

html body .openlib_site_header__account .pkp_navigation_user > li > a:hover {
  color: var(--olx-red) !important;
}

/* ---------- portal intro: new concept ---------- */
html body.openlib-site-index .openlib_portal_intro {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  gap: 34px !important;
  align-items: end !important;
  margin: 0 0 22px !important;
  padding: 8px 2px 2px !important;
}

html body.openlib-site-index .openlib_portal_intro__eyebrow,
html body.openlib-site-index .openlib_journal_tools__eyebrow,
html body.openlib-site-page .openlib_search_page__eyebrow,
html body.openlib-journal-page .openlib_section_heading__eyebrow {
  display: inline-block !important;
  margin-bottom: 8px !important;
  color: var(--olx-red) !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  letter-spacing: .095em !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
}

html body.openlib-site-index .openlib_portal_intro h1 {
  max-width: 760px !important;
  margin: 0 !important;
  color: var(--olx-ink) !important;
  font-size: clamp(34px, 4vw, 54px) !important;
  line-height: 1.05 !important;
  letter-spacing: -.052em !important;
}

html body.openlib-site-index .openlib_portal_intro p {
  max-width: 720px !important;
  margin: 14px 0 0 !important;
  color: #475467 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
}

html body.openlib-site-index .openlib_portal_intro__badge {
  display: grid !important;
  min-width: 116px !important;
  padding: 18px 20px !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.88) !important;
  box-shadow: 0 8px 24px rgba(16,24,40,.045) !important;
  text-align: center !important;
}

html body.openlib-site-index .openlib_portal_intro__badge .fa { color: var(--olx-red) !important; font-size: 17px !important; }
html body.openlib-site-index .openlib_portal_intro__badge strong { margin-top: 4px; color: var(--olx-ink); font-size: 24px; line-height: 1.1; }
html body.openlib-site-index .openlib_portal_intro__badge small { margin-top: 3px; color: var(--olx-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- global discovery / search command bar ---------- */
html body.openlib-site-index .openlib_search_panel {
  margin: 0 0 38px !important;
  padding: 10px !important;
  overflow: visible !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 17px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 10px 28px rgba(16,24,40,.055) !important;
}

html body.openlib-site-index .openlib_search_panel:before { display: none !important; }

html body.openlib-site-index .openlib_discovery__form {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 240px 165px !important;
  gap: 9px !important;
  align-items: center !important;
}

html body.openlib-site-index .openlib_discovery__query,
html body.openlib-site-page .openlib_search_form__query {
  position: relative !important;
  min-width: 0 !important;
}

html body.openlib-site-index .openlib_discovery__query > .fa,
html body.openlib-site-page .openlib_search_form__query > .fa {
  position: absolute !important;
  top: 50% !important;
  left: 15px !important;
  z-index: 2 !important;
  color: #98a2b3 !important;
  transform: translateY(-50%) !important;
}

html body.openlib-site-index .openlib_discovery__form input[type="search"],
html body.openlib-site-index .openlib_discovery__form select,
html body.openlib-site-index .openlib_discovery__form button,
html body.openlib-site-page .openlib_search_form input,
html body.openlib-site-page .openlib_search_form select,
html body.openlib-site-page .openlib_search_form button {
  box-sizing: border-box !important;
  min-width: 0 !important;
  height: 48px !important;
  border-radius: 11px !important;
  font-family: inherit !important;
  font-size: 13px !important;
}

html body.openlib-site-index .openlib_discovery__form input[type="search"],
html body.openlib-site-index .openlib_discovery__form select,
html body.openlib-site-page .openlib_search_form input,
html body.openlib-site-page .openlib_search_form select {
  border: 1px solid #d0d5dd !important;
  background: #fff !important;
  color: var(--olx-ink) !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.02) !important;
}

html body.openlib-site-index .openlib_discovery__form input[type="search"],
html body.openlib-site-page .openlib_search_form__query input {
  width: 100% !important;
  padding-left: 42px !important;
}

html body.openlib-site-index .openlib_discovery__form button,
html body.openlib-site-page .openlib_search_form__submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 1px solid var(--olx-red) !important;
  background: var(--olx-red) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(227,38,46,.16) !important;
  font-weight: 800 !important;
}

html body.openlib-site-index .openlib_discovery__form button:hover,
html body.openlib-site-page .openlib_search_form__submit:hover {
  border-color: var(--olx-red-deep) !important;
  background: var(--olx-red-deep) !important;
  transform: translateY(-1px);
}

html body.openlib-site-index .openlib_discovery__meta {
  display: flex !important;
  gap: 18px !important;
  margin: 9px 4px 0 !important;
  color: var(--olx-muted) !important;
  font-size: 11px !important;
}

/* ---------- browse publications ---------- */
html body.openlib-site-index .openlib_journal_tools {
  margin-bottom: 16px !important;
  padding-bottom: 15px !important;
  border-bottom: 1px solid var(--olx-line) !important;
}

html body.openlib-site-index .openlib_journal_tools h2 {
  margin: 0 !important;
  font-size: 27px !important;
}

html body.openlib-site-index .openlib_journal_count {
  margin: 5px 0 0 !important;
  color: var(--olx-muted) !important;
  font-size: 12px !important;
}

html body.openlib-site-index .openlib_journal_filter {
  min-width: 280px !important;
  height: 44px !important;
  border: 1px solid var(--olx-line-strong) !important;
  border-radius: 11px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.02) !important;
}

html body.openlib-site-index .openlib_journal_filter input {
  color: var(--olx-ink) !important;
  font-size: 12.5px !important;
}

html body.openlib-site-index .openlib_journal_grid,
html body.openlib-site-index .openlib_journal_grid.openlib_journal_grid--two {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: 18px !important;
}

html body.openlib-site-index .openlib_journal_card {
  position: relative !important;
  min-height: 300px !important;
  overflow: hidden !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 7px 22px rgba(16,24,40,.045) !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease !important;
}

html body.openlib-site-index .openlib_journal_card:before {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #b91c1c 0%, #e3262e 50%, #fb7185 100%) !important;
  content: "" !important;
}

html body.openlib-site-index .openlib_journal_card:hover {
  border-color: #fda4af !important;
  box-shadow: var(--olx-shadow-hover) !important;
  transform: translateY(-3px) !important;
}

html body.openlib-site-index .openlib_journal_main {
  display: grid !important;
  grid-template-columns: 112px minmax(0,1fr) !important;
  gap: 18px !important;
  padding: 18px !important;
}

html body.openlib-site-index .openlib_journal_media,
html body.openlib-site-index .openlib_journal_media a {
  width: 112px !important;
  height: 158px !important;
}

html body.openlib-site-index .openlib_journal_media img {
  width: 112px !important;
  max-width: 112px !important;
  height: 158px !important;
  max-height: 158px !important;
  object-fit: cover !important;
  border: 1px solid #e4e7ec !important;
  border-radius: 10px !important;
  background: #f2f4f7 !important;
  box-shadow: 0 7px 18px rgba(16,24,40,.08) !important;
}

html body.openlib-site-index .openlib_journal_content h3 {
  margin: 0 0 7px !important;
  font-size: 16px !important;
  line-height: 1.42 !important;
}

html body.openlib-site-index .openlib_journal_content h3 a {
  color: var(--olx-ink) !important;
  text-decoration: none !important;
}

html body.openlib-site-index .openlib_journal_content h3 a:hover { color: var(--olx-red) !important; }

html body.openlib-site-index .openlib_journal_slug {
  display: inline-flex !important;
  margin-bottom: 9px !important;
  padding: 3px 9px !important;
  border: 1px solid #fecdd3 !important;
  border-radius: 999px !important;
  background: #fff7f8 !important;
  color: #c81e2a !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
}

html body.openlib-site-index .openlib_journal_content .description,
html body.openlib-site-index .openlib_journal_content .description p {
  margin: 0 !important;
  color: #475467 !important;
  font-size: 12.5px !important;
  line-height: 1.7 !important;
}

html body.openlib-site-index .openlib_journal_footer {
  margin-top: auto !important;
  padding: 11px 18px 15px !important;
  border-top: 1px solid #f2f4f7 !important;
  background: #fcfcfd !important;
}

html body.openlib-site-index .openlib_journal_actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 9px !important;
}

html body.openlib-site-index .openlib_journal_actions a {
  min-height: 40px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

html body.openlib-site-index .openlib_journal_actions .home a {
  border-color: var(--olx-red) !important;
  background: var(--olx-red) !important;
  color: #fff !important;
}

html body.openlib-site-index .openlib_journal_actions .current a {
  border-color: var(--olx-line-strong) !important;
  background: #fff !important;
  color: #344054 !important;
}

/* ---------- search results page ---------- */
html body.openlib-site-page .openlib_search_page {
  max-width: 1180px !important;
  margin: 0 auto !important;
}

html body.openlib-site-page .openlib_search_page__heading {
  margin-bottom: 20px !important;
}

html body.openlib-site-page .openlib_search_page__heading h1 {
  margin: 0 !important;
}

html body.openlib-site-page .openlib_search_page__heading p {
  margin: 9px 0 0 !important;
  color: #475467 !important;
  font-size: 14px !important;
}

html body.openlib-site-page .openlib_search_form {
  margin-bottom: 34px !important;
  padding: 12px !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(16,24,40,.045) !important;
}

html body.openlib-site-page .openlib_search_form__primary.has_journal_filter {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 240px 145px !important;
  gap: 9px !important;
}

html body.openlib-site-page .openlib_search_advanced {
  margin-top: 10px !important;
  padding: 10px 4px 0 !important;
  border-top: 1px solid #f2f4f7 !important;
}

html body.openlib-site-page .openlib_search_results_header {
  align-items: end !important;
  margin-bottom: 14px !important;
  padding-bottom: 13px !important;
  border-bottom: 1px solid var(--olx-line) !important;
}

html body.openlib-site-page .openlib_search_results_count {
  padding: 7px 10px !important;
  border: 1px solid #fecdd3 !important;
  border-radius: 999px !important;
  background: #fff7f8 !important;
  color: #c81e2a !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
}

html body.openlib-site-page .openlib_search_results {
  gap: 12px !important;
}

html body.openlib-site-page .openlib_search_results .obj_article_summary {
  padding: 18px 20px 18px 22px !important;
  overflow: hidden !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(16,24,40,.035) !important;
}

html body.openlib-site-page .openlib_search_results .obj_article_summary:before {
  top: 0 !important;
  bottom: 0 !important;
  width: 3px !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, #b91c1c, #fb7185) !important;
}

html body.openlib-site-page .openlib_search_results .obj_article_summary .title {
  font-size: 15.5px !important;
  line-height: 1.5 !important;
}

html body.openlib-site-page .openlib_search_results .obj_article_summary .meta,
html body.openlib-site-page .openlib_search_results .obj_article_summary .authors {
  color: #667085 !important;
  font-size: 11.5px !important;
}

/* ---------- authentication: completely different split-panel approach ---------- */
html body.openlib-site-page.pkp_page_login .pkp_structure_content {
  display: flex !important;
  width: min(1120px, calc(100% - 64px)) !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 42px !important;
  padding-bottom: 42px !important;
}

html body.openlib-site-page .page_login {
  display: grid !important;
  width: min(900px, 100%) !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  grid-template-columns: 38% minmax(0,1fr) !important;
  grid-template-areas:
    "visual title"
    "visual note"
    "visual form" !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 22px 60px rgba(16,24,40,.10) !important;
}

html body.openlib-site-page .page_login:before {
  grid-area: visual !important;
  display: flex !important;
  min-height: 510px !important;
  padding: 34px !important;
  align-items: flex-end !important;
  background:
    radial-gradient(circle at 76% 18%, rgba(255,255,255,.24), transparent 9rem),
    linear-gradient(155deg, #9f1239 0%, #dc2626 55%, #fb7185 120%) !important;
  color: #fff !important;
  content: "OPEN LIBRARY\A PUBLICATIONS" !important;
  white-space: pre-line !important;
  font-size: 29px !important;
  line-height: 1.05 !important;
  letter-spacing: -.045em !important;
  font-weight: 800 !important;
}

html body.openlib-site-page .page_login > h1 {
  grid-area: title !important;
  margin: 0 !important;
  padding: 52px 48px 0 !important;
  text-align: left !important;
  font-size: 31px !important;
}

html body.openlib-site-page .page_login > p {
  grid-area: note !important;
  margin: 7px 0 0 !important;
  padding: 0 48px !important;
  color: var(--olx-muted) !important;
  text-align: left !important;
  font-size: 11.5px !important;
}

html body.openlib-site-page .page_login .login {
  grid-area: form !important;
  max-width: none !important;
  margin: 22px 0 0 !important;
  padding: 0 48px 52px !important;
}

html body.openlib-site-page .page_login .fields > div {
  padding-bottom: 17px !important;
}

html body.openlib-site-page .page_login .label,
html body.openlib-site-page .page_register .label {
  margin-bottom: 7px !important;
  color: #344054 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

html body.openlib-site-page .page_login input[type="text"],
html body.openlib-site-page .page_login input[type="password"],
html body.openlib-site-page .page_register input:not([type="checkbox"]):not([type="radio"]),
html body.openlib-site-page .page_register select,
html body.openlib-site-page .page_register textarea {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 48px !important;
  padding: 10px 13px !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: var(--olx-ink) !important;
  font-family: inherit !important;
  font-size: 13px !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.02) !important;
}

html body.openlib-site-page .page_login input:focus,
html body.openlib-site-page .page_register input:focus,
html body.openlib-site-page .page_register select:focus,
html body.openlib-site-page .page_register textarea:focus {
  border-color: #f87171 !important;
  outline: 3px solid rgba(227,38,46,.08) !important;
}

html body.openlib-site-page .page_login .password a {
  margin-top: 7px !important;
  color: var(--olx-red) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

html body.openlib-site-page .page_login .remember label {
  color: #475467 !important;
  font-size: 11.5px !important;
}

html body.openlib-site-page .page_login .buttons {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-top: 8px !important;
}

html body.openlib-site-page .page_login .buttons button,
html body.openlib-site-page .page_login .buttons a {
  height: 44px !important;
  border-radius: 11px !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
}

/* ---------- register: spacious form workspace ---------- */
html body.openlib-site-page .page_register {
  max-width: 1040px !important;
  margin: 0 auto !important;
  padding: 36px 40px !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(16,24,40,.075) !important;
}

html body.openlib-site-page .page_register > h1 { margin-bottom: 7px !important; }
html body.openlib-site-page .page_register > p { color: var(--olx-muted) !important; font-size: 12px !important; }

html body.openlib-site-page .page_register fieldset {
  margin: 0 0 22px !important;
  padding: 22px !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 15px !important;
  background: #fcfcfd !important;
}

html body.openlib-site-page .page_register fieldset > legend {
  padding: 0 8px !important;
  background: #fff !important;
  color: var(--olx-ink) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body.openlib-site-page .page_register .context_optin .contexts > li {
  border-color: var(--olx-line) !important;
  background: #fff !important;
}

/* ---------- journal pages ---------- */
html body.openlib-journal-page .openlib_journal_header {
  border-top: 0 !important;
  border-bottom: 1px solid var(--olx-line) !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 1px 0 rgba(16,24,40,.02) !important;
}

html body.openlib-journal-page .openlib_journal_header__utility {
  min-height: 34px !important;
  border-color: var(--olx-line) !important;
  background: transparent !important;
}

html body.openlib-journal-page .openlib_journal_header__identity {
  background: #fff !important;
}

html body.openlib-journal-page .openlib_journal_header__identity_inner {
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

html body.openlib-journal-page .openlib_back_publications {
  border-color: #fecdd3 !important;
  border-radius: 999px !important;
  background: #fff7f8 !important;
  color: #c81e2a !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
}

html body.openlib-journal-page .openlib_journal_brand__title {
  color: var(--olx-ink) !important;
  font-size: clamp(25px, 2.6vw, 36px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.04em !important;
  font-weight: 800 !important;
}

html body.openlib-journal-page .openlib_journal_header__navrow {
  border-color: var(--olx-line) !important;
  background: #fcfcfd !important;
}

html body.openlib-journal-page .openlib_journal_nav a,
html body.openlib-journal-page .openlib_journal_search {
  color: #344054 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

html body.openlib-journal-page .openlib_journal_nav a:hover,
html body.openlib-journal-page .openlib_journal_nav a[aria-current="page"],
html body.openlib-journal-page .openlib_journal_search:hover {
  color: var(--olx-red) !important;
}

html body.openlib-journal-page .openlib_journal_profile.openlib_journal_profile--banner {
  display: grid !important;
  grid-template-columns: 170px minmax(0,1fr) !important;
  gap: 28px !important;
  margin-bottom: 28px !important;
  padding: 24px !important;
  overflow: hidden !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 10px 30px rgba(16,24,40,.05) !important;
}

html body.openlib-journal-page .openlib_journal_profile.openlib_journal_profile--banner:before {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 4px !important;
  height: 100% !important;
  background: linear-gradient(180deg, #b91c1c, #fb7185) !important;
  content: "" !important;
}

html body.openlib-journal-page .openlib_journal_profile__cover {
  border-radius: 14px !important;
  background: #f2f4f7 !important;
  box-shadow: 0 8px 20px rgba(16,24,40,.08) !important;
}

html body.openlib-journal-page .openlib_current_issue_panel,
html body.openlib-journal-page .openlib_additional_content_panel {
  margin-top: 22px !important;
  padding: 24px !important;
  border: 1px solid var(--olx-line) !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(16,24,40,.04) !important;
}

html body.openlib-journal-page .obj_issue_toc .sections > .section,
html body.openlib-journal-page .obj_issue_toc > .section {
  border-color: var(--olx-line) !important;
}

/* ---------- footer ---------- */
html body .pkp_structure_footer_wrapper {
  margin-top: auto !important;
  flex: 0 0 auto !important;
}

html body .openlib_site_footer,
html body .openlib_journal_footer_global {
  position: relative !important;
  border-top: 0 !important;
  background: #101828 !important;
  color: #d0d5dd !important;
}

html body .openlib_site_footer:before,
html body .openlib_journal_footer_global:before {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #7f1d1d 0%, #dc2626 52%, #fb7185 100%) !important;
  content: "" !important;
}

html body .openlib_site_footer__inner,
html body .openlib_site_footer__bottom,
html body .openlib_journal_footer_global .pkp_structure_footer {
  width: min(var(--olx-shell), calc(100% - 64px)) !important;
  max-width: var(--olx-shell) !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

html body .openlib_site_footer__inner { padding-top: 28px !important; padding-bottom: 20px !important; }
html body .openlib_site_footer__brand_text strong { color: #fff !important; font-size: 14px !important; }
html body .openlib_site_footer__brand_text span { color: #98a2b3 !important; font-size: 11px !important; }
html body .openlib_site_footer__links a,
html body .openlib_journal_footer_global__meta a { color: #d0d5dd !important; font-size: 11px !important; }
html body .openlib_site_footer__links a:hover,
html body .openlib_journal_footer_global__meta a:hover { color: #fff !important; }
html body .openlib_site_footer__bottom { border-color: #344054 !important; color: #98a2b3 !important; font-size: 10px !important; }

/* ---------- dark mode ---------- */
html[data-openlib-color-mode="dark"] body {
  --olx-ink: #f9fafb;
  --olx-text: #d0d5dd;
  --olx-muted: #98a2b3;
  --olx-soft: #667085;
  --olx-line: #273244;
  --olx-line-strong: #344054;
  --olx-canvas: #0b1220;
  --olx-surface: #111827;
  --olx-surface-2: #0f172a;
  background: #0b1220 !important;
  color: #d0d5dd !important;
}

html[data-openlib-color-mode="dark"] body .pkp_structure_page {
  background:
    radial-gradient(circle at 8% 6%, rgba(244,63,94,.06), transparent 26rem),
    #0b1220 !important;
}

html[data-openlib-color-mode="dark"] body.openlib-site-page .openlib_site_header,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_site_header,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_header,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_header__identity {
  border-color: #273244 !important;
  background: rgba(15,23,42,.95) !important;
}

html[data-openlib-color-mode="dark"] body .openlib_site_header__utility,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_header__utility,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_header__navrow {
  border-color: #273244 !important;
  background: #0f172a !important;
}

html[data-openlib-color-mode="dark"] body .openlib_site_brand__text strong,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_brand__title,
html[data-openlib-color-mode="dark"] body .pkp_structure_main h1,
html[data-openlib-color-mode="dark"] body .pkp_structure_main h2,
html[data-openlib-color-mode="dark"] body .pkp_structure_main h3,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_content h3 a {
  color: #f9fafb !important;
}

html[data-openlib-color-mode="dark"] body .openlib_site_brand__text small,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_portal_intro p,
html[data-openlib-color-mode="dark"] body.openlib-site-page .openlib_search_page__heading p,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_content .description,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_content .description p {
  color: #b6c0cf !important;
}

html[data-openlib-color-mode="dark"] body .openlib_color_mode_toggle {
  border-color: #344054 !important;
  background: #111827 !important;
  color: #f9fafb !important;
}

html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_portal_intro__badge,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_search_panel,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_card,
html[data-openlib-color-mode="dark"] body.openlib-site-page .openlib_search_form,
html[data-openlib-color-mode="dark"] body.openlib-site-page .openlib_search_results .obj_article_summary,
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_login,
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_register,
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_register fieldset,
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_register .context_optin .contexts > li,
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 .openlib_current_issue_panel,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_additional_content_panel {
  border-color: #273244 !important;
  background: #111827 !important;
}

html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_footer {
  border-color: #273244 !important;
  background: #0f172a !important;
}

html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_discovery__form input[type="search"],
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_discovery__form select,
html[data-openlib-color-mode="dark"] body.openlib-site-page .openlib_search_form input,
html[data-openlib-color-mode="dark"] body.openlib-site-page .openlib_search_form select,
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_login input[type="text"],
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_login input[type="password"],
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_register input:not([type="checkbox"]):not([type="radio"]),
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_register select,
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_register textarea {
  border-color: #344054 !important;
  background: #0f172a !important;
  color: #f9fafb !important;
  color-scheme: dark !important;
}

html[data-openlib-color-mode="dark"] body select option {
  background: #111827 !important;
  color: #f9fafb !important;
}

html[data-openlib-color-mode="dark"] body.openlib-site-page .page_login .label,
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_register .label,
html[data-openlib-color-mode="dark"] body.openlib-site-page .page_login .remember label,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_nav a,
html[data-openlib-color-mode="dark"] body.openlib-journal-page .openlib_journal_search {
  color: #d0d5dd !important;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  html body .pkp_structure_content,
  html body .openlib_site_header__utility_inner,
  html body .openlib_site_header__main_inner,
  html body .openlib_site_shell,
  html body .openlib_site_footer__inner,
  html body .openlib_site_footer__bottom,
  html body .openlib_journal_footer_global .pkp_structure_footer {
    width: calc(100% - 40px) !important;
  }

  html body.openlib-site-index .openlib_discovery__form,
  html body.openlib-site-page .openlib_search_form__primary.has_journal_filter {
    grid-template-columns: minmax(0,1fr) 210px 145px !important;
  }
}

@media (max-width: 820px) {
  html body { font-size: 14px !important; }
  html body .pkp_structure_content { width: calc(100% - 28px) !important; padding-top: 24px !important; padding-bottom: 34px !important; }
  html body .openlib_site_header__utility_inner,
  html body .openlib_site_header__main_inner,
  html body .openlib_site_shell { width: calc(100% - 28px) !important; }

  html body.openlib-site-index .openlib_portal_intro {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  html body.openlib-site-index .openlib_portal_intro__badge { display: none !important; }
  html body.openlib-site-index .openlib_portal_intro h1 { font-size: 36px !important; }

  html body.openlib-site-index .openlib_discovery__form,
  html body.openlib-site-page .openlib_search_form__primary.has_journal_filter,
  html body.openlib-site-page .openlib_search_form__primary {
    grid-template-columns: 1fr !important;
  }

  html body.openlib-site-index .openlib_journal_grid,
  html body.openlib-site-index .openlib_journal_grid.openlib_journal_grid--two { grid-template-columns: 1fr !important; }

  html body.openlib-site-page .page_login {
    display: block !important;
    max-width: 580px !important;
  }
  html body.openlib-site-page .page_login:before { display: none !important; }
  html body.openlib-site-page .page_login > h1 { padding: 34px 28px 0 !important; }
  html body.openlib-site-page .page_login > p { padding: 0 28px !important; }
  html body.openlib-site-page .page_login .login { padding: 0 28px 34px !important; }

  html body.openlib-site-page .page_register { padding: 28px 22px !important; }
  html body.openlib-journal-page .openlib_journal_profile.openlib_journal_profile--banner {
    grid-template-columns: 125px minmax(0,1fr) !important;
    gap: 18px !important;
  }
}

@media (max-width: 560px) {
  html body .openlib_site_header__main_inner { min-height: 64px !important; }
  html body .openlib_site_brand__mark { width: 38px !important; height: 38px !important; border-radius: 11px !important; }
  html body .openlib_site_brand__text strong { max-width: 220px !important; font-size: 14px !important; }
  html body .openlib_site_brand__text small { display: none !important; }

  html body.openlib-site-index .openlib_portal_intro h1 { font-size: 31px !important; }
  html body.openlib-site-index .openlib_portal_intro p { font-size: 13px !important; }
  html body.openlib-site-index .openlib_search_panel { padding: 9px !important; border-radius: 14px !important; }
  html body.openlib-site-index .openlib_discovery__meta { flex-direction: column !important; gap: 2px !important; }

  html body.openlib-site-index .openlib_journal_tools { align-items: stretch !important; flex-direction: column !important; gap: 12px !important; }
  html body.openlib-site-index .openlib_journal_filter { width: 100% !important; min-width: 0 !important; }
  html body.openlib-site-index .openlib_journal_main { grid-template-columns: 88px minmax(0,1fr) !important; gap: 14px !important; padding: 14px !important; }
  html body.openlib-site-index .openlib_journal_media,
  html body.openlib-site-index .openlib_journal_media a { width: 88px !important; height: 124px !important; }
  html body.openlib-site-index .openlib_journal_media img { width: 88px !important; max-width: 88px !important; height: 124px !important; max-height: 124px !important; }
  html body.openlib-site-index .openlib_journal_content .description,
  html body.openlib-site-index .openlib_journal_content .description p { font-size: 11.5px !important; }

  html body.openlib-site-page .page_login .buttons { grid-template-columns: 1fr !important; }
  html body.openlib-site-page .page_register { padding: 22px 16px !important; border-radius: 16px !important; }
  html body.openlib-site-page .page_register fieldset { padding: 16px !important; }

  html body.openlib-journal-page .openlib_journal_profile.openlib_journal_profile--banner {
    grid-template-columns: 1fr !important;
  }
  html body.openlib-journal-page .openlib_journal_profile__media { max-width: 150px !important; }
}
