/*
 * 全站打印样式（由 packages/shared-utils/create-nuxt-config.cjs 的 build:before
 * 拷进各站 public/print.css，head 里以 <link rel="stylesheet" media="print"> 挂载）。
 *
 * 本文件是唯一真源，已随 PWA 三件套（manifest.json / sw.js / offline.html）一并入库；
 * 各站 public/print.css 是它的 tracked 副本，别手改——改这里再跑一次 build，
 * build:before 会覆盖刷新全部副本，副本与真源不一致会在下一轮构建被无声抹平。
 *
 * 场景：号卡套餐与攻略文章常被打印下来做线下对比，所以要的是「一张 A4 讲清楚」——
 * 导航/浮层/交互件全部去掉，正文铺满、颜色转黑，正文里的外链补出可核实的地址。
 * 选择器对准共享组件的实际语义类名（.site-header / .cta-band / .floating-cta …），
 * 未命中的类名不会产生副作用。
 */
@media print {
  * {
    background: transparent !important;
    color: #111 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* 纸面上没用的东西：导航、锚点条、营销位、浮层、Cookie 提示 */
  .site-header,
  .nav-mobile,
  .menu-toggle,
  .tabs-nav,
  .hero-actions,
  .cta-band,
  .floating-cta,
  .cookie-consent,
  .card-notice-bar,
  .countdown-offer,
  .skip-link {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.55;
  }

  .site-main {
    display: block;
    max-width: none;
    padding: 0;
  }

  /* 打印时点不动链接：把正文与 FAQ 里的外部地址补在文字后面，便于事后核实 */
  .article-content a[href^="http"]::after,
  .faq-item a[href^="http"]::after,
  .plans a[href^="http"]::after {
    content: ' (' attr(href) ')';
    font-size: 9pt;
    word-break: break-all;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  /* 套餐卡、对比表、问答块不要被分页切成两半 */
  .plan-card,
  .compare-table,
  .feature-card,
  .faq-item,
  .article-card,
  table,
  img {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
  }

  @page {
    margin: 15mm;
  }
}
