/* Scoped profile header; breakpoints follow the profile column, not the window. */
section.hero.card.profile-hero-card { container-type: inline-size; }
section.hero.card.profile-hero-card > .profile-cover { height: 180px; }
section.hero.card.profile-hero-card > .profile-summary { display: grid !important; grid-template-columns: 96px minmax(0,1fr); align-items: start; gap: 20px 24px; margin-top: -32px; padding: 0 28px; }
section.hero.card.profile-hero-card > .profile-summary .ava { width: 96px; height: 96px; margin: 0; border: 4px solid var(--bg); border-radius: 50%; }
section.hero.card.profile-hero-card > .profile-summary .identity { padding-top: 44px; }
.profile-summary .identity h1 { margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; overflow-wrap: anywhere; }
.profile-summary .profile-username { font-size: 14px; color: var(--muted); }
.profile-summary .meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.profile-summary > .vf-level-card { grid-column: 1 / -1; grid-row: 3; width: 100%; max-width: none; margin: 0; padding: 18px 0 0; border: 0; border-top: 1px solid var(--stroke); border-radius: 0; box-shadow: none; background: none; }
.profile-summary .vf-level-card-head { align-items: baseline; }
.profile-summary .vf-level-card-head > div { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.profile-summary .vf-level-eyebrow { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.profile-summary .vf-level-card strong { font-size: 18px; font-weight: 800; }
.profile-summary .vf-level-percent { min-width: 0; padding: 0; font-size: 13px; font-weight: 600; background: none; color: var(--muted); }
.profile-summary .vf-level-progress { height: 4px; margin: 12px 0 9px; }
.profile-summary .vf-level-progress span { box-shadow: none; }
.profile-summary .vf-level-card-meta { font-size: 11px; font-weight: 500; gap: 8px; }
.profile-summary > .profile-primary-actions { grid-column: 1 / -1; grid-row: 2; position: static !important; display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 8px; margin: 0 !important; }
.profile-summary > .profile-primary-actions:empty { display: none; }
.profile-summary .profile-primary-actions .btn, .profile-summary .profile-primary-actions .btn2 { min-height: 36px; padding: 8px 14px; border-radius: 8px; font-size: 12px; box-shadow: none; }
section.hero.card.profile-hero-card > .stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; margin: 22px 28px 0; padding: 0 0 20px; border-bottom: 1px solid var(--stroke); }
.profile-hero-card > .stats .metric { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; border: 0; }
.profile-hero-card > .stats .metric strong { font-size: 22px; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }
.profile-hero-card > .stats .metric span { font-size: 12px; color: var(--muted); }
section.hero.card.profile-hero-card > .vf-profile-achievements { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 18px 28px 24px; }
.profile-hero-card .vf-profile-achievements .vf-achievement-chip.is-unlocked { display: flex; gap: 7px; min-width: 0; padding: 9px 10px; border: 0; border-radius: 8px; color: var(--text); background: color-mix(in srgb,var(--text) 4%,transparent); font-size: 11px; font-weight: 600; line-height: 1.5; transition: background .15s; }
.profile-hero-card .vf-profile-achievements .vf-achievement-chip:hover { background: color-mix(in srgb,var(--text) 9%,transparent); }
.profile-hero-card .vf-achievement-chip-icon { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; font-size: 16px; }
.profile-hero-card > .tabs { display: flex; margin-top: 0; overflow-x: auto; scrollbar-width: thin; }
.profile-hero-card > .tabs .tab { flex: 1 0 auto; padding: 16px 14px; font-size: 12px; text-align: center; }
@container (min-width: 720px) {
    section.hero.card.profile-hero-card > .profile-summary { grid-template-columns: 96px minmax(0,1fr) auto; }
    .profile-summary > .profile-primary-actions { grid-column: 3; grid-row: 1; margin-top: 48px !important; justify-content: flex-end; max-width: 220px; }
    .profile-summary > .vf-level-card { grid-row: 2; }
}
@container (max-width: 500px) {
    section.hero.card.profile-hero-card > .profile-cover { height: 140px; }
    section.hero.card.profile-hero-card > .profile-summary { padding: 0 18px; grid-template-columns: 72px minmax(0,1fr); gap: 18px 16px; margin-top: -24px; }
    section.hero.card.profile-hero-card > .profile-summary .ava { width: 72px; height: 72px; }
    section.hero.card.profile-hero-card > .profile-summary .identity { padding-top: 36px; }
    .profile-summary .identity h1 { font-size: 23px; }
    .profile-summary .meta { flex-direction: column; gap: 2px; font-size: 11px; }
    section.hero.card.profile-hero-card > .stats { margin: 20px 18px 0; gap: 8px; }
    .profile-hero-card > .stats .metric strong { font-size: 20px; }
    .profile-hero-card > .stats .metric span { font-size: 10px; overflow-wrap: anywhere; }
    section.hero.card.profile-hero-card > .vf-profile-achievements { grid-template-columns: repeat(2,minmax(0,1fr)); margin: 16px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) { .profile-hero-card .vf-achievement-chip { transition: none; } }
