/* Editorial news surfaces inside the customer portal's existing Home route. */
#dashboardSection .portal-home[data-news-view="archive"] > .portal-page-heading,
#dashboardSection .portal-home[data-news-view="archive"] > .portal-home-grid,
#dashboardSection .portal-home[data-news-view="archive"] > .portal-home-footer,
#dashboardSection .portal-home[data-news-view="article"] > .portal-page-heading,
#dashboardSection .portal-home[data-news-view="article"] > .portal-home-grid,
#dashboardSection .portal-home[data-news-view="article"] > .portal-home-footer { display: none; }

#dashboardSection .portal-news-feed,
#dashboardSection .portal-news-workspace { min-width: 0; color: var(--portal-text, #edf3ff); }
#dashboardSection .portal-news-workspace { scroll-margin-top: 24px; }
#dashboardSection .portal-news-workspace:focus { outline: none; }
#dashboardSection .portal-news-section .portal-section-heading { gap: 12px; }
#dashboardSection .portal-news-section .portal-section-heading > button { flex: 0 0 auto; }
#dashboardSection .pn-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#dashboardSection .pn-card-grid { display: grid; gap: 18px; }
#dashboardSection .pn-feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#dashboardSection .pn-archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
#dashboardSection .pn-card { position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--portal-border, #28354a); border-radius: 12px; background: var(--portal-surface, #121c2b); transition: border-color 150ms ease, box-shadow 150ms ease; }
#dashboardSection .pn-card:hover,
#dashboardSection .pn-card:focus-within { border-color: var(--portal-cyan, #69e1de); box-shadow: 0 7px 20px #00000018; }
#dashboardSection .pn-card-content { min-width: 0; display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 20px; }
#dashboardSection .pn-card-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 13px; }
#dashboardSection .portal-home .pn-category,
#dashboardSection .pn-featured { display: inline-flex; align-items: center; border-radius: 5px; font-size: 10px; line-height: 1.4; font-weight: 650; letter-spacing: .04em; padding: 5px 7px; }
#dashboardSection .pn-category { color: var(--portal-cyan, #69e1de); background: var(--portal-cyan-soft, #123334); }
#dashboardSection .pn-featured { color: var(--portal-violet, #be9aff); background: var(--portal-violet-soft, #2b2244); }
#dashboardSection .pn-card-title { margin: 0; padding: 0; font-size: 18px; font-weight: 650; letter-spacing: -.3px; line-height: 1.4; overflow-wrap: anywhere; }
#dashboardSection .pn-story-link { color: var(--portal-text, #edf3ff); text-decoration: none; }
#dashboardSection .pn-story-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
#dashboardSection .pn-story-link:focus-visible { outline: none; }
#dashboardSection .pn-card:has(.pn-story-link:focus-visible) { outline: 2px solid var(--portal-cyan, #69e1de); outline-offset: 3px; }
#dashboardSection .pn-card-excerpt { margin: 11px 0 15px; font-size: 13px; line-height: 1.7; color: var(--portal-muted, #a3b1c8); overflow-wrap: anywhere; }
#dashboardSection .pn-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0; color: var(--portal-muted, #a3b1c8); font-size: 11px; line-height: 1.6; }
#dashboardSection .pn-meta > :nth-child(n+2)::before { content: "·"; margin-right: 12px; }
#dashboardSection .pn-card .pn-meta { margin-top: auto; padding-top: 2px; }
#dashboardSection .pn-card-read { margin-top: 14px; color: var(--portal-cyan, #69e1de); font-size: 12px; font-weight: 600; }
#dashboardSection .pn-card-read > span { display: inline-block; margin-left: 5px; }
#dashboardSection .pn-feed-grid > .pn-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); }
#dashboardSection .pn-feed-grid > .pn-card:first-child > .pn-cover { height: 100%; min-height: 220px; aspect-ratio: auto; }

/* Uploaded covers use authenticated object URLs; a quiet arcade treatment remains on failure. */
#dashboardSection .pn-cover { position: relative; display: block; flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; background: #102431; }
#dashboardSection .pn-cover-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 15px; padding: 24px; color: #b8dbdd; background: radial-gradient(ellipse at 80% 20%, #19444a 0%, transparent 63%), linear-gradient(125deg, #101c30, #102d34); }
#dashboardSection .pn-cover-fallback::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .28; background-image: linear-gradient(#6bbaba30 1px, transparent 1px), linear-gradient(90deg, #6bbaba30 1px, transparent 1px); background-size: 28px 28px; transform: perspective(300px) rotateX(18deg) scale(1.2); transform-origin: bottom; }
#dashboardSection .pn-cover-fallback::after { content: ""; position: absolute; width: 75px; height: 75px; right: -18px; bottom: -28px; border: 14px solid #6be0dc1b; transform: rotate(45deg); }
#dashboardSection .pn-cover-mark { display: flex; flex-direction: column; gap: 2px; font: 800 clamp(13px, 1.5vw, 20px)/1.1 Inter, "Segoe UI", sans-serif; letter-spacing: .16em; }
#dashboardSection .pn-cover-mark > :last-child { color: #739fa7; font-size: .65em; letter-spacing: .3em; }
#dashboardSection .pn-cover-category { max-width: 100%; color: #8fb9bc; font-size: 10px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; overflow-wrap: anywhere; }
#dashboardSection img.pn-cover-image { display: block; position: absolute; inset: 0; width: 100%; min-width: 0; max-width: 100%; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: cover; }
#dashboardSection .pn-cover-loaded > .pn-cover-fallback { visibility: hidden; }

#dashboardSection .pn-state { display: flex; align-items: flex-start; gap: 17px; padding: 28px; border: 1px solid var(--portal-border, #28354a); border-radius: 12px; background: var(--portal-surface, #121c2b); }
#dashboardSection .pn-state-icon { display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--portal-border, #28354a); border-radius: 7px; color: var(--portal-cyan, #69e1de); font-size: 24px; line-height: 1; }
#dashboardSection .pn-loading .pn-state-icon { font-size: 14px; letter-spacing: 1px; }
#dashboardSection .pn-state h3 { margin: 0 0 7px; padding: 0; color: var(--portal-text, #edf3ff); font-size: 16px; font-weight: 600; line-height: 1.45; }
#dashboardSection .pn-state p { margin: 0; color: var(--portal-muted, #a3b1c8); font-size: 13px; line-height: 1.75; }
#dashboardSection .pn-state .pn-button { margin-top: 16px; }
#dashboardSection .portal-home .pn-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 15px; border: 1px solid transparent; border-radius: 7px; color: #102224; background: var(--portal-cyan, #69e1de); font: 600 12px/1.4 Inter, "Segoe UI", sans-serif; text-decoration: none; }
#dashboardSection .portal-home .pn-button-secondary { color: var(--portal-text, #edf3ff); border-color: var(--portal-border, #28354a); background: var(--portal-surface, #121c2b); }
#dashboardSection .pn-button-secondary:hover:not(:disabled) { background: var(--portal-raised, #182437); border-color: var(--portal-muted, #a3b1c8); }
#dashboardSection .pn-button:disabled { cursor: default; opacity: .4; }
#dashboardSection .portal-home .pn-inline-link { border: 0; padding: 6px 0; background: none; color: var(--portal-muted, #a3b1c8); font-size: 12px; line-height: 1.5; text-decoration: none; }
#dashboardSection .pn-inline-link:hover { color: var(--portal-cyan, #69e1de); text-decoration: underline; text-underline-offset: 3px; }
#dashboardSection .pn-breadcrumbs { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: var(--portal-muted, #a3b1c8); font-size: 12px; line-height: 1.5; flex-wrap: wrap; }
#dashboardSection .pn-current-crumb { color: var(--portal-text, #edf3ff); }
#dashboardSection .pn-view-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 26px; }
#dashboardSection .pn-view-heading h1 { margin: 9px 0 0; font-size: clamp(28px, 3vw, 38px); font-weight: 650; line-height: 1.2; letter-spacing: -1px; }
#dashboardSection .pn-view-heading p { margin: 12px 0 0; color: var(--portal-muted, #a3b1c8); font-size: 14px; line-height: 1.65; }
#dashboardSection .pn-view-heading > .pn-button { flex: 0 0 auto; }
#dashboardSection .pn-filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 0 19px; margin: 0 0 18px; border-bottom: 1px solid var(--portal-border, #28354a); }
#dashboardSection .portal-home .pn-filter { min-height: 38px; padding: 8px 12px; border: 1px solid var(--portal-border, #28354a); border-radius: 7px; background: var(--portal-surface, #121c2b); color: var(--portal-muted, #a3b1c8); font-size: 12px; line-height: 1.5; }
#dashboardSection .pn-filter:hover { color: var(--portal-text, #edf3ff); border-color: var(--portal-muted, #a3b1c8); }
#dashboardSection .pn-filter[aria-pressed="true"] { color: var(--portal-cyan, #69e1de); border-color: var(--portal-cyan, #69e1de); background: var(--portal-cyan-soft, #123334); }
#dashboardSection .pn-results-summary { margin: 0 0 19px; color: var(--portal-muted, #a3b1c8); font-size: 12px; line-height: 1.5; }
#dashboardSection .pn-pagination { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 24px; margin-top: 26px; border-top: 1px solid var(--portal-border, #28354a); }
#dashboardSection .pn-page-label { color: var(--portal-muted, #a3b1c8); font-size: 12px; line-height: 1.5; text-align: center; }

#dashboardSection .pn-article { width: 100%; max-width: 940px; margin: 0 auto; }
#dashboardSection .pn-article-header { max-width: 780px; margin: 0 auto 28px; }
#dashboardSection .pn-article-title { margin: 0 0 18px; font-size: clamp(28px, 3.8vw, 44px); line-height: 1.17; font-weight: 650; letter-spacing: -1.1px; overflow-wrap: anywhere; }
#dashboardSection .pn-article-intro { margin: 0 0 20px; color: var(--portal-muted, #a3b1c8); font-size: clamp(15px, 1.6vw, 18px); line-height: 1.7; overflow-wrap: anywhere; }
#dashboardSection .pn-article-header .pn-meta { font-size: 12px; }
#dashboardSection .pn-category-link { border: 1px solid transparent; }
#dashboardSection .pn-category-link:hover { border-color: currentColor; }
#dashboardSection .pn-article-cover { aspect-ratio: 16 / 8; max-height: 470px; margin: 0 0 34px; border: 1px solid var(--portal-border, #28354a); border-radius: 12px; }
#dashboardSection .pn-article-cover .pn-cover-fallback { padding: clamp(25px, 6vw, 64px); }
#dashboardSection .pn-article-cover .pn-cover-mark { font-size: clamp(24px, 3.5vw, 42px); }
#dashboardSection .pn-article-cover .pn-cover-category { font-size: 12px; }
#dashboardSection .pn-article-body { max-width: 740px; margin: 0 auto; }
#dashboardSection .pn-back-button { margin-top: 35px; }

/* Shared article typography is also available to the admin preview. */
.portal-news-prose { color: var(--portal-text, inherit); font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.portal-news-prose > :first-child { margin-top: 0; }
.portal-news-prose > :last-child { margin-bottom: 0; }
.portal-news-prose p { margin: 0 0 1.35em; font-size: inherit; line-height: inherit; color: inherit; }
.portal-news-prose h2 { margin: 1.8em 0 .7em; font-size: 1.5em; line-height: 1.35; letter-spacing: -.35px; font-weight: 650; color: inherit; }
.portal-news-prose h3 { margin: 1.65em 0 .65em; font-size: 1.2em; line-height: 1.4; font-weight: 650; color: inherit; }
.portal-news-prose ul,
.portal-news-prose ol { margin: .4em 0 1.4em; padding-left: 1.6em; }
.portal-news-prose li { margin: .45em 0; padding-left: .2em; }
.portal-news-prose blockquote { margin: 1.5em 0; padding: 1em 1.3em; border-left: 3px solid var(--portal-cyan, #287c82); border-radius: 0 7px 7px 0; background: var(--portal-surface, #f2f5f7); color: inherit; }
.portal-news-prose code { padding: .15em .35em; border: 1px solid var(--portal-border, #ccd4df); border-radius: 4px; background: var(--portal-raised, #edf1f5); color: inherit; font: .88em/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.portal-news-prose a { color: var(--portal-cyan, #216c77); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.portal-news-prose a:hover { text-decoration-thickness: 2px; }
.portal-news-prose a:focus-visible { outline: 2px solid var(--portal-cyan, #216c77); outline-offset: 3px; }

@media (max-width: 1190px) {
    #dashboardSection .pn-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #dashboardSection .pn-card-content { padding: 17px; }
    #dashboardSection .pn-card-title { font-size: 17px; }
    #dashboardSection .pn-feed-grid > .pn-card:first-child { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}
@media (max-width: 760px) {
    #dashboardSection .pn-view-heading { flex-wrap: wrap; gap: 17px; }
    #dashboardSection .pn-view-heading > .pn-button { display: none; }
    #dashboardSection .pn-card-grid { gap: 15px; }
    #dashboardSection .pn-breadcrumbs { margin-bottom: 20px; }
    #dashboardSection .pn-article-title { letter-spacing: -.7px; }
    #dashboardSection .pn-article-cover { margin-bottom: 25px; }
    #dashboardSection .pn-state { padding: 22px; }
}
@media (max-width: 520px) {
    #dashboardSection .pn-feed-grid,
    #dashboardSection .pn-archive-grid { grid-template-columns: minmax(0, 1fr); }
    #dashboardSection .pn-feed-grid > .pn-card:first-child { display: flex; grid-column: auto; }
    #dashboardSection .pn-feed-grid > .pn-card:first-child > .pn-cover { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
    #dashboardSection .pn-card-content { padding: 20px; }
    #dashboardSection .pn-card-title { font-size: 20px; }
    #dashboardSection .pn-card-excerpt { font-size: 14px; }
    #dashboardSection .pn-cover-mark { font-size: 24px; }
    #dashboardSection .pn-card-read { font-size: 13px; }
    #dashboardSection .pn-article-cover { aspect-ratio: 16 / 10; }
    #dashboardSection .pn-pagination { gap: 8px; }
    #dashboardSection .pn-pagination .pn-button { padding: 10px; font-size: 11px; }
    #dashboardSection .pn-state { gap: 12px; padding: 19px; }
    #dashboardSection .pn-state-icon { flex-basis: 29px; width: 29px; height: 29px; }
}
@media (pointer: coarse) {
    #dashboardSection .portal-home .pn-filter,
    #dashboardSection .portal-home .pn-button,
    #dashboardSection .portal-home .pn-inline-link { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    #dashboardSection .pn-card { transition: none; }
}
