/* Teacher/parent wordplay. Strictly scoped to the dedicated nav link. */
.kh-teacher-tools-nav,
.kh-teacher-tools-nav > a,
.kh-teacher-tools-nav .wp-block-navigation-item__content,
a[data-kh-teacher-tools-nav="1"] {
    overflow: visible !important;
}

.kh-teacher-tools-nav .kh-tt-nav-label,
a[data-kh-teacher-tools-nav="1"] .kh-tt-nav-label {
    display: inline;
    white-space: nowrap;
    direction: rtl;
    unicode-bidi: isolate;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
}

.kh-teacher-tools-nav .kh-tt-swap,
a[data-kh-teacher-tools-nav="1"] .kh-tt-swap {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
    direction: rtl;
    unicode-bidi: isolate;
    isolation: isolate;
    font: inherit;
    line-height: inherit;
    color: inherit;
    overflow: visible;
}

/* Original מ stays a normal, untouched Hebrew glyph. */
.kh-teacher-tools-nav .kh-tt-old,
a[data-kh-teacher-tools-nav="1"] .kh-tt-old {
    position: relative;
    display: inline;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    text-decoration: none;
    text-shadow: none;
    transform: none;
    filter: none;
    clip: auto;
    opacity: 1;
    z-index: 2;
}

/* The replacement ה is decorative CSS, not extra text in the DOM. */
.kh-teacher-tools-nav .kh-tt-swap::before,
a[data-kh-teacher-tools-nav="1"] .kh-tt-swap::before {
    content: "ה";
    position: absolute;
    left: 52%;
    top: -0.60em;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    color: #e3262e;
    font-family: inherit;
    font-style: normal;
    font-weight: 700;
    font-size: 0.64em;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    z-index: 4;
    pointer-events: none;
    text-decoration: none;
    text-shadow: none;
}

/* Thin strike is behind the מ strokes, so מ stays unmistakably readable. */
.kh-teacher-tools-nav .kh-tt-swap::after,
a[data-kh-teacher-tools-nav="1"] .kh-tt-swap::after {
    content: "";
    position: absolute;
    left: 55%;
    top: 52%;
    width: 0.060em;
    height: 1.08em;
    transform: translate(-50%, -50%) rotate(-31deg);
    transform-origin: center;
    border: 0;
    border-radius: 999px;
    background: #e3262e;
    box-shadow: none;
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 782px) {
    .kh-teacher-tools-nav .kh-tt-swap::before,
    a[data-kh-teacher-tools-nav="1"] .kh-tt-swap::before {
        top: -0.57em;
        font-size: 0.62em;
    }

    .kh-teacher-tools-nav .kh-tt-swap::after,
    a[data-kh-teacher-tools-nav="1"] .kh-tt-swap::after {
        width: 0.055em;
        height: 1.04em;
    }
}
