/* Licenses & Credits page: credit rows, DID tooltips, org card */
.licenses-shell { width: min(760px, calc(100% - 2rem)); }
.credits-section { margin-bottom: 0; }
.credits-section-body { color: var(--text-muted); font-size: .86rem; line-height: 1.55; margin: 0 0 .9rem; }
.credits-section-body:last-child { margin-bottom: 0; }
.credits-section-body a { color: var(--blue); font-weight: 600; }
.credits-section-body code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; }

.credit-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.credit-row { display: block; width: 100%; }

.credit-box {
    display: flex; align-items: center; gap: .7rem; min-width: 0; width: 100%; max-width: 100%;
    padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
}
.credit-avatar {
    flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
    background: var(--blue); color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: .82rem; text-transform: uppercase;
}
.credit-identity { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .05rem; }
.credit-handle-line { position: relative; display: inline-flex; align-items: center; gap: .3rem; min-width: 0; }
.credit-handle {
    font-size: .88rem; font-weight: 700; color: var(--blue); text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.credit-handle:hover { text-decoration: underline; }
.credit-handle.is-loading { color: var(--text-muted); font-weight: 500; }
.credit-name { font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.credit-role {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    padding: .18rem .55rem; border: 1px solid var(--border); border-radius: 999px;
    background: rgba(148, 163, 184, 0.12); color: var(--text-muted); font-size: .64rem; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; text-align: center; white-space: nowrap; line-height: 1.2;
}

.credit-did-popover {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
    display: none; flex-direction: column; gap: .4rem; width: max-content; max-width: 260px;
    background: var(--white); border: 1px solid var(--border); border-radius: 8px;
    box-shadow: var(--shadow-hover); padding: .55rem .65rem;
}
.credit-handle-line:hover .credit-did-popover, .org-handle-line:hover .credit-did-popover,
.credit-did-popover:hover { display: flex; }
.credit-did-popover-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }
.credit-did-popover-value { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .74rem; word-break: break-all; color: var(--text); }
.credit-did-copy {
    align-self: flex-start; border: 0; background: transparent; color: var(--blue);
    font-size: .72rem; font-weight: 700; cursor: pointer; padding: 0;
}
.credit-did-copy.copied { color: #2ea043; }

/* Org acknowledgement card (Cartridge, etc.) */
.org-card {
    display: flex; align-items: center; gap: .7rem; min-width: 0; width: 100%; max-width: 100%;
    padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
}
.org-logo { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--white); }
.org-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .05rem; }
.org-handle-line { position: relative; display: inline-flex; align-items: center; gap: .3rem; min-width: 0; }
.org-handle {
    font-size: .88rem; font-weight: 700; color: var(--blue); text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.org-handle:hover { text-decoration: underline; }
.org-name { font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dep-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.dep-item {
    display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap;
    padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
    font-size: .84rem;
}
.dep-item strong { font-family: ui-monospace, Menlo, Consolas, monospace; }
.dep-license {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--blue); border: 1px solid var(--blue); border-radius: 999px; padding: 1px 8px;
}
.dep-desc { color: var(--text-muted); }

@media (max-width: 560px) {
    .credit-box, .org-card { flex-wrap: wrap; }
    .credit-role { margin-left: 0; }
    .org-card { flex-direction: column; align-items: flex-start; }
}
