.page-industry-detail .top-nav-shell {
    margin-bottom: 4px;
}

.industry-detail-state-panel {
    margin-top: 14px;
}

.industry-detail-state-panel h1,
.industry-detail-state-panel h2 {
    margin: 0;
}

.industry-detail-code-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--ui-text-muted);
    font-size: 0.92rem;
}

.industry-detail-trend-panel,
.industry-detail-metrics-panel,
.industry-detail-company-panel {
    display: grid;
    gap: 12px;
}

.industry-detail-trend-panel {
    padding-block: 14px;
}

.industry-detail-metrics-panel,
.industry-detail-company-panel {
    padding-block: 14px;
}

.industry-detail-trend-panel__header,
.industry-detail-metrics-panel__header,
.industry-detail-company-panel__header {
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.industry-detail-trend-panel__header > div:first-child,
.industry-detail-metrics-panel__header > div:first-child,
.industry-detail-company-panel__header > div:first-child {
    flex: 0 0 auto;
    min-width: 0;
}

.industry-detail-metric-group,
.industry-detail-chart-mode-group,
.industry-detail-year-group {
    flex: 1 1 520px;
    min-width: 0;
    max-width: none;
}

.industry-detail-chart-mode-group {
    flex: 0 1 auto;
    min-width: max-content;
}

.industry-detail-metric-selector,
.industry-detail-company-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    width: fit-content;
    max-width: 100%;
}

.industry-detail-trend-panel .panel-note {
    max-width: 48rem;
}

.industry-detail-trend-chart-card {
    padding: 10px 12px 12px;
}

.industry-detail-finance-note {
    margin-top: 6px;
    max-width: 52rem;
}

.industry-detail-metric-group__buttons {
    width: auto;
    min-width: 0;
    flex: 0 1 auto;
}

.industry-detail-metric-group .toggle {
    padding-left: 10px;
    padding-right: 10px;
}

.industry-detail-chart-mode-group .toggle {
    white-space: nowrap;
}

.industry-detail-metric-group__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.industry-detail-metric-group__buttons .toggle.is-active {
    border-color: var(--color-border-strong);
    background: var(--color-surface-warm);
    color: var(--color-accent);
    box-shadow: inset 0 0 0 1px var(--ui-selected-inset);
}

.industry-detail-trend-chart {
    width: 100%;
    height: 536px;
}

.industry-detail-year-group {
    flex: 0 1 240px;
}

.industry-detail-year-note {
    margin: 4px 0 0;
}

.industry-detail-company-controls {
    justify-content: space-between;
    align-items: flex-end;
}

.industry-detail-metrics-panel .panel-note,
.industry-detail-company-panel .panel-note {
    margin-top: -2px;
    max-width: 46rem;
}

.industry-detail-metrics-panel__header,
.industry-detail-company-panel__header {
    margin-bottom: 2px;
}

.industry-detail-table-grid .tabulator .tabulator-tableholder {
    overflow: auto;
}

.industry-detail-table-grid .tabulator .tabulator-cell {
    white-space: nowrap;
}

.industry-detail-table-grid .tabulator .industry-detail-metric-cell.is-active {
    background: var(--color-surface-warm);
    color: var(--color-accent);
    font-weight: 700;
}

.industry-detail-table-grid .tabulator .tabulator-row:hover .industry-detail-metric-cell.is-active {
    background: var(--color-surface-warm);
}

@media (max-width: 640px) {
    .company-hero {
        border-radius: 14px;
        padding: 16px;
    }

    .company-hero-top {
        flex-direction: column;
    }

    .company-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .company-hero-actions > .button {
        width: 100%;
        justify-content: center;
    }

    .button-primary {
        width: 100%;
        justify-content: center;
    }

    .company-hero h1 {
        font-size: 1.5rem;
    }

    .industry-detail-metric-group,
    .industry-detail-chart-mode-group,
    .industry-detail-year-group {
        width: 100%;
        min-width: 0;
        flex-basis: 100%;
    }

    .industry-detail-trend-chart {
        height: 440px;
    }

    .industry-detail-metrics-panel,
    .industry-detail-company-controls {
        align-items: flex-start;
    }

    .industry-detail-trend-panel,
    .industry-detail-metrics-panel,
    .industry-detail-company-panel {
        padding-block: 12px;
    }

    .industry-detail-finance-note {
        max-width: none;
    }
}
