.counter {
    display: inline-block;
    margin-left: 2px;
    padding: 1px 6px;
    background: #e5e5e5;
    color: #555;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    vertical-align: middle;
    white-space: nowrap;
    border-radius: 0;
}

.match{
	color: inherit;
	background: #ffc0cb;
	padding: 0 4px;
}

.variant-summary {
    padding-top: 24px;
    font-size: 16px;
    line-height: 1.8;
}

.variant-summary-row {
    margin: 4px 0;
    padding: 0 10px;
    border-left: 4px solid transparent;
}

.variant-summary-row.significant { border-left-color: #ffc0cb; }
.variant-summary-row.minor { border-left-color: #b5dab9; }
.variant-summary-row.unambiguous { border-left-color: #aed3eb; }

.variant-summary a {
    color: #006ecc;
    text-decoration: none;
    font-size: 14px;
}

.btn-outline-primary {
    color: #6c757d;
    border-color: #cfd7df;
    background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #006ecc;
    background: #fff;
    border-color: #006ecc;
}

.btn-outline-primary.active,
.btn-outline-primary:active {
    color: #fff;
    background: #006ecc;
    border-color: #006ecc;
}
.btn-xs {
    padding: .25rem .45rem;
    font-size: .8rem;
    line-height: 1.2;
}

.btn-outline-primary:not(:disabled):not(.disabled).active, .btn-outline-primary:not(:disabled):not(.disabled):active, .show>.btn-outline-primary.dropdown-toggle {
    background-color: #006ecc;
    border-color: #006ecc;
}

.variant-summary a:hover { text-decoration: underline; }

.witness-code {
    display: inline;
    direction: ltr;
    unicode-bidi: isolate;
}

.witness-siglum,
.ga-number {
    unicode-bidi: isolate;
}

.family-symbol {
    display: inline-flex;
    align-items: baseline;
    font-family: "Times New Roman", serif;
    font-size: 1.08em;
}

.family-number {
    position: relative;
    top: -.22em;
    margin-left: .2em;
    font-size: .82em;
    line-height: 1;
}

.witness-qualifiers { margin-left: .08em; }

/* По умолчанию работает без JavaScript */
.witness-view-full {
    display: block;
}

.witness-view-compact {
    display: none;
}

/* Переключение при наличии JS */
html.witness-mode-compact .witness-view-full {
    display: none;
}

html.witness-mode-compact .witness-view-compact {
    display: block;
}

html.witness-mode-full .witness-view-full {
    display: block;
}

html.witness-mode-full .witness-view-compact {
    display: none;
}

.witness-compact {
    font-size: 17px;
    line-height: 2;
}

.witness-compact-item {
    display: inline-block;
    white-space: nowrap;
}

.witness-separator { color: #6c757d; }

.witness-view-switch {
    display: flex;
    align-items: center;
    border: 1px solid #cfd7df;
    background: #fff;
    border-radius: 0;
}

.witness-view-button {
    appearance: none;
    padding: 5px 9px;
    border: 0;
    border-left: 1px solid #cfd7df;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: bold;
    border-radius: 0;
}

.witness-view-button:first-child { border-left: 0; }
.witness-view-button:hover { color: #006ecc; }

html.witness-mode-compact [data-witness-mode="compact"],
html.witness-mode-full [data-witness-mode="full"] {
    background-color: #006ecc !important;
    border-color: #006ecc !important;
    color: #fff !important;
}

.font-greek {
    font-family: "Tinos", "Times New Roman", serif;
    font-size: 19px;
}
h4.modal-title .font-greek {
    font-size: 1.5rem;
}

.verse-extra { display: none; }

.verse-extra.is-active {
    display: block;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
}

.parallel-verse {
    font-size: 16px;
    line-height: 1.7;
}

.parallel-verse + .parallel-verse {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
}

.parallel-label,
.reading-type-label {
    display: inline-block;
    padding: 1px 6px;
    background: #e5e5e5;
    color: #555;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    vertical-align: middle;
    white-space: nowrap;
}

.parallel-label {
    display: inline-block;
    width: 45px;
    min-width: 45px;
    margin-right: 8px;
    padding: 0;
    background: none;
}

.parallel-label > span {
    display: inline-block;
    padding: 1px 6px;
    background: #e5e5e5;
}

.reading-omitted {
    color: #c00;
    font-weight: bold;
}

.nomen-sacrum {
    text-transform: uppercase;
    text-decoration: overline;
    text-decoration-thickness: 1px;
    text-decoration-skip-ink: none;
    letter-spacing: .02em;
}

.legacy-unknown {
    padding: 0 2px;
    background: #ffe1e1;
    color: #a40000;
    font-family: monospace;
}

.conversion-status {
    display: inline-block;
    padding: 0 5px;
    font-size: 11px;
    line-height: 1.5;
    vertical-align: middle;
}

.conversion-status-ok {
    background: #e7f5ea;
    color: #246b34;
}

.conversion-status-sacrum {
    background: #e8f0fb;
    color: #245a91;
}

.conversion-status-warning {
    background: #ffe1e1;
    color: #a40000;
}

.unit {
    margin: 0 0 24px;
    padding: 0 0 20px;
    scroll-margin-top: 16px;
    border-bottom: 1px solid #cfcfcf;
    background: #fff;
    border-radius: 0;
}

.unit:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

.codes-line {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: baseline;
    font-size: 13px;
}

.codes-title {
    color: #6c757d;
    font-weight: bold;
}

.codes-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0 7px;
}

.codes-values b {
    color: #6c757d;
    font-weight: normal;
}

.code-separator { color: #6c757d; }
.block-codes { margin-bottom: 12px; }

.witness-info-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #dee2e6;
}

.witness-info-primary-item {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.witness-info-grid {
    display: grid;
    grid-template-columns: minmax(130px, 180px) 1fr;
    gap: 9px 14px;
}

.witness-info-label {
    color: #6c757d;
    font-weight: bold;
}

.witness-info-value {
    min-width: 0;
    overflow-wrap: anywhere;
}

.witness-info-value a {
    color: #006ecc;
    text-decoration: none;
}

.witness-info-value a:hover { text-decoration: underline; }

.witness-info-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #dee2e6;
}

.witness-info-section-title {
    margin: 18px 0 10px;
    font-size: 15px;
    font-weight: 700;
}

.witness-modal-status {
    margin: 0;
    color: #6c757d;
}

.manuscript-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin: -2px 0 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dee2e6;
}

.manuscript-name {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.25;
}

.manuscript-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    color: #6c757d;
    font-size: 13px;
}

.manuscript-ga {
    flex: 0 0 auto;
    padding: 5px 10px;
    background: #f1f5f9;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.manuscript-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #dee2e6;
}

.manuscript-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.repository-list {
    display: grid;
    gap: 12px;
}

.repository-card {
    padding: 13px 14px;
    background: #fafbfc;
    border: 1px solid #e1e5e9;
}

.repository-title { font-weight: 700; }

.repository-place {
    margin: 2px 0 10px;
    color: #6c757d;
    font-size: 13px;
}

.manuscript-source-note p { margin: 0 0 12px; }
.manuscript-source-note .witness-info-section-title { margin-top: 18px; }
.manuscript-source-note .witness-info-section-title:first-child { margin-top: 0; }

.apparatus-nav-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-left: 8px;
    border: 0;
    background: transparent;
    color: #006ecc;
}

.apparatus-nav-help:hover,
.apparatus-nav-help:focus {
    background: transparent;
    color: #006ecc;
}

.apparatus-nav-help svg { display: block; }

.apparatus-verse-diff:not(.diff-active) .diff-left,
.apparatus-verse-diff:not(.diff-active) .diff-right {
    background: none;
    padding-left: 0;
    padding-right: 0;
}

.w.highlighted {
    background-color: #fff3bf;
    border-radius: 1px;
}

.diff-left {
    background-color: #bde7ff;
    padding: 0 4px;
    border-radius: 1px;
}

.diff-right {
    background-color: #ffc0cb;
    padding: 0 4px;
    border-radius: 1px;
}

@media (max-width: 767.98px) {
    .tabs-scroll .nav-link {
        padding-left: .4rem;
        padding-right: .4rem;
    }
}
