.graph-series-trigger {
    position: fixed;
    top: 50%;
    left: 0;
    z-index: 997;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transform: translateY(-50%);
    transition: opacity 0.2s ease;
}

.graph-series-trigger-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 5px;
    height: 96px;
    border-radius: 0 5px 5px 0;
    background: linear-gradient(to bottom, #4cbf30 0%, #0f9d58 100%);
    box-shadow: 1px 0 7px rgba(15, 157, 88, 0.4);
    transform: translateY(-50%);
}

.graph-series-trigger-icon {
    position: absolute;
    top: 50%;
    left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 32px;
    border-radius: 0 16px 16px 0;
    background: #0f9d58;
    box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.22);
    transform: translateY(-50%);
}

.graph-series-trigger:hover .graph-series-trigger-icon {
    background: #0b7f48;
}

.graph-series-trigger:hover,
.graph-series-trigger:focus,
.graph-series-trigger:active {
    outline: none;
    background-color: transparent !important;
}

.graph-series-trigger:focus-visible .graph-series-trigger-icon {
    box-shadow: 0 0 0 3px #ffb300, 1px 2px 8px rgba(0, 0, 0, 0.22);
}

.graph-series-close:focus-visible,
.graph-series-link:focus-visible {
    outline: 3px solid #ffb300;
    outline-offset: 3px;
}

.graph-series-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    visibility: hidden;
    background: rgba(15, 23, 42, 0.52);
    opacity: 0;
    transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

.graph-series-backdrop.is-visible {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.graph-series-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1101;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    width: min(380px, calc(100vw - 24px));
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: #34495e;
    background: #fff;
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.24);
    transform: translateX(-102%);
    transition: transform 0.28s ease, visibility 0s linear 0.28s;
}

.graph-series-drawer.is-open {
    visibility: visible;
    transform: translateX(0);
    transition-delay: 0s;
}

.graph-series-header {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 24px 22px;
    border-bottom: 1px solid rgba(52, 73, 94, 0.14);
    background: linear-gradient(135deg, rgba(76, 191, 48, 0.12), rgba(15, 157, 88, 0.04));
}

.graph-series-heading {
    min-width: 0;
}

.graph-series-parent {
    display: block;
    margin-bottom: 7px;
    color: #0f9d58;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.graph-series-heading h2 {
    margin: 0;
    color: #263238;
    font-size: 1.65rem;
    line-height: 1.25;
}

.graph-series-close {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -8px -10px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #455a64;
    background: transparent;
    cursor: pointer;
}

.graph-series-close:hover {
    color: #0f9d58;
    background: rgba(15, 157, 88, 0.1);
}

.graph-series-nav {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 14px 28px;
    color: #34495e;
    background: #fff;
    box-shadow: none;
    line-height: normal;
}

.graph-series-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.graph-series-item {
    margin: 0 0 8px;
    padding: 0;
}

.graph-series-link {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: start;
    gap: 9px;
    min-height: 48px;
    padding: 12px 13px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #34495e;
    background: #f7f9fa;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.graph-series-link:hover {
    border-color: rgba(15, 157, 88, 0.35);
    color: #0f9d58;
    background: rgba(15, 157, 88, 0.07);
    transform: translateX(2px);
}

.graph-series-link.is-current {
    border-color: rgba(15, 157, 88, 0.42);
    color: #087f45;
    background: rgba(15, 157, 88, 0.12);
}

.graph-series-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #0f9d58;
    background: rgba(15, 157, 88, 0.12);
    font-size: 0.78rem;
    font-weight: 700;
}

.graph-series-link-title {
    padding-top: 3px;
    line-height: 1.5;
}

.graph-series-current {
    align-self: center;
    margin-left: 2px;
    padding: 3px 7px;
    border-radius: 10px;
    color: #fff;
    background: #0f9d58;
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
}

body.graph-series-open .graph-series-trigger {
    opacity: 0;
    pointer-events: none;
}

body.DarkMode .graph-series-drawer {
    color: rgba(255, 255, 255, 0.75);
    background: #282c34;
}

body.DarkMode .graph-series-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(76, 191, 48, 0.13), rgba(40, 44, 52, 0.95));
}

body.DarkMode .graph-series-heading h2 {
    color: rgba(255, 255, 255, 0.88);
}

body.DarkMode .graph-series-close {
    color: rgba(255, 255, 255, 0.62);
}

body.DarkMode .graph-series-link {
    color: rgba(255, 255, 255, 0.72);
    background: #323741;
}

body.DarkMode .graph-series-nav {
    color: rgba(255, 255, 255, 0.75);
    background: #282c34;
}

body.DarkMode .graph-series-link:hover,
body.DarkMode .graph-series-link.is-current {
    color: #7bdc91;
    background: rgba(76, 191, 48, 0.14);
}

@media only screen and (max-width: 601px) {
    .graph-series-trigger-line {
        height: 82px;
    }

    .graph-series-drawer {
        width: min(360px, calc(100vw - 20px));
    }

    .graph-series-header {
        padding: 22px 20px 18px;
    }

    .graph-series-nav {
        padding: 14px 10px 22px;
    }

    .graph-series-heading h2 {
        font-size: 1.45rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .graph-series-trigger,
    .graph-series-backdrop,
    .graph-series-drawer,
    .graph-series-link {
        transition: none;
    }
}
