$web-index: true !default;
@if $web-index {

    // Index

    // .reference-index-manual is for indexes that
    // are manually created, and should not be processed
    // by our dynamic-indexing scripts to save build time.

    .reference-index,
    .reference-index-manual {
        margin-left: $paragraph-indent;
        list-style-type: none;

        ul, ol {
            list-style-type: none;
        }

        li {
            text-indent: -($paragraph-indent);

            li {
                margin: 0;
            }

            a {
                text-decoration: none;

                &:after {
                    content: ", ";
                }
                &:last-of-type:after {
                    content: "";
                }
                &.indexed {
                    color: inherit;
                    text-decoration: none;
                }

                // Space between entry and first reference number
                &:first-of-type {
                    margin-left: .5em;
                }

                // If this starts a range, use an en dash not a comma
                &.index-range-from {

                    &:after {
                        content: "\2013"
                    }
                }
            }
        }

        .duplicate {
            display: none;
        }
    }

    .index-target {

        // Avoid index anchors from adding line breaks
        float: left;
    }

}
