.hh-insights {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0.85rem;
}

.hh-insights-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 0 0.15rem;
    min-width: 0;
}

.hh-insights-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border-radius: var(--hh-radius-lg);
    color: var(--hh-primary);
    background: rgba(var(--hh-primary-rgb), 0.12);
}

.hh-insights-header > div {
    min-width: 0;
}

.hh-insights-header h1 {
    margin: 0;
    color: var(--hh-text-primary);
    font-size: clamp(1.65rem, 5vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.hh-insights-header p {
    margin: 0.35rem 0 0;
    color: var(--hh-text-muted);
    line-height: 1.55;
}

.hh-insights-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    min-height: 15rem;
    color: var(--hh-text-muted);
    text-align: center;
}

.hh-insights-loading p {
    margin: 0;
}

.hh-insights-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.hh-insights-context {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    color: var(--hh-text-secondary);
    border-color: rgba(var(--hh-primary-rgb), 0.2);
}

.hh-insights-context > .mud-icon-root {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    color: var(--hh-primary);
}

.hh-insights-context > div {
    min-width: 0;
}

.hh-insights-context p {
    margin: 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.hh-insights-context .hh-insights-context-title {
    margin-bottom: 0.2rem;
    color: var(--hh-text-primary);
    font-weight: 700;
}

.hh-insights-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.hh-insights-section-heading h2 {
    margin: 0;
    color: var(--hh-text-primary);
    font-size: 1.15rem;
    font-weight: 750;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.hh-insights-section-heading p {
    margin: 0.3rem 0 0;
    color: var(--hh-text-muted);
    line-height: 1.5;
}

.hh-insights-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
    gap: 0.85rem;
    margin: 0;
}

.hh-insights-metric {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
    padding: 1rem;
}

.hh-insights-metric dt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    color: var(--hh-text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
}

.hh-insights-metric dt > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.hh-insights-metric-icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: var(--hh-primary);
}

.hh-insights-metric dd {
    margin: 0;
}

.hh-insights-metric-value {
    color: var(--hh-text-primary);
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    font-weight: 800;
    line-height: 1;
    overflow-wrap: anywhere;
}

.hh-insights-metric-detail {
    color: var(--hh-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.hh-insights-recent {
    padding: 1.15rem;
}

.hh-insights-periods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.hh-insights-periods > div {
    min-width: 0;
    padding: 0.85rem;
    border-radius: var(--hh-radius-md);
    background: var(--hh-surface-soft-alt);
}

.hh-insights-periods dt {
    color: var(--hh-text-muted);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.hh-insights-periods dd {
    margin: 0.35rem 0 0;
    color: var(--hh-text-primary);
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    overflow-wrap: anywhere;
}

.hh-insights-trend {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    color: var(--hh-text-secondary);
    line-height: 1.5;
}

.hh-insights-trend .mud-icon-root {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    color: var(--hh-primary);
}

.hh-insights-zero-note {
    margin: 0;
    padding: 0.8rem 0.9rem;
    border-radius: var(--hh-radius-md);
    color: var(--hh-text-secondary);
    background: var(--hh-surface-soft);
    line-height: 1.5;
}

.hh-insights-member {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.2rem 0 0.5rem;
    color: var(--hh-text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
}

.hh-insights-member span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.hh-insights-member time {
    color: var(--hh-text-secondary);
    font-weight: 650;
}

@media (max-width: 480px) {
    .hh-insights {
        gap: 1rem;
        padding: 0.75rem;
    }

    .hh-insights-header {
        align-items: flex-start;
    }

    .hh-insights-periods {
        grid-template-columns: minmax(0, 1fr);
    }

    .hh-insights-member {
        align-items: flex-start;
        text-align: left;
    }
}

@media (forced-colors: active) {
    .hh-insights-header-icon,
    .hh-insights-context,
    .hh-insights-periods > div,
    .hh-insights-zero-note {
        border: 1px solid CanvasText;
    }
}
