/* Scoped account utilities. Newsfy continues to own the adjacent WRITE FOR US button. */
.pw-header-account-control.rivax-advanced-button-wrapper {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 1vw, 16px);
    max-width: none;
}
.pw-header-user { position: relative; flex: 0 0 auto; text-align: start; color: inherit; }
.pw-header-user > summary {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    min-width: 44px; min-height: 44px; padding: 6px 8px; box-sizing: border-box;
    cursor: pointer; list-style: none; border: 1px solid transparent; border-radius: 0;
    background: transparent;
    font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; color: inherit;
}
.pw-header-user > summary::-webkit-details-marker { display: none; }
.pw-header-user > summary:hover, .pw-header-user[open] > summary { background: transparent; }
.pw-header-user > summary:hover { color: var(--accent-color, currentColor); }
.pw-header-user > summary:focus-visible, .pw-header-user-panel a:focus-visible {
    outline: 2px solid var(--accent-color, currentColor); outline-offset: 3px;
}
.pw-account-icon { width: 21px; height: 21px; flex-shrink: 0; }
.pw-account-chevron { width: 14px; height: 14px; flex-shrink: 0; transition: transform .15s ease; }
.pw-header-user[open] .pw-account-chevron { transform: rotate(180deg); }
.pw-account-name { max-width: 130px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pw-header-user .pw-header-user-panel {
    position: absolute; z-index: 10001; top: calc(100% + 8px); inset-inline-end: 0;
    display: flex; flex-direction: column; min-width: 210px; width: max-content;
    max-width: min(280px, calc(100vw - 24px)); padding: 8px; box-sizing: border-box;
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 10px;
    background: var(--pw-account-surface, #fff); color: var(--pw-account-ink, #202124);
    box-shadow: 0 12px 32px rgb(0 0 0 / 14%); font-size: 14px; line-height: 1.4;
    transform: translateX(var(--pw-menu-shift, 0px));
}
.pw-header-user:not([open]) > .pw-header-user-panel { display: none; }
.pw-header-user-panel a {
    display: flex; align-items: center; min-height: 44px; padding: 8px 12px;
    border-radius: 5px; color: inherit; text-decoration: none; font-weight: 500;
}
.pw-header-user-panel a:hover { background: color-mix(in srgb, currentColor 7%, transparent); color: inherit; }
.pw-workspace-welcome { margin: 0 0 12px; font-size: clamp(20px, 1.5vw, 22px); line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
/* Match Newsfy's actual theme toggle class, without relying on the OS preference. */
html[scheme="dark"] .pw-header-user {
    --pw-account-surface: #202124; --pw-account-ink: #f4f4f4;
}
@media (max-width: 1024px) { .pw-account-name { max-width: 80px; } }
@media (max-width: 767px) {
    .pw-account-name { display: none; }
    .pw-header-user > summary { padding-inline: 4px; gap: 3px; }
    .pw-header-user .pw-header-user-panel { inset-inline-end: auto; inset-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) { .pw-account-chevron { transition: none; } }

/* Header 2091: reserve the account/CTA widget's real width instead of shrinking its box. */
.elementor-2091 .elementor-element.elementor-element-3bf4c36 { flex-shrink: 0; }
@media (min-width: 1025px) and (max-width: 1350px) {
    .pw-account-name { max-width: 64px; }
}
@media (min-width: 1025px) and (max-width: 1199px) {
    .pw-account-name { display: none; }
}
