/* ─────────────────────────────────────────────────────────────────────────────
   NaturesLens — Table of Contents
   All classes namespaced .nl-toc / .nl-toc__* to avoid theme conflicts.
   ───────────────────────────────────────────────────────────────────────────── */

.nl-toc {
    margin: 1.5em 0;
    max-width: 680px;
}

/* ── Outer card ──────────────────────────────────────────────────────────── */

.nl-toc__details {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    overflow: hidden;
}

/* ── Toggle bar (summary) ────────────────────────────────────────────────── */

.nl-toc__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 16px;
    cursor: pointer;
    list-style: none;
    background: #f4f6f0;
    border-bottom: 1px solid transparent;
    user-select: none;
    transition: background .15s;
}

/* Remove default browser disclosure marker */
.nl-toc__summary::-webkit-details-marker { display: none; }
.nl-toc__summary::marker                 { display: none; }

.nl-toc__details[open] .nl-toc__summary {
    border-bottom-color: #e4e7ec;
    background: #e8ecdf;
}

.nl-toc__summary:hover {
    background: #e8ecdf;
}

.nl-toc__title {
    font-size: var(--text-s);
    font-weight: 700;
    color: #3a3f30;
    letter-spacing: .02em;
    text-transform: uppercase;
    flex: 1;
}

.nl-toc__chevron {
    color: #657042;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}

.nl-toc__details[open] .nl-toc__chevron {
    transform: rotate(180deg);
}

/* ── Body (collapsible panel) ────────────────────────────────────────────── */

.nl-toc__body {
    padding: 8px 16px 14px;
    animation: nl-toc-open .18s ease;
}

@keyframes nl-toc-open {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── List ─────────────────────────────────────────────────────────────────── */

.nl-toc__list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: nl-toc-ctr;
}

.nl-toc__item {
    counter-increment: nl-toc-ctr;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f2f4f7;
}

.nl-toc__item:last-child {
    border-bottom: none;
}

/* Sequential number prefix */
.nl-toc__item::before {
    content: counter(nl-toc-ctr) ".";
    font-size: var(--text-s);
    font-weight: 700;
    color: #98a2b3;
    flex-shrink: 0;
    min-width: 1.8em;
    text-align: right;
}

/* ── Indentation for sub-heading levels ──────────────────────────────────── */
/* indent-0 = top level (e.g. h2), indent-1 = h3, indent-2 = h4, etc.       */

.nl-toc__item--indent-0 { padding-left: 0; }
.nl-toc__item--indent-1 { padding-left: 16px; }
.nl-toc__item--indent-2 { padding-left: 32px; }
.nl-toc__item--indent-3 { padding-left: 48px; }

/* ── Links ───────────────────────────────────────────────────────────────── */

.nl-toc__item a {
    font-size: var(--text-s);
    font-weight: 400;
    color: #344054;
    text-decoration: none;
    line-height: 1.5;
    flex: 1;
    transition: color .12s;
}

.nl-toc__item--indent-1 a { font-size: var(--text-s); color: #475467; }
.nl-toc__item--indent-2 a { font-size: var(--text-s); color: #667085; }
.nl-toc__item--indent-3 a { font-size: var(--text-s); color: #98a2b3; }

.nl-toc__item a:hover {
    color: #657042;
}

/* ── Active item (set by JS as user scrolls) ─────────────────────────────── */

.nl-toc__item--active a {
    color: #657042;
    font-weight: 600;
}

.nl-toc__item--active::before {
    color: #657042;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .nl-toc {
        max-width: 100%;
    }

    .nl-toc__item a          { font-size: var(--text-s); }
    .nl-toc__item--indent-1 a { font-size: var(--text-s); }
    .nl-toc__item--indent-2 a,
    .nl-toc__item--indent-3 a { font-size: var(--text-s); }
}

/* ── Sidebar article variant ───────────────────────────────────────────────
   Usage: [nl_toc headings="h2,h3" open="true" class="nl-toc--sidebar"]
   Designed for the right-hand article rail. Keeps the same markup and JS.
   ───────────────────────────────────────────────────────────────────────── */

.nl-toc--sidebar {
    margin: 0;
    max-width: none;
}

.nl-toc--sidebar .nl-toc__details {
    border-color: #dfe3da;
    border-radius: 6px;
    box-shadow: none;
    overflow: clip;
}

.nl-toc--sidebar .nl-toc__summary {
    padding: 14px 16px;
    background: #f7f8f4;
}

.nl-toc--sidebar .nl-toc__details[open] .nl-toc__summary,
.nl-toc--sidebar .nl-toc__summary:hover {
    background: #eef3e8;
}

.nl-toc--sidebar .nl-toc__title {
    font-size: var(--text-s);
    letter-spacing: .08em;
    color: #4f5c3d;
}

.nl-toc--sidebar .nl-toc__body {
    padding: 8px 16px 12px;
}

.nl-toc--sidebar .nl-toc__item {
    position: relative;
    gap: 0;
    padding: 9px 0 9px 22px;
    border-bottom-color: #eef0ea;
}

.nl-toc--sidebar .nl-toc__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 17px;
    width: 6px;
    height: 6px;
    min-width: 0;
    border-radius: 50%;
    background: #c9d1bd;
}

.nl-toc--sidebar .nl-toc__item--active::before {
    background: #657042;
}

.nl-toc--sidebar .nl-toc__item a {
    font-size: var(--text-s);
    font-weight: 650;
    line-height: 1.35;
    color: #3d453a;
}

.nl-toc--sidebar .nl-toc__item--indent-1 {
    padding-left: 34px;
}

.nl-toc--sidebar .nl-toc__item--indent-1::before {
    left: 14px;
}

.nl-toc--sidebar .nl-toc__item--indent-1 a {
    font-size: var(--text-s);
    font-weight: 550;
    color: #687063;
}

@media (max-width: 900px) {
    .nl-toc--sidebar .nl-toc__details {
        border-radius: 6px;
    }
}

/* ── NaturesLens single-post article template support ───────────────────── */

body:is(.single-post, .single-article) .event-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 700px) 320px;
    gap: 32px;
    align-items: end;
    justify-content: center;
    box-sizing: border-box;
    max-width: 1100px;
    margin-inline: auto;
    margin-block-start: 0; /* was 72px - removed 2026-09-03, main#brx-content padding-top already offsets the fixed header, this was a duplicate gap */
    padding: 42px 24px 34px !important;
}

body:is(.single-post, .single-article) .event-hero .fr-intro {
    grid-column: 1;
    align-items: flex-start;
    max-width: 700px;
    text-align: left;
}

body:is(.single-post, .single-article) .event-hero .single-post-4-hero__breadcrumbs {
    display: none !important;
}

body:is(.single-post, .single-article) .event-hero .intro__heading {
    max-width: 700px;
    text-align: left;
}

body:is(.single-post, .single-article) .event-hero .intro__heading.truncate,
body:is(.single-post, .single-article) .event-hero .single-post-4-hero__breadcrumbs.truncate {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

body:is(.single-post, .single-article) .event-hero__media-wrapper {
    grid-column: 2;
    width: 100% !important;
    max-width: 320px !important;
}

body:is(.single-post, .single-article) .event-hero__media {
    margin-bottom: 0 !important;
}

body:is(.single-post, .single-article) .event-hero__media img {
    height: 250px;
    object-fit: cover;
}

body:is(.single-post, .single-article) .single-post-4 {
    display: grid !important;
    grid-template-columns: minmax(0, 700px) 320px;
    gap: 32px;
    align-items: start;
    justify-content: center;
    box-sizing: border-box;
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 24px;
}

body:is(.single-post, .single-article) .single-post-4__container {
    grid-column: 1;
    grid-row: 1;
    width: 100% !important;
    max-width: 700px !important;
    margin-inline: 0 !important;
}

body:is(.single-post, .single-article) .single-post-4__divider.vertical {
    display: none !important;
}

body:is(.single-post, .single-article) .single-post-4__container .faq-block {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    padding-right: clamp(32px, 4vw, 56px);
}

body:is(.single-post, .single-article) .single-post-4__container .faq-item {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
}

body:is(.single-post, .single-article) .single-post-4__container .faq-item .faq-question,
body:is(.single-post, .single-article) .single-post-4__container .faq-item .faq-answer {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
    box-sizing: border-box;
}

body:is(.single-post, .single-article) .nl-article-sidebar-slot {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    align-self: start;
    position: sticky;
    top: 142px;
}

body:is(.single-post, .single-article) .nl-article-sidebar {
    display: grid;
    gap: 16px;
}

body:is(.single-post, .single-article) .nl-article-side-panel {
    background: #fff;
    border: 1px solid #dfe3da;
    border-radius: 6px;
    padding: 18px;
}

body:is(.single-post, .single-article) .nl-article-side-panel h3 {
    margin: 0 0 10px;
    color: #151914;
    font-size: var(--text-m);
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0;
}

body:is(.single-post, .single-article) .nl-article-side-panel p {
    margin: 0;
    color: #666e61;
    font-size: var(--text-s);
    line-height: 1.55;
}

body:is(.single-post, .single-article) .nl-article-side-panel p a {
    color: #59683d;
    font-weight: 700;
    text-decoration: none;
}

body:is(.single-post, .single-article) .nl-article-author__row {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
}

body:is(.single-post, .single-article) .nl-article-author__avatar,
body:is(.single-post, .single-article) .nl-article-related__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef3e8;
    color: #59683d;
    font-weight: 800;
}

body:is(.single-post, .single-article) .nl-article-author__avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    font-size: var(--text-m);
}

body:is(.single-post, .single-article) .nl-article-trip {
    padding: 0;
    overflow: hidden;
}

body:is(.single-post, .single-article) .nl-article-trip__image {
    display: block;
    background: #f5f7f1;
}

body:is(.single-post, .single-article) .nl-article-trip__image img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
}

body:is(.single-post, .single-article) .nl-article-trip__body {
    padding: 18px;
}

body:is(.single-post, .single-article) .nl-article-kicker {
    display: block;
    margin-bottom: 8px;
    color: #59683d;
    font-size: var(--text-s);
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body:is(.single-post, .single-article) .nl-article-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 14px;
    padding: 0 15px;
    background: #8a9a5b;
    border: 1px solid #8a9a5b;
    color: #fff;
    font-size: var(--text-s);
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

body:is(.single-post, .single-article) .nl-article-button--secondary {
    background: #fff;
    color: #59683d;
}

body:is(.single-post, .single-article) .nl-article-related__list {
    display: grid;
    gap: 11px;
}

body:is(.single-post, .single-article) .nl-article-related__item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 11px;
    align-items: center;
    padding-top: 11px;
    border-top: 1px solid #dfe3da;
    color: #151914;
    text-decoration: none;
}

body:is(.single-post, .single-article) .nl-article-related__item:first-child {
    padding-top: 0;
    border-top: 0;
}

body:is(.single-post, .single-article) .nl-article-related__item img,
body:is(.single-post, .single-article) .nl-article-related__placeholder {
    width: 72px;
    height: 56px;
    object-fit: cover;
}

body:is(.single-post, .single-article) .nl-article-related__item b {
    font-size: var(--text-s);
    line-height: 1.25;
    text-transform: uppercase;
}

body:is(.single-post, .single-article) .nl-article-hero-brief-slot:empty {
    display: none !important;
}

body:is(.single-post, .single-article) .nl-article-brief {
    width: 100%;
    padding: 18px;
    background: #fff;
    border: 1px solid #dfe3da;
    border-radius: 6px;
}

body:is(.single-post, .single-article) .nl-article-brief strong {
    display: block;
    margin-bottom: 12px;
    color: #151914;
    text-transform: uppercase;
}

body:is(.single-post, .single-article) .nl-article-brief dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

body:is(.single-post, .single-article) .nl-article-brief div {
    padding-top: 10px;
    border-top: 1px solid #dfe3da;
}

body:is(.single-post, .single-article) .nl-article-brief div:first-child {
    padding-top: 0;
    border-top: 0;
}

body:is(.single-post, .single-article) .nl-article-brief dt {
    color: #59683d;
    font-size: var(--text-s);
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

body:is(.single-post, .single-article) .nl-article-brief dd {
    margin: 2px 0 0;
    color: #666e61;
    font-size: var(--text-s);
    line-height: 1.45;
}

@media (max-width: 980px) {
    body:is(.single-post, .single-article) .event-hero {
        grid-template-columns: minmax(0, 780px);
        align-items: start;
    }

    body:is(.single-post, .single-article) .event-hero .fr-intro,
    body:is(.single-post, .single-article) .event-hero__media-wrapper {
        grid-column: 1;
        max-width: 780px !important;
        width: 100% !important;
        margin-inline: auto;
    }

    body:is(.single-post, .single-article) .single-post-4 {
        grid-template-columns: minmax(0, 780px);
    }

    body:is(.single-post, .single-article) .single-post-4__container {
        grid-column: 1;
        grid-row: 2;
        margin-inline: auto !important;
    }

    body:is(.single-post, .single-article) .nl-article-sidebar-slot {
        grid-column: 1;
        grid-row: 1;
        position: static;
        max-width: 780px;
        margin-inline: auto;
    }
}

@media (max-width: 680px) {
    body:is(.single-post, .single-article) .event-hero {
        gap: 24px;
        margin-block-start: 0; /* was 36px - removed 2026-09-03, duplicate gap under fixed header on mobile */
        padding: 30px 14px !important;
    }

    body:is(.single-post, .single-article) .event-hero__media img {
        height: 185px;
    }

    body:is(.single-post, .single-article) .single-post-4 {
        gap: 28px;
        padding-inline: 14px;
    }

    body:is(.single-post, .single-article) .single-post-4__container .faq-block {
        padding-right: 0;
    }

    body:is(.single-post, .single-article) .single-post-4__container .faq-item .faq-question,
    body:is(.single-post, .single-article) .single-post-4__container .faq-item .faq-answer {
        padding-left: 0;
        padding-right: 0;
    }
}
