/* Ghost-specific styles for the Work OS design: blog feed, posts, pages, Koenig cards.
   Builds on the tokens in styles.css (dark theme: --bg, --card, --line, --tx…). */

/* ---------- blog hero + search ---------- */
.bl-hero { padding-bottom: clamp(50px, 6vw, 80px); }
.bl-search { margin-top: 32px; display: flex; align-items: center; gap: 10px; max-width: 520px; padding: 0 18px; min-height: 54px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--line-2); }
.bl-search:focus-within { border-color: #8a72ff; }
.bl-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--tx-3); stroke-width: 1.6; }
.bl-search input { flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; color: var(--tx); font: inherit; font-size: 16px; outline: none; }
.bl-search input::placeholder { color: var(--tx-3); }

/* ---------- shared meta ---------- */
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tx-3); }
.bl-tag { color: #b9a6ff; }
.bl-by { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--tx-3); }
.bl-by img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.bl-by a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--tx-2); font-weight: 600; }
.bl-by a:hover { color: var(--tx); }
.bl-by > span:first-of-type, .bl-by a span { color: var(--tx-2); font-weight: 600; }
.bl-by time::before, .bl-by > span + span::before, .bl-by a + time::before { content: '·'; margin-right: 12px; color: var(--tx-3); }
.bl-by .bl-av { display: none; }
.bl-by-lg { margin-top: 28px; font-size: 15px; }
.bl-by-lg img { width: 34px; height: 34px; }

/* ---------- featured ---------- */
.bl-feat-sec { padding-block: clamp(40px, 5vw, 70px) 0; border-top: 0 !important; }
.bl-feat { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(14px, 1.6vw, 20px); border-radius: 32px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color 200ms, transform 300ms var(--ease); }
.bl-feat:hover { border-color: var(--line-2); transform: translateY(-3px); }
.bl-feat-media { display: block; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: var(--card-2); }
.bl-feat-media img { width: 100%; height: 100%; object-fit: cover; }
.bl-feat-body { display: grid; gap: 16px; padding: clamp(6px, 2vw, 24px) clamp(6px, 2vw, 24px) clamp(6px, 2vw, 24px) 0; }
.bl-feat-body .label { margin: 0; }
.bl-feat-title { font-size: clamp(28px, 1.8vw + 14px, 44px); font-weight: 600; line-height: 1.06; letter-spacing: -0.035em; color: var(--tx); text-wrap: balance; }
.bl-feat-ex { color: var(--tx-2); font-size: 17px; line-height: 1.55; }
@media (max-width: 900px) {
  .bl-feat { grid-template-columns: 1fr; }
  .bl-feat-body { padding: 4px 8px 12px; }
}

/* ---------- filters ---------- */
.bl-list { padding-top: clamp(40px, 5vw, 70px); }
.bl-feat-sec + .bl-list { border-top: 0; }
.bl-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.bl-chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--tx-2); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background 150ms, color 150ms, border-color 150ms; }
.bl-chip:hover { color: var(--tx); background: rgba(255,255,255,0.05); }
.bl-chip[aria-pressed='true'] { background: var(--tx); border-color: var(--tx); color: #08090a; }

/* ---------- cards ---------- */
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bl-grid { grid-template-columns: 1fr; } }
.bl-card { display: flex; flex-direction: column; border-radius: 24px; background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: border-color 200ms, transform 300ms var(--ease), opacity 800ms var(--ease); }
.bl-card:hover { border-color: var(--line-2); }
.bl-card-media { display: block; aspect-ratio: 16 / 9; background: var(--card-2); overflow: hidden; }
.bl-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.bl-card:hover .bl-card-media img { transform: scale(1.03); }
.bl-card-ph { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(60% 80% at 30% 0%, rgba(101,54,255,0.35), transparent 70%), var(--card-2); }
.bl-card-ph img { width: 44px !important; height: auto !important; opacity: 0.85; }
.bl-card-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 24px; flex: 1; }
.bl-card h3 { font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.bl-card h3 a { text-decoration: none; }
.bl-card h3 a::after { content: ''; position: absolute; inset: 0; }
.bl-card { position: relative; }
.bl-card h3 a:hover { color: #d6ccff; }
.bl-card-ex { color: var(--tx-3); font-size: 15px; line-height: 1.55; flex: 1; }
.bl-card .bl-by { font-size: 13.5px; }
.bl-card .bl-by img { width: 24px; height: 24px; }
.bl-empty { margin-top: 24px; padding: 28px; border-radius: 20px; border: 1px dashed var(--line-2); color: var(--tx-3); text-align: center; }

/* ---------- pagination ---------- */
.bl-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 48px; }
.bl-pager > :last-child { justify-self: end; }
.bl-pager-info { font-family: var(--mono); font-size: 13px; color: var(--tx-3); letter-spacing: 0.06em; }

/* ---------- post ---------- */
.bl-narrow { max-width: calc(860px + var(--gut) * 2); }
.bl-post-hero { padding-bottom: clamp(40px, 5vw, 70px); }
.bl-post-hero h1 { max-width: 22ch; font-size: clamp(36px, 3.4vw + 14px, 68px); line-height: 1.02; }
.bl-post-hero .ph-lede { color: var(--tx-2); }
.bl-post-media { margin-block: 0 clamp(36px, 4vw, 60px); }
.bl-post-media img { width: 100%; height: auto; border-radius: 28px; border: 1px solid var(--line); }
.bl-post-media figcaption { margin-top: 12px; text-align: center; font-size: 14px; color: var(--tx-3); }
.bl-post-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(200px, 260px); justify-content: space-between; gap: 56px; padding-bottom: clamp(50px, 6vw, 90px); }
.bl-post-hero + .bl-post-layout { padding-top: clamp(30px, 4vw, 50px); }
.bl-aside { position: sticky; top: 100px; align-self: start; display: grid; gap: 28px; }
.bl-aside .label { margin-bottom: 12px; font-size: 12px; }
.bl-toc ol { display: grid; gap: 2px; border-left: 1px solid var(--line-2); }
.bl-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--tx-3); text-decoration: none; font-size: 14px; line-height: 1.4; }
.bl-toc .lv-h3 a { padding-left: 26px; font-size: 13.5px; }
.bl-toc a:hover { color: var(--tx); }
.bl-toc a.on { color: var(--tx); border-left-color: #8a72ff; }
.bl-share div { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-share a, .bl-share button { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--tx-2); font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.bl-share a:hover, .bl-share button:hover { color: var(--tx); background: rgba(255,255,255,0.05); }
@media (max-width: 1000px) {
  .bl-post-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .bl-aside { position: static; order: -1; }
  .bl-toc { display: none; }
}
.bl-post-foot { padding-bottom: clamp(40px, 5vw, 70px); }
.bl-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 760px; }
.bl-comments { padding-bottom: 60px; }
.bl-related .sec-head { margin-bottom: 32px; }
.bl-spacer { height: 120px; }

/* author + 404 */
.bl-author { display: flex; gap: 32px; align-items: center; }
.bl-author-img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); flex: none; }
.bl-author-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-size: 15px; color: var(--tx-3); }
.bl-author-links a { color: #b9a6ff; font-weight: 600; text-decoration: none; }
@media (max-width: 640px) { .bl-author { flex-direction: column; align-items: flex-start; } .bl-author-img { width: 88px; height: 88px; } }
.bl-404 { min-height: 70vh; display: flex; align-items: center; }

/* ---------- article content (Ghost editor output) ---------- */
.bl-content { font-size: 18px; line-height: 1.75; color: var(--tx-2); min-width: 0; }
.bl-content > * + * { margin-top: 1.4em; }
.bl-content h2, .bl-content h3, .bl-content h4 { color: var(--tx); font-weight: 600; letter-spacing: -0.03em; scroll-margin-top: 100px; }
.bl-content h2 { margin-top: 2.2em; font-size: clamp(26px, 1vw + 20px, 34px); line-height: 1.15; }
.bl-content h3 { margin-top: 1.8em; font-size: 23px; line-height: 1.25; }
.bl-content h4 { margin-top: 1.6em; font-size: 19px; }
.bl-content h2 + *, .bl-content h3 + *, .bl-content h4 + * { margin-top: 0.7em; }
.bl-content a { color: #c4b5ff; text-decoration: underline; text-decoration-color: rgba(196,181,255,0.4); text-underline-offset: 3px; }
.bl-content a:hover { text-decoration-color: currentColor; }
.bl-content strong { color: var(--tx); }
.bl-content ul, .bl-content ol { padding-left: 1.4em; }
.bl-content ul { list-style: disc; }
.bl-content ol { list-style: decimal; }
.bl-content li + li { margin-top: 0.5em; }
.bl-content li::marker { color: #8a72ff; }
.bl-content blockquote { padding: 4px 0 4px 24px; border-left: 3px solid #8a72ff; color: var(--tx); font-size: 1.1em; font-weight: 600; line-height: 1.5; }
.bl-content blockquote.kg-blockquote-alt { border: 0; padding: 0; text-align: center; font-size: 1.35em; }
.bl-content hr { border: 0; height: 1px; background: var(--line-2); margin-block: 2.6em; }
.bl-content code { font-family: var(--mono); font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: var(--card-2); color: var(--tx); }
.bl-content pre { overflow-x: auto; padding: 20px 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.6; }
.bl-content pre code { padding: 0; background: none; }
.bl-content table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.bl-content th, .bl-content td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.bl-content th { color: var(--tx); font-weight: 600; }
.bl-content img { height: auto; border-radius: 16px; }
.bl-content figcaption { margin-top: 10px; text-align: center; font-size: 14px; color: var(--tx-3); }
.bl-content iframe { max-width: 100%; border-radius: 16px; }

/* Koenig card widths (required by Ghost) */
.kg-width-wide { position: relative; width: min(1000px, calc(100vw - var(--gut) * 2)); max-width: none; }
.kg-width-full { position: relative; width: 100vw; max-width: none; left: 50%; transform: translateX(-50%); }
.kg-width-full img { border-radius: 0; width: 100%; }
@media (min-width: 1001px) { .bl-content .kg-width-wide { margin-left: 0; } }
.kg-image { margin-inline: auto; }
.kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.bl-content .kg-callout-card, .bl-content .kg-toggle-card, .bl-content .kg-product-card-container, .bl-content .kg-bookmark-container { color: var(--tx); }
.bl-content .kg-bookmark-container { background: var(--card); border-color: var(--line-2) !important; border-radius: 16px; text-decoration: none; }
.bl-content .kg-bookmark-title { color: var(--tx); }
.bl-content .kg-bookmark-description, .bl-content .kg-bookmark-metadata { color: var(--tx-3); }
.bl-content .kg-callout-card-grey, .bl-content .kg-callout-card-white { background: var(--card); }
.bl-content .kg-btn, .bl-content .kg-btn-accent { text-decoration: none; }

/* ---------- consent banner over the dark site ---------- */
.ax .consent-banner__inner { background: var(--card); border: 1px solid var(--line-2); }
