/* Blog pages. Loaded after /styles.css and uses its tokens, buttons, header and footer. */

/* Index */
.blog-hero { background: linear-gradient(180deg, hsl(var(--primary-soft)) 0%, hsl(var(--surface)) 100%); }
.blog-hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 56px; padding-bottom: 40px; text-align: center; }
@media (min-width: 640px) { .blog-hero .wrap { padding-top: 72px; } }
.blog-hero h1 { font-size: 36px; }
@media (min-width: 640px) { .blog-hero h1 { font-size: 48px; } }
.post-list { display: grid; gap: 24px; margin: 0; padding: 16px 0 80px; list-style: none; }
@media (min-width: 720px) { .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .post-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; border: 1px solid hsl(var(--border)); border-radius: var(--radius-card); background: hsl(var(--surface)); box-shadow: var(--card-shadow); color: inherit; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--pop-shadow); }
.post-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: #120d2b; }
.post-card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 22px 24px; }
.post-card h2 { font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; }
.post-card p { font-size: 15px; line-height: 1.6; color: hsl(var(--muted)); }
.post-card .meta { margin-top: auto; padding-top: 6px; }

/* Post */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: hsl(var(--subtle)); }
.crumbs li + li::before { content: "/"; margin-right: 6px; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: hsl(var(--fg)); }
.post-head { background: linear-gradient(180deg, hsl(var(--primary-soft)) 0%, hsl(var(--surface)) 100%); }
.post-head .wrap { max-width: 880px; padding-top: 32px; padding-bottom: 32px; }
.post-head .tag { margin-top: 24px; }
.post-head h1 { max-width: none; margin-top: 16px; font-size: 34px; line-height: 1.12; }
@media (min-width: 640px) { .post-head h1 { font-size: 46px; } }
.post-head .lead { max-width: none; margin-top: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 600; color: hsl(var(--subtle)); }
.post-head .meta { margin-top: 20px; }
.post-hero { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .post-hero { padding: 0 32px; } }
.post-hero img { width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 20px; background: #120d2b; box-shadow: 0 30px 80px -30px hsl(var(--shadow) / 0.35); }

.prose { max-width: 720px; margin: 0 auto; padding: 48px 16px 24px; font-size: 17px; line-height: 1.75; color: hsl(var(--fg) / 0.88); }
@media (min-width: 640px) { .prose { padding: 56px 0 24px; } }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 48px; font-size: 26px; line-height: 1.25; color: hsl(var(--fg)); scroll-margin-top: 80px; }
@media (min-width: 640px) { .prose h2 { font-size: 30px; } }
.prose h3 { margin-top: 32px; font-size: 19px; color: hsl(var(--fg)); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: hsl(var(--primary)); }
.prose strong { color: hsl(var(--fg)); }
.prose a { font-weight: 600; text-underline-offset: 3px; }
.prose code { padding: 2px 6px; border-radius: 6px; background: hsl(var(--primary-soft)); color: hsl(var(--iris-text)); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; overflow-wrap: anywhere; }
.prose pre { overflow-x: auto; padding: 18px 20px; border-radius: 14px; background: #120d2b; color: #e9e5ff; font-size: 14px; line-height: 1.65; }
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.table-wrap { overflow-x: auto; border: 1px solid hsl(var(--border)); border-radius: 14px; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid hsl(var(--border)); text-align: left; vertical-align: top; }
.prose th { background: hsl(var(--bg)); color: hsl(var(--fg)); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose hr { height: 1px; margin: 40px 0; border: 0; background: hsl(var(--border)); }

.toc { padding: 18px 22px; border: 1px solid hsl(var(--border)); border-radius: 14px; background: hsl(var(--bg)); font-size: 15px; }
.toc b { display: block; margin-bottom: 8px; color: hsl(var(--fg)); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li + li { margin-top: 4px; }
.toc a { font-weight: 600; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.callout { padding: 16px 20px; border: 1px solid hsl(var(--iris-line)); border-radius: 14px; background: hsl(var(--iris-wash)); font-size: 16px; line-height: 1.65; }
.callout.warn { border-color: hsl(var(--warn-line)); background: hsl(var(--warn-wash)); }
.callout b:first-child { color: hsl(var(--fg)); }

.post-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 40px; padding: 28px; border-radius: 20px; background: linear-gradient(135deg, hsl(254 85% 58%) 0%, hsl(258 90% 66%) 100%); color: #fff; }
.prose .post-cta { margin-top: 40px; }
.post-cta h2, .prose .post-cta h2 { margin: 0; font-size: 24px; color: #fff; }
.post-cta p { margin: 0; color: rgba(255, 255, 255, 0.88); font-size: 16px; line-height: 1.6; }
.post-cta .btn { margin-top: 4px; text-decoration: none; }
.post-cta small { font-size: 13px; color: rgba(255, 255, 255, 0.75); }

.faq-list.in-post { margin-top: 20px; }
.faq-list.in-post details p { margin-top: -4px; font-size: 16px; }

.related { padding: 56px 0 80px; background: hsl(var(--bg)); }
.related h2 { font-size: 26px; }
.related .post-list { padding: 24px 0 0; }

.byline-note { margin-top: 40px; padding-top: 20px; border-top: 1px solid hsl(var(--border)); font-size: 14px; color: hsl(var(--subtle)); }
.prose .byline-note + .post-cta { margin-top: 24px; }
