/*
 * GPI Journal Design System v1.0 (2026-11-27)
 * ------------------------------------------------------------------
 * A component + token layer loaded LAST on public pages (after the
 * legacy inline <style> in header.tpl) and on backend pages.
 *
 * Contract: layout, menu order and button positions are untouched.
 * This file never changes display / grid / position / width / margin
 * of page regions. It only defines tokens and the look of components:
 * type, colour, surfaces, buttons, links, cards, tables, forms, focus,
 * motion. Remove the <link> to roll back instantly.
 * ------------------------------------------------------------------
 */

/* ---------- 1. Typeface: Plus Jakarta Sans (UI/body) + Fraunces (display)
 * Legacy CSS hard-codes "Open Sans", Poppins and Montserrat in hundreds of
 * !important rules. Instead of fighting specificity we alias those family
 * names to Plus Jakarta Sans: every legacy rule now renders the new face,
 * while icon fonts (Font Awesome) keep their own family. */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIuaomQNQcsA88c7O9yZ4KMCoOg4Koz4y6qhA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(https://fonts.gstatic.com/s/fraunces/v38/6NU78FyLNQOQZAnv9bYEvDiIdE9Ea92uemAk_WBq8U_9v0c2Wa0KxC9TeA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(https://fonts.gstatic.com/s/fraunces/v38/6NU78FyLNQOQZAnv9bYEvDiIdE9Ea92uemAk_WBq8U_9v0c2Wa0KxCFTeO-U.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Aliases: legacy family names -> Plus Jakarta Sans (latin + latin-ext). */
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF; }
@font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 200 900; font-display: swap; src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIuaomQNQcsA88c7O9yZ4KMCoOg4Koz4y6qhA.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- 2. Tokens ---------------------------------------------- */
:root {
  /* primitives */
  --gp-ink-950: #0b1526;
  --gp-ink-900: #111f36;
  --gp-ink-800: #1b2c47;
  --gp-ink-700: #2b3b55;
  --gp-ink-600: #435069;
  --gp-ink-500: #5b667b;   /* 4.9:1 on paper */
  --gp-ink-300: #a9b2c2;
  --gp-ink-200: #d7dde7;
  --gp-ink-100: #e9edf3;
  --gp-ink-50:  #f4f6f9;
  --gp-paper:   #f8f7f4;   /* warm page ground */
  --gp-surface: #fffffe;   /* cards */
  --gp-red-700: #a1231d;
  --gp-red-600: #bd2c25;   /* brand red from logo, 5.6:1 with white */
  --gp-red-500: #d1372f;
  --gp-red-50:  #fdf1f0;
  --gp-blue-700:#1c4f8a;   /* reading links, 7:1 on surface */
  --gp-green-700:#1d6b4f;

  /* semantic */
  --gp-text:        var(--gp-ink-900);
  --gp-text-muted:  var(--gp-ink-600);
  --gp-text-subtle: var(--gp-ink-500);
  --gp-link:        var(--gp-blue-700);
  --gp-link-hover:  var(--gp-red-600);
  --gp-accent:      var(--gp-red-600);
  --gp-accent-hover:var(--gp-red-700);
  --gp-accent-soft: var(--gp-red-50);
  --gp-line:        rgba(17, 31, 54, 0.10);
  --gp-line-strong: rgba(17, 31, 54, 0.16);

  /* type */
  --gp-font-sans: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --gp-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --gp-text-xs: 0.75rem;
  --gp-text-sm: 0.8125rem;
  --gp-text-base: 0.9375rem;
  --gp-leading: 1.7;

  /* shape + depth */
  --gp-radius-sm: 8px;
  --gp-radius-md: 12px;
  --gp-radius-lg: 16px;
  --gp-radius-pill: 999px;
  --gp-shadow-1: 0 1px 2px rgba(11, 21, 38, 0.04), 0 1px 1px rgba(11, 21, 38, 0.02);
  --gp-shadow-2: 0 1px 2px rgba(11, 21, 38, 0.04), 0 12px 32px -18px rgba(11, 21, 38, 0.18);
  --gp-shadow-3: 0 2px 4px rgba(11, 21, 38, 0.05), 0 22px 48px -24px rgba(11, 21, 38, 0.28);
  --gp-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --gp-ring: 0 0 0 3px rgba(189, 44, 37, 0.28);

  /* motion */
  --gp-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gp-ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --gp-dur-fast: 160ms;
  --gp-dur: 280ms;
}

/* ---------- 3. Base ------------------------------------------------- */
html body {
  font-family: var(--gp-font-sans) !important;
  color: var(--gp-text) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}
html body.gp_public_journal { background-color: var(--gp-paper) !important; }

::selection { background: rgba(189, 44, 37, 0.16); color: var(--gp-ink-950); }

html body a:focus-visible,
html body button:focus-visible,
html body input:focus-visible,
html body select:focus-visible,
html body textarea:focus-visible,
html body [tabindex]:focus-visible {
  outline: 2px solid var(--gp-accent) !important;
  outline-offset: 2px !important;
  box-shadow: var(--gp-ring) !important;
}

/* ---------- 4. Surfaces: main column, journal tools, sidebar blocks --- */
html body .pkp_structure_content.gp-layout-journal-public > .pkp_structure_main {
  background: var(--gp-surface) !important;
  border: 1px solid var(--gp-line) !important;
  border-radius: var(--gp-radius-lg) !important;
  box-shadow: var(--gp-shadow-2), var(--gp-highlight) !important;
}
html body .pkp_structure_content.gp-layout-journal-public .gp-journal-tools-panel,
html body .pkp_structure_content.gp-layout-journal-public > .pkp_structure_sidebar .pkp_block {
  background: var(--gp-surface) !important;
  border: 1px solid var(--gp-line) !important;
  border-radius: var(--gp-radius-md) !important;
  box-shadow: var(--gp-shadow-1), var(--gp-highlight) !important;
}

/* Block titles and tool group labels read as quiet eyebrows. */
html body .pkp_structure_content.gp-layout-journal-public > .pkp_structure_sidebar .pkp_block .title,
html body .pkp_structure_content.gp-layout-journal-public > .pkp_structure_sidebar .pkp_block h2:not(.pkp_screen_reader),
html body .pkp_structure_content.gp-layout-journal-public > .pkp_structure_sidebar .pkp_block h3,
html body .gp-journal-tools .gp-journal-tools-title,
html body .gp-journal-tools .gp-journal-tools-group > :is(h3, h4, strong, span):first-child {
  font-family: var(--gp-font-sans) !important;
  font-size: var(--gp-text-xs) !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  color: var(--gp-text-subtle) !important;
}

/* Tool + sidebar navigation links: readable size, calm hairline pills. */
html body .gp-journal-tools a,
html body .pkp_structure_content.gp-layout-journal-public > .pkp_structure_sidebar .pkp_block li a,
html body .pkp_structure_content.gp-layout-journal-public > .pkp_structure_sidebar .pkp_block p a:not(:has(img)) {
  font-family: var(--gp-font-sans) !important;
  font-size: var(--gp-text-sm) !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: var(--gp-ink-700) !important;
  background: var(--gp-surface) !important;
  border: 1px solid var(--gp-line) !important;
  border-radius: var(--gp-radius-sm) !important;
  min-height: 32px;
  text-decoration: none !important;
  transition: background-color var(--gp-dur-fast) var(--gp-ease-out),
              color var(--gp-dur-fast) var(--gp-ease-out),
              border-color var(--gp-dur-fast) var(--gp-ease-out),
              box-shadow var(--gp-dur) var(--gp-ease-out),
              transform var(--gp-dur) var(--gp-ease-spring) !important;
}
html body .gp-journal-tools a:hover,
html body .pkp_structure_content.gp-layout-journal-public > .pkp_structure_sidebar .pkp_block li a:hover,
html body .pkp_structure_content.gp-layout-journal-public > .pkp_structure_sidebar .pkp_block p a:not(:has(img)):hover {
  color: var(--gp-ink-950) !important;
  background: var(--gp-ink-50) !important;
  border-color: var(--gp-line-strong) !important;
  transform: translateX(2px);
}
html body .gp-journal-tools a.is-active,
html body .gp-journal-tools a[aria-current="page"] {
  color: var(--gp-accent) !important;
  background: var(--gp-accent-soft) !important;
  border-color: rgba(189, 44, 37, 0.22) !important;
  box-shadow: inset 3px 0 0 var(--gp-accent) !important;
}
html body .gp-journal-tools a i,
html body .gp-journal-tools a .fa,
html body .gp-journal-tools a .fas { color: var(--gp-ink-500) !important; transition: color var(--gp-dur-fast) var(--gp-ease-out) !important; }
html body .gp-journal-tools a:hover i,
html body .gp-journal-tools a.is-active i { color: var(--gp-accent) !important; }

/* ---------- 5. Typography inside the reading column ---------------- */
html body .pkp_structure_main :is(p, li, dd, td) {
  font-size: var(--gp-text-base) !important;
  line-height: var(--gp-leading) !important;
  color: var(--gp-ink-700) !important;
}
html body .pkp_structure_main :is(h1, .page_title),
html body .pkp_structure_main .obj_article_details > .page_title,
html body .pkp_structure_main .obj_issue_toc .heading h2 {
  font-family: var(--gp-font-display) !important;
  font-weight: 600 !important;
  font-optical-sizing: auto;
  letter-spacing: -0.015em !important;
  line-height: 1.18 !important;
  color: var(--gp-ink-950) !important;
  text-wrap: balance;
}
html body .pkp_structure_main :is(h2, h3):not(.pkp_screen_reader) {
  font-family: var(--gp-font-sans) !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: var(--gp-ink-900) !important;
  text-wrap: balance;
}
html body .pkp_structure_main .item > h2.label,
html body .pkp_structure_main .sub_item > h2.label,
html body .pkp_structure_main section.item > .label {
  font-size: var(--gp-text-xs) !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase;
  color: var(--gp-text-subtle) !important;
}

/* Reading links */
html body .pkp_structure_main a:not([class*="btn"]):not(.obj_galley_link):not(.cmp_button):not(.cover):not(:has(img)) {
  color: var(--gp-link) !important;
  text-decoration-line: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
  text-decoration-color: rgba(28, 79, 138, 0.35) !important;
  transition: color var(--gp-dur-fast) var(--gp-ease-out), text-decoration-color var(--gp-dur-fast) var(--gp-ease-out) !important;
}
html body .pkp_structure_main a:not([class*="btn"]):not(.obj_galley_link):not(.cmp_button):not(.cover):not(:has(img)):hover {
  color: var(--gp-link-hover) !important;
  text-decoration-color: currentColor !important;
}
html body .pkp_structure_main .obj_article_summary .title a,
html body .pkp_structure_main .gp-article-card .title a {
  font-family: var(--gp-font-display) !important;
  font-weight: 600 !important;
  font-size: 1.0625rem !important;
  line-height: 1.35 !important;
  color: var(--gp-ink-950) !important;
  text-decoration: none !important;
}
html body .pkp_structure_main .obj_article_summary .title a:hover,
html body .pkp_structure_main .gp-article-card .title a:hover { color: var(--gp-accent) !important; }

html body .pkp_structure_main .cmp_breadcrumbs a {
  color: var(--gp-accent) !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}
html body .pkp_structure_main .cmp_breadcrumbs a:hover { text-decoration: underline !important; text-underline-offset: 3px !important; }

/* ---------- 6. Article cards on issue / archive pages -------------- */
html body .pkp_structure_main .obj_article_summary,
html body .pkp_structure_main .gp-article-card {
  background: var(--gp-surface) !important;
  border: 1px solid var(--gp-line) !important;
  border-radius: var(--gp-radius-md) !important;
  box-shadow: var(--gp-shadow-1) !important;
  transition: box-shadow var(--gp-dur) var(--gp-ease-out), border-color var(--gp-dur) var(--gp-ease-out), transform var(--gp-dur) var(--gp-ease-spring) !important;
}
html body .pkp_structure_main .obj_article_summary:hover,
html body .pkp_structure_main .gp-article-card:hover {
  border-color: var(--gp-line-strong) !important;
  box-shadow: var(--gp-shadow-3) !important;
  transform: translateY(-2px);
}
html body .pkp_structure_main .obj_article_summary :is(.authors, .pages, .meta),
html body .pkp_structure_main .gp-article-card :is(.authors, .pages, .meta) {
  color: var(--gp-text-muted) !important;
  font-size: var(--gp-text-sm) !important;
  font-variant-numeric: tabular-nums;
}

/* ---------- 7. Buttons --------------------------------------------- */
/* Primary: brand red pill (header Submit, make-submission, form submits) */
html body #mainHeader .gp-header-actions a:last-child,
html body .block_make_submission_link,
html body .pkp_structure_main :is(button.submit, input[type="submit"], .cmp_form .buttons button[type="submit"]),
html body .jl-btn.jl-btn-primary {
  font-family: var(--gp-font-sans) !important;
  font-weight: 700 !important;
  letter-spacing: 0.005em !important;
  color: #fffdfc !important;
  background: linear-gradient(180deg, var(--gp-red-500), var(--gp-red-600)) !important;
  border: 1px solid var(--gp-red-700) !important;
  border-radius: var(--gp-radius-pill) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 8px 20px -10px rgba(161, 35, 29, 0.55) !important;
  text-decoration: none !important;
  transition: transform var(--gp-dur) var(--gp-ease-spring), box-shadow var(--gp-dur) var(--gp-ease-out), filter var(--gp-dur-fast) var(--gp-ease-out) !important;
}
html body #mainHeader .gp-header-actions a:last-child:hover,
html body .block_make_submission_link:hover,
html body .pkp_structure_main :is(button.submit, input[type="submit"]):hover,
html body .jl-btn.jl-btn-primary:hover {
  filter: brightness(1.04) saturate(1.05);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 14px 28px -12px rgba(161, 35, 29, 0.6) !important;
  transform: translateY(-1px);
}
html body #mainHeader .gp-header-actions a:last-child:active,
html body .block_make_submission_link:active,
html body .pkp_structure_main :is(button.submit, input[type="submit"]):active,
html body .jl-btn.jl-btn-primary:active { transform: translateY(0) scale(0.98); }

/* Secondary: hairline pill (Login, outline buttons, cite formats, galleys) */
html body #mainHeader .btn-login,
html body .jl-btn.jl-btn-outline,
html body .pkp_structure_main .cmp_button,
html body .pkp_structure_main a.obj_galley_link {
  font-family: var(--gp-font-sans) !important;
  font-weight: 700 !important;
  color: var(--gp-ink-800) !important;
  background: var(--gp-surface) !important;
  border: 1px solid var(--gp-line-strong) !important;
  border-radius: var(--gp-radius-pill) !important;
  box-shadow: var(--gp-shadow-1) !important;
  text-decoration: none !important;
  transition: color var(--gp-dur-fast) var(--gp-ease-out), border-color var(--gp-dur-fast) var(--gp-ease-out), background-color var(--gp-dur-fast) var(--gp-ease-out), transform var(--gp-dur) var(--gp-ease-spring), box-shadow var(--gp-dur) var(--gp-ease-out) !important;
}
html body .pkp_structure_main a.obj_galley_link { color: var(--gp-accent) !important; border-color: rgba(189, 44, 37, 0.35) !important; }
html body #mainHeader .btn-login:hover,
html body .jl-btn.jl-btn-outline:hover,
html body .pkp_structure_main .cmp_button:hover {
  color: var(--gp-ink-950) !important;
  border-color: var(--gp-ink-300) !important;
  box-shadow: var(--gp-shadow-2) !important;
  transform: translateY(-1px);
}
html body .pkp_structure_main a.obj_galley_link:hover {
  color: #fffdfc !important;
  background: var(--gp-accent) !important;
  border-color: var(--gp-accent) !important;
  transform: translateY(-1px);
}
html body #mainHeader .btn-login:active,
html body .jl-btn.jl-btn-outline:active,
html body .pkp_structure_main .cmp_button:active,
html body .pkp_structure_main a.obj_galley_link:active { transform: scale(0.98); }

/* ---------- 8. Forms (login, register, search, profile) ------------ */
html body .pkp_structure_main :is(input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="tel"], input[type="number"], input:not([type]), select, textarea) {
  font-family: var(--gp-font-sans) !important;
  font-size: var(--gp-text-base) !important;
  color: var(--gp-text) !important;
  background: var(--gp-surface) !important;
  border: 1px solid var(--gp-line-strong) !important;
  border-radius: var(--gp-radius-sm) !important;
  min-height: 40px;
  box-shadow: inset 0 1px 2px rgba(11, 21, 38, 0.04) !important;
  transition: border-color var(--gp-dur-fast) var(--gp-ease-out), box-shadow var(--gp-dur-fast) var(--gp-ease-out) !important;
}
html body .pkp_structure_main :is(input, select, textarea):hover { border-color: var(--gp-ink-300) !important; }
html body .pkp_structure_main :is(input, select, textarea):focus {
  border-color: var(--gp-accent) !important;
  box-shadow: var(--gp-ring) !important;
  outline: none !important;
}
html body .pkp_structure_main .cmp_form label,
html body .pkp_structure_main .cmp_form .label { font-weight: 600 !important; color: var(--gp-ink-800) !important; }
html body .pkp_structure_main .cmp_form .required { color: var(--gp-accent) !important; }

/* ---------- 9. Tables (indexing, statistics, custom blocks) -------- */
html body .pkp_structure_main table { border-collapse: separate !important; border-spacing: 0 !important; border: 1px solid var(--gp-line) !important; border-radius: var(--gp-radius-sm) !important; overflow: hidden; }
html body .pkp_structure_main table th {
  background: var(--gp-ink-50) !important;
  color: var(--gp-ink-800) !important;
  font-size: var(--gp-text-sm) !important;
  font-weight: 700 !important;
  border-bottom: 1px solid var(--gp-line) !important;
}
html body .pkp_structure_main table td { border-color: var(--gp-line) !important; font-variant-numeric: tabular-nums; }
html body .pkp_structure_main table tr:nth-child(even) > td { background-color: rgba(244, 246, 249, 0.55); }

/* ---------- 10. Journal masthead + header refinements -------------- */
html body #mainHeader { box-shadow: 0 1px 0 var(--gp-line), 0 10px 30px -28px rgba(11, 21, 38, 0.35) !important; }
html body .gp-journal-masthead { color: var(--gp-ink-900) !important; }
html body .gp-journal-masthead :is(h1, .gp-journal-masthead__title, strong:first-child) {
  font-family: var(--gp-font-display) !important;
  font-weight: 600 !important;
  letter-spacing: -0.012em !important;
  color: var(--gp-ink-950) !important;
}
html body .gp-journal-masthead__label { color: var(--gp-text-subtle) !important; letter-spacing: 0.1em !important; }
html body .gp-journal-masthead__value { color: var(--gp-ink-800) !important; font-variant-numeric: tabular-nums; }

/* ---------- 11. Site home directory (jl-*) ------------------------- */
html body .jl-item {
  background: var(--gp-surface) !important;
  border: 1px solid var(--gp-line) !important;
  border-radius: var(--gp-radius-md) !important;
  box-shadow: var(--gp-shadow-1) !important;
  transition: box-shadow var(--gp-dur) var(--gp-ease-out), border-color var(--gp-dur) var(--gp-ease-out) !important;
}
html body .jl-item:hover { border-color: var(--gp-line-strong) !important; box-shadow: var(--gp-shadow-3) !important; }
html body .jl-item-title a { font-family: var(--gp-font-display) !important; font-weight: 600 !important; color: var(--gp-ink-950) !important; letter-spacing: -0.01em !important; }
html body .jl-item-title a:hover { color: var(--gp-accent) !important; }
html body .jl-item-meta, html body .jl-item-meta * { color: var(--gp-text-muted) !important; }
html body .jl-badge-oa { color: var(--gp-green-700) !important; background: #ecf6f1 !important; border-color: rgba(29, 107, 79, 0.25) !important; }
html body .jl-tool-btn { border-radius: var(--gp-radius-pill) !important; transition: background-color var(--gp-dur-fast) var(--gp-ease-out), color var(--gp-dur-fast) var(--gp-ease-out), border-color var(--gp-dur-fast) var(--gp-ease-out) !important; }
html body .jl-tool-btn .jl-tool-count, html body #journalCount { color: var(--gp-ink-700) !important; }
html body .jl-tool-btn.is-active { color: #fffdfc !important; background: var(--gp-ink-900) !important; border-color: var(--gp-ink-900) !important; }
html body .jl-tool-btn.is-active .jl-tool-count { color: #e9edf3 !important; }
html body #alphaNav .jl-alpha-btn { border-radius: var(--gp-radius-sm) !important; transition: background-color var(--gp-dur-fast) var(--gp-ease-out), color var(--gp-dur-fast) var(--gp-ease-out) !important; }
html body #alphaNav .jl-alpha-btn.disabled { color: #7c8698 !important; }
html body .gp-popular-journal-card { border-radius: var(--gp-radius-md) !important; box-shadow: var(--gp-shadow-1) !important; }

/* ---------- 12. Footer contrast ------------------------------------ */
html body footer.pkp_structure_footer_wrapper { background-color: var(--gp-ink-950) !important; }
html body footer.pkp_structure_footer_wrapper :is(p, li, span) { color: #c4ccd9 !important; }
html body footer.pkp_structure_footer_wrapper a { color: #eef2f7 !important; text-underline-offset: 3px; transition: color var(--gp-dur-fast) var(--gp-ease-out) !important; }
html body footer.pkp_structure_footer_wrapper a:hover { color: #ffb4ae !important; }
html body footer.pkp_structure_footer_wrapper :is(h3, h4) { font-family: var(--gp-font-sans) !important; letter-spacing: 0.02em !important; color: #ffffff !important; }

/* ---------- 13. Media: reserve space so lazy images never shift layout --
 * Logo + covers had no width/height, so they rendered 0-2px tall until the
 * lazy request finished and then pushed content down (CLS, #104/#121).
 * aspect-ratio "auto <ratio>" reserves the box, then uses the real ratio. */
html body #mainHeader .gp-brand img { aspect-ratio: auto 2883 / 1000; }
html body footer.pkp_structure_footer_wrapper img[src*="GPJ_logo"] { aspect-ratio: auto 2883 / 1000; }
html body .pkp_structure_main .homepage_image img,
html body .pkp_structure_main .gp-home-current-cover img,
html body .pkp_structure_main .obj_issue_toc .cover img,
html body .pkp_structure_main .obj_issue_summary .cover img,
html body .pkp_structure_main .obj_issue_toc > .heading .cover img {
  aspect-ratio: auto 2 / 3;
  object-fit: cover;
  background-color: var(--gp-ink-50);
  border-radius: var(--gp-radius-sm);
}
html body .jl-item-thumb img,
html body .gp-popular-journal-cover {
  aspect-ratio: auto 2 / 3;
  object-fit: cover;
  background-color: var(--gp-ink-50);
}

/* ---------- 14. Contrast + fixed-bar clearance (audit follow-ups) ----- */
/* Text pairs below 4.5:1 in the legacy palette (#91-style audit, WCAG 1.4.3). */
html body :is(#alphaNav, #drawerAlphaNav) .jl-alpha-btn.disabled { color: var(--gp-ink-500) !important; }
html body [id^="letter-"] > span { color: var(--gp-red-600) !important; }
html body #mainNav > a.active { color: var(--gp-red-600) !important; }
html body .cmp_breadcrumbs .separator,
html body .pkp_structure_main nav.cmp_breadcrumbs ol li span.separator { color: var(--gp-ink-500) !important; }
/* The mobile tools bar is position:fixed (60px + 10px offset) and covered the
 * last controls on the page; give the page matching bottom clearance (#107). */
@media (max-width: 767.98px) {
  html body:has(.jl-mobile-tools-bar),
  html body:has(.gp-mobile-tools-bar) { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
  /* keep focused / scrolled-to controls above the fixed bar too */
  html:has(.jl-mobile-tools-bar), html:has(.gp-mobile-tools-bar) { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 15. Motion preferences --------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html body *, html body *::before, html body *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  html body .gp-journal-tools a:hover,
  html body .pkp_structure_main .obj_article_summary:hover,
  html body .pkp_structure_main .gp-article-card:hover { transform: none !important; }
}
