/* =========================================================================
   Asia Engineers — blog / article layer. Loads after ae.css.
   ====================================================================== */

/* ---------- Post hero ------------------------------------------------ */
.ae-phead { position: relative; overflow: hidden; background: var(--ae-paper); padding-block: clamp(2.4rem, 5vw, 4rem) clamp(1.6rem, 3vw, 2.4rem); }
.ae-phead::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background:
		linear-gradient(var(--ae-line-2) 1px, transparent 1px) 0 0 / 100% 46px,
		linear-gradient(90deg, var(--ae-line-2) 1px, transparent 1px) 0 0 / 46px 100%;
	mask-image: radial-gradient(110% 100% at 14% 15%, #000 0%, transparent 70%);
	-webkit-mask-image: radial-gradient(110% 100% at 14% 15%, #000 0%, transparent 70%);
}
.ae-phead > .ae-wrap { position: relative; z-index: 1; }
.ae-phead .ae-h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 20ch; }
.ae-phead .ae-lead { margin-top: 1.1rem; font-size: clamp(1.04rem, 1.5vw, 1.2rem); max-width: 60ch; }

.ae-pmeta {
	display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.3rem;
	margin-top: 1.6rem; padding-top: 1.2rem;
	border-top: 1px solid var(--ae-line);
	font-family: var(--ae-mono); font-size: .735rem;
	letter-spacing: .08em; text-transform: uppercase; color: var(--ae-muted);
}
.ae-pmeta span { display: inline-flex; align-items: center; gap: .5em; }
.ae-pmeta i { color: var(--ae-brand); }
.ae-pmeta b { font-family: var(--ae-sans); font-weight: 700; letter-spacing: -.01em; text-transform: none; font-size: .87rem; color: var(--ae-ink); }

.ae-pimg { margin-top: clamp(1.6rem, 3vw, 2.4rem); border-radius: var(--ae-r-lg); overflow: hidden; border: 1px solid var(--ae-line); box-shadow: var(--ae-sh-2); }
.ae-pimg img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }
@media (max-width: 700px) { .ae-pimg img { aspect-ratio: 16/10; } }

/* ---------- Article body --------------------------------------------- */
.ae-art { padding-block: clamp(2.4rem, 5vw, 4rem); background: var(--ae-surface); border-block: 1px solid var(--ae-line); }
.ae-art .ae-wrap { max-width: 820px; }

.ae-art .wp-block-post-content > *,
.ae-artbody > * { margin-block: 0 1.25rem; }

.ae-artbody { font-size: 1.055rem; line-height: 1.78; color: var(--ae-ink-2); }
.ae-artbody p { margin-block: 0 1.25rem; }
.ae-artbody strong { color: var(--ae-ink); font-weight: 700; }

.ae-artbody h2 {
	font-size: clamp(1.45rem, 2.9vw, 1.95rem);
	font-weight: 800; letter-spacing: -.032em; line-height: 1.16;
	color: var(--ae-ink);
	margin: 2.8rem 0 .9rem;
	padding-top: 1.6rem;
	border-top: 1px solid var(--ae-line);
	position: relative;
}
.ae-artbody h2::before {
	content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 3px;
	background: var(--ae-g-title);
}
.ae-artbody h3 { font-size: clamp(1.1rem, 2vw, 1.28rem); font-weight: 700; letter-spacing: -.024em; color: var(--ae-ink); margin: 1.9rem 0 .6rem; }
.ae-artbody h4 { font-size: 1.02rem; font-weight: 700; color: var(--ae-ink); margin: 1.5rem 0 .5rem; }

.ae-artbody ul, .ae-artbody ol { margin: 0 0 1.3rem; padding-left: 0; list-style: none; }
.ae-artbody ol { counter-reset: aeol; }
.ae-artbody li { position: relative; padding-left: 1.8rem; margin-bottom: .62rem; }
.ae-artbody ul > li::before {
	content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
	position: absolute; left: 0; top: .28em; font-size: .72em; color: var(--ae-brand);
}
.ae-artbody ol > li { counter-increment: aeol; }
.ae-artbody ol > li::before {
	content: counter(aeol);
	position: absolute; left: 0; top: .18em;
	font-family: var(--ae-mono); font-size: .74em; font-weight: 700;
	width: 1.35em; height: 1.35em; border-radius: 5px;
	display: grid; place-items: center;
	background: var(--ae-brand-soft); color: var(--ae-brand);
}

.ae-artbody a:not(.ae-btn) { color: var(--ae-brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; font-weight: 600; }
.ae-artbody a:not(.ae-btn):hover { color: var(--ae-signal); }

.ae-artbody blockquote {
	margin: 1.8rem 0; padding: 1.15rem 1.35rem;
	border-left: 3px solid var(--ae-signal);
	background: var(--ae-surface-2);
	border-radius: 0 var(--ae-r-sm) var(--ae-r-sm) 0;
	font-size: 1.02rem; color: var(--ae-ink);
}
.ae-artbody blockquote p:last-child { margin-bottom: 0; }

.ae-artbody figure { margin: 1.9rem 0; }
.ae-artbody img { border-radius: var(--ae-r); border: 1px solid var(--ae-line); }
.ae-artbody figcaption { margin-top: .7rem; font-family: var(--ae-mono); font-size: .745rem; color: var(--ae-faint); letter-spacing: .04em; line-height: 1.6; }

/* tables */
.ae-artbody table, .ae-tbl { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.7rem 0; font-size: .93rem; border: 1px solid var(--ae-line); border-radius: var(--ae-r); overflow: hidden; }
.ae-artbody th, .ae-tbl th { background: var(--ae-surface-2); text-align: left; font-family: var(--ae-mono); font-size: .69rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ae-muted); padding: .85rem 1rem; border-bottom: 1px solid var(--ae-line); }
.ae-artbody td, .ae-tbl td { padding: .85rem 1rem; border-bottom: 1px solid var(--ae-line-2); vertical-align: top; }
.ae-artbody tr:last-child td, .ae-tbl tr:last-child td { border-bottom: 0; }
.ae-tblwrap { overflow-x: auto; margin: 1.7rem 0; }
.ae-tblwrap .ae-tbl { margin: 0; min-width: 480px; }

/* ---------- Key takeaways -------------------------------------------- */
.ae-tldr {
	margin: 0 0 2rem;
	border: 1px solid var(--ae-line);
	border-radius: var(--ae-r);
	background: var(--ae-surface-2);
	padding: 1.35rem 1.5rem;
	position: relative; overflow: hidden;
}
.ae-tldr::before { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 4px; background: var(--ae-g-title); }
.ae-tldr h2 {
	font-family: var(--ae-mono); font-size: .705rem; letter-spacing: .16em; text-transform: uppercase;
	color: var(--ae-brand); margin: 0 0 .85rem; padding: 0; border: 0;
	display: flex; align-items: center; gap: .6em;
}
.ae-tldr h2::before { display: none; }
.ae-tldr ul { margin: 0; }
.ae-tldr li { font-size: .97rem; margin-bottom: .55rem; color: var(--ae-ink-2); }
.ae-tldr li:last-child { margin-bottom: 0; }

/* the direct-answer block that featured snippets pick up */
.ae-answer {
	margin: 1.4rem 0 1.9rem;
	padding: 1.2rem 1.4rem;
	border-radius: var(--ae-r);
	background: var(--ae-brand-soft);
	border: 1px solid var(--ae-brand);
	font-size: 1.03rem; line-height: 1.7;
	color: var(--ae-ink);
}
.ae-answer strong:first-child { display: block; font-family: var(--ae-mono); font-size: .69rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ae-brand); margin-bottom: .55rem; }

/* ---------- Diagrams -------------------------------------------------- */
.ae-dia { margin: 2rem 0; border: 1px solid var(--ae-line); border-radius: var(--ae-r); background: var(--ae-surface-2); padding: 1.4rem; }
.ae-dia svg { width: 100%; height: auto; display: block; }
.ae-dia figcaption { margin-top: .95rem; padding-top: .85rem; border-top: 1px solid var(--ae-line); font-family: var(--ae-mono); font-size: .735rem; color: var(--ae-faint); letter-spacing: .04em; line-height: 1.6; }

/* ---------- Inline conversion block ---------------------------------- */
.ae-inline {
	margin: 2.6rem 0;
	border: 1px solid var(--ae-line);
	border-radius: var(--ae-r-lg);
	background: var(--ae-surface);
	box-shadow: var(--ae-sh-2);
	overflow: hidden;
}
.ae-inline__head { padding: 1.3rem 1.5rem; background: var(--ae-g-brand); color: #fff; }
.ae-inline__head .ae-eyebrow { color: var(--ae-signal-2); margin-bottom: .6rem; }
.ae-inline__head .ae-eyebrow::before { background: var(--ae-signal-2); }
.ae-inline__head h3 { font-size: clamp(1.15rem, 2.2vw, 1.42rem); font-weight: 800; letter-spacing: -.028em; line-height: 1.22; margin: 0; }
.ae-inline__head p { margin: .5rem 0 0; font-size: .92rem; color: rgba(255,255,255,.9); max-width: 54ch; }
.ae-inline__body { padding: 1.5rem; }
.ae-inline .ae-form { font-size: .95rem; }

/* WhatsApp strip */
.ae-wastrip {
	margin: 2.2rem 0;
	display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem;
	justify-content: space-between;
	padding: 1.15rem 1.35rem;
	border-radius: var(--ae-r);
	border: 1px dashed var(--ae-line);
	background: var(--ae-surface-2);
}
.ae-wastrip p { margin: 0; font-size: .96rem; font-weight: 600; color: var(--ae-ink); max-width: 46ch; }
.ae-wastrip .ae-note { font-weight: 450; margin-top: .3rem; }

/* ---------- Author / share / related --------------------------------- */
.ae-author {
	margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--ae-line);
	display: flex; gap: 1.1rem; align-items: flex-start;
}
.ae-author__ico {
	width: 52px; height: 52px; border-radius: 14px; flex: none;
	display: grid; place-items: center; font-size: 1.25rem;
	background: var(--ae-g-brand); color: var(--ae-signal-2);
}
.ae-author h4 { margin: 0 0 .25rem; font-size: 1rem; font-weight: 700; }
.ae-author p { margin: 0; font-size: .91rem; color: var(--ae-muted); max-width: 60ch; }

.ae-updated { margin-top: 1.2rem; font-family: var(--ae-mono); font-size: .72rem; letter-spacing: .06em; color: var(--ae-faint); }

.ae-related { padding-block: clamp(2.6rem, 5vw, 4rem); background: var(--ae-paper); }
.ae-relcard { text-decoration: none; overflow: hidden; padding: 0; }
.ae-relcard img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.ae-relcard__b { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.ae-relcard__k { font-family: var(--ae-mono); font-size: .655rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ae-brand); margin-bottom: .5rem; }
.ae-relcard h3 { font-size: 1.04rem; font-weight: 700; letter-spacing: -.024em; line-height: 1.3; margin-bottom: .45rem; }
.ae-relcard p { font-size: .89rem; color: var(--ae-muted); }

/* ---------- Blog index ------------------------------------------------ */
.ae-blogcard { overflow: hidden; padding: 0; text-decoration: none; }
.ae-blogcard img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .4s var(--ae-ease); }
.ae-blogcard:hover img { transform: scale(1.04); }
.ae-blogcard__media { overflow: hidden; }
.ae-blogcard__b { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.ae-blogcard__meta { font-family: var(--ae-mono); font-size: .655rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ae-faint); margin-bottom: .6rem; display: flex; gap: .9rem; flex-wrap: wrap; }
.ae-blogcard h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.028em; line-height: 1.26; margin-bottom: .5rem; }
.ae-blogcard p { font-size: .92rem; color: var(--ae-muted); }
.ae-blogcard .ae-link { margin-top: auto; padding-top: 1.1rem; align-self: flex-start; }

/* ---------- Print ----------------------------------------------------- */
@media print {
	.ae-header, .ae-topbar, .ae-footer, .ae-wa, .ae-inline, .ae-wastrip, .ae-related { display: none !important; }
	.ae-art { border: 0; }
}
