/* ════════════════════════════════════════════════════════════
   EBS — single-post tokens (scoped to .ebs-page / .ebs-article)
   ════════════════════════════════════════════════════════════ */
.ebs-page {
    --ebs-pink:      #e8347a;
    --ebs-pink-2:    #f472b6;
    --ebs-pink-deep: #b91c5c;
    --ebs-peach:     #cda07f;
    --ebs-cream:     #f5f4f0;
    --ebs-paper:     #fafaf7;
    --ebs-ink:       #18181b;
    --ebs-mute:      rgba(24, 24, 27, 0.62);
    --ebs-soft:      rgba(24, 24, 27, 0.45);
    --ebs-line:      rgba(24, 24, 27, 0.10);
    --ebs-line-soft: rgba(24, 24, 27, 0.06);

    background: var(--ebs-paper);
    color: var(--ebs-ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

.ebs-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.ebs-shell-narrow { max-width: 760px; }
@media (min-width: 768px)  { .ebs-shell { padding: 0 48px; } }
@media (min-width: 1024px) { .ebs-shell { padding: 0 64px; } }

/* ─── Reading-progress bar (top of viewport) ─── */
.ebs-progress {
    position: fixed; top: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(24, 24, 27, 0.06);
    z-index: 200;
    pointer-events: none;
}
.ebs-progress > span {
    display: block; height: 100%;
    background: linear-gradient(90deg, var(--ebs-pink, #e8347a), var(--ebs-pink-2, #f472b6));
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform .08s linear;
}

/* ════════════════════════════════════════════════════════════
   1. HEAD
   ════════════════════════════════════════════════════════════ */
.ebs-head { padding: 110px 0 36px; }
@media (min-width: 1024px) { .ebs-head { padding: 130px 0 40px; } }

.ebs-eyebrow {
    display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 12px; font-weight: 600;
    color: var(--ebs-mute);
    margin-bottom: 20px;
}
.ebs-cat-pill {
    background: rgba(232, 52, 122, 0.1);
    color: var(--ebs-pink-deep);
    border: 1px solid rgba(232, 52, 122, 0.22);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    text-decoration: none;
    transition: background .18s, color .18s;
}
.ebs-cat-pill:hover { background: var(--ebs-pink); color: #fff; }
.ebs-dot { color: var(--ebs-line); }
.ebs-date, .ebs-mins { font-variant-numeric: tabular-nums; }

.ebs-title {
    margin: 0 0 18px;
    font-size: clamp(36px, 5.4vw, 64px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--ebs-ink);
}
.ebs-title em {
    font-style: italic;
    font-weight: 500;
    font-family: "PlayfairDisplay", "Times New Roman", serif;
    background: linear-gradient(110deg, var(--ebs-pink) 0%, var(--ebs-pink-2) 50%, var(--ebs-pink) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: ebsShine 8s ease-in-out infinite;
}
@keyframes ebsShine {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.ebs-deck {
    margin: 0 0 32px;
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.55;
    color: var(--ebs-mute);
    font-weight: 300;
    max-width: 640px;
}

/* ════════════════════════════════════════════════════════════
   2. HERO IMAGE
   ════════════════════════════════════════════════════════════ */
.ebs-hero-img { margin: 0 0 56px; }
.ebs-hero-img-frame {
    border-radius: 26px;
    overflow: hidden;
    aspect-ratio: 16 / 8;
    box-shadow: 0 30px 80px -36px rgba(232, 52, 122, 0.25), 0 12px 32px -16px rgba(24, 24, 27, 0.10);
    background: linear-gradient(135deg, var(--ebs-pink) 0%, var(--ebs-peach) 100%);
}
.ebs-hero-img-frame img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

/* ════════════════════════════════════════════════════════════
   3. BODY (TOC + content)
   ════════════════════════════════════════════════════════════ */
.ebs-body { padding-bottom: 60px; }
.ebs-body-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 1080px;
    margin: 0 auto;
}
@media (min-width: 1100px) {
    .ebs-body-grid {
        grid-template-columns: 220px minmax(0, 720px);
        gap: 64px;
        align-items: start;
    }
}

.ebs-toc {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 18px 18px 18px 0;
    border-left: 1px solid var(--ebs-line);
    padding-left: 18px;
    font-size: 13px;
}
@media (max-width: 1099px) { .ebs-toc { display: none; } }
.ebs-toc-label {
    display: block;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--ebs-soft);
    margin-bottom: 14px;
}
.ebs-toc-list {
    list-style: none; margin: 0; padding: 0;
    counter-reset: ebs-toc;
}
.ebs-toc-list li {
    counter-increment: ebs-toc;
    margin: 0 0 6px;
}
.ebs-toc-list a {
    display: block;
    padding: 6px 0 6px 24px;
    color: var(--ebs-mute);
    text-decoration: none;
    line-height: 1.4;
    font-size: 13px;
    border-left: 2px solid transparent;
    margin-left: -20px; padding-left: 20px;
    transition: color .18s, border-color .18s;
    position: relative;
}
.ebs-toc-list a::before {
    content: counter(ebs-toc, decimal-leading-zero);
    position: absolute;
    left: 20px;
    top: 6px;
    font-size: 10px;
    color: var(--ebs-soft);
    font-variant-numeric: tabular-nums;
    opacity: 0.6;
    display: none;
}
.ebs-toc-list a:hover { color: var(--ebs-ink); }
.ebs-toc-list a.is-active {
    color: var(--ebs-pink-deep);
    border-left-color: var(--ebs-pink);
    font-weight: 600;
}

/* ─── Prose ─── */
.ebs-content {
    color: var(--ebs-ink);
    font-size: 17px;
    line-height: 1.75;
    font-weight: 400;
}
@media (min-width: 768px) { .ebs-content { font-size: 18px; } }

.ebs-content > p:first-of-type::first-letter {
    font-family: "PlayfairDisplay", "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 4.4em;
    line-height: 0.85;
    float: left;
    padding: 4px 14px 0 0;
    background: linear-gradient(135deg, var(--ebs-pink) 0%, var(--ebs-pink-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ebs-content p { margin: 0 0 24px; }
.ebs-content h2 {
    margin: 56px 0 18px;
    font-size: clamp(24px, 2.8vw, 32px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ebs-ink);
    scroll-margin-top: 90px;
}
.ebs-content h3 {
    margin: 36px 0 14px;
    font-size: clamp(19px, 1.8vw, 22px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--ebs-ink);
    scroll-margin-top: 90px;
}
.ebs-content h4 {
    margin: 28px 0 10px;
    font-size: 17px; font-weight: 600;
    color: var(--ebs-ink);
}
.ebs-content a {
    color: var(--ebs-pink-deep);
    text-decoration: underline;
    text-decoration-color: rgba(232, 52, 122, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color .18s;
}
.ebs-content a:hover { text-decoration-color: var(--ebs-pink-deep); }
.ebs-content strong { font-weight: 600; color: var(--ebs-ink); }
.ebs-content em { font-style: italic; }
.ebs-content blockquote {
    margin: 36px 0;
    padding: 8px 0 8px 28px;
    border-left: 3px solid var(--ebs-pink);
    font-family: "PlayfairDisplay", "Times New Roman", serif;
    font-style: italic;
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.4;
    color: var(--ebs-ink);
    letter-spacing: -0.01em;
}
.ebs-content blockquote p { margin: 0 0 12px; }
.ebs-content blockquote p:last-child { margin: 0; }
.ebs-content ul, .ebs-content ol {
    margin: 0 0 28px; padding-left: 24px;
}
.ebs-content li { margin-bottom: 8px; }
.ebs-content ul li::marker { color: var(--ebs-pink); }
.ebs-content img,
.ebs-content figure {
    margin: 36px auto;
    max-width: 100%;
    border-radius: 18px;
    overflow: hidden;
}
.ebs-content figure img { display: block; width: 100%; }
.ebs-content figcaption {
    margin-top: 10px;
    text-align: center;
    font-size: 13px; color: var(--ebs-soft);
    font-style: italic;
}
.ebs-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ebs-line), transparent);
    margin: 48px auto;
    max-width: 200px;
}
.ebs-content code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.9em;
    background: var(--ebs-cream);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--ebs-pink-deep);
}
.ebs-content pre {
    background: #18181b;
    color: #f5f4f0;
    padding: 18px 20px;
    border-radius: 14px;
    overflow-x: auto;
    margin: 32px 0;
    font-size: 14px;
}
.ebs-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* ════════════════════════════════════════════════════════════
   4. TAGS
   ════════════════════════════════════════════════════════════ */
.ebs-tags-sec { padding: 16px 0 8px; }
.ebs-tags {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 24px 0;
    border-top: 1px dashed var(--ebs-line);
    border-bottom: 1px dashed var(--ebs-line);
}
.ebs-tags-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--ebs-soft);
    margin-right: 6px;
}
.ebs-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--ebs-cream);
    color: var(--ebs-ink);
    font-size: 12.5px; font-weight: 500;
    text-decoration: none;
    transition: background .18s, color .18s;
}
.ebs-tag:hover { background: var(--ebs-ink); color: #fff; }

/* ════════════════════════════════════════════════════════════
   5. AUTHOR BIO
   ════════════════════════════════════════════════════════════ */
.ebs-author-sec { padding: 60px 0 32px; }
.ebs-author-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--ebs-line-soft);
    border-radius: 24px;
    box-shadow: 0 20px 50px -28px rgba(232, 52, 122, 0.18);
}
@media (min-width: 600px) {
    .ebs-author-card { grid-template-columns: 96px 1fr; gap: 28px; padding: 36px 40px; }
}
.ebs-author-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 8px 22px -8px rgba(232, 52, 122, 0.35), 0 0 0 1px var(--ebs-line);
}
@media (min-width: 600px) { .ebs-author-avatar { width: 96px; height: 96px; } }
.ebs-author-text { display: flex; flex-direction: column; gap: 6px; }
.ebs-author-eyebrow {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.16em;
    color: var(--ebs-pink-deep);
}
.ebs-author-name {
    margin: 0;
    font-size: 22px; font-weight: 600;
    letter-spacing: -0.015em;
}
.ebs-author-name a { color: inherit; text-decoration: none; transition: color .18s; }
.ebs-author-name a:hover { color: var(--ebs-pink-deep); }
.ebs-author-bio {
    margin: 4px 0 8px;
    font-size: 14.5px; line-height: 1.6;
    color: var(--ebs-mute);
}
.ebs-author-link {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 4px;
    font-size: 13px; font-weight: 600;
    color: var(--ebs-pink-deep);
    text-decoration: none;
}
.ebs-author-link svg { width: 14px; height: 14px; transition: transform .25s; }
.ebs-author-link:hover svg { transform: translateX(3px); }

/* ════════════════════════════════════════════════════════════
   6. RELATED
   ════════════════════════════════════════════════════════════ */
.ebs-related-sec {
    padding: 56px 0 96px;
    border-top: 1px solid var(--ebs-line-soft);
    margin-top: 32px;
}
.ebs-related-head {
    display: flex; justify-content: space-between; align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}
.ebs-section-tag {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.22em;
    color: var(--ebs-pink-deep);
}
.ebs-section-tag-line {
    width: 36px; height: 1px;
    background: linear-gradient(90deg, var(--ebs-pink), transparent);
}
.ebs-related-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600;
    color: var(--ebs-ink);
    text-decoration: none;
}
.ebs-related-back svg { width: 14px; height: 14px; transition: transform .25s; }
.ebs-related-back:hover svg { transform: translateX(3px); }

.ebs-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px)  { .ebs-related-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.ebs-related-card {
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--ebs-line-soft);
    text-decoration: none; color: inherit;
    transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .2s, box-shadow .25s;
}
.ebs-related-card:hover {
    transform: translateY(-3px);
    border-color: var(--ebs-line);
    box-shadow: 0 22px 40px -24px rgba(232, 52, 122, 0.2);
}
.ebs-related-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ebs-pink) 0%, var(--ebs-peach) 100%);
}
.ebs-related-media img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.ebs-related-card:hover .ebs-related-media img { transform: scale(1.06); }
.ebs-related-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 18px; text-align: center; color: #fff;
    font-family: "PlayfairDisplay", "Times New Roman", serif;
    font-style: italic;
}
.ebs-related-fallback span { font-size: 18px; line-height: 1.2; }
.ebs-related-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.ebs-related-cat {
    font-size: 10px; font-weight: 700;
    color: var(--ebs-pink-deep);
    text-transform: uppercase; letter-spacing: 0.14em;
    margin-bottom: 4px;
}
.ebs-related-title {
    margin: 0 0 6px;
    font-size: 17px; font-weight: 600;
    line-height: 1.3; letter-spacing: -0.01em;
    color: var(--ebs-ink);
}
.ebs-related-card:hover .ebs-related-title { color: var(--ebs-pink-deep); }
.ebs-related-meta {
    font-size: 11.5px; color: var(--ebs-soft);
    font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════
   FX
   ════════════════════════════════════════════════════════════ */
.ebs-page [data-ebs-fx] {
    opacity: 0; transform: translateY(24px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.ebs-page.is-fx-ready [data-ebs-fx],
.ebs-page [data-ebs-fx].is-in {
    opacity: 1; transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .ebs-page [data-ebs-fx] { opacity: 1 !important; transform: none !important; }
    .ebs-progress > span { transition: none; }
}
