/* Keep project source links alongside service status without crowding small screens. */
.projects-card .link-item-header {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.projects-card .link-item-header > a {
    min-width: 0;
    overflow-wrap: anywhere;
}

.project-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.links a.repo-badge,
.projects-card .status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 32px;
    padding: 0.25rem 0.5rem;
    border: 0;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 500;
    color: var(--text-secondary);
    text-shadow: none;
    transition: background 0.2s ease;
}

.links a.repo-badge {
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Status sits at the outside edge on desktop and leads the mobile badge row. */
.project-badges .status-indicator { order: 1; }

.links a.repo-badge:hover,
.projects-card .status-indicator:hover {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    text-shadow: none;
}

.links a.repo-badge:hover { color: rgba(255, 255, 255, 0.6); }

.projects-card a:focus-visible,
.agent-overview summary:focus-visible,
.projects-card .status-indicator:focus-visible {
    outline: 2px solid #9ad0ff;
    outline-offset: 4px;
    border-radius: 4px;
}

.agent-overview {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.agent-overview summary {
    width: fit-content;
    padding: 0.5rem 0;
    cursor: pointer;
    color: var(--text-primary);
}

.agent-overview ul {
    padding-left: 1.25rem;
    margin: 0.75rem 0;
}

.agent-overview li + li {
    margin-top: 0.5rem;
}

.agent-overview p {
    margin: 0.75rem 0 0;
    font-size: inherit;
    line-height: inherit;
}

.agent-overview .endpoint-url {
    overflow-wrap: anywhere;
}

.links .agent-overview a {
    display: inline;
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.links .agent-overview a:hover {
    padding-left: 0;
}

@media (max-width: 600px) {
    .projects-card .link-item-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-badges .status-indicator { order: -1; }

    .links a.repo-badge,
    .projects-card .status-indicator {
        min-height: 40px;
    }
}
