
/* --- Custom header styling for Journal of Mathematics --- */
.pkp_structure_head {
  background: linear-gradient(135deg, #10233a 0%, #1b3a5c 55%, #2c5a86 100%);
  box-shadow: 0 3px 12px rgba(0,0,0,0.28);
}

/* Center the journal title vertically in the header block */
.pkp_head_wrapper {
  padding-top: 26px !important;
}
.pkp_site_name_wrapper {
  margin-bottom: 26px !important;
}

.pkp_site_name_wrapper .pkp_site_name a {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.35);
}

.pkp_navigation_primary_row {
  background-color: #0e2136;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.pkp_navigation_primary_wrapper .pkp_navigation_primary > li > a {
  color: #e8eef5 !important;
  font-weight: 600;
  padding: 15px 18px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover only (not a sticky focus highlight) */
.pkp_navigation_primary_wrapper .pkp_navigation_primary > li > a:hover {
  background-color: #2c5a86;
  color: #ffffff !important;
}

.pkp_navigation_primary_wrapper .pkp_navigation_primary > li > ul {
  border-top: 3px solid #2c5a86;
}

.homepage_about h2 {
  color: #1b3a5c;
  border-bottom: 2px solid #2c5a86;
  padding-bottom: 6px;
  display: inline-block;
}

.pkp_structure_main h2, .pkp_page_content h2 {
  color: #1b3a5c;
}

/* Profile / user account menu styling (top-right) */
.pkp_navigation_user_wrapper {
  top: 14px !important;
}

.pkp_navigation_user > li.profile > a {
  color: #ffffff !important;
  background-color: rgba(255,255,255,0.14);
  padding: 6px 16px !important;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.pkp_navigation_user > li.profile > a:hover {
  background-color: rgba(255,255,255,0.3);
}

.pkp_navigation_user .task_count {
  background-color: #ffffff;
  color: #10233a;
  border-radius: 50%;
  padding: 1px 6px;
  margin-left: 5px;
  font-size: 0.7rem;
}


/* ============================================================
   Journal of Mathematics — homepage & footer (custom)
   ============================================================ */

/* ---------- Remove platform branding from the footer ---------- */
.pkp_brand_footer,
.pkp_structure_footer .pkp_brand_footer { display: none !important; }

/* ---------- Footer ---------- */
.pkp_structure_footer_wrapper{
  background: linear-gradient(135deg,#0a1a2b 0%,#10233a 50%,#1b3a5c 100%);
  border-top: 4px solid #c9a227;
  color: #c3d1e0;
  padding: 0 !important;
  margin-top: 40px;
}
.pkp_structure_footer{ max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.pkp_footer_content{ font-size: .9rem; line-height: 1.75; padding: 0; color: #c3d1e0; }
.jm-footer{ display: grid; grid-template-columns: 1fr 1.15fr 1.15fr 1.05fr; gap: 28px; padding: 46px 0 28px; }
.jm-f-title{ color:#fff; font-size:1.02rem; font-weight:700; margin:0 0 16px; padding-bottom:10px; position:relative; letter-spacing:.3px; }
.jm-f-title:after{ content:""; position:absolute; left:0; bottom:0; width:38px; height:2px; background:#c9a227; }
.jm-footer p{ margin:0 0 10px; color:#b5c5d6; }
.jm-footer ul{ list-style:none; margin:0; padding:0; }
.jm-footer li{ margin:0 0 9px; }
.jm-footer a{ color:#dbe6f2; text-decoration:none; border-bottom:1px solid transparent; transition:all .2s ease; }
.jm-footer a:hover{ color:#f0c94a; border-bottom-color:#c9a227; }
.jm-badge{ display:inline-block; background:rgba(201,162,39,.15); border:1px solid rgba(201,162,39,.45);
  color:#f0c94a; border-radius:20px; padding:3px 12px; font-size:.74rem; font-weight:600; margin:0 6px 7px 0; }
.jm-f-bottom{ border-top:1px solid rgba(255,255,255,.13); padding:18px 0 28px; display:flex; flex-wrap:wrap;
  gap:12px; justify-content:space-between; align-items:center; font-size:.84rem; color:#93a7bd; }
.jm-f-bottom strong{ color:#e8eef5; }
.jm-f-bottom a{ color:#f0c94a; text-decoration:none; }
.jm-f-bottom a:hover{ text-decoration:underline; }

/* ---------- Homepage ---------- */
.homepage_image img{ border-radius:10px; }
.jm-home{ margin:38px 0 6px; }
.jm-sec{ margin:0 0 40px; }
.jm-h2{ font-size:1.42rem; font-weight:800; color:#10233a; margin:0 0 10px; }
.jm-rule{ width:56px; height:3px; background:#c9a227; border-radius:3px; margin:0 0 18px; }
.jm-lead{ color:#5a6b7d; font-size:.96rem; margin:-6px 0 18px; }

.jm-glance{ display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:#e0e7ef;
  border:1px solid #e0e7ef; border-radius:10px; overflow:hidden; }
.jm-g{ background:#fff; padding:16px 18px; }
.jm-g span{ display:block; font-size:.7rem; letter-spacing:.9px; text-transform:uppercase;
  color:#8494a8; font-weight:700; margin-bottom:5px; }
.jm-g strong{ display:block; font-size:.93rem; color:#10233a; font-weight:700; line-height:1.4; }

.jm-cards{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.jm-card{ background:#fff; border:1px solid #e3e9f0; border-left:3px solid #1b3a5c; border-radius:8px;
  padding:20px 18px; transition:all .2s ease; }
.jm-card:hover{ box-shadow:0 8px 20px rgba(16,35,58,.10); transform:translateY(-3px); border-left-color:#c9a227; }
.jm-card h3{ font-size:1rem; margin:0 0 8px; color:#10233a; font-weight:700; }
.jm-card p{ margin:0; font-size:.88rem; color:#5a6b7d; line-height:1.65; }

.jm-scope{ display:flex; flex-wrap:wrap; gap:8px; }
.jm-chip{ background:#f2f6fb; border:1px solid #dce6f1; color:#25436a; border-radius:6px;
  padding:7px 13px; font-size:.85rem; }

.jm-steps{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.jm-step{ background:#f7f9fc; border-radius:8px; padding:18px; border-top:3px solid #1b3a5c; }
.jm-step b{ display:block; color:#b08f1f; font-size:.74rem; letter-spacing:1.1px; margin-bottom:7px; }
.jm-step h4{ margin:0 0 6px; font-size:.95rem; color:#10233a; }
.jm-step p{ margin:0; font-size:.85rem; color:#5a6b7d; line-height:1.6; }

.jm-cta{ background:linear-gradient(135deg,#10233a 0%,#1b3a5c 55%,#2c5a86 100%); border-radius:12px;
  padding:32px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px; }
.jm-cta-text{ flex:1 1 420px; }
.jm-cta h3{ margin:0 0 8px; color:#fff; font-size:1.26rem; font-weight:700; }
.jm-cta p{ margin:0; color:#c4d4e6; font-size:.93rem; line-height:1.65; }
.jm-btn{ display:inline-block; background:#c9a227; color:#10233a !important; font-weight:700;
  padding:12px 26px; border-radius:6px; text-decoration:none; transition:all .2s ease; }
.jm-btn:hover{ background:#f0c94a; text-decoration:none; }
.jm-btn-ghost{ display:inline-block; border:1px solid rgba(255,255,255,.55); color:#fff !important;
  padding:11px 22px; border-radius:6px; text-decoration:none; margin-left:10px; transition:all .2s ease; }
.jm-btn-ghost:hover{ background:rgba(255,255,255,.12); text-decoration:none; }

@media (max-width:900px){
  .jm-footer{ grid-template-columns:1fr 1fr; gap:28px; }
  .jm-glance{ grid-template-columns:repeat(2,1fr); }
  .jm-cards{ grid-template-columns:repeat(2,1fr); }
  .jm-steps{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:600px){
  .jm-footer{ grid-template-columns:1fr; }
  .jm-cards{ grid-template-columns:1fr; }
  .jm-cta{ padding:24px; }
  .jm-btn, .jm-btn-ghost{ display:block; text-align:center; margin:10px 0 0; }
}


/* ---------- Editorial Team page ---------- */
.jm-et{ margin:6px 0 0; }
.jm-et-group{ margin:0 0 36px; }
.jm-et-h{ font-size:1.16rem; color:#10233a; font-weight:800; margin:0 0 4px; }
.jm-et-sub{ font-size:.86rem; color:#7b8ca0; margin:0 0 16px; }
.jm-et-rule{ width:48px; height:3px; background:#c9a227; border-radius:3px; margin:6px 0 16px; }
.jm-et-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.jm-et-grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.jm-person{ background:#fff; border:1px solid #e3e9f0; border-top:3px solid #c9a227;
  border-radius:8px; padding:16px 18px; transition:all .2s ease; }
.jm-person:hover{ box-shadow:0 6px 16px rgba(16,35,58,.09); }
.jm-person .r{ display:block; font-size:.72rem; letter-spacing:.9px; text-transform:uppercase;
  color:#b08f1f; font-weight:700; margin-bottom:8px; }
.jm-person .n{ display:block; font-weight:700; color:#10233a; font-size:1rem; margin-bottom:5px; }
.jm-person .a{ display:block; font-size:.87rem; color:#5a6b7d; line-height:1.55; }
.jm-person .o{ display:inline-block; margin-top:9px; font-size:.8rem; color:#25436a; }
.jm-person-lead{ background:#f7f9fc; border-top-color:#1b3a5c; border-left:4px solid #1b3a5c; }
.jm-note{ background:#fff8e6; border:1px solid #f0dca8; border-left:4px solid #c9a227;
  border-radius:6px; padding:14px 16px; font-size:.88rem; color:#705f24; margin:0 0 26px; line-height:1.6; }
@media (max-width:900px){ .jm-et-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px){ .jm-et-grid, .jm-et-grid-2{ grid-template-columns:1fr; } }


/* ---------- Policy pages ---------- */
.jm-policy{ font-size:.95rem; line-height:1.75; color:#33445a; }
.jm-policy h3{ color:#10233a; font-size:1.12rem; font-weight:800; margin:30px 0 4px; }
.jm-policy h3:first-child{ margin-top:4px; }
.jm-policy p{ margin:0 0 14px; }
.jm-policy ul, .jm-policy ol{ margin:0 0 16px 20px; }
.jm-policy li{ margin:0 0 8px; }
.jm-policy a{ color:#25436a; }
.jm-intro{ background:#f7f9fc; border-left:4px solid #1b3a5c; border-radius:6px;
  padding:16px 18px; margin:0 0 26px; font-size:.95rem; color:#3c4e63; line-height:1.7; }
.jm-tbl{ width:100%; border-collapse:collapse; margin:0 0 20px; font-size:.9rem; }
.jm-tbl th{ background:#f2f6fb; color:#10233a; text-align:left; padding:10px 12px;
  border:1px solid #dce6f1; font-weight:700; }
.jm-tbl td{ padding:10px 12px; border:1px solid #e3e9f0; color:#4a5b70; vertical-align:top; }
.jm-hub{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:8px 0 10px; }
.jm-hub a{ display:block; background:#fff; border:1px solid #e3e9f0; border-top:3px solid #1b3a5c;
  border-radius:8px; padding:18px; text-decoration:none; transition:all .2s ease; }
.jm-hub a:hover{ box-shadow:0 8px 20px rgba(16,35,58,.10); transform:translateY(-3px);
  border-top-color:#c9a227; text-decoration:none; }
.jm-hub b{ display:block; color:#10233a; font-size:1rem; margin-bottom:6px; }
.jm-hub span{ display:block; color:#5a6b7d; font-size:.86rem; line-height:1.6; }
@media (max-width:900px){ .jm-hub{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px){ .jm-hub{ grid-template-columns:1fr; } }
/* ===== Header layout: top bar + banner + nav bar ===== */
.pkp_structure_head{ background:#10233a; box-shadow:0 3px 14px rgba(0,0,0,.25); }
.pkp_head_wrapper{ display:flex; flex-direction:column; padding:0 !important; }

/* 1 — top utility strip */
.pkp_site_nav_menu{ display:contents !important; }
.pkp_navigation_user_wrapper{ position:static !important; top:auto !important; order:1; transform:none !important;
  width:100%; padding:0 !important; background:#07111d; border-bottom:1px solid rgba(255,255,255,.07); }
.pkp_navigation_user{ max-width:1200px; margin:0 auto; padding:0 20px; display:flex; justify-content:flex-end; }
.pkp_navigation_user > li > a,
.pkp_navigation_user > li.profile > a{ color:#bccbdb !important; background:none !important;
  border-radius:0 !important; font-size:.82rem !important; font-weight:600; padding:9px 14px !important; }
.pkp_navigation_user > li > a:hover,
.pkp_navigation_user > li.profile > a:hover{ color:#f0c94a !important; background:none !important; }
.pkp_navigation_user .task_count{ background:#c9a227; color:#10233a; }

/* 2 — banner */
.pkp_site_name_wrapper{ order:2; width:100%; margin:0 !important; position:relative;
  display:flex; align-items:center; gap:24px;
  padding:36px max(24px, calc(50% - 600px)) !important;
  background-image:linear-gradient(90deg, rgba(7,17,29,.96) 0%, rgba(16,35,58,.93) 45%, rgba(11,61,46,.88) 100%), url('/public/journals/1/homepageImage_en_US.png');
  background-size:170% auto; background-position:right 78%; }
.pkp_site_name{ display:block; }
.pkp_site_name_wrapper .pkp_site_name a{ display:inline-flex; align-items:center; gap:18px;
  font-size:2.3rem !important; line-height:1.1; }
.pkp_site_name_wrapper .pkp_site_name a::before{ content:""; width:68px; height:68px; flex:none;
  border-radius:14px; background:url('/public/journals/1/favicon_en_US.png') center/cover no-repeat;
  box-shadow:0 4px 16px rgba(0,0,0,.4); }
.pkp_site_name::after{ content:"An international peer-reviewed, open-access journal of pure and applied mathematics";
  display:block; margin:12px 0 0 86px; color:#9fb5cd; font-size:.86rem; font-weight:500; letter-spacing:.2px; }
.pkp_site_name_wrapper::after{ content:"OPEN ACCESS\A DOUBLE-BLIND PEER REVIEW\A CC BY 4.0";
  white-space:pre-line; margin-left:auto; flex:none; text-align:center; line-height:2.1;
  background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.24); border-radius:10px;
  padding:14px 24px; color:#eaf1f8; font-size:.76rem; font-weight:700; letter-spacing:.9px; }

/* 3 — primary nav bar */
.pkp_navigation_primary_row{ order:3; width:100%; }
.pkp_navigation_primary_row{ background:#0b2035 !important; border-top:1px solid rgba(255,255,255,.06); }

/* homepage: banner replaces the standalone cover image */
.homepage_image{ display:none !important; }
.pkp_structure_content{ padding-top:26px !important; }

@media (max-width:760px){
  .pkp_site_name_wrapper{ flex-direction:column; align-items:flex-start; gap:18px; padding:26px 20px !important; }
  .pkp_site_name_wrapper::after{ margin-left:0; }
  .pkp_site_name::after{ margin-left:0; }
  .pkp_site_name_wrapper .pkp_site_name a{ font-size:1.6rem !important; gap:12px; }
  .pkp_site_name_wrapper .pkp_site_name a::before{ width:48px; height:48px; }
}


/* ===== Mobile & tablet header / navigation fix ===== */
/* Below 992px the default theme (a) keeps .pkp_site_name_wrapper at a fixed
   2.857rem height with an absolutely-positioned title, and (b) collapses the
   nav into a panel revealed by adding .pkp_site_nav_menu--isOpen via JS.
   The desktop header restructuring above used display:contents on
   .pkp_site_nav_menu, which removed that panel's box and forced it
   permanently open, so the hamburger button did nothing. The rules below
   restore correct small-screen behaviour and leave >=992px untouched. */
@media (max-width: 991px) {
  /* 1. collapsible nav panel works again */
  .pkp_site_nav_menu { display: none !important; }
  .pkp_site_nav_menu.pkp_site_nav_menu--isOpen { display: block !important; }

  /* 2. undo the flattened flex header */
  .pkp_head_wrapper { display: block !important; position: relative !important; }

  /* 3. let the header grow to fit the logo, title and tagline */
  .pkp_site_name_wrapper {
    height: auto !important;
    width: auto !important;
    padding: 56px 20px 24px !important;
    margin-bottom: 0 !important;
  }

  .pkp_site_name {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  .pkp_site_name_wrapper .pkp_site_name a { white-space: normal !important; }

  /* 4. nav rows back to normal flow inside the panel */
  .pkp_navigation_primary_row,
  .pkp_navigation_user_wrapper { width: auto !important; }

  .pkp_navigation_primary_row {
    background: transparent !important;
    border-top: 0 !important;
  }

  .pkp_navigation_user_wrapper {
    position: static !important;
    top: auto !important;
    background: transparent !important;
    border-bottom: 0 !important;
  }

  .pkp_navigation_user {
    display: block !important;
    max-width: none !important;
    padding: 0 !important;
  }
}


/* ==========================================================================
   Mobile navigation refinements
   1. hides the OPEN ACCESS / DOUBLE-BLIND / CC BY badge on small screens
   2. tightens the header so the panel drops close to the menu button
   3. gives the drop-down a slide + fade animation on open
   4. styles the "About" sub-menu (and the user menu) to match the top level
   Screens >= 992px are not affected by anything below.
   ========================================================================== */
@keyframes jmNavSlideIn {
  from { opacity: 0; transform: translateY(-14px); }
}

@media (max-width: 991px) {

  /* 1. the badge block is desktop only */
  .pkp_site_name_wrapper::after { content: none !important; display: none !important; }

  /* 2. shorter header, so the panel opens right below it */
  .pkp_site_name_wrapper { padding: 44px 18px 18px !important; }

  /* 3. drop-down panel. Show/hide is still the theme's own class toggle;
        the animation only runs while opening and has no fill mode on
        purpose, so the menu can never get stuck invisible. */
  .pkp_site_nav_menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important; left: 0 !important; right: 0 !important; width: 100% !important;
    z-index: 9999 !important;
    background: #14304d !important;
    box-shadow: 0 14px 30px rgba(0,0,0,.38) !important;
    padding: 6px 10px !important;
  }
  .pkp_site_nav_menu.pkp_site_nav_menu--isOpen {
    display: block !important;
    max-height: calc(100vh - 110px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    animation: jmNavSlideIn .3s cubic-bezier(.16,1,.3,1) !important;
  }
  .pkp_site_nav_toggle, .pkp_site_nav_toggle * {
    transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .2s ease, background-color .2s ease !important;
  }
  @media (prefers-reduced-motion: reduce) {
    .pkp_site_nav_menu.pkp_site_nav_menu--isOpen { animation: none !important; }
    .pkp_site_nav_toggle, .pkp_site_nav_toggle * { transition: none !important; }
  }

  /* 4. nested menus: "About" -> Editorial Team / Privacy Statement / Contact,
        and the signed-in user menu */
  #navigationPrimary > li > a { display: block !important; }
  #navigationPrimary li > ul,
  #navigationUser li > ul {
    list-style: none !important;
    margin: 0 0 6px 14px !important;
    padding: 4px 0 !important;
    border: 0 !important;
    border-left: 2px solid rgba(255,255,255,.20) !important;
    background: rgba(0,0,0,.16) !important;
    border-radius: 0 6px 6px 0 !important;
    box-shadow: none !important;
  }
  #navigationPrimary li > ul > li,
  #navigationUser li > ul > li {
    display: block !important; width: 100% !important; float: none !important; margin: 0 !important;
  }
  #navigationPrimary li > ul > li > a,
  #navigationUser li > ul > li > a,
  #navigationUser > li > a {
    display: block !important;
    padding: 11px 16px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #c8d6e5 !important;
    border-radius: 5px !important;
    text-decoration: none !important;
  }
  #navigationUser > li > a { font-weight: 600 !important; color: #e8eef5 !important; }
  #navigationPrimary li > ul > li > a:hover,
  #navigationPrimary li > ul > li > a:focus,
  #navigationUser li > ul > li > a:hover,
  #navigationUser li > ul > li > a:focus {
    color: #fff !important;
    background: rgba(255,255,255,.08) !important;
  }
}

/* ==========================================================================
   Homepage: hide the "Current Issue" heading, the volume/issue label and the
   published date, but keep the article listing itself visible.
   Scoped to the journal home page only.
   ========================================================================== */
.page_index_journal .current_issue > h2,
.page_index_journal .current_issue > .current_issue_title,
.page_index_journal .current_issue > .obj_issue_toc > .heading { display: none !important; }


/* ==========================================================================
   Hide the theme's "Search" button in the navigation bar.
   The search page itself stays reachable at /search.
   ========================================================================== */
.pkp_navigation_search_wrapper { display: none !important; }

/* ---- top user nav (Register / Login): larger type, right-aligned to the page container ---- */
@media (min-width: 992px) {
  .pkp_navigation_user_wrapper .pkp_navigation_user.pkp_navigation_user {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: flex !important;
    justify-content: flex-end !important;
    text-align: right !important;
  }
  .pkp_navigation_user_wrapper .pkp_navigation_user > li > a,
  .pkp_navigation_user_wrapper .pkp_navigation_user > li.profile > a {
    font-size: 1rem !important;
    letter-spacing: 0.2px;
    padding: 10px 15px !important;
  }
  .pkp_navigation_user_wrapper .pkp_navigation_user > li:last-child > a {
    padding-right: 0 !important;
  }
}

/* ---- inline article search inside the primary navigation bar ---- */
/* Hidden until the placement script moves it into the nav bar (prevents a flash in the footer). */
.jm-navsearch-src,
.jm-navsearch { display: none; }
.pkp_navigation_primary_wrapper .jm-navsearch { display: flex; }

@media (min-width: 992px) {
  .pkp_navigation_primary_wrapper {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
  }
  .pkp_navigation_primary_wrapper > .pkp_navigation_primary { flex: 0 0 auto; }
  .pkp_navigation_primary_wrapper .jm-navsearch {
    margin-left: auto;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    min-width: 0;
    padding-left: 8px;
  }
  .jm-navsearch .jm-ns-label {
    color: #e8eef5;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
  }
  .jm-navsearch input.jm-ns-q,
  .jm-navsearch input.jm-ns-a {
    height: 32px;
    min-width: 0;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 3px;
    background: #ffffff;
    color: #10233a;
    font-size: 0.85rem;
    line-height: 30px;
  }
  .jm-navsearch input.jm-ns-q { flex: 0 0 104px; }
  .jm-navsearch input.jm-ns-a { flex: 1 1 158px; }
  .jm-navsearch input.jm-ns-q::placeholder,
  .jm-navsearch input.jm-ns-a::placeholder { color: #8494a8; }
  .jm-navsearch input.jm-ns-q:focus,
  .jm-navsearch input.jm-ns-a:focus {
    outline: none;
    border-color: #c9a227;
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.35);
  }
  .jm-navsearch .jm-ns-btn {
    height: 32px;
    flex: 0 0 auto;
    padding: 0 16px;
    border: 0;
    border-radius: 3px;
    background: #c9a227;
    color: #10233a;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
  }
  .jm-navsearch .jm-ns-btn:hover,
  .jm-navsearch .jm-ns-btn:focus { background: #f0c94a; }
}

/* 992-1199px: the theme container is only 952px wide, which cannot hold the label
   plus both fields alongside five menu links, so fall back to one keyword field. */
@media (min-width: 992px) and (max-width: 1199px) {
  .jm-navsearch .jm-ns-label,
  .jm-navsearch input.jm-ns-a { display: none; }
  .jm-navsearch input.jm-ns-q { flex: 1 1 120px; }
}

/* Below the theme breakpoint the nav collapses into the hamburger,
   so the search stacks full width inside the open menu. */
@media (max-width: 991px) {
  .pkp_navigation_primary_wrapper .jm-navsearch {
    display: block;
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .jm-navsearch .jm-ns-label {
    display: block;
    margin-bottom: 8px;
    color: #bccbdb;
    font-size: 0.85rem;
    font-weight: 600;
  }
  .jm-navsearch input.jm-ns-q,
  .jm-navsearch input.jm-ns-a {
    display: block;
    width: 100%;
    height: 38px;
    margin-bottom: 8px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 3px;
    background: #ffffff;
    color: #10233a;
    font-size: 0.9rem;
  }
  .jm-navsearch .jm-ns-btn {
    display: block;
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 3px;
    background: #c9a227;
    color: #10233a;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
  }
}

/* == JM homepage articles widget (added) == */
.jm-articles { margin-top: 2.4rem; }
.jm-articles__head { color:#1b3a5c; font-family:"Noto Serif",Georgia,serif; font-size:1.55rem; font-weight:700; border-bottom:2px solid #2c5a86; padding-bottom:6px; margin:0 0 1.1rem; display:inline-block; }
.jm-articles__list { list-style:none; margin:0; padding:0; }
.jm-articles__item { padding:14px 2px; border-bottom:1px solid #e3e8ee; }
.jm-articles__item:first-child { border-top:1px solid #e3e8ee; }
.jm-articles__title { display:block; font-size:1.02rem; font-weight:600; color:#006798; text-decoration:none; line-height:1.4; }
.jm-articles__title:hover { text-decoration:underline; }
.jm-articles__meta { display:block; margin-top:4px; font-size:0.84rem; color:#5a6b7b; }
.jm-articles__meta .jm-articles__year { color:#1b3a5c; font-weight:600; }
.jm-articles__empty { color:#5a6b7b; padding:14px 2px; font-style:italic; }
.jm-pager { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:1.3rem; }
.jm-pager button { min-width:34px; height:34px; padding:0 10px; border:1px solid #cdd6e0; background:#fff; color:#1b3a5c; border-radius:4px; cursor:pointer; font-size:0.9rem; font-weight:600; line-height:1; transition:all .15s ease; }
.jm-pager button:hover:not(:disabled) { border-color:#2c5a86; background:#f4f7fa; }
.jm-pager button[aria-current="page"] { background:#1b3a5c; color:#fff; border-color:#1b3a5c; }
.jm-pager button:disabled { opacity:.4; cursor:default; }
.jm-pager__ellipsis { padding:0 4px; color:#5a6b7b; }

/* == JM search label font match (added) == */
.pkp_navigation_primary_wrapper .jm-navsearch .jm-ns-label { font-size: 14px; line-height: 1.2; }
