/* 抄表课堂文章正文样式
   依赖 :root 变量 --primary/--ink/--body/--muted/--line/--soft（见 /help/help.css） */
.article-meta {
  color: var(--muted);
  font-size: 13px;
  margin: -4px 0 18px;
}
.article-hero {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 18px 0 8px;
  border: 1px solid var(--line);
}
.article-caption {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin: 0 0 18px;
}
.article-note {
  background: var(--soft);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 16px 0;
  font-size: 14px;
}
.article-note p { margin: 4px 0; }
.article-source {
  color: var(--muted);
  font-size: 12px;
  border-top: 1px dashed var(--line);
  margin-top: 28px;
  padding-top: 12px;
}
/* 列表页 4 张卡在正文容器内用 2 列，避免 3+1 孤行 */
.doc-content .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) {
  .doc-content .article-grid { grid-template-columns: 1fr; }
}
/* 防止带 width/height 属性的图片在窄屏被拉变形 */
.doc-content img { height: auto; }


.article-banner {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 18px 0 8px;
  background: var(--soft);
}
.article-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}
.article-gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.article-gallery img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1080 / 640;
  object-fit: contain;
  background: var(--soft);
}
.article-gallery figcaption {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* 竖屏手机截图：按原始比例展示，避免 object-fit:contain 造成的上下空白 */
.article-gallery--tall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.article-gallery--tall img { aspect-ratio: auto; object-fit: contain; }

/* 单张竖屏截图 */
.article-shot { margin: 18px 0 8px; }
.article-shot img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--soft);
}
.article-shot figcaption { padding-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 560px) {
  .article-gallery--tall { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .article-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .article-gallery { grid-template-columns: 1fr; }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.entity-note { margin: 18px 0 0; padding: 10px 12px; background: #f8f8f8; border-left: 3px solid #4874ce; color: #666; font-size: 14px; line-height: 1.7; border-radius: 4px; }

/* 手机截图：整机边框（黑色中框 + 大圆角 + 投影），避免裸图显得粗糙 */
.prose-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 24px 0 8px;
}
.prose-phone .device {
  width: 380px;
  max-width: 100%;
  padding: 10px;
  background: linear-gradient(180deg, #1d2634 0%, #0d131b 100%);
  border-radius: 38px;
  box-shadow: 0 18px 40px rgba(15, 30, 60, .20), 0 2px 6px rgba(15, 30, 60, .12);
}
.prose-phone .device img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 28px;
  background: #fff;
}
.prose-phone-caption {
  margin: 10px 0 0;
  max-width: 460px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
@media (max-width: 560px) {
  .prose-phone .device { width: 300px; }
}

/* 左右对比图（把两张同版式截图合成一张，避免重复占版面） */
.prose-compare { margin: 20px 0 6px; }
.prose-compare img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(15, 30, 60, .08);
  background: #fff;
}
.prose-compare figcaption {
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* 三个 tab 页面：桌面三列，移动端单列；每张可点击放大 */
.prose-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 6px;
}
.prose-tabs figure { margin: 0; }
.prose-tabs img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(15, 30, 60, .08);
  background: #fff;
  cursor: zoom-in;
}
.prose-tabs figcaption {
  padding-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.prose-tabs-hint { display: none; }

/* 移动端：横向滑动（scroll-snap），而不是竖排三张 */
@media (max-width: 560px) {
  .prose-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 18px -10px 2px;
    padding: 2px 10px 10px;
    scrollbar-width: none;
  }
  .prose-tabs::-webkit-scrollbar { display: none; }
  .prose-tabs figure {
    flex: 0 0 84%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .prose-tabs img { border-radius: 12px; }
  .prose-tabs figcaption { padding-top: 4px; }
  .prose-tabs-hint { display: block; }
}

/* 放大层 */
.zoom-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 3vw;
  background: rgba(12, 18, 28, .92);
  cursor: zoom-out;
}
.zoom-layer[hidden] { display: none; }
.zoom-layer img {
  max-width: 100%;
  max-height: 94vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  background: #fff;
}
.zoom-layer .zoom-hint {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  color: #c9d2e0;
  font-size: 12px;
}

/* 任意带 data-zoom 的内容图：可点击放大 */
img[data-zoom] { cursor: zoom-in; }
img[data-zoom]:focus-visible { outline: 2px solid var(--blue, #4874ce); outline-offset: 3px; }
