/* ==========================================================================
   World Journals Publishing — shared stylesheet (wj.css)
   One file for every page: OJS templates and static policy pages.
   Sections: 1 tokens · 2 base · 3 chrome (topbar/header/nav/footer)
             4 language switcher · 5 menus · 6 shared components
             7 journal themes · 8 responsive · 9 motion/print
   ========================================================================== */

/* 1 ─ TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  /* legacy names kept: page templates use them */
  --crimson: #1a4b77;
  --crimson-dark: #0f3050;
  --crimson-light: #2b6cb0;
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --cream: #f4f7fa;
  --cream-dark: #e2e8f0;
  --text-dark: #1a202c;
  --text-mid: #2d3748;
  --text-muted: #566274;          /* was #718096 (3.7:1) → now ≥5:1 */
  --border: #cbd5e0;
  --white: #ffffff;
  --modern-green: #1e7d46;

  --wj-ink: var(--crimson-dark);
  --wj-gold-text: #7d621a;        /* gold that passes AA as text on white */
  --wj-focus: #f2b632;
  --wj-radius: 10px;
  --wj-wrap: 1200px;
  --wj-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wj-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wj-display: "Playfair Display", Georgia, serif;
}

/* 2 ─ BASE ───────────────────────────────────────────────────────────────── */
/* the page templates were authored on a zero-margin reset — keep it */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body.wj {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--wj-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--cream);
  overflow-x: hidden;
}
body.wj > .wj-footer { margin-top: auto; }
.wj img { max-width: 100%; height: auto; }
/* zero-specificity reset: any page class (e.g. .btn-submit) wins */
:where(.wj) a { color: inherit; text-decoration: none; }
:where(.wj) a:hover { color: var(--crimson); }
/* links inside running text must look like links (WCAG 1.4.1) */
.wj main p a:not([class]), .wj .main-card-body a:not([class]), .wj .section-card p a:not([class]),
.wj td a:not([class]), .wj .abstract-content a, .wj .wj-prose a {
  color: var(--crimson);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.wj :focus-visible { outline: 3px solid var(--wj-focus); outline-offset: 2px; border-radius: 3px; }
.wj input:focus-visible, .wj textarea:focus-visible, .wj select:focus-visible { outline-offset: 0; }
.wj-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wj-wrap { width: 100%; max-width: var(--wj-wrap); margin: 0 auto; padding: 0 24px; }
#wj-main:focus { outline: none; }

.wj-skip {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--wj-focus); color: #111 !important; font-weight: 600;
  padding: 10px 16px; border-radius: 0 0 8px 8px; transition: top .15s;
}
.wj-skip:focus { top: 0; }

/* 3 ─ CHROME ─────────────────────────────────────────────────────────────── */
/* Top bar */
.wj-topbar {
  background: var(--wj-ink);
  color: rgba(255,255,255,.82);
  font-size: 12.5px;
  line-height: 1.3;
  border-bottom: 2px solid var(--gold);
}
.wj-topbar__in { display: flex; align-items: center; gap: 22px; min-height: 40px; }
.wj-topbar a { color: rgba(255,255,255,.82); }
.wj-topbar a:hover { color: #fff; }
.wj-topbar__portal { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; letter-spacing: .04em; }
.wj-topbar__tag { letter-spacing: .04em; }
.wj-topbar__contacts { display: flex; gap: 18px; }
.wj-topbar__contacts a { white-space: nowrap; }
.wj-topbar__end { margin-left: auto; display: flex; align-items: center; }

/* Header */
.wj-header {
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,.08);
  position: relative;
  z-index: 60;
}
.wj-header__in { display: flex; align-items: center; gap: 22px; min-height: 84px; }
.wj-brand { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 auto; color: var(--text-dark) !important; }
.wj-brand__logo { width: 56px; height: 56px; object-fit: contain; flex: none; }
.wj-brand__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wj-brand__name {
  font-family: var(--wj-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
  color: var(--crimson-dark);
  letter-spacing: -.005em;
}
.wj-brand__meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted);
}
.wj-brand__issn { color: var(--wj-gold-text); font-weight: 700; }
.wj-header__search { flex: 0 1 300px; }
.wj-search { position: relative; display: flex; }
.wj-search input {
  width: 100%;
  height: 40px;
  padding: 0 42px 0 16px;
  font: inherit; font-size: 14px;
  color: var(--text-dark);
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.wj-search input::placeholder { color: var(--text-muted); }
.wj-search input:focus { background: #fff; border-color: var(--crimson); outline: none; }
.wj-search button {
  position: absolute; right: 4px; top: 4px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: var(--crimson); color: #fff; cursor: pointer;
}
.wj-search button:hover { background: var(--crimson-dark); }
.wj-account { display: flex; align-items: center; gap: 8px; flex: none; }

.wj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 16px;
  font: 600 13.5px/1 var(--wj-sans);
  border-radius: 8px;
  border: 1.5px solid var(--crimson);
  background: var(--crimson); color: #fff !important;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.wj-btn:hover { background: var(--crimson-dark); border-color: var(--crimson-dark); }
.wj-btn--ghost { background: transparent; color: var(--crimson) !important; border-color: var(--border); }
.wj-btn--ghost:hover { background: var(--cream); border-color: var(--crimson); }

/* Burger (mobile only) */
.wj-burger {
  display: none;
  align-items: center; gap: 8px;
  height: 40px; padding: 0 12px;
  font: 600 13px var(--wj-sans); color: var(--crimson-dark);
  background: var(--cream); border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer;
}
.wj-burger__bars { display: grid; gap: 4px; width: 18px; }
.wj-burger__bars i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.wj-burger[aria-expanded="true"] .wj-burger__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.wj-burger[aria-expanded="true"] .wj-burger__bars i:nth-child(2) { opacity: 0; }
.wj-burger[aria-expanded="true"] .wj-burger__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Main navigation */
.wj-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--crimson);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 10px 26px rgba(15,23,42,.12);
}
.wj-nav__list { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.wj-nav__list > li { position: relative; }
.wj-nav__list > li > a,
.wj-nav__toggle {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  height: 48px; padding: 0 18px;
  font: 500 14px/1 var(--wj-sans);
  color: rgba(255,255,255,.92) !important;
  background: none; border: 0; cursor: pointer;
  white-space: nowrap;
}
.wj-nav__list > li > a:hover, .wj-nav__toggle:hover,
.wj-nav__toggle[aria-expanded="true"] { background: rgba(255,255,255,.12); color: #fff !important; }
.wj-nav__list > li > a[aria-current]::after,
.wj-nav__toggle[aria-current]::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px;
  background: var(--gold); border-radius: 3px 3px 0 0;
}
.wj-chev { transition: transform .2s; flex: none; }
[aria-expanded="true"] > .wj-chev { transform: rotate(180deg); }
.wj-nav__mobile { display: none; }

/* About mega-panel */
.wj-sub {
  position: absolute; left: 0; top: 100%;
  display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 6px 28px;
  min-width: 520px;
  padding: 18px 22px 20px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.1);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--wj-radius) var(--wj-radius);
  box-shadow: 0 22px 48px rgba(15,23,42,.18);
}
.wj-sub[hidden] { display: none; }
.wj-sub__col { display: flex; flex-direction: column; }
.wj-sub__label, .wj-menu__label {
  margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted);
}
.wj-sub a {
  display: block; padding: 7px 10px; margin: 0 -10px;
  font-size: 14px; color: var(--text-mid); border-radius: 6px;
}
.wj-sub a:hover { background: var(--cream); color: var(--crimson); }

/* 4 ─ LANGUAGE SWITCHER (identical on every page) ───────────────────────── */
.wj-lang {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}
.wj-lang__opt {
  min-width: 34px; height: 24px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 11.5px/1 var(--wj-sans); letter-spacing: .08em;
  color: rgba(255,255,255,.8) !important;
  background: none; border: 0; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s;
}
a.wj-lang__opt:hover, button.wj-lang__opt:hover { background: rgba(255,255,255,.14); color: #fff !important; }
.wj-lang__opt.is-active { background: var(--gold); color: var(--wj-ink) !important; cursor: default; }

/* 5 ─ USER MENU ──────────────────────────────────────────────────────────── */
.wj-pop { position: relative; }
.wj-user {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 4px 4px;
  font: 600 13.5px var(--wj-sans); color: var(--text-dark);
  background: none; border: 1.5px solid transparent; border-radius: 999px; cursor: pointer;
}
.wj-user:hover, .wj-user[aria-expanded="true"] { background: var(--cream); border-color: var(--border); }
.wj-user__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, var(--crimson-dark), var(--crimson-light));
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--gold);
}
.wj-user__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wj-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 80;
  width: 300px; padding: 6px;
  background: #fff; border: 1px solid rgba(15,23,42,.1); border-radius: 12px;
  box-shadow: 0 22px 50px rgba(15,23,42,.18);
}
.wj-menu[hidden] { display: none; }
.wj-menu__head { display: flex; flex-direction: column; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--cream-dark); }
.wj-menu__head strong { font-size: 14px; }
.wj-menu__head span { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.wj-menu > a, .wj-menu__sub > summary {
  display: block; padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-mid); cursor: pointer;
}
.wj-menu > a:hover, .wj-menu__sub > summary:hover { background: var(--cream); color: var(--crimson); }
.wj-menu__sub > summary { list-style: none; display: flex; justify-content: space-between; }
.wj-menu__sub > summary::-webkit-details-marker { display: none; }
.wj-menu__sub > summary::after { content: "+"; font-weight: 700; color: var(--text-muted); }
.wj-menu__sub[open] > summary::after { content: "–"; }
.wj-menu__sub { padding-bottom: 2px; }
.wj-menu__sub .wj-menu__label { padding: 6px 12px 2px; }
.wj-menu__journal { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 8px; font-size: 13px; line-height: 1.35; color: var(--text-mid); }
.wj-menu__journal:hover { background: var(--cream); }
.wj-menu__journal strong { display: block; color: var(--text-dark); }
.wj-menu__dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--dot); flex: none; }
.wj-menu__logout { color: #b42318 !important; border-top: 1px solid var(--cream-dark); border-radius: 0 0 8px 8px !important; margin-top: 4px; }

/* Footer */
.wj-footer {
  background: var(--wj-ink);
  color: rgba(255,255,255,.74);
  border-top: 3px solid var(--gold);
  font-size: 13.5px;
  line-height: 1.7;
}
.wj-footer a { color: rgba(255,255,255,.86); }
.wj-footer a:hover { color: #fff; text-decoration: underline; }
.wj .wj-footer p a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; }
.wj-footer__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 36px;
  padding-top: 46px; padding-bottom: 34px;
}
.wj-footer p { margin: 0 0 10px; }
.wj-footer__title { font-family: var(--wj-display); font-size: 18px; line-height: 1.3; color: #fff; }
.wj-footer__title span { font-family: var(--wj-sans); font-size: 13px; color: var(--gold); letter-spacing: .06em; }
.wj-footer__issn { color: rgba(255,255,255,.9); }
.wj-footer__issn strong { color: var(--gold); letter-spacing: .04em; }
.wj-footer__h { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold) !important; }
.wj-footer__col { display: flex; flex-direction: column; align-items: flex-start; }
.wj-footer__col a { padding: 3px 0; }
.wj-footer__license p { font-size: 12.5px; color: rgba(255,255,255,.7); }
.wj-cc { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px; color: #fff !important; font-weight: 700; letter-spacing: .05em; }
.wj-footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  padding-top: 16px; padding-bottom: 22px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12.5px; color: rgba(255,255,255,.62);
}

/* 6 ─ SHARED COMPONENTS ──────────────────────────────────────────────────── */
/* Lazy PDF viewer (wj.js → WJ.pdf) */
.wj-pdf { margin: 0; }
.wj-pdf__bar {
  position: sticky; top: 51px; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--wj-radius) var(--wj-radius) 0 0;
}
.wj-pdf__bar button {
  min-width: 36px; height: 34px; padding: 0 10px;
  font: 600 13px var(--wj-sans); color: var(--crimson-dark);
  background: var(--cream); border: 1px solid var(--border); border-radius: 7px; cursor: pointer;
}
.wj-pdf__bar button:hover { border-color: var(--crimson); color: var(--crimson); }
.wj-pdf__bar output { min-width: 54px; text-align: center; font: 600 13px var(--wj-sans); color: var(--text-mid); }
.wj-pdf__bar .wj-pdf__info { margin-left: auto; font-size: 12.5px; color: var(--text-muted); }
.wj-pdf__pages {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-height: 80vh; overflow: auto; padding: 18px 10px;
  background: #525659; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--wj-radius) var(--wj-radius);
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.wj-pdf__page { position: relative; flex: none; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.wj-pdf__page canvas { display: block; width: 100%; height: 100%; }
.wj-pdf__page[data-state="loading"]::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 30px; height: 30px;
  border: 3px solid var(--cream-dark); border-top-color: var(--crimson); border-radius: 50%;
  animation: wj-spin .8s linear infinite;
}
.wj-pdf__msg { padding: 40px 16px; color: #fff; text-align: center; }
.wj-pdf__msg a { color: #fff; text-decoration: underline; }
@keyframes wj-spin { to { transform: rotate(360deg); } }

/* 7 ─ JOURNAL THEMES ─────────────────────────────────────────────────────── */
/* ================================================================
   SAFE JOURNAL THEMES V2
   Presentation-only layer. No OJS routing, loops or JS are changed.
   Theme is selected by a journal-specific class on the body element.
   ================================================================ */

/* Shared premium foundations */
body.wj { --wj-ink: var(--crimson-dark); }
body[class*="journal-theme-"] {
  --theme-glow: rgba(15, 48, 80, .16);
  --theme-surface: rgba(255,255,255,.94);
  --theme-line: rgba(15,48,80,.12);
  background-image:
    radial-gradient(circle at 8% 4%, var(--theme-glow), transparent 26%),
    linear-gradient(180deg, var(--cream) 0%, #ffffff 44%, var(--cream) 100%);
  background-attachment: fixed;
}



body[class*="journal-theme-"] .page-hero,
body[class*="journal-theme-"] .journal-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.08), 0 16px 40px rgba(15,23,42,.13);
}

body[class*="journal-theme-"] .page-hero::before,
body[class*="journal-theme-"] .journal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body[class*="journal-theme-"] .page-hero-inner,
body[class*="journal-theme-"] .hero-inner {
  position: relative;
  z-index: 1;
}

body[class*="journal-theme-"] .main-card,
body[class*="journal-theme-"] .section-card,
body[class*="journal-theme-"] .role-section,
body[class*="journal-theme-"] .sidebar-block,
body[class*="journal-theme-"] .sidebar-widget,
body[class*="journal-theme-"] .content-card,
body[class*="journal-theme-"] .issue-card,
body[class*="journal-theme-"] .article-card,
body[class*="journal-theme-"] .article-summary,
body[class*="journal-theme-"] .lang-section {
  border-color: var(--theme-line);
  box-shadow: 0 18px 45px rgba(15,23,42,.07);
}

body[class*="journal-theme-"] .main-card,
body[class*="journal-theme-"] .section-card,
body[class*="journal-theme-"] .role-section,
body[class*="journal-theme-"] .content-card,
body[class*="journal-theme-"] .sidebar-block,
body[class*="journal-theme-"] .sidebar-widget {
  background: var(--theme-surface);
}

body[class*="journal-theme-"] .main-card-header,
body[class*="journal-theme-"] .role-header,
body[class*="journal-theme-"] .sidebar-block-title,
body[class*="journal-theme-"] .widget-header {
  position: relative;
}

body[class*="journal-theme-"] .main-card-header::after,
body[class*="journal-theme-"] .role-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 110px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

body[class*="journal-theme-"] .btn,
body[class*="journal-theme-"] .keyword-tag,
body[class*="journal-theme-"] .index-item,
body[class*="journal-theme-"] .hero-badge {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

body[class*="journal-theme-"] .btn:hover,
body[class*="journal-theme-"] .index-item:hover,
body[class*="journal-theme-"] .hero-badge:hover {
  transform: translateY(-2px);
}

body[class*="journal-theme-"] .index-logos {
  gap: 9px;
}

body[class*="journal-theme-"] .index-item {
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.80));
  box-shadow: 0 7px 18px rgba(15,23,42,.05);
}


/* ---------------- JGSI: scientific innovation / research ---------------- */
body.journal-theme-jgsi {
  --crimson: #5b3cc4;
  --crimson-dark: #21144f;
  --crimson-light: #7c5ce7;
  --gold: #d4a94f;
  --gold-light: #f4e6b9;
  --cream: #f7f6fc;
  --cream-dark: #ebe8f6;
  --text-dark: #17152a;
  --text-mid: #403b59;
  --text-muted: #5f5978;
  --wj-gold-text: #7b5d14;
  --border: #ddd8ee;
  --theme-glow: rgba(91,60,196,.12);
  --theme-line: rgba(91,60,196,.18);
}
body.journal-theme-jgsi .wj-nav,
body.journal-theme-jgsi .sidebar-block-title,
body.journal-theme-jgsi .widget-header {
  background: linear-gradient(100deg, #21144f 0%, #4d2fae 55%, #167f84 120%);
}
body.journal-theme-jgsi .page-hero,
body.journal-theme-jgsi .journal-hero {
  background:
    radial-gradient(circle at 15% 28%, rgba(69,221,199,.24), transparent 20%),
    radial-gradient(circle at 82% 18%, rgba(180,133,255,.28), transparent 25%),
    linear-gradient(125deg, #1c123f 0%, #43259d 58%, #116b70 120%);
}
body.journal-theme-jgsi .page-hero::before,
body.journal-theme-jgsi .journal-hero::before {
  background:
    radial-gradient(circle at 14% 74%, rgba(255,255,255,.65) 0 2px, transparent 3px),
    radial-gradient(circle at 29% 28%, rgba(255,255,255,.45) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 62% 65%, rgba(255,255,255,.45) 0 2px, transparent 3px),
    radial-gradient(circle at 87% 38%, rgba(255,255,255,.65) 0 1.5px, transparent 2.5px),
    linear-gradient(28deg, transparent 49.5%, rgba(255,255,255,.08) 50%, transparent 50.5%);
  background-size: 190px 145px, 230px 170px, 250px 160px, 210px 155px, 90px 90px;
  opacity: .65;
}
body.journal-theme-jgsi .main-card,
body.journal-theme-jgsi .section-card,
body.journal-theme-jgsi .role-section,
body.journal-theme-jgsi .content-card {
  border-top: 3px solid rgba(91,60,196,.72);
}
body.journal-theme-jgsi .editor-photo,
body.journal-theme-jgsi .member-avatar {
  box-shadow: 0 0 0 4px rgba(91,60,196,.10), 0 12px 25px rgba(33,20,79,.16);
}

/* ---------------- JGEMM: finance / economics / mathematical modelling ---------------- */
body.journal-theme-jgemm {
  --crimson: #0b6a5b;
  --crimson-dark: #063a35;
  --crimson-light: #128878;
  --gold: #caa45b;
  --gold-light: #f1dfb7;
  --cream: #f5f7f4;
  --cream-dark: #e5ece8;
  --text-dark: #14211e;
  --text-mid: #364c46;
  --text-muted: #55655f;
  --wj-gold-text: #75581a;
  --border: #d2dfda;
  --theme-glow: rgba(11,106,91,.11);
  --theme-line: rgba(11,106,91,.18);
}
body.journal-theme-jgemm .wj-nav,
body.journal-theme-jgemm .sidebar-block-title,
body.journal-theme-jgemm .widget-header {
  background: linear-gradient(105deg, #052f2b 0%, #0b6a5b 72%, #8b6a2e 135%);
}
body.journal-theme-jgemm .page-hero,
body.journal-theme-jgemm .journal-hero {
  background:
    radial-gradient(circle at 80% 25%, rgba(202,164,91,.20), transparent 28%),
    linear-gradient(125deg, #042b28 0%, #07564c 58%, #0b6a5b 100%);
}
body.journal-theme-jgemm .page-hero::before,
body.journal-theme-jgemm .journal-hero::before {
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(145deg, transparent 48%, rgba(202,164,91,.16) 49%, rgba(202,164,91,.16) 50%, transparent 51%);
  background-size: 34px 34px, 34px 34px, 170px 110px;
  opacity: .72;
}
body.journal-theme-jgemm .page-hero::after,
body.journal-theme-jgemm .journal-hero::after {
  content: "∑   ƒ(x)   Δ   π   %   ∫";
  position: absolute;
  right: 4%;
  bottom: -8px;
  z-index: 0;
  font-family: Georgia, serif;
  font-size: clamp(28px, 5vw, 72px);
  letter-spacing: .20em;
  color: rgba(255,255,255,.055);
  white-space: nowrap;
  pointer-events: none;
}
body.journal-theme-jgemm .main-card,
body.journal-theme-jgemm .section-card,
body.journal-theme-jgemm .role-section,
body.journal-theme-jgemm .content-card {
  border-top: 3px solid rgba(202,164,91,.82);
}
body.journal-theme-jgemm .issue-card,
body.journal-theme-jgemm .article-summary {
  background-image: linear-gradient(135deg, rgba(11,106,91,.035), transparent 42%);
}

/* ---------------- JDTC: cybersecurity / digital technologies ---------------- */
body.journal-theme-jdtc {
  --crimson: #087ca7;
  --crimson-dark: #07172b;
  --crimson-light: #00a7d6;
  --gold: #55d6ff;
  --gold-light: #c9f4ff;
  --cream: #f3f7fa;
  --cream-dark: #e1ebf0;
  --text-dark: #0c1724;
  --text-mid: #33485a;
  --text-muted: #4f6474;
  --wj-gold-text: #06617f;
  --border: #cbdbe3;
  --theme-glow: rgba(0,167,214,.12);
  --theme-line: rgba(0,142,185,.20);
}
body.journal-theme-jdtc .wj-nav,
body.journal-theme-jdtc .sidebar-block-title,
body.journal-theme-jdtc .widget-header {
  background: linear-gradient(105deg, #061326 0%, #0a2d4a 62%, #087ca7 112%);
}
body.journal-theme-jdtc .page-hero,
body.journal-theme-jdtc .journal-hero {
  background:
    radial-gradient(circle at 83% 22%, rgba(0,224,255,.18), transparent 24%),
    radial-gradient(circle at 16% 78%, rgba(78,86,255,.18), transparent 25%),
    linear-gradient(125deg, #050d1b 0%, #09213a 52%, #074f70 100%);
}
body.journal-theme-jdtc .page-hero::before,
body.journal-theme-jdtc .journal-hero::before {
  background-image:
    linear-gradient(rgba(85,214,255,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85,214,255,.075) 1px, transparent 1px),
    radial-gradient(circle, rgba(85,214,255,.34) 0 1px, transparent 1.7px);
  background-size: 30px 30px, 30px 30px, 42px 42px;
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 100%);
  opacity: .65;
}
body.journal-theme-jdtc .page-hero::after,
body.journal-theme-jdtc .journal-hero::after {
  content: "01001011   CYBER   DATA   AI   11010100";
  position: absolute;
  right: 3%;
  bottom: 8px;
  z-index: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(13px, 1.8vw, 24px);
  letter-spacing: .20em;
  color: rgba(85,214,255,.11);
  white-space: nowrap;
  pointer-events: none;
}
body.journal-theme-jdtc .main-card,
body.journal-theme-jdtc .section-card,
body.journal-theme-jdtc .role-section,
body.journal-theme-jdtc .content-card {
  border-top: 3px solid rgba(0,167,214,.75);
}
body.journal-theme-jdtc .editor-photo-avatar {
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    linear-gradient(135deg, rgba(85,214,255,.14), rgba(78,86,255,.08)),
    #07172b;
  color:#bdf3ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:24px;
  font-weight:800;
  letter-spacing:.14em;
  border-color:#55d6ff;
}
body.journal-theme-jdtc .editor-photo-avatar::before { content:"JDTC"; }
body.journal-theme-jdtc .keyword-tag {
  background: rgba(0,167,214,.08);
  border-color: rgba(0,167,214,.20);
}
body.journal-theme-jdtc .index-dot {
  box-shadow: 0 0 0 4px rgba(85,214,255,.12), 0 0 16px rgba(85,214,255,.28);
}

@media (prefers-reduced-motion: reduce) {
  body[class*="journal-theme-"] .btn,
  body[class*="journal-theme-"] .keyword-tag,
  body[class*="journal-theme-"] .index-item,
  body[class*="journal-theme-"] .hero-badge { transition: none; }
}

/* 8 ─ RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .wj-topbar__contacts a + a { display: none; }
  .wj-header__search { flex-basis: 220px; }
  .wj-user__name { display: none; }
}

@media (max-width: 900px) {
  .wj-wrap { padding: 0 16px; }
  .wj-topbar__contacts { display: none; }
  .wj-topbar__in { gap: 12px; min-height: 38px; }
  .wj-topbar__portal { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

  .wj-header__in { min-height: 70px; gap: 12px; }
  .wj-brand__logo { width: 44px; height: 44px; }
  .wj-brand__name { font-size: 16px; }
  .wj-brand__meta { font-size: 10.5px; }
  .wj-header__search { display: none; }
  .wj-account .wj-btn { display: none; }
  .wj-burger { display: inline-flex; flex: none; }

  /* nav becomes an in-flow drawer under the header */
  .wj-nav { position: relative; box-shadow: none; }
  .wj-js .wj-nav:not(.is-open) { display: none; }
  .wj-nav .wj-wrap { padding-top: 12px; padding-bottom: 16px; }
  .wj-nav__mobile { display: block; }
  .wj-nav__mobile .wj-search input { background: #fff; border-color: transparent; }
  .wj-nav__list { flex-direction: column; margin: 10px 0; }
  .wj-nav__list > li > a, .wj-nav__toggle {
    width: 100%; height: 46px; padding: 0 6px; font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .wj-nav__toggle { justify-content: space-between; }
  .wj-nav__list > li > a[aria-current]::after, .wj-nav__toggle[aria-current]::after {
    left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; border-radius: 0 3px 3px 0;
  }
  .wj-nav__list > li > a[aria-current], .wj-nav__toggle[aria-current] { padding-left: 14px; }
  .wj-sub {
    position: static; min-width: 0; grid-template-columns: 1fr;
    margin: 6px 0 10px; padding: 12px 14px; border-radius: 8px; box-shadow: none; border-top-width: 2px;
  }
  .wj-nav__account { display: flex; flex-wrap: wrap; gap: 8px; }
  .wj-nav__account a:not(.wj-btn) { color: #fff; padding: 8px 4px; font-weight: 500; }
  .wj-nav__account .wj-btn { flex: 1; background: #fff; color: var(--crimson) !important; border-color: #fff; }
  .wj-nav__account .wj-btn--ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.5); }

  .wj-menu { position: fixed; left: 12px; right: 12px; top: auto; width: auto; margin-top: 8px; }

  .wj-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 36px; }
  .wj-footer__brand, .wj-footer__license { grid-column: 1 / -1; }
  .wj-pdf__bar { top: 0; }
}

@media (max-width: 520px) {
  body.wj { font-size: 14.5px; }
  .wj-brand__meta span:not(.wj-brand__issn) { display: none; }
  .wj-burger__label { display: none; }
  .wj-footer__grid { grid-template-columns: 1fr; }
  .wj-footer__bottom { flex-direction: column; }
}

/* 9 ─ MOTION & PRINT ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .wj *, .wj *::before, .wj *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .wj-topbar, .wj-nav, .wj-header__search, .wj-account, .wj-burger, .wj-skip, .wj-pdf { display: none !important; }
  .wj-footer { background: none; color: #000; border: 0; }
  .wj-footer a { color: #000; }
}

/* 10 ─ STATIC-PAGE LANGUAGE BLOCKS & SMALL SHARED BITS ─────────────────────── */
[data-only] { display: none; }
html[lang="uz"] [data-only="uz"], html[lang="en"] [data-only="en"], html[lang="ru"] [data-only="ru"] { display: revert; }
.wj-links .widget-header { margin: 0; }
.wj-links a[aria-current] { font-weight: 700; }
/* plain OJS pages (announcements, privacy, profile…) rely on browser spacing for text */
.wj-ojs .pkp_structure_main :where(p, ul, ol, dl, h1, h2, h3, h4, blockquote, table, fieldset) { margin-block: revert; }
.wj-ojs .pkp_structure_main :where(ul, ol) { padding-inline-start: revert; }
.wj-ojs-narrow { padding-top: 32px; padding-bottom: 48px; }
