/* =========================================================
   Nabegheha V2 — reusable Wiki / Guide template
   Scoped to .nb-guide so approved/frozen pages remain untouched.
   ========================================================= */

.nb-guide {
    position: relative;
    min-height: 70vh;
    padding: 34px 0 104px;
    overflow: clip;
    background:
        radial-gradient(circle at 82% 0, rgba(48, 25, 132, .15), transparent 25%),
        radial-gradient(circle at 8% 24%, rgba(12, 162, 28, .055), transparent 21%),
        var(--bg);
}

.nb-guide::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, #000 0, transparent 520px);
}

.nb-guide__reading-progress {
    position: fixed;
    z-index: 1100;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    pointer-events: none;
}

body.admin-bar .nb-guide__reading-progress { top: 32px; }
.nb-guide__reading-progress > span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--purple-bright), var(--green-bright));
    box-shadow: 0 0 18px rgba(118, 87, 232, .55);
}

.nb-guide__container { position: relative; z-index: 1; width: min(calc(100% - 32px), 1240px); }

.nb-guide-breadcrumbs {
    min-height: 30px;
    margin: 0 2px 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    color: #606875;
    font-size: 10px;
}
.nb-guide-breadcrumbs a { color: #87909d; transition: color .18s ease; }
.nb-guide-breadcrumbs a:hover { color: #fff; }
.nb-guide-breadcrumbs [aria-current="page"] { color: #69717d; }

.nb-guide-hero {
    position: relative;
    min-height: 272px;
    padding: clamp(28px, 4.2vw, 52px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    gap: 44px;
    overflow: hidden;
    border: 1px solid #242424;
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0, rgba(118, 87, 232, .12), transparent 34%),
        linear-gradient(145deg, rgba(16,16,16,.98), rgba(8,8,8,.98));
    box-shadow: 0 24px 70px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.025);
}
.nb-guide-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(118,87,232,.5), rgba(12,162,28,.4), transparent);
}
.nb-guide-hero__copy { position: relative; z-index: 2; min-width: 0; }
.nb-guide-hero__eyebrow {
    width: max-content;
    margin-bottom: 14px;
    padding: 6px 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(118,87,232,.22);
    border-radius: 8px;
    background: rgba(48,25,132,.12);
    color: #b6a9ef;
    font-size: 10px;
    font-weight: 750;
}
.nb-guide-hero__eyebrow svg { width: 14px; height: 14px; }
.nb-guide-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: -.8px;
}
.nb-guide-hero__copy > p {
    max-width: 730px;
    margin: 14px 0 0;
    color: #959da9;
    font-size: 13px;
    line-height: 2;
}
.nb-guide-hero__meta {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #6f7783;
    font-size: 10px;
}
.nb-guide-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.nb-guide-hero__meta svg { width: 14px; height: 14px; color: #7c8390; }
.nb-guide-hero__meta b { color: #aab1bc; font-weight: 750; }

.nb-guide-hero__facts {
    margin-top: 19px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nb-guide-hero__facts[hidden] { display: none; }
.nb-guide-fact {
    min-width: 118px;
    padding: 9px 11px;
    display: grid;
    gap: 2px;
    border: 1px solid #252525;
    border-radius: 10px;
    background: rgba(255,255,255,.018);
}
.nb-guide-fact small { color: #646c78; font-size: 8px; }
.nb-guide-fact strong { color: #d9dce2; font-size: 11px; font-weight: 760; }

.nb-guide-hero__actions { margin-top: 21px; display: flex; flex-wrap: wrap; gap: 9px; }
.nb-guide-hero__actions[hidden] { display: none; }
.nb-guide-primary-action {
    min-height: 44px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #7459dc;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b218f, #301984);
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    box-shadow: 0 12px 32px rgba(48,25,132,.2);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.nb-guide-primary-action:hover { transform: translateY(-1px); border-color: #8e75ed; box-shadow: 0 15px 36px rgba(48,25,132,.3); }
.nb-guide-primary-action svg { width: 16px; height: 16px; }

.nb-guide-hero__visual {
    position: relative;
    width: 162px;
    height: 162px;
    display: grid;
    place-items: center;
}
.nb-guide-hero__visual-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(118,87,232,.17);
    border-radius: 50%;
    box-shadow: inset 0 0 48px rgba(48,25,132,.06);
}
.nb-guide-hero__visual-ring::before,
.nb-guide-hero__visual-ring::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.04);
}
.nb-guide-hero__visual-ring::before { inset: 18px; }
.nb-guide-hero__visual-ring::after { inset: 37px; }
.nb-guide-hero__visual-icon {
    position: relative;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(118,87,232,.3);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(48,25,132,.3), rgba(12,162,28,.06));
    color: #9f8bf2;
    box-shadow: 0 14px 50px rgba(48,25,132,.22), inset 0 1px 0 rgba(255,255,255,.05);
}
.nb-guide-hero__visual-icon svg { width: 27px; height: 27px; }
.nb-guide-hero__visual-dot {
    position: absolute;
    left: 18px;
    bottom: 28px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-bright);
    box-shadow: 0 0 20px rgba(18,201,41,.75);
}

.nb-guide-layout {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    direction: ltr;
}
.nb-guide-layout > * { direction: rtl; }
.nb-guide-sidebar { align-self: stretch; min-height: 100%; }
.nb-guide-sidebar__sticky { position: sticky; top: 96px; display: grid; gap: 12px; }
body.admin-bar .nb-guide-sidebar__sticky { top: 128px; }

.nb-guide-toc-card,
.nb-guide-help-card {
    border: 1px solid #222;
    border-radius: 15px;
    background: rgba(12,12,12,.92);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.nb-guide-toc-card { padding: 13px; }
.nb-guide-toc-card__head {
    padding: 5px 4px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid #1e1e1e;
}
.nb-guide-toc-card__head > span {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(118,87,232,.19);
    border-radius: 9px;
    background: rgba(48,25,132,.09);
    color: #927deb;
}
.nb-guide-toc-card__head svg { width: 15px; height: 15px; }
.nb-guide-toc-card__head div { min-width: 0; display: grid; gap: 1px; }
.nb-guide-toc-card__head strong { color: #e7e8eb; font-size: 11px; }
.nb-guide-toc-card__head small { color: #5f6671; font-size: 8px; }

.nb-guide-toc { padding: 9px 0 1px; display: grid; gap: 2px; }
.nb-guide-toc a {
    position: relative;
    min-height: 34px;
    padding: 7px 11px 7px 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-radius: 8px;
    color: #7e8692;
    font-size: 10px;
    line-height: 1.7;
    transition: color .18s ease, background .18s ease;
}
.nb-guide-toc a::before {
    content: "";
    width: 4px;
    height: 4px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #3b3f46;
    transition: background .18s ease, box-shadow .18s ease;
}
.nb-guide-toc a:hover { color: #d9dde4; background: #111; }
.nb-guide-toc a.is-active { color: #fff; background: rgba(48,25,132,.14); }
.nb-guide-toc a.is-active::before { background: var(--purple-bright); box-shadow: 0 0 10px rgba(118,87,232,.6); }
.nb-guide-toc a[data-level="3"] { padding-right: 23px; color: #6b727d; font-size: 9px; }
.nb-guide-toc a[data-level="3"]::before { width: 3px; height: 3px; }

.nb-guide-help-card { padding: 16px; }
.nb-guide-help-card__icon {
    width: 34px;
    height: 34px;
    margin-bottom: 11px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(12,162,28,.2);
    border-radius: 9px;
    background: rgba(12,162,28,.06);
    color: #57ca63;
}
.nb-guide-help-card__icon svg { width: 16px; height: 16px; }
.nb-guide-help-card strong { display: block; color: #d8dbe0; font-size: 11px; }
.nb-guide-help-card p { margin: 7px 0 11px; color: #686f7a; font-size: 9px; line-height: 1.95; }
.nb-guide-help-card a { display: inline-flex; align-items: center; gap: 5px; color: #75d57f; font-size: 9px; font-weight: 800; }
.nb-guide-help-card a svg { width: 12px; height: 12px; }

.nb-guide-mobile-toc { display: none; }

.nb-guide-content {
    min-width: 0;
    padding: clamp(26px, 4vw, 50px);
    border: 1px solid #222;
    border-radius: 18px;
    background: rgba(11,11,11,.94);
    box-shadow: 0 20px 64px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.018);
}
.nb-guide-content > :first-child { margin-top: 0 !important; }
.nb-guide-content > :last-child { margin-bottom: 0 !important; }
.nb-guide-content h1 { display: none; }
.nb-guide-content h2,
.nb-guide-content h3,
.nb-guide-content h4 {
    position: relative;
    scroll-margin-top: 105px;
    color: #f5f5f6 !important;
    background: transparent !important;
    line-height: 1.8;
}
.nb-guide-content h2,
.nb-guide-content h2[style],
.nb-guide-content h2 [style],
.nb-guide-content h3,
.nb-guide-content h3[style],
.nb-guide-content h3 [style],
.nb-guide-content h4,
.nb-guide-content h4[style],
.nb-guide-content h4 [style] {
    color: #f5f5f6 !important;
    background-color: transparent !important;
}
.nb-guide-content h2 {
    margin: 55px 0 19px;
    padding: 0 17px 0 42px;
    border-right: 2px solid var(--purple-bright);
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 900;
}
.nb-guide-content h2::before {
    content: "";
    position: absolute;
    right: -2px;
    top: 8px;
    width: 2px;
    height: 17px;
    background: var(--green-bright);
    box-shadow: 0 0 12px rgba(18,201,41,.35);
}
.nb-guide-content h3 {
    margin: 38px 0 15px;
    font-size: 16px;
    font-weight: 850;
}
.nb-guide-content h4 { margin: 27px 0 12px; font-size: 14px; }
.nb-guide-heading-link {
    position: absolute;
    left: 2px;
    top: .45em;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #4e5560;
    font: 700 12px/1 var(--font-mono);
    opacity: 0;
    transition: opacity .18s ease, color .18s ease, background .18s ease;
}
.nb-guide-content h2:hover .nb-guide-heading-link,
.nb-guide-content h3:hover .nb-guide-heading-link { opacity: 1; }
.nb-guide-heading-link:hover { color: #fff; background: #151515; }

.nb-guide-content p,
.nb-guide-content li {
    color: #aeb4be;
    font-size: 13px;
    line-height: 2.2;
}
.nb-guide-content p { margin: 0 0 18px; text-align: justify !important; text-align-last: right; text-justify: inter-word; }
.nb-guide-content strong { color: #e2e4e8; font-weight: 780; }
.nb-guide-content ul,
.nb-guide-content ol { margin: 16px 0 25px; padding-right: 24px; }
.nb-guide-content li { margin: 6px 0; text-align: justify !important; text-align-last: right; text-justify: inter-word; }
.nb-guide-content li::marker { color: #7765c9; }
.nb-guide-content a {
    color: #a58df8;
    text-decoration: none;
    border-bottom: 1px solid rgba(165,141,248,.3);
    transition: color .18s ease, border-color .18s ease;
}
.nb-guide-content a:hover { color: #c2b4ff; border-color: #a58df8; }
.nb-guide-content mark {
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(247,185,36,.12) !important;
    color: #efc662 !important;
}
.nb-guide-content hr { margin: 40px 0; border: 0; border-top: 1px solid #202020; }

.nb-guide-content blockquote {
    margin: 24px 0;
    padding: 17px 18px;
    border: 1px solid #252525;
    border-right: 3px solid var(--purple-bright);
    border-radius: 10px;
    background: #0d0d0d;
}
.nb-guide-content blockquote p:last-child { margin-bottom: 0; }

.nb-guide-content figure,
.nb-guide-content .wp-block-image {
    width: fit-content;
    max-width: 100%;
    margin: 22px auto 36px;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.nb-guide-content figure img,
.nb-guide-content .wp-block-image img,
.nb-guide-content > p > img {
    width: auto;
    max-width: 100%;
    max-height: 760px;
    margin-inline: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: none;
    transform: none;
    cursor: default;
    display: block;
}
.nb-guide-content figcaption {
    margin: 0;
    padding: 8px 12px;
    color: #646c77;
    font-size: 9px;
    text-align: center;
}
.nb-guide-content .wp-block-image a { border: 0; }

.nb-guide-content pre,
.nb-guide-content .wp-block-code {
    position: relative;
    margin: 22px 0;
    padding: 21px 20px;
    overflow: auto;
    border: 1px solid #262626;
    border-radius: 12px;
    background: #060606;
    color: #d7dde7;
    direction: ltr;
    text-align: left;
    font: 500 12px/1.9 var(--font-mono);
}
.nb-guide-content code {
    padding: 2px 5px;
    border: 1px solid #252525;
    border-radius: 5px;
    background: #080808;
    color: #c7baff;
    direction: ltr;
    unicode-bidi: isolate;
    font-family: var(--font-mono);
    font-size: .92em;
}
.nb-guide-content pre code { padding: 0; border: 0; background: transparent; color: inherit; }
.nb-guide-copy-code {
    position: absolute;
    top: 8px;
    right: 8px;
    min-height: 28px;
    padding: 5px 8px;
    border: 1px solid #282828;
    border-radius: 7px;
    background: #101010;
    color: #858d99;
    cursor: pointer;
    font: 700 9px/1 var(--font-sans);
}
.nb-guide-copy-code:hover { color: #fff; border-color: #3a3a3a; }

.nb-guide-content table,
.nb-guide-content .wp-block-table table {
    width: 100%;
    margin: 20px 0 30px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #262626;
    border-radius: 11px;
    background: #080808;
    direction: rtl;
}
.nb-guide-content th,
.nb-guide-content td { padding: 12px 14px; border-bottom: 1px solid #202020; color: #abb1bb; font-size: 11px; text-align: right; }
.nb-guide-content tr:last-child th,
.nb-guide-content tr:last-child td { border-bottom: 0; }
.nb-guide-content th { color: #e0e2e6; background: #0d0d0d; font-weight: 800; }

.nb-guide-content .nb-guide-heading--important,
.nb-guide-content .nb-guide-heading--warning,
.nb-guide-content .nb-guide-heading--troubleshoot,
.nb-guide-content .nb-guide-heading--spec {
    padding: 9px 13px 9px 42px;
    border: 1px solid #272727;
    border-right-width: 3px;
    border-radius: 0;
    background: #0d0d0d !important;
    font-size: 15px;
}
.nb-guide-content .nb-guide-heading--important { border-right-color: #7762dc; }
.nb-guide-content .nb-guide-heading--warning { border-right-color: var(--yellow); color: #f0d390 !important; }
.nb-guide-content .nb-guide-heading--troubleshoot { border-right-color: var(--danger); color: #f0b1b1 !important; }
.nb-guide-content .nb-guide-heading--spec { border-right-color: #5b626e; }
.nb-guide-content .nb-guide-heading--important::before,
.nb-guide-content .nb-guide-heading--warning::before,
.nb-guide-content .nb-guide-heading--troubleshoot::before,
.nb-guide-content .nb-guide-heading--spec::before { display: none; }

.nb-guide-section-separator { margin-top: 48px; }

.nb-guide-lightbox {
    position: fixed;
    z-index: 6000;
    inset: 0;
    padding: 28px;
    display: grid;
    place-items: center;
}
.nb-guide-lightbox[hidden] { display: none !important; }
.nb-guide-lightbox__backdrop { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.88); backdrop-filter: blur(8px); cursor: zoom-out; }
.nb-guide-lightbox__panel { position: relative; z-index: 1; width: min(1180px, 96vw); max-height: 91vh; display: grid; place-items: center; }
.nb-guide-lightbox__panel img { max-width: 100%; max-height: 84vh; border: 1px solid #2b2b2b; border-radius: 12px; background: #080808; box-shadow: 0 35px 100px rgba(0,0,0,.65); }
.nb-guide-lightbox__panel p { margin: 10px 0 0; color: #9ca3ad; font-size: 10px; }
.nb-guide-lightbox__close {
    position: absolute;
    z-index: 2;
    top: -14px;
    left: -14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #353535;
    border-radius: 10px;
    background: #101010;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.nb-guide-lightbox__close svg { width: 17px; height: 17px; }
body.nb-guide-lightbox-open { overflow: hidden; }

@media (max-width: 1040px) {
    .nb-guide { padding-top: 26px; }
    .nb-guide-hero { grid-template-columns: minmax(0, 1fr) 130px; gap: 26px; }
    .nb-guide-hero__visual { width: 124px; height: 124px; }
    .nb-guide-layout { grid-template-columns: 218px minmax(0,1fr); gap: 20px; }
}

@media (max-width: 860px) {
    .nb-guide { padding-bottom: 74px; }
    .nb-guide-hero { min-height: auto; grid-template-columns: 1fr; }
    .nb-guide-hero__visual { display: none; }
    .nb-guide-layout { margin-top: 14px; display: block; }
    .nb-guide-sidebar { display: none; }
    .nb-guide-mobile-toc {
        margin-top: 16px;
        display: block;
        border: 1px solid #222;
        border-radius: 12px;
        background: #0c0c0c;
    }
    .nb-guide-mobile-toc summary {
        min-height: 49px;
        padding: 11px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        color: #c7cbd2;
        cursor: pointer;
        list-style: none;
        font-size: 11px;
        font-weight: 800;
    }
    .nb-guide-mobile-toc summary::-webkit-details-marker { display: none; }
    .nb-guide-mobile-toc summary span { display: inline-flex; align-items: center; gap: 7px; }
    .nb-guide-mobile-toc summary svg { width: 15px; height: 15px; }
    .nb-guide-mobile-toc > summary > svg { color: #737b87; transition: transform .18s ease; }
    .nb-guide-mobile-toc[open] > summary > svg { transform: rotate(180deg); }
    .nb-guide-mobile-toc nav { padding: 0 10px 10px; border-top: 1px solid #1e1e1e; }
    .nb-guide-mobile-toc nav a {
        padding: 9px 7px;
        display: block;
        border-bottom: 1px solid #181818;
        color: #858d98;
        font-size: 10px;
    }
    .nb-guide-mobile-toc nav a:last-child { border-bottom: 0; }
    .nb-guide-mobile-toc nav a.is-active { color: #c0b1fb; }
    .nb-guide-content { padding: clamp(22px, 5vw, 34px); border-radius: 15px; }
}

@media (max-width: 600px) {
    body.admin-bar .nb-guide__reading-progress { top: 46px; }
    .nb-guide { padding: 18px 0 54px; }
    .nb-guide__container { width: min(calc(100% - 22px), 1240px); }
    .nb-guide-breadcrumbs { margin-bottom: 12px; font-size: 9px; }
    .nb-guide-hero { padding: 23px 19px; border-radius: 16px; }
    .nb-guide-hero h1 { font-size: 25px; letter-spacing: -.45px; }
    .nb-guide-hero__copy > p { margin-top: 10px; font-size: 11px; line-height: 1.95; }
    .nb-guide-hero__meta { margin-top: 15px; display: grid; gap: 7px; }
    .nb-guide-hero__facts { display: grid; grid-template-columns: 1fr 1fr; }
    .nb-guide-fact { min-width: 0; }
    .nb-guide-primary-action { width: 100%; justify-content: center; }
    .nb-guide-content { margin-top: 13px; padding: 23px 17px; border-radius: 13px; }
    .nb-guide-content h2 { margin-top: 42px; padding-right: 12px; padding-left: 34px; font-size: 18px; }
    .nb-guide-content h3 { margin-top: 31px; font-size: 15px; }
    .nb-guide-content p,
    .nb-guide-content li { font-size: 12px; line-height: 2.15; }
    .nb-guide-heading-link { opacity: .65; }
    .nb-guide-content figure,
    .nb-guide-content .wp-block-image { margin-inline: auto; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
    .nb-guide-content figure img,
    .nb-guide-content .wp-block-image img { border: 0; border-radius: 0; box-shadow: none; filter: none; }
    .nb-guide-lightbox { padding: 14px; }
    .nb-guide-lightbox__close { top: 8px; left: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .nb-guide *, .nb-guide *::before, .nb-guide *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; }
}


