/* ═══════════════════════════════════════════════════════════════
   Profile Dashboard — Modern 2026 redesign
   Scope: .profile-dashboard root only (loaded on /profile/dashboard)
   Tokens: design-system canonical (navy / teal / gold) + scoped --pd-* fallbacks
   RTL: logical properties throughout
   Breakpoints: 375 / 480 / 640 / 768 / 1024
   ═══════════════════════════════════════════════════════════════ */

.profile-dashboard {
    --pd-info-bg:    rgba(59, 130, 246, 0.12);
    --pd-info-fg:    #3B82F6;
    --pd-success-bg: rgba(16, 163, 127, 0.12);
    --pd-success-fg: #10A37F;
    --pd-warn-bg:    rgba(245, 158, 11, 0.12);
    --pd-warn-fg:    #F59E0B;
    --pd-danger-bg:  rgba(239, 68, 68, 0.12);
    --pd-danger-fg:  #EF4444;
    --pd-purple-bg:  rgba(139, 92, 246, 0.12);
    --pd-purple-fg:  #8B5CF6;
    --pd-gold-bg:    rgba(192, 138, 46, 0.12);
    --pd-gold-fg:    var(--gold, #C08A2E);
    --pd-surface:        var(--bg-card, #FFFFFF);
    --pd-surface-soft:   var(--bg-subtle, #F8FAFC);
    --pd-border:         var(--border, #DDE5EF);
    --pd-border-light:   var(--border-light, #EBF0F7);
    --pd-r-sm: 12px;
    --pd-r-md: 16px;
    --pd-r-lg: 20px;
    --pd-r-xl: 24px;
    --pd-shadow-sm: 0 1px 3px rgba(21, 45, 80, 0.06), 0 1px 2px rgba(21, 45, 80, 0.04);
    --pd-shadow-md: 0 4px 12px rgba(21, 45, 80, 0.07), 0 2px 4px rgba(21, 45, 80, 0.05);
    --pd-shadow-lg: 0 12px 28px rgba(21, 45, 80, 0.10), 0 4px 8px rgba(21, 45, 80, 0.06);
    color: var(--text, #1A2B45);
}
.profile-dashboard a { text-decoration: none; color: inherit; }

/* HERO */
.profile-dashboard .pd-hero {
    position: relative;
    border-radius: var(--pd-r-xl);
    background: linear-gradient(135deg, var(--navy, #152D50) 0%, var(--navy-light, #1A3456) 55%, var(--navy-deep, #071428) 100%);
    color: var(--text-on-navy, #fff);
    padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 44px);
    margin-block-end: 24px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--pd-shadow-lg);
}
.profile-dashboard .pd-hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.profile-dashboard .pd-hero__blob { position: absolute; border-radius: 50%; filter: blur(48px); opacity: 0.55; }
.profile-dashboard .pd-hero__blob--a {
    width: 360px; height: 360px;
    inset-block-start: -120px; inset-inline-end: -80px;
    background: radial-gradient(circle, var(--teal, #0E7C7B) 0%, transparent 70%);
}
.profile-dashboard .pd-hero__blob--b {
    width: 280px; height: 280px;
    inset-block-end: -140px; inset-inline-start: -60px;
    background: radial-gradient(circle, var(--gold-light, #E5A83A) 0%, transparent 70%);
    opacity: 0.35;
}
.profile-dashboard .pd-hero__grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 80%);
    opacity: 0.7;
}
.profile-dashboard .pd-hero__inner {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between;
    gap: 32px; flex-wrap: wrap;
}
.profile-dashboard .pd-hero__lead {
    display: flex; align-items: center; gap: 18px;
    min-width: 0; flex: 1 1 320px;
}
.profile-dashboard .pd-hero__avatar {
    position: relative; width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
    border: 2px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.profile-dashboard .pd-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-dashboard .pd-hero__avatar span {
    font-size: 1.65rem; font-weight: var(--font-extrabold, 800);
    color: var(--text-on-navy, #fff); letter-spacing: 0.5px;
}
.profile-dashboard .pd-hero__avatar-dot {
    position: absolute; inset-block-end: 2px; inset-inline-end: 2px;
    width: 14px; height: 14px; border-radius: 50%;
    background: #22c55e; border: 2px solid var(--navy, #152D50);
    box-shadow: 0 0 0 4px rgba(34,197,94,0.25);
}
.profile-dashboard .pd-hero__text { min-width: 0; }
.profile-dashboard .pd-hero__eyebrow {
    font-size: 0.875rem; font-weight: var(--font-bold, 700);
    color: var(--text-on-navy-muted, rgba(255,255,255,0.78));
    margin-block-end: 4px;
}
.profile-dashboard .pd-hero__name {
    font-size: clamp(1.4rem, 3vw, 2rem); font-weight: var(--font-extrabold, 800);
    color: var(--text-on-navy, #fff); margin: 0 0 6px;
    line-height: 1.15; letter-spacing: -0.01em;
}
.profile-dashboard .pd-hero__sub {
    font-size: 0.92rem; color: var(--text-on-navy-muted, rgba(255,255,255,0.78));
    margin: 0; line-height: 1.5;
}
.profile-dashboard .pd-hero__chips {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 10px; flex-wrap: wrap;
}
.profile-dashboard .pd-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    color: var(--text-on-navy, #fff); font-size: 0.84rem;
    transition: background .2s ease, border-color .2s ease;
}
.profile-dashboard .pd-chip:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.28); }
.profile-dashboard .pd-chip__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.profile-dashboard .pd-chip__dot--info    { background: #60A5FA; box-shadow: 0 0 0 3px rgba(96,165,250,0.22); }
.profile-dashboard .pd-chip__dot--success { background: #34D399; box-shadow: 0 0 0 3px rgba(52,211,153,0.22); }
.profile-dashboard .pd-chip__dot--warn    { background: #FBBF24; box-shadow: 0 0 0 3px rgba(251,191,36,0.22); }
.profile-dashboard .pd-chip__num { font-size: 1rem; font-weight: var(--font-extrabold, 800); line-height: 1; }
.profile-dashboard .pd-chip__label { color: var(--text-on-navy-muted, rgba(255,255,255,0.78)); font-weight: var(--font-bold, 700); }

/* NEXT-STEP */
.profile-dashboard .pd-nextstep {
    display: flex; align-items: center; gap: 18px;
    padding: 18px 22px; margin-block-end: 24px;
    background: linear-gradient(135deg, var(--gold-bg, #FAF3E5) 0%, #FFFAF0 100%);
    border: 1px solid var(--gold-light, #E5A83A);
    border-radius: var(--pd-r-md);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.profile-dashboard .pd-nextstep:hover { transform: translateY(-1px); border-color: var(--gold, #C08A2E); box-shadow: var(--pd-shadow-md); }
.profile-dashboard .pd-nextstep:focus-visible { outline: 2px solid var(--gold, #C08A2E); outline-offset: 2px; }
.profile-dashboard .pd-nextstep__icon {
    width: 52px; height: 52px; border-radius: var(--pd-r-sm);
    background: linear-gradient(135deg, var(--gold, #C08A2E), var(--gold-light, #E5A83A));
    color: #fff; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 4px 12px rgba(192,138,46,0.30);
}
.profile-dashboard .pd-nextstep__body { flex: 1; min-width: 0; }
.profile-dashboard .pd-nextstep__pill {
    display: inline-block; font-size: 0.7rem;
    font-weight: var(--font-extrabold, 800);
    color: var(--gold, #C08A2E); background: rgba(192,138,46,0.12);
    padding: 3px 10px; border-radius: 999px;
    margin-block-end: 6px; text-transform: uppercase; letter-spacing: 0.4px;
}
.profile-dashboard .pd-nextstep__title {
    font-size: 1.05rem; font-weight: var(--font-extrabold, 800);
    color: var(--navy, #152D50); margin-block-end: 4px; line-height: 1.3;
}
.profile-dashboard .pd-nextstep__desc {
    font-size: 0.88rem; color: var(--text-mid, #3D5A7A); line-height: 1.5;
}
.profile-dashboard .pd-nextstep__cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px; background: var(--navy, #152D50);
    color: var(--text-on-navy, #fff); border-radius: var(--pd-r-sm);
    font-size: 0.86rem; font-weight: var(--font-extrabold, 800);
    flex-shrink: 0; white-space: nowrap; transition: background .15s ease;
}
.profile-dashboard .pd-nextstep:hover .pd-nextstep__cta { background: var(--navy-light, #1A3456); }

/* PORTFOLIO STUB */
.profile-dashboard .pd-portfolio-stub {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    margin-block-end: 24px;
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-r-md);
    box-shadow: var(--pd-shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    position: relative;
}
.profile-dashboard .pd-portfolio-stub:hover {
    transform: translateY(-2px);
    box-shadow: var(--pd-shadow-md);
    border-color: var(--teal-border, #B8E0DF);
}
.profile-dashboard .pd-portfolio-stub:focus-visible {
    outline: 2px solid var(--teal, #0E7C7B);
    outline-offset: 2px;
}
/* Live variant — teal accent on left border */
.profile-dashboard .pd-portfolio-stub--live {
    border-inline-start: 3px solid var(--teal, #0E7C7B);
}
.profile-dashboard .pd-portfolio-stub__icon {
    width: 52px; height: 52px;
    border-radius: var(--pd-r-sm);
    background: linear-gradient(135deg, var(--teal, #0E7C7B), var(--teal-light, #12A09E));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(14,124,123,0.28);
}
.profile-dashboard .pd-portfolio-stub__body { flex: 1; min-width: 0; }
.profile-dashboard .pd-portfolio-stub__pill {
    display: inline-block;
    font-size: 0.7rem; font-weight: var(--font-extrabold, 800);
    color: var(--teal, #0E7C7B);
    background: rgba(14,124,123,0.10);
    padding: 3px 10px; border-radius: 999px;
    margin-block-end: 6px;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.profile-dashboard .pd-portfolio-stub__title {
    font-size: 1.15rem; font-weight: var(--font-extrabold, 800);
    color: var(--navy, #152D50); line-height: 1.2;
    margin-block-end: 5px;
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.profile-dashboard .pd-portfolio-stub__desc {
    font-size: 0.88rem; color: var(--text-mid, #3D5A7A); line-height: 1.5;
}
/* P&L colour tones */
.profile-dashboard .pd-portfolio-stub__pnl {
    font-size: 0.95rem; font-weight: var(--font-bold, 700);
}
.profile-dashboard .pd-portfolio-stub__pnl--pos { color: var(--pd-success-fg); }
.profile-dashboard .pd-portfolio-stub__pnl--neg { color: var(--pd-danger-fg); }
.profile-dashboard .pd-portfolio-stub__pnl--flat { color: var(--text-muted, #5E7A95); }
/* Decorative sparkline chart */
.profile-dashboard .pd-portfolio-stub__chart {
    width: 140px; height: 56px;
    flex-shrink: 0; opacity: 0.85;
    pointer-events: none;
}
/* Responsive */
@media (max-width: 768px) {
    .profile-dashboard .pd-portfolio-stub {
        grid-template-columns: auto 1fr;
        gap: 14px;
        padding: 18px;
    }
    .profile-dashboard .pd-portfolio-stub__chart { display: none; }
}
@media (max-width: 480px) {
    .profile-dashboard .pd-portfolio-stub {
        padding: 16px;
        gap: 12px;
    }
    .profile-dashboard .pd-portfolio-stub__icon { width: 44px; height: 44px; }
    .profile-dashboard .pd-portfolio-stub__title { font-size: 1rem; }
}

/* STAT CARDS */
.profile-dashboard .pd-stats {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px; margin-block-end: 24px;
}
.profile-dashboard .pd-stat {
    position: relative; background: var(--pd-surface);
    border: 1px solid var(--pd-border); border-radius: var(--pd-r-md);
    padding: 20px 18px; text-align: center;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    overflow: hidden; isolation: isolate;
}
.profile-dashboard .pd-stat:hover, .profile-dashboard .pd-stat:focus-visible {
    transform: translateY(-3px); box-shadow: var(--pd-shadow-lg);
    border-color: transparent;
}
.profile-dashboard .pd-stat:focus-visible { outline: 2px solid var(--teal, #0E7C7B); outline-offset: 2px; }
.profile-dashboard .pd-stat__icon {
    width: 50px; height: 50px; border-radius: 14px;
    margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s ease;
}
.profile-dashboard .pd-stat:hover .pd-stat__icon { transform: scale(1.08); }
.profile-dashboard .pd-stat__icon--info    { background: var(--pd-info-bg);    color: var(--pd-info-fg); }
.profile-dashboard .pd-stat__icon--warn    { background: var(--pd-warn-bg);    color: var(--pd-warn-fg); }
.profile-dashboard .pd-stat__icon--success { background: var(--pd-success-bg); color: var(--pd-success-fg); }
.profile-dashboard .pd-stat__icon--purple  { background: var(--pd-purple-bg);  color: var(--pd-purple-fg); }
.profile-dashboard .pd-stat__icon--danger  { background: var(--pd-danger-bg);  color: var(--pd-danger-fg); }
.profile-dashboard .pd-stat__num {
    font-size: clamp(1.6rem, 3vw, 2.05rem);
    font-weight: var(--font-extrabold, 800);
    color: var(--navy, #152D50); line-height: 1; letter-spacing: -0.02em;
}
.profile-dashboard .pd-stat__label {
    font-size: 0.82rem; color: var(--text-muted, #5E7A95);
    margin-block-start: 6px; font-weight: var(--font-bold, 700);
}

/* CARD */
.profile-dashboard .pd-card {
    background: var(--pd-surface); border: 1px solid var(--pd-border);
    border-radius: var(--pd-r-md); padding: 24px;
    box-shadow: var(--pd-shadow-sm); margin-block-end: 24px;
}
.profile-dashboard .pd-card__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-block-end: 18px;
    padding-block-end: 14px; border-block-end: 1px solid var(--pd-border-light);
}
.profile-dashboard .pd-card__title {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 1.05rem; font-weight: var(--font-extrabold, 800);
    color: var(--navy, #152D50); margin: 0; flex-wrap: wrap;
}
.profile-dashboard .pd-card__title-dot {
    width: 6px; height: 22px; border-radius: 3px;
    background: linear-gradient(180deg, var(--teal, #0E7C7B), var(--teal-light, #12A09E));
    flex-shrink: 0;
}
.profile-dashboard .pd-card__count {
    font-size: 0.7rem; font-weight: var(--font-extrabold, 800);
    background: var(--pd-info-bg); color: var(--pd-info-fg);
    padding: 3px 9px; border-radius: 999px; letter-spacing: 0.3px;
}
.profile-dashboard .pd-card__more {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.85rem; font-weight: var(--font-bold, 700);
    color: var(--teal, #0E7C7B); transition: gap .15s ease; flex-shrink: 0;
}
.profile-dashboard .pd-card__more:hover { gap: 8px; }

/* TIMELINE */
.profile-dashboard .pd-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.profile-dashboard .pd-timeline::before {
    content: ''; position: absolute;
    inset-block: 16px; inset-inline-start: 16px;
    width: 2px;
    background: linear-gradient(180deg, var(--pd-border-light), transparent);
}
.profile-dashboard .pd-timeline__item { position: relative; margin-block-end: 6px; }
.profile-dashboard .pd-timeline__item:last-child { margin-block-end: 0; }
.profile-dashboard .pd-timeline__link {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 10px 12px; border-radius: var(--pd-r-sm);
    transition: background .15s ease;
}
.profile-dashboard .pd-timeline__link:hover, .profile-dashboard .pd-timeline__link:focus-visible {
    background: var(--pd-surface-soft);
}
.profile-dashboard .pd-timeline__link:focus-visible { outline: 2px solid var(--teal, #0E7C7B); outline-offset: 0; }
.profile-dashboard .pd-timeline__icon {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: var(--pd-surface); border: 2px solid var(--pd-border);
    z-index: 1;
}
.profile-dashboard .pd-timeline__icon--alert       { background: var(--pd-info-bg);    color: var(--pd-info-fg);    border-color: rgba(59,130,246,0.3); }
.profile-dashboard .pd-timeline__icon--alert.is-unread { background: var(--pd-info-fg); color: #fff; border-color: var(--pd-info-fg); box-shadow: 0 0 0 4px rgba(59,130,246,0.15); }
.profile-dashboard .pd-timeline__icon--bull        { background: var(--pd-success-bg); color: var(--pd-success-fg); border-color: rgba(16,163,127,0.3); }
.profile-dashboard .pd-timeline__icon--bear        { background: var(--pd-danger-bg);  color: var(--pd-danger-fg);  border-color: rgba(239,68,68,0.3); }
.profile-dashboard .pd-timeline__body { flex: 1; min-width: 0; padding-block-start: 4px; }
.profile-dashboard .pd-timeline__title {
    font-size: 0.95rem; font-weight: var(--font-bold, 700);
    color: var(--text, #1A2B45); line-height: 1.4;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.profile-dashboard .pd-timeline__meta {
    display: flex; align-items: center; gap: 6px;
    margin-block-start: 4px; font-size: 0.78rem;
    color: var(--text-muted, #5E7A95); flex-wrap: wrap;
}
.profile-dashboard .pd-timeline__pill {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: 0.72rem; font-weight: var(--font-extrabold, 800);
    letter-spacing: 0.2px; line-height: 1.4;
}
.profile-dashboard .pd-timeline__pill--bull   { background: var(--pd-success-bg); color: var(--pd-success-fg); }
.profile-dashboard .pd-timeline__pill--bear   { background: var(--pd-danger-bg);  color: var(--pd-danger-fg); }
.profile-dashboard .pd-timeline__pill--new    { background: var(--pd-info-fg);    color: #fff; }
.profile-dashboard .pd-timeline__pill--muted  { background: var(--pd-border-light); color: var(--text-muted, #5E7A95); }

/* EMPTY */
.profile-dashboard .pd-empty { text-align: center; padding: 36px 20px; }
.profile-dashboard .pd-empty__icon {
    width: 72px; height: 72px; margin: 0 auto 16px;
    background: var(--pd-surface-soft); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted, #5E7A95);
}
.profile-dashboard .pd-empty__title {
    font-size: 1.05rem; font-weight: var(--font-extrabold, 800);
    color: var(--navy, #152D50); margin-block-end: 6px;
}
.profile-dashboard .pd-empty__desc {
    font-size: 0.9rem; color: var(--text-mid, #3D5A7A);
    margin-block-end: 18px; line-height: 1.55;
}
.profile-dashboard .pd-empty__actions { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.profile-dashboard .pd-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: var(--pd-r-sm);
    font-size: 0.85rem; font-weight: var(--font-extrabold, 800);
    border: 1px solid transparent; transition: all .15s ease; cursor: pointer;
}
.profile-dashboard .pd-btn--primary {
    background: var(--teal, #0E7C7B); color: #fff;
    border-color: var(--teal, #0E7C7B);
}
.profile-dashboard .pd-btn--primary:hover {
    background: var(--teal-light, #12A09E);
    border-color: var(--teal-light, #12A09E); color: #fff;
}
.profile-dashboard .pd-btn--ghost {
    background: var(--pd-surface); color: var(--text, #1A2B45);
    border-color: var(--pd-border);
}
.profile-dashboard .pd-btn--ghost:hover {
    background: var(--pd-surface-soft); border-color: var(--pd-border);
    color: var(--navy, #152D50);
}

/* SECTION TITLE + QUICK LINKS */
.profile-dashboard .pd-section-title {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 1.05rem; font-weight: var(--font-extrabold, 800);
    color: var(--navy, #152D50); margin: 0 0 16px;
}
.profile-dashboard .pd-quicklinks__grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.profile-dashboard .pd-ql {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 18px;
    background: var(--pd-surface); border: 1px solid var(--pd-border);
    border-radius: var(--pd-r-md);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    min-height: 96px; position: relative; overflow: hidden;
}
.profile-dashboard .pd-ql:hover, .profile-dashboard .pd-ql:focus-visible {
    transform: translateY(-2px); box-shadow: var(--pd-shadow-md);
    border-color: var(--teal-border, #B8E0DF);
}
.profile-dashboard .pd-ql:focus-visible { outline: 2px solid var(--teal, #0E7C7B); outline-offset: 2px; }
.profile-dashboard .pd-ql__icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-block-end: 6px; transition: transform .2s ease;
}
.profile-dashboard .pd-ql:hover .pd-ql__icon { transform: scale(1.1) rotate(-4deg); }
.profile-dashboard .pd-ql__icon--info    { background: var(--pd-info-bg);    color: var(--pd-info-fg); }
.profile-dashboard .pd-ql__icon--success { background: var(--pd-success-bg); color: var(--pd-success-fg); }
.profile-dashboard .pd-ql__icon--purple  { background: var(--pd-purple-bg);  color: var(--pd-purple-fg); }
.profile-dashboard .pd-ql__icon--warn    { background: var(--pd-warn-bg);    color: var(--pd-warn-fg); }
.profile-dashboard .pd-ql__icon--danger  { background: var(--pd-danger-bg);  color: var(--pd-danger-fg); }
.profile-dashboard .pd-ql__icon--gold    { background: var(--pd-gold-bg);    color: var(--pd-gold-fg); }
.profile-dashboard .pd-ql__label {
    font-size: 0.95rem; font-weight: var(--font-extrabold, 800);
    color: var(--navy, #152D50); line-height: 1.2;
}
.profile-dashboard .pd-ql__hint {
    font-size: 0.75rem; color: var(--text-muted, #5E7A95);
    font-weight: var(--font-medium, 500); line-height: 1.3;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .profile-dashboard .pd-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .profile-dashboard .pd-quicklinks__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .profile-dashboard .pd-hero { padding: 18px 18px; border-radius: var(--pd-r-lg); }
    .profile-dashboard .pd-hero__inner { flex-direction: column; align-items: stretch; gap: 14px; }
    .profile-dashboard .pd-hero__lead { gap: 14px; flex: none; }
    .profile-dashboard .pd-hero__chips { gap: 8px; }
    .profile-dashboard .pd-hero__avatar { width: 52px; height: 52px; }
    .profile-dashboard .pd-hero__avatar span { font-size: 1.2rem; }
    .profile-dashboard .pd-hero__eyebrow { font-size: 0.8rem; margin-block-end: 2px; }
    .profile-dashboard .pd-hero__name { font-size: 1.15rem; margin-block-end: 3px; }
    .profile-dashboard .pd-hero__sub { font-size: 0.82rem; }
    .profile-dashboard .pd-nextstep { flex-wrap: wrap; padding: 16px; }
    .profile-dashboard .pd-nextstep__cta { margin-inline-start: auto; }
    .profile-dashboard .pd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-dashboard .pd-stats > .pd-stat:nth-child(5) { grid-column: 1 / -1; }
    .profile-dashboard .pd-card { padding: 18px; }
    .profile-dashboard .pd-quicklinks__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .profile-dashboard .pd-hero { padding: 20px 18px; }
    .profile-dashboard .pd-hero__lead { gap: 14px; }
    .profile-dashboard .pd-chip { padding: 8px 12px; font-size: 0.78rem; }
    .profile-dashboard .pd-chip__num { font-size: 0.92rem; }
    .profile-dashboard .pd-nextstep__icon { width: 44px; height: 44px; }
    .profile-dashboard .pd-nextstep__title { font-size: 0.98rem; }
    .profile-dashboard .pd-nextstep__desc { font-size: 0.82rem; }
    .profile-dashboard .pd-nextstep__cta { font-size: 0.8rem; padding: 8px 14px; }
    .profile-dashboard .pd-stat { padding: 16px 12px; }
    .profile-dashboard .pd-stat__icon { width: 42px; height: 42px; margin-block-end: 10px; }
    .profile-dashboard .pd-card__head { flex-wrap: wrap; }
    .profile-dashboard .pd-timeline__title { font-size: 0.88rem; }
}
@media (max-width: 480px) {
    .profile-dashboard .pd-hero { padding: 16px 16px; border-radius: var(--pd-r-md); margin-block-end: 16px; }
    .profile-dashboard .pd-hero__inner { gap: 12px; }
    .profile-dashboard .pd-hero__name { font-size: 1.1rem; }
    .profile-dashboard .pd-hero__sub { font-size: 0.8rem; }
    .profile-dashboard .pd-hero__avatar { width: 46px; height: 46px; }
    .profile-dashboard .pd-hero__avatar span { font-size: 1.1rem; }
    /* Keep chips in a single compact row */
    .profile-dashboard .pd-hero__chips { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-block-end: 2px; }
    .profile-dashboard .pd-chip { padding: 7px 11px; font-size: 0.76rem; white-space: nowrap; }
    .profile-dashboard .pd-chip__num { font-size: 0.88rem; }
    .profile-dashboard .pd-nextstep { gap: 12px; padding: 14px; }
    .profile-dashboard .pd-nextstep__icon { width: 40px; height: 40px; }
    .profile-dashboard .pd-nextstep__cta { width: 100%; justify-content: center; margin-inline-start: 0; margin-block-start: 4px; }
    .profile-dashboard .pd-stats { gap: 10px; }
    .profile-dashboard .pd-stat { padding: 14px 10px; border-radius: var(--pd-r-sm); }
    .profile-dashboard .pd-stat__icon { width: 38px; height: 38px; margin-block-end: 8px; }
    .profile-dashboard .pd-stat__label { font-size: 0.74rem; }
    .profile-dashboard .pd-card { padding: 16px 14px; border-radius: var(--pd-r-sm); }
    .profile-dashboard .pd-timeline::before { inset-inline-start: 12px; }
    .profile-dashboard .pd-timeline__icon { width: 26px; height: 26px; }
    .profile-dashboard .pd-timeline__icon svg { width: 11px; height: 11px; }
    .profile-dashboard .pd-quicklinks__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .profile-dashboard .pd-ql { padding: 14px; min-height: 86px; }
    .profile-dashboard .pd-ql__icon { width: 36px; height: 36px; }
    .profile-dashboard .pd-ql__label { font-size: 0.88rem; }
    .profile-dashboard .pd-ql__hint { font-size: 0.7rem; }
}
@media (max-width: 375px) {
    .profile-dashboard .pd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-dashboard .pd-stats > .pd-stat:nth-child(5) { grid-column: 1 / -1; }
    .profile-dashboard .pd-stat__num { font-size: 1.4rem; }
    .profile-dashboard .pd-quicklinks__grid { grid-template-columns: 1fr; }
    /* Keep chips horizontal on small phones — vertical stacking makes hero too tall */
    .profile-dashboard .pd-hero__chips { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; }
    .profile-dashboard .pd-chip { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .profile-dashboard *, .profile-dashboard *::before, .profile-dashboard *::after {
        transition: none !important; animation: none !important;
    }
    .profile-dashboard .pd-stat:hover, .profile-dashboard .pd-ql:hover, .profile-dashboard .pd-nextstep:hover { transform: none; }
    .profile-dashboard .pd-stat:hover .pd-stat__icon, .profile-dashboard .pd-ql:hover .pd-ql__icon { transform: none; }
}
/* ============================================================
   Billionaires — Forbes 400 page styles
   Uses design-system tokens: --navy, --teal, --gold, --ink-*
   RTL (dir=rtl) assumed from html element
   ============================================================ */

/* ── Custom props ──────────────────────────────────────────── */
.bil-hero,
.bil-filters-wrap,
.bil-grid-section,
.bil-profile-hero,
.bil-profile-stats-section,
.bil-profile-bio-section,
.bil-details-section,
.bil-phil-section,
.bil-related-section,
.bil-faq-section {
    --bil-navy:       var(--navy, #152D50);
    --bil-teal:       var(--teal, #00A99D);
    --bil-gold:       var(--gold, #C9A227);
    --bil-card-bg:    #fff;
    --bil-border:     #e8edf4;
    --bil-text:       #1a2332;
    --bil-muted:      #6b7a90;
    --bil-radius:     14px;
    --bil-shadow:     0 2px 12px rgba(21,45,80,.08);
    --bil-shadow-hov: 0 8px 32px rgba(21,45,80,.16);
}

/* ── Hero ───────────────────────────────────────────────────── */
.bil-hero {
    background: linear-gradient(135deg, var(--bil-navy) 0%, #1e3d6a 100%);
    color: #fff;
    padding-block: 3.5rem 2.5rem;
    text-align: center;
}

.bil-hero__inner { max-width: 720px; margin-inline: auto; }

.bil-hero__badge {
    display: inline-block;
    background: var(--bil-gold);
    color: var(--bil-navy);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: .25rem .75rem;
    border-radius: 20px;
    margin-block-end: 1rem;
    text-transform: uppercase;
}

.bil-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-block-end: .5rem;
    line-height: 1.2;
}

.bil-hero__sub {
    font-size: 1rem;
    color: rgba(255,255,255,.75);
    margin-block-end: 2rem;
}

/* Stats strip */
.bil-stats-strip {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    background: rgba(255,255,255,.08);
    border-radius: var(--bil-radius);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
}

.bil-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
}

.bil-stat__num {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--bil-gold);
}

.bil-stat__label {
    font-size: .78rem;
    color: rgba(255,255,255,.7);
}

/* ── Filters ────────────────────────────────────────────────── */
.bil-filters-wrap {
    padding: 20px 35px;
    background: #f7f9fc;
    border-bottom: 1px solid var(--bil-border);
    padding-block: 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.bil-filters { display: flex; flex-direction: column; gap: .75rem; }

/* Search row */
.bil-filter-row {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}

.bil-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.bil-search-icon {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: .75rem;
    transform: translateY(-50%);
    color: var(--bil-muted);
    pointer-events: none;
}

.bil-search-input {
    width: 100%;
    padding: .55rem .75rem .55rem 2.4rem;
    border: 1.5px solid var(--bil-border);
    border-radius: 8px;
    font-size: .9rem;
    font-family: inherit;
    background: #fff;
    transition: border-color .2s;
    direction: rtl;
}

.bil-search-input:focus {
    outline: none;
    border-color: var(--bil-teal);
    box-shadow: 0 0 0 3px rgba(0,169,157,.12);
}

.bil-search-clear {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: .5rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--bil-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 .25rem;
}

/* Sort */
.bil-sort-wrap { flex-shrink: 0; }

/* Filter chips */
.bil-filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

.bil-chip-group {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.bil-chip-label {
    font-size: .78rem;
    color: var(--bil-muted);
    white-space: nowrap;
}

.bil-chip {
    display: inline-flex;
    align-items: center;
    padding: .3rem .7rem;
    border: 1.5px solid var(--bil-border);
    border-radius: 20px;
    font-size: .82rem;
    cursor: pointer;
    background: #fff;
    color: var(--bil-text);
    transition: border-color .15s, background .15s, color .15s;
    user-select: none;
}

.bil-chip:hover { border-color: var(--bil-teal); }

.bil-chip.active {
    border-color: var(--bil-teal);
    background: var(--bil-teal);
    color: #fff;
}

/* Selects */
.bil-select {
    padding: .4rem .8rem;
    border: 1.5px solid var(--bil-border);
    border-radius: 8px;
    font-size: .85rem;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
    direction: rtl;
}

.bil-select:focus { outline: none; border-color: var(--bil-teal); }
.bil-select--sm { padding: .3rem .6rem; font-size: .8rem; }

/* Range inputs */
.bil-chip-group--range { gap: .3rem; }

.bil-range-input {
    width: 70px;
    padding: .3rem .5rem;
    border: 1.5px solid var(--bil-border);
    border-radius: 8px;
    font-size: .82rem;
    font-family: inherit;
    text-align: center;
}

.bil-range-input:focus { outline: none; border-color: var(--bil-teal); }

.bil-range-sep { color: var(--bil-muted); font-size: .8rem; }

/* Action buttons */
.bil-chip-group--actions { margin-inline-start: auto; }

.bil-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem 1rem;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
    font-family: inherit;
}

.bil-btn:active { transform: translateY(1px); }

.bil-btn--primary { background: var(--bil-teal); color: #fff; }
.bil-btn--primary:hover { background: #008f84; }

.bil-btn--ghost {
    background: transparent;
    border-color: var(--bil-border);
    color: var(--bil-text);
}
.bil-btn--ghost:hover { border-color: var(--bil-teal); color: var(--bil-teal); }

.bil-btn--outline {
    background: transparent;
    border-color: var(--bil-teal);
    color: var(--bil-teal);
}
.bil-btn--outline:hover { background: var(--bil-teal); color: #fff; }

.bil-btn--sm { padding: .3rem .75rem; font-size: .8rem; }

/* Results meta */
.bil-results-meta {
    margin-block-start: .6rem;
    font-size: .82rem;
    color: var(--bil-muted);
}

/* ── Grid ───────────────────────────────────────────────────── */
.bil-grid-section { padding-block: 2rem; }

.bil-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

/* Card */
.bil-card {
    background: var(--bil-card-bg);
    border-radius: var(--bil-radius);
    border: 1px solid var(--bil-border);
    box-shadow: var(--bil-shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    position: relative;
}

.bil-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bil-shadow-hov);
}

.bil-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.bil-card__rank {
    position: absolute;
    inset-block-start: .6rem;
    inset-inline-start: .6rem;
    background: var(--bil-navy);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 6px;
    z-index: 2;
}

.bil-card__photo-wrap {
    position: relative;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: hidden;
}

.bil-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform .3s;
}

.bil-card:hover .bil-card__photo { transform: scale(1.04); }

.bil-card__self-made-badge {
    position: absolute;
    inset-block-end: .4rem;
    inset-inline-end: .4rem;
    background: var(--bil-gold);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
}

.bil-card__body {
    padding: .85rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    flex: 1;
}

.bil-card__name {
    font-size: .95rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: var(--bil-text);
}

.bil-card__worth {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bil-teal);
}

.bil-card__source {
    font-size: .78rem;
    color: var(--bil-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bil-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-block-start: .25rem;
}

.bil-tag {
    display: inline-block;
    font-size: .7rem;
    padding: .15rem .45rem;
    border-radius: 12px;
    font-weight: 600;
}

.bil-tag--industry { background: #e8f4f3; color: #00766b; }
.bil-tag--age      { background: #f0f4f8; color: var(--bil-muted); }
.bil-tag--female   { background: #fce8f3; color: #a0007c; }
.bil-tag--selfmade { background: #fff8e0; color: #8b6400; }
.bil-tag--inherited{ background: #f0f0f0; color: #555; }

.bil-card__location {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .75rem;
    color: var(--bil-muted);
}

/* Philanthropy dots */
.bil-card__philanthropy {
    display: flex;
    align-items: center;
    gap: .2rem;
    margin-block-start: auto;
    padding-block-start: .35rem;
}

.bil-card__philanthropy span{
    font-size: 13px;
}

.bil-phil-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dde3ea;
    display: inline-block;
    transition: background .2s;
}

.bil-phil-dot.filled { background: var(--bil-gold); }

.bil-phil-label {
    font-size: .7rem;
    color: var(--bil-muted);
    margin-inline-start: .2rem;
}

/* Empty state */
.bil-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--bil-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Pagination */
.bil-pagination {
    margin-block-start: 2.5rem;
    display: flex;
    justify-content: center;
}

/* ── FAQ Section ────────────────────────────────────────────── */
.bil-faq-section {
    background: #f7f9fc;
    padding-block: 3rem;
    border-top: 1px solid var(--bil-border);
}

.bil-faq__title,
.bil-profile-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--bil-navy);
    margin-block-end: 1.25rem;
}

.bil-faq-list { display: flex; flex-direction: column; gap: .75rem; }

.bil-faq-item {
    background: #fff;
    border: 1px solid var(--bil-border);
    border-radius: var(--bil-radius);
    overflow: hidden;
}

.bil-faq-item__q {
    padding: 1rem 1.25rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--bil-text);
}

.bil-faq-item__q::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--bil-teal);
    transition: transform .2s;
    flex-shrink: 0;
    margin-inline-start: 1rem;
}

details[open] .bil-faq-item__q::after { transform: rotate(45deg); }

.bil-faq-item__a {
    padding: 0 1.25rem 1rem;
    color: var(--bil-muted);
    font-size: .9rem;
    line-height: 1.6;
}

/* ── Profile page ────────────────────────────────────────────── */
.bil-profile-hero {
    background: linear-gradient(135deg, var(--bil-navy) 0%, #1e3d6a 100%);
    padding-block: 2.5rem;
    color: #fff;
}

.bil-profile-top {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.bil-profile-photo-wrap {
    position: relative;
    flex-shrink: 0;
}

.bil-profile-rank {
    position: absolute;
    inset-block-start: -.5rem;
    inset-inline-start: -.5rem;
    background: var(--bil-gold);
    color: var(--bil-navy);
    font-weight: 800;
    font-size: .85rem;
    padding: .25rem .6rem;
    border-radius: 8px;
    z-index: 2;
}

.bil-profile-photo {
    width: 160px;
    height: 160px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,.3);
}

.bil-profile-identity { flex: 1; min-width: 220px; }

.bil-profile-name {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    margin-block-end: .3rem;
    line-height: 1.2;
}

.bil-profile-source {
    color: rgba(255,255,255,.7);
    margin-block-end: 1rem;
    font-size: 1rem;
}

.bil-profile-worth-badge {
    display: inline-flex;
    flex-direction: column;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    padding: .6rem 1.2rem;
    margin-block-end: 1rem;
}

.bil-profile-worth__num { font-size: 1.8rem; font-weight: 800; color: var(--bil-gold); }
.bil-profile-worth__label { font-size: .78rem; color: rgba(255,255,255,.65); }

.bil-profile-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-block-end: 1rem; }

/* Stats grid */
.bil-profile-stats-section {
    padding-block: 1.75rem;
    border-bottom: 1px solid var(--bil-border);
}

.bil-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.bil-pstat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem .75rem;
    background: #fff;
    border: 1px solid var(--bil-border);
    border-radius: var(--bil-radius);
    box-shadow: var(--bil-shadow);
    gap: .25rem;
}

.bil-pstat__icon { font-size: 1.4rem; }
.bil-pstat__val  { font-size: 1rem; font-weight: 700; color: var(--bil-text); }
.bil-pstat__lbl  { font-size: .72rem; color: var(--bil-muted); }

/* Bio card */
.bil-profile-bio-section { padding-block: 2rem; }

.bil-profile-bio-card {
    background: #fff;
    border: 1px solid var(--bil-border);
    border-radius: var(--bil-radius);
    padding: 1.75rem;
    box-shadow: var(--bil-shadow);
}

.bil-profile-bio-text {
    font-size: .97rem;
    line-height: 1.75;
    color: var(--bil-text);
}

.bil-bio-en-toggle {
    margin-block-start: 1rem;
    border-top: 1px dashed var(--bil-border);
    padding-block-start: .75rem;
}

.bil-bio-en-toggle summary {
    font-size: .82rem;
    color: var(--bil-muted);
    cursor: pointer;
    padding: .25rem 0;
}

.bil-bio-en { font-size: .85rem; color: var(--bil-muted); margin-block-start: .5rem; direction: ltr; text-align: left; }

/* Philanthropy meter */
.bil-phil-section { padding-block: 2rem; background: #f7f9fc; }

.bil-phil-card {
    background: #fff;
    border: 1px solid var(--bil-border);
    border-radius: var(--bil-radius);
    padding: 1.75rem;
    box-shadow: var(--bil-shadow);
}

.bil-phil-meter {
    display: flex;
    gap: .5rem;
    margin-block: .75rem;
}

.bil-phil-block {
    flex: 1;
    height: 48px;
    border-radius: 8px;
    background: #e8edf4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.bil-phil-block.filled { background: var(--bil-gold); }

.bil-phil-block__num { font-weight: 700; font-size: .9rem; color: #fff; }
.bil-phil-block:not(.filled) .bil-phil-block__num { color: #aaa; }

.bil-phil-desc { font-size: .88rem; color: var(--bil-muted); }

/* Related grid */
.bil-related-section { padding-block: 2rem; }

.bil-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.bil-related-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    background: #fff;
    border: 1px solid var(--bil-border);
    border-radius: var(--bil-radius);
    text-decoration: none;
    color: inherit;
    transition: border-color .2s, box-shadow .2s;
}

.bil-related-card:hover {
    border-color: var(--bil-teal);
    box-shadow: var(--bil-shadow-hov);
}

.bil-related-card__photo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    flex-shrink: 0;
}

.bil-related-card__info {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}

.bil-related-card__name {
    font-size: .88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bil-related-card__worth { font-size: .82rem; color: var(--bil-teal); font-weight: 700; }
.bil-related-card__rank  { font-size: .75rem; color: var(--bil-muted); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bil-hero { padding-block: 2.5rem 2rem; }
    .bil-stats-strip { gap: 1rem; padding: 1rem; }
    .bil-stat__num { font-size: 1.15rem; }

    .bil-filters-wrap { position: static; padding: 15px 15px;}
    .bil-filter-row { flex-direction: column; align-items: stretch; }
    .bil-sort-wrap { width: 100%; }
    .bil-sort-wrap .bil-select { width: 100%; }
    .bil-filter-chips { flex-direction: column; align-items: flex-start; }
    .bil-chip-group--actions { margin-inline-start: 0; }

    .bil-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }

    .bil-profile-top { flex-direction: column; align-items: center; text-align: center; }
    .bil-profile-photo { width: 120px; height: 120px; }
    .bil-profile-tags { justify-content: center; }
}

@media (max-width: 480px) {
    .bil-grid { grid-template-columns: 1fr 1fr; }
    .bil-profile-stats { grid-template-columns: repeat(2, 1fr); }
    .bil-related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
    .bil-grid { grid-template-columns: 1fr; }
}

/* ── Details article (Perplexity-generated HTML) ───────────── */
.bil-details-section {
    padding-block: 2.5rem;
    padding: 40px;
    background: var(--surface-alt, #f8f9fa);
}

.bil-details-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem 2.5rem;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    max-width: 860px;
    margin-inline: auto;
    line-height: 1.85;
    color: var(--ink, #1a2332);
    font-size: 1rem;
}

.bil-details-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bil-navy);
    margin-block: 1.5rem .6rem;
    padding-block-end: .4rem;
    border-block-end: 2px solid var(--bil-teal);
}

.bil-details-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bil-teal);
    margin-block: 1.2rem .4rem;
}

.bil-details-card p {
    margin-block-end: .9rem;
}

.bil-details-card ul,
.bil-details-card ol {
    padding-inline-start: 1.4rem;
    margin-block-end: .9rem;
}

.bil-details-card li {
    margin-block-end: .3rem;
}

.bil-details-card strong {
    color: var(--bil-navy);
}

@media (max-width: 640px) {
    .bil-details-card { padding: 1.25rem 1rem; }
    .bil-details-card h2 { font-size: 1.15rem; }
}
