/* Phone-only swipe reader. Real desktop and explicit Classic retain the native layout. */
.pn2-mobile-feed, .pn2-feed-reader-bar, .pn2-reader-swipe-hint, .pn2-feed-theme-control { display: none; }
@media (max-width: 991.98px) {
    .pn2-feed-theme-control { display: grid; gap: .4rem; margin-block: .7rem; padding: .85rem; border: 1px solid var(--pn-line, #dce3ed); border-radius: 12px; background: var(--pn-surface, #fff); color: var(--pn-ink, #15213a); }
    .pn2-feed-theme-control label { display: grid; gap: .4rem; font-size: .85rem; font-weight: 700; }
    .pn2-feed-theme-control select { width: 100%; min-height: 44px; padding: .55rem; border: 1px solid var(--pn-line, #dce3ed); border-radius: 8px; font: inherit; color: inherit; background: var(--pn-surface, #fff); }
    .pn2-feed-theme-control small { font-size: .75rem; line-height: 1.5; }
    html[data-pn2-mobile-theme="feed"] { --pn2-feed-radius: 18px; }
    html[data-pn2-mobile-theme="feed"] .pn2-shell { background: var(--pn-paper, #f3f5f9); }
    html[data-pn2-mobile-theme="feed"][data-pn2-feed-ready] .body-index-page :is(.pn2-market-pulse, .pn2-dashboard-heading, .pn2-start-banner, .pn2-my-nexus) { display: none !important; }
    html[data-pn2-mobile-theme="feed"][data-pn2-feed-ready] .body-index-page :is(.pn2-dashboard, .pn2-dashboard-grid) { display: block; margin: 0; padding-block: 0; }
    html[data-pn2-mobile-theme="feed"][data-pn2-feed-ready] .body-index-page .pn2-dashboard > .container-fluid { padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
    html[data-pn2-mobile-theme="feed"][data-pn2-feed-ready] .body-index-page .pn2-workspace { display: flex; flex-direction: column; gap: 16px; max-width: 680px; margin-inline: auto; }
    html[data-pn2-mobile-theme="feed"][data-pn2-feed-ready] .body-index-page .pn2-workspace > :not(.pn2-mobile-feed):not([data-pn2-feed-ad-visible]) { display: none !important; }
    html[data-pn2-mobile-theme="feed"] .pn2-mobile-feed { display: flex; flex-direction: column; gap: 12px; order: 0; min-width: 0; }
    html[data-pn2-mobile-theme="feed"] .pn2-feed-heading { order: -30; display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-block-start: 10px; color: var(--pn-ink, #15213a); }
    .pn2-feed-heading span { display: block; font-size: .65rem; font-weight: 750; letter-spacing: .12em; color: var(--pn-blue, #3257d5); }
    .pn2-feed-heading h1 { margin: .45rem 0; font-size: clamp(1.5rem, 5.7vw, 2.1rem); line-height: 1.15; letter-spacing: -.035em; }
    .pn2-feed-heading p { margin: .45rem 0 0; font-size: .9rem; color: var(--pn-muted, #52627b); }
    .pn2-feed-heading button { flex: 0 0 auto; padding: .5rem .6rem; font-size: .75rem; white-space: nowrap; }
    html[data-pn2-mobile-theme="feed"] .pn2-feed-tabs { order: -20; display: flex; gap: 8px; align-items: center; padding-block: 4px; }
    .pn2-feed-tabs > :is(a, button) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1.1rem; border: 1px solid var(--pn-line, #dce3ed); border-radius: 24px; background: var(--pn-surface, #fff); color: var(--pn-ink, #15213a); font: inherit; font-size: .85rem; font-weight: 650; text-decoration: none; }
    .pn2-feed-tabs [aria-pressed="true"] { color: #fff; background: #3257d5; border-color: #3257d5; }
    .pn2-feed-status { order: -10; font-size: .85rem; margin: 0; color: var(--pn-muted, #52627b); }
    .pn2-feed-status:not([data-pn2-feed-empty]) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; white-space: nowrap; clip-path: inset(50%); }
    html[data-pn2-mobile-theme="feed"] .pn2-feed-card { order: var(--pn2-feed-order, 10); overflow: hidden; border: 1px solid var(--pn-line, #dce3ed); border-radius: var(--pn2-feed-radius); background: var(--pn-surface, #fff); box-shadow: 0 3px 16px rgb(20 33 61 / 3%); color: var(--pn-ink, #15213a); }
    html[data-pn2-mobile-theme="feed"] .pn2-feed-card[hidden] { display: none !important; }
    .pn2-feed-image { display: block; aspect-ratio: 1.85; overflow: hidden; background: var(--pn-surface, #e5eaf3); }
    .pn2-feed-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
    .pn2-feed-card-copy { padding: 18px; }
    .pn2-feed-meta { display: flex; flex-wrap: wrap; gap: .25rem .7rem; align-items: center; font-size: .7rem; line-height: 1.5; color: var(--pn-muted, #52627b); }
    .pn2-feed-meta > span { font-weight: 750; color: var(--pn-blue, #3257d5); }
    .pn2-feed-card h2 { margin: .65rem 0 .55rem; font-size: clamp(1.2rem, 4.6vw, 1.6rem); line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
    .pn2-feed-card h2 a { color: inherit; text-decoration: none; }
    .pn2-feed-card-copy > p { margin: .5rem 0 1rem; font-size: .94rem; line-height: 1.6; color: var(--pn-muted, #52627b); }
    .pn2-feed-access { font-size: .7rem; font-weight: 700; color: var(--pn-blue, #3257d5); }
    .pn2-feed-actions { display: flex; align-items: center; justify-content: space-between; gap: .7rem; border-block-start: 1px solid var(--pn-line, #dce3ed); margin-block-start: .9rem; padding-block-start: .65rem; }
    .pn2-feed-actions form { margin: 0; }
    .pn2-feed-actions :is(a, button), .pn2-feed-heading button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 44px; border: 1px solid var(--pn-line, #dce3ed); border-radius: 10px; background: var(--pn-surface, #fff); color: var(--pn-ink, #15213a); font: inherit; font-size: .82rem; font-weight: 650; text-decoration: none; }
    .pn2-feed-actions :is(a, button) { padding: .5rem .9rem; }
    .pn2-feed-actions .pn2-feed-read { color: var(--pn-blue, #3257d5); border-color: transparent; padding-inline-start: 0; }
    html[data-pn2-mobile-theme="feed"] [data-pn2-feed-ad="0"] { order: 10; }
    html[data-pn2-mobile-theme="feed"] [data-pn2-feed-ad="1"] { order: 20; }
    html[data-pn2-mobile-theme="feed"] .pn2-feed-more { order: 1000; display: grid; gap: .6rem; padding: 20px; margin-block-end: 18px; border: 1px solid var(--pn-line, #dce3ed); border-radius: var(--pn2-feed-radius); background: var(--pn-surface, #fff); text-align: center; }
    .pn2-feed-more p { margin: 0; color: var(--pn-muted, #52627b); }
    .pn2-feed-more a { display: inline-grid; min-height: 44px; align-items: center; font-weight: 650; color: var(--pn-blue, #3257d5); }
    html[data-pn2-mobile-theme="feed"] .pn2-category-page :is(.pn2-category-grid, #postsLoadMoreContent) { display: flex; flex-direction: column; gap: 16px; }
    html[data-pn2-mobile-theme="feed"] #postsLoadMoreContent > .col-sm-6 { width: 100%; }
    html[data-pn2-mobile-theme="feed"] .pn2-category-card { display: block; overflow: hidden; border-radius: var(--pn2-feed-radius); }
    html[data-pn2-mobile-theme="feed"] .pn2-category-card > a > img { width: 100%; height: auto; aspect-ratio: 1.85; object-fit: cover; }
    html[data-pn2-mobile-theme="feed"] .pn2-category-card h2 { font-size: 1.35rem; line-height: 1.3; }
    html[data-pn2-mobile-theme="feed"] .pn2-feed-reader-bar { display: flex; position: relative; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem .7rem; margin: 0 0 16px; padding: .5rem .7rem .7rem; border: 1px solid var(--pn-line, #dce3ed); border-radius: 12px; background: var(--pn-surface, #fff); }
    .pn2-feed-reader-bar > div:not(.pn2-feed-reader-progress) { display: flex; gap: .8rem; }
    .pn2-feed-reader-bar a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; font-weight: 650; color: var(--pn-blue, #3257d5); text-decoration: none; }
    .pn2-feed-reader-progress { position: absolute; inset-inline: 10px; bottom: 0; height: 3px; overflow: hidden; border-radius: 3px; background: var(--pn-line, #dce3ed); }
    .pn2-feed-reader-progress span { display: block; width: 100%; height: 100%; background: var(--pn-blue, #3257d5); transform: scaleX(0); transform-origin: left; }
    [dir="rtl"] .pn2-feed-reader-progress span { transform-origin: right; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-header h1 { font-size: clamp(1.65rem, 6.5vw, 2.4rem); line-height: 1.16; letter-spacing: -.025em; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-article { min-width: 0; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-byline { gap: .35rem .7rem; font-size: .75rem; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-tools { flex-wrap: wrap; gap: .45rem; }
    :is(.pn2-feed-card, .pn2-feed-tabs, .pn2-feed-heading, .pn2-feed-more, .pn2-feed-reader-bar, .pn2-feed-theme-control) :is(a, button, select):focus-visible { outline: 3px solid var(--pn-blue, #3257d5); outline-offset: 3px; }
    [data-bs-theme="dark"] .pn2-feed-theme-control, [data-bs-theme="dark"] .pn2-feed-card, [data-bs-theme="dark"] .pn2-feed-more, [data-bs-theme="dark"] .pn2-feed-reader-bar { color-scheme: dark; }
}
@media (max-width:991.98px) {
    .pn2-feed-deck { display:flex; align-items:flex-start; gap:12px; width:100%; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; scrollbar-width:none; -webkit-overflow-scrolling:touch; border-radius:18px; }
    .pn2-feed-deck::-webkit-scrollbar { display:none; }
    html[data-pn2-mobile-theme="feed"] .pn2-feed-deck > .pn2-feed-card { flex:0 0 100%; min-width:0; width:100%; scroll-snap-align:center; scroll-snap-stop:always; box-shadow:none; }
    .pn2-feed-deck-controls { display:flex; justify-content:center; align-items:center; gap:20px; color:var(--pn-muted,#52627b); font-size:.8rem; font-variant-numeric:tabular-nums; }
    .pn2-feed-deck-controls button { min-width:48px; min-height:44px; border-radius:50%; border:1px solid var(--pn-line,#dce3ed); background:var(--pn-surface,#fff); color:var(--pn-ink,#15213a); font-size:1.2rem; }
    .pn2-feed-deck-controls button:disabled { opacity:.35; }
    .pn2-feed-more { padding:12px 16px; }
    html[data-pn2-mobile-theme="feed"] .pn2-feed-reader-bar { display:grid; grid-template-columns:auto 1fr auto auto; flex-wrap:nowrap; position:sticky; top:62px; z-index:25; padding:4px 10px 7px; margin:8px 0 0; border-radius:14px; box-shadow:0 4px 18px rgb(20 33 61 / 6%); }
    .pn2-reader-position { justify-self:center; font-size:.7rem; color:var(--pn-muted,#52627b); white-space:nowrap; }
    .pn2-reader-arrows { gap:12px !important; }
    .pn2-reader-arrows a { font-size:.75rem; white-space:nowrap; }
    .pn2-reader-text-size { min-width:44px; min-height:44px; border:0; border-radius:10px; background:var(--pn-paper,#f3f5f9); color:var(--pn-ink,#15213a); font-size:1rem; }
    .pn2-reader-text-size[aria-pressed="true"] { outline:2px solid var(--pn-blue,#3257d5); outline-offset:-2px; }
    html[data-pn2-mobile-theme="feed"] .pn2-reader-swipe-hint { display:block; text-align:center; font-size:.68rem; line-height:1.4; color:var(--pn-muted,#52627b); margin:8px 4px 16px; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-shell { gap:20px; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-article { border-radius:16px; padding-inline:clamp(14px,4vw,24px); }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-header { margin-block-end:18px; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-header h1 { font-size:clamp(1.8rem,7.3vw,2.65rem); line-height:1.13; text-wrap:balance; }
    html[data-pn2-mobile-theme="feed"] #article-body { font-size:18px; line-height:1.72; overflow-wrap:break-word; }
    html[data-pn2-mobile-theme="feed"][data-pn2-reader-large] #article-body { font-size:21px; }
    html[data-pn2-mobile-theme="feed"] #article-body :is(p,li) { line-height:1.72; }
    html[data-pn2-mobile-theme="feed"] #article-body :is(h2,h3,h4) { scroll-margin-top:140px; line-height:1.25; text-wrap:pretty; }
    html[data-pn2-mobile-theme="feed"] #article-body :is(img,video,iframe) { max-width:100%; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-tools { display:flex; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; padding-block-end:5px; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-tools > * { flex:0 0 auto; }
    html[data-pn2-mobile-theme="feed"] .pn2-reading-tools :is(a,button) { min-height:44px; }
    .pn2-feed-deck:focus-visible, .pn2-feed-deck-controls button:focus-visible, .pn2-reader-text-size:focus-visible { outline:3px solid var(--pn-blue,#3257d5); outline-offset:2px; }
    @media (max-width:359px) { .pn2-reader-position { display:none; } html[data-pn2-mobile-theme="feed"] .pn2-feed-reader-bar { grid-template-columns:auto 1fr auto; } .pn2-reader-text-size { justify-self:end; } }
    @media (prefers-reduced-motion:reduce) { .pn2-feed-deck { scroll-behavior:auto; } }
}
