.programs-layout {
    display: grid;
    gap: 0;
}

.program-search-panel {
    margin-bottom: 24px;
}

.program-search-header {
    margin-bottom: 18px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: start;
}

.program-search-header h1 {
    margin-bottom: 10px;
}

.program-search-header-copy {
    min-width: 0;
}

.programs-intro {
    margin: 0;
}

.program-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
}

.program-keyword-field {
    flex: 1 1 440px;
}

.program-search-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    flex-wrap: wrap;
}

.program-search-actions button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.program-header-action {
    gap: 8px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.program-header-action.button-link.secondary {
    background: #8CA543;
    color: #ffffff;
    border-color: #8CA543;
    box-shadow: 0 12px 24px rgba(140, 165, 67, 0.24);
}

.program-header-action.button-link.secondary:hover,
.program-header-action.button-link.secondary:focus-visible {
    background: #789238;
    color: #ffffff;
    border-color: #789238;
    box-shadow: 0 14px 28px rgba(120, 146, 56, 0.28);
}

.program-results-copy {
    min-width: 0;
    margin-bottom: 18px;
}

.program-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.program-toolbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.program-filter-toggle {
    font-weight: 700;
}

.program-filter-toggle i:first-child {
    font-size: 1.05rem;
}

.program-filter-chevron {
    font-size: 0.95rem;
    transition: transform 0.18s ease;
}

.program-filter-toggle[aria-expanded="true"] .program-filter-chevron {
    transform: rotate(180deg);
}

.program-inline-filters[hidden] {
    display: none;
}

.program-filters-body {
    margin-bottom: 22px;
}

.program-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.program-reset-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.program-ordering-field {
    min-width: 220px;
    max-width: 320px;
    margin-left: auto;
}

.program-ordering-field label {
    display: block;
    margin-bottom: 8px;
}

.program-results-meta {
    margin-bottom: 18px;
}

.program-pagination-meta {
    color: var(--muted);
    font-size: 0.94rem;
}

.program-results {
    display: grid;
    gap: 20px;
}

.program-card {
    display: grid;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid rgba(15, 61, 136, 0.1);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 16px 32px rgba(15, 61, 136, 0.055);
}

.program-card-header {
    display: flex;
    gap: 18px;
    justify-content: space-between;
    align-items: start;
}

.program-card-heading {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.program-card-header h2 {
    margin: 0;
    font-size: clamp(1.18rem, 1.35vw, 1.38rem);
    line-height: 1.34;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.program-card-call {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.55;
}

.program-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.program-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.program-card-meta-tag {
    padding: 8px 12px;
    font-size: 0.88rem;
    font-weight: 700;
}

.program-visibility-tag.is-public {
    background: rgba(140, 165, 67, 0.16);
    border-color: rgba(140, 165, 67, 0.26);
    color: #6b8529;
}

.program-visibility-tag.is-internal {
    background: rgba(165, 124, 96, 0.16);
    border-color: rgba(165, 124, 96, 0.24);
    color: #7a5944;
}

.program-card-grid {
    display: grid;
    gap: 14px;
}

.program-card-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.program-card-link a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.program-card-link a:hover {
    text-decoration: underline;
}

.program-card-summary {
    margin: 0;
    color: var(--text);
    line-height: 1.78;
    font-size: 0.98rem;
    max-width: 92ch;
}

.program-empty {
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px dashed rgba(15, 61, 136, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: var(--muted);
}

.program-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.program-pagination-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (min-width: 900px) {
    .program-ordering-field {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 340px;
        max-width: 420px;
    }

    .program-ordering-field label {
        margin-bottom: 0;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .program-ordering-field select {
        flex: 1 1 auto;
    }
}

@media (max-width: 860px) {
    .program-search-header {
        flex-direction: column;
        align-items: stretch;
    }

    .program-header-action {
        align-self: flex-start;
    }
}

@media (max-width: 720px) {
    .program-search-header,
    .program-toolbar,
    .program-card-header,
    .program-pagination {
        align-items: stretch;
    }

    .program-search-header {
        flex-direction: column;
    }

    .program-search-actions,
    .program-filter-actions,
    .program-pagination-actions {
        width: 100%;
    }

    .program-search-actions button,
    .program-header-action,
    .program-pagination-actions .button-link {
        width: 100%;
    }

    .program-ordering-field {
        width: 100%;
        max-width: none;
        margin-left: 0;
    }

    .program-card-actions,
    .program-pagination-actions {
        width: 100%;
    }

    .program-pagination {
        justify-content: flex-start;
    }
}
