.heatmap-page {
    width: 100%;
}

.heatmap-container {
    width: calc(100% - 48px);
    max-width: 1900px;
    margin: 0 auto;
    padding: 50px 0 90px;
}

.heatmap-eyebrow {
    display: block;
    color: #9b6cff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.heatmap-heading h1 {
    margin: 8px 0 0;
    color: #ffffff;
    font-size: clamp(46px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -2.3px;
}

.heatmap-heading p {
    margin: 11px 0 0;
    color: #8290a0;
    font-size: 16px;
}

.heatmap-years {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.heatmap-years a {
    min-width: 72px;
    height: 43px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #101720;
    border: 1px solid #293542;
    border-radius: 8px;
    color: #8996a6;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.heatmap-years a:hover {
    border-color: #8b5cf6;
    color: #ffffff;
}

.heatmap-years a.active {
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: #ffffff;
}

.heatmap-stats {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat( 6, minmax(0, 1fr));
    gap: 14px;
}

.heatmap-stats article {
    min-width: 0;
    min-height: 210px;
    padding: 21px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.heatmap-stat-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.17);
    border-radius: 10px;
    color: #9b6cff;
    font-size: 17px;
}

.heatmap-stats article>span {
    margin-top: auto;
    color: #8290a0;
    font-size: 13px;
}

.heatmap-stats article>strong {
    margin-top: 6px;
    overflow: hidden;
    color: #ffffff;
    font-size: 21px;
    line-height: 1.25;
    text-overflow: ellipsis;
}

.heatmap-stats article>small {
    margin-top: 7px;
    color: #697687;
    font-size: 11px;
    line-height: 1.45;
}

.heatmap-main {
    margin-top: 65px;
    padding: 28px;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 16px;
}

.heatmap-main-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
}

.heatmap-main-heading h2 {
    margin: 6px 0 0;
    color: #ffffff;
    font-size: 30px;
    letter-spacing: -0.8px;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 6px;
}

.heatmap-legend span {
    color: #758293;
    font-size: 10px;
}

.heatmap-legend i {
    width: 13px;
    height: 13px;
    display: block;
    border-radius: 3px;
}

.level-0 {
    background: #171f29;
    border-color: #27313d;
}

.level-1 {
    background: #342653;
    border-color: #47316f;
}

.level-2 {
    background: #56398c;
    border-color: #6544a3;
}

.level-3 {
    background: #7951c6;
    border-color: #8a5ce0;
}

.level-4 {
    background: #a575ff;
    border-color: #b88eff;
}

.heatmap-scroll {
    width: 100%;
    margin-top: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.heatmap-calendar {
    min-width: 1050px;
}

.heatmap-months {
    margin-left: 43px;
    display: grid;
    grid-template-columns: repeat(var(--weeks), minmax(0, 1fr));
    column-gap: 4px;
    min-height: 24px;
}

.heatmap-months span {
    color: #738091;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.heatmap-body {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 8px;
}

.heatmap-weekdays {
    display: grid;
    grid-template-rows: repeat(7, 17px);
    row-gap: 4px;
}

.heatmap-weekdays span {
    align-self: center;
    color: #667485;
    font-size: 9px;
    text-align: right;
}

.heatmap-days {
    display: grid;
    grid-template-columns: repeat(var(--weeks), minmax(0, 1fr));
    grid-template-rows: repeat(7, 17px);
    column-gap: 4px;
    row-gap: 4px;
}

.heatmap-day {
    width: 100%;
    min-width: 0;
    height: 17px;
    padding: 0;
    border-width: 1px;
    border-style: solid;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, filter 0.12s ease;
}

.heatmap-day:hover {
    position: relative;
    z-index: 3;
    transform: scale(1.35);
    filter: brightness(1.18);
    border-color: #d7c5ff;
}

.heatmap-summary {
    margin-top: 26px;
    padding-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    border-top: 1px solid #27313d;
}

.heatmap-summary>div {
    min-height: 82px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #0b1219;
    border: 1px solid #25303c;
    border-radius: 9px;
}

.heatmap-summary strong {
    color: #ffffff;
    font-size: 21px;
}

.heatmap-summary span {
    margin-top: 3px;
    color: #778596;
    font-size: 11px;
}

.heatmap-tooltip {
    position: fixed;
    z-index: 9999;
    width: 235px;
    padding: 13px;
    display: none;
    pointer-events: none;
    background: #090f15;
    border: 1px solid #34404d;
    border-radius: 9px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.heatmap-tooltip.visible {
    display: block;
}

.heatmap-tooltip>strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
}

.heatmap-tooltip>div {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.heatmap-tooltip span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8290a0;
    font-size: 11px;
}

.heatmap-tooltip i {
    width: 14px;
    color: #9b6cff;
    text-align: center;
}

.heatmap-tooltip b {
    color: #b7c0ca;
    font-weight: 700;
}

@media (max-width: 1450px) {
    .heatmap-stats {
        grid-template-columns: repeat( 3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .heatmap-container {
        width: calc(100% - 30px);
        padding: 40px 0 65px;
    }
    .heatmap-stats {
        grid-template-columns: repeat( 2, minmax(0, 1fr));
    }
    .heatmap-main {
        padding: 20px;
    }
    .heatmap-main-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .heatmap-container {
        width: calc(100% - 22px);
    }
    .heatmap-heading h1 {
        font-size: 42px;
    }
    .heatmap-years {
        display: grid;
        grid-template-columns: repeat( auto-fit, minmax(65px, 1fr));
    }
    .heatmap-years a {
        width: 100%;
        min-width: 0;
    }
    .heatmap-stats {
        grid-template-columns: 1fr;
    }
    .heatmap-stats article {
        min-height: 170px;
    }
    .heatmap-main {
        margin-top: 45px;
        padding: 16px;
    }
    .heatmap-summary {
        grid-template-columns: 1fr;
    }
}