/* Blog: knowledge list, topic filter, article page. Loaded after doctor.css. */

.blog-top { padding-bottom: 36px; }
.blog-top h1 { max-width: 900px; text-wrap: balance; }
.blog-top--article { padding-bottom: 0; background: none; }
.blog-top--article h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.2; max-width: 880px; }

/* Topic filter */
.blog-list { padding-top: 32px; }
.blog-filter ul { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.blog-filter a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--navy); background: var(--white); transition: border-color .2s, background .2s; }
.blog-filter a span { font-size: 13px; color: var(--muted); }
.blog-filter a:hover { border-color: var(--brand); }
.blog-filter a[aria-current] { background: var(--brand); border-color: var(--brand); color: var(--white); }
.blog-filter a[aria-current] span { color: rgba(255, 255, 255, .85); }

/* Cards */
.blog-grid { row-gap: 44px; }
.blog-card .post__img { margin-bottom: 14px; background: var(--tint-soft); }
.blog-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.blog-card__meta span { color: var(--teal-ink); font-weight: 600; }
.blog-card h2, .blog-card h3 { font-size: 19px; line-height: 1.4; font-weight: 600; color: var(--navy); }
.blog-card h2 a:hover, .blog-card h3 a:hover { color: var(--teal-ink); }
.blog-empty { margin-bottom: 32px; max-width: 720px; color: var(--muted); }
.blog-more { margin-top: 36px; }

.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); }
.pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: var(--white); }

/* Article head */
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 18px 0 26px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.blog-meta a { color: var(--teal-ink); font-weight: 500; }
.blog-meta a:hover { text-decoration: underline; }
.blog-meta__topic { padding: 4px 12px; border-radius: 999px; background: var(--tint); }
.blog-meta__topic:hover { text-decoration: none !important; }

/* Article body: text column with the contents list beside it */
.blog-body { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 740px); gap: 56px; justify-content: center; padding-top: 36px; padding-bottom: 24px; }
.blog-side { order: 0; }
.blog-toc { font-size: 14px; }
.blog-toc--side { position: sticky; top: calc(var(--header-h) + 20px); }
.blog-toc--box { display: none; }
.blog-toc__h, .blog-toc summary { font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.blog-toc summary { cursor: pointer; list-style: none; }
.blog-toc summary::-webkit-details-marker { display: none; }
.blog-toc ol { margin: 0; padding: 0 0 0 0; list-style: none; counter-reset: toc; border-left: 2px solid var(--line); }
.blog-toc li { counter-increment: toc; }
.blog-toc a { display: block; padding: 7px 0 7px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-soft); line-height: 1.45; }
.blog-toc a:hover { color: var(--teal-ink); border-left-color: var(--brand-hi); }

.blog-lead { font-size: 19px; line-height: 1.65; color: var(--navy); font-weight: 500; margin-bottom: 28px; }
.blog-cover { margin-bottom: 32px; }
.blog-cover img { width: 100%; border-radius: var(--radius); }

.blog-prose { font-size: 17px; line-height: 1.75; color: var(--ink); }
.blog-prose > * + * { margin-top: 18px; }
.blog-prose h2 { margin-top: 44px; font-size: clamp(23px, 2.4vw, 28px); line-height: 1.3; font-weight: 700; color: var(--navy); text-wrap: balance; }
.blog-prose h3 { margin-top: 30px; font-size: 20px; line-height: 1.4; font-weight: 600; color: var(--teal-ink); }
.blog-prose h2 + *, .blog-prose h3 + * { margin-top: 12px; }
.blog-prose ul, .blog-prose ol { padding-left: 1.4em; }
.blog-prose ul { list-style: disc; }
.blog-prose ol { list-style: decimal; }
.blog-prose li + li { margin-top: 8px; }
.blog-prose li::marker { color: var(--teal-ink); }
.blog-prose a { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; }
.blog-prose a:hover { color: var(--navy); }
.blog-prose strong { font-weight: 600; color: var(--navy); }
.blog-prose figure { margin-block: 30px; }
.blog-prose figure img { margin-inline: auto; border-radius: 14px; }
.blog-prose figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
.blog-prose blockquote { margin: 28px 0; padding: 18px 22px; background: var(--tint-soft); border-radius: 12px; }
.blog-prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.blog-prose th, .blog-prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.blog-prose th { background: var(--tint-soft); color: var(--navy); }
.blog-prose mark.todo { font-size: .85em; }

.blog-service { margin-top: 36px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; font-size: 16px; }
.blog-service a { color: var(--teal-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.blog-author { display: flex; gap: 18px; align-items: flex-start; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.blog-author img { width: 80px; height: 80px; flex: none; object-fit: cover; object-position: top; border-radius: 50%; background: var(--tint); }
.blog-author__label { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.blog-author__name { font-size: 18px; font-weight: 700; color: var(--navy); margin: 2px 0 6px; }
.blog-author__name a:hover { color: var(--teal-ink); }
.blog-author p:last-child { font-size: 15px; color: var(--ink-soft); }
.blog-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

.blog-related { padding-top: 40px; background: var(--tint-soft); }
.blog-related .posts__grid { margin-top: 28px; }

@media (max-width: 1024px) {
	.blog-body { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 820px; }
	.blog-toc--side { display: none; }
	.blog-toc--box { display: block; margin-bottom: 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--tint-soft); }
	.blog-toc summary { margin-bottom: 0; }
	.blog-toc[open] summary { margin-bottom: 10px; }
	.blog-toc summary::after { content: "+"; float: right; font-weight: 400; }
	.blog-toc[open] summary::after { content: "–"; }
	.blog-toc ol { border-left: 0; }
	.blog-toc a { padding-left: 0; border-left: 0; }
}

@media (max-width: 640px) {
	.blog-top--article h1 { font-size: 28px; }
	.blog-filter ul { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
	.blog-filter a { white-space: nowrap; }
	.blog-lead { font-size: 17px; }
	.blog-prose { font-size: 16px; }
	.blog-prose h2 { margin-top: 36px; }
	.blog-author img { width: 64px; height: 64px; }
}

/* Phones: the breadcrumb stays on one line, so a late font swap cannot push the article down (CLS, 26/11/2026). */
@media (max-width: 640px) {
	.blog-top .crumbs { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
	.blog-top .crumbs > :last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
/* Phones: one meta item per line, so the line count does not change when the font swaps in (CLS). */
@media (max-width: 640px) {
	.blog-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Article sources (26/11/2026) */
.blog-refs { margin-top: 32px; font-size: 14px; color: var(--muted); }
.blog-refs summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.blog-refs ol { margin: 12px 0 0; padding-left: 1.3em; list-style: decimal; }
.blog-refs li + li { margin-top: 6px; }
.blog-refs a { color: var(--teal-ink); word-break: break-word; }

/* Short articles without a contents list: one centred column (26/11/2026). */
.blog-body--solo { grid-template-columns: minmax(0, 740px); }
.blog-body--solo .blog-side { display: none; }
