.pv-account-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    padding-block: .8rem;
    border-bottom: 1px solid var(--theme-border);
}

.pv-account-nav a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .3rem;
    min-height: 40px;
    padding: .4rem .72rem;
    border: 1px solid var(--theme-border);
    border-radius: .45rem;
    background: var(--theme-surface);
    color: var(--theme-text);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.pv-account-nav a:is(:hover, :focus-visible) {
    border-color: var(--theme-link);
    color: var(--theme-link);
    text-decoration: underline;
    text-underline-offset: .2em;
}

.pv-account-nav a[aria-current=page] {
    color: var(--theme-on-primary);
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    font-weight: 700;
}

.pv-account-nav a:focus-visible,
.pv-account-screen :is(a, button, summary):focus-visible {
    outline: 2px solid var(--theme-link);
    outline-offset: 3px;
}

.pv-account-nav small {
    color: inherit;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .025em;
}

.pv-account-screen {
    padding-block: clamp(1.25rem, 3vw, 2.6rem);
}

.pv-account-screen .pv-account-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 0 1.15rem;
}

.pv-account-title h1,
.pv-account-title form {
    margin: 0;
}

.pv-account-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
}

.pv-account-stack {
    display: grid;
    min-width: 0;
    gap: 1rem;
}

.pv-account-screen .pv-account-stack > :is(.panel, details),
.pv-account-screen .pv-account-plan {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: clamp(1rem, 2vw, 1.5rem);
}

.pv-account-screen .panel h2 {
    margin: 0 0 .8rem;
}

.pv-account-details dl {
    display: grid;
    grid-template-columns: minmax(4.25rem, auto) minmax(0, 1fr);
    gap: .65rem 1.25rem;
    margin: 0;
}

.pv-account-details dt,
.pv-account-details dd {
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;
}

.pv-account-details dt { color: var(--theme-muted); }

.pv-account-plan > section.panel {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.pv-account-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.25rem;
    margin-top: 1rem;
}

.pv-account-screen .pv-account-support summary {
    width: fit-content;
    cursor: pointer;
    font-weight: 650;
    color: var(--theme-link);
}

.pv-account-screen .pv-account-support form {
    display: grid;
    gap: .65rem;
    margin-top: 1rem;
}

.pv-account-support :is(label, textarea, button) { margin: 0; }
.pv-account-support textarea { width: 100%; min-height: 8rem; resize: vertical; }
.pv-account-support button { justify-self: start; }

.pv-account-screen #account-security > .eyebrow { display: none; }
.pv-account-screen #account-security .two-col { gap: .75rem; }
.pv-account-screen #account-security input { min-width: 0; width: 100%; }
.pv-account-screen #google-account { scroll-margin-top: 1.25rem; }
.pv-account-screen .owner-privacy form { max-width: none; }

.registry-tools.pv-registry-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.2rem;
    padding: .65rem 0;
    margin-block: 0 1rem;
}

.pv-registry-tools a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: var(--theme-link);
    text-decoration: underline;
    text-underline-offset: .18em;
}

/* Keep the annual PRO action legible in every interaction state. */
.pv-membership .pv-plans[data-billing-period=yearly] .pv-plan.pv-plan-pro button.pv-action,
.pv-membership .pv-plans .pv-plan.pv-plan-pro .pv-action[href*="interval=yearly"],
.pv-membership .pv-plans .pv-plan.pv-plan-pro .pv-action[href*="interval=yearly"]:visited {
    color: var(--pv-pro-end) !important;
    background-color: var(--pv-pro-action) !important;
    border-color: var(--pv-pro-edge) !important;
}

.pv-membership .pv-plans[data-billing-period=yearly] .pv-plan.pv-plan-pro button.pv-action:is(:hover, :focus-visible, :active),
.pv-membership .pv-plans .pv-plan.pv-plan-pro .pv-action[href*="interval=yearly"]:is(:hover, :focus-visible, :active) {
    color: var(--pv-pro-end) !important;
    background-color: var(--pv-pro-action-hover) !important;
    border-color: var(--pv-pro-action-hover) !important;
}

.pv-membership .pv-plans .pv-plan.pv-plan-pro .pv-action:focus-visible {
    outline: 2px solid var(--pv-pro-accent) !important;
    outline-offset: 3px !important;
}

.pv-membership .pv-period a:not([aria-current=page]) {
    color: var(--theme-link) !important;
    background-color: var(--theme-surface) !important;
}

.pv-membership .pv-period a:not([aria-current=page]):is(:hover, :focus-visible) {
    text-decoration: underline;
    text-underline-offset: .18em;
}

.pv-membership .pv-period a[aria-current=page],
.pv-membership .pv-period a[aria-current=page]:is(:link, :visited, :hover, :focus, :active) {
    color: #fffdf6 !important;
    background-color: #234439 !important;
}

.pv-membership .pv-period a:focus-visible {
    outline: 2px solid var(--theme-link) !important;
    outline-offset: 2px !important;
}

@media (max-width: 50rem) {
    .pv-account-columns { grid-template-columns: minmax(0, 1fr); }
    .pv-account-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(8.1rem, 100%), 1fr));
        gap: .35rem;
    }
    .pv-account-nav a { min-height: 44px; padding: .4rem .5rem; font-size: .85rem; }
}

@media (max-width: 35rem) {
    .pv-account-screen #account-security .two-col { grid-template-columns: minmax(0, 1fr); }
}

@media (forced-colors: active) {
    .pv-account-nav a[aria-current=page] { outline: 2px solid Highlight; }
}

.gate-plan-options [data-price-tier] .pv-price-heading,
.pv-membership .pv-current-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .3rem .75rem;
}

.pv-membership .pv-current-heading :is(h2, .pv-tier-title),
.gate-plan-options .pv-price-heading > :is(strong, small) { margin: 0; }
.gate-plan-options [data-price-tier] .pv-price-heading { width: 100%; }
.gate-plan-options .pv-price-heading small { font-weight: 700; }
.gate-plan-options [data-price-tier] .pv-year-price { font-weight: 750; }
.pv-membership .pv-account-grid { margin-block: 1rem; }

.pv-membership .pv-account-grid .pv-research-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: .55rem;
}
.pv-membership .pv-research-actions > a.pv-action {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    margin: 0;
    padding-inline: .5rem;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
}

.pv-research-form > nav { margin-bottom: 1rem; }
.pv-research-form .pv-report-builder { margin-block-start: 1.25rem; }
.pv-report-profiles, .pv-report-settings, .pv-atlas-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    margin-block: 1rem;
}
.pv-session-name { grid-column: 1 / -1; }
.pv-report-setting { box-shadow: 0 2px 5px rgb(20 39 30 / 7%); }
.pv-research-form .pv-field-box { margin: 0; }
.pv-research-form form[method=get] .pv-field-box { margin-bottom: .65rem; }
.pv-research-form .pv-report-builder :is(label, input, select) { margin: 0; }
.pv-research-form label { color: var(--theme-text); }
.pv-report-builder :is(input:not([type=hidden]), select) { width: 100%; min-width: 0; min-height: 44px; }
@media (max-width: 40rem) {
    .pv-report-profiles, .pv-report-settings, .pv-atlas-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 36rem) {
    .gate-plan-options a[data-price-tier] { display: flex; align-items: stretch; }
}

/* Keep the selected tab legible when the shared link styles apply hover or focus. */
#main .pv-account-nav > a[aria-current=page],
#main .pv-account-nav > a[aria-current=page]:is(:link, :visited, :hover, :focus, :active) {
    color: #fffdf6 !important;
    background-color: #234439 !important;
    border-color: #234439 !important;
}
html[data-pitvu-theme=dark] #main .pv-account-nav > a[aria-current=page] {
    color: #182b21 !important;
    background-color: #c6e6cf !important;
    border-color: #c6e6cf !important;
}
#main .pv-account-nav > a[aria-current=page] > :is(span:first-child, small:not(.pv-pro-label)) {
    color: inherit !important;
}
#main .pv-account-nav > a:focus-visible {
    outline: 2px solid var(--theme-link) !important;
    outline-offset: 3px !important;
}
@media (forced-colors: active) {
    #main .pv-account-nav > a[aria-current=page] {
        color: HighlightText !important;
        background: Highlight !important;
        border-color: Highlight !important;
    }
}
