/* DW level hero 1.2.2 (cc-dw-profile-avatar-20261110): the member's level as a centerpiece. Account pages and the
   leaderboard. A jeweled "Level N" chip, the level name in gold Didot with a subtle shimmer, the rank art in the same
   tier frame as the avatar (1-4 line, 5-9 double ring, 10-14 jewels, 15-19 glow, 20 aura), a slim bar, "120 to Navigator".
   Each level has its own accent (--pa-accent). CSS only; no shimmer or aura motion with prefers-reduced-motion.
   1.2.1: the rank art keeps a fixed size AND room for its whole frame (--pa-frame: the ring, the jewels, the aura), and
   the title takes only the space that is left: one line, never wrapped, sized from that space and the name length
   (--len, set from the name) so the longest name fits beside the art at 390 px. */
.dw-pa-lv-1 { --pa-accent: #e9c77a; } .dw-pa-lv-2 { --pa-accent: #f0b86e; } .dw-pa-lv-3 { --pa-accent: #e39b5b; }
.dw-pa-lv-4 { --pa-accent: #e08e74; } .dw-pa-lv-5 { --pa-accent: #5fc4b0; } .dw-pa-lv-6 { --pa-accent: #4fb38a; }
.dw-pa-lv-7 { --pa-accent: #46b07c; } .dw-pa-lv-8 { --pa-accent: #9a86e8; } .dw-pa-lv-9 { --pa-accent: #f4d895; }
.dw-pa-lv-10 { --pa-accent: #57be8c; } .dw-pa-lv-11 { --pa-accent: #7fb3e8; } .dw-pa-lv-12 { --pa-accent: #9aa8f0; }
.dw-pa-lv-13 { --pa-accent: #7fe0c4; } .dw-pa-lv-14 { --pa-accent: #b48cf0; } .dw-pa-lv-15 { --pa-accent: #f2c46b; }
.dw-pa-lv-16 { --pa-accent: #e07ab8; } .dw-pa-lv-17 { --pa-accent: #8fa0ff; } .dw-pa-lv-18 { --pa-accent: #f4d895; }
.dw-pa-lv-19 { --pa-accent: #e8566f; } .dw-pa-lv-20 { --pa-accent: #ffe296; }

.dw-pa-hero { --pa-medal: 104px; --pa-frame: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 8px; min-width: 0; color: #eae1d1; }
.dw-pa-hero.dw-pa-tier-3, .dw-pa-hero.dw-pa-tier-4 { --pa-frame: 16px; }
.dw-pa-hero.dw-pa-tier-5 { --pa-frame: 21px; }
.dw-pa-hero p { margin: 0; }
.dw-pa-hero .dw-pa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the medal: the rank art on a dark disc in the tier frame */
.dw-pa-hero .dw-pa-medal { position: relative; flex: none; box-sizing: content-box; width: var(--pa-medal); height: var(--pa-medal); min-width: var(--pa-medal); margin: var(--pa-frame); border-radius: 50%; isolation: isolate;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--pa-accent) 26%, #18241d) 0%, #0f1612 62%, #0a0e0c 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55), inset 0 0 18px rgba(0, 0, 0, .6); }
.dw-pa-hero .dw-pa-medal-art { position: absolute; inset: 7%; z-index: 1; width: 86%; height: 86%; max-width: none; margin: 0; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .55)); }
.dw-pa-hero .dw-pa-ring { position: absolute; inset: -5px; z-index: 2; border: 1.5px solid #c9a45c; border-radius: 50%; pointer-events: none; }
.dw-pa-hero .dw-pa-ring::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid transparent; }
.dw-pa-hero .dw-pa-jewels { display: none; position: absolute; inset: -14px; z-index: 3; border-radius: 50%; pointer-events: none; }
.dw-pa-hero.dw-pa-tier-2 .dw-pa-ring, .dw-pa-hero.dw-pa-tier-3 .dw-pa-ring, .dw-pa-hero.dw-pa-tier-4 .dw-pa-ring, .dw-pa-hero.dw-pa-tier-5 .dw-pa-ring { border: 2px solid #e9c77a; }
.dw-pa-hero.dw-pa-tier-2 .dw-pa-ring::after, .dw-pa-hero.dw-pa-tier-3 .dw-pa-ring::after, .dw-pa-hero.dw-pa-tier-4 .dw-pa-ring::after, .dw-pa-hero.dw-pa-tier-5 .dw-pa-ring::after {
  border-color: color-mix(in srgb, var(--pa-accent) 70%, #e9c77a); box-shadow: 0 0 8px color-mix(in srgb, var(--pa-accent) 45%, transparent); }
.dw-pa-hero.dw-pa-tier-3 .dw-pa-jewels, .dw-pa-hero.dw-pa-tier-4 .dw-pa-jewels, .dw-pa-hero.dw-pa-tier-5 .dw-pa-jewels { display: block;
  background:
    radial-gradient(circle at 50% 3.5%, var(--pa-accent) 0 3px, #f4d895 3.2px 4.2px, transparent 4.6px),
    radial-gradient(circle at 82.9% 17.1%, #f4d895 0 1.8px, transparent 2.2px),
    radial-gradient(circle at 96.5% 50%, #3fbf8a 0 3px, #f4d895 3.2px 4.2px, transparent 4.6px),
    radial-gradient(circle at 82.9% 82.9%, #f4d895 0 1.8px, transparent 2.2px),
    radial-gradient(circle at 50% 96.5%, #5b7fe0 0 3px, #f4d895 3.2px 4.2px, transparent 4.6px),
    radial-gradient(circle at 17.1% 82.9%, #f4d895 0 1.8px, transparent 2.2px),
    radial-gradient(circle at 3.5% 50%, #e0405e 0 3px, #f4d895 3.2px 4.2px, transparent 4.6px),
    radial-gradient(circle at 17.1% 17.1%, #f4d895 0 1.8px, transparent 2.2px); }
.dw-pa-hero.dw-pa-tier-4 .dw-pa-ring, .dw-pa-hero.dw-pa-tier-5 .dw-pa-ring { box-shadow: 0 0 10px 2px rgba(244, 216, 149, .5), 0 0 26px 6px color-mix(in srgb, var(--pa-accent) 30%, transparent); }
.dw-pa-hero.dw-pa-tier-4 .dw-pa-medal::before, .dw-pa-hero.dw-pa-tier-5 .dw-pa-medal::before { content: ""; position: absolute; inset: -24px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 216, 149, .28) 0 42%, color-mix(in srgb, var(--pa-accent) 18%, transparent) 58%, transparent 72%); }
.dw-pa-hero.dw-pa-tier-5 .dw-pa-medal::after { content: ""; position: absolute; inset: -20px; z-index: 1; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, #f4d895, #57be8c 18%, #f4d895 32%, #a06ae0 50%, #f4d895 64%, #e0405e 80%, #f4d895);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
  animation: dw-pa-lv-spin 10s linear infinite; }

/* the words */
.dw-pa-hero .dw-pa-hero-text { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 6px; min-width: 0; container-type: inline-size; }
.dw-pa-hero .dw-pa-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 7px; border: 1px solid color-mix(in srgb, var(--pa-accent) 65%, #c9a45c); border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(0, 0, 0, .25)), #0f1712; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 12px color-mix(in srgb, var(--pa-accent) 22%, transparent);
  color: #f4d895; font: 700 11px/1 var(--dwa-sans, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.dw-pa-hero .dw-pa-chip-gem { flex: none; width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg);
  background: radial-gradient(circle at 30% 30%, #fff 0 12%, var(--pa-accent) 48%, color-mix(in srgb, var(--pa-accent) 50%, #000) 100%); box-shadow: 0 0 6px var(--pa-accent); }
.dw-pa-hero .dw-pa-title { max-width: 100%; font-family: "Didot", "Bodoni 72", "Bodoni Moda", Georgia, serif; font-weight: 600; line-height: 1.1; letter-spacing: .005em;
  white-space: nowrap; overflow-wrap: normal; word-break: keep-all;
  font-size: clamp(13px, 4.6vw, 30px);                                            /* browsers without container units */
  font-size: clamp(10px, calc(100cqi / (var(--len, 10) * .72)), 30px); }          /* the space beside the art, by name length */
.dw-pa-hero .dw-pa-title-text {
  background: linear-gradient(100deg, #b07a2c 0%, #f4d895 20%, #fff6d6 30%, color-mix(in srgb, var(--pa-accent) 55%, #f4d895) 44%, #f4d895 58%, #fff1c2 66%, #c48c34 82%, #e9c77a 100%);
  background-size: 240% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .45)); animation: dw-pa-shimmer 8s ease-in-out infinite; }
.dw-pa-hero .dw-pa-hero-bar { position: relative; width: min(100%, 300px); height: 4px; overflow: hidden; border-radius: 99px; background: #0b120f; box-shadow: inset 0 0 0 1px rgba(184, 150, 93, .28); }
.dw-pa-hero .dw-pa-hero-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--pa-accent) 55%, #1a2a22), var(--pa-accent) 70%, #f4d895); }
.dw-pa-hero .dw-pa-to { color: #c9bfae; font-size: 12.5px; letter-spacing: .01em; }
/* the sitewide sheet forces the sans on every p and span (body:not(.ww-page) span ... !important): the title wins it back */
body .dw-pa-hero .dw-pa-title, body .dw-pa-hero .dw-pa-title-text { font-family: "Didot", "Bodoni 72", "Bodoni Moda", "Bodoni MT", Georgia, serif !important; font-style: normal !important; }
/* ... and sets white-space on spans too: the one-line title must hold on the span that carries the text */
body .dw-pa-hero .dw-pa-title, body .dw-pa-hero .dw-pa-title-text { white-space: nowrap !important; word-break: keep-all !important; overflow-wrap: normal !important; }
body .dw-pa-hero .dw-pa-chip { font-family: var(--dwa-sans, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif) !important; letter-spacing: .16em !important; }
@keyframes dw-pa-shimmer { 0%, 60% { background-position: 100% 0; } 100% { background-position: -40% 0; } }
@keyframes dw-pa-lv-spin { to { transform: rotate(1turn); } }

/* level-up: the medal arrives, the title flashes once (the plate keeps its own burst and chip) */
.dw-pa-hero--cele .dw-pa-medal { animation: dw-pa-medal-in 1.2s cubic-bezier(.2, .9, .3, 1.2) .6s 1 both; }
.dw-pa-hero--cele .dw-pa-title-text { animation: dw-pa-shimmer-once 1.6s ease-out .9s 1 both, dw-pa-shimmer 8s ease-in-out 2.6s infinite; }
@keyframes dw-pa-medal-in { 0% { opacity: 0; transform: scale(.5) rotate(-16deg); } 100% { opacity: 1; transform: none; } }
@keyframes dw-pa-shimmer-once { 0% { background-position: 140% 0; } 100% { background-position: -40% 0; } }

/* in the plate */
body.woocommerce-account .dw-pa-plate .dw-pa-pulse .dw-pa-hero { margin: 2px 0 4px; }
body.woocommerce-account .dw-pa-plate .dw-pa-pulse .dw-pa-points { justify-content: flex-start; }
/* on Your Galaxy: the hero replaces the Pulse panel's status line, next line and meter (the tally and link stay) */
.dw-pulse-panel .dw-pa-hero { margin: 10px 0 16px; }
.dw-pulse-panel.dw-pa-has-hero > .dw-vault-disclosure-status, .dw-pulse-panel.dw-pa-has-hero > .dw-vault-disclosure-status + p,
.dw-pulse-panel.dw-pa-has-hero > .dw-pulse-meter, .dw-pulse-panel.dw-pa-has-hero > .dw-pulse-meter-label { display: none !important; }
/* 1.2.2: if the Galaxy falls back to its "Tracking is in development" panel while Pulse is live, the hero replaces that text */
.dw-pa-pulse-fallback .dw-pa-hero { margin: 10px 0 16px; }
.dw-pa-pulse-fallback.dw-pa-has-hero > .dw-vault-disclosure-status, .dw-pa-pulse-fallback.dw-pa-has-hero > .dw-vault-disclosure-status + p { display: none !important; }
/* the leaderboard and the level-up card: the "Level N · Name" line as chip + title (built by level.js) */
.dw-pa-hero.dw-pa-hero--line { display: grid; grid-template-columns: 1fr; gap: 6px; justify-items: start; margin: 8px 0 6px; }
.dw-pa-hero.dw-pa-hero--line { container-type: inline-size; }
.dw-lb-card .dw-pa-hero.dw-pa-hero--line { justify-items: center; text-align: center; margin-inline: auto; }
.dw-pa-lb-medal.dw-pa-tier-1 { box-shadow: 0 0 0 2px #0e1411, 0 0 0 3.5px #c9a45c; border-radius: 50%; }
.dw-pa-lb-medal.dw-pa-tier-2, .dw-pa-lb-medal.dw-pa-tier-3 { box-shadow: 0 0 0 2px #0e1411, 0 0 0 4px #e9c77a, 0 0 0 7px #0e1411, 0 0 0 8px color-mix(in srgb, var(--pa-accent) 70%, #e9c77a); border-radius: 50%; }
.dw-pa-lb-medal.dw-pa-tier-4, .dw-pa-lb-medal.dw-pa-tier-5 { box-shadow: 0 0 0 2px #0e1411, 0 0 0 4px #e9c77a, 0 0 0 7px #0e1411, 0 0 0 8px color-mix(in srgb, var(--pa-accent) 70%, #e9c77a), 0 0 22px 6px rgba(244, 216, 149, .4); border-radius: 50%; }

@media (max-width: 640px) {
  .dw-pa-hero { --pa-medal: 84px; gap: 4px 6px; }
  .dw-pa-hero .dw-pa-title { font-size: clamp(10px, 4.6vw, 26px); font-size: clamp(10px, calc(100cqi / (var(--len, 10) * .72)), 28px); }
}
@media (prefers-reduced-motion: reduce) {
  .dw-pa-hero .dw-pa-title-text, .dw-pa-hero .dw-pa-medal, .dw-pa-hero .dw-pa-medal::before, .dw-pa-hero .dw-pa-medal::after { animation: none !important; }
  .dw-pa-hero .dw-pa-title-text { background-position: 50% 0; }
}
