/* ===========================================================================
   mobile-tune.css —— 窄屏（≤480px，iPhone 13 / 390px 起）排版统一样式表
   ---------------------------------------------------------------------------
   适用范围：全站公共页面。必须放在 style.css / tool.css 之后加载，作为窄屏唯一口径。
   适配基准：iPhone 13 —— 390 × 844 逻辑像素（CSS px），Safari / 微信内置浏览器。
             后续所有手机版改动都以该规格为验收基准（2026-11-09 Hugo 指定）。
   原则：只调字号、行距、间距、对齐与留白；不改文案、模块顺序、DOM 结构、
         组件类型、配色、图片与交互行为。桌面版（>480px）完全不受影响。

   字号层级（390px 实测）：
     品牌 15 / 导航 13 / 主标题 16 / 指标数值 13 / 卡片标题 11.5~12
     / 标签 10 / 步骤表格 10 / 备案与版权 9
   唯一的例外：搜索输入框保持 16px —— iOS Safari 在 <16px 时聚焦会自动放大整页。
   =========================================================================== */

@media (max-width: 480px) {

  /* ---------------------------------------------------------------- 页头 */
  .nav { padding: 8px 12px 0; row-gap: 3px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand-logo { width: 96px; height: auto; }
  .nav-links a { font-size: 13px; padding: 6px 2px 9px; }
  .container { padding: 0 14px; }
  main { padding-top: 20px; padding-bottom: 26px; }

  /* ------------------------------------------------------------ 搜索卡 / 示例 */
  .tool-scope { font-size: 14px; }
  .tool-scope .search-card { padding: 14px 12px; border-radius: 14px; }
  .tool-scope .search-row { gap: 6px; }
  .tool-scope .search-row button {
    width: 68px; flex: 0 0 68px; height: 42px;
    font-size: 14px; border-radius: 9px;
  }
  .tool-scope .search-row input { font-size: 16px; padding: 10px 12px; border-radius: 9px; }

  /* 「示例：」与 5 个公司名同排：标签不再独占一行，5 个胶囊等宽均分 */
  .tool-scope .quick {
    margin-top: 12px; flex-wrap: nowrap; align-items: center;
    gap: 4px; font-size: 11px;
  }
  .tool-scope .quick > span {
    flex: 0 0 auto; width: auto; font-size: 11px;
    line-height: 1; white-space: nowrap; margin-right: 2px;
  }
  .tool-scope .quick .chip {
    flex: 1 1 0; min-width: 0; padding: 5px 2px;
    font-size: 10.5px; line-height: 1.25;
    white-space: nowrap; justify-content: center;
  }

  /* ------------------------------------------------------------ 结论卡
     2026-11-09 第二轮：红框区域整体再收一档，压缩高度但保留数值可读性。
     代码前缀 SH/SZ 是内联 font-size:13px，只能用 !important 覆盖。 */
  .tool-scope .conclusion { padding: 11px 12px 12px; margin-bottom: 10px; }
  .tool-scope .concl-head { gap: 6px; align-items: center; }
  .tool-scope .concl-title { font-size: 16px; line-height: 1.25; }
  .tool-scope .concl-title span { font-size: 11px !important; }
  .tool-scope .concl-sub { font-size: 10.5px; margin-top: 2px; line-height: 1.4; }
  .tool-scope .notice-btn { font-size: 10px; padding: 4px 8px; }
  .tool-scope .badge { font-size: 10px; padding: 2px 7px; }
  .tool-scope .grade-badge { padding: 5px 8px; min-width: 58px; border-radius: 9px; }
  .tool-scope .grade-badge .g { font-size: 18px; }
  .tool-scope .grade-badge .l { font-size: 9.5px; margin-top: 1px; white-space: nowrap; }

  /* ------------------------------------------------------------ 六项指标卡
     数值保持一行（nowrap），字号 17 → 14 → 13，行距/内边距同步收紧；
     标签 10px、单位 10px，仍是 iPhone 13 上清晰可读的下限。 */
  .tool-scope .metrics { gap: 5px; margin-top: 8px; }
  .tool-scope .metric { min-width: 0; padding: 6px 6px; border-radius: 8px; }
  .tool-scope .metric .k { font-size: 10px; line-height: 1.25; white-space: nowrap; }
  .tool-scope .metric .v {
    font-size: 13px; line-height: 1.25; margin-top: 2px;
    white-space: nowrap; letter-spacing: -0.45px;
  }
  .tool-scope .metric .v small { font-size: 10px; }

  /* ------------------------------------------------------------ 四张趋势图 */
  .tool-scope .summary-charts { gap: 8px; margin-bottom: 12px; }
  .tool-scope .mini-chart { padding: 10px 10px 8px; border-radius: 10px; }
  .tool-scope .mini-chart h4 { margin: 0 0 5px; font-size: 11.5px; line-height: 1.4; }
  .tool-scope .mini-chart .latest { font-size: 10.5px; }

  /* ------------------------------------------------------------ 分区标题 / 18 步卡片 */
  .section-title { font-size: 14px; margin: 10px 2px 8px; }
  .tool-scope .steps { gap: 8px; }
  .tool-scope .step-head { padding: 10px 12px; gap: 8px; }
  .tool-scope .step-titles .t { font-size: 13px; line-height: 1.4; }
  .tool-scope .step-titles .d { font-size: 10.5px; }
  .tool-scope .step-verdict { font-size: 10.5px; padding: 2px 7px; }
  .tool-scope .disclaimer { font-size: 10.5px; line-height: 1.65; }

  /* ------------------------------------------------------------ 步骤正文：防裁切
     原组合：.step-card { overflow: hidden } + .tbl th/td { white-space: nowrap }。
     第 18 步这类 5 列表格（年份 + 3 指标 + 评价）在 390px 下必然超宽，
     右侧「评价」列和数值末尾的 % 会被整块裁掉且无法滚动。
     修法：① 卡片不再裁切 ② 表格改固定布局，宽度锁死在容器内
           ③ 表头允许折行、数值保持一行但缩到 10px ④ 长文本允许任意处折行。 */
  .tool-scope .step-card { overflow: visible; }
  .tool-scope .step-body { padding: 0 10px 12px; }
  .tool-scope .step-purpose {
    font-size: 11px; line-height: 1.6; margin: 9px 0 5px;
    overflow-wrap: anywhere;
  }
  .tool-scope .step-threshold {
    font-size: 11px; line-height: 1.6; padding: 7px 9px; margin-bottom: 8px;
    white-space: normal; overflow-wrap: anywhere; word-break: break-word;
  }
  .tool-scope .step-chart { margin: 4px 0 8px; }
  .tool-scope .step-analysis {
    font-size: 11px; line-height: 1.65; margin-top: 8px; padding: 8px 9px;
    overflow-wrap: anywhere; word-break: break-word;
  }

  /* 表格：5 列全部留在卡片内，表头折行、数值不折行 */
  .tool-scope .step-body .tbl {
    table-layout: fixed; width: 100%; max-width: 100%; font-size: 10px;
  }
  .tool-scope .step-body .tbl th,
  .tool-scope .step-body .tbl td {
    font-size: 10px; padding: 5px 2px; line-height: 1.35;
    text-align: center; white-space: normal;
    overflow-wrap: anywhere; word-break: break-word;
  }
  .tool-scope .step-body .tbl th:first-child { width: 34px; }
  .tool-scope .step-body .tbl th:last-child { width: 38px; }
  .tool-scope .step-body .tbl tbody td {
    white-space: nowrap; font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
  }

  /* ------------------------------------------------------------ 现金流肖像 / 汇总表 / 综合评价 */
  .tool-scope .cf-head h3,
  .tool-scope .eval-head h3 { font-size: 12px; }
  .tool-scope .cf-score,
  .tool-scope .eval-ratio { font-size: 11px; }
  .tool-scope .cf-comment,
  .tool-scope .cf-rule,
  .tool-scope .eval-note { font-size: 10.5px; }
  .tool-scope .vd-label { font-size: 11px; }
  .tool-scope .vd-num { font-size: 27px; }
  .tool-scope .vd-level { font-size: 19px; }
  .tool-scope .vd-desc,
  .tool-scope .vd-sub,
  .tool-scope .vd-panel li,
  .tool-scope .vd-note { font-size: 11px; line-height: 1.7; }
  .tool-scope .vd-panel h4 { font-size: 12px; }

  /* ------------------------------------------------------------ 页脚
     原 760px 规则让每个 span 独占一行，形成 6 行碎片；这里恢复横向两带：
     第一带 1 行（反馈 + 邮箱 + 工作时间），第二带 2 行（备案 + 版权）。 */
  .site-footer { padding: 14px 10px 16px; font-size: 10px; line-height: 1.6; }
  .footer-row {
    flex-direction: row; flex-wrap: wrap; align-items: baseline;
    justify-content: center; gap: 2px 6px;
  }
  .footer-row + .footer-row { margin-top: 5px; }
  .footer-feedback {
    font-size: 10px; flex-wrap: nowrap; gap: 0 3px; justify-content: center;
  }
  .footer-feedback a { margin: 0 3px; }
  .footer-hours { display: inline; width: auto; margin-top: 0; font-size: 9.5px; }
  .footer-row:last-child { display: block; text-align: center; line-height: 1.65; }
  .footer-beian, .footer-copy {
    display: inline; font-size: 9px; letter-spacing: -0.15px; line-height: 1.65;
  }
  .footer-beian .sep { margin: 0 3px; }
  .footer-beian img { height: 10px; vertical-align: -1px; margin-right: 2px; }
  .footer-copy { margin-left: 6px; }   /* 纯间距分隔，不新增文字 */
}
