/* Astonishing Detail – blog post template
   Colours and fonts taken from the site's Elementor global kit. */
.ad-single {
	--ad-bg: #06090D;
	--ad-surface: #0E161C;
	--ad-surface-2: #152128;
	--ad-line: rgba(255, 255, 255, 0.09);
	--ad-text: rgba(255, 255, 255, 0.86);
	--ad-head: #FFFFFF;
	--ad-muted: #8D969E;
	--ad-teal: #01B0B9;
	--ad-teal-2: #43C8C0;
	--ad-cyan: #00FFF0;
	--ad-teal-deep: #0F6369;
	--ad-radius: 24px;
	--ad-font: "Montserrat", sans-serif;

	background: var(--ad-bg);
	color: var(--ad-text);
	font-family: var(--ad-font);
	font-size: 18px;
	line-height: 1.75;
	padding-bottom: 96px;
	overflow-x: clip;
}

.ad-single *,
.ad-single *::before,
.ad-single *::after { box-sizing: border-box; }

.ad-wrap {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 24px;
}

/* Reading progress */
.ad-progress {
	position: fixed;
	inset: 0 0 auto 0;
	height: 3px;
	z-index: 9999;
	pointer-events: none;
}
.admin-bar .ad-progress { top: 32px; }
.ad-progress span {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--ad-teal), var(--ad-cyan));
	box-shadow: 0 0 12px rgba(0, 255, 240, 0.6);
	transition: width 0.1s linear;
}

/* Hero */
.ad-hero {
	position: relative;
	padding: 72px 0 40px;
	text-align: center;
	isolation: isolate;
}
.ad-hero::before {
	content: "";
	position: absolute;
	inset: -40% 10% auto;
	height: 520px;
	background: radial-gradient(closest-side, rgba(1, 176, 185, 0.22), transparent 70%);
	z-index: -1;
	pointer-events: none;
}
.ad-crumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ad-muted);
	margin-bottom: 28px;
}
.ad-crumbs a { color: var(--ad-muted); text-decoration: none; }
.ad-crumbs a:hover { color: var(--ad-cyan); }
.ad-pill {
	display: inline-block;
	padding: 6px 16px;
	border-radius: 999px;
	border: 1px solid rgba(1, 176, 185, 0.5);
	background: rgba(1, 176, 185, 0.1);
	color: var(--ad-cyan);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	margin-bottom: 20px;
}
.ad-pill:hover { background: rgba(1, 176, 185, 0.2); color: var(--ad-cyan); }
.ad-single .ad-title {
	max-width: 960px;
	margin: 0 auto 24px;
	font-family: var(--ad-font);
	font-size: clamp(32px, 4.6vw, 54px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.01em;
	color: var(--ad-head);
	text-wrap: balance;
}
.ad-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 14px;
	font-size: 15px;
	color: var(--ad-muted);
}
.ad-meta__author { display: inline-flex; align-items: center; gap: 10px; color: var(--ad-text); font-weight: 600; }
.ad-avatar {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--ad-teal), var(--ad-teal-deep));
	color: #06090D;
	font-size: 12px;
	font-weight: 800;
}
.ad-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ad-teal); }

/* Cover image */
.ad-cover {
	margin: 0 auto 56px;
	max-width: 1100px;
	border-radius: var(--ad-radius);
	overflow: hidden;
	border: 1px solid var(--ad-line);
	box-shadow: 0 30px 80px -30px rgba(1, 176, 185, 0.35);
}
.ad-cover img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; }

/* Layout */
.ad-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 64px;
	align-items: start;
}
.ad-article { min-width: 0; max-width: 780px; }

.ad-single .ad-title,
.ad-single .ad-card__title,
.ad-single .ad-band__title,
.ad-single .ad-related__head h2 { text-transform: none; }

/* Article typography */
.ad-content { color: var(--ad-text); font-size: 18px; line-height: 1.8; }
.ad-content > *:first-child { margin-top: 0; }
.ad-content p,
.ad-content ul,
.ad-content ol { margin: 0 0 1.25em; color: var(--ad-text); }
.ad-content p:empty { display: none; }
.ad-content strong,
.ad-content b { color: var(--ad-head); font-weight: 700; }
.ad-content h1,
.ad-content h2,
.ad-content h3,
.ad-content h4,
.ad-content h5,
.ad-content h6 {
	font-family: var(--ad-font);
	color: var(--ad-head);
	line-height: 1.25;
	letter-spacing: -0.01em;
	scroll-margin-top: 110px;
}
.ad-content h1,
.ad-content h2 {
	font-size: clamp(26px, 2.6vw, 32px);
	font-weight: 800;
	margin: 2em 0 0.7em;
	padding-left: 18px;
	border-left: 4px solid var(--ad-teal);
}
.ad-content h3 { font-size: 23px; font-weight: 700; margin: 1.7em 0 0.6em; color: var(--ad-cyan); }
.ad-content h4,
.ad-content h5,
.ad-content h6 { font-size: 19px; font-weight: 700; margin: 1.5em 0 0.5em; }
.ad-content a {
	color: var(--ad-teal);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(1, 176, 185, 0.4);
	text-underline-offset: 3px;
	transition: color 0.2s, text-decoration-color 0.2s;
}
.ad-content a:hover { color: var(--ad-cyan); text-decoration-color: var(--ad-cyan); }
.ad-content ul,
.ad-content ol { padding-left: 1.4em; }
.ad-content li { margin-bottom: 0.5em; padding-left: 4px; }
.ad-content ul li::marker { color: var(--ad-teal); }
.ad-content ol li::marker { color: var(--ad-teal); font-weight: 700; }
.ad-content img {
	max-width: 100%;
	height: auto;
	border-radius: 18px;
	margin: 0.6em 0 1.4em;
	display: block;
}
.ad-content figure { margin: 2em 0; max-width: 100%; }
.ad-content figcaption { font-size: 14px; color: var(--ad-muted); text-align: center; margin-top: -0.6em; }
.ad-content blockquote {
	margin: 2em 0;
	padding: 24px 28px;
	border-radius: 18px;
	background: var(--ad-surface-2);
	border-left: 4px solid var(--ad-cyan);
	font-size: 20px;
	font-style: italic;
	color: var(--ad-head);
}
.ad-content blockquote p:last-child { margin-bottom: 0; }
.ad-content hr { border: 0; height: 1px; background: var(--ad-line); margin: 2.5em 0; }
.ad-content table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 2em 0;
	font-size: 16px;
	border: 1px solid var(--ad-line);
	border-radius: 16px;
	overflow: hidden;
	display: block;
	overflow-x: auto;
}
.ad-content th,
.ad-content td { padding: 14px 18px; border-bottom: 1px solid var(--ad-line); text-align: left; vertical-align: top; color: var(--ad-text); }
.ad-content th { background: var(--ad-surface-2); color: var(--ad-head); font-weight: 700; }
.ad-content tr:last-child td { border-bottom: 0; }
.ad-content iframe,
.ad-content video { max-width: 100%; border-radius: 18px; }

/* Tags + share */
.ad-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.ad-tags a {
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--ad-surface-2);
	color: var(--ad-text);
	font-size: 14px;
	text-decoration: none;
}
.ad-tags a:hover { color: var(--ad-cyan); }
.ad-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 40px;
	padding-top: 28px;
	border-top: 1px solid var(--ad-line);
	font-size: 15px;
}
.ad-share span { color: var(--ad-muted); margin-right: 6px; }
.ad-share a {
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--ad-line);
	color: var(--ad-head);
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s;
}
.ad-share a:hover { border-color: var(--ad-teal); color: var(--ad-cyan); }

/* Sidebar */
.ad-sidebar { display: flex; flex-direction: column; gap: 20px; align-self: stretch; }
.ad-toc { position: sticky; top: 110px; }
.admin-bar .ad-toc { top: 142px; }
.ad-card {
	padding: 26px;
	border-radius: var(--ad-radius);
	background: var(--ad-surface);
	border: 1px solid var(--ad-line);
}
.ad-card[hidden] { display: none; }
.ad-card__label {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ad-teal);
}
.ad-single .ad-card__title { margin: 0 0 10px; font-family: var(--ad-font); font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--ad-head); }
.ad-card__text { margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: var(--ad-text); }
.ad-card--cta {
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(0, 255, 240, 0.18), transparent 60%),
		linear-gradient(160deg, #0F3A3E 0%, #0B1F24 100%);
	border-color: rgba(1, 176, 185, 0.35);
}
.ad-toc__list { list-style: none; margin: 0; padding: 0 6px 0 0; counter-reset: toc; max-height: calc(100vh - 220px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(1, 176, 185, 0.5) transparent; }
.ad-toc__list li { counter-increment: toc; margin: 0; }
.ad-toc__list a {
	display: grid;
	grid-template-columns: 26px 1fr;
	gap: 6px;
	padding: 8px 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--ad-muted);
	text-decoration: none;
	border-bottom: 1px solid var(--ad-line);
	transition: color 0.2s;
}
.ad-toc__list li:last-child a { border-bottom: 0; }
.ad-toc__list a::before { content: counter(toc, decimal-leading-zero); color: var(--ad-teal); font-weight: 700; font-size: 12px; padding-top: 2px; }
.ad-toc__list a:hover,
.ad-toc__list a.is-active { color: var(--ad-head); }
.ad-links { list-style: none; margin: 0; padding: 0; }
.ad-links a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 11px 0;
	border-bottom: 1px solid var(--ad-line);
	color: var(--ad-text);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.ad-links li:last-child a { border-bottom: 0; }
.ad-links a::after { content: "→"; color: var(--ad-teal); transition: transform 0.2s; }
.ad-links a:hover { color: var(--ad-cyan); }
.ad-links a:hover::after { transform: translateX(4px); }

/* Buttons */
.ad-btn {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 13px 22px;
	border-radius: 999px;
	background: var(--ad-teal);
	color: #06090D;
	font-family: var(--ad-font);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	border: 2px solid var(--ad-teal);
	transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}
.ad-btn + .ad-btn { margin-top: 10px; }
.ad-btn:hover { background: var(--ad-cyan); border-color: var(--ad-cyan); color: #06090D; transform: translateY(-1px); }
.ad-btn--ghost { background: transparent; color: var(--ad-head); border-color: rgba(255, 255, 255, 0.25); }
.ad-btn--ghost:hover { background: transparent; color: var(--ad-cyan); border-color: var(--ad-cyan); }
.ad-btn--dark { background: #06090D; color: #fff; border-color: #06090D; }
.ad-btn--dark:hover { background: #152128; border-color: #152128; color: var(--ad-cyan); }
.ad-btn--outline { background: transparent; color: #06090D; border-color: #06090D; }
.ad-btn--outline:hover { background: #06090D; color: #fff; border-color: #06090D; }

/* CTA band */
.ad-band {
	position: relative;
	margin-top: 88px;
	padding: 52px 56px;
	border-radius: 32px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 32px;
	align-items: center;
	overflow: hidden;
	background:
		radial-gradient(60% 120% at 100% 0%, rgba(0, 255, 240, 0.55), transparent 60%),
		linear-gradient(120deg, #01B0B9 0%, #0F6369 100%);
	color: #06090D;
}
.ad-band::after {
	content: "";
	position: absolute;
	right: 28%;
	top: 22px;
	width: 34px;
	height: 34px;
	background: #00FFF0;
	clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
	opacity: 0.9;
}
.ad-band__eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #06090D; opacity: 0.75; }
.ad-single .ad-band__title { margin: 0 0 10px; font-family: var(--ad-font); font-size: clamp(26px, 3vw, 36px); font-weight: 800; line-height: 1.15; color: #06090D; }
.ad-band__text { margin: 0; font-size: 16px; line-height: 1.6; color: rgba(6, 9, 13, 0.85); max-width: 560px; }
.ad-band__actions { display: grid; gap: 12px; min-width: 240px; }
.ad-band__actions .ad-btn + .ad-btn { margin-top: 0; }

/* Related posts */
.ad-related { margin-top: 88px; }
.ad-related__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.ad-single .ad-related__head h2 { margin: 0; font-family: var(--ad-font); font-size: clamp(26px, 3vw, 36px); font-weight: 800; color: var(--ad-head); }
.ad-related__head a { color: var(--ad-teal); font-weight: 700; font-size: 15px; text-decoration: none; }
.ad-related__head a:hover { color: var(--ad-cyan); }
.ad-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ad-rcard {
	display: flex;
	flex-direction: column;
	border-radius: var(--ad-radius);
	overflow: hidden;
	background: var(--ad-surface);
	border: 1px solid var(--ad-line);
	text-decoration: none;
	transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.ad-rcard:hover { transform: translateY(-4px); border-color: rgba(1, 176, 185, 0.5); box-shadow: 0 24px 50px -24px rgba(1, 176, 185, 0.45); }
.ad-rcard__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ad-surface-2); }
.ad-rcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.ad-rcard:hover .ad-rcard__media img { transform: scale(1.04); }
.ad-rcard__ph {
	display: grid;
	place-items: center;
	height: 100%;
	font-size: 40px;
	font-weight: 800;
	color: rgba(1, 176, 185, 0.6);
	background: linear-gradient(135deg, #0F3A3E, #0B1F24);
}
.ad-rcard__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; flex: 1; }
.ad-rcard__date { font-size: 13px; color: var(--ad-muted); }
.ad-rcard__title { font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--ad-head); }
.ad-rcard__more { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--ad-teal); }

/* Comments */
.ad-comments { margin-top: 72px; max-width: 828px; color: var(--ad-text); }
.ad-comments a { color: var(--ad-teal); }

/* Responsive */
@media (max-width: 1024px) {
	.ad-layout { grid-template-columns: 1fr; gap: 48px; }
	.ad-article { max-width: none; }
	.ad-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ad-toc { display: none; }
	.ad-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ad-band { grid-template-columns: 1fr; padding: 44px 36px; }
	.ad-band__actions { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
	.admin-bar .ad-progress { top: 46px; }
}
@media (max-width: 680px) {
	.ad-single { font-size: 17px; }
	.ad-wrap { padding-inline: 18px; }
	.ad-hero { padding: 48px 0 28px; }
	.ad-cover { margin-bottom: 36px; border-radius: 18px; }
	.ad-content { font-size: 17px; }
	.ad-sidebar { grid-template-columns: 1fr; }
	.ad-related__grid { grid-template-columns: 1fr; }
	.ad-band { padding: 36px 24px; border-radius: 24px; margin-top: 64px; }
	.ad-band__actions { grid-template-columns: 1fr; }
	.ad-related { margin-top: 64px; }
}

/* The site's Additional CSS forces single-post h2/h3 sizes and colours with !important.
   These rules win over it only inside this template. */
body.single-post .ad-single .ad-content h1,
body.single-post .ad-single .ad-content h2 { font-size: clamp(26px, 2.6vw, 32px) !important; color: var(--ad-head) !important; }
body.single-post .ad-single .ad-content h3 { font-size: 23px !important; color: var(--ad-cyan) !important; }
body.single-post .ad-single .ad-content h4,
body.single-post .ad-single .ad-content h5,
body.single-post .ad-single .ad-content h6 { font-size: 19px !important; color: var(--ad-head) !important; }
body.single-post .ad-single .ad-card__title { font-size: 22px !important; color: var(--ad-head) !important; }
body.single-post .ad-single .ad-band__title { font-size: clamp(26px, 3vw, 36px) !important; color: #06090D !important; }
body.single-post .ad-single .ad-related__head h2 { font-size: clamp(26px, 3vw, 36px) !important; color: var(--ad-head) !important; }

/* Small-screen polish */
@media (max-width: 680px) {
	.ad-meta__author { flex-basis: 100%; justify-content: center; }
	.ad-meta .ad-dot:first-of-type { display: none; }
	.ad-band::after { right: 20px; top: 16px; width: 22px; height: 22px; }
}
