/* 光伏小超人 · 统一 UI 规范层
   仅覆盖视觉表现，不改变 DOM、JS、计算逻辑与数据口径。
   必须在各工具私有 CSS 之后加载，否则会被覆盖。 */

:root {
  --pv-green: #107a57;
  --pv-green-dark: #095f43;
  --pv-green-soft: #eaf6ef;
  --pv-ink: #17211e;
  --pv-muted: #657386;
  --pv-line: #d9e6df;
  --pv-paper: #f3f6f1;
  --pv-font: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

/* 1 字体族：统一到 body 与表单控件 */
body { font-family: var(--pv-font); }
body :where(input, select, textarea, button) { font-family: var(--pv-font); }

/* 2 工具顶栏：统一盒模型（不动 display / position / align-items，保留各页布局行为） */
body .topbar,
body .tool-titlebar,
body .cable-topbar,
body header.tool-titlebar {
  min-height: 70px;
  padding: 20px max(24px, calc((100vw - 1392px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--pv-line);
  gap: 18px;
}
body header.tool-titlebar { height: auto; }

/* 3 工具主标题：24 / 700 / 1.2 / 主绿 */
body .topbar h1,
body .tool-titlebar h1,
body .cable-topbar h1,
body .brand h1,
body header.tool-titlebar strong {
  margin: 0;
  color: var(--pv-green) !important;
  -webkit-text-fill-color: var(--pv-green);
  font-family: var(--pv-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

/* 3b 发电查询卡片标题：与其余 7 工具「序号 + 面板标题」同款
   序号 span.step 由 §6 统一为 32×24 / 16px / 主绿；标题文字 16px / 深墨 */
body .tool-heading h1,
body .tool-heading h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pv-ink);
  font-family: var(--pv-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0;
}

/* 4 顶栏副标题 */
body .topbar p,
body .tool-titlebar p,
body .cable-topbar p {
  margin: 6px 0 0;
  max-width: none;
  color: var(--pv-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* 5 面板标题：16 / 700 / 24 / 深墨 */
body .section-head h2,
body .section-title h2,
body .mod-head h2,
body .panel-heading h2,
body .panel-head h2,
body .workflow-section > h2 {
  margin: 0;
  color: var(--pv-ink);
  font-family: var(--pv-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0;
}

/* 6 序号：统一 32×24、无底色无圆角、主绿、tabular 数字 */
body .step,
body .section-index,
body .section-head .section-index,
body .mod-no,
body .section-title > span,
body .workflow-section > h2 > span,
body .panel-head h2 > .step,
body .panel-heading .step,
body .canvas-title .step {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 32px;
  height: 24px;
  flex: 0 0 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pv-green);
  opacity: 1;
  font-family: var(--pv-font);
  font-size: 16px;
  font-weight: 700;
  font-style: normal;
  line-height: 24px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

/* 7 标题行：统一留白与序号间距 */
body .section-head,
body .section-title,
body .mod-head,
body .panel-heading > div,
body .panel-head h2,
body .workflow-section > h2 {
  gap: 8px;
  min-height: 24px;
}
body .section-head,
body .section-title,
body .mod-head,
body .workflow-section > h2 { margin-bottom: 14px; }

/* 8 面板头（带边框型）：统一高度、内边距、白底、1px 分隔线 */
body .panel-heading,
body .panel-head {
  min-height: 56px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--pv-line);
}

/* 9 标题行右侧说明文字 */
body .panel-heading small,
body .panel-head .hint,
body .mod-note {
  color: var(--pv-muted);
  font-size: 12px;
}

/* 10 表单焦点：统一为主绿（原共享层为蓝色） */
body :where(input, select, textarea):focus { outline-color: var(--pv-green); }
body :where(button, .button, .btn):focus-visible {
  outline: 2px solid var(--pv-green);
  outline-offset: 2px;
}

/* 10b 顶栏按钮：统一尺寸与字号，保留各页原有配色与移动端全宽行为 */
body .topbar-actions button,
body .topbar .actions button,
body .tool-titlebar .actions button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

/* 11 响应式：两档统一断点，避免后置规则反超各工具原有 media 缩小 */
@media (max-width: 900px) {
  body .topbar,
  body .tool-titlebar,
  body .cable-topbar,
  body header.tool-titlebar {
    min-height: 60px;
    padding: 16px 20px;
  }
  body .topbar h1,
  body .tool-titlebar h1,
  body .cable-topbar h1,
  body .brand h1,
  body header.tool-titlebar strong {
    font-size: 20px;
    white-space: normal;
  }
}
@media (max-width: 640px) {
  body .topbar,
  body .tool-titlebar,
  body .cable-topbar,
  body header.tool-titlebar {
    min-height: 56px;
    padding: 14px 16px;
  }
  body .topbar h1,
  body .tool-titlebar h1,
  body .cable-topbar h1,
  body .brand h1,
  body header.tool-titlebar strong { font-size: 18px; }
  body .panel-heading,
  body .panel-head { min-height: 52px; padding: 12px 16px; }
}
