/* JurnalPost mobile navigation and reading refinement, 2026-11-01. */
@media screen {
    .jp-article .jp-article-byline__identity,
    .jp-article .jp-article-byline__author,
    .jp-article .jp-article-byline__timeline,
    .jp-article .jp-academic-authors {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .jp-article .jp-article-byline__timeline {
        gap: 4px 12px;
        line-height: 1.5;
    }

    .jp-article .jp-article-byline__editor::before {
        content: "•";
        margin-right: 8px;
    }

    .jp-article .article-content pre {
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: auto;
    }

    .jp-post-layout.jp-post-layout--academic .article-content {
        max-width: 760px;
        margin-inline: auto;
    }
}

@media screen and (max-width: 768px) {
    .site-header .site-header__main {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr) 92px;
        min-height: 64px;
        gap: 0;
        align-items: center;
    }

    .site-header .site-header__main > .mobile-menu {
        grid-area: 1 / 1;
        justify-self: start;
        margin-right: 0;
    }

    .site-header .site-language-mobile {
        grid-area: 1 / 1;
        justify-self: end;
        position: static;
        width: 44px;
        min-height: 44px;
        transform: none;
    }

    .site-header .site-header__main > .site-brand {
        grid-area: 1 / 2;
        justify-self: center;
        position: static;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        transform: none;
    }

    .site-header .site-header__main > .site-brand .site-brand__logo {
        width: 142px;
        max-width: 100%;
        flex-basis: auto;
    }

    .site-header .site-header__actions--mobile {
        grid-area: 1 / 3;
        justify-self: end;
        margin-left: 0;
        gap: 4px;
    }

    .site-header .icon-button {
        width: 44px;
        height: 44px;
    }

    .jp-post-layout .jp-article .article-content {
        font-size: 18px;
        line-height: 1.8;
    }

    .jp-article .jp-article-byline__author {
        font-size: 14px;
        line-height: 1.5;
    }

    .jp-article .jp-article-byline__timeline {
        font-size: 12px;
    }

    .jp-article .jp-article-byline__timeline time,
    .jp-article .jp-article-byline__editor {
        flex-basis: 100%;
        min-width: 0;
    }

    .jp-article .jp-article-byline__editor::before {
        display: none;
    }

    .jp-post-layout .jp-share.jp-share--jnews .jp-share__list {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
    }

    .jp-post-layout .jp-share.jp-share--jnews .jp-share__button {
        flex: 0 0 44px;
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding-inline: 0;
        line-height: 44px;
    }

    .jp-post-layout .jp-share.jp-share--jnews .jp-share__button > span:not(.jp-share__sr-only) {
        display: none;
    }

    .jp-post-layout .jp-share.jp-share--jnews .jp-share__button--toggle {
        order: 5;
    }

    .jp-post-layout .jp-share.jp-share--jnews .jp-share__preferred-source {
        order: 6;
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        min-height: 44px;
        justify-content: flex-start;
    }

    .jp-post-layout .jp-share.jp-share--jnews .jp-share__preferred-source-badge {
        width: 120px;
        max-width: 100%;
        height: auto;
    }

    .jp-post-layout .jp-share.jp-share--jnews .jp-share__secondary {
        position: static;
        order: 7;
        flex-basis: 100%;
        max-width: 100%;
        padding: 6px 0;
        gap: 6px;
        background: transparent;
        box-shadow: none;
    }

    .jp-post-layout .jp-ad-slot.jp-ad-slot--article_after_paragraph_2,
    .jp-post-layout .jp-ad-slot.jp-ad-slot--article_middle {
        margin-block: 28px;
    }
}

/* Compact related articles on phones; desktop and print keep their existing layout. */
@media screen and (max-width: 600px) {
    :is(#artikel-terkait, #related-articles) .jp-recommendation-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    :is(#artikel-terkait, #related-articles) .jp-recommendation-card {
        position: relative;
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 14px 0;
        border-bottom: 1px solid var(--jp-post-border);
    }

    :is(#artikel-terkait, #related-articles) .jp-recommendation-card:first-child {
        padding-top: 0;
    }

    :is(#artikel-terkait, #related-articles) .jp-recommendation-card:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    :is(#artikel-terkait, #related-articles) .jp-recommendation-card__image {
        width: 96px;
        height: 72px;
        aspect-ratio: 4 / 3;
        border-radius: 5px;
    }

    :is(#artikel-terkait, #related-articles) .jp-recommendation-card__image .jp-media-fallback {
        padding: 8px;
    }

    :is(#artikel-terkait, #related-articles) .jp-recommendation-card__body {
        min-width: 0;
        padding-top: 0;
    }

    :is(#artikel-terkait, #related-articles) .jp-recommendation-card h3 {
        margin: 0;
        font-size: 15.5px;
        font-weight: 700;
        line-height: 1.45;
        overflow-wrap: anywhere;
        -webkit-line-clamp: 3;
    }

    :is(#artikel-terkait, #related-articles) .jp-recommendation-card h3 a::after {
        position: absolute;
        z-index: 1;
        inset: 0;
        content: "";
        border-radius: 5px;
    }

    :is(#artikel-terkait, #related-articles) .jp-recommendation-card h3 a:focus-visible::after {
        outline: 2px solid var(--jp-post-accent);
        outline-offset: 3px;
    }
}


/* Compact right-hand editorial ranking on phones. */
@media screen and (max-width: 600px) {
    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card--lead {
        padding: 14px 0;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card__lead-link {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card__media {
        width: 104px;
        height: 78px;
        aspect-ratio: 4 / 3;
        border-radius: 5px;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card__lead-body {
        min-width: 0;
        padding-top: 0;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card__lead-body strong {
        font-size: 15.5px;
        line-height: 1.45;
        overflow-wrap: anywhere;
        -webkit-line-clamp: 3;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card--lead .jp-popular-card__rank {
        top: 5px;
        left: 5px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card--row {
        grid-template-columns: 24px 72px minmax(0, 1fr);
        gap: 8px;
        padding: 12px 0;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card__thumb {
        width: 72px;
        height: 54px;
        aspect-ratio: 4 / 3;
        border-radius: 4px;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card__body h3 {
        font-size: 14px;
        line-height: 1.4;
        overflow-wrap: anywhere;
        -webkit-line-clamp: 3;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-media-fallback {
        padding: 6px;
    }

    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card__lead-link:focus-visible,
    .jp-post-sidebar--right .jp-popular-ranking .jp-popular-card__body h3:focus-within {
        outline: 2px solid var(--jp-popular-blue);
        outline-offset: 2px;
        border-radius: 3px;
    }
}

