/*
 * Blog: "Tips & guides" listing (index.php) and articles (single.php). Helpers in inc/blog.php.
 */

/* Header (listing and article) */
.anb-hero { padding: 22px 0 28px; background: var(--an-surface); border-bottom: 1px solid var(--an-line); }
.anb-hero--list { padding-bottom: 0; }
.anb-hero__in { max-width: 980px; }
.anb-hero--list .anb-hero__in { max-width: none; }
.anb-hero__title { margin: 14px 0 0; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.1; letter-spacing: -.02em; }
.anb-hero__dek { max-width: 68ch; margin: 14px 0 0; color: var(--an-ink-2); font-size: clamp(16px, 1.6vw, 18.5px); line-height: 1.6; }
.anb-hero__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; color: var(--an-muted); font-size: 14px; }
.anb-hero__meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 14px 3px -10px; border-radius: 50%; background: var(--an-line-2); }
.anb-chips { margin-top: 22px; }
.anb-chips .ans-chips__track { display: flex; gap: 8px; padding: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.anb-chips .ans-chips__track::-webkit-scrollbar { display: none; }
.anb-chips .an-chip { flex: none; }

/* Cards */
.anb-grid { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .anb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1100px) { .anb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.anb-grid > li { display: flex; }
.anb-card { display: flex; flex-direction: column; width: 100%; overflow: hidden; border: 1px solid var(--an-line); border-radius: var(--an-r-lg); background: var(--an-surface); transition: box-shadow .2s var(--an-ease), transform .2s var(--an-ease); }
.anb-card:hover { box-shadow: var(--an-shadow); transform: translateY(-2px); }
.anb-card__img { display: block; aspect-ratio: 1200 / 630; overflow: hidden; background: var(--an-brand-soft); }
.anb-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.anb-card__body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 18px 20px; }
.anb-card__kicker { margin: 0; color: var(--an-brand); font: 700 12px/1.2 var(--an-display); letter-spacing: .12em; text-transform: uppercase; }
.anb-card__title { margin: 0; font-size: 19px; line-height: 1.3; }
.anb-card__title a { color: var(--an-ink); text-decoration: none; }
.anb-card__title a::after { content: ""; position: absolute; inset: 0; }
.anb-card { position: relative; }
.anb-card__title a:hover { color: var(--an-brand); }
.anb-card__text { margin: 0; color: var(--an-muted); font-size: 15px; line-height: 1.55; }
.anb-card__meta { margin: auto 0 0; padding-top: 6px; color: var(--an-faint); font-size: 13px; font-weight: 600; }
.anb-list__body { padding-block: 32px 56px; }

/* Article layout */
.anb-layout { display: grid; gap: 24px; padding-block: 28px 48px; }
@media (min-width: 1100px) {
	.anb-layout { grid-template-columns: 260px minmax(0, 820px); justify-content: center; gap: 48px; padding-block: 40px 64px; }
	.anb-layout--solo { grid-template-columns: minmax(0, 820px); }
}
.anb-main { min-width: 0; }
.anb-cover { margin: 0 0 28px; overflow: hidden; border-radius: var(--an-r-lg); background: var(--an-brand-soft); }
.anb-cover img { display: block; width: 100%; height: auto; }
.anb-body { font-size: 17px; }
.anb-body > * { max-width: none; }
.anb-body h2 { scroll-margin-top: calc(var(--an-header-h) + 16px); }
.anb-body table { display: block; overflow-x: auto; border-collapse: collapse; }
@media (min-width: 768px) { .anb-body table { display: table; } }
.anb-body blockquote p { margin: 0; }

/* Table of contents */
.anb-toc__box { border: 1px solid var(--an-line); border-radius: var(--an-r-md); background: var(--an-surface); }
.anb-toc__box summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: pointer; list-style: none; font: 700 15px/1.2 var(--an-display); color: var(--an-ink); }
.anb-toc__box summary::-webkit-details-marker { display: none; }
.anb-toc__box summary svg { transition: transform .2s var(--an-ease); }
.anb-toc__box[open] summary svg { transform: rotate(180deg); }
.anb-toc__box ol { margin: 0; padding: 0 16px 16px 34px; font-size: 14.5px; line-height: 1.45; }
.anb-toc__box li { margin: 8px 0; }
.anb-toc__box li::marker { color: var(--an-faint); }
.anb-toc__box a { color: var(--an-ink-2); text-decoration: none; }
.anb-toc__box a:hover { color: var(--an-brand); text-decoration: underline; }
@media (min-width: 1100px) {
	.anb-toc { position: sticky; top: calc(var(--an-header-h) + 20px); align-self: start; max-height: calc(100vh - var(--an-header-h) - 40px); overflow: auto; }
	.anb-toc__box summary { pointer-events: none; }
	.anb-toc__box summary svg { display: none; }
}

/* Shop the post */
.anb-shop { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--an-line); }
.anb-shop__title { margin: 0; font-size: clamp(22px, 2.4vw, 28px); }
.anb-shop__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .anb-shop__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

/* Related and band */
.anb-related { background: var(--an-surface); border-top: 1px solid var(--an-line); }
.anb-band { background: var(--an-brand-deep); color: var(--an-cream); }
.anb-band__in { display: grid; gap: 14px; justify-items: start; padding-block: 40px; }
@media (min-width: 900px) { .anb-band__in { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 40px; } .anb-band__in .an-btn { grid-row: 1 / span 2; grid-column: 2; } }
.anb-band__title { margin: 0; font: 700 clamp(26px, 3.4vw, 38px)/1.15 var(--an-display); color: var(--an-cream); }
.anb-band__sub { margin: 0; max-width: 60ch; color: rgba(255, 248, 231, .86); }
