/* ==========================================================================
   Envision blog (v1.30): single post, blog page carousel, cards, archive grid. Dark system, scoped under .eh.
   Text is always light on the dark background (the old template painted it black).
   ========================================================================== */

/* ---------- reading progress ---------- */
.eh-prog{position:fixed;left:0;right:0;top:0;height:3px;z-index:9998;background:transparent;pointer-events:none}
.eh-prog i{display:block;height:100%;width:100%;transform:scaleX(0);transform-origin:left;background:linear-gradient(90deg,var(--gold),#fff3b0);box-shadow:0 0 12px rgba(241,201,28,.7)}

/* ---------- article hero ---------- */
.eh .eh-art-hero h1{font-size:clamp(30px,4.4vw,56px);line-height:1.08;letter-spacing:-.03em;margin-top:18px;text-wrap:balance;color:#fff!important}
.eh .eh-art-hero a.eh-eyebrow{transition:background .25s,border-color .25s}
.eh .eh-art-hero a.eh-eyebrow:hover{background:rgba(241,201,28,.16);border-color:rgba(241,201,28,.45)}
.eh-art-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;margin-top:24px;color:var(--mut);font-size:14px;font-weight:500}
.eh-art-meta .who{display:inline-flex;align-items:center;gap:10px;color:#fff}
.eh-art-meta .who b{font-family:var(--disp);font-weight:700}
.eh-art-meta .av{width:36px;height:36px;border-radius:50%;border:1.5px solid rgba(241,201,28,.55);object-fit:cover}
.eh-art-meta .dot{width:4px;height:4px;border-radius:50%;background:var(--mut2)}
.eh-art-meta time{color:var(--mut)}

/* ---------- layout ---------- */
.eh-art-cover{margin:0 0 clamp(28px,4vw,52px);border-radius:var(--r);overflow:hidden;border:1px solid var(--line2);background:#0c0f16;box-shadow:0 40px 80px -50px #000}
.eh-art-cover img{display:block;width:100%;height:auto;max-height:520px;object-fit:cover}
.eh-art-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:clamp(30px,5vw,72px);align-items:start}
.eh-art-grid.no-toc{grid-template-columns:minmax(0,760px);justify-content:center}
.eh-art-grid.no-toc .eh-art-side{display:none}
.eh-article{min-width:0;max-width:780px}

/* ---------- article typography ---------- */
.eh .eh-article-body,.eh .eh-prose .eh-article-body{color:#c9cedb;font-size:clamp(16px,1.25vw,18px);line-height:1.85;overflow-wrap:break-word}
.eh .eh-article-body>*:first-child{margin-top:0}
.eh .eh-article-body p,.eh .eh-article-body li,.eh .eh-article-body td,.eh .eh-article-body th,.eh .eh-article-body span,.eh .eh-article-body div,.eh .eh-article-body figcaption,.eh .eh-article-body dd,.eh .eh-article-body dt{color:#c9cedb!important}
.eh .eh-article-body p{margin:0 0 1.35em}
.eh .eh-article-body h2,.eh .eh-article-body h3,.eh .eh-article-body h4,.eh .eh-article-body h5{color:#fff!important;font-family:var(--disp);letter-spacing:-.02em;line-height:1.2;scroll-margin-top:110px}
.eh .eh-article-body h2{font-size:clamp(24px,2.6vw,34px);font-weight:800;margin:2.1em 0 .7em;padding-top:1.1em;border-top:1px solid var(--line);position:relative}
.eh .eh-article-body h2:first-child{border-top:0;padding-top:0;margin-top:0}
.eh .eh-article-body h2::before{content:"";position:absolute;left:0;top:-1px;width:52px;height:2px;background:var(--gold);box-shadow:0 0 12px rgba(241,201,28,.6)}
.eh .eh-article-body h2:first-child::before{display:none}
.eh .eh-article-body h3{font-size:clamp(19px,1.9vw,24px);font-weight:700;margin:1.8em 0 .55em}
.eh .eh-article-body h4{font-size:18px;font-weight:700;margin:1.5em 0 .5em}
.eh .eh-article-body strong,.eh .eh-article-body b{color:#fff!important;font-weight:700}
.eh .eh-article-body em{color:#e6e9f2!important}
.eh .eh-article-body a{color:var(--gold)!important;text-decoration:underline;text-decoration-color:rgba(241,201,28,.4);text-underline-offset:3px;transition:text-decoration-color .2s}
.eh .eh-article-body a:hover{text-decoration-color:var(--gold)}
.eh .eh-article-body ul,.eh .eh-article-body ol{margin:0 0 1.5em;padding-left:1.4em;display:grid;gap:.6em}
.eh .eh-article-body ul{list-style:none;padding-left:0}
.eh .eh-article-body ul>li{position:relative;padding-left:1.6em}
.eh .eh-article-body ul>li::before{content:"";position:absolute;left:.15em;top:.78em;width:8px;height:8px;border-radius:2px;background:var(--gold);transform:rotate(45deg);box-shadow:0 0 10px rgba(241,201,28,.5)}
.eh .eh-article-body ol{counter-reset:ol;list-style:none;padding-left:0}
.eh .eh-article-body ol>li{counter-increment:ol;position:relative;padding-left:2.5em}
.eh .eh-article-body ol>li::before{content:counter(ol);position:absolute;left:0;top:.1em;width:1.75em;height:1.75em;border-radius:50%;background:rgba(241,201,28,.12);border:1px solid rgba(241,201,28,.4);color:var(--gold);font:800 .8em var(--disp);display:grid;place-items:center;line-height:1}
.eh .eh-article-body blockquote{margin:1.8em 0;padding:22px 26px;border:1px solid var(--line2);border-left:3px solid var(--gold);border-radius:16px;background:var(--card);font-size:1.06em}
.eh .eh-article-body blockquote p:last-child{margin-bottom:0}
.eh .eh-article-body img,.eh .eh-article-body video,.eh .eh-article-body iframe{max-width:100%;height:auto;border-radius:16px;border:1px solid var(--line)}
.eh .eh-article-body figure{margin:1.8em 0}
.eh .eh-article-body figcaption{font-size:13px;color:var(--mut)!important;margin-top:10px;text-align:center}
.eh .eh-article-body hr{border:0;height:1px;background:var(--line2);margin:2.4em 0}
.eh .eh-article-body code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.88em;background:rgba(255,255,255,.08);border:1px solid var(--line);border-radius:6px;padding:.12em .42em;color:#fbe7a3!important}
.eh .eh-article-body pre{background:#0b0e15;border:1px solid var(--line2);border-radius:14px;padding:18px 20px;overflow:auto;margin:1.6em 0;line-height:1.65}
.eh .eh-article-body pre code{background:none;border:0;padding:0;color:#e6e9f2!important}

/* tables: scroll on small screens, readable on dark */
.eh .eh-tbl{margin:1.8em 0;overflow-x:auto;border:1px solid var(--line2);border-radius:16px;background:var(--card);-webkit-overflow-scrolling:touch}
.eh .eh-article-body table{width:100%;border-collapse:collapse;min-width:520px;font-size:.94em}
.eh .eh-article-body th{background:rgba(241,201,28,.1);color:#fff!important;font-family:var(--disp);font-weight:700;text-align:left;letter-spacing:.01em}
.eh .eh-article-body th,.eh .eh-article-body td{padding:14px 18px;border-bottom:1px solid var(--line);vertical-align:top;line-height:1.55}
.eh .eh-article-body tbody tr:last-child td{border-bottom:0}
.eh .eh-article-body tbody tr:hover td{background:rgba(255,255,255,.03)}
.eh .eh-article-body td:first-child{color:#fff!important;font-weight:600}

/* ---------- footer of the article: tags + share ---------- */
.eh-art-foot{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:18px;margin-top:clamp(34px,4vw,56px);padding-top:26px;border-top:1px solid var(--line2)}
.eh-art-tags{display:flex;gap:8px;flex-wrap:wrap}
.eh-art-tags a{font-size:12.5px;font-weight:600;color:#dfe3ee;background:var(--card);border:1px solid var(--line);border-radius:999px;padding:7px 13px;transition:border-color .25s,color .25s}
.eh-art-tags a:hover{border-color:rgba(241,201,28,.5);color:var(--gold)}
.eh-share{display:flex;align-items:center;gap:10px;margin-left:auto}
.eh-share span{font:700 12px var(--disp);letter-spacing:.14em;text-transform:uppercase;color:var(--mut2);margin-right:4px}
.eh-share a,.eh-share button{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--card);border:1px solid var(--line2);color:#fff;font-size:14px;cursor:pointer;transition:background .25s,color .25s,border-color .25s,transform .25s}
.eh-share a:hover,.eh-share button:hover{background:var(--gold);color:#0a0b0e;border-color:var(--gold);transform:translateY(-2px)}
.eh-share button.ok{background:var(--emerald);border-color:var(--emerald);color:#04110b}

/* ---------- sidebar ---------- */
.eh-art-side{position:sticky;top:104px;display:grid;gap:18px}
.eh-toc{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:22px 20px 18px}
.eh-toc h4{font:700 12px var(--disp);letter-spacing:.16em;text-transform:uppercase;color:var(--gold);margin:0 0 14px;display:flex;align-items:center;gap:8px}
.eh-toc h4::before{content:"";width:12px;height:2px;border-radius:2px;background:var(--gold)}
.eh-toc ol{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.eh-toc a{display:grid;grid-template-columns:26px 1fr;gap:8px;padding:8px 10px;border-radius:10px;color:var(--mut)!important;font-size:13.5px;line-height:1.4;font-weight:500;transition:background .25s,color .25s}
.eh-toc a em{font:800 11px var(--disp);font-style:normal;color:var(--mut2);padding-top:2px;letter-spacing:.06em}
.eh-toc a:hover{background:rgba(255,255,255,.05);color:#fff!important}
.eh-toc a.on{background:rgba(241,201,28,.1);color:#fff!important}
.eh-toc a.on em{color:var(--gold)}
.eh-side-cta{position:relative;overflow:hidden;border-radius:var(--r);padding:24px 22px;background:linear-gradient(150deg,rgba(241,201,28,.16),rgba(241,201,28,.03) 60%),#0c0f16;border:1px solid rgba(241,201,28,.28)}
.eh-side-cta h4{font:800 19px/1.25 var(--disp);letter-spacing:-.02em;color:#fff;margin:0 0 8px}
.eh-side-cta p{color:var(--mut)!important;font-size:14px;line-height:1.6;margin:0 0 16px}
.eh-side-cta .eh-btn{padding:11px 20px;font-size:14px}
.eh-side-cta .eh-btn svg{width:16px;height:16px}

/* ---------- blog hero ---------- */
.eh-bl-hero h1{text-wrap:balance}
.eh-bl-hero .eh-lead{max-width:60ch}

/* ---------- cards ---------- */
.eh-bcard{position:relative;display:flex;flex-direction:column;background:linear-gradient(160deg,rgba(255,255,255,.05),rgba(255,255,255,.02));border:1px solid var(--line);border-radius:var(--r);overflow:hidden;transition:transform .45s var(--ease),border-color .3s,box-shadow .45s}
.eh-bcard:hover{transform:translateY(-6px);border-color:rgba(241,201,28,.4);box-shadow:0 36px 60px -34px rgba(0,0,0,.9),0 0 0 1px rgba(241,201,28,.08)}
.eh-bcard-media{position:relative;display:block;aspect-ratio:16/10;overflow:hidden;background:#0c0f16}
.eh-bcard-media img{width:100%;height:100%;object-fit:cover;transition:transform 1s var(--ease)}
.eh-bcard:hover .eh-bcard-media img{transform:scale(1.06)}
.eh-bcard-media::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,transparent 55%,rgba(7,9,14,.55))}
.eh-bcard-ph{position:absolute;inset:0;display:grid;place-items:center;background:radial-gradient(60% 70% at 78% 12%,rgba(241,201,28,.3),transparent 70%),radial-gradient(50% 60% at 8% 100%,rgba(241,201,28,.14),transparent 70%),linear-gradient(145deg,#141925,#0a0d14);overflow:hidden}
.eh-bcard-ph::before{content:"";position:absolute;inset:0;background-image:radial-gradient(rgba(255,255,255,.09) 1px,transparent 1px);background-size:22px 22px;mask-image:radial-gradient(80% 80% at 60% 40%,#000,transparent)}
.eh-bcard-ph b{position:relative;font:800 clamp(64px,8vw,104px)/1 var(--disp);letter-spacing:-.06em;color:transparent;-webkit-text-stroke:2px rgba(241,201,28,.75);transition:transform .6s var(--spring)}
.eh-bcard:hover .eh-bcard-ph b{transform:scale(1.08) rotate(-3deg)}
.eh-bcard-ph i{position:absolute;display:block;border-radius:50%;border:1px solid rgba(241,201,28,.25)}
.eh-bcard-ph i:nth-of-type(1){width:150px;height:150px;right:-40px;top:-50px}
.eh-bcard-ph i:nth-of-type(2){width:90px;height:90px;left:-20px;bottom:-30px}
.eh-bcard-ph i:nth-of-type(3){width:8px;height:8px;left:18%;top:22%;background:var(--gold);border:0;box-shadow:0 0 12px var(--gold)}
.eh-bcard-cat{position:absolute;left:14px;top:14px;z-index:2;font:700 11px var(--disp);letter-spacing:.12em;text-transform:uppercase;color:#0a0b0e;background:var(--gold);border-radius:999px;padding:6px 12px;box-shadow:0 10px 20px -10px rgba(241,201,28,.7)}
.eh-bcard-body{display:flex;flex-direction:column;gap:10px;padding:clamp(18px,2vw,26px);flex:1}
.eh-bcard-meta{display:flex;align-items:center;gap:10px;font-size:12.5px;color:var(--mut2);font-weight:600;letter-spacing:.02em}
.eh-bcard-meta span{width:3px;height:3px;border-radius:50%;background:var(--mut2)}
.eh .eh-bcard-t{font-size:clamp(18px,1.6vw,21px);line-height:1.28;letter-spacing:-.02em;margin:0;color:#fff!important}
.eh .eh-bcard-t a{color:#fff!important;background:linear-gradient(var(--gold),var(--gold)) 0 100%/0 2px no-repeat;transition:background-size .4s var(--ease)}
.eh-bcard:hover .eh-bcard-t a{background-size:100% 2px}
.eh .eh-bcard-x{color:var(--mut)!important;font-size:14.5px;line-height:1.65;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.eh-bcard-more{margin-top:auto;padding-top:6px;display:inline-flex;align-items:center;gap:8px;font:700 13.5px var(--disp);color:var(--gold)!important;width:fit-content}
.eh-bcard-more svg{width:16px;height:16px;transition:transform .3s var(--ease)}
.eh-bcard:hover .eh-bcard-more svg{transform:translateX(5px)}

/* ---------- carousel ---------- */
.eh-bc{position:relative}
.eh-bc-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;flex-wrap:wrap;margin-bottom:22px}
.eh .eh-bc-h{font-size:clamp(26px,3.2vw,42px);letter-spacing:-.03em;margin:14px 0 0;color:#fff!important}
.eh-bc-ctl{display:flex;gap:10px}
.eh-bc-btn{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:var(--card);border:1px solid var(--line2);color:#fff;cursor:pointer;transition:background .25s,color .25s,border-color .25s,transform .25s,opacity .25s}
.eh-bc-btn svg{width:20px;height:20px}
.eh-bc-btn:hover:not(:disabled){background:var(--gold);border-color:var(--gold);color:#0a0b0e;transform:scale(1.06)}
.eh-bc-btn:disabled{opacity:.35;cursor:default}
.eh-bc-chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}
.eh-bc-chips button{font:600 13px var(--body);color:#dfe3ee;background:var(--card);border:1px solid var(--line);border-radius:999px;padding:8px 16px;cursor:pointer;transition:background .25s,color .25s,border-color .25s}
.eh-bc-chips button:hover{border-color:rgba(241,201,28,.5)}
.eh-bc-chips button.on{background:var(--gold);border-color:var(--gold);color:#0a0b0e}
.eh-bc-track{display:flex;align-items:stretch;gap:clamp(14px,1.8vw,24px);overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;padding:8px 2px 26px;margin:0 -2px;scrollbar-width:none;-webkit-overflow-scrolling:touch;outline:none;cursor:grab}
.eh-bc-track::-webkit-scrollbar{display:none}
.eh-bc-track.drag{scroll-snap-type:none;scroll-behavior:auto;cursor:grabbing;user-select:none}
.eh-bc-track.drag a{pointer-events:none}
.eh-bc-track>.eh-bcard{flex:0 0 clamp(280px,31vw,410px);scroll-snap-align:start}
.eh-bc-track>.eh-bcard.hide{display:none}
.eh-bc-bar{height:3px;border-radius:3px;background:var(--line);overflow:hidden;margin-top:2px}
.eh-bc-bar i{display:block;height:100%;width:30%;border-radius:3px;background:var(--gold);box-shadow:0 0 12px rgba(241,201,28,.6);transition:transform .15s linear}
.eh-bc-all{display:flex;justify-content:center;margin-top:34px}
.eh-bc-all .eh-btn svg{width:17px;height:17px}
.eh-bl-empty{text-align:center;padding:60px 20px;border:1px dashed var(--line2);border-radius:var(--r);background:var(--card)}
.eh-bl-empty h2{font-size:26px;margin-bottom:10px;color:#fff!important}.eh-bl-empty p{color:var(--mut)!important}.eh-bl-empty a{color:var(--gold)}

/* ---------- archive grid + pagination ---------- */
.eh-bgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(14px,1.8vw,24px)}
.eh-pagi{margin-top:44px}
.eh-pagi .nav-links,.eh-pages{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.eh-pagi .page-numbers,.eh-pages a,.eh-pages>span{min-width:44px;height:44px;padding:0 14px;display:inline-grid;place-items:center;border-radius:999px;background:var(--card);border:1px solid var(--line2);color:#fff!important;font:700 14px var(--disp);transition:background .25s,color .25s}
.eh-pagi a.page-numbers:hover{background:var(--gold);color:#0a0b0e!important;border-color:var(--gold)}
.eh-pagi .page-numbers.current{background:var(--gold);color:#0a0b0e!important;border-color:var(--gold)}
.eh-pagi .page-numbers.dots{background:none;border:0}
.eh-pagi .screen-reader-text{display:none}

/* ---------- responsive ---------- */
@media(max-width:1024px){
	.eh-art-grid{grid-template-columns:1fr}
	.eh-art-side{position:static;order:-1}
	.eh-toc{display:none}
	.eh-bgrid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:700px){
	.eh-bgrid{grid-template-columns:1fr}
	.eh-bc-track>.eh-bcard{flex-basis:84vw}
	.eh-bc-btn{width:42px;height:42px}
	.eh-art-foot{flex-direction:column;align-items:flex-start}
	.eh-share{margin-left:0}
	.eh .eh-article-body h2{margin-top:1.8em}
	.eh-art-meta{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.eh-bc-track{scroll-behavior:auto}.eh-bcard,.eh-bcard *{transition:none!important}}
