.matrix-departure .modal-content {
    overflow: hidden;
    border-radius: 18px;
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--surface-color));
    box-shadow: 0 24px 80px rgb(0 0 0 / 25%);
}
.matrix-departure .modal-header { justify-content: flex-start; gap: 14px; padding: 22px; }
.matrix-departure .modal-title { line-height: 1.4; }
.matrix-departure .modal-body { padding: 24px; line-height: 1.7; }
.matrix-departure .modal-body strong { overflow-wrap: anywhere; }
.matrix-departure .modal-footer { gap: 10px; padding: 16px 22px; }
.matrix-departure .modal-footer > * { margin: 0; }
.matrix-departure .modal-footer .btn { min-height: 44px; padding: 10px 16px; border-radius: 10px; }

.matrix-departure .matrix-departure-icon {
    display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color); font-size: 1.3rem;
}
.site-external-links {
    display: flex; flex-direction: column; gap: .45rem;
    margin-top: .75rem; padding-top: .9rem;
    border-top: 1px solid color-mix(in srgb, var(--text-color) 18%, transparent);
}
.signalhub-nav .site-external-link {
    display: flex; align-items: center; width: 100%; gap: .2rem;
    padding: .65rem .75rem; border: 1px solid transparent; border-radius: .7rem;
    color: var(--text-color); background: color-mix(in srgb, var(--text-color) 5%, transparent);
    font: inherit; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
}
.signalhub-nav .site-external-link:hover {
    color: var(--primary-color); border-color: color-mix(in srgb, var(--primary-color) 35%, transparent);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}
.signalhub-nav .site-external-link:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.site-external-icon { margin-left: auto; padding-left: .6rem; font-size: .8rem; opacity: .7; }
@media (max-width: 640px) {
    .matrix-departure .modal-header, .matrix-departure .modal-body { padding: 18px; }
    .matrix-departure .modal-footer { padding: 16px; }
    .matrix-departure .modal-footer form { flex: 1 1 100%; }
    .matrix-departure .modal-footer form .btn { width: 100%; }
}

/* Push the entry above the legal footer when space permits; retain normal flow on short screens. */
.site-services-entry { margin-top: auto; padding-top: 1.5rem; flex-shrink: 0; }
.site-services-entry + .signalhub-legal-footer { margin-top: 0; }
.site-services-button {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; min-height: 46px; padding: .65rem .85rem;
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: .7rem; cursor: pointer; font: inherit;
    color: var(--text-color); background: color-mix(in srgb, var(--text-color) 5%, transparent);
}
.site-services-button > .bi:first-child { font-size: 1.15rem; }
.site-services-button > .bi:last-child { font-size: .8rem; opacity: .7; }
.site-services-button:hover {
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    border-color: var(--primary-color);
}
.site-services-button:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }
