/* Open Library Publications — Unified Red Clean — 2026-08-28 v3
 * Final polish for a consistent, dominant-red, minimal interface.
 */

:root{
  --olu-red-900:#8b111b;
  --olu-red-800:#a91823;
  --olu-red-700:#c51f2a;
  --olu-red-600:#dc2833;
  --olu-red-50:#fff7f8;
  --olu-line:#ead5d8;
  --olu-ink:#151b27;
  --olu-muted:#667085;
}

/* ===== 1. UNIFIED TOP BAR: brand left, navigation center, account right ===== */
html body .openlib_site_header__utility,
html body .openlib_journal_header__utility,
html[data-openlib-color-mode="dark"] body .openlib_site_header__utility,
html[data-openlib-color-mode="dark"] body .openlib_journal_header__utility{
  padding:0!important;
  border:0!important;
  background:linear-gradient(100deg,#8b111b 0%,#b91c27 52%,#dc303b 100%)!important;
  box-shadow:none!important;
}
html body .openlib_site_header__utility_inner--unified,
html body .openlib_journal_header__utility_inner--unified{
  min-height:64px!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:24px!important;
}
html body .openlib_journal_header__utility_inner--unified{
  grid-template-columns:minmax(0,1fr) auto!important;
}
html body .openlib_site_brand_inline{
  display:inline-flex!important;
  align-items:center!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  color:#fff!important;
  font-size:17px!important;
  font-weight:850!important;
  letter-spacing:-.02em!important;
  line-height:1.2!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}
html body .openlib_site_brand_inline:hover,
html body .openlib_site_brand_inline:focus{color:#fff!important;opacity:.94!important;text-decoration:none!important;}
html body .openlib_site_nav_menu--inline{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
}
html body .openlib_site_nav_menu--inline .pkp_navigation_primary{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  margin:0!important;
}
html body .openlib_site_nav_menu--inline .pkp_navigation_primary > li > a{
  padding:8px 11px!important;
  color:rgba(255,255,255,.90)!important;
  font-size:12.5px!important;
  font-weight:750!important;
  text-decoration:none!important;
}
html body .openlib_site_header__right,
html body .openlib_journal_header__account{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  align-self:center!important;
  margin:0!important;
}

/* Remove old separate white brand row if stale markup/CSS is still present. */
html body .openlib_site_header__main{display:none!important;}

/* ===== 2. AUTH CONTROL: same radius everywhere, no sharp cut corners ===== */
html body .openlib_account_cluster--guest,
html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  height:44px!important;
  min-height:44px!important;
  padding:4px!important;
  margin:0!important;
  border:1px solid rgba(255,255,255,.74)!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:0 8px 20px rgba(75,7,13,.16)!important;
  overflow:hidden!important;
}
html body .openlib_account_cluster--guest > *:before,
html body .openlib_account_cluster--guest > *:after{display:none!important;content:none!important;}
html body .openlib_account_cluster--guest > .openlib_color_mode_toggle,
html body .openlib_account_cluster--guest > .openlib_auth_switch__item{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  box-sizing:border-box!important;
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
  border:0!important;
  border-radius:10px!important;
  box-shadow:none!important;
  line-height:1!important;
  text-decoration:none!important;
}
html body .openlib_account_cluster--guest > .openlib_color_mode_toggle{
  width:36px!important;
  min-width:36px!important;
  padding:0!important;
  background:#fff4f5!important;
  color:var(--olu-red-800)!important;
}
html body .openlib_account_cluster--guest > .openlib_color_mode_toggle .fa{
  position:static!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:14px!important;
  height:14px!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  color:inherit!important;
  font-size:14px!important;
  line-height:1!important;
}
html body .openlib_account_cluster--guest > .openlib_auth_switch__item{
  min-width:70px!important;
  padding:0 16px!important;
  background:transparent!important;
  color:#861720!important;
  font-size:13px!important;
  font-weight:800!important;
}
html body .openlib_account_cluster--guest > .openlib_auth_switch__item span{display:block!important;line-height:1!important;}
html body .openlib_account_cluster--guest > .openlib_auth_switch__item--register,
html body .openlib_account_cluster--guest > .openlib_auth_switch__item.is-active,
html body.pkp_page_login .openlib_account_cluster--guest > .openlib_auth_switch__item--login,
html body.pkp_page_user.pkp_op_register .openlib_account_cluster--guest > .openlib_auth_switch__item--register{
  background:linear-gradient(135deg,#b81924,#dc2934)!important;
  color:#fff!important;
  box-shadow:0 5px 12px rgba(156,20,29,.18)!important;
}
html body.pkp_page_login .openlib_account_cluster--guest > .openlib_auth_switch__item--register,
html body.pkp_page_user.pkp_op_register .openlib_account_cluster--guest > .openlib_auth_switch__item--login{
  background:transparent!important;
  color:#861720!important;
  box-shadow:none!important;
}

/* ===== 3. SEARCH: no decorative icon chip, clean inner geometry ===== */
html body.openlib-site-index .openlib_search_panel--primary,
html body.openlib-site-index.openlib-search-is-fixed .openlib_search_panel--primary{
  padding:12px!important;
  border:0!important;
  border-radius:18px!important;
  background:linear-gradient(105deg,#86111a 0%,#bd1d28 54%,#df3843 100%)!important;
  box-shadow:0 16px 36px rgba(106,13,21,.18)!important;
}
html body.openlib-site-index .openlib_discovery__query{
  height:52px!important;
  border:0!important;
  border-radius:13px!important;
  background:#fff!important;
  overflow:hidden!important;
}
html body.openlib-site-index .openlib_discovery__query > .fa{display:none!important;}
html body.openlib-site-index .openlib_discovery__query input[type="search"]{
  height:52px!important;
  padding:0 18px!important;
  border:0!important;
  border-radius:13px!important;
  background:#fff!important;
  line-height:52px!important;
}
html body.openlib-site-index .openlib_discovery__form > select,
html body.openlib-site-index .openlib_discovery__form > button{
  height:52px!important;
  min-height:52px!important;
  border:0!important;
  border-radius:13px!important;
  background:#fff!important;
}
html body.openlib-site-index .openlib_discovery__form > button{
  color:#9b1721!important;
  font-weight:850!important;
}
html body.openlib-site-index .openlib_discovery__form > button .fa{display:none!important;}

/* Search results page icons are decorative too; hide them and normalize padding. */
html body .openlib_search_form__query > .fa,
html body .openlib_search_form__submit .fa{display:none!important;}
html body .openlib_search_form__query input{padding-left:16px!important;}

/* ===== 4. FILTER: white, iconless, centered text ===== */
html body.openlib-site-index .openlib_journal_filter{
  height:48px!important;
  border:1px solid #e6b5ba!important;
  border-radius:13px!important;
  background:#fff!important;
  overflow:hidden!important;
  box-shadow:0 5px 15px rgba(95,23,29,.045)!important;
}
html body.openlib-site-index .openlib_journal_filter > .fa{display:none!important;}
html body.openlib-site-index .openlib_journal_filter input{
  height:46px!important;
  padding:0 16px!important;
  border:0!important;
  border-radius:13px!important;
  background:#fff!important;
  line-height:46px!important;
}

/* ===== 5. JOURNAL CARD ACTIONS: white, equal, quiet ===== */
html body.openlib-site-index .openlib_journal_footer{
  padding:12px 18px 14px!important;
  border:0!important;
  border-top:1px dashed #dfafb4!important;
  background:#fff!important;
}
html body.openlib-site-index .openlib_journal_actions{gap:10px!important;}
html body.openlib-site-index .openlib_journal_actions a,
html body.openlib-site-index .openlib_journal_actions .home a,
html body.openlib-site-index .openlib_journal_actions .current a{
  min-height:40px!important;
  border:1px solid #e3a7ad!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#961720!important;
  box-shadow:none!important;
}
html body.openlib-site-index .openlib_journal_actions a .fa{display:none!important;}
html body.openlib-site-index .openlib_journal_actions a:hover,
html body.openlib-site-index .openlib_journal_actions a:focus{
  border-color:#c51f2a!important;
  background:#fff7f8!important;
  color:#86111a!important;
}

/* ===== 6. DARK MODE ===== */
html[data-openlib-color-mode="dark"] body .openlib_account_cluster--guest{background:#fff!important;}
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_discovery__query,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_discovery__query 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-index .openlib_discovery__form > button{
  background:#191d25!important;
  color:#f7f8fb!important;
}
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_filter,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_filter input{
  background:#191d25!important;
  color:#f7f8fb!important;
  border-color:#704149!important;
}
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_footer{background:#191d25!important;}
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_actions .home a,
html[data-openlib-color-mode="dark"] body.openlib-site-index .openlib_journal_actions .current a{
  background:#1d222b!important;
  color:#ffc0c5!important;
  border-color:#704149!important;
}

/* ===== 7. RESPONSIVE ===== */
@media (max-width:900px){
  html body .openlib_site_header__utility_inner--unified{grid-template-columns:minmax(0,1fr) auto!important;gap:14px!important;}
  html body .openlib_site_nav_menu--inline{display:none!important;}
  html body .openlib_site_brand_inline{font-size:15px!important;white-space:normal!important;}
}
@media (max-width:600px){
  html body .openlib_site_header__utility_inner--unified,
  html body .openlib_journal_header__utility_inner--unified{min-height:58px!important;gap:10px!important;}
  html body .openlib_site_brand_inline{font-size:13px!important;max-width:48vw!important;}
  html body .openlib_account_cluster--guest{height:40px!important;min-height:40px!important;padding:3px!important;gap:2px!important;border-radius:12px!important;}
  html body .openlib_account_cluster--guest > .openlib_color_mode_toggle{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;}
  html body .openlib_account_cluster--guest > .openlib_auth_switch__item{height:32px!important;min-height:32px!important;min-width:0!important;padding:0 10px!important;font-size:12px!important;}
}
