:root {
  --wv-hero: #4b2636;
  --wv-hero-line: rgba(255,255,255,.22);
  --wv-accent: #a33c5b;
  --wv-blue: #006699;
  --wv-blue-dark: #004f78;
  --wv-ink: #202428;
  --wv-muted: #607080;
  --wv-line: #d2dce2;
  --wv-paper: #fff;
  --wv-soft: #f4f6f7;
  --wv-max: 1184px;
  --wv-body-font: Georgia, 'Times New Roman', Times, serif;
  --wv-ui-font: Arial, Helvetica, sans-serif;
  --wv-header-offset: 20px;
}

.hrl-webview-page, .hrl-webview-index { color: var(--wv-ink); background: #fff; font-family: var(--wv-ui-font); }
.hrl-webview-page *, .hrl-webview-index * { box-sizing: border-box; }
.hrl-webview-page a, .hrl-webview-index a { color: var(--wv-blue); }
.hrl-webview-page { position: relative; left: 50%; width: 100vw; max-width: none !important; margin: 0 0 0 -50vw !important; padding: 0 !important; overflow: visible; }
body.pkp_page_webview { overflow-x: clip; }
body.pkp_page_webview .pkp_structure_content,
body.pkp_page_webview .pkp_structure_main { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
.article-shell { width: min(var(--wv-max), calc(100% - 48px)); margin-inline: auto; }
.hrl-webview-preview-banner { padding: 9px 18px; color: #482800; background: #fff0b5; border-bottom: 1px solid #e5c65e; text-align: center; font-size: 13px; font-weight: 700; }

/* Article hero — mirrors the publication hero while keeping OJS's shared header. */
.article-hero, .metrics-bar { position: relative; width: 100%; max-width: none; margin: 0; }
.article-hero { color: #fff; background: var(--wv-hero); }
.article-hero-inner { padding: 20px 0 21px; }
.article-hero-grid { display: grid; grid-template-columns: minmax(0,1fr) 248px; gap: 44px; align-items: stretch; }
.article-hero-main { min-width: 0; }
.article-breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 13px; font-size: 11px; font-weight: 700; }
.article-breadcrumbs a { color: #fff !important; text-decoration: underline; text-underline-offset: 2px; }
.hrl-webview-page .article-title { display: block; margin: 0; color: #fff; font-family: var(--wv-ui-font) !important; font-size: clamp(40px,4.1vw,56px) !important; line-height: 1.02 !important; font-weight: 780 !important; letter-spacing: -.035em; }
.article-title > span { max-width: 920px; }
.article-subtitle { max-width: 880px; margin: 14px 0 0; color: rgba(255,255,255,.88); font-size: 19px; line-height: 1.4; }
.hero-type-row, .hero-vol-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
.hero-type-row { margin-top: 25px; }
.hero-sep, .hero-meta-sep { color: rgba(255,255,255,.45); }
.article-byline { display: flex; flex-wrap: wrap; gap: 7px 17px; align-items: center; margin: 16px 0 7px; }
.article-byline-person { display: inline-flex; gap: 5px; align-items: center; }
.article-byline-author, .hero-inline-button, .author-details-toggle { appearance: none; padding: 0; color: #fff; background: none; border: 0; cursor: pointer; font: inherit; font-weight: 720; text-decoration: underline; text-underline-offset: 3px; }
.article-byline-author:hover, .article-byline-author:focus-visible, .hero-inline-button:hover, .hero-inline-button:focus-visible { color: #bde8ff; }
.orcid-link { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; }
.orcid-icon { display: block; width: 16px; height: 16px; }
.author-details-toggle { display: inline-flex; gap: 5px; align-items: center; margin: 2px 0 12px; color: #c9eaff; font-size: 11px; text-decoration: none; }
.author-details-toggle svg { width: 16px; height: 16px; transition: transform .18s ease; }
.author-details-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.hero-vol-row a, .hero-inline-button { color: #fff !important; font-size: 12px; font-weight: 720; }
.hero-divider { height: 1px; margin: 20px 0 13px; background: var(--wv-hero-line); }
.hero-action-row { display: flex; flex-wrap: wrap; gap: 13px 18px; align-items: center; min-height: 41px; }
.hero-crossmark { display: inline-flex; align-items: center; min-height: 41px; }
.hero-crossmark a[data-target="crossmark"] { display: inline-flex; padding: 0; background: transparent; border: 0; cursor: pointer; }
.hero-crossmark img { display: block; width: 150px; height: auto; }
.hero-bookmark { appearance: none; display: inline-flex; gap: 8px; align-items: center; min-height: 38px; padding: 8px 15px; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.72); border-radius: 999px; cursor: pointer; font: 700 12px/1 var(--wv-ui-font); }
.hero-bookmark:hover, .hero-bookmark:focus-visible { color: #17212a; background: #fff; }
.hero-bookmark svg { width: 16px; height: 16px; }

.hero-journal-card { align-self: stretch; display: grid; grid-template-rows: auto 1fr auto; min-height: 288px; overflow: hidden; color: var(--wv-ink) !important; background: #f2f3f4; border-top: 5px solid var(--wv-accent); text-decoration: none !important; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.hero-journal-meta { display: flex; flex-direction: column; padding: 13px 12px 10px; background: #fff; }
.hero-journal-from { font-size: 10px; font-weight: 700; }
.hero-journal-name { font-size: 17px; line-height: 1.25; font-weight: 760; }
.hero-journal-cover-wrap { display: flex; align-items: center; justify-content: center; min-height: 130px; overflow: hidden; }
.hero-journal-cover { width: 100%; height: 100%; max-height: 165px; object-fit: contain; }
.hero-journal-footer { display: flex; justify-content: space-between; padding: 9px 12px; color: #17212a; background: #fff; font-size: 10px; font-weight: 800; text-decoration: underline; }

.metrics-bar { min-height: 56px; border-bottom: 1px solid #cdd7de; background: #fff; }
.metrics-bar-inner { display: flex; align-items: center; gap: 27px; min-height: 56px; color: #536477; }
.metric-inline { display: inline-flex; gap: 7px; align-items: center; padding: 0; color: inherit; background: none; border: 0; font-size: 14px; }
.metric-inline strong { color: #153247; font-size: 16px; }
.metric-inline-icon { width: 16px; height: 16px; }
.metric-service-icon { display: block; flex: 0 0 auto; object-fit: contain; }
.metric-crossref-icon { width: 52px; height: 22px; }
.metric-pdf-icon { width: 28px; height: 28px; }
.metric-citedby { cursor: pointer; text-decoration: underline; text-decoration-color: var(--wv-blue); text-underline-offset: 6px; }
.metric-pdf-link { color: inherit !important; text-decoration: none; }
.metric-pdf-link:hover span, .metric-pdf-link:focus-visible span { color: var(--wv-blue); text-decoration: underline; text-underline-offset: 5px; }

.webview-reader-shell { display: grid; grid-template-columns: minmax(0,1fr) minmax(285px,310px); gap: 44px; width: min(var(--wv-max), calc(100% - 48px)); margin: 38px auto 80px; align-items: start; }
.webview-article-column { min-width: 0; }
.hrl-webview-page .scholarly-article { width: 100%; max-width: none; color: #222; font-family: var(--wv-body-font) !important; font-size: 20px !important; line-height: 1.58 !important; }
.article-section { scroll-margin-top: calc(var(--wv-header-offset) + 20px); }
.article-section + .article-section { margin-top: 48px; }
.scholarly-article h2, .author-details-heading h2 { width: 100%; max-width: none; margin: 0 0 22px; padding: 0 0 8px; color: #202124; border-bottom: 1px solid #b7d8e7; font: 700 32px/1.2 var(--wv-ui-font); letter-spacing: -.015em; }
.scholarly-article h3 { margin: 38px 0 14px; font: 700 24px/1.25 var(--wv-ui-font); }
.scholarly-article h4 { margin: 30px 0 10px; font: 700 19px/1.3 var(--wv-ui-font); }
.hrl-webview-page .scholarly-article p { width: 100% !important; max-width: none !important; margin: 0 0 1.35em !important; padding-right: 0 !important; padding-left: 0 !important; line-height: 1.58 !important; }
.article-abstract-content,
.article-fulltext { width: 100% !important; max-width: none !important; margin-right: 0 !important; margin-left: 0 !important; padding-right: 0 !important; padding-left: 0 !important; }
.article-abstract-content > *,
.article-fulltext > * { max-width: 100% !important; margin-right: 0 !important; margin-left: 0 !important; }
.article-fulltext > div,
.article-fulltext > section,
.article-fulltext > article { width: 100% !important; padding-right: 0 !important; padding-left: 0 !important; }
.article-keywords { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 25px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
.article-keywords span { padding: 4px 9px; background: #eef3f5; border-radius: 2px; }
.scholarly-article a { overflow-wrap: anywhere; }
.scholarly-article blockquote { margin: 24px 0; padding: 5px 0 5px 22px; border-left: 4px solid #a8cedf; color: #3f4a51; }
.scholarly-article pre { max-width: 100%; overflow: auto; padding: 17px; background: #f4f5f6; font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.scholarly-article math { max-width: 100%; overflow-x: auto; }

.scholarly-article figure, .webview-object { margin: 32px 0; padding: 15px; overflow: hidden; border: 1px solid #9ccfea; border-radius: 5px; background: #fff; font-family: Arial, Helvetica, sans-serif; }
.scholarly-article figure img { display: block; max-width: 100%; max-height: 620px; margin: 0 auto; object-fit: contain; }
.scholarly-article figcaption { margin-top: 12px; color: #303941; font-size: 12px; line-height: 1.55; }
.object-heading { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin: 0 0 12px; font-size: 13px; }
.object-expand { appearance: none; flex: 0 0 auto; padding: 6px 12px; color: var(--wv-blue); background: #fff; border: 1px solid var(--wv-blue); border-radius: 999px; cursor: pointer; font-size: 11px; font-weight: 750; }
.object-expand:hover { color: #fff; background: var(--wv-blue); }
.table-scroll { max-width: 100%; overflow-x: auto; }
.scholarly-article table { width: 100%; border-collapse: collapse; font: 13px/1.45 Arial, Helvetica, sans-serif; }
.scholarly-article caption { padding-bottom: 12px; text-align: left; font-weight: 750; }
.scholarly-article th, .scholarly-article td { padding: 9px 10px; border: 1px solid #cdd9df; vertical-align: top; text-align: left; }
.scholarly-article th { background: #eef4f6; }

.in-text-citation { white-space: nowrap; }
.citation-popover { position: fixed; z-index: 9997; width: min(390px,calc(100vw - 28px)); padding: 15px 17px; color: #1f2a31; background: #fff; border: 1px solid #93bdd1; border-radius: 4px; box-shadow: 0 10px 32px rgba(16,38,50,.22); font: 13px/1.5 Arial, Helvetica, sans-serif; }
.citation-popover strong { display: block; margin-bottom: 6px; }
.citation-popover a { display: inline-block; margin-top: 9px; }
.apa-reference-list { font: 14px/1.62 Arial, Helvetica, sans-serif; }
.apa-reference { margin: 0 0 21px; padding-left: 2em; scroll-margin-top: calc(var(--wv-header-offset) + 16px); text-indent: -2em; }
.apa-reference .reference-actions { display: flex; gap: 12px; margin-top: 4px; text-indent: 0; font-size: 12px; font-weight: 700; }

.article-rights { padding: 26px; background: #f6f7f7; border-top: 4px solid #89b6ca; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; }
.article-rights h2 { font-size: 27px; }
.rights-license-row { display: flex; gap: 17px; align-items: center; margin: 0 0 20px; }
.rights-license-image { flex: 0 0 88px; }
.rights-license-image img { display: block; width: 88px; height: 31px; }
.rights-license-row > div { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; }
.rights-license-name { font-size: 16px; font-weight: 750; }
.rights-permissions-link { font-weight: 700; }
.article-disclaimer, .publisher-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--wv-line); }
.article-disclaimer h3, .publisher-note h3 { margin: 0 0 7px; font-size: 16px; }
.article-endmatter details { border-bottom: 1px solid var(--wv-line); font: 15px/1.55 Arial, Helvetica, sans-serif; }
.article-endmatter summary { padding: 15px 32px 15px 0; color: var(--wv-blue-dark); cursor: pointer; font-weight: 750; }
.article-endmatter details > div { padding: 0 0 18px; }

.author-details-panel { margin: 0 0 34px; padding: 23px 26px; background: #f4f7f8; border: 1px solid #c9d8df; }
.author-details-panel[hidden] { display: none; }
.author-details-heading { display: flex; gap: 20px; justify-content: space-between; }
.author-details-heading h2 { flex: 1; font-size: 26px; }
.author-details-close { appearance: none; width: 34px; height: 34px; color: #40515c; background: #fff; border: 1px solid #b9c8cf; border-radius: 50%; cursor: pointer; font-size: 24px; }
.author-information-card { padding: 17px 0; border-bottom: 1px solid var(--wv-line); scroll-margin-top: calc(var(--wv-header-offset) + 16px); }
.author-information-card:last-child { border-bottom: 0; }
.author-information-card h3 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 7px; font-size: 19px; }
.author-information-card h3 span { padding: 3px 7px; color: #4e5962; background: #e4eaed; font-size: 10px; text-transform: uppercase; }
.author-information-card p { margin: 5px 0; }

.webview-context-column { position: relative; align-self: stretch; min-width: 0; font-size: 14px; }
.webview-context-sticky { position: sticky; top: var(--wv-header-offset); max-height: calc(100vh - var(--wv-header-offset) - 15px); overflow-y: auto; scrollbar-width: thin; }
.webview-context-sticky.is-fixed { position: fixed !important; z-index: 30; top: var(--wv-header-offset) !important; left: var(--wv-rail-left) !important; width: var(--wv-rail-width) !important; }
.webview-context-sticky.is-bottomed { position: absolute !important; top: auto !important; right: 0; bottom: 0; left: 0 !important; width: 100% !important; }
.context-card { margin-bottom: 17px; border: 1px solid #d0d7dc; background: #fff; }
.context-label { padding: 10px 13px; color: #47545f; background: #f4f5f5; border-bottom: 1px solid #d0d7dc; font-size: 11px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.academic-editor-profile { display: flex; gap: 12px; align-items: center; padding: 14px; }
.academic-editor-profile img, .editor-photo-placeholder { display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; border: 2px solid #d8e3e8; border-radius: 50%; object-fit: cover; }
.editor-photo-placeholder { color: #fff; background: var(--wv-blue); font-size: 25px; font-weight: 750; }
.academic-editor-profile > div { display: flex; flex-direction: column; }
.academic-editor-profile a { font-weight: 750; }
.academic-editor-profile span { margin-top: 3px; color: var(--wv-muted); font-size: 12px; }
.context-tabs { display: grid; grid-template-columns: repeat(3,1fr); }
.context-tab { appearance: none; min-width: 0; padding: 10px 5px; color: var(--wv-blue); background: #ececec; border: 0; border-right: 1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1; cursor: pointer; font-weight: 750; }
.context-tab:last-child { border-right: 0; }
.context-tab.active { color: #222; background: #fff; border-bottom-color: #fff; }
.context-panel { display: none; padding: 8px 14px 14px; }
.context-panel.active { display: block; }
.article-outline { display: flex; flex-direction: column; }
.article-outline a { padding: 7px 0; font-weight: 700; text-decoration: underline; }
.article-outline a[data-level="3"] { padding-left: 13px; font-size: 13px; }
.article-outline a[data-level="4"] { padding-left: 26px; font-size: 12px; }
.article-outline a.active { padding-left: 12px; color: #252525; border-left: 4px solid #d7d7d7; }
.figure-outline { display: grid; gap: 9px; }
.figure-outline button { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 9px; align-items: center; padding: 7px; text-align: left; background: #fff; border: 1px solid #dde4e8; cursor: pointer; }
.figure-outline img { width: 54px; height: 44px; object-fit: cover; }
.figure-outline strong { color: var(--wv-blue); font-size: 12px; }
.context-empty { color: #6d7880; font-size: 12px; }
.context-metrics { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; padding-top: 8px; }
.context-metrics > div { display: flex; flex-direction: column; padding: 9px 4px; text-align: center; background: #f5f7f8; }
.context-metrics strong { color: #18384e; font-size: 18px; }
.context-metrics span { color: #607080; font-size: 9px; }
.crossref-citedby-brand { display: flex; flex-direction: column; align-items: center; margin: 12px 0 0; padding: 8px; background: #fafafa; border: 1px solid #e0e5e7; }
.crossref-citedby-brand img { display: block; width: 52px; height: 22px; max-width: 100%; object-fit: contain; }
.crossref-citedby-brand button { appearance: none; padding: 5px 10px; color: var(--wv-blue); background: #fff; border: 1px solid #bdd0da; cursor: pointer; font-weight: 700; }
.metrics-mini-chart { display: block; width: 100%; height: auto; margin-top: 10px; }
.similar-articles-card ol { margin: 0; padding: 8px 14px 12px 35px; }
.similar-articles-card li { padding: 7px 0; }
.similar-articles-card a { display: block; font-weight: 700; line-height: 1.35; }
.similar-articles-card span { color: var(--wv-muted); font-size: 11px; }
.context-advert > span { display: block; margin-bottom: 4px; color: #5c656c; font-size: 9px; }
.context-advert > a { display: flex; flex-direction: column; padding: 12px; color: #24323b; background: #eaf4f7; border: 1px solid #b8d2dc; text-decoration: none; }
.context-advert img { max-height: 170px; margin-bottom: 9px; object-fit: contain; }

.webview-modal[hidden] { display: none; }
.webview-modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 24px; background: rgba(13,20,25,.65); }
.webview-modal > section { position: relative; width: min(720px,100%); max-height: min(780px,calc(100vh - 48px)); overflow-y: auto; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.object-modal > section { width: min(1050px,100%); }
.webview-modal header { padding: 23px 28px 17px; border-bottom: 1px solid var(--wv-line); }
.webview-modal h2 { margin: 0 0 5px; font-size: 25px; }
.webview-modal header p { margin: 0; color: var(--wv-muted); }
.webview-modal-body { padding: 24px 28px 28px; }
.webview-modal-close { position: absolute; top: 12px; right: 14px; z-index: 2; width: 36px; height: 36px; background: #fff; border: 1px solid #ccd5da; border-radius: 50%; cursor: pointer; font-size: 25px; }
.webview-modal select { width: 100%; margin: 7px 0 16px; padding: 10px; border: 1px solid #9cadb8; }
.citation-preview { min-height: 100px; padding: 17px; background: #f5f7f8; border-left: 4px solid var(--wv-blue); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 17px; }
.modal-actions button { padding: 9px 14px; color: #fff; background: var(--wv-blue); border: 0; cursor: pointer; font-weight: 700; }
.webview-loading { padding: 25px 0; color: var(--wv-muted); text-align: center; }

.hrl-webview-index { padding: 52px 0 80px; }
.hrl-webview-index__inner { width: min(var(--wv-max),calc(100% - 48px)); margin: auto; }
.hrl-webview-index__header { display: flex; justify-content: space-between; align-items: end; margin-bottom: 30px; padding-bottom: 18px; border-bottom: 4px solid var(--wv-hero); }
.hrl-webview-index__header p { margin: 0 0 4px; color: var(--wv-muted); text-transform: uppercase; letter-spacing: .08em; }
.hrl-webview-index__header h1 { margin: 0; font-size: 39px; }
.hrl-webview-index__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.hrl-webview-index__grid article { padding: 22px; border: 1px solid var(--wv-line); }
.hrl-webview-index__grid article > p:first-child { color: var(--wv-muted); font-size: 12px; }
.hrl-webview-index__grid h2 { margin: 9px 0; font-size: 23px; line-height: 1.25; }

@media (max-width: 980px) {
  .article-hero-grid { grid-template-columns: minmax(0,1fr) 220px; gap: 28px; }
  .webview-reader-shell { grid-template-columns: minmax(0,1fr) 285px; gap: 30px; }
}
@media (max-width: 780px) {
  :root { --wv-header-offset: 74px; }
  .article-shell, .webview-reader-shell, .hrl-webview-index__inner { width: calc(100% - 30px); }
  .article-hero-grid { grid-template-columns: 1fr; }
  .hero-journal-card { grid-row: 1; min-height: 0; }
  .hero-journal-cover-wrap { display: none; }
  .hrl-webview-page .article-title { font-size: clamp(31px,9vw,44px) !important; }
  .hero-crossmark { flex-wrap: wrap; }
  .metrics-bar-inner { gap: 15px; overflow-x: auto; }
  .metric-inline { flex: 0 0 auto; }
  .webview-reader-shell { grid-template-columns: 1fr; margin-top: 24px; }
  .webview-context-column { grid-row: 1; }
  .webview-context-sticky,
  .webview-context-sticky.is-fixed,
  .webview-context-sticky.is-bottomed { position: static !important; width: auto !important; max-height: none; overflow: visible; }
  .similar-articles-card, .context-advert { display: none; }
  .hrl-webview-page .scholarly-article { font-size: 18px !important; line-height: 1.58 !important; }
  .scholarly-article h2 { font-size: 27px; }
  .hrl-webview-index__grid { grid-template-columns: 1fr; }
}
@media print {
  .article-hero, .metrics-bar, .webview-context-column, .webview-modal, .author-details-panel { display: none !important; }
  .webview-reader-shell { display: block; width: auto; margin: 0; }
  .scholarly-article { font-size: 11pt; }
}
@media (prefers-reduced-motion: reduce) {
  .hrl-webview-page * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
