/* =========================================================================
   ui-unify.css — 全站排版与组件统一层（最后加载，只统一尺寸/节奏，不改结构）
   2026-10-19 深度整理平台
   原则：不动布局骨架，只让「同一层级的东西同一个尺寸」。
   ========================================================================= */
:root{
  --u-container: 1180px;
  --u-gap: 20px;
  --u-radius: 14px;
  --u-radius-sm: 10px;
  --u-h2: 28px;
  --u-h3: 20px;
  --u-body: 15.5px;
  --u-hint: 13.5px;
  --u-ctl-h: 40px;      /* 输入/按钮统一高度 */
  --u-ctl-h-sm: 28px;
  --u-sec: 64px;        /* 一级区块上下节奏 */
}

/* —— 正文字号阶梯：同一级文本全站一致 —— */
body{ font-size: var(--u-body); }

/* —— 容器：统一最大宽度，左右留白一致（只改上限，不改内距） —— */
.wrap, .container, .zd-wrap, .page-wrap{ max-width: var(--u-container); margin-left: auto; margin-right: auto; }

/* —— 区块标题：全站同一字号、同一间距 —— */
.sec-head h2, section > h2, .section-title, .box-head h2{
  font-size: var(--u-h2) !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  letter-spacing: .2px;
}
.sec-head{ margin-bottom: 18px; }
.sec-head p, .section-sub{ font-size: var(--u-body); line-height: 1.75; }

/* —— 卡片网格：同一行必须等高（消除一高一低） —— */
.grid, .cards, .card-grid, .mode-cards{
  display: grid;
  gap: var(--u-gap);
  align-items: stretch;      /* 关键：行内等高 */
}
.grid > *, .cards > *, .card-grid > *, .mode-cards > *{
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card, .mode-card, .work-card{
  border-radius: var(--u-radius);
  height: 100%;
}
/* 卡片内部文字纵向排布，底部自然对齐，不再出现长短不一 */
.card > :last-child, .mode-card > :last-child{ margin-top: auto; }

/* —— 按钮：全站统一高度/圆角/字号（小按钮单独一档） —— */
.btn, button.btn, .header-link-btn, .cta, .primary-btn, .submit-btn, .action-btn{
  min-height: var(--u-ctl-h);
  padding-left: 22px;
  padding-right: 22px;
  border-radius: var(--u-radius-sm);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
}
.btn-sm, .chip, .tag, .direction-tag, .pill{ min-height: var(--u-ctl-h-sm); border-radius: 999px; font-size: 14px; }

/* —— 表单控件：统一高度与圆角（不用实线边框，用柔和阴影） —— */
input[type="text"], input[type="tel"], input[type="password"], input[type="search"],
input[type="number"], input[type="email"], select, textarea{
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
input[type="text"], input[type="tel"], input[type="password"], input[type="search"],
input[type="number"], input[type="email"], select{
  min-height: var(--u-ctl-h);
  padding: 0 14px;
}
textarea{ padding: 12px 14px; }

/* —— 一级区块上下留白统一 —— */
section.sec, .sec-block{ padding-top: var(--u-sec); padding-bottom: var(--u-sec); }

/* —— 页脚：与内容同宽，避免忽宽忽窄 —— */
footer, .zd-footer, .portal-footer{ margin-left: auto; margin-right: auto; }

/* —— 表格：统一行高与字号 —— */
table th, table td{ font-size: 14px; line-height: 1.6; }

/* —— 卡片内容：统一标题字号、正文限行、底部对齐（2026-10-19 案例页等高） —— */
.grid{ grid-auto-rows: 1fr; }
.grid > .card, .card-grid > .card{ display:flex; flex-direction:column; }
.grid > .card h3{ font-size:20px !important; line-height:1.45 !important; margin:0 0 10px !important; font-weight:700; }
.grid > .card p{ font-size:14px !important; line-height:1.72 !important; margin:0 0 10px; color:var(--u-body-2,var(--ds-c-456)); }
.grid > .card p:not(:last-child){ display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.grid > .card > :last-child{ margin-top:auto; margin-bottom:0; }
[class*="tag"], [class*="badge"], .pill{ white-space:nowrap; }

/* —— 顶栏品牌图标：与小程序图标一致后统一到 32px，方图不变形 —— */
.zd-brand img, .wb-home img{ height:34px !important; width:34px !important; object-fit:contain !important; display:block }
.wb-mark, .welcome-logo img{ height:48px !important; max-height:48px !important; width:auto !important }
@media (max-width:900px){ .zd-brand img, .wb-home img{ height:28px !important } }
