/* HVAC AI - 配色 B 藏青蓝 2026-11-17：浅蓝灰底、藏青标题、柔和蓝按钮，无渐变 */
:root {
  --brand: #1d3557;
  --brand-dark: #14213d;
  --accent: #2f6db3;
  --accent-soft: rgba(47, 109, 179, 0.10);
  --bg: #eef2f6;
  --card: #ffffff;
  --text: #1f2a37;
  --muted: #5b6b7c;
  --line: #d8e0e8;
  --ok: #1c7c4a;
  --warn: #b25e09;
  --err: #b3261e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 33, 61, 0.05), 0 8px 24px rgba(20, 33, 61, 0.07);
  --shadow-lift: 0 2px 4px rgba(20, 33, 61, 0.06), 0 12px 32px rgba(20, 33, 61, 0.11);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1c2b;
    --card: #16283d;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: #2c4258;
    --accent-soft: rgba(47, 109, 179, 0.25);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(960px, 100% - 2rem);
  margin-inline: auto;
}

/* ===== 顶栏 ===== */
.site-header {
  background: var(--brand-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(20, 33, 61, 0.18);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}
.brand-text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.brand-text small {
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
}
.version {
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

/* ===== 主区 ===== */
main.container {
  flex: 1;
  padding: 1.6rem 0 3rem;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 2.2rem 0 1.6rem;
}
.hero h1 {
  margin: 0;
  font-size: 2.3rem;
  letter-spacing: 0.03em;
  color: var(--brand-dark);
}
.subtitle {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.7rem;
  margin-bottom: 2.2rem;
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-lift); }
.card.calculator { border-top: 3px solid var(--accent); }

/* ===== 工具 Tab（胶囊式） ===== */
.tool-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.3rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem;
}
.tool-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.55rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.tool-tab:hover { color: var(--text); }
.tool-tab.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(47, 109, 179, 0.35);
}

.card h2 {
  margin: 0 0 0.3rem;
  font-size: 1.22rem;
  color: var(--brand-dark);
}
@media (prefers-color-scheme: dark) {
  .card h2 { color: #a8c5e8; }
}
.card-desc {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.notice {
  background: rgba(217, 165, 20, 0.1);
  border: 1px solid rgba(217, 165, 20, 0.3);
  border-left: 4px solid #d9a514;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
  font-size: 0.88rem;
  color: var(--warn);
  margin-bottom: 1.2rem;
}

/* ===== 表单 ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.4rem;
}
.field > span {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
input[type="number"], select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="number"]:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="number"]:hover, select:hover { border-color: var(--accent); }
.inline-group { display: flex; gap: 0.5rem; }
.inline-group input { flex: 1; }
.inline-group select { width: 100px; flex: none; }

.segmented {
  display: flex;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.seg-item { flex: 1; }
.seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.seg-item span {
  display: block;
  text-align: center;
  padding: 0.58rem 0;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s;
}
.seg-item input:checked + span {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

/* ===== 按钮 ===== */
.form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
}
.btn-primary {
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  padding: 0.65rem 2.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(47, 109, 179, 0.3);
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(47, 109, 179, 0.4);
}
.btn-primary:active { transform: translateY(1px) scale(0.99); }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
  font-family: inherit;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

/* ===== 结果与错误 ===== */
.error-box {
  margin-top: 1.2rem;
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid rgba(179, 38, 30, 0.25);
  border-left: 4px solid var(--err);
  color: var(--err);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
  font-size: 0.9rem;
}
.result {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1.2rem 1.4rem;
  animation: fadeUp 0.25s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.psychro-grid { grid-template-columns: repeat(3, 1fr); }
.stat-label {
  display: block;
  font-size: 0.83rem;
  color: var(--muted);
}
.stat-value b {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  .stat-value b { color: #a8c5e8; }
}
.stat-value i {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--muted);
  margin-left: 0.3rem;
}
.hint {
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  font-size: 0.9rem;
  color: var(--text);
}

/* ===== 功能卡片 ===== */
.features h2 {
  font-size: 1.15rem;
  color: var(--brand-dark);
  margin: 0 0 1rem;
}
@media (prefers-color-scheme: dark) {
  .features h2 { color: #a8c5e8; }
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.feature-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  color: var(--text);
}
.feature-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-size: 0.68rem;
  color: #b98a12;
  background: rgba(217, 165, 20, 0.12);
  border: 1px solid rgba(217, 165, 20, 0.35);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

/* ===== 页脚 ===== */
.site-footer {
  background: #14213d;
  color: rgba(255, 255, 255, 0.75);
  padding: 1.2rem 0;
  font-size: 0.82rem;
}
.site-footer p { margin: 0.2rem 0; }
.site-footer a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.35); text-underline-offset: 3px; }
.site-footer a:hover { color: #fff; }
.disclaimer { color: rgba(255, 255, 255, 0.42); }

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .psychro-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .feature-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .card { padding: 1.15rem 1.05rem; }
  .site-header { position: static; }
}
