/* Portal article management only; public article cards have a separate module. */
.pg-post-manager .pg-table-posts { border: 0 !important; background: transparent !important; overflow: visible !important; }
.pg-post-manager .pg-posts-table { display: table !important; width: 100%; table-layout: fixed; border-collapse: separate !important; border-spacing: 0 .75rem; }
.pg-post-manager .pg-posts-table tbody { display: table-row-group !important; }
.pg-post-manager .pg-posts-table thead { display: table-header-group !important; }
.pg-post-manager .pg-posts-table tr { display: table-row !important; }
.pg-post-manager .pg-posts-table :is(th,td) { display: table-cell !important; }
.pg-post-manager .pg-posts-table th { color: var(--pg-muted); font-weight: 800; }
.pg-post-manager .pg-posts-table :is(th,td) { padding: .85rem .6rem !important; vertical-align: middle; }
.pg-post-manager .pg-posts-table :is(th,td):first-child { width: auto; }
.pg-post-manager .pg-posts-table :is(th,td):nth-child(2) { width: 124px; }
.pg-post-manager .pg-posts-table :is(th,td):nth-child(3) { width: 136px; }
.pg-post-manager .pg-posts-table :is(th,td):nth-child(4) { width: 128px; }
.pg-post-manager .pg-posts-table td { background: var(--pg-surface-strong); border-block: 1px solid var(--pg-border); }
.pg-post-manager .pg-posts-table td:first-child { border-left: 1px solid var(--pg-border); border-radius: .9rem 0 0 .9rem; }
.pg-post-manager .pg-posts-table td:last-child { border-right: 1px solid var(--pg-border); border-radius: 0 .9rem .9rem 0; }
.pg-post-manager .pg-posts-table td::before { display: none !important; }
.pg-post-manager .pg-post-summary { display: flex; align-items: center; gap: .8rem; min-width: 0; position: relative; }
.pg-post-manager .pg-post-summary__media { display: flex; align-items: center; justify-content: center; flex: 0 0 clamp(88px,9vw,144px); aspect-ratio: 16/9; padding: 0; border: 0; border-radius: .65rem; overflow: hidden; background: var(--pg-bg-soft); color: var(--pg-muted); cursor: pointer; }
.pg-post-manager .pg-post-summary__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-post-manager .pg-post-summary__media > svg { width: 28px; height: 28px; }
.pg-post-manager .pg-post-summary__copy { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.pg-post-manager .pg-post-card-toggle { display: block; width: 100%; min-width: 0; padding: 0; border: 0; text-align: left; background: transparent; color: var(--pg-dark); font: inherit; font-size: 1rem; font-weight: 800; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.pg-post-manager .pg-post-owner { font-size: .75rem; color: var(--pg-muted); }
.pg-post-badges { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.pg-post-badge { display: inline-flex; align-items: center; justify-content: flex-start; gap: .3rem; max-width: 100%; padding: .3rem .45rem; border: 1px solid color-mix(in srgb,currentColor 24%,transparent); border-radius: .5rem; font: inherit; font-size: .75rem; font-weight: 700; line-height: 1.4; text-align: left; color: var(--pg-muted); background: var(--pg-bg-soft); }
button.pg-post-badge { cursor: pointer; }
.pg-post-badge > svg { width: 15px; height: 15px; flex: 0 0 15px; }
.pg-post-badge > span { min-width: 0; overflow-wrap: anywhere; }
.pg-post-badge--success { color: #087a3b; background: #e8f9ee; }
.pg-post-badge--warning { color: #965200; background: #fff3df; }
.pg-post-badge--info { color: #1756ab; background: #eaf2ff; }
.pg-post-badge--danger { color: #bb2034; background: #fff0f2; }
body.pg-theme-dark .pg-post-badge--success { color: #8cedb3; background: #103c2b; }
body.pg-theme-dark .pg-post-badge--warning { color: #ffd38b; background: #44321a; }
body.pg-theme-dark .pg-post-badge--info { color: #9bc8ff; background: #17344f; }
body.pg-theme-dark .pg-post-badge--danger { color: #ffabb5; background: #48232d; }
.pg-post-manager .pg-post-link-row { display: flex; align-items: center; min-width: 0; gap: .4rem; font-size: .75rem; }
.pg-post-manager .pg-post-slug { display: block; min-width: 0; max-width: 20rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pg-muted); }
.pg-post-manager .pg-post-share-link { flex: 0 0 auto; margin: 0; color: var(--pg-primary-deep); font-size: .75rem; font-weight: 700; }
.pg-post-manager .pg-post-copy-slug { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; padding: .4rem; border: 1px solid var(--pg-border); border-radius: .4rem; background: var(--pg-bg-soft); color: var(--pg-muted); cursor: pointer; }
.pg-post-manager .pg-post-copy-slug svg { width: 16px; height: 16px; }
.pg-post-manager :is(.pg-post-date,.pg-post-performance > span) { display: flex; align-items: center; gap: .4rem; font-size: .8125rem; overflow-wrap: anywhere; }
.pg-post-manager .pg-post-date > span { min-width: 0; }
.pg-post-manager .pg-post-date { white-space: nowrap; }
.pg-post-manager .pg-post-date small { display: block; padding-top: .35rem; color: var(--pg-muted); }
.pg-post-manager :is(.pg-post-date,.pg-post-performance) svg { flex: 0 0 18px; width: 18px; height: 18px; }
.pg-post-manager .pg-post-performance { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; min-width: 0; white-space: normal; }
.pg-post-manager .pg-post-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; width: 100%; max-width: 112px; margin: 0 0 0 auto; }
.pg-post-manager .pg-post-delete-form { display: block; margin: 0; min-width: 0; }
.pg-post-manager .pg-post-action { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; min-width: 0; min-height: 44px; aspect-ratio: 1; padding: .6rem; margin: 0; border: 1px solid var(--pg-border); border-radius: .65rem; background: var(--pg-bg-soft); color: var(--pg-dark); text-decoration: none; cursor: pointer; }
.pg-post-manager .pg-post-action > svg { flex: 0 0 23px; width: 23px; height: 23px; }
.pg-post-manager .pg-post-action > span { display: none; }
.pg-post-manager .pg-post-action--preview { color: var(--pg-primary-deep); }
.pg-post-manager .pg-post-action--delete { color: #ce1e38; background: #fff0f2; border-color: #f6c1ca; }
body.pg-theme-dark .pg-post-manager .pg-post-action--delete { color: #ffabb5; background: #48232d; border-color: #75404a; }
.pg-post-manager .pg-post-action:disabled { opacity: .5; cursor: not-allowed; }
.pg-post-manager .pg-post-action::after { content: attr(data-tooltip); display: none; position: absolute; z-index: 5; right: 0; bottom: calc(100% + .4rem); width: max-content; max-width: 180px; padding: .4rem .6rem; border-radius: .45rem; font-size: .75rem; line-height: 1.4; color: var(--pg-dark); background: var(--pg-surface-strong); border: 1px solid var(--pg-border); box-shadow: var(--pg-shadow-soft); pointer-events: none; }
@media (hover:hover) { .pg-post-manager .pg-post-action:hover::after { display: block; } }
.pg-post-manager .pg-post-action:focus-visible::after { display: block; }
.pg-post-manager :is(button,a):focus-visible { outline: 2px solid var(--pg-primary-deep); outline-offset: 3px; }
.pg-post-manager .pg-post-mobile-metrics,.pg-post-manager .pg-post-card-menu { display: none; }
.pg-post-detail { position: fixed; inset: 0; width: min(680px,calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); margin: auto; padding: 1.25rem; border: 1px solid var(--pg-border); border-radius: 1rem; color: var(--pg-dark); background: var(--pg-bg); box-shadow: var(--pg-shadow-soft); overflow-y: auto; overscroll-behavior: contain; text-align: left; font-size: .9375rem; font-weight: 400; }
.pg-post-detail:not([open]) { display: none !important; }
.pg-post-detail::backdrop { background: rgb(8 20 38 / .55); }
body.pg-post-dialog-open { overflow: hidden; }
.pg-post-detail__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; top: -1.25rem; z-index: 2; padding-block: .4rem; margin-bottom: 1rem; background: var(--pg-bg); }
.pg-post-detail__header button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; padding: .65rem; border: 1px solid var(--pg-border); border-radius: .6rem; color: var(--pg-dark); background: var(--pg-bg-soft); cursor: pointer; }
.pg-post-detail__header svg { width: 22px; height: 22px; }
.pg-post-detail__image { width: 100%; aspect-ratio: 16/9; max-height: 260px; border-radius: .75rem; overflow: hidden; background: var(--pg-bg-soft); }
.pg-post-detail__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-post-detail :is(h2,h3,p,dd) { overflow-wrap: anywhere; }
.pg-post-detail h2 { font-size: 1.25rem; line-height: 1.4; margin: 1rem 0; }
.pg-post-detail h3 { font-size: 1rem; margin: 0 0 .75rem; }
.pg-post-detail section + section { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--pg-border); }
.pg-post-detail__info { margin: 1rem 0; }
.pg-post-detail__info > div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: .7rem; padding-block: .3rem; }
.pg-post-detail__info dt,.pg-post-detail__note,.pg-post-seo-provider small { color: var(--pg-muted); }
.pg-post-detail__info dd { margin: 0; }
.pg-post-detail__note { font-size: .8125rem; line-height: 1.6; }
.pg-post-seo-provider { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 0; }
.pg-post-seo-provider > strong { flex: 1 1 180px; font-size: .875rem; }
.pg-post-seo-provider :is(p,small) { flex: 0 0 100%; margin: 0; font-size: .8125rem; line-height: 1.5; }
.pg-post-manager .pg-post-detail .pg-post-actions { max-width: none; margin: 0; }
.pg-post-manager .pg-post-detail .pg-post-action { aspect-ratio: auto; min-height: 84px; flex-direction: column; gap: .5rem; font: inherit; font-weight: 700; font-size: .875rem; }
.pg-post-manager .pg-post-detail .pg-post-action > span { display: block; }
.pg-post-manager .pg-post-detail .pg-post-action::after { display: none; }
.pg-post-review-link { display: inline-block; margin-top: 1rem; }
.pg-post-detail.is-actions-only > section:not([data-pg-post-section="actions"]) { display: none; }
.pg-post-detail.is-actions-only > [data-pg-post-section="actions"] { margin-top: 0; padding-top: 0; border: 0; }
.pg-post-detail [data-pg-post-info],.pg-post-detail__action-title { display: none; }
.pg-post-detail.is-actions-only .pg-post-detail__action-title { display: block; margin: 0 0 1rem; font-size: .9375rem; font-weight: 700; line-height: 1.5; }
.pg-post-detail.is-actions-only [data-pg-post-info] { display: block; margin-top: 1rem; padding: .7rem; width: 100%; border: 1px solid var(--pg-border); border-radius: .6rem; color: var(--pg-primary-deep); background: var(--pg-bg-soft); cursor: pointer; font: inherit; }
/* Usable width also covers a narrow laptop pane with the portal sidebar open. */
@container pg-post-manager (max-width: 760px) {
    .pg-post-manager .pg-posts-table,.pg-post-manager .pg-posts-table tbody { display: block !important; width: 100% !important; }
    .pg-post-manager .pg-posts-table thead { display: none !important; }
    .pg-post-manager .pg-posts-table .pg-post-card-row { display: block !important; width: 100% !important; min-width: 0; margin-bottom: .75rem; }
    .pg-post-manager .pg-posts-table .pg-post-summary-cell { display: block !important; width: 100% !important; padding: .75rem !important; border: 1px solid var(--pg-border); border-radius: .85rem; }
    .pg-post-manager .pg-post-card-row > td:not(:first-child) { display: none !important; }
    .pg-post-manager .pg-post-summary { align-items: flex-start; gap: .65rem; }
    .pg-post-manager .pg-post-summary__media { flex-basis: clamp(88px,23vw,120px); }
    .pg-post-manager .pg-post-summary__copy { gap: .4rem; }
    .pg-post-manager .pg-post-card-toggle { padding-right: 26px; }
    .pg-post-manager .pg-post-badges { align-items: flex-start; flex-direction: column; }
    .pg-post-manager .pg-post-badge { font-size: .75rem; }
    .pg-post-manager .pg-post-mobile-metrics { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; color: var(--pg-muted); font-size: .75rem; line-height: 1.4; }
    .pg-post-manager .pg-post-mobile-metrics svg { flex: 0 0 13px; width: 13px; height: 13px; }
    .pg-post-manager .pg-post-link-row { gap: .3rem; }
    .pg-post-manager .pg-post-copy-slug,.pg-post-manager .pg-post-share-link { display: none; }
    .pg-post-manager .pg-post-slug { font-size: .75rem; }
    .pg-post-manager .pg-post-card-menu { display: flex; align-items: center; justify-content: center; position: absolute; right: -.4rem; top: -.4rem; width: 36px; height: 36px; padding: .5rem; border: 0; border-radius: .5rem; background: transparent; color: var(--pg-muted); cursor: pointer; }
    .pg-post-manager .pg-post-card-menu svg { width: 20px; height: 20px; }
}
@media (max-width: 767.98px) { .pg-post-detail { inset: auto .5rem .5rem; width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); margin: 0; padding: 1rem; border-radius: 1rem; } }
