/* ============================================================
   NewKey — SEO Guide
   ============================================================ */

.nk-guide {
    --nkg-measure: 740px;
    --nkg-toc: 240px;
    --nkg-gap: var(--nk-sp-16, 64px);
    --nkg-size: 18px;
    --nkg-lh: 1.65;

    position: relative;
    padding-block: var(--nk-section, 96px);
    background: #fff;

    font-family: var(--kh-font);
    color: var(--kh-text);
}


/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */

.nk-guide__head {
    position: relative;

    max-width: var(--nkg-measure);
    margin-inline: auto;

    text-align: start;
}

.nk-guide__head .kh-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nk-guide__head .kh-eyebrow::before {
    content: "";

    width: 28px;
    height: 2px;

    background: var(--kh-blue);
    border-radius: 2px;
}

.nk-guide .nk-guide__title {
    margin: 0;

    font-size: 36px;
    line-height: 1.18;
    font-weight: 600;
    letter-spacing: -.01em;

    color: var(--kh-indigo);
}

.nk-guide .nk-guide__lead {
    margin: 16px 0 0;

    font-size: 20px;
    line-height: 1.55;

    color: var(--kh-text-2);
}


/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */

.nk-guide__layout {
    position: relative;

    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--nk-sp-8, 32px);

    margin-block-start: var(--nk-stack, 40px);
}

@media (min-width: 1024px) {

    .nk-guide__layout {
        grid-template-columns:
            var(--nkg-toc)
            minmax(0, var(--nkg-measure));

        justify-content: center;

        column-gap: var(--nkg-gap);
    }

}


/* ------------------------------------------------------------
   TOC
   ------------------------------------------------------------ */

.nk-guide__toc {
    font-size: 14px;
}

.nk-guide__toc[hidden] {
    display: none;
}

@media (min-width: 1024px) {

    .nk-guide__toc {
        position: sticky;
        top: calc(var(--header-height, 62px) + 24px);

        align-self: start;

        max-height:
            calc(100vh - var(--header-height, 62px) - 48px);

        overflow: auto;
    }

}

.nk-guide .nk-guide__toc summary {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 4px 0;

    list-style: none;
    cursor: pointer;

    font-weight: 500;

    color: var(--kh-indigo);
}

.nk-guide .nk-guide__toc summary::-webkit-details-marker {
    display: none;
}

.nk-guide .nk-guide__toc summary .nk-icon {
    --nk-icon-box: 24px;
    --nk-icon-size: 18px;

    color: var(--kh-blue);
}

.nk-guide .nk-guide__toc summary .nk-toc__chev {
    margin-inline-start: auto;

    transition:
        transform var(--kh-dur-base) var(--kh-ease);
}

.nk-guide .nk-guide__toc[open] summary .nk-toc__chev {
    transform: rotate(180deg);
}

.nk-guide .nk-toc__list,
.nk-guide .nk-toc__list ol {
    margin: 0;
    padding: 0;

    list-style: none;
}

.nk-guide .nk-toc__list {
    margin-block-start: 8px;

    border-inline-start:
        2px solid var(--kh-mist);
}

.nk-guide .nk-toc__list a {
    display: block;

    margin-inline-start: -2px;
    padding: 6px 0 6px 14px;

    border-inline-start:
        2px solid transparent;

    color: var(--kh-text-2);

    line-height: 1.35;
    text-decoration: none;

    transition:
        color var(--kh-dur-fast),
        border-color var(--kh-dur-fast);
}

.nk-guide .nk-toc__list li li a {
    padding-inline-start: 26px;

    font-size: 13px;
}

.nk-guide .nk-toc__list a:hover {
    color: var(--kh-indigo);
}

.nk-guide .nk-toc__list a.is-active {
    color: var(--kh-blue);
    border-color: var(--kh-blue);

    font-weight: 500;
}

@media (min-width: 1024px) {

    .nk-guide .nk-guide__toc summary {
        pointer-events: none;
    }

    .nk-guide .nk-guide__toc summary .nk-toc__chev {
        display: none;
    }

}

@media (max-width: 1023px) {

    .nk-guide__toc {
        padding: 10px 16px;

        border: 1px solid var(--kh-mist);
        border-radius: 16px;

        background: #fff;
    }

    .nk-guide .nk-toc__list {
        margin-block: 6px 4px;
    }

}


/* ------------------------------------------------------------
   SEO content
   ------------------------------------------------------------ */

.nk-guide .nk-prose {
    min-width: 0;

    font-size: var(--nkg-size);
    line-height: var(--nkg-lh);

    color: var(--kh-text);

    overflow-wrap: anywhere;
}

.nk-guide .nk-prose > :first-child {
    margin-block-start: 0 !important;
}

.nk-guide .nk-prose > :last-child {
    margin-block-end: 0 !important;
}


/* Headings */

.nk-guide .nk-prose h2,
.nk-guide .nk-prose h3,
.nk-guide .nk-prose h4 {
    margin: 0;

    font-weight: 600;
    line-height: 1.25;

    color: var(--kh-indigo);

    scroll-margin-block-start:
        calc(var(--header-height, 62px) + 24px);
}

.nk-guide .nk-prose h2 {
    position: relative;

    margin-block: 56px 20px;
    padding-block-start: 20px;

    font-size: 28px;
}

.nk-guide .nk-prose h2::before {
    content: "";

    position: absolute;

    inset-block-start: 0;
    inset-inline-start: 0;

    width: 44px;
    height: 3px;

    border-radius: 3px;

    background: var(--kh-blue);
}

.nk-guide .nk-prose h3 {
    margin-block: 40px 14px;

    font-size: 22px;
}

.nk-guide .nk-prose h4 {
    margin-block: 28px 10px;

    font-size: 18px;
    font-weight: 500;
}


/* Paragraphs */

.nk-guide .nk-prose p {
    margin: 0 0 1.2em;
}

.nk-guide .nk-prose .nk-lead,
.nk-guide .nk-prose p.nk-lead {
    font-size: 21px;
    line-height: 1.5;

    color: var(--kh-text-2);
}

.nk-guide .nk-prose strong,
.nk-guide .nk-prose b {
    font-weight: 600;

    color: var(--kh-indigo);
}


/* Links */

.nk-guide .nk-prose a {
    color: var(--kh-blue);

    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;

    transition:
        text-decoration-color var(--kh-dur-fast),
        color var(--kh-dur-fast);
}

.nk-guide .nk-prose a:hover,
.nk-guide .nk-prose a:focus-visible {
    text-decoration-color: currentColor;
}


/* Lists */

.nk-guide .nk-prose ul,
.nk-guide .nk-prose ol {
    margin: 0 0 1.3em;
    padding-inline-start: 0;

    list-style: none;
}

.nk-guide .nk-prose li {
    position: relative;

    margin-block: 0 .55em;
    padding-inline-start: 28px;
}

.nk-guide .nk-prose ul > li::before {
    content: "";

    position: absolute;

    inset-inline-start: 6px;
    inset-block-start:
        calc(var(--nkg-lh) * .5em - 4px);

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--kh-blue);

    box-shadow:
        0 0 0 3px var(--kh-sky);
}


/* Ordered list */

.nk-guide .nk-prose ol {
    counter-reset: nkg;
}

.nk-guide .nk-prose ol > li {
    padding-inline-start: 40px;

    counter-increment: nkg;
}

.nk-guide .nk-prose ol > li::before {
    content: counter(nkg);

    position: absolute;

    inset-inline-start: 0;
    inset-block-start:
        calc(var(--nkg-lh) * .5em - 13px);

    width: 26px;
    height: 26px;

    border-radius: 50%;

    background: var(--kh-sky);
    color: var(--kh-indigo);

    font-size: 13px;
    font-weight: 600;
    line-height: 26px;
    text-align: center;
}


/* ------------------------------------------------------------
   Clamp
   ------------------------------------------------------------ */

.nk-guide .nk-prose.is-clamped {
    position: relative;

    max-height: var(--nkg-clamp, 1200px);

    overflow: hidden;
}

.nk-guide .nk-prose.is-clamped::after {
    content: "";

    position: absolute;

    inset-inline: 0;
    inset-block-end: 0;

    height: 220px;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0),
            #fff 78%
        );

    pointer-events: none;
}

.nk-guide__more {
    display: flex;
    justify-content: center;

    margin: -8px 0 0;
}

.nk-guide__more[hidden] {
    display: none;
}

.nk-guide__more .kh-btn .nk-icon {
    --nk-icon-box: 20px;
    --nk-icon-size: 16px;
}

@media (min-width: 1024px) {

    .nk-guide__more {
        grid-column: 2;

        justify-content: flex-start;
    }

    .nk-guide.nk-guide--no-toc .nk-guide__layout {
        grid-template-columns: minmax(0, var(--nkg-measure));
        justify-content: center;
    }

    .nk-guide.nk-guide--no-toc .nk-guide__more {
        grid-column: 1;
    }

}


/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 767px) {

    .nk-guide {
        --nkg-size: 17px;
        --nkg-lh: 1.6;
    }

    .nk-guide .nk-guide__title {
        font-size: 28px;
    }

    .nk-guide .nk-guide__lead {
        font-size: 18px;
    }

    .nk-guide .nk-prose h2 {
        margin-block: 44px 16px;

        font-size: 24px;
    }

    .nk-guide .nk-prose h3 {
        margin-block: 32px 12px;

        font-size: 20px;
    }

    .nk-guide .nk-prose.is-clamped {
        --nkg-clamp: 1000px;
    }

}


/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {

    .nk-guide .nk-guide__toc summary .nk-toc__chev {
        transition: none;
    }

}


/* ------------------------------------------------------------
   Print
   ------------------------------------------------------------ */

@media print {

    .nk-guide .nk-prose.is-clamped {
        max-height: none;
    }

    .nk-guide .nk-prose.is-clamped::after,
    .nk-guide__more,
    .nk-guide__toc {
        display: none;
    }

}

/* ============================================================
   RTL — Hebrew
   body.lang-he
   ============================================================ */

.lang-he .nk-guide {
    direction: rtl;
}


/* Header */

.lang-he .nk-guide__head {
    text-align: right;
}

.lang-he .nk-guide__head .kh-eyebrow {
    flex-direction: row;
}

.lang-he .nk-guide__head .kh-eyebrow::before {
    margin-left: 0;
    margin-right: 0;
}


/* TOC */

.lang-he .nk-guide .nk-guide__toc summary {
    text-align: right;
}

.lang-he .nk-guide .nk-toc__list {
    border-inline-start: 0;
    border-inline-end: 2px solid var(--kh-mist);
}

.lang-he .nk-guide .nk-toc__list a {
    margin-inline-start: 0;
    margin-inline-end: -2px;

    padding:
        6px
        14px
        6px
        0;

    border-inline-start: 0;
    border-inline-end: 2px solid transparent;

    text-align: right;
}

.lang-he .nk-guide .nk-toc__list li li a {
    padding-inline-start: 0;
    padding-inline-end: 26px;
}

.lang-he .nk-guide .nk-toc__list a.is-active {
    border-inline-start: 0;
    border-inline-end-color: var(--kh-blue);
}


/* Content */

.lang-he .nk-guide .nk-prose {
    direction: rtl;
    text-align: right;
}


/* H2 accent line */

.lang-he .nk-guide .nk-prose h2::before {
    inset-inline-start: auto;
    inset-inline-end: 0;
}

/* Internal link chips */

.lang-he .nk-guide .nk-prose a.nk-go::after {
    transform: scaleX(-1);
}

.lang-he .nk-guide .nk-prose a.nk-go:hover::after {
    transform: scaleX(-1) translateX(2px);
}


/* Callouts */

.lang-he .nk-guide .nk-prose .nk-tip,
.lang-he .nk-guide .nk-prose .nk-note,
.lang-he .nk-guide .nk-prose .nk-warn {
    padding:
        20px
        64px
        20px
        24px;
}

.lang-he .nk-guide .nk-prose .nk-callout__icon {
    inset-inline-start: auto;
    inset-inline-end: 18px;
}


/* Tables */

.lang-he .nk-guide .nk-prose table,
.lang-he .nk-guide .nk-prose th,
.lang-he .nk-guide .nk-prose td,
.lang-he .nk-guide .nk-prose caption {
    text-align: right;
}


/* "Read more" */

.lang-he .nk-guide__more {
    justify-content: flex-start;
}

@media (min-width: 1024px) {
    .lang-he .nk-guide__more {
        justify-content: flex-start;
    }
}


/* Mobile */

@media (max-width: 767px) {

    .lang-he .nk-guide .nk-prose .nk-tip,
    .lang-he .nk-guide .nk-prose .nk-note,
    .lang-he .nk-guide .nk-prose .nk-warn {
        padding:
            18px
            58px
            18px
            18px;
    }

    .lang-he .nk-guide .nk-prose .nk-callout__icon {
        inset-inline-start: auto;
        inset-inline-end: 14px;
    }

}