/* Formerly Ghost's site-wide code injection (header + footer). */
/* Reserve the card image area while the thumbnail is loading. */
.post-card-image-link {
    min-height: 200px;
    background: #c5d2d9;
}
.post-card-image {display: block;}
@media (prefers-color-scheme: dark) {
    .post-card-image-link {background: #191b1f;}
}

.post-content,.post-card-excerpt{font-family: 'Noto Serif SC', "PingFang SC","Helvetica Neue",Helvetica,"Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;}
.post-full-content{font-size: 100%;font-variant-ligatures: none !important;}
.post-full-custom-excerpt {font-size: 1.8rem;}
.post-full-title {font-size:3.2rem;}
.post-full-content blockquote{margin:20px;padding: 1em;  background-color: #3eb0ef14; }
.post-full-content blockquote p {font-style:normal;}
.post-full-image {display:none;}

/* Body headings use semantic levels, independently of Casper's original sizes. */
.post-full-content h2,
.post-full-content h3,
.post-full-content h4,
.post-full-content h5,
.post-full-content h6 {
    margin: .5em 0 .2em;
    padding: 0;
    width: auto;
    max-width: none;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;
    font-weight: 600;
    line-height: 1.3em;
    text-align: initial;
    color: #090a0b;
}
.post-full-content h2 {font-size: 2.5rem;}
.post-full-content h3 {font-size: 2rem;}
.post-full-content h4 {font-size: 1.8rem;}
.post-full-content h5 {font-size: 1.6rem;}
.post-full-content h6 {font-size: 1.4rem;}
.post-full-content p + h2 {margin-top: .5em;}
.post-full-content h2 + h3,
.post-full-content h2 + h4,
.post-full-content h3 + h4 {margin-top: .5em;}
@media (max-width: 800px) {
    .post-full-content h2 {font-size: 2.4rem;}
    .post-full-content h2,
    .post-full-content h3,
    .post-full-content h4,
    .post-full-content h5,
    .post-full-content h6 {margin-bottom: .3em;}
}
@media (prefers-color-scheme: dark) {
    .post-full-content h2,
    .post-full-content h3,
    .post-full-content h4,
    .post-full-content h5,
    .post-full-content h6 {color: hsla(0,0%,100%,.9);}
}

.post-full-content pre {margin-bottom: 1.5rem}

.kg-callout-card {width: 100%; margin-bottom: 1em;}

.post-full-content figure {margin: 0.8em 0 1em;}

p {margin: 0.2em 0 0.5em !important;}

.post-full-content img{border-radius:5px;}

code {font-family: 'Noto Serif SC';}

th {text-transform: none !important;}

.kg-bookmark-metadata > .kg-bookmark-publisher:before {
    content: "" !important;
    margin: 0 !important;
}

/* Post-card author avatars: drop Casper's 4px list offset and -6px avatar
   offset so the first avatar is not clipped at the left edge. */
.author-list { margin-left: 0; }
.static-avatar { margin-left: 0; }

/* Paragraph indent for posts (replaces hand-typed full-width spaces). */
.post-template .post-full-content p { text-indent: 2em; }
.post-template.no-indent .post-full-content p { text-indent: 0; }

:root {--ghost-accent-color: #15171A;}

/* Shiki runs at build time. Keep the old code padding and system theme switch. */
.post-full-content pre.astro-code > code {display: block; padding: 0;}
@media (prefers-color-scheme: dark) {
    .astro-code, .astro-code span {
        color: var(--shiki-dark) !important;
        background-color: var(--shiki-dark-bg) !important;
        font-style: var(--shiki-dark-font-style) !important;
        font-weight: var(--shiki-dark-font-weight) !important;
        text-decoration: var(--shiki-dark-text-decoration) !important;
    }
}

/* Native <video> from ::video. Ghost's card player is legacy, still used by ::ghost-video. */
.post-full-content video.kg-native-video,
.post-full-content .kg-native-video-card video {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 5px;
}

.post-full-content video.kg-native-video-bordered {
    border: 1px solid #ccc;
}

/* Home feed: a fixed three-column grid, so a short last row never stretches its card. */
.home-post-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.home-post-feed .post-card {
    min-width: 0;
}

@media (max-width: 960px) {
    .home-post-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .home-post-feed { grid-template-columns: minmax(0, 1fr); }
}
