/* Blog and content pages. The base (tokens, header, footer, panels, search)
   is the app's own /app.css; this adds only what posts need. */

/* Fonts picked in Ghost Admin (Design > Brand) override the app's pair. */
:root {
  --display: var(--gh-font-heading, "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, sans-serif);
  --body: var(--gh-font-body, Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
}

/* post list */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card { background: var(--low); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color .15s, transform .15s; }
.post-card:hover { border-color: rgb(76 215 246 / .45); transform: translateY(-2px); }
.post-card-link { display: flex; flex-direction: column; height: 100%; }
.post-card-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--container); }
.post-card-blank { background: linear-gradient(135deg, var(--container), rgb(6 182 212 / .25)); }
.post-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; }
.post-card-title { margin: 0; font: 700 18px/24px var(--display); }
.post-card:hover .post-card-title { color: var(--primary); }
.post-card-excerpt { margin: 0; color: var(--text-2); font-size: 13px; line-height: 20px; }
.post-meta { margin: auto 0 0; color: var(--outline); font-size: 12px; }
.blog-pages { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 8px 0; }

/* article */
.article { padding: 32px 48px 40px; display: flex; flex-direction: column; gap: 20px; }
.article-head { display: flex; flex-direction: column; gap: 10px; max-width: 760px; width: 100%; margin: 0 auto; }
.article-head h1 { margin: 0; font: 800 40px/48px var(--display); letter-spacing: -.01em; }
.article-dek { margin: 0; color: var(--text-2); font-size: 18px; line-height: 28px; }
.article-head .post-meta { margin: 0; }
.article-image { margin: 0 auto; max-width: 1040px; width: 100%; }
.article-image img { display: block; width: 100%; height: auto; border-radius: 12px; }
.article-image figcaption, .gh-content figcaption { margin-top: 8px; color: var(--outline); font-size: 12px; text-align: center; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; max-width: 760px; width: 100%; margin: 0 auto; }
.chip { padding: 3px 10px; border-radius: 999px; background: var(--high); color: var(--text-2); font-size: 12px; font-weight: 600; }
.chip:hover { background: var(--primary-container); color: var(--on-primary-container); }
.more-posts { padding-top: 0; }

/* post body (Ghost's editor output) */
.gh-content { font-size: 17px; line-height: 1.7; color: var(--text); display: grid;
  grid-template-columns: [full-start] minmax(0, 1fr) [wide-start] minmax(0, 140px) [main-start] min(760px, 100%) [main-end] minmax(0, 140px) [wide-end] minmax(0, 1fr) [full-end]; }
.gh-content > * { grid-column: main; margin: 0 0 1.1em; }
.gh-content > .kg-width-wide { grid-column: wide; }
.gh-content > .kg-width-full { grid-column: full; }
.gh-content > .kg-width-full img { border-radius: 0; }
.gh-content h2, .gh-content h3, .gh-content h4 { font-family: var(--display); line-height: 1.3; margin: 1.6em 0 .5em; }
.gh-content h2 { font-size: 26px; }
.gh-content h3 { font-size: 21px; }
.gh-content h4 { font-size: 18px; }
.gh-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.gh-content a:hover { filter: brightness(1.15); }
.gh-content strong { color: #fff; }
.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content li + li { margin-top: .35em; }
.gh-content img { max-width: 100%; height: auto; border-radius: 10px; }
.gh-content figure { margin: 0 0 1.4em; }
.gh-content blockquote:not(.kg-blockquote-alt) { margin-left: 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--primary); color: var(--text-2); }
.gh-content .kg-blockquote-alt { color: var(--text-2); font: italic 600 22px/1.5 var(--display); text-align: center; }
.gh-content hr { border: 0; height: 1px; background: var(--high); margin: 2em 0; }
.gh-content code { padding: 1px 5px; border-radius: 4px; background: var(--high); font-size: .9em; }
.gh-content pre { padding: 16px; border-radius: 10px; background: var(--lowest); overflow-x: auto; font-size: 14px; }
.gh-content pre code { padding: 0; background: none; }
.gh-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.gh-content th, .gh-content td { padding: 8px 10px; border-bottom: 1px solid var(--high); text-align: left; }
.gh-content th { color: var(--text-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.gh-content .kg-callout-card, .gh-content .kg-toggle-card, .gh-content .kg-product-card-container { border-radius: 12px; }
.gh-content .kg-bookmark-card a.kg-bookmark-container { color: var(--text); text-decoration: none; background: var(--container); border-color: var(--high); border-radius: 12px; }
.gh-content .kg-bookmark-description { color: var(--text-2); }
.gh-content .kg-button-card a.kg-btn { text-decoration: none; }
.gh-content > :first-child { margin-top: 0; }
.gh-content > :last-child { margin-bottom: 0; }

@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .article { padding: 20px 16px 28px; }
  .article-head h1 { font-size: 28px; line-height: 36px; }
  .article-dek { font-size: 16px; line-height: 24px; }
  .gh-content { font-size: 16px; }
}
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }
