/* YMJ v13 - common header/footer and a shared home-card content column.
   Loaded after style.css and volumes.css on every page.
   Use scoped identity selectors: legacy `.brand span` rules must not win.
   No external assets or font files are added. */
:root {
  --ymj-header-start: #102659;
  --ymj-header-end: #204cb1;
  --ymj-footer-dark: #122d6a;
  --ymj-footer-light: #204cb1;
  --ymj-chrome-width: 1240px;
}

/* Widen the home card rather than hiding or truncating the journal title.
   A smaller column gap preserves most of the width of the article panel. */
.home .home-wrap {
  grid-template-columns: 480px minmax(0, 1fr);
  gap: 60px;
}
.home .top-lead, .home .top-main { min-width: 0; }
.home .top-lead-head {
  padding: 52px 32px 18px;
  container-type: inline-size;
}
.home .home-brand {
  --ymj-title-size: 25px;
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  text-align: center;
  transition: color .2s ease, opacity .2s ease;
  white-space: nowrap;
  font-size: var(--ymj-fitted-size, var(--ymj-title-size));
  line-height: 1.3;
  letter-spacing: .01em;
}
/* Center the two-line identity as one unit, but align both lines at the left.
   The outer link keeps its full-width separator and the existing title sizing. */
.home .home-brand-text {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
  text-align: left;
}
.home .home-brand small {
  text-align: left;
  white-space: normal;
}
@supports (font-size: 1cqi) {
  .home .home-brand { --ymj-title-size: min(25px, 6.3cqi); }
}

/* Shared inner-page header. Original blue gradient is unchanged. */
.site-header, .volumes-page .site-header {
  position: relative;
  z-index: 10;
  color: #fff;
  background: #102659;
  background: linear-gradient(128deg, var(--ymj-header-start) 0%, var(--ymj-header-end) 55%);
}
.site-header .wrap, .volumes-page .site-header .wrap {
  width: min(calc(100% - 48px), var(--ymj-chrome-width));
  margin-left: auto;
  margin-right: auto;
}
.site-header .header-row, .volumes-page .site-header .header-row {
  position: relative;
  min-height: 92px;
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.site-header .brand, .volumes-page .site-header .brand {
  min-width: 0;
  flex: 1 1 auto;
  color: #fff;
  transition: color .2s ease, opacity .2s ease;
  font-family: var(--ymj-font-display);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: .02em;
  white-space: normal;
}
.site-header .brand .brand-mainline {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.3;
}
.site-header .brand .brand-title {
  --ymj-title-size: 28px;
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
  font-family: var(--ymj-font-display);
  font-size: var(--ymj-fitted-size, var(--ymj-title-size));
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: .01em;
}
.site-header .brand .brand-issn {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
  font-family: var(--ymj-font-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .02em;
}
.site-header .brand .brand-university {
  display: block;
  text-align: left;
  margin: 4px 0 0;
  font-family: var(--ymj-font-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .02em;
}
.site-header .nav, .volumes-page .site-header .nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: none;
  font-family: var(--ymj-font-display);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.site-header .nav a, .volumes-page .site-header .nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  color: #fff;
  white-space: nowrap;
}
.site-header .nav a[aria-current="page"],
.volumes-page .site-header .nav a[aria-current="page"] {
  padding: 0;
  border: 0;
}
.site-header .nav a:hover, .volumes-page .site-header .nav a:hover {
  color: #cbcbcb;
  opacity: 1;
}
.site-header .nav-symbol, .volumes-page .site-header .nav-symbol {
  width: 16px;
  height: 16px;
  flex: none;
}

/* Shared footer: original theme uses two solid blues, not page-specific shades. */
.site-footer,
.volumes-page .site-footer{
  margin-top:0;
  color:#fff;
  background:var(--ymj-footer-dark);
}
.site-footer .wrap,
.volumes-page .site-footer .wrap{
  width:min(calc(100% - 48px),var(--ymj-chrome-width));
  margin-left:auto;
  margin-right:auto;
}
.site-footer .footer-row,
.volumes-page .site-footer .footer-row{
  min-height:150px;
  padding-top:20px;
  padding-bottom:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:50px;
}
.site-footer .footer-brand,
.volumes-page .site-footer .footer-brand{
  color:#fff;
  font-family:var(--ymj-font-display,"futura-pt","Futura PT",Futura,"Century Gothic",sans-serif);
  font-size:clamp(18px,2.1vw,25px);
  font-weight:300;
  line-height:1.3;
  letter-spacing:.02em;
  white-space:nowrap;
}
.site-footer .footer-brand small,
.volumes-page .site-footer .footer-brand small{
  display:block;
  margin-top:6px;
  font-family:var(--ymj-font-text,"roboto","Roboto",Arial,sans-serif);
  font-size:12px;
  font-weight:400;
}
.site-footer .footer-contact,
.volumes-page .site-footer .footer-contact{
  padding-left:30px;
  border-left:1px solid #93a0bc;
  color:#fff;
  font-family:var(--ymj-font-text,"roboto","Roboto",Arial,sans-serif);
  font-size:12px;
  font-style:normal;
  line-height:1.5;
}
.site-footer a,
.volumes-page .site-footer a{color:#fff;}
.site-footer .copyright,
.volumes-page .site-footer .copyright{
  padding:0;
  background:var(--ymj-footer-light);
  color:#fff;
  font-size:10px;
}
.site-footer .copyright .wrap,
.volumes-page .site-footer .copyright .wrap{
  padding-top:20px;
  padding-bottom:20px;
}

/* Responsive layout: ISSN remains to the RIGHT of the journal title. */
@media (max-width: 1200px) and (min-width: 981px) {
  .home .home-wrap { grid-template-columns: 420px minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 1000px) {
  .site-header .menu-btn, .volumes-page .site-header .menu-btn { display: block; flex: none; }
  .site-header .nav, .volumes-page .site-header .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 18px;
    background: var(--ymj-footer-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
  }
  .site-header .nav.open, .volumes-page .site-header .nav.open { display: flex; }
}
@media (max-width: 980px) {
  .home .home-wrap {
    width: min(calc(100% - 40px), 680px);
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .home .top-main { padding-top: 0; }
}
@media (max-width: 780px) {
  .home .home-wrap { width: min(calc(100% - 28px), 680px); gap: 28px; }
  .home .top-lead-head { padding: 36px 26px 16px; }
  .site-header .wrap, .volumes-page .site-header .wrap,
  .site-footer .wrap, .volumes-page .site-footer .wrap {
    width: min(calc(100% - 28px), var(--ymj-chrome-width));
  }
  .site-header .header-row, .volumes-page .site-header .header-row {
    min-height: 82px;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 14px;
  }
  .site-header .brand .brand-title { --ymj-title-size: clamp(13px, 4.1vw, 28px); }
  .site-header .brand .brand-mainline { gap: 12px; }
  .site-header .brand .brand-issn { font-size: 11px; }
  .site-footer .footer-row, .volumes-page .site-footer .footer-row {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 32px;
    padding-bottom: 32px;
    gap: 20px;
  }
  .site-footer .footer-contact, .volumes-page .site-footer .footer-contact {
    width: 100%;
    padding: 18px 0 0;
    border-left: 0;
    border-top: 1px solid #93a0bc;
  }
}
@media (max-width: 620px) {
  /* Menu shares the lower line, leaving the entire top line for title + ISSN. */
  .site-header .header-row, .volumes-page .site-header .header-row {
    min-height: 84px;
    gap: 0;
  }
  .site-header .brand, .volumes-page .site-header .brand { flex-basis: 100%; width: 100%; }
  .site-header .brand .brand-mainline { gap: 10px; }
  .site-header .brand .brand-university {
    margin-top: 8px;
    padding-right: 76px;
    font-size: 11px;
    line-height: 28px;
  }
  .site-header .menu-btn, .volumes-page .site-header .menu-btn {
    position: absolute;
    right: 0;
    bottom: 14px;
    margin: 0;
    padding: 4px 9px;
    font-size: 12px;
    line-height: 18px;
  }
}
@media (max-width: 470px) {
  .site-header .brand .brand-mainline { gap: 8px; }
  .site-header .brand .brand-issn { font-size: 10px; }
  .site-footer .footer-brand, .volumes-page .site-footer .footer-brand {
    font-size: clamp(16px, 5vw, 21px);
  }
}
@media (max-width: 350px) {
  .site-header .brand .brand-issn { font-size: 9px; }
}

/* Only used after submitting a search; not an editorial or verification note. */
.volumes-page .volume-card[hidden],
.volumes-page .paper-row[hidden] { display: none; }
.search-results-summary { margin: 0 0 24px; font-size: 13px; }
.search-results-summary a { text-decoration: underline; text-underline-offset: 3px; }

/* v13: align the entire left card to the actual centered journal title.
   The title keeps its independent fitting box, avoiding resize feedback.
   site.js updates these insets after measuring the locally rendered font. */
.home .home-brand {
  position: relative;
  border-bottom-color: transparent;
}
.home .home-brand::after {
  content: "";
  position: absolute;
  left: var(--ymj-home-head-inset, 0px);
  right: var(--ymj-home-head-inset, 0px);
  bottom: -1px;
  height: 1px;
  background: rgba(255,255,255,.65);
  pointer-events: none;
}
.home .top-lead-head > .top-issn,
.home .top-lead-head > nav,
.home .top-lead-head > .search-box {
  margin-left: var(--ymj-home-head-inset, 0px);
  margin-right: var(--ymj-home-head-inset, 0px);
}
.home .lead-body {
  padding-left: var(--ymj-home-card-inset, 32px);
  padding-right: var(--ymj-home-card-inset, 32px);
}
/* A rotated square paints 3.314px beyond its 16px layout box.
   Include that overhang so its VISIBLE left tip aligns with the title. */
.home .home-nav .nav-symbol:not(.round):not(.tri) {
  margin-left: 3.314px;
  margin-right: 3.314px;
}
@media (max-width: 780px) {
  .home .lead-body {
    padding-left: var(--ymj-home-card-inset, 26px);
    padding-right: var(--ymj-home-card-inset, 26px);
  }
}
@media (max-width: 470px) {
  /* Keep all three links on one row where the shared text column allows it. */
  .home .home-nav { column-gap: 12px; }
}
