/* =========================================================
   REAL RECIPES HUB — DYNAMIC SINGLE POST
   All selectors are scoped to avoid conflicts with blocks
   or page-builder HTML inside post content.
========================================================= */

#rrh-single-post,
#rrh-single-post * {
    box-sizing: border-box;
}

#rrh-single-post {
    --rrh-bg: #fbfbf8;
    --rrh-white: #ffffff;
    --rrh-surface: #f3f4ef;
    --rrh-text: #1d2421;
    --rrh-muted: #6f7772;
    --rrh-soft-muted: #959d98;
    --rrh-green: #315f4e;
    --rrh-green-dark: #24483b;
    --rrh-green-light: #e8f0eb;
    --rrh-orange: #c76f4c;
    --rrh-cream: #f4ecdf;
    --rrh-border: #e1e5df;
    --rrh-container: 1160px;
    --rrh-hero-container: 980px;
    --rrh-article: 820px;
    --rrh-shadow: 0 22px 55px rgba(24, 38, 30, .07);

    overflow: hidden;
    background: var(--rrh-bg);
    color: var(--rrh-text);
    font-family: "DM Sans", sans-serif;
    font-weight: 300;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

.rrh-single-container {
    width: min(92%, var(--rrh-container));
    margin-inline: auto;
}

/* =========================================================
   HERO — ONLY META, TITLE, FEATURED IMAGE
========================================================= */

.rrh-single-hero {
    padding: 52px 0 60px;
    background:
        radial-gradient(circle at 8% 10%, rgba(214,231,219,.78), transparent 30%),
        radial-gradient(circle at 94% 82%, rgba(244,226,211,.72), transparent 31%),
        var(--rrh-bg);
}

.rrh-single-hero__container {
    max-width: var(--rrh-hero-container);
}

.rrh-single-hero__grid {
    display: grid;
    grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr);
    gap: 42px;
    align-items: center;
}

.rrh-single-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
}

.rrh-single-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border: 1px solid #dce5df;
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: var(--rrh-green);
    font-size: 10px;
}

.rrh-single-meta-pill__label {
    color: var(--rrh-soft-muted);
}

.rrh-single-meta-pill strong {
    color: var(--rrh-green-dark);
    font-weight: 500;
}

.rrh-single-hero__title {
    max-width: 610px;
    margin: 0;
    font-family: "DM Serif Display", serif;
    font-size: clamp(44px, 5vw, 66px);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -.045em;
    color: var(--rrh-text);
}

.rrh-single-hero__image {
    margin: 0;
    padding: 9px;
    border: 1px solid var(--rrh-border);
    border-radius: 30px;
    background: rgba(255,255,255,.95);
    box-shadow: var(--rrh-shadow);
}

.rrh-single-hero__img {
    display: block;
    width: 100%;
    height: 390px;
    object-fit: cover;
    border-radius: 22px;
}

/* =========================================================
   CONTENT
========================================================= */

.rrh-single-content-wrap {
    padding: 78px 0 95px;
}

.rrh-single-content-shell {
    max-width: var(--rrh-article);
}

.rrh-single-article {
    min-width: 0;
}

/* Scope only direct/common article typography. Custom HTML blocks
   keep their own inner structure and are not wrapped or restyled globally. */
.rrh-single-article > p,
.rrh-single-article > ul,
.rrh-single-article > ol,
.rrh-single-article > blockquote {
    color: #59635e;
    font-size: 15px;
    line-height: 1.9;
}

.rrh-single-article > p {
    margin: 0 0 22px;
}


.rrh-single-article > h1 {
    scroll-margin-top: 28px;
    margin: 58px 0 18px;
    font-family: "DM Serif Display", serif;
    font-size: clamp(38px, 4.2vw, 52px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -.025em;
    color: var(--rrh-text);
}

.rrh-single-article > h2 {
    scroll-margin-top: 28px;
    margin: 58px 0 18px;
    font-family: "DM Serif Display", serif;
    font-size: clamp(32px, 3.6vw, 44px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.02em;
    color: var(--rrh-text);
}

.rrh-single-article > h3 {
    margin: 34px 0 12px;
    font-family: "DM Serif Display", serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--rrh-text);
}

.rrh-single-article > ul,
.rrh-single-article > ol {
    margin: 18px 0 26px;
    padding-left: 22px;
}

.rrh-single-article li {
    margin-bottom: 8px;
}

.rrh-single-article img {
    max-width: 100%;
    height: auto;
}

.rrh-single-article figure {
    max-width: 100%;
}

/* =========================================================
   FOLDED HIERARCHICAL TOC
   - Closed by default
   - H1/H2/H3 labels are visible
   - Inserted outside any custom block containing the first H2
========================================================= */

.rrh-inline-toc {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 38px 0 46px;
    border: 1px solid var(--rrh-border);
    border-radius: 22px;
    background:
        radial-gradient(circle at 96% 0%, rgba(232,240,235,.92), transparent 34%),
        var(--rrh-white);
    box-shadow: 0 16px 45px rgba(24,38,30,.045);
    clear: both;
    isolation: isolate;
    overflow: clip;
}

.rrh-inline-toc > summary {
    list-style: none;
}

.rrh-inline-toc > summary::-webkit-details-marker {
    display: none;
}

.rrh-inline-toc__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 92px;
    padding: 20px 23px;
    cursor: pointer;
    user-select: none;
    outline: none;
}

.rrh-inline-toc__summary:focus-visible {
    box-shadow: inset 0 0 0 2px var(--rrh-green);
}

.rrh-inline-toc__summary-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.rrh-inline-toc__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--rrh-orange);
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .11em;
}

.rrh-inline-toc__eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: currentColor;
}

.rrh-inline-toc__title {
    color: var(--rrh-text);
    font-family: "DM Serif Display", serif;
    font-size: clamp(24px, 3vw, 31px);
    font-weight: 400;
    line-height: 1.08;
}

.rrh-inline-toc__hint {
    margin-top: 5px;
    color: var(--rrh-soft-muted);
    font-size: 9px;
    line-height: 1.4;
}

.rrh-inline-toc__summary-side {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.rrh-inline-toc__count {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--rrh-green-light);
    color: var(--rrh-green);
    font-size: 9px;
    font-weight: 500;
}

.rrh-inline-toc__toggle-text {
    min-width: 34px;
    color: var(--rrh-green);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.rrh-inline-toc__close-label {
    display: none;
}

.rrh-inline-toc[open] .rrh-inline-toc__open-label {
    display: none;
}

.rrh-inline-toc[open] .rrh-inline-toc__close-label {
    display: inline;
}

.rrh-inline-toc__chevron {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid #dce5df;
    border-radius: 10px;
    background: rgba(255,255,255,.82);
    color: var(--rrh-green);
    font-size: 18px;
    line-height: 1;
    transition: transform .22s ease, background .22s ease;
}

.rrh-inline-toc[open] .rrh-inline-toc__chevron {
    transform: rotate(180deg);
    background: var(--rrh-green-light);
}

.rrh-inline-toc__panel {
    padding: 0 23px 23px;
    border-top: 1px solid #edf0ec;
}

.rrh-inline-toc__links {
    display: grid;
    gap: 7px;
    padding-top: 17px;
}

.rrh-inline-toc__link {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    min-height: 50px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--rrh-text) !important;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.rrh-inline-toc__link:hover,
.rrh-inline-toc__link.is-active {
    border-color: #dce5df;
    background: rgba(232,240,235,.52);
    transform: translateX(2px);
}

.rrh-inline-toc__level {
    width: 38px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--rrh-green-light);
    color: var(--rrh-green);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .04em;
}

.rrh-inline-toc__label {
    min-width: 0;
    color: #4f5a54;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 500;
}

.rrh-inline-toc__arrow {
    color: var(--rrh-orange);
    font-size: 12px;
}

/* Visual hierarchy: H1 root, H2 sections, H3 sub-sections. */
.rrh-inline-toc__link--h1 {
    background: rgba(244,236,223,.48);
}

.rrh-inline-toc__link--h1 .rrh-inline-toc__level {
    background: var(--rrh-cream);
    color: #8a5d46;
}

.rrh-inline-toc__link--h1 .rrh-inline-toc__label {
    color: var(--rrh-text);
    font-weight: 600;
}

.rrh-inline-toc__link--h2 {
    margin-left: 16px;
}

.rrh-inline-toc__link--h3 {
    margin-left: 42px;
}

.rrh-inline-toc__link--h3 .rrh-inline-toc__level {
    background: #f2f3ef;
    color: #7b837e;
}

.rrh-inline-toc__link--h3 .rrh-inline-toc__label {
    font-size: 10px;
    font-weight: 400;
}

/* =========================================================
   AUTHOR PROFILE BOX — DYNAMIC
========================================================= */

.rrh-author-box {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 28px;
    align-items: center;
    margin-top: 76px;
    padding: 32px;
    border: 1px solid var(--rrh-border);
    border-radius: 26px;
    background:
        radial-gradient(circle at 100% 0%, rgba(244,236,223,.9), transparent 34%),
        var(--rrh-white);
    box-shadow: 0 18px 48px rgba(24,38,30,.05);
}

.rrh-author-box__avatar {
    width: 120px;
    height: 120px;
    padding: 6px;
    border: 1px solid var(--rrh-border);
    border-radius: 24px;
    background: #fff;
}

.rrh-author-box__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.rrh-author-box__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--rrh-orange);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .11em;
}

.rrh-author-box__eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: currentColor;
}

.rrh-author-box__name {
    margin: 0 0 8px;
    font-family: "DM Serif Display", serif;
    font-size: 31px;
    font-weight: 400;
    line-height: 1.08;
    color: var(--rrh-text);
}

.rrh-author-box__bio {
    max-width: 580px;
    margin: 0 0 17px;
    color: var(--rrh-muted);
    font-size: 12px;
    line-height: 1.75;
}

.rrh-author-box__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.rrh-author-box__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 11px;
    background: var(--rrh-green);
    color: #fff !important;
    font-size: 10px;
    font-weight: 500;
}

.rrh-author-box__button:hover {
    background: var(--rrh-green-dark);
}

.rrh-author-box__link {
    color: var(--rrh-green) !important;
    font-size: 10px;
    font-weight: 500;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
    .rrh-single-hero__container {
        max-width: 760px;
    }

    .rrh-single-hero__grid {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .rrh-single-hero__img {
        height: 420px;
    }
}

@media (max-width: 680px) {
    .rrh-single-hero {
        padding: 38px 0 46px;
    }

    .rrh-single-hero__title {
        font-size: clamp(44px, 14vw, 64px);
    }

    .rrh-single-hero__img {
        height: 320px;
    }

    .rrh-single-content-wrap {
        padding: 58px 0 72px;
    }

    .rrh-inline-toc {
        margin: 34px 0 42px;
    }

    .rrh-inline-toc__summary {
        align-items: flex-start;
        padding: 18px;
    }

    .rrh-inline-toc__summary-side {
        gap: 6px;
    }

    .rrh-inline-toc__count {
        display: none;
    }

    .rrh-inline-toc__panel {
        padding: 0 14px 17px;
    }

    .rrh-inline-toc__link--h2 {
        margin-left: 8px;
    }

    .rrh-inline-toc__link--h3 {
        margin-left: 22px;
    }

    .rrh-author-box {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .rrh-author-box__avatar {
        width: 94px;
        height: 94px;
    }
}
