/* ============================================================
   hscodetoolbox.com — 全局样式引擎
   视觉: 商务清亮风A | 主色蓝+绿(呼应Logo)
   设计token + 组件库 + 工具页布局
   ============================================================ */

:root {
  /* 品牌主色 */
  --blue-900: #0b3a6b;
  --blue-800: #0f4c8a;
  --blue-700: #1360a6;
  --blue-600: #1a76c8;
  --blue-500: #2188e0;
  --blue-100: #e4f1fb;
  --blue-50:  #f0f7fd;

  --green-700: #1e7a4f;
  --green-600: #228b5c;
  --green-500: #2aa06a;
  --green-100:#e3f5ec;
  --green-50: #f0faf5;

  /* 中性 */
  --ink-900: #16283c;
  --ink-700: #3a4e63;
  --ink-500: #6b7d90;
  --ink-300:#a7b4c2;
  --line:    #e3e9f0;
  --bg:      #ffffff;
  --bg-soft: #f6f9fc;
  --bg-blue: #eef6fc;

  /* 语义 */
  --danger:  #d64545;
  --danger-bg:#fdeeee;
  --warn:    #c07a16;
  --warn-bg: #fdf3e0;
  --ok:      var(--green-600);

  /* 圆角 / 阴影 */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(17,42,74,.08), 0 1px 2px rgba(17,42,74,.05);
  --shadow:    0 4px 16px rgba(17,42,74,.08);
  --shadow-lg: 0 12px 34px rgba(17,42,74,.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(26,118,200,.45); outline-offset: 2px; border-radius: 4px; }

h1,h2,h3,h4 { line-height: 1.25; color: var(--ink-900); font-weight: 700; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin: 0 0 .75rem; }
h3 { font-size: 1.1rem; margin: 0 0 .5rem; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section.alt { background: var(--bg-soft); }
.section.blue { background: var(--bg-blue); }
.center { text-align: center; }
.muted { color: var(--ink-500); }
.eyebrow { display:inline-block; font-size:.8rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color: var(--blue-600); margin-bottom:.4rem; }

/* ---------- 顶部导航 ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 24px; height: 96px; }
.brand { display: inline-flex; align-items: center; gap: 13px; font-weight: 800; font-size: 1.75rem; color: var(--ink-900); }
.brand img { width: 80px; height: 80px; border-radius: 12px; }
.brand .hl { color: var(--blue-700); }
.brand .hl2 { color: var(--green-600); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-700); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { background: var(--bg-soft); color: var(--blue-700); text-decoration: none; }
.nav-links a.active { color: var(--blue-700); background: var(--bg-blue); }
.nav-cta { margin-left: 8px; }
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 11px 20px; border-radius: var(--radius-sm); border:2px solid transparent;
  font-weight:700; font-size:.95rem; cursor:pointer; text-decoration:none !important;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-600); color:#fff; }
.btn-primary:hover { background: var(--blue-700); box-shadow: var(--shadow-sm); }
.btn-green { background: var(--green-600); color:#fff; }
.btn-green:hover { background: var(--green-700); }
.btn-ghost { background: transparent; color: var(--blue-700); border-color: var(--blue-600); }
.btn-ghost:hover { background: var(--bg-blue); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; border-radius: var(--radius); }
.btn-block { width:100%; }

/* ---------- 牌子 / Footer ---------- */
.site-footer { background: var(--ink-900); color: #cdd8e5; padding: 40px 0 28px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color:#fff; font-size: .95rem; margin-bottom: .7rem; }
.footer-grid a { color:#a9b8ca; display: block; padding: 3px 0; font-size:.9rem; }
.footer-grid a:hover { color:#fff; }
.footer-brand img { width: 30px; height: 30px; border-radius:6px; }
.footer-brand p { font-size:.85rem; color:#9fb; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.12); margin-top:24px; padding-top:16px; font-size:.8rem; color:#8fa0b5; display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; }

/* ---------- 卡片 ---------- */
.card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.card.hover { transition: transform .15s ease, box-shadow .15s ease; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.icon-badge { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; }
.icon-badge.blue { background: var(--blue-100); color: var(--blue-700); }
.icon-badge.green { background: var(--green-100); color: var(--green-700); }

/* ---------- 按钮组工具页基础 ---------- */
.search-bar { display:flex; gap:8px; }
.search-bar input { flex:1; }

.field { margin-bottom: 14px; }
.field label { display:block; font-weight:600; font-size:.9rem; margin-bottom:6px; color:var(--ink-700); }
.input, select, textarea {
  width:100%; padding: 11px 13px; border:1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size:.95rem; color:var(--ink-900); background:#fff; font-family:inherit;
}
.input:focus, select:focus, textarea:focus { outline:none; border-color:var(--blue-500); box-shadow:0 0 0 3px rgba(33,136,224,.15); }

.tag { display:inline-block; padding:3px 10px; border-radius:20px; font-size:.78rem; font-weight:600; }
.tag.blue { background:var(--blue-100); color:var(--blue-700); }
.tag.green { background:var(--green-100); color:var(--green-700); }
.tag.gray { background:#eef1f5; color:var(--ink-500); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { height: 66px; }
  .nav-links { gap:0; }
  .brand { font-size: 1.15rem; }
  .brand img { width: 44px; height: 44px; }
  .nav-links a { padding:6px 8px; font-size:.85rem; }
  .nav-cta .btn { padding:8px 12px; font-size:.85rem; }
  .footer-grid { grid-template-columns: 1fr; }
}