/* 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 .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 .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 .repo-badge:hover,
.projects-card .status-indicator:hover {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    text-shadow: none;
}

.links .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 .repo-badge,
    .projects-card .status-indicator {
        min-height: 40px;
    }
}

.projects-card button.repo-badge { font-family: inherit; cursor: pointer; }
.projects-card button.repo-badge:focus-visible,
.install-copy:focus-visible { outline: 2px solid #9ad0ff; outline-offset: 4px; }
.install-code-block {
    position: relative;
    border-radius: 6px;
    background: rgba(153, 161, 180, .15);
    padding-right: 3.75rem;
    margin-top: 2rem;
}
.install-copy {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(180, 187, 203, .25);
    border-radius: 5px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.install-copy svg { display: block; pointer-events: none; }
.install-copy:hover { background: rgba(255,255,255,.15); }
#ubuntuInstallCopyStatus {
    position: absolute;
    right: 0;
    bottom: calc(100% + .35rem);
    max-width: 100%;
    font-size: .8rem;
    line-height: 1.3;
    text-align: right;
    pointer-events: none;
}
#ubuntuInstallCopyStatus:empty { display: none; }
.install-commands {
    max-width: 100%;
    margin: 0;
    padding: 1rem;
    border: 0;
    background: transparent;
    white-space: pre;
    overflow-x: auto;
    color: #b9c5d6;
    font-size: .85rem;
    line-height: 1.7;
    user-select: text;
    -webkit-user-select: text;
}

.install-commands .shell-command { color: #ff976b; }
