/* ---------- Profile: the person on the left, their work on the right ---------- */
.profile-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.profile-card {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 24px;
}

.avatar {
    display: block;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--rule);
    background: var(--grey-tint);
    margin-bottom: 14px;
}
.profile-name { font-size: 26px; }
.profile-card .meta { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

/* Picture and bio are two small forms, one under the other. The card
   grows to fit them: it has no fixed height and never scrolls. */
.profile-card { height: auto; max-height: none; overflow: visible; }
.avatar-form,
.bio-form {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--rule-soft);
}
.avatar-form input[type="file"] { padding: 6px; font-size: 14px; }
.avatar-form input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 5px 10px;
    background: var(--sheet);
    color: var(--navy);
    border: 1px solid var(--navy);
    border-radius: 5px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bio-form textarea { min-height: 84px; }
.bio-form button { margin-top: 10px; }

/* ---------- A reporter's tickets ---------- */
.incident-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}
.incident-col h3 {
    padding-bottom: 8px;
    margin-bottom: 12px;
    color: var(--on-page);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}
.incident-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.incident-col li.none { color: var(--on-page-muted); padding: 6px 0; }

/* Each one is a small ticket: stub on the left, the rest on the right */
.profile-incident {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
}
.profile-incident { --notch: 6px; }
.pi-number,
.pi-main { background-color: var(--stock, var(--sheet)); }
.pi-number {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    font-family: var(--display);
    font-size: 21px;
    font-weight: 700;
    color: var(--navy-dark);
    border-radius: 6px 0 0 6px;
    border-right: 2px dashed rgba(27, 29, 58, 0.3);
    box-shadow: inset 6px 0 0 var(--sev, #8a8fa8);
}
.pi-main {
    padding: 12px 14px 12px 18px;
    border-radius: 0 6px 6px 0;
}
.pi-meta { color: #4b4f6c; }
.pi-title { display: block; font-weight: 700; font-size: 16px; color: var(--ink); }
.pi-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 5px;
    font-size: 14px;
    color: var(--muted);
}
.pi-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pi-actions form { margin: 0; }

/* ---------- A solver's teams ---------- */
.team-panel {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 22px 24px;
    margin-bottom: 16px;
}
.team-name { margin-bottom: 10px; }
.team-label { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.team-members { margin: 0 0 16px; padding: 0; list-style: none; columns: 2; column-gap: 24px; }
.team-members li { padding: 3px 0; break-inside: avoid; }
/* Marks the signed-in person's own name in the list */
.you-tag {
    margin-left: 6px;
    padding: 1px 8px;
    background: var(--gold-tint);
    border: 1px solid var(--gold-dark);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #4a3d0a;
}
.team-cta {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid var(--navy);
    border-radius: 6px;
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}
.team-cta:hover { background: var(--navy); color: #ffffff; }

@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
    .incident-columns { grid-template-columns: 1fr; }
}
