/* ============================================================
   SBC Blog —— 自建站点对主题样式的少量补充
   app.css 保持与 Halo 主题 theme-sbc 完全一致（便于日后同步更新），
   新站点独有的组件（搜索框、后台等）一律写在这里。
   ============================================================ */

/* ---------------- 图片用 <picture> 包了一层，别让它参与布局 ----------------
   否则内部 img 的 height:100% 会失效（父级 picture 的高度是 auto） */
.poster picture,
.hero-big picture,
.hero-poster-img picture { display: contents; }

/* ---------------- 搜索表单 ---------------- */
.search-form {
  display: flex;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
  padding: 0.9rem 1rem;
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.95rem;
  border: 2px solid color-mix(in srgb, var(--an-pink) 30%, var(--card));
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}

.search-form input[type="search"]::placeholder { color: var(--text-mute); }

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.search-form button {
  flex: none;
  padding: 0.55rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background-image: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.search-form button:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* ---------------- 正文小补充 ---------------- */
.article-body h2,
.article-body h3,
.article-body h4 { scroll-margin-top: 84px; }

.article-body pre code .hll { background: transparent; }

/* 正文图片：圆角 + 不撑破卡片（Markdown 里没写宽度时也好看） */
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ---------------- SEO：H1 与原有字号完全对齐 ----------------
   首页的品牌名用 <h1>（每页唯一 H1），这里干掉 h1 的默认 margin/字号，
   视觉效果与原来的 <span class="brand-text"> 一致。 */
h1.brand-text { margin: 0; }

/* 归档 / 分类 / 标签 / 列表页的标题从 h2 改成 h1 后，保持 1.5em（= 原 h2 默认字号） */
h1.sec-title { margin: 0; font-size: 1.5em; }

/* 404 / 500 的状态码从 p 改成 h1，样式沿用 .error-status（已有 font-size/margin） */
h1.error-status { margin: 0; }
