/*
 * OWS Dashboard — reference article-detail page redesign (article view only).
 *
 * Scoped entirely to article.owsArticleRef (set directly on the article_details.tpl
 * root element), so this file cannot leak onto any other page. Reuses the site's
 * existing teal palette (--ows-primary / --ows-mint*, defined by
 * frontendLeftSidebarReference.css) so the article page stays visually
 * consistent with the homepage/header rather than introducing a new color system.
 */

article.owsArticleRef {
    --ows-article-ref-accent: var(--ows-primary, #1a1a1a);
    --ows-article-ref-accent-hover: color-mix(in srgb, var(--ows-primary, #1a1a1a) 88%, black 12%);
    --ows-article-ref-text: #1f2d2a;
    --ows-article-ref-muted: #5c6d68;
    --ows-article-ref-line: var(--ows-mint-border, #dfeae5);
    --ows-article-ref-chip: var(--ows-mint, #edf6f3);
    --ows-article-ref-surface: #ffffff;
    --ows-article-ref-open-access: #f5a524;
    --ows-article-ref-open-access-bg: #fef3e2;

    color: var(--ows-article-ref-text);
}

/* ---------------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------------ */
article.owsArticleRef .owsArticleRefGrid.row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) !important;
    gap: 32px !important;
    align-items: start !important;
}

@media (max-width: 900px) {
    article.owsArticleRef .owsArticleRefGrid.row {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

article.owsArticleRef .owsArticleRefMain,
article.owsArticleRef .owsArticleRefSidebar {
    float: none !important;
    width: auto !important;
}

/*
 * Explicit placement instead of relying on grid auto-placement: the theme's
 * pre-existing negative margins on .entry_details (-1.43rem left/right, from
 * the base OJS stylesheet) make the browser's auto-placement algorithm miscount
 * available track space and push both items onto separate implicit rows
 * instead of side by side. Explicit grid-column/grid-row sidesteps that.
 */
article.owsArticleRef .owsArticleRefMain {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

article.owsArticleRef .owsArticleRefSidebar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-top: none !important;
}

/* ---------------------------------------------------------------------
 * Badges (Open Access / Section)
 * ------------------------------------------------------------------ */
article.owsArticleRef .owsArticleRefBadges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

article.owsArticleRef .owsArticleRefBadge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.6;
}

article.owsArticleRef .owsArticleRefBadge--openAccess {
    background: var(--ows-article-ref-open-access-bg);
    color: var(--ows-article-ref-open-access);
}

article.owsArticleRef .owsArticleRefBadge--section {
    background: var(--ows-article-ref-chip);
    color: var(--ows-article-ref-accent);
}

article.owsArticleRef .owsArticleRefTitle {
    color: var(--ows-article-ref-text);
    margin-top: 0;
}

/* ---------------------------------------------------------------------
 * Authors / ORCID
 * ------------------------------------------------------------------ */
article.owsArticleRef .owsArticleRefAuthors ul.authors {
    list-style: none;
    padding: 0;
    margin: 0 0 6px;
}

article.owsArticleRef .owsArticleRefAuthors li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

article.owsArticleRef .owsArticleRefAuthors .name {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--ows-article-ref-text);
}

article.owsArticleRef .owsArticleRefAuthors .affiliation {
    color: var(--ows-article-ref-muted);
    font-size: 0.92rem;
}

article.owsArticleRef .owsArticleRefAuthors .orcid svg {
    vertical-align: middle;
}

article.owsArticleRef .owsArticleRefAuthors .email a {
    display: inline-flex;
    align-items: center;
    color: var(--ows-article-ref-muted);
    transition: color .15s ease;
}

article.owsArticleRef .owsArticleRefAuthors .email a:hover,
article.owsArticleRef .owsArticleRefAuthors .email a:focus-visible {
    color: var(--ows-primary, #1a1a1a);
}

/* ---------------------------------------------------------------------
 * DOI + copy button
 * ------------------------------------------------------------------ */
article.owsArticleRef .owsArticleRefDoi {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 18px;
}

article.owsArticleRef .owsArticleRefDoi h2.label {
    margin: 0;
    display: inline-flex;
}

article.owsArticleRef .owsArticleRefDoi .value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

article.owsArticleRef .owsArticleRefDoi a {
    color: var(--ows-article-ref-accent);
    text-decoration: none;
}

article.owsArticleRef .owsArticleRefDor h2.label {
    padding: 2px 8px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ows-primary, #1a1a1a) 10%, white 90%);
    color: var(--ows-primary, #1a1a1a);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

article.owsArticleRef .owsArticleRefCopyButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--ows-article-ref-line);
    border-radius: 6px;
    background: var(--ows-article-ref-surface);
    color: var(--ows-article-ref-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

article.owsArticleRef .owsArticleRefCopyButton svg {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

article.owsArticleRef .owsArticleRefCopyButton:hover {
    background: var(--ows-article-ref-chip);
    color: var(--ows-article-ref-accent);
}

article.owsArticleRef .owsArticleRefCopyButton.is-copied {
    background: var(--ows-article-ref-accent);
    color: #fff;
    border-color: var(--ows-article-ref-accent);
}

/* ---------------------------------------------------------------------
 * Download buttons row
 * ------------------------------------------------------------------ */
article.owsArticleRef .owsArticleRefDownloads ul.galleys_links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
}

article.owsArticleRef .owsArticleRefDownloads ul.galleys_links li {
    flex-shrink: 0;
    width: auto;
}

article.owsArticleRef .owsArticleRefDownloads .obj_galley_link {
    display: inline-flex;
    flex-shrink: 0;
    width: auto;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    text-transform: capitalize;
    white-space: nowrap;
    border: 1px solid var(--ows-article-ref-accent);
}

article.owsArticleRef .owsArticleRefDownloads .obj_galley_link.pdf {
    background: var(--ows-article-ref-accent);
    color: #fff;
}

article.owsArticleRef .owsArticleRefDownloads .obj_galley_link.pdf:hover {
    background: var(--ows-article-ref-accent-hover);
}

article.owsArticleRef .owsArticleRefDownloads .obj_galley_link:not(.pdf) {
    background: var(--ows-article-ref-surface);
    color: var(--ows-article-ref-accent);
}

article.owsArticleRef .owsArticleRefDownloads .obj_galley_link:not(.pdf):hover {
    background: var(--ows-article-ref-chip);
}

/* ---------------------------------------------------------------------
 * Card shell — Abstract / Keywords / References / Metrics / License / Citation
 * ------------------------------------------------------------------ */
article.owsArticleRef .owsArticleRefCard {
    background: var(--ows-article-ref-surface);
    border: 1px solid var(--ows-article-ref-line);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
}

article.owsArticleRef .owsArticleRefCard > .label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ows-article-ref-text);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
}

article.owsArticleRef details.owsArticleRefCard > summary.label {
    cursor: pointer;
    list-style: none;
}

article.owsArticleRef details.owsArticleRefCard > summary.label::-webkit-details-marker {
    display: none;
}

article.owsArticleRef .owsArticleRefCount {
    font-weight: 500;
    color: var(--ows-article-ref-muted);
}

article.owsArticleRef .owsArticleRefReferencesToggle {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid var(--ows-article-ref-accent);
    background: var(--ows-article-ref-surface);
    color: var(--ows-article-ref-accent);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

article.owsArticleRef .owsArticleRefReferencesToggle:hover,
article.owsArticleRef .owsArticleRefReferencesToggle:focus-visible {
    background: color-mix(in srgb, var(--ows-primary, var(--ows-article-ref-accent)) 10%, #ffffff 90%) !important;
    border-color: var(--ows-primary, var(--ows-article-ref-accent)) !important;
    color: var(--ows-primary, var(--ows-article-ref-accent)) !important;
}

/* ---------------------------------------------------------------------
 * Keyword pills
 * ------------------------------------------------------------------ */
article.owsArticleRef .owsArticleRefKeywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

article.owsArticleRef .owsArticleRefKeyword {
    background: var(--ows-article-ref-chip);
    color: var(--ows-article-ref-accent);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.82rem;
}

/* ---------------------------------------------------------------------
 * Sidebar cards
 * ------------------------------------------------------------------ */
article.owsArticleRef .owsArticleRefSidebar .item:not(.owsArticleRefCard) {
    margin-bottom: 18px;
}

article.owsArticleRef .owsArticleRefMetricsList {
    list-style: none;
    margin: 0;
    padding: 0;
}

article.owsArticleRef .owsArticleRefMetricsList li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--ows-article-ref-line);
    font-size: 0.9rem;
}

article.owsArticleRef .owsArticleRefMetricsList li:last-child {
    border-bottom: none;
}

article.owsArticleRef .owsArticleRefMetricLabel {
    color: var(--ows-article-ref-muted);
}

article.owsArticleRef .owsArticleRefMetricValue {
    font-weight: 600;
    color: var(--ows-article-ref-text);
}

article.owsArticleRef .owsArticleRefMetricValue a {
    color: var(--ows-article-ref-accent);
}

article.owsArticleRef .owsArticleRefLicenseLink {
    color: var(--ows-article-ref-accent);
    font-weight: 600;
    font-size: 0.88rem;
}

/* ---------------------------------------------------------------------
 * "How to Cite" card (rendered via the citationStyleLanguage plugin hook)
 * ------------------------------------------------------------------ */
article.owsArticleRef .owsArticleRefCitation .item.citation {
    margin: 0;
}

article.owsArticleRef .owsArticleRefCitation #citationOutput {
    font-size: 0.9rem;
    color: var(--ows-article-ref-text);
    background: var(--ows-article-ref-chip);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

article.owsArticleRef .owsArticleRefCopyCitationButton {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--ows-article-ref-accent);
    background: var(--ows-article-ref-surface);
    color: var(--ows-article-ref-accent);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

article.owsArticleRef .owsArticleRefCopyCitationButton svg {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

article.owsArticleRef .owsArticleRefCopyCitationButton:hover {
    background: var(--ows-article-ref-chip);
}

article.owsArticleRef .owsArticleRefCopyCitationButton.is-copied {
    background: var(--ows-article-ref-accent);
    color: #fff;
}

/* ==========================================================
 * OWS Dashboard 3.10.782.0
 * Article author metadata — compact vertical priority layout.
 *
 * Visual order after every author name:
 *   1) affiliation (+ ORCID)
 *   2) DOI
 *   3) DOR
 * Large native OJS gaps are removed.
 * ========================================================== */
article.owsArticleRef .owsArticleRefAuthors {
    margin: 0 !important;
    padding: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthors ul.authors {
    margin: 0 !important;
    padding: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthors ul.authors > li,
article.owsArticleRef .owsArticleRefAuthors .authors > li {
    display: block !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthors ul.authors > li:last-child,
article.owsArticleRef .owsArticleRefAuthors .authors > li:last-child {
    margin-bottom: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthorNameRow {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
}

article.owsArticleRef .owsArticleRefAuthorAffiliationRow {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
}

article.owsArticleRef .owsArticleRefAuthorNameRow .name,
article.owsArticleRef .owsArticleRefAuthorNameRow .email,
article.owsArticleRef .owsArticleRefAuthorAffiliationRow .affiliation,
article.owsArticleRef .owsArticleRefAuthorAffiliationRow .orcid {
    margin: 0 !important;
    padding: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthorAffiliationRow .affiliation {
    display: inline !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthorAffiliationRow .orcid,
article.owsArticleRef .owsArticleRefAuthorAffiliationRow .orcid a {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
    width: 100% !important;
    margin: 5px 0 12px !important;
    padding: 0 !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDoi,
article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDor {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 7px !important;
    min-height: 26px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDoi h2.label,
article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDor h2.label {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDoi .value,
article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDor .value {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack a {
    margin: 0 !important;
    line-height: 1.35 !important;
    word-break: break-word !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefCopyButton {
    flex: 0 0 26px !important;
    margin: 0 !important;
    border-radius: 4px !important;
}

/* ==========================================================
 * OWS Dashboard 3.10.783.0
 * Author row polish: move ORCID up beside email, use the supplied custom
 * icon, and tighten galley-button spacing.
 * ========================================================== */
article.owsArticleRef .owsArticleRefAuthorNameRow {
    gap: 5px !important;
}

article.owsArticleRef .owsArticleRefAuthorAffiliationRow {
    margin: 1px 0 0 !important;
}

article.owsArticleRef .owsArticleRefAuthors .email,
article.owsArticleRef .owsArticleRefAuthors .orcid,
article.owsArticleRef .owsArticleRefAuthorNameRow .email,
article.owsArticleRef .owsArticleRefAuthorNameRow .orcid {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthorNameRow .orcid,
article.owsArticleRef .owsArticleRefAuthorNameRow .orcid a,
article.owsArticleRef .owsArticleRefAuthorNameRow .owsArticleRefOrcidLink,
article.owsArticleRef .owsArticleRefAuthorNameRow .owsArticleRefOrcidLink a {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 18px !important;
    overflow: hidden !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    position: relative !important;
}

article.owsArticleRef .owsArticleRefAuthorNameRow .orcid a,
article.owsArticleRef .owsArticleRefAuthorNameRow .owsArticleRefOrcidLink a {
    background-image: url('../images/article-orcid-icon.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

article.owsArticleRef .owsArticleRefAuthorNameRow .orcid a > * ,
article.owsArticleRef .owsArticleRefAuthorNameRow .owsArticleRefOrcidLink a > *,
article.owsArticleRef .owsArticleRefAuthorNameRow .orcid a svg,
article.owsArticleRef .owsArticleRefAuthorNameRow .owsArticleRefOrcidLink a svg {
    display: none !important;
}

article.owsArticleRef .owsArticleRefAuthorNameRow .orcid a::before,
article.owsArticleRef .owsArticleRefAuthorNameRow .owsArticleRefOrcidLink a::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: url('../images/article-orcid-icon.png') center/contain no-repeat !important;
}

article.owsArticleRef .owsArticleRefDownloads ul.galleys_links {
    gap: 6px !important;
    margin: 0 0 18px !important;
}

article.owsArticleRef .owsArticleRefDownloads .obj_galley_link {
    padding: 10px 16px !important;
}

/* ==========================================================
 * OWS Dashboard 3.10.784.0
 * Correct ORCID/DOR icon mapping.
 * - Restore ORCID to the affiliation row with the native ORCID rendering.
 * - Replace the DOR text badge with the supplied custom DOR icon.
 * ========================================================== */
article.owsArticleRef .owsArticleRefAuthorNameRow .orcid,
article.owsArticleRef .owsArticleRefAuthorNameRow .owsArticleRefOrcidLink {
    display: none !important;
}

article.owsArticleRef .owsArticleRefAuthorAffiliationRow .orcid,
article.owsArticleRef .owsArticleRefAuthorAffiliationRow .orcid a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: none !important;
    text-decoration: none !important;
    position: static !important;
}

article.owsArticleRef .owsArticleRefAuthorAffiliationRow .orcid a::before {
    content: none !important;
}

article.owsArticleRef .owsArticleRefAuthorAffiliationRow .orcid a > *,
article.owsArticleRef .owsArticleRefAuthorAffiliationRow .orcid a svg {
    display: inline !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDor h2.label,
article.owsArticleRef .owsArticleRefDor h2.label {
    position: relative !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;
    text-indent: -9999px !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDor h2.label::before,
article.owsArticleRef .owsArticleRefDor h2.label::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: url('../images/article-dor-icon.png') left center / contain no-repeat !important;
}

/* ==========================================================
 * OWS Dashboard 3.10.785.0
 * Final public-article metadata polish.
 * - Move ORCID back beside the email icon in the author name row.
 * - Restore the native ORCID appearance.
 * - Tighten the spacing between the DOR icon and its value.
 * ========================================================== */
article.owsArticleRef .owsArticleRefAuthorNameRow {
    gap: 4px !important;
}

article.owsArticleRef .owsArticleRefAuthorNameRow .orcid,
article.owsArticleRef .owsArticleRefAuthorNameRow .orcid a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: none !important;
    text-decoration: none !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthorNameRow .orcid a::before {
    content: none !important;
}

article.owsArticleRef .owsArticleRefAuthorNameRow .orcid a > *,
article.owsArticleRef .owsArticleRefAuthorNameRow .orcid a svg {
    display: inline !important;
}

article.owsArticleRef .owsArticleRefAuthorAffiliationRow .orcid {
    display: none !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDor,
article.owsArticleRef .owsArticleRefDor {
    gap: 3px !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDor h2.label,
article.owsArticleRef .owsArticleRefDor h2.label {
    width: 31px !important;
    min-width: 31px !important;
    height: 22px !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDor h2.label::before,
article.owsArticleRef .owsArticleRefDor h2.label::before {
    background-size: 29px auto !important;
}

article.owsArticleRef .owsArticleRefIdentifierStack .owsArticleRefDor .value,
article.owsArticleRef .owsArticleRefDor .value {
    gap: 4px !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.849.0
 * Public article page — galley buttons flush with content line
 * ========================================================== */
article.owsArticleRef .owsArticleRefDownloads {
    width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

article.owsArticleRef .owsArticleRefDownloads ul.galleys_links {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 0 18px !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

article.owsArticleRef .owsArticleRefDownloads ul.galleys_links > li {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

article.owsArticleRef .owsArticleRefDownloads .obj_galley_link {
    margin-left: 0 !important;
    align-self: center !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.852.0
 * Public article heading left alignment
 * ========================================================== */
article.owsArticleRef .owsArticleRefBadges,
article.owsArticleRef .owsArticleRefTitle {
    box-sizing: border-box !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    left: 0 !important;
    transform: none !important;
    text-align: left !important;
}

article.owsArticleRef .owsArticleRefTitle {
    display: block !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.853.0
 * Public article heading exact left-edge alignment
 * ==========================================================
 * The title/badges live inside a native OJS heading wrapper that carries its
 * own horizontal inset. The runtime alignment script measures the actual
 * Authors block and shifts only these two heading elements onto that exact
 * visual left edge. Keep their own box model neutral so the measured offset
 * remains stable at every viewport width.
 */
article.owsArticleRef .owsArticleRefBadges,
article.owsArticleRef .owsArticleRefTitle {
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    transform-origin: left center !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.854.0
 * Public article page — remove extra right-side vertical divider
 * ========================================================== */
article.owsArticleRef .owsArticleRefGrid,
article.owsArticleRef .owsArticleRefGrid.row,
article.owsArticleRef .owsArticleRefMain,
article.owsArticleRef .owsArticleRefSidebar,
article.owsArticleRef .owsArticleRefGrid > *,
article.owsArticleRef .owsArticleRefGrid.row > * {
    border-right: 0 !important;
    border-left: 0 !important;
    box-shadow: none !important;
}

article.owsArticleRef .owsArticleRefMain::before,
article.owsArticleRef .owsArticleRefMain::after,
article.owsArticleRef .owsArticleRefSidebar::before,
article.owsArticleRef .owsArticleRefSidebar::after {
    border-right: 0 !important;
    border-left: 0 !important;
    box-shadow: none !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.855.0
 * Public article author card + title spacing + 4px radii
 * ========================================================== */
article.owsArticleRef .owsArticleRefHeadingRegion {
    box-sizing: border-box !important;
    padding-bottom: 14px !important;
    margin-bottom: 16px !important;
    border-bottom: 1px solid var(--ows-article-ref-line) !important;
}

article.owsArticleRef .owsArticleRefHeadingRegion .owsArticleRefBadges {
    margin-bottom: 10px !important;
}

article.owsArticleRef .owsArticleRefHeadingRegion .owsArticleRefTitle {
    margin-bottom: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthorCard {
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 0 18px !important;
    padding: 16px 18px !important;
    border: 1px solid var(--ows-article-ref-line) !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: none !important;
}

article.owsArticleRef .owsArticleRefAuthorCard .owsArticleRefAuthors,
article.owsArticleRef .owsArticleRefAuthorCard .owsArticleRefIdentifierStack,
article.owsArticleRef .owsArticleRefAuthorCard .owsArticleRefDownloads {
    width: 100% !important;
    max-width: 100% !important;
}

article.owsArticleRef .owsArticleRefAuthorCard .owsArticleRefAuthors {
    margin: 0 !important;
}

article.owsArticleRef .owsArticleRefAuthorCard .owsArticleRefIdentifierStack {
    margin: 6px 0 14px !important;
}

article.owsArticleRef .owsArticleRefAuthorCard .owsArticleRefDownloads ul.galleys_links {
    margin: 0 !important;
}

/* The article page uses one compact 4px radius language throughout. */
article.owsArticleRef :is(
    .owsArticleRefCard,
    .owsArticleRefAuthorCard,
    .owsArticleRefBadge,
    .owsArticleRefKeyword,
    .owsArticleRefCopyButton,
    .owsArticleRefDownloads .obj_galley_link,
    .owsArticleRefReferencesToggle,
    .owsArticleRefCopyCitationButton,
    .owsArticleRefCitation #citationOutput,
    .owsArticleRefSidebar .item,
    button,
    select,
    input
) {
    border-radius: 4px !important;
}

article.owsArticleRef .owsArticleRefBadge,
article.owsArticleRef .owsArticleRefKeyword {
    border-radius: 4px !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.856.0
 * Public article final alignment + category card + themed citation
 * ========================================================== */

/* The heading/badges now align to the OUTER edge of the author card,
 * not the padded author text inside it. This puts the title on the same
 * vertical line as the cards below. */
article.owsArticleRef .owsArticleRefHeadingRegion .owsArticleRefBadges,
article.owsArticleRef .owsArticleRefHeadingRegion .owsArticleRefTitle {
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
}

/* Give the horizontal separator beneath the title a little more breathing
 * room before the author/details card begins. */
article.owsArticleRef .owsArticleRefHeadingRegion {
    margin-bottom: 24px !important;
}

/* Put the native Categories block into the same 4px card language as the
 * metrics/citation blocks. Support both the runtime marker and common native
 * OJS category class names. */
article.owsArticleRef .owsArticleRefSidebar :is(
    .owsArticleRefCategoryCard,
    .item.categories,
    .item.category,
    section.categories,
    section.category
) {
    box-sizing: border-box !important;
    width: 100% !important;
    margin: 0 0 18px !important;
    padding: 16px 18px !important;
    border: 1px solid var(--ows-article-ref-line) !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: none !important;
}

article.owsArticleRef .owsArticleRefSidebar :is(
    .owsArticleRefCategoryCard,
    .item.categories,
    .item.category,
    section.categories,
    section.category
) :is(.label, h2, h3, .title) {
    margin-top: 0 !important;
}

/* Remove the old standalone separator line when Categories becomes a card. */
article.owsArticleRef .owsArticleRefSidebar :is(
    .owsArticleRefCategoryCard,
    .item.categories,
    .item.category,
    section.categories,
    section.category
)::before,
article.owsArticleRef .owsArticleRefSidebar :is(
    .owsArticleRefCategoryCard,
    .item.categories,
    .item.category,
    section.categories,
    section.category
)::after {
    box-shadow: none !important;
}

/* Citation background follows the active public-site palette rather than a
 * fixed mint. The token --ows-primary is already changed by the active theme. */
article.owsArticleRef .owsArticleRefCitation #citationOutput {
    background: color-mix(in srgb, var(--ows-primary, #0d3b36) 9%, #ffffff 91%) !important;
    border: 1px solid color-mix(in srgb, var(--ows-primary, #0d3b36) 18%, #ffffff 82%) !important;
    color: var(--ows-article-ref-text) !important;
    border-radius: 4px !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.857.0
 * Public article page — category card full sidebar width
 * ========================================================== */
article.owsArticleRef .owsArticleRefSidebar > :is(
    .owsArticleRefCategoryCard,
    .item.categories,
    .item.category,
    section.categories,
    section.category
),
article.owsArticleRef .owsArticleRefSidebar :is(
    .owsArticleRefCategoryCard,
    .item.categories,
    .item.category,
    section.categories,
    section.category
) {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-self: stretch !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.858.0
 * Public article galley buttons — hover follows active site theme
 * ========================================================== */
article.owsArticleRef .owsArticleRefDownloads .obj_galley_link.pdf:is(:hover, :focus-visible) {
    border-color: color-mix(in srgb, var(--ows-primary, #1a1a1a) 86%, #000 14%) !important;
    background: color-mix(in srgb, var(--ows-primary, #1a1a1a) 86%, #000 14%) !important;
    background-color: color-mix(in srgb, var(--ows-primary, #1a1a1a) 86%, #000 14%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: none !important;
}

article.owsArticleRef .owsArticleRefDownloads .obj_galley_link:not(.pdf):is(:hover, :focus-visible) {
    border-color: var(--ows-primary, #1a1a1a) !important;
    background: color-mix(in srgb, var(--ows-primary, #1a1a1a) 8%, #ffffff 92%) !important;
    background-color: color-mix(in srgb, var(--ows-primary, #1a1a1a) 8%, #ffffff 92%) !important;
    color: var(--ows-primary, #1a1a1a) !important;
    -webkit-text-fill-color: var(--ows-primary, #1a1a1a) !important;
    box-shadow: none !important;
}

article.owsArticleRef .owsArticleRefDownloads .obj_galley_link:not(.pdf):is(:hover, :focus-visible)::before,
article.owsArticleRef .owsArticleRefDownloads .obj_galley_link:not(.pdf):is(:hover, :focus-visible) :is(svg, i) {
    color: var(--ows-primary, #1a1a1a) !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.859.0
 * Public article page — category card aligned to sibling cards
 * ========================================================== */
article.owsArticleRef .owsArticleRefSidebar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

article.owsArticleRef .owsArticleRefSidebar > * {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-self: stretch !important;
}

article.owsArticleRef .owsArticleRefSidebar > :is(
    .owsArticleRefCategoryCard,
    .item.categories,
    .item.category,
    section.categories,
    section.category
) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 18px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-self: stretch !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.860.0
 * Public article page — theme-aware keyword chips
 * ========================================================== */
article.owsArticleRef .owsArticleRefKeyword {
    background: color-mix(in srgb, var(--ows-primary, #0d3b36) 10%, #ffffff 90%) !important;
    border: 1px solid color-mix(in srgb, var(--ows-primary, #0d3b36) 16%, #ffffff 84%) !important;
    color: #4b5563 !important;
    -webkit-text-fill-color: #4b5563 !important;
    border-radius: 4px !important;
}

article.owsArticleRef .owsArticleRefKeyword :is(a, span) {
    color: #4b5563 !important;
    -webkit-text-fill-color: #4b5563 !important;
}


/* ==========================================================
 * OWS Dashboard 3.10.861.0
 * Public article page — View More hover follows active theme
 * ========================================================== */
