.dividends-tool {
    width: min(1180px, calc(100% - 24px));
    margin: clamp(26px, 4vw, 48px) auto 52px;
    color: var(--ga-color-text);
}

.dividends-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ga-color-border-soft);
}

.dividends-hero > div:first-child > span,
.dividends-updated span,
.dividends-summary-card span,
.dividends-filter-panel label span,
.dividends-results-bar span {
    color: var(--ga-color-muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dividends-hero > div:first-child > span {
    display: block;
    margin-bottom: 8px;
    color: var(--ga-color-primary-hover);
}

.dividends-hero h1 {
    margin: 0;
    color: var(--ga-color-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.dividends-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--ga-color-muted);
    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 1.55;
}

.dividends-updated,
.dividends-summary-card,
.dividends-filter-panel,
.dividends-table-wrap,
.dividends-content-grid > article,
.dividends-content-grid > aside {
    border: 1px solid var(--ga-color-border);
    border-radius: var(--ga-radius-lg);
    background: var(--ga-color-surface);
    box-shadow: var(--ga-shadow-sm);
}

.dividends-updated {
    display: grid;
    gap: 4px;
    min-width: 176px;
    padding: 12px 14px;
}

.dividends-updated strong {
    color: var(--ga-color-heading);
}

.dividends-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.dividends-summary-card {
    display: grid;
    gap: 6px;
    min-height: 82px;
    padding: 14px;
    text-align: left;
}

.dividends-summary-card strong {
    color: var(--ga-color-heading);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    line-height: 1;
}

.dividends-summary-card:hover,
.dividends-summary-card.is-active {
    border-color: var(--ga-color-primary);
    background: rgba(var(--ga-color-primary-rgb), 0.07);
}

.dividends-active-day {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(var(--ga-color-primary-rgb), 0.22);
    border-left: 5px solid var(--ga-color-primary);
    border-radius: var(--ga-radius-lg);
    background: linear-gradient(90deg, rgba(var(--ga-color-primary-rgb), 0.11), var(--ga-color-surface));
    box-shadow: var(--ga-shadow-sm);
}

.dividends-active-day span {
    color: var(--ga-color-primary-hover);
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.dividends-active-day strong {
    color: var(--ga-color-heading);
    font-size: clamp(1.28rem, 3vw, 1.8rem);
    line-height: 1.12;
}

.dividends-filter-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(170px, 0.9fr) minmax(160px, 0.9fr) minmax(140px, 0.7fr) minmax(190px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 16px;
    padding: 14px;
}

.dividends-filter-panel label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.dividends-filter-panel input,
.dividends-filter-panel select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--ga-color-border);
    border-radius: var(--ga-radius-md);
    padding: 8px 10px;
    background: var(--ga-color-surface-muted);
    color: var(--ga-color-heading);
    font-weight: 800;
}

.dividends-date-control {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 6px;
}

.dividends-date-control button,
.dividends-clear-button,
.dividends-detail-button {
    border: 1px solid var(--ga-color-border);
    border-radius: var(--ga-radius-md);
    background: var(--ga-color-surface-muted);
    color: var(--ga-color-primary-hover);
    font-weight: 800;
}

.dividends-date-control button {
    display: grid;
    place-items: center;
    min-height: 42px;
}

.dividends-clear-button,
.dividends-detail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 12px;
    white-space: nowrap;
}

.dividends-date-control button:hover,
.dividends-clear-button:hover,
.dividends-detail-button:hover {
    border-color: var(--ga-color-primary);
    background: rgba(var(--ga-color-primary-rgb), 0.10);
}

.dividends-empty {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(220, 53, 69, 0.25);
    border-radius: var(--ga-radius-lg);
    background: rgba(220, 53, 69, 0.08);
    color: #7f1d1d;
}

.dividends-empty strong,
.dividends-empty span,
.dividends-empty small {
    display: block;
}

.dividends-results-bar {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 18px 0 10px;
}

.dividends-results-bar strong {
    color: var(--ga-color-heading);
    font-size: 1.35rem;
}

.dividends-table-wrap {
    overflow-x: auto;
}

.dividends-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.dividends-table th,
.dividends-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ga-color-border-soft);
    vertical-align: middle;
}

.dividends-table thead th {
    color: var(--ga-color-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.dividends-table tbody td {
    color: var(--ga-color-heading);
    font-weight: 700;
}

.dividends-row:hover {
    background: var(--ga-color-surface-muted);
}

.dividends-company {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    color: var(--ga-color-heading);
    text-decoration: none;
}

.dividends-company:hover strong {
    color: var(--ga-color-primary-hover);
}

.dividends-company-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: var(--ga-radius-md);
    background: rgba(var(--ga-color-primary-rgb), 0.10);
    color: var(--ga-color-primary-hover);
    font-weight: 900;
    overflow: hidden;
}

.dividends-company-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    background: var(--ga-color-surface);
}

.dividends-company-mark span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.dividends-company strong,
.dividends-company small {
    display: block;
}

.dividends-company small {
    max-width: 260px;
    overflow: hidden;
    color: var(--ga-color-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dividends-detail-button {
    min-height: 34px;
    font-size: 0.78rem;
    font-weight: 850;
}

.dividends-detail-button[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.dividends-detail-row td {
    background: var(--ga-color-surface-muted);
}

.dividends-detail-row dl {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.dividends-detail-row div {
    padding: 10px;
    border-radius: var(--ga-radius-md);
    background: var(--ga-color-surface);
}

.dividends-detail-row dt {
    color: var(--ga-color-muted);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
}

.dividends-detail-row dd {
    margin: 4px 0 0;
    color: var(--ga-color-heading);
    font-weight: 850;
}

.dividends-no-filter-results {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--ga-color-border);
    border-radius: var(--ga-radius-lg);
    background: var(--ga-color-surface-muted);
    color: var(--ga-color-muted);
    font-weight: 800;
}

.dividends-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
    gap: 14px;
    margin-top: 28px;
}

.dividends-content-grid > article,
.dividends-content-grid > aside {
    padding: 18px;
}

.dividends-content-grid h2 {
    margin: 0 0 10px;
    color: var(--ga-color-heading);
    font-size: 1.22rem;
}

.dividends-content-grid p {
    margin: 0 0 10px;
    color: var(--ga-color-muted);
    line-height: 1.58;
}

@media (max-width: 1100px) {
    .dividends-filter-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dividends-search-label {
        grid-column: span 2;
    }
}

@media (max-width: 820px) {
    .dividends-hero,
    .dividends-summary-grid,
    .dividends-filter-panel,
    .dividends-content-grid {
        grid-template-columns: 1fr;
    }

    .dividends-updated {
        min-width: 0;
    }

    .dividends-search-label {
        grid-column: auto;
    }

    .dividends-clear-button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .dividends-tool {
        width: min(100% - 18px, 1180px);
        margin-top: 22px;
    }

    .dividends-table {
        min-width: 0;
    }

    .dividends-table thead {
        display: none;
    }

    .dividends-table,
    .dividends-table tbody,
    .dividends-table tr,
    .dividends-table td {
        display: block;
        width: 100%;
    }

    .dividends-row {
        padding: 12px;
        border-bottom: 1px solid var(--ga-color-border-soft);
    }

    .dividends-table td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 0;
        border-bottom: 0;
        text-align: right;
    }

    .dividends-table td::before {
        content: attr(data-label);
        color: var(--ga-color-muted);
        font-size: 0.75rem;
        font-weight: 850;
        text-align: left;
        text-transform: uppercase;
    }

    .dividends-table td:last-child::before,
    .dividends-detail-row td::before {
        content: "";
    }

    .dividends-company {
        min-width: 0;
        justify-content: flex-end;
    }

    .dividends-company small {
        max-width: 180px;
    }

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

    .dividends-detail-row td {
        display: block;
        padding: 10px 12px 14px;
    }

    .dividends-detail-row dl {
        grid-template-columns: 1fr;
    }
}
