/* =========================================================================
   Avatar — the initial in a circle
   =========================================================================

   ⛔ **THIS WAS DEFINED TWICE, ONCE PER PAGE STYLESHEET.** `.relationship-avatar`
   lived in `relationship-list.css` at 48px and again in
   `relationship-detail.css` at 80px, with a third copy of the 80px rule inside
   a `max-width` block. Two templates use the class and neither loads the
   other's sheet, so somebody hit the unstyled-on-the-second-page bug and fixed
   it by copying — the same move that let `.writing-prompt-context` drift to a
   hardcoded `#b45309`.

   ⭐ One rule, one size token. The page asks for the size it wants with a
   modifier instead of redeclaring the component.

   ⚠️ Registered in tests/core/test_shared_css_is_actually_loaded.py, which
   fails if this file stops defining the bare class, if base.html stops linking
   it, or if a page stylesheet defines it again.
   ========================================================================= */

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--text-inverse);
    font-size: var(--text-xl);
    font-weight: 600;
    /* The letter is decorative — the name is right beside it in every use. */
    user-select: none;
}

/* Inside a chip, where the name is the row and the avatar is punctuation —
   "From before" on the people list collapses a long tail into chips rather
   than giving six months of silence six months of vertical space. */
.avatar--sm {
    width: 24px;
    height: 24px;
    font-size: var(--text-xs);
}

/* The person page, where the avatar is the page's subject rather than a row
   marker. */
.avatar--lg {
    width: 72px;
    height: 72px;
    font-size: var(--text-3xl);
}

@media (max-width: 600px) {
    .avatar--lg {
        width: 56px;
        height: 56px;
        font-size: var(--text-2xl);
    }
}
