.page-editorial {
    --ed-bg: #f7f4ef;
    --ed-bg-2: #fffdf9;
    --ed-ink: #2a2622;
    --ed-muted: rgba(42, 38, 34, 0.68);
    --ed-line: rgba(42, 38, 34, 0.12);
    --ed-amber: #c47a2c;
    --ed-card: rgba(255, 255, 255, 0.78);
    background: var(--ed-bg);
    color: var(--ed-ink);
}

html[data-theme="dark"] .page-editorial {
    --ed-bg: #0c0d0c;
    --ed-bg-2: #141614;
    --ed-ink: #f3eee6;
    --ed-muted: rgba(243, 238, 230, 0.72);
    --ed-line: rgba(243, 238, 230, 0.12);
    --ed-amber: #e8942a;
    --ed-card: rgba(255, 255, 255, 0.045);
}

.page-editorial .site-main--editorial {
    padding: 0;
    overflow: visible;
}

.ed {
    max-width: 100%;
}

html[lang="fa"] .ed {
    font-family: "Vazirmatn", sans-serif;
}

html[lang="fa"] .ed :is(h1, h2, h3) {
    font-family: "Markazi Text", "Vazirmatn", serif;
    letter-spacing: 0;
    text-transform: none;
}

.ed-wrap {
    width: min(1120px, calc(100% - 48px));
    margin-inline: auto;
}

.ed-kicker {
    margin: 0 0 12px;
    color: var(--ed-amber);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ed-num {
    display: block;
    margin-bottom: 10px;
    color: var(--ed-amber);
    font-size: 12px;
    letter-spacing: 0.14em;
    direction: ltr;
    unicode-bidi: isolate;
}

.ed-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(560px, 78vh, 820px);
    display: flex;
    align-items: flex-end;
    padding: calc(120px + env(safe-area-inset-top, 0px)) 0 56px;
    background: #12100e;
    color: #f6f1ea;
}

.ed-hero__bg,
.ed-hero__shade {
    position: absolute;
    inset: 0;
}

.ed-hero__bg {
    background: #1a1816 var(--ed-hero) center 42% / cover no-repeat;
    transform: scale(1.04);
    transform-origin: center;
}

.ed-hero__shade {
    background:
        linear-gradient(180deg, rgba(8, 7, 6, 0.28) 0%, rgba(8, 7, 6, 0.05) 36%, rgba(8, 7, 6, 0.82) 100%),
        linear-gradient(90deg, rgba(8, 7, 6, 0.78) 0%, rgba(8, 7, 6, 0.42) 42%, rgba(8, 7, 6, 0.05) 72%);
}

html[dir="rtl"] .ed-hero__shade {
    background:
        linear-gradient(180deg, rgba(8, 7, 6, 0.28) 0%, rgba(8, 7, 6, 0.05) 36%, rgba(8, 7, 6, 0.84) 100%),
        linear-gradient(270deg, rgba(8, 7, 6, 0.82) 0%, rgba(8, 7, 6, 0.46) 46%, rgba(8, 7, 6, 0.05) 74%);
}

.ed-hero__inner {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 48px));
    max-width: none;
    margin-inline: auto;
}

.ed-hero__panel {
    max-width: 40rem;
}

.ed-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(246, 241, 234, 0.74);
    font-size: 13px;
}

.ed-crumbs a {
    color: inherit;
    text-decoration: none;
}

.ed-hero__title,
.ed-story h2,
.ed-section-title,
.ed-notes h2,
.ed-cta h2,
.ed-point h3,
.ed-item h3 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 500;
    letter-spacing: 0;
}

.ed-hero__title {
    margin: 0;
    max-width: 12ch;
    color: #f7f2ea;
    font-size: clamp(3rem, 6vw, 5.2rem);
    line-height: 1.02;
    text-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.ed-hero__lead {
    max-width: 36rem;
    margin: 16px 0 0;
    color: rgba(246, 241, 234, 0.88);
    font-size: 1.08rem;
    line-height: 1.75;
}

.ed-story,
.ed-points,
.ed-notes,
.ed-items {
    padding: 88px 0;
}

.ed-story,
.ed-notes,
.ed-cta {
    background: var(--ed-bg);
}

.ed-points,
.ed-items {
    background: var(--ed-bg-2);
}

.ed-story__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 56px;
    align-items: center;
}

.ed-story__copy,
.ed-notes__inner,
.ed-item__body,
.ed-point,
.ed-prose {
    min-width: 0;
}

.ed-story h2,
.ed-section-title,
.ed-notes h2,
.ed-cta h2 {
    margin: 0 0 18px;
    font-size: clamp(2.1rem, 4vw, 3.4rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.ed-prose p,
.ed-point p,
.ed-item p,
.ed-cta p {
    margin: 0 0 14px;
    color: var(--ed-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    overflow-wrap: break-word;
}

.ed-prose p:last-child,
.ed-point p:last-child,
.ed-item p:last-child {
    margin-bottom: 0;
}

.ed-story__figure {
    margin: 0;
    min-width: 0;
}

.ed-story__figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: min(640px, 72vh);
    object-fit: cover;
    border-radius: 28px;
}

.ed-points__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.ed-point,
.ed-item {
    padding: 22px 20px;
    border: 1px solid var(--ed-line);
    border-radius: 22px;
    background: var(--ed-card);
    box-sizing: border-box;
}

.ed-point h3,
.ed-item h3 {
    margin: 0 0 8px;
    font-size: 1.55rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.ed-item h3 a {
    color: inherit;
    text-decoration: none;
}

.ed-notes__inner {
    max-width: 760px;
}

.ed-items__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.ed-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.ed-item .ed-num {
    margin-top: 8px;
}

.ed-cta {
    padding: 8px 0 88px;
}

.ed-cta__inner {
    box-sizing: border-box;
    padding: 48px 40px;
    border-radius: 32px;
    background:
        radial-gradient(900px 220px at 0% 0%, rgba(232, 148, 42, 0.2), transparent 60%),
        #161311;
    color: #f6f1ea;
}

html[dir="rtl"] .ed-cta__inner {
    background:
        radial-gradient(900px 220px at 100% 0%, rgba(232, 148, 42, 0.2), transparent 60%),
        #161311;
}

.ed-cta p {
    max-width: 38rem;
    color: rgba(246, 241, 234, 0.76);
}

.ed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 8px;
    padding: 0 22px;
    border-radius: 999px;
    background: #e8942a;
    color: #1a1208;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 1024px) {
    .ed-points > .ed-wrap,
    .ed-items > .ed-wrap {
        width: 100%;
        max-width: none;
    }

    .ed-points > .ed-wrap > .ed-section-title,
    .ed-items > .ed-wrap > .ed-section-title {
        width: min(1120px, calc(100% - 32px));
        margin-inline: auto;
    }

    .ed-points__grid,
    .ed-items__list {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        grid-template-columns: none;
        gap: 12px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 4px 16px 18px;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
        overflow-y: clip;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
    }

    .ed-points__grid::-webkit-scrollbar,
    .ed-items__list::-webkit-scrollbar {
        display: none;
    }

    .ed-point,
    .ed-item {
        flex: 0 0 min(78vw, 300px);
        width: min(78vw, 300px);
        max-width: min(78vw, 300px);
        min-width: 0;
        scroll-snap-align: start;
    }

    .ed-item {
        display: flex;
        flex-direction: column;
        gap: 0;
        grid-template-columns: none;
    }

    .ed-item .ed-num {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .ed-wrap,
    .ed-hero__inner {
        width: min(1120px, calc(100% - 32px));
    }

    .ed-hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-end;
        min-height: 100svh;
        min-height: 100dvh;
        padding: 0 0 84px;
        box-sizing: border-box;
        background: var(--ed-bg);
        color: var(--ed-ink);
    }

    .ed-hero__bg {
        position: relative;
        inset: auto;
        flex: 1 1 auto;
        height: auto;
        min-height: 240px;
        transform: none;
        background-position: center 42%;
        border-radius: 0 0 28px 28px;
    }

    .ed-hero__bg::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background:
            linear-gradient(180deg, rgba(8, 7, 6, 0.45) 0%, rgba(8, 7, 6, 0.05) 32%, transparent 58%),
            linear-gradient(180deg, transparent 72%, rgba(8, 7, 6, 0.18) 100%);
        pointer-events: none;
    }

    .ed-hero__shade {
        display: none;
    }

    .ed-hero__inner {
        position: relative;
        z-index: 1;
        margin-top: -28px;
    }

    .ed-hero__panel {
        max-width: none;
        padding: 20px 18px 18px;
        border: 1px solid var(--ed-line);
        border-radius: 22px;
        background: var(--ed-bg-2);
        color: var(--ed-ink);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
    }

    .ed-hero__title {
        max-width: none;
        color: var(--ed-ink);
        font-size: clamp(2.2rem, 9vw, 3rem);
        line-height: 1.2;
        text-shadow: none;
    }

    html[lang="fa"] .ed-hero__title {
        line-height: 1.3;
    }

    .ed-crumbs,
    .ed-hero__lead {
        color: var(--ed-muted);
    }

    .ed-crumbs a {
        color: var(--ed-ink);
    }

    .ed-hero__lead {
        font-size: 0.98rem;
        line-height: 1.75;
    }

    .ed-story,
    .ed-points,
    .ed-notes,
    .ed-items {
        padding: 48px 0;
    }

    .ed-story__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .ed-story__figure img {
        height: 240px;
        border-radius: 20px;
    }

    .ed-section-title,
    .ed-story h2,
    .ed-notes h2,
    .ed-cta h2 {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }

    .ed-cta {
        padding: 8px 0 48px;
    }

    .ed-cta__inner {
        padding: 28px 18px;
        border-radius: 22px;
    }

    .ed-btn {
        width: 100%;
    }
}
