/* ============================================================
   siemp-article.css — Single-post template for nexxis / Enfold
   Enqueued only on is_singular('post').
   All selectors use #top to match Enfold's ID-level specificity.
   ============================================================ */

/* ── Brand variables ──────────────────────────────────────── */
#top .si-article {
    --ink: #222222;
    --ink-soft: #5F6467;
    --navy: #222222;
    --accent: #22BEC6;
    --accent-2: #6AC6C9;
    --accent-ink: #137F86;
    --accent-soft: #DFF4F5;
    --paper: #FBFBFA;
    --rule: #E3E3E1;
    --measure: 50rem;
    color: var(--ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 19px;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
}

#top .si-article * {
    box-sizing: border-box;
}

#top .si-article p,
#top .si-article ul,
#top .si-article ol,
#top .si-article h1,
#top .si-article h2,
#top .si-article h3,
#top .si-article h4,
#top .si-article figure,
#top .si-article blockquote {
    margin: 0;
}

/* ── Neutralise Enfold wrappers that clip full-width bleeds ── */
#top.single-post #wrap_all {
    overflow-x: clip;
}

#top.single-post .container_wrap.container_wrap_first {
    overflow: visible;
}

/* ── Reading progress bar ─────────────────────────────────── */
#top .si-progress {
    position: fixed;
    inset: 0 auto auto 0;
    height: 3px;
    width: 0;
    background: var(--accent);
    z-index: 50;
    transition: width .1s linear;
}

/* ── HERO — true full-bleed via JS-measured offsets ────────── */
/* The 50%-50vw trick fails here because Enfold's blog column is
   not centred in the viewport (9/12 column, ~206px left of centre).
   Instead, JS sets --si-bleed-l/r to the element's actual distance
   from each viewport edge.                                        */
#top .si-hero {
    position: relative;
    min-height: min(78vh, 720px);
    display: grid;
    align-items: end;
    background: var(--navy);
    overflow: hidden;
    isolation: isolate;
    margin-left: calc(-1 * var(--si-bleed-l, 0px));
    margin-right: calc(-1 * var(--si-bleed-r, 0px));
    width: auto;
    max-width: none;
}

#top .si-hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 11px),
        linear-gradient(150deg, #2A5F62 0%, #222222 58%, #171717 100%);
    background-size: cover;
    background-position: center;
}

#top .si-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(24, 24, 24, .22) 0%, rgba(26, 32, 32, .58) 45%, rgba(26, 30, 30, .95) 100%);
}

#top .si-hero__inner {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(40px, 7vw, 96px) clamp(20px, 5vw, 64px) clamp(36px, 5vw, 64px);
}

#top .si-hero__eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: clamp(18px, 3vw, 30px);
}

#top .si-hero__eyebrow span:not(:first-child) {
    color: rgba(255, 255, 255, .55);
}

#top .si-hero__eyebrow span:not(:first-child)::before {
    content: "/";
    margin-right: 14px;
    color: rgba(255, 255, 255, .28);
}

#top .si-hero__eyebrow a {
    color: inherit;
    text-decoration: none;
}

#top .si-hero__eyebrow a:hover {
    color: #fff;
}

#top .si-article h1 {
    font-family: "Archivo", Helvetica, sans-serif;
    font-weight: 800;
    font-size: clamp(2.1rem, 5.2vw, 4.15rem);
    line-height: 1.03;
    letter-spacing: -.025em;
    color: #fff;
    max-width: 19ch;
    text-wrap: balance;
}

#top .si-article h1 em {
    font-style: normal;
    color: var(--accent-2);
}

/* ── SHELL: centred content column ────────────────────────── */
#top .si-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 64px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
}

/* ── BODY ─────────────────────────────────────────────────── */
#top .si-body {
    max-width: var(--measure);
    padding: clamp(48px, 6vw, 88px) 0 clamp(64px, 8vw, 120px);
    counter-reset: h2;
    width: 100%;
}

#top .si-article .si-body>*+* {
    margin-top: 1.15em;
}

/* ── Chapô: first paragraph (lead) ───────────────────────── */
#top .si-body>p:first-of-type {
    font-size: 1.32em;
    line-height: 1.5;
    color: var(--navy);
    font-weight: 600;
    letter-spacing: -.005em;
}

#top .si-body>p:first-of-type::first-letter {
    float: left;
    font-family: "Archivo", sans-serif;
    font-weight: 800;
    font-size: 3.1em;
    line-height: .82;
    padding: .06em .12em 0 0;
    color: var(--accent-ink);
}

/* ── H2: numbered automatically ───────────────────────────── */
#top .si-article h2 {
    font-family: "Archivo", sans-serif;
    font-weight: 700;
    font-size: clamp(1.55rem, 2.9vw, 2.3rem);
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--navy);
    margin-top: 2.6em;
    padding-top: 1.5em;
    border-top: 1px solid var(--rule);
    position: relative;
    text-wrap: balance;
}

#top .si-article h2::before {
    counter-increment: h2;
    content: counter(h2, decimal-leading-zero);
    display: block;
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    letter-spacing: .16em;
    color: var(--accent-ink);
    margin-bottom: .9em;
}

#top .si-article h2+p {
    margin-top: .9em;
}

/* ── H3: accent left border ───────────────────────────────── */
#top .si-article h3 {
    font-family: "Archivo", sans-serif;
    font-weight: 600;
    font-size: 1.18em;
    line-height: 1.3;
    color: var(--navy);
    margin-top: 2em;
    padding-left: 16px;
    border-left: 3px solid var(--accent);
}

/* ── Bold: subtle highlight underline ─────────────────────── */
#top .si-body :is(a, h1, h2, h3, h4, h5, h6) :is(strong, b) {
    font-weight: 600;
    color: var(--navy);
    background: linear-gradient(transparent 62%, var(--accent-soft) 62%);
    padding: 0 .08em;
}

/* ── Lists ────────────────────────────────────────────────── */
#top .si-body ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .55em;
}

#top .si-body ul li {
    position: relative;
    padding-left: 28px;
}

#top .si-body ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .62em;
    width: 7px;
    height: 7px;
    background: var(--accent);
    transform: rotate(45deg);
}

#top .si-body ol {
    padding-left: 1.3em;
}

#top .si-body ol li {
    padding-left: .4em;
    margin-top: .5em;
}

#top .si-body ol li::marker {
    font-family: "Archivo", sans-serif;
    font-weight: 700;
    color: var(--accent-ink);
}

/* ── Blockquote card ──────────────────────────────────────── */
#top .si-body blockquote {
    margin-top: 2em;
    padding: clamp(24px, 3vw, 36px);
    background: #fff;
    border: 1px solid var(--rule);
    border-left: 4px solid var(--accent);
    font-size: 1.12em;
    line-height: 1.5;
    color: var(--navy);
}

/* ── Links ────────────────────────────────────────────────── */
#top .si-body a {
    color: var(--accent-ink);
    text-decoration: none;
    box-shadow: inset 0 -2px 0 0 var(--accent-2);
    transition: .18s;
}

#top .si-body a:hover {
    color: var(--navy);
    box-shadow: inset 0 -2px 0 0 var(--navy);
}

/* ── Figures: wider than text column ──────────────────────── */
#top .si-body figure {
    margin-top: 2.4em;
    width: min(100%, var(--measure));
}

#top .si-body figure img {
    width: 100%;
    height: auto;
    display: block;
}

#top .si-body figcaption {
    margin-top: 12px;
    font-family: "Archivo", sans-serif;
    font-size: 13px;
    color: var(--ink-soft);
}

@media(min-width:1060px) {
    #top .si-body figure {
        width: calc(100% + 12vw);
        max-width: none;
        margin-left: -6vw;
    }
}

/* ── Bare images in <p> — also wider ──────────────────────── */
#top .si-body>p>img {
    display: block;
    width: 100%;
    height: auto;
    margin: 2.4em 0;
}

@media(min-width:1060px) {
    #top .si-body>p>img {
        width: calc(100% + 12vw);
        max-width: none;
        margin-left: -6vw;
    }
}

/* ── H2 counter moved to left margin on wide screens ──────── */
@media(min-width:1200px) {
    #top .si-article h2::before {
        position: absolute;
        left: -6.5rem;
        top: 1.5em;
        margin: 0;
        font-size: 13px;
    }
}

/* ── Vertical rhythm overrides ────────────────────────────── */
#top .si-article .si-body>h2 {
    margin-top: 2.6em;
}

#top .si-article .si-body>h3 {
    margin-top: 2em;
}

#top .si-article .si-body>figure {
    margin-top: 2.4em;
}

#top .si-article .si-body>blockquote {
    margin-top: 2em;
}

#top .si-article .si-body>h2+p {
    margin-top: .9em;
}

.siemp.av-main-single {
    padding-top: 0;
    padding-bottom: 0;
    float: none;
}

@media only screen and (max-width: 767px) {
    #top .si-shell {
        padding-inline: 0;
    }

    #top .si-hero {
        min-height: min(78vh, 450px);
    }
}

@media only screen and (max-width: 989px) {
    #top .si-hero {
        min-height: min(78vh, 550px);
    }
}