.filters-hero,
.filter-accordion,
.results-panel {
    border: 1px solid var(--line);
    background: var(--white);
    margin: 1rem 0;
}

.filters-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
    gap: 1rem;
    align-items: end;
    padding: 1.35rem;
    background:
        linear-gradient(135deg, rgb(0 51 102 / 0.04), rgb(33 97 58 / 0.03)),
        var(--white);
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.filters-hero h1,
.results-heading h2 {
    margin: 0;
}

.filters-hero h1 {
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 0.9;
}

.hero-summary {
    max-width: 58rem;
    margin: 0.85rem 0 0;
    color: var(--muted);
    font-weight: 700;
}

.hero-metric {
    border-left: 3px solid var(--brand);
    background: var(--panel);
    padding: 1rem;
}

.hero-metric span,
.hero-metric small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-metric strong {
    display: block;
    margin: 0.2rem 0;
    font-size: 2rem;
}

.results-panel {
    padding: 1rem;
}

.filter-accordion {
    overflow: hidden;
}

.filter-accordion summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
    list-style: none;
    padding: 1rem 1.2rem;
    color: var(--brand);
    font-weight: 800;
}

.filter-accordion summary::-webkit-details-marker {
    display: none;
}

.filter-accordion summary::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--brand);
    flex: 0 0 auto;
}

.filter-accordion[open] summary::after {
    content: "-";
}

.filter-accordion summary small {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.filter-panel {
    border-top: 1px solid var(--line);
    padding: 1rem;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.15fr repeat(3, minmax(10rem, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.filter-controls label,
.date-controls label,
.filter-options legend,
.type-options legend {
    color: var(--brand-deep);
    font-weight: 700;
}

.filter-controls label span,
.date-controls label span {
    display: block;
    margin-bottom: 0.35rem;
}

.filter-controls select,
.filter-controls input,
.date-controls input {
    width: 100%;
    min-height: 2.75rem;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--brand-deep);
    font: inherit;
    font-weight: 700;
    padding: 0.55rem 0.7rem;
}

.date-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(10rem, 1fr)) minmax(20rem, 1.5fr);
    gap: 0.75rem;
    align-items: end;
    margin-top: 0.75rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-actions button,
.button-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.55rem 0.9rem;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
}

.filter-actions button {
    border: 1px solid var(--brand);
    background: var(--brand);
    color: var(--white);
    cursor: pointer;
}

.button-secondary {
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--brand);
}

.filter-options,
.type-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding: 1rem;
    border: 1px solid var(--line);
}

.filter-options legend,
.type-options legend {
    padding: 0 0.35rem;
}

.filter-note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.type-options {
    grid-template-columns: minmax(14rem, 1.4fr) repeat(2, minmax(10rem, 0.7fr));
    align-items: center;
}

.type-options p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.filter-check {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--panel);
    color: var(--brand-deep);
    font-weight: 700;
    padding: 0.7rem;
}

.results-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.results-heading p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.result-grid {
    display: grid;
    gap: 0.4rem;
}

.result-row {
    display: grid;
    grid-template-columns:
        minmax(6.6rem, 0.7fr)
        minmax(7.25rem, 0.7fr)
        minmax(14rem, 1.45fr)
        minmax(13rem, 1.15fr)
        minmax(5.5rem, 0.55fr)
        minmax(5.8rem, 0.6fr)
        minmax(4.2rem, 0.35fr)
        minmax(4.8rem, 0.45fr)
        minmax(5rem, 0.45fr)
        minmax(17rem, 1.75fr);
    gap: 0.85rem;
    align-items: center;
    border-left: 3px solid var(--brand);
    background: var(--panel);
    padding: 0.72rem 0.8rem;
}

.result-head {
    border-left-color: var(--line);
    background: var(--white);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.result-head span:nth-child(5),
.result-head span:nth-child(6),
.result-head span:nth-child(8),
.result-head span:nth-child(9) {
    text-align: right;
}

.result-head span:nth-child(7),
.result-row span[data-label="Trend"] {
    text-align: center;
}

.result-row a {
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
}

.result-row a:hover,
.result-row a:focus {
    text-decoration: underline;
}

.number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.result-row span[data-label="Sector / Industry"] small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.pill,
.event-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.35rem 0.55rem;
}

.pill-positive,
.event-pill {
    background: var(--success-bg);
    color: var(--success-ink);
}

.pill-muted,
.event-pill.muted {
    background: var(--panel-deep);
    color: var(--muted);
}

.event-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: flex-start;
}

.empty-state {
    display: grid;
    gap: 0.2rem;
    border-left: 3px solid var(--brand);
    background: var(--panel);
    padding: 1rem;
}

.empty-state span {
    color: var(--muted);
}

.pagination {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
}

.pagination a,
.pagination span {
    border: 1px solid var(--line);
    padding: 0.65rem 0.85rem;
    font-weight: 700;
}

.pagination a {
    color: var(--brand);
    text-decoration: none;
}

@media (max-width: 1100px) {
    .filter-controls,
    .date-controls,
    .filter-options,
    .type-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-accordion summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-accordion summary small {
        margin-left: 0;
    }

    .result-head {
        display: none;
    }

    .result-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .result-row span[role="cell"]::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .number {
        text-align: left;
    }
}

@media (max-width: 720px) {
    .filters-hero,
    .filter-controls,
    .date-controls,
    .filter-options,
    .type-options,
    .result-row {
        grid-template-columns: 1fr;
    }

    .filters-hero,
    .filter-accordion,
    .results-panel {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }

    .filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .results-heading,
    .pagination {
        align-items: stretch;
        flex-direction: column;
    }
}
