/**
 * KALOKAGATHIA News 富装饰积木排版系统 (news-blocks.css)
 * 完整覆盖 4×H1 + 4×H2 + 4×无序列表 + 4×有序序号 + 5×标注提示框 + 行内标记与图文块
 * 前台阅读页与后台 App 实时亮/暗双模式预览窗 100% 共享同一渲染规范
 */

.nb-article-body {
  color: var(--fg-primary);
  font-size: 1.02rem;
  line-height: 1.82;
}

.nb-block {
  margin: 0 0 26px;
}

.nb-block:last-child {
  margin-bottom: 0;
}

/* ── 行内装饰标记 ── */
.nb-inline-mark {
  padding: 0.1em 0.42em;
  border-radius: 5px;
  background: linear-gradient(120deg, rgba(255, 185, 211, 0.45), rgba(207, 191, 252, 0.45));
  color: inherit;
  font-weight: 500;
}

[data-theme="dark"] .nb-inline-mark {
  background: linear-gradient(120deg, rgba(186, 95, 134, 0.42), rgba(123, 103, 188, 0.42));
}

.nb-inline-term {
  padding: 0.14em 0.48em;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--accent-ink);
}

/* ── 正文段落变体 ── */
.nb-para {
  color: var(--fg-secondary);
}

.nb-para--lead {
  font-size: 1.14rem;
  color: var(--fg-primary);
  font-weight: 500;
  line-height: 1.76;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-hairline);
}

.nb-para--dropcap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.1rem;
  font-weight: 800;
  line-height: 0.92;
  padding-right: 12px;
  padding-top: 4px;
  color: var(--fg-primary);
}

/* ══════════════════════════════════════════════════
   一级标题 (H1) — 4 种装饰样式
   ══════════════════════════════════════════════════ */
.nb-h1 {
  margin-top: 42px;
  margin-bottom: 22px;
}

.nb-block:first-child.nb-h1 {
  margin-top: 4px;
}

.nb-h1-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.nb-h1__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.48rem, 2.3vw, 1.92rem);
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: -0.02em;
  color: var(--fg-primary);
}

/* H1-1: 极简编辑部大字标 (editorial) */
.nb-h1--editorial {
  padding-bottom: 16px;
  border-bottom: 2px solid var(--fg-primary);
}

/* H1-2: Candy Bloom 流体竖栏标题 (bloom-bar) */
.nb-h1--bloom-bar {
  position: relative;
  padding-left: 20px;
}

.nb-h1--bloom-bar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--bloom-pink-500), var(--bloom-violet-500));
}

/* H1-3: 01 / CHAPTER 编号建筑标题 (architect) */
.nb-h1--architect {
  padding: 18px 0 16px;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-hairline);
}

.nb-h1--architect .nb-h1-kicker {
  color: var(--accent-ink);
  font-weight: 600;
}

/* H1-4: Fluent 毛玻璃微光框标题 (fluent-glass) */
.nb-h1--fluent-glass {
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 127, 175, 0.13), transparent 58%),
    radial-gradient(100% 120% at 100% 100%, rgba(167, 139, 250, 0.13), transparent 60%),
    var(--bg-subtle);
  border: 1px solid var(--border-default);
}

/* ══════════════════════════════════════════════════
   二级标题 (H2) — 4 种装饰样式
   ══════════════════════════════════════════════════ */
.nb-h2 {
  margin-top: 32px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nb-h2__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--fg-primary);
}

/* H2-1: 切角几何锚点标题 (chamfer-anchor) */
.nb-h2__chamfer {
  width: 11px;
  height: 11px;
  background: var(--fg-primary);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* H2-2: 局部柔和流光下划线标题 (aurora-line) */
.nb-h2--aurora-line {
  position: relative;
  padding-bottom: 10px;
}

.nb-h2--aurora-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 96px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--bloom-pink-500), var(--bloom-violet-500), transparent);
}

/* H2-3: 胶囊前缀标签标题 (pill-badge) */
.nb-h2__pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-invert);
  color: var(--fg-invert);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* H2-4: 双角标工程框线标题 (blueprint-frame) */
.nb-h2--blueprint-frame {
  position: relative;
  padding: 11px 18px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

/* ══════════════════════════════════════════════════
   无序列表 (UL) — 4 种装饰样式
   ══════════════════════════════════════════════════ */
.nb-ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.nb-ul__item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.nb-list__content {
  flex: 1;
  min-width: 0;
}

.nb-list__lead {
  display: block;
  color: var(--fg-primary);
  font-weight: 700;
  margin-bottom: 2px;
}

.nb-list__body {
  color: var(--fg-secondary);
  font-size: 0.96rem;
}

/* UL-1: 极简圆点 (minimal-dot) */
.nb-ul--minimal-dot .nb-ul__marker {
  width: 7px;
  height: 7px;
  margin-top: 11px;
  border-radius: 50%;
  background: var(--fg-primary);
  flex-shrink: 0;
}

/* UL-2: 品牌切角菱形 (chamfer-diamond) */
.nb-ul--chamfer-diamond .nb-ul__marker {
  width: 13px;
  height: 13px;
  margin-top: 8px;
  color: var(--accent-bloom);
  flex-shrink: 0;
}

/* UL-3: 纯良准则确认徽章清单 (pure-check) */
.nb-ul--pure-check .nb-ul__item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
}

.nb-ul--pure-check .nb-ul__marker {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: var(--radius-pill);
  background: var(--bg-invert);
  color: var(--fg-invert);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nb-ul--pure-check .nb-ul__marker svg {
  width: 13px;
  height: 13px;
}

/* UL-4: 双列微光卡片列表 (bento-grid) */
.nb-ul--bento-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 640px) {
  .nb-ul--bento-grid {
    grid-template-columns: 1fr;
  }
}

.nb-ul--bento-grid .nb-ul__item {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
}

.nb-ul--bento-grid .nb-ul__marker {
  width: 8px;
  height: 8px;
  margin-top: 9px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--bloom-pink-500), var(--bloom-violet-500));
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   有序序号 (OL) — 4 种装饰样式
   ══════════════════════════════════════════════════ */
.nb-ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
}

.nb-ol__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

/* OL-1: 01/02 等宽大数字序号 (mono-giant) */
.nb-ol--mono-giant .nb-ol__item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-hairline);
}

.nb-ol--mono-giant .nb-ol__index {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--fg-primary);
  opacity: 0.36;
  min-width: 40px;
}

/* OL-2: 黑白实心圆章序号 (solid-seal) */
.nb-ol--solid-seal .nb-ol__index {
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: var(--radius-pill);
  background: var(--bg-invert);
  color: var(--fg-invert);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* OL-3: Candy Bloom 描边圆环序号 (bloom-ring) */
.nb-ol--bloom-ring .nb-ol__index {
  width: 30px;
  height: 30px;
  margin-top: 1px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--accent-bloom);
  background: var(--accent-soft-bg);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* OL-4: 纵向时间轴连线步骤序号 (timeline-step) */
.nb-ol--timeline-step {
  gap: 0;
}

.nb-ol--timeline-step .nb-ol__item {
  position: relative;
  padding-bottom: 24px;
}

.nb-ol--timeline-step .nb-ol__item:last-child {
  padding-bottom: 0;
}

.nb-ol--timeline-step .nb-ol__item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 32px;
  bottom: 0;
  width: 1px;
  background: var(--border-strong);
}

.nb-ol--timeline-step .nb-ol__index {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--fg-primary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   标注提示框 (Callout) — 5 种装饰样式
   ══════════════════════════════════════════════════ */
.nb-callout {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.nb-callout__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--fg-primary);
  margin-bottom: 8px;
}

.nb-callout__icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.nb-callout__body {
  font-size: 0.94rem;
  color: var(--fg-secondary);
  line-height: 1.72;
}

.nb-callout__cite {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
}

/* Callout-1: 制作手记注记框 (craft-note) */
.nb-callout--craft-note {
  background: var(--bg-subtle);
  border-left: 3px solid var(--fg-primary);
}

/* Callout-2: Candy Bloom 流光重点标注框 (bloom-focus) */
.nb-callout--bloom-focus {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255, 127, 175, 0.14), transparent 62%),
    radial-gradient(90% 120% at 100% 100%, rgba(167, 139, 250, 0.14), transparent 62%),
    var(--bg-subtle);
  border-color: var(--accent-ring);
}

.nb-callout--bloom-focus .nb-callout__icon {
  color: var(--accent-bloom);
}

/* Callout-3: 严正声明高对比警示框 (strict-notice) */
.nb-callout--strict-notice {
  background: var(--bg-invert);
  color: var(--fg-invert);
  border-color: var(--bg-invert);
}

.nb-callout--strict-notice .nb-callout__title,
.nb-callout--strict-notice .nb-callout__body {
  color: var(--fg-invert);
}

.nb-callout--strict-notice .nb-callout__body {
  opacity: 0.9;
}

/* Callout-4: 角色/主创引言卡片 (creator-quote) */
.nb-callout--creator-quote {
  margin-left: 0;
  margin-right: 0;
  padding: 26px 28px;
  background: var(--bg-subtle);
  border-left: 4px solid var(--accent-bloom);
}

.nb-callout--creator-quote .nb-callout__body {
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--fg-primary);
}

/* Callout-5: 术语与图文图注块 (glossary-figure) */
.nb-callout--glossary-figure {
  background: var(--bg-surface);
  border-style: solid;
}

.nb-callout__figure {
  margin: 14px 0 0;
}

.nb-callout__figure img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
}

.nb-callout__caption,
.nb-figure__caption {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-align: center;
}

.nb-figure {
  margin: 28px 0;
}

.nb-figure img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
}

.nb-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 34px 0;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.nb-divider::before,
.nb-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-hairline);
}
