/* ==========================================================================
   Baimiao（白描）· theme.css — 主题自有样式层
   --------------------------------------------------------------------------
   设计系统：authnexus-design v0.1.0（消费模式，资产文件原样复制）
   引入顺序：fonts → tokens → brand → base → components → motion → theme
   约定：
     · 颜色 / 间距 / 圆角 / 动效一律用 var(--*) 令牌；
     · 资产类只用 anx-*，主题业务类统一 bm-* 前缀；
     · 分层靠 1px 描边，不用阴影；酸橙绿只做品牌时刻（标记、短横线、进度）。
   ========================================================================== */

:root {
  --bm-container: 1080px;
  --bm-read: 720px;
  --bm-side-w: 296px;
  --bm-header-h: 64px;
  --bm-gap: clamp(24px, 4vw, 48px);
  --bm-gutter: clamp(20px, 4vw, 40px);
  --bm-line: 1px solid var(--border);
  --bm-accent: var(--acid);
}

/* --------------------------------------------------------------------------
   1. 骨架
   -------------------------------------------------------------------------- */

.bm-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
}

.bm-container {
  width: min(100% - 2 * var(--bm-gutter), var(--bm-container));
  margin-inline: auto;
}

.bm-main {
  flex: 1;
  padding-bottom: clamp(48px, 7vw, 96px);
}

.bm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--bm-gap);
  padding-top: clamp(28px, 4vw, 48px);
}

.bm-layout.has-side {
  grid-template-columns: minmax(0, 1fr) var(--bm-side-w);
}

.bm-layout > * {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   2. 顶部：液态玻璃导航
   -------------------------------------------------------------------------- */

.bm-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) brightness(var(--glass-brightness));
}

.bm-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--bm-header-h);
}

/* 品牌区：墨块 + 站名 + 副标题 */
.bm-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  min-width: 0;
  color: var(--ink);
}

.bm-brand:hover {
  text-decoration: none;
}

.bm-brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: var(--ink);
  color: var(--on-dark);
}

.bm-brand__mark svg {
  width: 15px;
  height: 15px;
  display: block;
}

.bm-brand__mark .is-accent {
  stroke: var(--bm-accent);
}

.bm-brand__text {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.bm-brand__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-brand__sub {
  font-size: 12px;
  color: var(--muted-text);
  padding-left: 10px;
  border-left: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 22ch;
}

.bm-brand__logo {
  display: block;
  max-height: 34px;
  width: auto;
}

/* 日间 / 夜间 Logo 切换；未单独上传夜间 Logo 时沿用日间图并反相 */
[data-theme="light"] .bm-brand__logo--dark {
  display: none;
}

[data-theme="dark"] .bm-brand__logo--light {
  display: none;
}

[data-theme="dark"] .bm-brand__logo--auto {
  filter: invert(1) hue-rotate(180deg);
}

/* 导航 */
.bm-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.bm-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bm-nav__item {
  position: relative;
}

.bm-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--r-xs);
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}

.bm-nav__link:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.bm-nav__link[aria-current="page"] {
  font-weight: 600;
  background: var(--surface-2);
}

.bm-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 3px;
  height: 2px;
  border-radius: 1px;
  background: var(--bm-accent);
}

/* 下拉：纯 CSS hover + focus-within */
.bm-nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 168px;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
}

.bm-nav__item:hover > .bm-nav__menu,
.bm-nav__item:focus-within > .bm-nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bm-nav__menu .bm-nav__link {
  display: flex;
  width: 100%;
  padding: 8px 10px;
}

.bm-nav__menu .bm-nav__link[aria-current="page"]::after {
  display: none;
}

.bm-nav__avatar {
  width: 22px;
  height: 22px;
  border-radius: var(--r-xs);
  object-fit: cover;
}

/* 右侧动作 */
.bm-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

/* 主题图标：浅色显示月亮，深色显示太阳 */
.bm-theme-icon {
  display: inline-flex;
}

[data-theme="light"] .bm-theme-icon--sun,
[data-theme="dark"] .bm-theme-icon--moon {
  display: none;
}

.bm-nav-toggle {
  display: none;
}

/* 搜索条 */
.bm-search {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.bm-search__form {
  display: flex;
  gap: 8px;
  padding: 14px 0;
}

.bm-search__form .anx-input {
  flex: 1;
}

/* --------------------------------------------------------------------------
   3. 首页开场
   -------------------------------------------------------------------------- */

.bm-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 8vw, 88px) 0 clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--border);
}

.bm-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.bm-hero__eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--ink);
}

.bm-hero__title {
  margin-top: 18px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -.04em;
  max-width: 16ch;
}

.bm-hero__desc {
  margin-top: 18px;
  max-width: 54ch;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.75;
  color: var(--muted-text);
}

.bm-hero__deco {
  position: absolute;
  right: 0;
  top: 50%;
  width: min(40vw, 430px);
  transform: translateY(-50%);
  color: var(--ink);
  opacity: .1;
  pointer-events: none;
}

[data-theme="dark"] .bm-hero__deco {
  opacity: .16;
}

/* 非首页的列表标题 */
.bm-listhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: clamp(36px, 6vw, 64px) 0 24px;
  border-bottom: 1px solid var(--border);
}

.bm-listhead__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.bm-listhead__title {
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.03em;
}

.bm-listhead__count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-text);
  padding-bottom: 4px;
}

/* --------------------------------------------------------------------------
   4. 文章列表
   -------------------------------------------------------------------------- */

.bm-feed {
  display: flex;
  flex-direction: column;
}

.bm-post {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 36px);
  padding: clamp(26px, 4vw, 40px) 0;
  border-bottom: 1px solid var(--border);
}

.bm-post__date {
  padding-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  color: var(--muted-text);
}

.bm-post__day {
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

.bm-post__ym {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bm-post__body {
  min-width: 0;
}

.bm-post__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -.018em;
}

.bm-post__title a {
  color: var(--ink);
  transition: color var(--t) var(--ease);
}

.bm-post__title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--bm-accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.bm-post__badge {
  transform: translateY(-2px);
}

.bm-post__excerpt {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.bm-post__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted-text);
}

.bm-post__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.bm-post__meta-item svg {
  width: 13px;
  height: 13px;
  opacity: .8;
}

/* 元信息里的普通链接压低存在感，分类标签保持墨色 */
.bm-post__meta a:not(.anx-tag),
.bm-article__meta a:not(.anx-tag) {
  color: var(--muted-text);
  transition: color var(--t) var(--ease);
}

.bm-post__meta a:not(.anx-tag):hover,
.bm-article__meta a:not(.anx-tag):hover {
  color: var(--ink);
  text-decoration: none;
}

.bm-article__meta .bm-article__author {
  color: var(--ink);
  font-weight: 600;
}

.bm-post__tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 置顶 */
.bm-post .anx-badge--brand {
  font-family: var(--font-sans);
  font-size: 11px;
  height: 20px;
  padding: 0 7px;
}

/* --------------------------------------------------------------------------
   5. 分页（系统 pagination() 输出裸 a / span / em）
   -------------------------------------------------------------------------- */

.bm-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: clamp(28px, 4vw, 44px) 0 0;
}

.bm-pagination a,
.bm-pagination span,
.bm-pagination em {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.bm-pagination a:hover {
  background: var(--surface-2);
  border-color: var(--hairline-hover);
  text-decoration: none;
}

.bm-pagination span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
  font-weight: 600;
}

.bm-pagination em {
  border-color: transparent;
  color: var(--muted-text);
  min-width: 24px;
  padding: 0 4px;
}

/* --------------------------------------------------------------------------
   6. 侧边栏与 Widget
   -------------------------------------------------------------------------- */

.bm-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 14px;
}

@media (min-width: 961px) {
  .bm-side {
    position: sticky;
    top: calc(var(--bm-header-h) + 24px);
    align-self: start;
  }
}

.bm-widget {
  background: var(--surface);
  border: var(--bm-line);
  border-radius: var(--r);
  padding: 20px;
}

.bm-widget__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--ink);
}

.bm-widget__title::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--bm-accent);
  flex: none;
}

.bm-widget__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bm-widget__list > li {
  padding: 9px 0;
  line-height: 1.55;
}

.bm-widget__list > li:first-child {
  padding-top: 0;
}

.bm-widget__list > li:last-child {
  padding-bottom: 0;
}

.bm-widget__list > li + li {
  border-top: 1px solid var(--border);
}

.bm-widget__list a {
  color: var(--ink);
}

.bm-widget__list a:hover {
  color: var(--link-text);
}

.bm-widget__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-text);
}

/* 作者卡 */
.bm-widget--author {
  position: relative;
  text-align: center;
  padding: 24px 20px;
}

.bm-author__clock {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
  color: var(--muted-text);
  user-select: none;
}

.bm-clock__face {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.bm-clock__tick {
  position: absolute;
  left: calc(50% - .5px);
  top: 4px;
  width: 1px;
  height: 4px;
  border-radius: 1px;
  background: var(--muted-text);
  transform: rotate(var(--r, 0deg));
  transform-origin: 50% 18px;
}

.bm-clock__tick--3 {
  --r: 90deg;
}

.bm-clock__tick--6 {
  --r: 180deg;
}

.bm-clock__tick--9 {
  --r: 270deg;
}

.bm-clock__hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  border-radius: 1px;
  background: var(--ink);
  transform-origin: 50% 100%;
  will-change: transform;
}

.bm-clock__hand--hour {
  width: 2px;
  height: 11px;
  margin-left: -1px;
}

.bm-clock__hand--minute {
  width: 1px;
  height: 16px;
  margin-left: -.5px;
}

.bm-clock__hand--second {
  width: 1px;
  height: 18px;
  margin-left: -.5px;
  background: var(--bm-accent);
}

.bm-clock__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .bm-clock__hand {
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  }

  /* 秒针走「嘀嗒」而不是平滑扫过 */
  .bm-clock__hand--second {
    transition: transform .1s linear;
  }
}

.bm-widget--author .bm-widget__avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--r);
  object-fit: cover;
  border: 1px solid var(--border);
}

.bm-widget--author .bm-widget__name {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 600;
}

.bm-widget--author .bm-widget__desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-text);
  text-wrap: balance;
  white-space: pre-line;
}

/* 标签云 */
.bm-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bm-tagcloud a {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.bm-tagcloud a:hover {
  background: var(--surface-2);
  border-color: var(--hairline-hover);
  text-decoration: none;
}

/* 分类树 */
.bm-sortlist .bm-sortlist__children {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 14px;
  border-left: 1px solid var(--border);
}

.bm-sortlist .bm-sortlist__children li {
  padding: 5px 0;
}

.bm-sortlist__count {
  float: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-text);
}

/* 搜索 */
.bm-widget__search {
  display: flex;
  gap: 8px;
}

.bm-widget__search .anx-input {
  flex: 1;
  min-width: 0;
}

/* 日历组件（Calendar::url() 返回的表格） */
.bm-widget #calendar table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}

.bm-widget #calendar caption {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-text);
  text-align: left;
}

.bm-widget #calendar th,
.bm-widget #calendar td {
  padding: 5px 0;
  text-align: center;
  border: 0;
}

.bm-widget #calendar th {
  color: var(--muted-text);
  font-weight: 500;
}

.bm-widget #calendar a {
  color: var(--ink);
}

.bm-widget #calendar a:hover {
  color: var(--link-text);
}

/* 最新评论 / 微语 */
.bm-widget__comment {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
}

.bm-widget__comment img {
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
  object-fit: cover;
}

.bm-widget__comment-name {
  font-size: 13px;
  font-weight: 600;
}

.bm-widget__comment-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 16px;
  color: var(--muted-text);
  vertical-align: 1px;
}

.bm-widget__comment-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-text);
  margin-left: 6px;
  white-space: nowrap;
}

.bm-widget__comment-text {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   7. 文章详情
   -------------------------------------------------------------------------- */

.bm-article {
  max-width: var(--bm-read);
  margin-inline: auto;
}

.bm-article__head {
  padding-bottom: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--border);
}

.bm-article .bm-prose {
  padding-top: clamp(24px, 4vw, 40px);
}

.bm-article__kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--muted-text);
  margin-bottom: 16px;
}

.bm-article__kicker .anx-tag {
  font-size: 11px;
}

.bm-article__kicker a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.bm-article__kicker a:hover {
  text-decoration-color: var(--ink);
}

.bm-article__title {
  font-size: clamp(29px, 4.4vw, 44px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.035em;
}

.bm-article__excerpt {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted-text);
}

.bm-article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted-text);
}

.bm-article__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.bm-article__meta-item svg {
  width: 14px;
  height: 14px;
  opacity: .8;
}

.bm-article__author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.bm-article__author img {
  width: 26px;
  height: 26px;
  border-radius: var(--r-xs);
  object-fit: cover;
}

.bm-article__cover {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.bm-article__cover img {
  display: block;
  width: 100%;
  height: auto;
}

.bm-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* 上一篇 / 下一篇 */
.bm-neighbor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(36px, 5vw, 56px);
}

.bm-neighbor__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}

.bm-neighbor__item:hover {
  border-color: var(--hairline-hover);
  background: var(--paper);
  text-decoration: none;
}

.bm-neighbor__item--next {
  text-align: right;
  grid-column: 2;
}

.bm-neighbor__dir {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.bm-neighbor__title {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* 阅读进度 */
.bm-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 0;
  height: 2px;
  background: var(--bm-accent);
  pointer-events: none;
  transition: width .08s linear;
}

/* --------------------------------------------------------------------------
   8. 评论
   -------------------------------------------------------------------------- */

.bm-comments {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--border);
}

.bm-comments__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.bm-comments__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.bm-comments__count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-text);
}

.bm-comments__count:hover {
  color: var(--ink);
}

/* 评论表单 */
.bm-commentform {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
}

.bm-commentform .anx-textarea {
  width: 100%;
  min-height: 120px;
}

.bm-commentform__info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.bm-commentform__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.bm-commentform__note {
  font-size: 12px;
  color: var(--muted-text);
}

.bm-commentform__captcha {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.bm-commentform__captcha img {
  height: 40px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  cursor: pointer;
}

/* 系统输出的验证码输入框不带资产类，这里按 anx-input 的视觉补齐 */
.bm-commentform__captcha .captcha_input {
  width: 132px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}

.bm-commentform__captcha .captcha_input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--surface-2);
}

/* 评论列表 */
.bm-comment-list {
  display: flex;
  flex-direction: column;
}

.bm-comment {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.bm-comment__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-xs);
  object-fit: cover;
  border: 1px solid var(--border);
}

.bm-comment__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.bm-comment__name {
  font-size: 14px;
  font-weight: 600;
}

.bm-comment__time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-text);
}

.bm-comment__content {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  word-break: break-word;
}

.bm-comment__content p + p {
  margin-top: 8px;
}

.bm-comment__actions {
  margin-top: 8px;
}

.bm-comment__reply {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted-text);
}

.bm-comment__reply:hover {
  color: var(--link-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bm-comment-children {
  margin-left: 48px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

/* 评论分页沿用 .bm-pagination 外观 */
.bm-comments .bm-pagination {
  padding-top: 24px;
}

/* --------------------------------------------------------------------------
   9. 空态
   -------------------------------------------------------------------------- */

.bm-empty {
  padding: 64px 0;
  text-align: center;
}

.bm-empty__mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  color: var(--muted);
  opacity: .6;
}

.bm-empty__title {
  font-size: 17px;
  font-weight: 600;
}

.bm-empty__text {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted-text);
}

/* --------------------------------------------------------------------------
   10. 页脚
   -------------------------------------------------------------------------- */

.bm-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.bm-footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: clamp(32px, 5vw, 48px) 0 28px;
}

.bm-footer__name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.bm-footer__name:hover {
  text-decoration: none;
}

.bm-footer__mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.bm-footer__mark svg {
  width: 13px;
  height: 13px;
}

.bm-footer__logo {
  max-height: 26px;
}

.bm-footer__desc {
  margin-top: 8px;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-text);
}

.bm-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}

.bm-footer__nav a {
  color: var(--muted-text);
}

.bm-footer__nav a:hover {
  color: var(--ink);
}

.bm-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-text);
}

.bm-footer__bottom a {
  color: var(--muted-text);
}

.bm-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

/* 插件挂载点：有输出时占一行，无输出时不占高度 */
.bm-footer__plugins {
  padding-bottom: 10px;
  font-size: 12px;
  color: var(--muted-text);
}

.bm-footer__plugins:empty {
  display: none;
}

/* 回到顶部 */
.bm-totop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 35;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t), background-color var(--t) var(--ease);
}

.bm-totop.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bm-totop:hover {
  background: var(--surface-2);
}

.bm-totop svg {
  width: 17px;
  height: 17px;
}

/* --------------------------------------------------------------------------
   11. 独立页面（404 / 密码页）
   -------------------------------------------------------------------------- */

.bm-standalone {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--page);
}

.bm-standalone__card {
  width: min(100%, 460px);
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
}

.bm-standalone__code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.bm-standalone__title {
  margin-top: 14px;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.04em;
}

.bm-standalone__text {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted-text);
}

.bm-standalone__foot {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bm-standalone__form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   12. 响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .bm-brand__sub {
    display: none;
  }
}

@media (max-width: 960px) {
  .bm-layout.has-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .bm-side {
    position: static;
  }

  .bm-hero__deco {
    width: 46vw;
    right: -6vw;
  }
}

@media (max-width: 860px) {
  .bm-header__inner {
    gap: 12px;
  }

  .bm-nav-toggle {
    display: inline-flex;
  }

  .bm-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 10px var(--bm-gutter) 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-pop);
  }

  .bm-nav.is-open {
    display: block;
  }

  .bm-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .bm-nav__link {
    display: flex;
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
  }

  .bm-nav__link[aria-current="page"]::after {
    display: none;
  }

  .bm-nav__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
    margin: 0 0 4px 12px;
    padding: 0 0 0 10px;
  }

  .bm-nav__item:hover > .bm-nav__menu {
    transform: none;
  }

  .bm-hero__deco {
    display: none;
  }

  .bm-post {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  /* 窄屏让置顶标记回到标题文字流里，避免独占一行 */
  .bm-post__title {
    display: block;
  }

  .bm-post__badge {
    margin-right: 6px;
    transform: none;
  }

  .bm-post__date {
    flex-direction: row;
    align-items: baseline;
    gap: 7px;
    padding-top: 0;
  }

  .bm-post__day {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .bm-post__ym {
    font-size: 11px;
  }

  .bm-neighbor {
    grid-template-columns: minmax(0, 1fr);
  }

  .bm-neighbor__item--next {
    grid-column: auto;
  }

  .bm-commentform__info {
    grid-template-columns: minmax(0, 1fr);
  }

  .bm-comment-children {
    margin-left: 24px;
  }
}

@media (max-width: 560px) {
  .bm-brand__name {
    font-size: 16px;
  }

  .bm-hero__title {
    font-size: 34px;
  }

  .bm-footer__inner {
    flex-direction: column;
  }

  .bm-totop {
    right: 14px;
    bottom: 14px;
  }
}
