/* wingdevs.com blog: the listing (/blog/) and a single post. Loaded after wingdevs.css; every rule is scoped
   under .wd and uses the design tokens defined there. */

/* Listing ------------------------------------------------------------------- */
.wd .wd-blog-hero { padding: clamp(56px, 8vw, 92px) 0 clamp(28px, 4vw, 44px); text-align: center; }
.wd .wd-blog-hero h1 { max-width: 18ch; margin: 14px auto 16px; }
.wd .wd-blog-hero .wd-lead { margin: 0 auto; }
.wd .wd-blog-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 30px 0 0; padding: 0; list-style: none; }
.wd .wd-blog-cats a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--wd-line-2); color: var(--wd-ink-2); font: 600 .92rem/1 var(--wd-font-body); text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
.wd .wd-blog-cats a:hover { border-color: var(--wd-primary); color: var(--wd-primary); }
.wd .wd-blog-cats a.is-active { background: var(--wd-ink); border-color: var(--wd-ink); color: #fff; }

.wd .wd-blog-list { padding: 8px 0 clamp(56px, 8vw, 96px); }
.wd .wd-post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--wd-line); border-radius: var(--wd-r-lg); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.wd .wd-post-card:hover { transform: translateY(-3px); box-shadow: var(--wd-shadow-md); border-color: transparent; }
.wd .wd-post-card__img { aspect-ratio: 1200 / 630; background: var(--wd-bg-2); overflow: hidden; }
.wd .wd-post-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wd .wd-post-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.wd .wd-post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .82rem; color: var(--wd-ink-3); }
.wd .wd-post-card__cat { font: 700 .74rem/1 var(--wd-font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--wd-primary); }
.wd .wd-post-card h2, .wd .wd-post-card h3 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.wd .wd-post-card p { margin: 0; color: var(--wd-ink-2); font-size: .97rem; line-height: 1.55; }
.wd .wd-post-card__foot { margin-top: auto; padding-top: 6px; font-size: .84rem; color: var(--wd-ink-3); }
.wd .wd-blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.wd .wd-post-card--featured { display: grid; grid-template-columns: 1.15fr 1fr; margin-bottom: 28px; }
.wd .wd-post-card--featured .wd-post-card__img { aspect-ratio: auto; min-height: 100%; }
.wd .wd-post-card--featured .wd-post-card__body { justify-content: center; padding: clamp(24px, 4vw, 48px); gap: 14px; }
.wd .wd-post-card--featured h2, .wd .wd-post-card--featured h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.025em; }
.wd .wd-post-card--featured p { font-size: 1.05rem; }

.wd .wd-blog-pager { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.wd .wd-blog-pager a, .wd .wd-blog-pager span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--wd-line-2); color: var(--wd-ink-2); font-weight: 600; text-decoration: none; }
.wd .wd-blog-pager .is-current { background: var(--wd-ink); border-color: var(--wd-ink); color: #fff; }

/* Signup panel (listing and post) ------------------------------------------------ */
.wd .wd-blog-signup { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; padding: clamp(28px, 4vw, 44px); border-radius: var(--wd-r-xl); background: linear-gradient(135deg, #f1ecff, #fbeaf3); }
.wd .wd-blog-signup h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 10px; }
.wd .wd-blog-signup p { margin: 0; color: var(--wd-ink-2); }
.wd .wd-blog-signup form { display: flex; gap: 10px; }
.wd .wd-blog-signup input[type=email] { flex: 1; min-width: 0; height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--wd-line-2); background: #fff; font: 500 1rem var(--wd-font-body); }
.wd .wd-blog-signup small { display: block; margin-top: 10px; color: var(--wd-ink-3); font-size: .82rem; }

/* Single post ------------------------------------------------------------------ */
.wd .wd-post-head { padding: clamp(36px, 6vw, 64px) 0 28px; }
.wd .wd-post-head .wd-container { max-width: 1100px; }
.wd .wd-post-head h1, .wd .wd-post-head .wd-lead { max-width: 820px; }
.wd .wd-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; font-size: .88rem; color: var(--wd-ink-3); }
.wd .wd-crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--wd-line-2); }
.wd .wd-crumbs a { color: var(--wd-ink-2); text-decoration: none; }
.wd .wd-crumbs a:hover { color: var(--wd-primary); }
.wd .wd-post-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); line-height: 1.08; margin: 12px 0 18px; }
.wd .wd-post-head .wd-lead { max-width: 64ch; }
.wd .wd-post-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 24px; font-size: .92rem; color: var(--wd-ink-3); }
.wd .wd-post-byline__who { display: inline-flex; align-items: center; gap: 10px; color: var(--wd-ink); font-weight: 600; }
.wd .wd-post-byline__who img { width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: var(--wd-shadow-sm); }
.wd .wd-post-cover { max-width: 1100px; margin: 0 auto; padding: 0 var(--wd-gutter); }
.wd .wd-post-cover img { display: block; width: 100%; height: auto; border-radius: var(--wd-r-xl); box-shadow: var(--wd-shadow-md); }

.wd .wd-post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; max-width: 1100px; margin: 0 auto; padding: clamp(36px, 5vw, 56px) var(--wd-gutter) clamp(48px, 6vw, 72px); }
.wd .wd-post-aside { position: relative; }
.wd .wd-post-aside__sticky { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.wd .wd-post-toc { padding: 18px 20px; border: 1px solid var(--wd-line); border-radius: var(--wd-r-md); }
.wd .wd-post-toc strong { display: block; margin-bottom: 10px; font: 700 .78rem/1 var(--wd-font-display); letter-spacing: .1em; text-transform: uppercase; color: var(--wd-ink-3); }
.wd .wd-post-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.wd .wd-post-toc li { counter-increment: toc; margin: 0; }
.wd .wd-post-toc a { display: flex; gap: 8px; padding: 6px 0; color: var(--wd-ink-2); font-size: .9rem; line-height: 1.35; text-decoration: none; }
.wd .wd-post-toc a::before { content: counter(toc); flex: none; width: 18px; color: var(--wd-ink-3); font-variant-numeric: tabular-nums; }
.wd .wd-post-toc a:hover { color: var(--wd-primary); }
.wd .wd-post-cta { padding: 22px; border-radius: var(--wd-r-md); background: var(--wd-ink); color: #fff; }
.wd .wd-post-cta img { width: 40px; height: 40px; }
.wd .wd-post-cta h3 { margin: 12px 0 8px; color: #fff; font-size: 1.1rem; }
.wd .wd-post-cta p { margin: 0 0 16px; color: rgba(255, 255, 255, .78); font-size: .92rem; line-height: 1.5; }
.wd .wd-post-cta .wd-btn { width: 100%; justify-content: center; }

/* The article text */
.wd .wd-prose { font-size: 1.075rem; line-height: 1.75; color: var(--wd-ink-2); }
.wd .wd-prose > * { margin: 0 0 1.15em; }
.wd .wd-prose h2 { margin: 2em 0 .6em; color: var(--wd-ink); font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.2; scroll-margin-top: 96px; }
.wd .wd-prose h3 { margin: 1.6em 0 .5em; color: var(--wd-ink); font-size: 1.22rem; scroll-margin-top: 96px; }
.wd .wd-prose a { color: var(--wd-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.wd .wd-prose strong { color: var(--wd-ink); }
.wd .wd-prose ul, .wd .wd-prose ol { padding-left: 1.3em; }
.wd .wd-prose ul { list-style: disc; }
.wd .wd-prose li { margin: .35em 0; }
.wd .wd-prose li::marker { color: var(--wd-primary); font-weight: 700; }
.wd .wd-prose code { padding: 2px 6px; border-radius: 6px; background: var(--wd-bg-3); color: var(--wd-ink); font-size: .9em; }
.wd .wd-prose pre { overflow-x: auto; padding: 18px 20px; border-radius: var(--wd-r-md); background: var(--wd-ink); color: #e2e8f0; font-size: .86rem; line-height: 1.6; tab-size: 4; }
.wd .wd-prose pre code { padding: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; }
.wd .wd-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.wd .wd-prose th, .wd .wd-prose td { padding: 10px 12px; border-bottom: 1px solid var(--wd-line); text-align: left; vertical-align: top; }
.wd .wd-prose th { background: var(--wd-bg-2); color: var(--wd-ink); font-weight: 700; }
.wd .wd-prose figure { margin: 1.8em 0; }
.wd .wd-prose figure img { display: block; width: 100%; height: auto; border-radius: var(--wd-r-md); border: 1px solid var(--wd-line); box-shadow: var(--wd-shadow-sm); }
.wd .wd-prose figcaption { margin-top: 10px; font-size: .88rem; color: var(--wd-ink-3); text-align: center; }
.wd .wd-prose .wd-answer { padding: 20px 22px; border-radius: var(--wd-r-md); background: var(--wd-bg-2); border-left: 4px solid var(--wd-primary); color: var(--wd-ink); }
.wd .wd-prose .wd-answer ol { margin: 10px 0 0; }
.wd .wd-callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--wd-r-md); background: var(--wd-primary-soft); color: var(--wd-ink); font-size: .98rem; line-height: 1.6; }
.wd .wd-callout svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--wd-primary); }
.wd .wd-callout--pro { background: linear-gradient(135deg, #f1ecff, #fdebf3); }
.wd .wd-callout--tip { background: var(--wd-green-soft); }
.wd .wd-callout--tip svg { color: var(--wd-green); }
.wd .wd-callout p { margin: 0; }
.wd .wd-numbered { counter-reset: step; list-style: none; padding: 0 !important; }
.wd .wd-numbered > li { counter-increment: step; position: relative; padding-left: 46px; margin: 0 0 14px; }
.wd .wd-numbered > li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--wd-ink); color: #fff; font: 700 .85rem/1 var(--wd-font-display); }
.wd .wd-prose details { border: 1px solid var(--wd-line); border-radius: var(--wd-r-md); padding: 0 20px; margin: 0 0 12px; }
.wd .wd-prose summary { cursor: pointer; padding: 16px 0; color: var(--wd-ink); font-weight: 700; list-style: none; }
.wd .wd-prose summary::-webkit-details-marker { display: none; }
.wd .wd-prose summary::after { content: '+'; float: right; color: var(--wd-ink-3); font-weight: 400; }
.wd .wd-prose details[open] summary::after { content: '−'; }
.wd .wd-prose details > p { margin: 0 0 16px; }

.wd .wd-post-author { display: flex; gap: 18px; align-items: flex-start; margin-top: 2.4em; padding: 24px; border-radius: var(--wd-r-md); background: var(--wd-bg-2); }
.wd .wd-post-author img { width: 56px; height: 56px; border-radius: 50%; background: #fff; flex: none; }
.wd .wd-post-author strong { display: block; color: var(--wd-ink); }
.wd .wd-post-author p { margin: 6px 0 0; font-size: .95rem; color: var(--wd-ink-2); }

.wd .wd-post-related { padding: 0 0 clamp(56px, 7vw, 88px); }
.wd .wd-post-related h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 24px; }

@media (max-width: 1000px) {
	.wd .wd-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wd .wd-post-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.wd .wd-post-aside__sticky { position: static; }
	.wd .wd-post-toc { display: none; }
}
@media (max-width: 760px) {
	.wd .wd-blog-grid { grid-template-columns: 1fr; }
	.wd .wd-post-card--featured { grid-template-columns: 1fr; }
	.wd .wd-post-card--featured .wd-post-card__img { aspect-ratio: 1200 / 630; }
	.wd .wd-blog-signup { grid-template-columns: 1fr; }
	.wd .wd-blog-signup form { flex-direction: column; }
	.wd .wd-prose table { display: block; overflow-x: auto; font-size: .9rem; }
	.wd .wd-prose th, .wd .wd-prose td { min-width: 140px; }
}
