/* The blog and help pages, on top of landing.css. */

header.ai-hero.bl-hero { padding-bottom: 80px; }
.bl-hero .ai-hero-title { max-width: 900px; }
.bl-hero .ai-hero-sub { max-width: 880px; }
.bl-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; font-size: 15px; font-weight: 700; color: var(--ai-yellow); text-decoration: none; }
.bl-back:hover { color: #fff; }

.bl-main { padding-top: 56px; }

.bl-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 16px; align-items: end; padding: 24px; border: 1px solid var(--ai-line); border-radius: var(--ai-radius); background: #fff; }
.bl-filters:not(:has(#id_topic)) { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
.bl-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ai-muted); }
.bl .form-select { height: 48px; border: 1px solid var(--ai-line); border-radius: 12px; background-color: var(--ai-paper); font-size: 16px; color: var(--ai-ink); }
.bl .form-select:focus { border-color: var(--ai-yellow-deep); box-shadow: 0 0 0 3px rgba(247, 210, 74, .3); }
.bl .bl-submit { justify-content: center; height: 48px; padding: 0 28px; }

.bl-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0 24px; }
.bl .bl-count { margin: 0; font-size: 15px; color: var(--ai-muted); }
.bl-clear { margin-left: 12px; font-weight: 700; color: var(--ai-ink); text-decoration: underline; text-decoration-color: var(--ai-yellow); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.bl-clear:hover { color: var(--ai-ink); text-decoration-color: var(--ai-ink); }
.bl-tools { display: flex; align-items: center; gap: 12px; }
.bl-view-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--ai-line); border-radius: 999px; background: #fff; }
.bl-view-toggle a { display: grid; place-items: center; width: 36px; height: 32px; border-radius: 999px; color: var(--ai-muted); }
.bl-view-toggle a:hover { color: var(--ai-ink); }
.bl-view-toggle a.active { background: var(--ai-ink); color: #fff; }
.bl-sort { margin: 0 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ai-muted); white-space: nowrap; }
.bl .bl-tools .form-select { width: auto; height: 40px; border-radius: 999px; background-color: #fff; font-size: 14px; }

.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.bl-list { display: grid; gap: 20px; }

.bl-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--ai-line); border-radius: var(--ai-radius); background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.bl-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .35); }
/* Raised above its neighbours while in use, so an open topics panel is not covered by the next card */
.bl-card:hover, .bl-card:focus-within, .bl-card:has(.is-open) { z-index: 3; }
.bl-card > .bl-cover { border-radius: calc(var(--ai-radius) - 1px) calc(var(--ai-radius) - 1px) 0 0; }
.bl-card.is-row > .bl-cover { border-radius: calc(var(--ai-radius) - 1px) 0 0 calc(var(--ai-radius) - 1px); }
.bl-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.bl-cover-placeholder { display: grid; place-items: center; background: radial-gradient(300px 200px at 70% 30%, rgba(247, 210, 74, .25), transparent 70%), var(--ai-cream); color: var(--ai-yellow-deep); font-size: 36px; }
.bl-card-body { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.bl-card h3 { margin: 14px 0 10px; font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.bl-card-link { color: var(--ai-ink); text-decoration: none; }
.bl-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bl-card:hover .bl-card-link { color: var(--ai-ink); }
.bl-card-link:focus-visible { outline: none; }
.bl-card:has(.bl-card-link:focus-visible) { outline: 3px solid var(--ai-yellow-deep); outline-offset: 3px; }
.bl .bl-summary { margin-bottom: 20px; font-size: 16px; line-height: 1.55; color: var(--ai-ink-soft); }
.bl-card .bl-meta { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--ai-line); }

.bl-card.is-row { flex-direction: row; }
.bl-card.is-row { min-height: 180px; }
/* Sized by the row, not by the picture: without size containment a square or portrait cover would make its row taller than the rest */
.bl-card.is-row .bl-cover { width: 260px; height: auto; flex: none; align-self: stretch; aspect-ratio: auto; contain: size; }
.bl-card.is-row h3 { margin-top: 0; }
.bl-row-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--ai-line); }
.bl-card .bl-row-foot .bl-meta { display: block; margin: 0 0 0 auto; padding: 0; border: 0; }

.bl-topics { display: flex; flex-wrap: wrap; gap: 6px; }
/* The pastel the editor picked fills the chip; the same hue, darkened, draws its edge, its dot and its text, so a pale topic stays readable on any background */
.bl-topic { --tone: var(--topic, #e9ecef); position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 1px solid color-mix(in srgb, var(--tone), #000 14%); border-radius: 999px; background: var(--tone); font-size: 12px; font-weight: 700; line-height: 1.3; color: color-mix(in srgb, var(--tone), #000 74%); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.bl-topic::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--tone), #000 45%); }
.bl-topic:hover { border-color: color-mix(in srgb, var(--tone), #000 40%); color: color-mix(in srgb, var(--tone), #000 80%); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .25); }
@supports (color: oklch(from red l c h)) {
    .bl-topic { border-color: oklch(from var(--tone) calc(l - .1) calc(c * 1.6) h); color: oklch(from var(--tone) .36 calc(c * 2.6) h); }
    .bl-topic::before { background: oklch(from var(--tone) .6 calc(c * 5) h); }
    .bl-topic:hover { border-color: oklch(from var(--tone) .62 calc(c * 4) h); color: oklch(from var(--tone) .3 calc(c * 2.6) h); }
}
.bl-topic.is-more { padding: 3px 9px; border-color: var(--ai-line); background: #fff; color: var(--ai-muted); }
.bl-topic.is-more::before { content: none; }
.bl-topic.is-more:hover, .is-open > .bl-topic.is-more { border-color: var(--ai-ink); color: var(--ai-ink); box-shadow: none; }
.bl button.bl-topic.is-more { cursor: pointer; font-family: inherit; }
/* The topics past the first three, one per row in a small panel under "+N"; the panel's top padding bridges the gap so
   the pointer can travel into it without the hover ending */
.bl-topic-more { position: relative; z-index: 4; display: inline-flex; }
.bl-topic-pop { position: absolute; top: 100%; left: 0; display: none; padding-top: 8px; }
.bl-topic-more.is-open .bl-topic-pop { display: block; }
@media (hover: hover) {
    .bl-topic-more:hover .bl-topic-pop, .bl-topic-more:focus-within .bl-topic-pop { display: block; }
}
.bl-topic-pop-box { display: grid; justify-items: start; gap: 6px; padding: 10px; border: 1px solid var(--ai-line); border-radius: 14px; background: #fff; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35); animation: bl-pop .14s ease-out; }
.bl-topic-pop .bl-topic { white-space: nowrap; }
@keyframes bl-pop { from { opacity: 0; transform: translateY(-4px); } }

.bl .bl-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 0; font-size: 14px; color: var(--ai-muted); }
.bl-avatar { display: inline-grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.bl-avatar.is-large { width: 44px; height: 44px; }
.bl-avatar-placeholder { background: var(--ai-cream); color: var(--ai-yellow-deep); font-size: 14px; }
.blog-author-link { position: relative; z-index: 2; color: inherit; text-decoration: underline; text-decoration-color: var(--ai-yellow); text-underline-offset: 3px; }
.blog-author-link:hover { color: var(--ai-ink); }

.bl-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 56px; }
.bl-page { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid var(--ai-line); border-radius: 999px; background: #fff; font-weight: 700; color: var(--ai-ink); text-decoration: none; }
.bl-page:hover { border-color: var(--ai-ink); color: var(--ai-ink); }
.bl-page.is-active { border-color: var(--ai-yellow); background: var(--ai-yellow); }
.bl-page.is-disabled { opacity: .45; }
.bl-page.is-disabled:hover { border-color: var(--ai-line); }

.bl-empty { padding: 56px 0; text-align: center; }
.bl-empty h2 { margin-bottom: 24px; font-size: 24px; font-weight: 700; }
.bl .ai-btn.is-outline { border-color: var(--ai-ink); background: transparent; }
.bl .ai-btn.is-outline:hover { background: var(--ai-ink); color: #fff; }

/* The article: a light header with the title beside the cover, so the text starts within the first screen */
.bl-reading { max-width: 760px; margin: 0 auto; }
/* The article is as wide as its header: the title and cover side by side above it, or the title alone */
.bl-post.has-cover .bl-reading { max-width: 1120px; }
.bl-article-head { padding: 40px 0 56px; border-bottom: 1px solid var(--ai-line); background: var(--ai-paper); }
.bl-article-grid { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1120px; margin: 0 auto; }
.bl-article-head:not(.has-cover) .bl-article-grid { max-width: 760px; }
.has-cover .bl-article-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.bl-article-intro .bl-back { margin-bottom: 20px; }
.bl-article-intro .bl-topics { margin-bottom: 16px; }
.bl .bl-article-title { margin: 0; font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.bl .bl-article-summary { margin-top: 16px; font-size: 19px; line-height: 1.55; color: var(--ai-ink-soft); text-wrap: pretty; }
.bl .bl-article-meta { margin-top: 24px; gap: 12px; }
.bl-article-meta p { display: flex; flex-direction: column; margin: 0; line-height: 1.35; }
.bl-article-meta strong { font-weight: 700; color: var(--ai-ink); }
.bl-article-meta .blog-author-link { text-decoration-color: var(--ai-yellow); }
.bl-article-cover { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--ai-radius); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .45); }
.bl .post-status-prefix { color: var(--ai-muted); font-weight: 400; }
.blog-preview-notice { display: flex; align-items: center; gap: 10px; margin-bottom: 20px !important; padding: 10px 14px; border-radius: 12px; background: var(--ai-cream); font-size: 15px; color: #8a6a00; }
.bl-post { padding: 56px 0 96px; background: #fff; }
.bl .blog-body { font-size: 18px; }
.bl-article-topics { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ai-line); }
.bl .bl-article-topics p { margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ai-muted); }

/* The author page keeps the old layout: details on the left, the bio on the right, on a light page */
.bl-author-page { padding: 64px 0 112px; background: var(--ai-paper); }
/* Blog / the page's own name: one level only, so the trail never wraps and a long title ends in an ellipsis */
.bl-crumbs { display: flex; align-items: baseline; min-width: 0; margin: 0 0 20px !important; font-size: 15px; }
.bl-crumbs li { min-width: 0; white-space: nowrap; }
.bl-crumbs li:first-child { flex: none; }
.bl-crumbs li + li { overflow: hidden; color: var(--ai-muted); text-overflow: ellipsis; }
.bl-crumbs li + li::before { content: "/"; margin: 0 10px; color: #c9c5b8; }
.bl-crumbs a { font-weight: 700; color: var(--ai-yellow-deep); text-decoration: none; }
.bl-crumbs a:hover { color: var(--ai-ink); text-decoration: underline; text-decoration-color: var(--ai-yellow); text-underline-offset: 4px; }
.bl-author-page .bl-crumbs { margin-bottom: 28px !important; }
.bl-back.is-light { color: var(--ai-yellow-deep); }
.bl-back.is-light:hover { color: var(--ai-ink); }
.bl-author { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 48px; border: 1px solid var(--ai-line); border-radius: 28px; background: #fff; box-shadow: 0 40px 80px -60px rgba(0, 0, 0, .35); }
.bl-author-details { display: flex; align-items: flex-start; gap: 28px; padding-right: 48px; border-right: 1px solid var(--ai-line); }
.bl-author-avatar { display: grid; flex: none; place-items: center; width: 128px; height: 128px; border-radius: 50%; object-fit: cover; font-size: 44px; box-shadow: 0 0 0 6px var(--ai-cream), 0 0 0 7px rgba(217, 173, 18, .35); transition: box-shadow .3s ease; }
.bl-author-avatar:hover { box-shadow: 0 0 0 6px var(--ai-yellow), 0 0 0 7px var(--ai-yellow-deep), 0 0 24px 10px rgba(247, 210, 74, .55), 0 0 48px 18px rgba(247, 210, 74, .25); }
.bl .bl-author-title { margin: 6px 0 0; font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
.bl .bl-author-name { margin: 18px 0 0; font-size: 18px; color: var(--ai-ink-soft); }
.bl .bl-author-email { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 15px; color: var(--ai-muted); word-break: break-all; }
.bl-author-email i { color: var(--ai-yellow-deep); }
/* Two pills of the same width, one under the other: the grid is as wide as the longer one and stretches the other */
.bl-author-actions { display: grid; gap: 12px; width: fit-content; margin-top: 20px; }
.bl-author-actions .ai-btn { justify-content: center; padding: 11px 22px; font-size: 15px; white-space: nowrap; }
.bl .bl-author-posts { border-width: 1.5px; padding: 11.5px 22.5px; }
.bl-author-bio { align-self: center; padding-left: 48px; }
.bl .bl-author-bio p { font-size: 19px; line-height: 1.7; }

@media (max-width: 1199.98px) {
    .bl-author-details { flex-direction: column; gap: 24px; }
    .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .has-cover .bl-article-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .bl .bl-article-cover { aspect-ratio: 2 / 1; }
}
@media (max-width: 767.98px) {
    .bl-filters, .bl-filters:not(:has(#id_topic)) { grid-template-columns: minmax(0, 1fr); }
    .bl-grid { grid-template-columns: minmax(0, 1fr); }
    .bl-card.is-row { flex-direction: column; }
    .bl-card.is-row .bl-cover { width: 100%; aspect-ratio: 16 / 9; }
    .bl-card.is-row > .bl-cover { border-radius: calc(var(--ai-radius) - 1px) calc(var(--ai-radius) - 1px) 0 0; }
    .bl-author { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; border-radius: 22px; }
    .bl-author-details { flex-direction: column; gap: 24px; padding: 0 0 28px; border-right: 0; border-bottom: 1px solid var(--ai-line); }
    .bl-author-bio { padding: 28px 0 0; }
    .bl-author-avatar { width: 96px; height: 96px; font-size: 32px; }
}
@media (max-width: 575.98px) {
    .bl-tools { width: 100%; }
    .bl-tools .form-select { flex: 1; }
    .bl-article-head { padding: 28px 0 36px; }
    .bl .bl-article-summary { font-size: 17px; }
    .bl-post { padding: 40px 0 72px; }
}
