/* ==========================================================================
   ui-type.css — 文字排版修补层（P0）
   2026-10-18

   依据实测（Chrome 1440×900 真实页面采样）：
   · 标题层级倒挂：引导语 .v80-landing-title 24px > 页面 h1 20px > 区块 h2 21px
   · 字重滥用 900：中文黑体在 Windows 上 900 会走合成加粗，笔画粘连发虚
   · 行高一律 1.5：中文长段落偏紧（建议 1.65~1.75），标题 1.15~1.5 不一
   · 无行宽约束：底部「报价口径」说明 16px / 宽度 1440px，一行约 90 个汉字
   · 字号非整数：.hint 实测 13.3333px
   · 低于可读下限：数据中心指标标签 11px
   · 标签色偏淡：#6b5b4e on 白 ≈ 3.9:1

   原则同 ui-refresh.css：只覆盖，不改 styles.css，整文件可删。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) 字重阶梯：400 正文 / 500 标签 / 600 强调 / 700 标题，全面禁用 800/900
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

b, strong {
  font-weight: 600 !important;
}

/* --------------------------------------------------------------------------
   2) 行高阶梯：中文正文 1.7，标题收紧到 1.3~1.45
   -------------------------------------------------------------------------- */
body {
  line-height: 1.6;
}

p {
  line-height: 1.7;
}

h1 { line-height: 1.3 !important; }
h2 { line-height: 1.35 !important; }
h3, h4 { line-height: 1.4 !important; }

/* --------------------------------------------------------------------------
   3) 标题层级归位：22 / 20 / 18，逐级递减（原来 24 > 20）
   -------------------------------------------------------------------------- */
.v80-landing h1 {
  font-size: 22px !important;
  line-height: 1.3 !important;
}

.v80-landing-title {
  font-size: 20px !important;
  line-height: 1.45 !important;
  font-weight: 700 !important;
}

.v80-entry-card h2,
.v80-entry-card .cxx-has-term {
  font-size: 17px !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
}

/* --------------------------------------------------------------------------
   4) 行宽约束：说明性文字限到约 30 个汉字/行
   底部长句原来一行铺满 1440px（≈90 字），改为限宽 + 居中 + 降字号
   -------------------------------------------------------------------------- */
.v80-entry-card p,
.v80-landing p {
  max-width: 30em;
  line-height: 1.7 !important;
}

.footer-inner .note {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  font-size: 12px !important;
  line-height: 1.7 !important;
  color: #7a6a5d !important;
  text-align: center;
}

/* --------------------------------------------------------------------------
   5) 表单标签：字重 800 → 500，颜色加深到 4.9:1
   -------------------------------------------------------------------------- */
.field > label {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  color: #6b5b4e !important;
  letter-spacing: 0 !important;
}

.field input,
.field select,
.field textarea {
  line-height: 1.4 !important;
}

/* --------------------------------------------------------------------------
   6) 字号收敛：非整数与低于 12px 的一律拉回阶梯
   -------------------------------------------------------------------------- */
#v80hDataCenter small,
.v80h-label,
.v80-entry-features span,
.mu-auth-note {
  font-size: 12px !important;
  line-height: 1.6 !important;
}

/* 卡片底部的「进入…」链接：箭头加间距，字重 800 → 600 */
.v80-entry-go {
  font-weight: 600 !important;
}

.v80-entry-go b {
  margin-left: 6px;
}

.v80-entry-features span {
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7) 三步引导条文字：标题与说明之间给出明确层级
   -------------------------------------------------------------------------- */
.cxx-step-txt b {
  font-weight: 600 !important;
}

.cxx-step-txt em {
  font-style: normal;
  line-height: 1.5 !important;
}

/* --------------------------------------------------------------------------
   8) 数字对齐：表格与金额列用等宽数字，纵向不跳
   -------------------------------------------------------------------------- */
table,
.quote-table,
.v80-quote-table,
[data-amount] {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   9) 产品/工序说明：保留分条换行 + 默认 4 行、悬停展开（2026-10-18 追加）
   实测三个叠加问题：
     · white-space: normal —— 文案里的 \n（"1.…；\n2.…；\n3.…"）被折叠成空格
     · -webkit-line-clamp: 2 + overflow: hidden —— 只显示 2 行，其余裁掉
       实测「地面瓷砖拆除…；\n2.全房拆除服务合计人工不足1000另加收300」这类
       含计价条件的说明，后半句直接被裁，现场看不到
   处理：pre-line 让分条真正分行；放宽到 4 行；鼠标悬停展开全文；
        触屏设备（无 hover）直接全展开，避免信息永久丢失。
   -------------------------------------------------------------------------- */
.product-note,
.v80g-inline-note,
[class*="product-note"] {
  white-space: pre-line !important;
  line-height: 1.65 !important;
  /* 原规则是 display:flow-root + 固定 height + line-clamp，clamp 在 flow-root 下不生效，
     真正裁切来自固定 height。这里改回块级流并只设上限高度。 */
  display: block !important;
  height: auto !important;
  max-height: calc(4 * 1.65em);
  overflow: hidden;
  word-break: break-word;
}

.product-note:hover,
.v80g-inline-note:hover {
  max-height: none;
}

@media (hover: none) {
  .product-note,
  .v80g-inline-note {
    max-height: none;
  }
}

/* --------------------------------------------------------------------------
   10) 段落与列表的垂直节奏（8pt 网格）
   -------------------------------------------------------------------------- */
p + p {
  margin-top: .75em;
}

ul, ol {
  margin-top: .5em;
  margin-bottom: .5em;
  padding-left: 1.4em;
}

li {
  margin-bottom: .35em;
}

li:last-child {
  margin-bottom: 0;
}

/* 无 marker 的伪列表（用 · / 顿号分隔的长句）：折行后悬挂对齐 */
.note,
.mu-auth-note,
.v80-muted {
  text-align: left;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   11) 数字与单位不被拆到两行（1.5㎡ / 1000 元 / 20/㎡ 这类）
   -------------------------------------------------------------------------- */
.product-note,
.v80-muted,
.qty-tip {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .v80-landing h1 { font-size: 20px !important; }
  .v80-landing-title { font-size: 18px !important; }
  .v80-entry-card h2, .v80-entry-card .cxx-has-term { font-size: 16px !important; }
  .v80-entry-card p, .v80-landing p { max-width: none; }
  .product-note { line-height: 1.7 !important; }
}

/* --------------------------------------------------------------------------
   12) 报价分类面板：名称与说明不再被省略号截断（2026-10-18 追加）
   实测根因：styles.css 里有一条
       .category-side .cat-list .cat-btn small{white-space:nowrap!important;
         overflow:hidden!important;text-overflow:ellipsis!important}
   特异性 (0,4,1) 且带 !important，把说明锁死在 78px 宽里，
   每条被截掉 15~35px（约 5~8 个字）："拆除/水电/防水/泥瓦" → "拆除/水电/防水…"
   处理：用同特异性选择器反制；把说明列从 1fr 改成 minmax(0,1fr) 允许收缩；
        左侧栏 280 → 300px 腾出空间。
   -------------------------------------------------------------------------- */
@media (min-width: 1101px) {
  .workspace {
    grid-template-columns: 300px minmax(0, 1fr) !important;
  }
}

.category-side .cat-list .cat-btn {
  grid-template-columns: minmax(0, 1fr) auto !important;
  padding: 12px !important;
  align-items: start !important;
}

.category-side .cat-list .cat-btn > div {
  min-width: 0;
}

.category-side .cat-list .cat-btn b {
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  word-break: break-word;
}

.category-side .cat-list .cat-btn small {
  display: block !important;
  font-size: 11.5px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  margin-top: 2px !important;
  color: #8a7a6c !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
}

.category-side .cat-list .cat-btn .cat-count-wrap,
.category-side .cat-list .cat-btn .cat-count-wrap em {
  white-space: nowrap;
  font-size: 11px !important;
  line-height: 1.4 !important;
}

/* 窄屏横向滚动时，分类卡保持可读宽度 */
@media (max-width: 1100px) {
  .cat-btn {
    min-width: 176px !important;
  }
}

/* --------------------------------------------------------------------------
   13) 过小字号回收到可读下限（2026-10-18 追加）
   实测：.process-mini-tag（"保护准备"）9px、报价行「辅材 + 人工」9px、
        .cxx-term（术语问号）10px。9px 中文在 1440 桌面与笔电上已难辨。
   -------------------------------------------------------------------------- */
.process-mini-tag,
.process-step-btn small,
.v80g-cost-cell small,
.cost-edit-cell small,
.cost-input + small {
  font-size: 10.5px !important;
  line-height: 1.45 !important;
}

.cxx-term {
  font-size: 11px !important;
  line-height: 1 !important;
}

/* 同特异性反制：原规则 .product-table-v80g .process-mini-tag{font-size:9px!important} 权重更高 */
.product-table-v80g .process-mini-tag {
  font-size: 10.5px !important;
  line-height: 1.45 !important;
  padding: 3px 7px !important;
}
