/* ============================================================
   editorial_split.css — ux16-enhancement-a

   Shared "editorial split" layout primitives: an identity column
   (avatar + name + bio + meta) paired with a second column via a
   CSS grid, hairline divider below, no outer card chrome. First
   introduced for the standalone profile page (pr38) and duplicated
   almost byte-for-byte for the pet profile page (ux16) — this file
   is the de-duplication of those two.

   Scope is deliberately CSS-only (see markdown/design/
   DESIGN_DECISIONS_EDITORIAL_SPLIT.md for the full writeup and why
   this ISN'T a shared Jinja macro): every consumer still hand-writes
   its own markup using these classes. Only the grid container + the
   identity-column atoms are shared. The second ("panel") column is
   deliberately NOT standardized here — profile's panel is a thin
   pass-through wrapper around the free-space cell, pets' panel is a
   bordered fact-card, and future consumers (admin detail, event
   detail, messaging header, settings, dashboard columns, feed) will
   all want different things there. Consumers define their own panel
   class and chrome (see .profile-freespace-col in profile.css,
   .pet-panel in pets.css).

   Current consumers: profile.css (.editorial-split usage in
   profile/view.html), pets.css (pets/view.html). More land as
   ux16-enhancement-b through -g ship.

   Load order: after avatars.css (identity columns embed avatar
   markup) and before the domain files that consume it.
   ============================================================ */

/* ============================================================
   1. Grid container
   ============================================================ */

.editorial-split {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: var(--space-5);
    align-items: start;
    padding-bottom: var(--space-5);
    margin-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border-subtle);
}

/* Single-column case — collapses whenever there's no second grid
   child, regardless of what that child's class would have been.
   Structural (:nth-child), not class-keyed, so any consumer that
   sometimes has a panel and sometimes doesn't gets this for free
   without an opt-in modifier class. Profile is the only current
   consumer that hits this (no free-space cell configured). */
.editorial-split:not(:has(> :nth-child(2))) {
    grid-template-columns: 1fr;
    max-width: 480px;
}

/* Mobile: stack the two columns and tighten spacing. */
@media (max-width: 767.98px) {
    .editorial-split {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* ============================================================
   2. Identity column
   ============================================================ */

.editorial-split-identity {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
}

.editorial-split-avatar-wrap {
    position: relative;
    align-self: flex-start;
}

/* Pencil chip — same idiom as .profile-column-edit-btn but bigger
   (28px vs 24px) since the hero avatar is 96px+ not 64px and the
   chip needs to stay legible proportionally. */
.editorial-split-edit-pencil {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-fast),
                border-color var(--transition-fast);
}

.editorial-split-edit-pencil:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.editorial-split-edit-pencil:focus-visible {
    outline: none;
    color: var(--color-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 40%, transparent);
}

.editorial-split-name {
    font-size: 1.6rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--color-text);
}

.editorial-split-bio {
    font-size: var(--font-size-body);
    line-height: 1.5;
    color: var(--color-text);
}

.editorial-split-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.editorial-split-meta strong {
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
    font-variant-numeric: tabular-nums;
}

.editorial-split-meta-sep {
    opacity: 0.5;
}

/* Generic actions wrapper — follow/unfollow, edit, etc. Consumers
   put their own buttons inside (.profile-action-btn family). */
.editorial-split-actions {
    margin-top: var(--space-1);
}

.editorial-split-actions form {
    margin: 0;
}
