/* =========================================================
   HKBSR OJS Homepage Theme v50
   Journal: 香港體育研究通報 / Hong Kong Bulletin of Sport Research
   Usage: replace the old Custom Stylesheet with this entire file.
   Focus: clean homepage order; real OJS current issue is placed at bottom.
   ========================================================= */

:root {
  --hkbsr-ink: #0d1b24;
  --hkbsr-text: #273944;
  --hkbsr-muted: #66757e;
  --hkbsr-faint: #8b989f;
  --hkbsr-paper: #f5f9fa;
  --hkbsr-surface: #ffffff;
  --hkbsr-surface-2: #f8fbfb;
  --hkbsr-harbour: #0c405a;
  --hkbsr-harbour-2: #155f7d;
  --hkbsr-teal: #2f7774;
  --hkbsr-bronze: #a77b32;
  --hkbsr-line: rgba(12, 64, 90, .14);
  --hkbsr-line-strong: rgba(12, 64, 90, .24);
  --hkbsr-shadow: 0 16px 40px rgba(13, 27, 36, .10);
  --hkbsr-shadow-soft: 0 8px 22px rgba(13, 27, 36, .065);
}

/* ---------- page base ---------- */
html,
body {
  background-color: var(--hkbsr-paper) !important;
  background-image:
    radial-gradient(circle at 14% 8%, rgba(12, 64, 90, .030), transparent 32%),
    radial-gradient(circle at 86% 16%, rgba(167, 123, 50, .026), transparent 30%),
    linear-gradient(180deg, rgba(250, 252, 252, .995) 0%, rgba(243, 248, 249, .975) 48%, rgba(250, 252, 252, .995) 100%),
    linear-gradient(90deg, rgba(12, 64, 90, .016) 1px, transparent 1px),
    linear-gradient(180deg, rgba(12, 64, 90, .012) 1px, transparent 1px) !important;
  background-size: auto, auto, auto, 96px 96px, 96px 96px !important;
  background-position: center top, center top, center top, center top, center top !important;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat !important;
  color: var(--hkbsr-text) !important;
  font-family: Arial, "Helvetica Neue", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", "PingFang TC", sans-serif !important;
}

body,
p,
li,
a,
span,
div,
button,
input,
select,
textarea {
  text-decoration: none !important;
}

a {
  color: inherit;
  transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

/* ---------- OJS native header repair ---------- */
html body > header,
html body header,
html body .header,
html body #headerNavigationContainer {
  position: relative !important;
  z-index: 9990 !important;
  overflow: visible !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(12, 64, 90, .13) !important;
  background: rgba(250, 252, 253, .96) !important;
  box-shadow: none !important;
  color: var(--hkbsr-ink) !important;
}

html body > header::before,
html body header::before,
html body .header::before,
html body #headerNavigationContainer::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--hkbsr-harbour), var(--hkbsr-teal), var(--hkbsr-bronze));
}

html body > header .upper-header,
html body header .upper-header,
html body .header .upper-header,
html body #headerNavigationContainer .upper-header {
  max-width: 1180px !important;
  min-height: 42px !important;
  margin: 0 auto !important;
  padding: 5px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: transparent !important;
}

html body > header .lower-header,
html body header .lower-header,
html body .header .lower-header,
html body #navigationPrimary,
html body .navbar,
html body .pkp_navigation_primary_wrapper {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

html body > header a,
html body header a,
html body .header a,
html body #headerNavigationContainer a {
  color: var(--hkbsr-ink) !important;
  font-size: 12px !important;
  background: transparent !important;
  border: 0 !important;
  text-shadow: none !important;
}

html body header .dropdown-menu,
html body .header .dropdown-menu,
html body #headerNavigationContainer .dropdown-menu,
html body .pkp_navigation_user_wrapper .dropdown-menu,
html body .pkp_navigation_user .dropdown-menu,
html body .navigationUser .dropdown-menu,
html body .user_navigation .dropdown-menu,
html body header ul.dropdown-menu,
html body header li ul {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 10050 !important;
  min-width: 172px !important;
  max-width: 240px !important;
  margin: 0 !important;
  padding: 7px 0 !important;
  overflow: visible !important;
  background: rgba(255, 255, 255, .99) !important;
  border: 1px solid rgba(12, 64, 90, .22) !important;
  border-top: 3px solid var(--hkbsr-harbour) !important;
  box-shadow: 0 18px 44px rgba(13, 27, 36, .20) !important;
}

html body header .dropdown-menu a,
html body .header .dropdown-menu a,
html body #headerNavigationContainer .dropdown-menu a,
html body .pkp_navigation_user_wrapper .dropdown-menu a,
html body .pkp_navigation_user .dropdown-menu a,
html body .navigationUser .dropdown-menu a,
html body .user_navigation .dropdown-menu a,
html body header li ul a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 34px !important;
  padding: 8px 16px !important;
  white-space: nowrap !important;
  color: var(--hkbsr-ink) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  border: 0 !important;
}

html body header .dropdown-menu a:hover,
html body .header .dropdown-menu a:hover,
html body #headerNavigationContainer .dropdown-menu a:hover,
html body .pkp_navigation_user_wrapper .dropdown-menu a:hover,
html body .pkp_navigation_user .dropdown-menu a:hover,
html body .navigationUser .dropdown-menu a:hover,
html body .user_navigation .dropdown-menu a:hover,
html body header li ul a:hover {
  background: rgba(12, 64, 90, .07) !important;
  color: var(--hkbsr-harbour) !important;
}

html body .page,
html body main.page,
html body .page_index_journal,
html body .container-fluid.container-page,
html body .container-page,
html body .page_index_journal .container,
html body main .container {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

html body .page_index_journal .page-header,
html body .page_index_journal .homepage_image,
html body .homepage_image {
  display: none !important;
}

/* Fallback ordering: when OJS inserts .current_issue before the custom homepage. */
html body .page_index_journal {
  display: flex !important;
  flex-direction: column !important;
}

html body .page_index_journal .hkbsr-home {
  order: 1 !important;
}

html body .page_index_journal > .current_issue {
  order: 2 !important;
}

/* ---------- HKBSR homepage shell ---------- */
.hkbsr-home,
.hkbsr-home * {
  box-sizing: border-box;
}

.hkbsr-home {
  position: relative !important;
  z-index: 1 !important;
  max-width: 1180px;
  margin: 18px auto 58px;
  padding: 0 18px 24px;
  color: var(--hkbsr-text);
}

/* ---------- custom navigation ---------- */
.hkbsr-journal-nav {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: stretch;
  min-height: 66px;
  margin-bottom: 18px;
  border: 1px solid rgba(12, 64, 90, .22);
  background: rgba(255, 255, 255, .985);
  box-shadow: 0 14px 32px rgba(13, 27, 36, .09);
  overflow: visible;
}

.hkbsr-journal-nav::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 4px;
  background: linear-gradient(90deg, var(--hkbsr-harbour) 0%, var(--hkbsr-harbour) 48%, var(--hkbsr-teal) 73%, var(--hkbsr-bronze) 100%);
}

.hkbsr-nav-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px 18px 13px;
  border-right: 1px solid rgba(12, 64, 90, .16);
  background:
    linear-gradient(90deg, rgba(12, 64, 90, .055), rgba(255, 255, 255, .72)),
    radial-gradient(circle at 12% 20%, rgba(167, 123, 50, .13), transparent 38%);
  color: var(--hkbsr-harbour) !important;
}

.hkbsr-nav-code {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 34px;
  background: var(--hkbsr-harbour);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: inset 0 -4px 0 var(--hkbsr-bronze);
}

.hkbsr-nav-name {
  color: #14364a !important;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: .01em;
  white-space: nowrap;
}

.hkbsr-nav-links {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(250, 253, 253, .94));
}

.hkbsr-nav-links::-webkit-scrollbar {
  display: none;
}

.hkbsr-nav-links a {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: 0 12px;
  border-left: 1px solid rgba(12, 64, 90, .075);
  color: #263843 !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
}

.hkbsr-nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 2px;
  background: var(--hkbsr-bronze);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.hkbsr-nav-links a:hover,
.hkbsr-nav-links a:focus-visible {
  background: rgba(12, 64, 90, .045);
  color: var(--hkbsr-harbour) !important;
  outline: none;
}

.hkbsr-nav-links a:hover::after,
.hkbsr-nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.hkbsr-nav-links a.hkbsr-submit-link {
  margin-left: auto;
  padding: 0 17px;
  color: #fff !important;
  background: linear-gradient(180deg, #104d69, var(--hkbsr-harbour));
  border-left: 0;
  box-shadow: inset 0 -4px 0 var(--hkbsr-bronze);
}

.hkbsr-nav-links a.hkbsr-submit-link::after {
  display: none;
}

.hkbsr-nav-links a.hkbsr-submit-link:hover {
  background: linear-gradient(180deg, #155c7b, #0d4864);
  color: #fff !important;
}

/* ---------- top image carousel ---------- */
.hkbsr-top-gallery {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  width: 100% !important;
  margin: 0 0 18px 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(12, 64, 90, .16) !important;
  border-top: 4px solid var(--hkbsr-harbour) !important;
  background:
    linear-gradient(180deg, rgba(250, 253, 252, .96), rgba(239, 248, 246, .92)),
    linear-gradient(90deg, rgba(12, 64, 90, .018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(12, 64, 90, .014) 1px, transparent 1px) !important;
  background-size: auto, 92px 92px, 92px 92px !important;
  box-shadow: 0 10px 24px rgba(13, 27, 36, .055) !important;
  overflow: hidden !important;
}

.hkbsr-top-gallery::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  pointer-events: none !important;
  background:
    linear-gradient(90deg, rgba(12, 64, 90, .020) 1px, transparent 1px),
    linear-gradient(180deg, rgba(12, 64, 90, .016) 1px, transparent 1px),
    linear-gradient(108deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, 0) 48%, rgba(47, 119, 116, .025)) !important;
  background-size: 92px 92px, 92px 92px, auto !important;
}

.hkbsr-top-gallery-frame {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  min-height: 330px !important;
  overflow: hidden !important;
  background: transparent !important;
}

.hkbsr-top-gallery-slide {
  display: none !important;
  position: absolute !important;
  inset: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  transform: none !important;
  animation: none !important;
  transition: opacity .55s ease !important;
}

.hkbsr-top-gallery-slide.is-loaded {
  display: block !important;
}

.hkbsr-top-gallery-slide.is-active {
  opacity: 1 !important;
  z-index: 1 !important;
}

.hkbsr-top-gallery-slide img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 330px !important;
  object-fit: cover !important;
  object-position: center !important;
}

.hkbsr-top-gallery.is-empty {
  min-height: 330px !important;
}

.hkbsr-top-gallery.is-empty::after {
  content: "" !important;
  position: absolute !important;
  left: 40px !important;
  right: 40px !important;
  top: 42% !important;
  height: 1px !important;
  background: rgba(12, 64, 90, .10) !important;
}

/* ---------- identity masthead ---------- */
.hkbsr-identity-block {
  position: relative !important;
  min-height: 252px !important;
  margin-top: 0 !important;
  padding: 34px 40px 32px !important;
  border: 1px solid rgba(12, 64, 90, .18) !important;
  border-top: 4px solid var(--hkbsr-harbour) !important;
  box-shadow: 0 14px 34px rgba(13, 27, 36, .075) !important;
  overflow: hidden !important;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .985) 0%, rgba(255, 255, 255, .945) 58%, rgba(239, 247, 246, .760) 100%),
    radial-gradient(circle at 76% 35%, rgba(47, 119, 116, .050), transparent 34%),
    radial-gradient(circle at 18% 88%, rgba(167, 123, 50, .038), transparent 30%),
    linear-gradient(90deg, rgba(14, 64, 87, .020) 1px, transparent 1px),
    linear-gradient(180deg, rgba(14, 64, 87, .016) 1px, transparent 1px) !important;
  background-size: auto, auto, auto, 86px 86px, 86px 86px !important;
}

.hkbsr-identity-block::before {
  content: "" !important;
  position: absolute !important;
  inset: auto 0 0 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg, rgba(12, 64, 90, .06), rgba(167, 123, 50, .12), rgba(12, 64, 90, .04)) !important;
}

.hkbsr-identity-block::after {
  content: "HKBSR" !important;
  position: absolute !important;
  right: 32px !important;
  bottom: -20px !important;
  z-index: 0 !important;
  color: rgba(12, 64, 90, .038) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(86px, 12vw, 154px) !important;
  font-weight: 900 !important;
  letter-spacing: .085em !important;
  line-height: 1 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

.hkbsr-identity-main {
  position: relative !important;
  z-index: 1 !important;
  max-width: 900px !important;
  padding: 0 !important;
  background: transparent !important;
}

.hkbsr-kicker,
.hkbsr-block-head > span,
.hkbsr-current-issue-entry .hkbsr-eyebrow,
.hkbsr-call-panel .hkbsr-eyebrow {
  color: rgba(12, 64, 90, .92) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .145em !important;
  text-transform: uppercase;
}

.hkbsr-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hkbsr-kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: rgba(167, 123, 50, .86);
}

.hkbsr-identity-main h1 {
  margin: 13px 0 5px !important;
  color: var(--hkbsr-ink) !important;
  font-family: Arial, "Helvetica Neue", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif !important;
  font-size: clamp(40px, 4.8vw, 56px) !important;
  line-height: .98 !important;
  font-weight: 950 !important;
  letter-spacing: -.052em !important;
}

.hkbsr-en-name {
  margin: 0 0 13px !important;
  color: #0d4864 !important;
  font-size: clamp(20px, 2.35vw, 29px) !important;
  line-height: 1.13 !important;
  font-weight: 850 !important;
  letter-spacing: -.03em;
}

.hkbsr-intro-text {
  max-width: 790px !important;
  margin: 0 !important;
  color: #334650 !important;
  font-size: 14px !important;
  line-height: 1.74 !important;
}

.hkbsr-action-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px !important;
}

.hkbsr-action-line a,
.hkbsr-action-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(12, 64, 90, .24);
  background: rgba(255, 255, 255, .94);
  color: var(--hkbsr-harbour) !important;
  font-size: 13px !important;
  font-weight: 850;
}

.hkbsr-action-line a:hover,
.hkbsr-action-primary:hover {
  background: rgba(12, 64, 90, .055);
  border-color: rgba(12, 64, 90, .40);
  box-shadow: inset 0 -3px 0 var(--hkbsr-bronze);
}

.hkbsr-action-line .hkbsr-action-primary,
.hkbsr-action-primary {
  background: var(--hkbsr-harbour) !important;
  color: #fff !important;
  border-color: var(--hkbsr-harbour) !important;
}

.hkbsr-action-line .hkbsr-action-primary:hover,
.hkbsr-action-primary:hover {
  background: #155c7b !important;
  color: #fff !important;
}

/* ---------- shared panels ---------- */
.hkbsr-notice-board,
.hkbsr-current-issue-entry,
.hkbsr-editorial-list-block,
.hkbsr-database-search,
.hkbsr-category-index,
.hkbsr-text-panel,
.hkbsr-call-panel {
  margin-top: 18px;
  border: 1px solid rgba(12, 64, 90, .135);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .975), rgba(251, 253, 253, .955)),
    linear-gradient(90deg, rgba(14, 64, 87, .012) 1px, transparent 1px),
    linear-gradient(180deg, rgba(14, 64, 87, .010) 1px, transparent 1px) !important;
  background-size: auto, 88px 88px, 88px 88px !important;
  box-shadow: 0 8px 22px rgba(13, 27, 36, .055);
}

.hkbsr-notice-board,
.hkbsr-editorial-list-block,
.hkbsr-database-search,
.hkbsr-category-index,
.hkbsr-text-panel {
  padding: 26px 30px 30px;
}

.hkbsr-block-head {
  color: var(--hkbsr-harbour-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hkbsr-block-head h2,
.hkbsr-current-issue-entry h2,
.hkbsr-call-panel h2 {
  margin: 8px 0 8px !important;
  color: var(--hkbsr-ink) !important;
  font-size: 25px !important;
  line-height: 1.18 !important;
  font-weight: 950 !important;
  letter-spacing: -.025em;
  text-transform: none;
}

.hkbsr-block-head p,
.hkbsr-current-issue-entry p,
.hkbsr-call-panel p {
  margin: 0 !important;
  color: var(--hkbsr-muted) !important;
  font-size: 14px !important;
  line-height: 1.72 !important;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

.hkbsr-line-head {
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(13, 27, 36, .84);
}

/* ---------- notices ---------- */
.hkbsr-notice-list {
  border-top: 1px solid rgba(12, 64, 90, .10);
  margin-top: 12px;
}

.hkbsr-notice-item {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) minmax(260px, .65fr);
  gap: 18px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid rgba(12, 64, 90, .12);
  color: var(--hkbsr-ink) !important;
}

.hkbsr-notice-item:hover {
  background: rgba(12, 64, 90, .035);
  padding-left: 8px;
}

.hkbsr-notice-item span {
  color: var(--hkbsr-harbour);
  font-size: 13px;
  font-weight: 850;
}

.hkbsr-notice-item strong {
  font-size: 17px;
  line-height: 1.45;
  font-weight: 900;
}

.hkbsr-notice-item em {
  color: var(--hkbsr-muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- current issue entry ---------- */
.hkbsr-current-issue-entry,
.hkbsr-call-panel {
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-left: 5px solid var(--hkbsr-bronze);
}

.hkbsr-current-issue-entry p,
.hkbsr-call-panel p {
  max-width: 720px;
}

/* ---------- recommended ---------- */
.hkbsr-rec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid rgba(12, 64, 90, .15);
  border-left: 1px solid rgba(12, 64, 90, .15);
}

.hkbsr-rec-grid a {
  min-height: 150px;
  padding: 20px 18px 18px;
  border-right: 1px solid rgba(12, 64, 90, .15);
  border-bottom: 1px solid rgba(12, 64, 90, .15);
  background: #fff;
  color: var(--hkbsr-ink) !important;
}

.hkbsr-rec-grid a:hover {
  background: rgba(12, 64, 90, .045);
  box-shadow: inset 0 3px 0 var(--hkbsr-bronze);
}

.hkbsr-rec-grid strong {
  display: block;
  margin-bottom: 22px;
  font-size: 17px;
  line-height: 1.42;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.hkbsr-rec-grid span {
  display: block;
  color: var(--hkbsr-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- search ---------- */
.hkbsr-database-search {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(380px, 1fr);
  gap: 30px;
  align-items: start;
}

.hkbsr-search-form {
  padding: 20px;
  border: 1px solid var(--hkbsr-line);
  background: var(--hkbsr-surface-2);
}

.hkbsr-search-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--hkbsr-harbour);
  font-size: 13px;
  font-weight: 850;
}

.hkbsr-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}

.hkbsr-search-row input {
  height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(12, 64, 90, .22);
  background: rgba(255, 255, 255, .94);
  color: var(--hkbsr-ink);
  font-size: 14px;
}

.hkbsr-search-row input:focus {
  outline: none;
  border-color: var(--hkbsr-harbour-2);
  box-shadow: 0 0 0 3px rgba(21, 93, 123, .12);
}

.hkbsr-search-row button {
  border: 1px solid var(--hkbsr-harbour);
  background: var(--hkbsr-harbour);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.hkbsr-search-row button:hover {
  background: #155c7b;
}

.hkbsr-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.hkbsr-search-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(12, 64, 90, .24);
  color: var(--hkbsr-harbour) !important;
  background: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 750;
}

.hkbsr-search-tags a:hover {
  border-color: var(--hkbsr-bronze);
  box-shadow: inset 0 -2px 0 var(--hkbsr-bronze);
}

/* ---------- categories ---------- */
.hkbsr-category-index-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 22px;
}

.hkbsr-category-index-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(12, 64, 90, .26);
  background: rgba(255, 255, 255, .90);
  color: var(--hkbsr-harbour) !important;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.hkbsr-category-index-bar a:hover {
  background: rgba(12, 64, 90, .06);
  border-color: var(--hkbsr-bronze);
  box-shadow: inset 0 -2px 0 var(--hkbsr-bronze);
}

.hkbsr-category-feed {
  border-top: 1px solid rgba(12, 64, 90, .18);
}

.hkbsr-category-feed-section {
  padding: 26px 0 28px;
  border-bottom: 1px solid rgba(12, 64, 90, .18);
}

.hkbsr-category-feed-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hkbsr-category-feed-head {
  display: grid;
  grid-template-columns: minmax(280px, .36fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.hkbsr-category-titleline {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 5px;
}

.hkbsr-category-titleline > span {
  grid-row: 1 / 4;
  color: var(--hkbsr-bronze);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.hkbsr-category-titleline h3 {
  margin: 0 !important;
  color: var(--hkbsr-ink) !important;
  font-size: 21px !important;
  line-height: 1.25 !important;
  font-weight: 950 !important;
}

.hkbsr-category-titleline h3 a {
  color: var(--hkbsr-ink) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 4px !important;
}

.hkbsr-category-titleline h3 a:hover {
  color: var(--hkbsr-harbour) !important;
}

.hkbsr-category-titleline h3 strong {
  display: inline-block;
  margin-left: 6px;
  color: var(--hkbsr-harbour);
  font-weight: 900;
}

.hkbsr-category-titleline em {
  grid-column: 2;
  color: var(--hkbsr-harbour-2);
  font-style: normal;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.hkbsr-category-feed-copy p {
  margin: 0 !important;
  max-width: 720px;
  color: var(--hkbsr-muted) !important;
  font-size: 14px !important;
  line-height: 1.72 !important;
}

.hkbsr-category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hkbsr-category-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(12, 64, 90, .22);
  background: #fff;
  color: var(--hkbsr-harbour) !important;
  font-size: 12px;
  font-weight: 850;
}

.hkbsr-category-actions a:hover {
  border-color: var(--hkbsr-bronze);
  box-shadow: inset 0 -2px 0 var(--hkbsr-bronze);
}

.hkbsr-category-paper-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid rgba(12, 64, 90, .16);
  border-left: 1px solid rgba(12, 64, 90, .16);
}

.hkbsr-category-paper-list:empty {
  display: block;
  margin-top: 12px;
  border: 0;
  min-height: 0;
}

.hkbsr-category-paper {
  display: block;
  min-height: 146px;
  padding: 16px 15px 15px;
  border-right: 1px solid rgba(12, 64, 90, .16);
  border-bottom: 1px solid rgba(12, 64, 90, .16);
  background: rgba(255, 255, 255, .96);
  color: var(--hkbsr-ink) !important;
}

.hkbsr-category-paper:hover {
  background: rgba(12, 64, 90, .045);
  box-shadow: inset 0 3px 0 var(--hkbsr-bronze);
}

.hkbsr-category-paper strong {
  display: block;
  color: var(--hkbsr-ink);
  font-size: 16px;
  line-height: 1.42;
  font-weight: 950;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.hkbsr-category-paper span {
  display: block;
  margin-top: 22px;
  color: var(--hkbsr-muted);
  font-size: 13px;
  line-height: 1.5;
}

.hkbsr-category-paper em {
  display: block;
  margin-top: 8px;
  color: var(--hkbsr-bronze);
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

/* ---------- bottom texture ---------- */
.hkbsr-footer-pattern {
  position: relative !important;
  min-height: 118px !important;
  margin-top: 18px !important;
  border: 1px solid rgba(12, 64, 90, .12) !important;
  border-bottom: 4px solid rgba(12, 64, 90, .88) !important;
  overflow: hidden !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(241, 247, 247, .92)),
    radial-gradient(circle at 82% 30%, rgba(47, 119, 116, .055), transparent 34%),
    radial-gradient(circle at 18% 70%, rgba(167, 123, 50, .045), transparent 30%),
    linear-gradient(90deg, rgba(12, 64, 90, .018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(12, 64, 90, .014) 1px, transparent 1px) !important;
  background-size: auto, auto, auto, 72px 72px, 72px 72px !important;
  box-shadow: 0 8px 22px rgba(13, 27, 36, .045) !important;
}

.hkbsr-footer-pattern::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, var(--hkbsr-harbour), var(--hkbsr-teal), rgba(167, 123, 50, .80)) !important;
}

.hkbsr-footer-pattern::after {
  content: "HKBSR" !important;
  position: absolute !important;
  right: 34px !important;
  bottom: -18px !important;
  color: rgba(12, 64, 90, .050) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(68px, 9vw, 126px) !important;
  font-weight: 900 !important;
  letter-spacing: .10em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ---------- real OJS current issue at homepage bottom ---------- */
html body .current_issue,
html body .page_index_journal .current_issue,
html body .obj_issue_toc,
html body .page_issue_archive {
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom,
.hkbsr-home .hkbsr-real-current-issue-bottom,
html body .page_index_journal > .current_issue {
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 18px 0 0 !important;
  padding: 28px 30px 34px !important;
  border: 1px solid rgba(12, 64, 90, .16) !important;
  border-top: 4px solid var(--hkbsr-harbour) !important;
  background: rgba(255, 255, 255, .965) !important;
  box-shadow: 0 10px 26px rgba(13, 27, 36, .07) !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .current_issue_title,
#hkbsr-home-top .hkbsr-real-current-issue-bottom h2,
html body .page_index_journal > .current_issue .current_issue_title,
html body .page_index_journal > .current_issue h2 {
  margin: 0 0 18px !important;
  padding-bottom: 12px !important;
  border-bottom: 2px solid rgba(13, 27, 36, .84) !important;
  color: var(--hkbsr-ink) !important;
  font-size: 24px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .description,
#hkbsr-home-top .hkbsr-real-current-issue-bottom .published,
html body .page_index_journal > .current_issue .description,
html body .page_index_journal > .current_issue .published {
  color: #334650 !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .articles,
#hkbsr-home-top .hkbsr-real-current-issue-bottom .cmp_article_list,
html body .page_index_journal > .current_issue .articles,
html body .page_index_journal > .current_issue .cmp_article_list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 30px 36px !important;
  margin-top: 22px !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .obj_article_summary,
html body .page_index_journal > .current_issue .obj_article_summary {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .obj_article_summary .title,
html body .page_index_journal > .current_issue .obj_article_summary .title {
  margin: 0 0 10px !important;
  color: var(--hkbsr-ink) !important;
  font-size: 18px !important;
  line-height: 1.38 !important;
  font-weight: 500 !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .obj_article_summary .title a,
html body .page_index_journal > .current_issue .obj_article_summary .title a {
  color: var(--hkbsr-ink) !important;
  text-decoration: none !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .obj_article_summary .title a:hover,
html body .page_index_journal > .current_issue .obj_article_summary .title a:hover {
  color: var(--hkbsr-harbour) !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .obj_article_summary .authors,
#hkbsr-home-top .hkbsr-real-current-issue-bottom .obj_article_summary .pages,
html body .page_index_journal > .current_issue .obj_article_summary .authors,
html body .page_index_journal > .current_issue .obj_article_summary .pages {
  color: var(--hkbsr-muted) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .obj_galley_link,
html body .page_index_journal > .current_issue .obj_galley_link {
  min-height: 34px !important;
  padding: 8px 16px !important;
  border: 1px solid var(--hkbsr-ink) !important;
  background: #fff !important;
  color: var(--hkbsr-ink) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: none !important;
}

#hkbsr-home-top .hkbsr-real-current-issue-bottom .obj_galley_link:hover,
html body .page_index_journal > .current_issue .obj_galley_link:hover {
  background: var(--hkbsr-harbour) !important;
  border-color: var(--hkbsr-harbour) !important;
  color: #fff !important;
}

/* When JS has moved the issue into the homepage, avoid duplicated outer spacing rules. */
#hkbsr-home-top > .current_issue.hkbsr-real-current-issue-bottom {
  order: 98 !important;
}

#hkbsr-home-top > .hkbsr-footer-pattern {
  order: 99 !important;
}

/* ---------- accessibility and responsive ---------- */
.hkbsr-home a:focus-visible,
.hkbsr-home button:focus-visible,
.hkbsr-home input:focus-visible {
  outline: 3px solid rgba(21, 93, 123, .24);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .hkbsr-nav-links a {
    padding: 0 10px;
    font-size: 12px;
  }
  .hkbsr-nav-links a.hkbsr-submit-link {
    margin-left: 0;
  }
}

@media (max-width: 1040px) {
  .hkbsr-journal-nav {
    grid-template-columns: 1fr;
  }
  .hkbsr-nav-identity {
    border-right: 0;
    border-bottom: 1px solid rgba(12, 64, 90, .12);
  }
  .hkbsr-nav-links {
    justify-content: flex-start;
  }
  .hkbsr-identity-block {
    padding: 30px 28px 30px !important;
  }
  .hkbsr-top-gallery-frame,
  .hkbsr-top-gallery-slide img,
  .hkbsr-top-gallery.is-empty {
    min-height: 290px !important;
  }
  .hkbsr-database-search {
    grid-template-columns: 1fr;
  }
  .hkbsr-rec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hkbsr-category-feed-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hkbsr-category-paper-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #hkbsr-home-top .hkbsr-real-current-issue-bottom .articles,
  #hkbsr-home-top .hkbsr-real-current-issue-bottom .cmp_article_list,
  html body .page_index_journal > .current_issue .articles,
  html body .page_index_journal > .current_issue .cmp_article_list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .hkbsr-home {
    padding: 0 12px 22px;
  }
  .hkbsr-identity-block {
    padding: 26px 20px 26px !important;
  }
  .hkbsr-identity-main h1 {
    font-size: 36px !important;
  }
  .hkbsr-identity-block::after {
    right: -18px !important;
    bottom: -10px !important;
    font-size: 78px !important;
    opacity: .75 !important;
  }
  .hkbsr-top-gallery-frame,
  .hkbsr-top-gallery-slide img,
  .hkbsr-top-gallery.is-empty {
    min-height: 230px !important;
  }
  .hkbsr-current-issue-entry,
  .hkbsr-call-panel {
    display: block;
  }
  .hkbsr-current-issue-entry .hkbsr-action-primary,
  .hkbsr-call-panel .hkbsr-action-primary {
    margin-top: 16px;
  }
  .hkbsr-notice-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .hkbsr-category-titleline {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .hkbsr-category-titleline h3 {
    font-size: 19px !important;
  }
  .hkbsr-footer-pattern {
    min-height: 104px !important;
  }
  .hkbsr-footer-pattern::after {
    right: -16px !important;
    font-size: 72px !important;
  }
}

@media (max-width: 560px) {
  .hkbsr-nav-identity {
    padding: 10px 12px;
  }
  .hkbsr-nav-code {
    width: 56px;
  }
  .hkbsr-nav-name {
    font-size: 14px;
  }
  .hkbsr-nav-links a {
    min-height: 50px;
    padding: 0 10px;
  }
  .hkbsr-notice-board,
  .hkbsr-editorial-list-block,
  .hkbsr-database-search,
  .hkbsr-category-index,
  .hkbsr-text-panel {
    padding: 22px 18px 24px;
  }
  .hkbsr-rec-grid {
    grid-template-columns: 1fr;
  }
  .hkbsr-search-row {
    grid-template-columns: 1fr;
  }
  .hkbsr-category-paper-list {
    grid-template-columns: 1fr;
  }
  #hkbsr-home-top .hkbsr-real-current-issue-bottom,
  html body .page_index_journal > .current_issue {
    padding: 22px 18px 26px !important;
  }
  #hkbsr-home-top .hkbsr-real-current-issue-bottom .articles,
  #hkbsr-home-top .hkbsr-real-current-issue-bottom .cmp_article_list,
  html body .page_index_journal > .current_issue .articles,
  html body .page_index_journal > .current_issue .cmp_article_list {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .hkbsr-top-gallery-frame,
  .hkbsr-top-gallery-slide img,
  .hkbsr-top-gallery.is-empty {
    min-height: 200px !important;
  }
  .hkbsr-footer-pattern {
    min-height: 92px !important;
  }
}
