:root {
    --cable-index-offset: 160px;
}

.stf-cable-index-authority {
    margin: 0 0 2rem;
    padding: 1.25rem;
    border: 1px solid #dbe5ec;
    border-radius: 6px;
    background: #f7fafc;
}

.stf-cable-index-authority h1 {
    margin: 0 0 0.5rem;
}

.stf-cable-index-authority p {
    max-width: 72ch;
    margin: 0 0 0.85rem;
}

.stf-cable-index-authority-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.1rem;
}

.stf-cable-index-authority-links a {
    color: var(--awb-primary, #20639b);
    text-decoration: underline;
}

.stf-cable-index-container {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}

.stf-cable-index-sidebar {
    background: #fff;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

@media (min-width: 769px) {
    .stf-cable-index-sidebar {
        position: sticky !important;
        top: var(--cable-index-offset) !important;
        width: 200px !important;
        flex: 0 0 200px;
        align-self: flex-start;
        z-index: 1000 !important;
    }

    .stf-cable-index-container {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .stf-cable-index-container {
        display: block;
        margin-left: 0;
        gap: 0;
    }

    .stf-cable-index-sidebar {
        position: static;
        margin-bottom: 1.5rem;
        border: none;
        padding: 0;
    }
}

.stf-cable-index-sidebar h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.stf-cable-letter-select {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.stf-cable-index-list {
    flex: 1 1 auto;
}

.stf-cable-group {
    margin-bottom: 2.5em;
    scroll-margin-top: calc(var(--cable-index-offset) + 10px);
}

.stf-cable-letter {
    font-size: 1.8em;
    font-weight: 800;
    margin-bottom: 0.2em;
    color: var(--awb-primary, #20639b);
    letter-spacing: 0.06em;
    padding-top: 0.5em;
    border-bottom: 2px solid #eef2f5;
}

.stf-cable-group ul {
    columns: 2 280px;
    gap: 2.2em;
    margin: 0.7em 0 0 0;
    padding: 0;
    list-style: none;
}

.stf-cable-group li {
    margin: 0 0 0.35em 0;
    break-inside: avoid;
    font-size: 1em;
    line-height: 1.6;
}

.stf-cable-group a {
    color: var(--awb-primary, #20639b);
    text-decoration: none;
    border-bottom: 1px dotted #b4c6d4;
    transition: color 0.2s, border 0.2s;
}

.stf-cable-group a:hover {
    color: #103459;
    border-bottom: 1px solid #103459;
}

@media (max-width: 800px) {
    .stf-cable-group ul {
        columns: 1 100%;
    }
}
