/* IRJMS layer. Loads after the shared irj-theme.css (identical to IRJMedS) and holds only what differs for IRJMS. */
:root {
  --irj-logo-gold: #C9A227; /* logo only; estimated, sample from the high-resolution file */
  --irj-text-table: 15px;
}

/* Logo: gold mark reads on the dark header (6.9:1 on deep navy), so no plate by default */
.irj-page a.irj-logo {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 4px 0;
  background: transparent;
  border-radius: 0;
  color: var(--irj-white);
  text-decoration: none;
}
.irj-logo__mark { display: block; flex: none; width: 48px; height: 48px; }
.irj-page .irj-logo .irj-logo__name { color: var(--irj-white); font-size: 21px; letter-spacing: .02em; }
.irj-page a.irj-logo:hover .irj-logo__name { color: var(--irj-sky); }
/* Fallback if the real file proves too dark on the photo */
.irj-page a.irj-logo--plate { padding: 6px 12px 6px 8px; background: var(--irj-white); border-radius: var(--irj-radius-control); }
.irj-page a.irj-logo--plate .irj-logo__name { color: var(--irj-navy); }

/* Placeholder label on hero photos, for review only */
.irj-phlabel {
  position: absolute; right: 16px; bottom: 6px; z-index: 2;
  padding: 3px 10px;
  background: rgba(255, 255, 255, .92);
  border-radius: var(--irj-radius-soft);
  color: var(--irj-navy-deep);
  font-size: 12.5px; font-weight: 700; line-height: 1.4;
}

/* Metrics: toggle and year-by-year table */
.irj-metrics__more { display: flex; justify-content: center; margin-top: var(--irj-space-6); }
.irj-metrics__more .irj-btn svg { transition: none; }
.irj-mtablewrap { margin-top: var(--irj-space-6); }
.irj-mtable { width: 100%; border-collapse: collapse; background: var(--irj-white); font-size: var(--irj-text-table); line-height: 1.45; }
.irj-mtable caption { caption-side: top; padding: 0 0 var(--irj-space-3); color: var(--irj-heading); font-family: var(--irj-font-heading); font-size: 18px; font-weight: 700; text-align: left; }
.irj-mtable thead th { padding: 12px 16px; background: var(--irj-navy); color: var(--irj-white); font-size: var(--irj-text-small); font-weight: 700; text-align: left; vertical-align: bottom; }
.irj-mtable tbody th, .irj-mtable td { padding: 12px 16px; border-bottom: 1px solid var(--irj-rule); text-align: left; vertical-align: top; }
.irj-mtable__year { color: var(--irj-navy); font-family: var(--irj-font-metric); font-size: 17px; font-weight: 600; }
.irj-mtable__num { color: var(--irj-heading); font-family: var(--irj-font-metric); font-size: 17px; font-weight: 600; }
.irj-mtable__num small { display: block; color: var(--irj-muted); font-family: var(--irj-font-body); font-size: var(--irj-text-meta); font-weight: 400; }
.irj-mtable__text { color: var(--irj-body); font-size: var(--irj-text-small); font-style: italic; }
.irj-mtable__group th {
  padding: 10px 16px;
  background: var(--irj-band);
  border-top: 3px solid var(--irj-cyan);
  color: var(--irj-navy-deep);
  font-family: var(--irj-font-heading); font-size: 14px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.irj-mtable__group--after th { border-top-color: var(--irj-navy); }
.irj-mtable__break td {
  padding: 14px 16px;
  background: var(--irj-navy);
  color: var(--irj-white);
  font-weight: 700; text-align: center;
}
.irj-mtable__k { display: none; }

/* Shared centred action row */
.irj-centreactions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--irj-space-3); margin-top: var(--irj-space-6); }

/* Indexing row: seven names plus the live SCImago badge */
.irj-logos--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.irj-badgeslot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 112px; padding: var(--irj-space-4);
  background: var(--irj-white); border: 1px dashed #7A8594;
  text-align: center;
}
.irj-badgeslot__name { color: var(--irj-navy); font-family: var(--irj-font-heading); font-size: 16px; font-weight: 700; line-height: 1.3; }
.irj-badgeslot__note { color: var(--irj-muted); font-size: var(--irj-text-meta); line-height: 1.4; }
.irj-page a.irj-badgeslot { text-decoration: none; }
.irj-page a.irj-badgeslot:hover { border-color: var(--irj-navy); border-style: solid; }
.irj-badgeslot--small { min-height: 56px; width: 168px; padding: 6px 10px; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .6); }
.irj-badgeslot--small .irj-badgeslot__name, .irj-badgeslot--small .irj-badgeslot__note { color: var(--irj-white); font-size: 12.5px; }

/* Footer base row with badge */
.irj-foot__base { align-items: center; }
.irj-foot__label { display: block; font-weight: 700; }

/* Cover: IRJMS name is longer, and special issues get their own variant */
.irj-cover__name { font-size: 6.5cqi; }
.irj-cover__ribbon {
  position: absolute; left: 0; right: 0; top: 19.5%;
  padding: 1.6cqi 0;
  background: var(--irj-navy);
  color: var(--irj-white);
  font-family: var(--irj-font-heading); font-size: 4.8cqi; font-weight: 700;
  letter-spacing: .14em; text-align: center; text-transform: uppercase;
}
.irj-cover--special .irj-cover__text { top: 31%; }

/* Tall frames: anything below the footer blends with it */
.irj-page--fill { background: var(--irj-navy-deep); }
.irj-page--fill > main { background: var(--irj-white); }

/* Shared text input */
.irj-input {
  display: block; width: 100%; min-width: 0; min-height: 46px;
  padding: 10px 14px;
  background: var(--irj-white); border: 1px solid #7A8594; border-radius: var(--irj-radius-control);
  color: var(--irj-heading); font-family: var(--irj-font-body); font-size: var(--irj-text-body);
}
.irj-input::placeholder { color: var(--irj-muted); opacity: 1; }

/* Issue tools: search within the issue, count */
.irj-issuetools {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px;
  padding-bottom: 20px; border-bottom: 3px solid var(--irj-cyan);
}
.irj-issuetools__search { display: flex; flex: 1 1 380px; flex-direction: column; gap: 6px; max-width: 540px; }
.irj-issuetools__search label { color: var(--irj-heading); font-size: var(--irj-text-small); font-weight: 700; line-height: 1.4; }
.irj-issuetools__count { margin: 0; color: var(--irj-body); font-size: var(--irj-text-small); line-height: 1.5; }
.irj-issuetools__count strong { color: var(--irj-heading); }
.irj-issuetitle { margin: 0 0 var(--irj-space-4); color: var(--irj-heading); font-family: var(--irj-font-heading); font-size: 20px; font-weight: 700; line-height: 1.3; }

/* Article row: compact list for issues with 130+ articles */
.irj-rows { margin: 0; padding: 0; list-style: none; }
.irj-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: start;
  padding: 20px 0; border-bottom: 1px solid var(--irj-rule);
}
.irj-row__type { display: inline-block; margin: 0 0 6px; padding: 2px 8px; background: var(--irj-cyan); color: var(--irj-navy-deep); font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.irj-row__title { margin: 0 0 6px; font-family: var(--irj-font-heading); font-size: 17px; font-weight: 700; line-height: 1.35; }
.irj-page .irj-row__title a { color: var(--irj-navy); text-decoration: none; }
.irj-page .irj-row__title a:hover { text-decoration: underline; }
.irj-row__authors { margin: 0 0 6px; color: var(--irj-body); font-size: var(--irj-text-small); line-height: 1.5; }
.irj-row__meta { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 0; color: var(--irj-body); font-size: var(--irj-text-meta); line-height: 1.5; }
.irj-row__meta strong { color: var(--irj-heading); }
.irj-row__doi { overflow-wrap: anywhere; }
.irj-row__actions { display: flex; gap: var(--irj-space-2); padding-top: 2px; }
.irj-loadmore { display: flex; flex-direction: column; align-items: center; gap: var(--irj-space-2); margin-top: var(--irj-space-6); }
.irj-loadmore p { margin: 0; color: var(--irj-muted); font-size: var(--irj-text-small); }
.irj-noresults { margin-top: var(--irj-space-4); padding: var(--irj-space-5); background: var(--irj-band); color: var(--irj-heading); }

/* Editorial board */
.irj-boardtools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 0 0 var(--irj-space-5); }
.irj-people--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.irj-person--lead { padding: var(--irj-space-6) var(--irj-space-5); }
.irj-person--lead .irj-person__name { font-size: 18px; }
.irj-person--compact { align-items: flex-start; gap: 6px; padding: 18px 20px; background: var(--irj-card); border-top: 3px solid var(--irj-cyan); border-radius: 0; text-align: left; }
.irj-person--compact .irj-person__aff { font-style: normal; }
.irj-person__role { margin: 0; color: var(--irj-navy); font-size: var(--irj-text-meta); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }

/* Archives */
.irj-year { border-top: 1px solid var(--irj-rule); }
.irj-year:last-child { border-bottom: 1px solid var(--irj-rule); }
.irj-year > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--irj-space-4);
  min-height: 64px; padding: 12px 0; cursor: pointer; list-style: none;
  color: var(--irj-heading); font-family: var(--irj-font-heading); font-size: 22px; font-weight: 700;
}
.irj-year > summary::-webkit-details-marker { display: none; }
.irj-year__meta { margin-left: auto; color: var(--irj-body); font-family: var(--irj-font-body); font-size: var(--irj-text-small); font-weight: 400; }
.irj-year > summary svg { flex: none; color: var(--irj-navy); }
.irj-year[open] > summary svg { transform: rotate(180deg); }
.irj-year .irj-archive { padding: var(--irj-space-2) 0 var(--irj-space-6); }

/* Forms: numbered sections, paired reviewer boxes, declarations */
.irj-form legend { display: flex; align-items: center; gap: var(--irj-space-3); }
.irj-form__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--irj-space-5); }
.irj-form__box { display: grid; gap: var(--irj-space-4); min-width: 0; padding: 20px; background: var(--irj-band); border-top: 3px solid var(--irj-cyan); }
.irj-form__boxtitle { margin: 0; color: var(--irj-navy); font-family: var(--irj-font-heading); font-size: 16px; font-weight: 700; line-height: 1.35; }
.irj-form input[type="checkbox"] { display: inline-block; flex: none; width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--irj-navy); }
.irj-form label.irj-check { display: flex; align-items: flex-start; gap: var(--irj-space-3); font-size: 15px; font-weight: 400; line-height: 1.5; }
.irj-declarations { display: grid; gap: 14px; padding: 20px; background: var(--irj-band); border-top: 3px solid var(--irj-cyan); }
.irj-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--irj-space-4); }

/* Pagination */
.irj-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--irj-space-2); margin: 40px 0 0; padding: 0; list-style: none; }
.irj-page .irj-pager a, .irj-pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--irj-rule); border-radius: var(--irj-radius-control);
  color: var(--irj-navy); font-size: var(--irj-text-small); font-weight: 700; text-decoration: none;
}
.irj-page .irj-pager a:hover { border-color: var(--irj-navy); }
.irj-page .irj-pager a[aria-current="page"] { background: var(--irj-navy); border-color: var(--irj-navy); color: var(--irj-white); }
.irj-pager span { border-color: transparent; color: var(--irj-body); font-weight: 400; }
.irj-resultkind { display: inline-block; margin: 0 0 6px; padding: 2px 8px; background: var(--irj-band); color: var(--irj-navy); font-size: 12.5px; font-weight: 700; line-height: 1.4; }

/* Tablet */
@container irj-page (max-width: 1100px) {
  .irj-logos--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container irj-page (max-width: 960px) {
  .irj-people--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .irj-form__pair { grid-template-columns: minmax(0, 1fr); }
}
@container irj-page (max-width: 600px) {
  .irj-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 0; }
  .irj-row__actions .irj-btn { flex: 1 1 0; }
  .irj-issuetools__search { flex-basis: 100%; max-width: none; }
  .irj-people--three { grid-template-columns: minmax(0, 1fr); }
  .irj-year > summary { font-size: 19px; }
  .irj-form__box { padding: 16px; }
  .irj-pager { gap: 6px; }
}
@container irj-page (max-width: 960px) {
  .irj-logos--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phone: table rows become labelled blocks, so nothing scrolls sideways */
@container irj-page (max-width: 600px) {
  .irj-page a.irj-logo { gap: 10px; }
  .irj-logo__mark { width: 40px; height: 40px; }
  .irj-page .irj-logo .irj-logo__name { font-size: 19px; }
  .irj-mtable, .irj-mtable tbody, .irj-mtable tr, .irj-mtable th, .irj-mtable td { display: block; }
  .irj-mtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .irj-mtable caption { display: block; }
  .irj-mtable tbody tr:not(.irj-mtable__group):not(.irj-mtable__break) {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px;
    padding: 12px 12px 14px;
    border-bottom: 1px solid var(--irj-rule);
  }
  .irj-mtable tbody tr:not(.irj-mtable__group):not(.irj-mtable__break) > * { padding: 0; border: 0; }
  .irj-mtable tbody tr:not(.irj-mtable__group):not(.irj-mtable__break) > th { grid-column: 1 / -1; }
  .irj-mtable__k { display: block; color: var(--irj-muted); font-family: var(--irj-font-body); font-size: 12.5px; font-weight: 400; line-height: 1.3; }
  .irj-mtable__num { font-size: 16px; }
  .irj-mtable__group th { padding: 10px 12px; }
  .irj-mtable__break td { padding: 12px; text-align: left; }
  .irj-metrics__more .irj-btn { width: 100%; }
  .irj-centreactions .irj-btn { width: 100%; }
  .irj-logos--row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--irj-space-3); }
  .irj-logocard__name { font-size: 16px; }
  .irj-badgeslot { min-height: 88px; }
  .irj-phlabel { right: 8px; bottom: 4px; font-size: 12px; }
}

/* ==========================================================================
   WordPress: IRJMS forms as Contact Form 7 renders them (the form templates are not edited)
   ========================================================================== */
/* Numbered sections: the form's h3 headings and top-level legends get the design's number squares. */
.irj-form.wpcf7-form { counter-reset: irj-step; }
.irj-form.wpcf7-form > h3, .irj-form.wpcf7-form > fieldset > legend { display: flex; align-items: center; gap: var(--irj-space-3); }
.irj-form.wpcf7-form > h3::before, .irj-form.wpcf7-form > fieldset > legend::before {
  counter-increment: irj-step; content: counter(irj-step);
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px;
  background: var(--irj-navy); color: var(--irj-white); font-family: var(--irj-font-metric); font-size: 16px; font-weight: 600;
}
/* Suggested reviewers: two boxes side by side. */
.irj-form.wpcf7-form > fieldset:has(> fieldset) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--irj-space-5); }
.irj-form fieldset fieldset { display: grid; gap: var(--irj-space-4); margin: 0; padding: 20px; background: var(--irj-band); border-top: 3px solid var(--irj-cyan); }
.irj-form fieldset fieldset > legend { float: left; margin: 0; color: var(--irj-navy); font-family: var(--irj-font-heading); font-size: 16px; font-weight: 700; line-height: 1.35; }
.irj-form fieldset fieldset p { margin: 0; }
/* Declarations: the checkboxes sit in one tinted box. */
.irj-form.wpcf7-form > p:has(.wpcf7-checkbox) { grid-column: 1 / -1 !important; display: grid; gap: 14px; padding: 20px; background: var(--irj-band); border-top: 3px solid var(--irj-cyan); }
.irj-form .wpcf7-checkbox .wpcf7-list-item { display: block; margin: 0; }
.irj-form .wpcf7-list-item label { display: flex; align-items: flex-start; gap: var(--irj-space-3); font-size: 15px; font-weight: 400; line-height: 1.5; }
/* "* All fields are mandatory" above the submission form. */
.irj-submission > p:first-child { margin: 0 0 var(--irj-space-5); color: var(--irj-heading); font-weight: 700; text-align: left !important; }
/* Search pager: the current page is a span in core's markup. */
.irj-page .irj-pager span[aria-current="page"] { background: var(--irj-navy); border-color: var(--irj-navy); color: var(--irj-white); font-weight: 700; }
/* SCImago badge image inside the badge slot. */
.irj-badgeslot img { display: block; max-width: 100%; height: auto; }
.irj-badgeslot--small { padding: 4px; }
@container irj-page (max-width: 960px) {
  .irj-form.wpcf7-form > fieldset:has(> fieldset) { grid-template-columns: minmax(0, 1fr); }
}
