.ec-strike-ladder {
    min-width: 0;
}

.ec-strike-ladder__navigator {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    min-width: 0;
}

.ec-strike-ladder__navigator.has-overflow {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 0.35rem;
}

.ec-strike-ladder__viewport {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
}

.ec-strike-ladder__viewport::-webkit-scrollbar {
    display: none;
}

.ec-strike-ladder__viewport:focus-visible {
    border-radius: 6px;
    outline: 3px solid rgba(0, 73, 136, 0.3);
    outline-offset: 2px;
}

.ec-strike-ladder__scroll {
    display: none;
    align-self: center;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--active-color);
    background: #fff;
    cursor: pointer;
}

.ec-strike-ladder__navigator.has-overflow .ec-strike-ladder__scroll {
    display: grid;
}

.ec-strike-ladder__scroll:hover:not(:disabled) {
    border-color: var(--active-color);
    background: var(--active-color-light);
}

.ec-strike-ladder__scroll:focus-visible {
    outline: 3px solid rgba(0, 73, 136, 0.3);
    outline-offset: 2px;
}

.ec-strike-ladder__scroll:disabled {
    cursor: default;
    opacity: 0.35;
}

.ec-strike-ladder__scroll span {
    font-size: 1rem;
    line-height: 1;
}

.ec-strike-ladder__plot {
    position: relative;
    /* Reserve a stable lane for each visible marker while keeping simpler strategies compact. */
    height: max(110px, calc(58px + (var(--ec-marker-lanes, 5) * 26px)));
    min-width: 100%;
}

.ec-strike-ladder__axis {
    position: absolute;
    bottom: 34px;
    height: 1px;
    background: var(--border-color);
}

.ec-strike-ladder__strike {
    position: absolute;
    top: -9px;
    width: 2px;
    height: 19px;
    padding: 0;
    border: 0;
    background: var(--border-color);
    transform: translateX(-50%);
    cursor: pointer;
}

.ec-strike-ladder__strike::after {
    position: absolute;
    inset: -10px -12px;
    content: "";
}

.ec-strike-ladder__strike span {
    position: absolute;
    top: 24px;
    left: 50%;
    color: #475467;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    transform: translateX(-50%);
}

.ec-strike-ladder__strike:hover,
.ec-strike-ladder__strike.is-selected {
    width: 3px;
    background: #3375aa;
}

.ec-strike-ladder__strike:focus-visible {
    outline: 3px solid rgba(0, 73, 136, 0.3);
    outline-offset: 5px;
}

.ec-strike-ladder__marker {
    position: absolute;
    z-index: 2;
    display: grid;
    justify-items: center;
    transform: translateX(-50%);
}

.ec-strike-ladder__marker.is-draggable {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.ec-strike-ladder__marker.is-draggable.is-dragging {
    z-index: 5;
    cursor: grabbing;
}

.ec-strike-ladder__marker::after {
    width: 0;
    height: 0;
    border-top: 8px solid currentColor;
    border-right: 6px solid transparent;
    border-left: 6px solid transparent;
    content: "";
}

.ec-strike-ladder__marker strong {
    padding: 0.22rem 0.4rem;
    border: 1px solid currentColor;
    border-radius: 6px;
    background: #fff;
    color: inherit;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ec-strike-ladder__marker.is-active {
    z-index: 4;
}

.ec-strike-ladder__marker.is-active strong {
    box-shadow: 0 0 0 3px var(--active-color-light);
    font-weight: 700;
}

.ec-strike-ladder__handle {
    position: absolute;
    top: calc(100% + var(--ec-marker-axis-offset, 11px) - 8px);
    left: 50%;
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 1px currentColor;
    transform: translateX(-50%);
}

.ec-strike-ladder__handle::after {
    position: absolute;
    inset: -14px;
    content: "";
}

.ec-strike-ladder__marker.is-active .ec-strike-ladder__handle,
.ec-strike-ladder__marker.is-dragging .ec-strike-ladder__handle {
    box-shadow: 0 0 0 2px #fff, 0 0 0 5px currentColor;
}

.ec-strike-ladder__marker.is-draggable:focus-visible {
    outline: none;
}

.ec-strike-ladder__marker.is-draggable:focus-visible .ec-strike-ladder__handle {
    box-shadow: 0 0 0 2px #fff, 0 0 0 5px currentColor;
}

.ec-strike-ladder__marker--long {
    color: #1f7a4b;
}

.ec-strike-ladder__marker--short {
    color: var(--color-red);
}

.ec-strike-ladder__marker--current {
    z-index: 1;
    color: #1f2937;
}

.ec-strike-ladder__marker--current::after {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 2px;
    height: var(--ec-current-price-line-height, 11px);
    border: 0;
    background: #1f2937;
    content: "";
    transform: translateX(-50%);
}

.ec-strike-ladder__marker--current strong {
    border-color: #1f2937;
    color: #fff;
    background: #1f2937;
}

.ec-strike-ladder__legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    color: #475467;
    font-size: 0.78rem;
}

.ec-strike-ladder__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ec-strike-ladder__legend i {
    width: 22px;
    height: 2px;
    background: currentColor;
}

.ec-strike-ladder__legend .is-long {
    color: #1f7a4b;
}

.ec-strike-ladder__legend .is-short {
    color: var(--color-red);
}

.ec-strike-ladder__legend .is-current {
    color: #1f2937;
}

@media (prefers-reduced-motion: reduce) {
    .ec-strike-ladder__viewport {
        scroll-behavior: auto;
    }
}
