/* ============ 陕西三秦康泰检测技术有限公司 官网样式（技术风） ============ */
:root {
  --primary: #14508c;
  --primary-dark: #0d3a67;
  --accent: #0e9488;
  --accent-light: #e6f5f3;
  --bg: #f6f8fa;
  --text: #222b36;
  --text-light: #64748b;
  --border: #e2e8f0;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(15, 23, 42, 0.06);
  --g1: #0d3a67;
  --g2: #14508c;
  --g3: #0e9488;
  --footer-bg: #0f1b2d;
  --font-sans: Inter, Geist, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono",
    "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --code-bg: #0d1526;
  --code-border: #1e2a44;
}

/* ---------- 主题：青碧（政府门户风） ---------- */
body[data-theme="teal"] {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #14b8a6;
  --accent-light: #e6f7f5;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(13, 148, 136, 0.10);
  --g1: #134e4a;
  --g2: #0f766e;
  --g3: #2dd4bf;
  --footer-bg: #0b2f2c;
}

/* ---------- 主题：生态绿 ---------- */
body[data-theme="green"] {
  --primary: #16a34a;
  --primary-dark: #166534;
  --accent: #22c55e;
  --accent-light: #eaf7ee;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(22, 163, 74, 0.10);
  --g1: #14532d;
  --g2: #16a34a;
  --g3: #86efac;
  --footer-bg: #14301f;
}

/* ---------- 主题：中国红 ---------- */
body[data-theme="red"] {
  --primary: #b91c1c;
  --primary-dark: #7f1d1d;
  --accent: #d97706;
  --accent-light: #fdeee2;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(185, 28, 28, 0.10);
  --g1: #7f1d1d;
  --g2: #b91c1c;
  --g3: #f59e0b;
  --footer-bg: #450a0a;
}

/* ---------- 主题：商务紫 ---------- */
body[data-theme="violet"] {
  --primary: #6d28d9;
  --primary-dark: #4c1d95;
  --accent: #8b5cf6;
  --accent-light: #f1eafd;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(109, 40, 217, 0.10);
  --g1: #3b0764;
  --g2: #6d28d9;
  --g3: #c4b5fd;
  --footer-bg: #2a1245;
}

/* ---------- 主题：日落橙 ---------- */
body[data-theme="amber"] {
  --primary: #c2410c;
  --primary-dark: #9a3412;
  --accent: #f59e0b;
  --accent-light: #fef3e2;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(194, 65, 12, 0.10);
  --g1: #7c2d12;
  --g2: #c2410c;
  --g3: #fbbf24;
  --footer-bg: #431407;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 主题切换平滑过渡 */
  transition: background 0.3s ease, color 0.3s ease;
}
/* 主题切换时让关键区块的颜色跟随平滑过渡 */
.topbar, .header, .logo-mark, .footer, .btn-a, .hero, .section-tag, .card {
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  body, .topbar, .header, .logo-mark, .footer, .btn-a, .hero, .section-tag, .card { transition: none; }
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--font-mono); }

/* ---------- 顶部信息条 ---------- */
.topbar {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-family: var(--font-mono);
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a:hover { color: #fff; }

/* ---------- 导航 ---------- */
.header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}
.logo-text { line-height: 1.25; }
.logo-text .cn { font-size: 16.5px; font-weight: 700; color: var(--primary-dark); letter-spacing: 0.2px; }
.logo-text .en { font-size: 10px; color: var(--text-light); font-family: var(--font-mono); letter-spacing: 0.3px; }
.nav { display: flex; gap: 2px; }
.nav a {
  padding: 8px 13px; font-size: 14.5px; font-weight: 500; color: var(--text);
  border-radius: 7px; transition: all 0.15s; position: relative;
}
.nav a:hover { color: var(--primary); background: var(--bg); }
.nav a.active { color: var(--primary); font-weight: 600; }
.nav a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 1px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
/* 文档 / API / 状态 入口 */
.nav-dev { display: flex; gap: 8px; flex-shrink: 0; }
.nav-dev a {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-light);
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 7px;
  transition: all 0.15s; background: var(--white);
}
.nav-dev a:hover { color: var(--primary); border-color: var(--primary); }
.nav-dev a b { color: var(--accent); font-weight: 600; margin-right: 4px; }

/* ---------- Hero（首屏直出性能数据） ---------- */
.hero {
  background: linear-gradient(120deg, var(--g1) 0%, var(--g2) 55%, var(--g3) 130%);
  color: #fff;
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; right: -140px; top: -140px;
  width: 460px; height: 460px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero .pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.pill {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35); color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}
.pill.ok { border-color: rgba(74, 222, 128, 0.6); color: #bbf7d0; }
.hero h1 { font-size: 38px; font-weight: 700; letter-spacing: 0.5px; line-height: 1.28; margin-bottom: 14px; }
.hero h1 .hl { color: #7df0dd; }
.hero p.lead { font-size: 16px; opacity: 0.92; margin-bottom: 26px; max-width: 540px; }
.hero .btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 11px 26px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; cursor: pointer; border: none;
  transition: all 0.15s; font-family: var(--font-sans);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(0.93); }
.btn-outline { border: 1px solid rgba(255, 255, 255, 0.6); color: #fff; background: transparent; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.btn-ghost { background: var(--primary); color: #fff; }
.btn-ghost:hover { background: var(--primary-dark); }

/* 终端卡片 */
.term {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
}
.term-bar { display: flex; gap: 6px; padding: 10px 14px; background: #111b30; border-bottom: 1px solid var(--code-border); align-items: center; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2c3a55; }
.term-bar i:first-child { background: #ef4444aa; }
.term-bar i:nth-child(2) { background: #f59e0baa; }
.term-bar i:nth-child(3) { background: #22c55eaa; }
.term-bar .tt { margin-left: 8px; color: #5b708f; font-size: 11.5px; }
.term-body { padding: 16px 18px; color: #d8e2f0; white-space: pre-wrap; word-break: break-all; }
.term-body .c { color: #5b708f; }
.term-body .g { color: #4ade80; }
.term-body .b { color: #7dd3fc; }
.term-body .y { color: #fbbf24; }
.term-body .w { color: #e2e8f0; font-weight: 600; }

/* 页内横幅 */
.page-banner {
  background: linear-gradient(120deg, var(--g1), var(--g2));
  color: #fff; padding: 44px 0; text-align: center;
}
.page-banner h2 { font-size: 26px; letter-spacing: 1px; margin-bottom: 6px; font-weight: 700; }
.page-banner p { opacity: 0.85; font-size: 14px; font-family: var(--font-mono); }

/* ---------- 区块 ---------- */
.section { padding: 56px 0; }
.section.gray { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 36px; }
.section-head .sub { color: var(--accent); font-size: 16px; letter-spacing: 2px; font-weight: 600; font-family: var(--font-mono); text-transform: uppercase; }
.section-head h2 { font-size: 26px; color: var(--primary-dark); margin: 6px 0 8px; letter-spacing: 0.3px; font-weight: 700; }
.section-head .line { width: 40px; height: 3px; background: var(--accent); border-radius: 2px; }
.section-head p.desc { color: var(--text-light); margin-top: 10px; font-size: 14.5px; }
.section-head.center { text-align: center; }
.section-head.center .line { margin: 0 auto; }

/* 卡片网格（高密度） */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  border: 1px solid var(--border);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px; margin-bottom: 14px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.card h3 { font-size: 16.5px; color: var(--primary-dark); margin-bottom: 7px; font-weight: 650; }
.card p { font-size: 13.8px; color: var(--text-light); }
.card .idx { font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 8px; display: block; }
.card ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-light); font-size: 13.5px; }
.card ul li { margin-bottom: 3px; }

/* 性能指标卡 */
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric {
  border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px;
  background: var(--white); box-shadow: var(--shadow);
}
.metric .v { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.15; }
.metric .v small { font-size: 15px; font-weight: 600; }
.metric .k { font-size: 12.5px; color: var(--text-light); margin-top: 3px; }
.metric .d { font-size: 11.5px; color: var(--accent); font-family: var(--font-mono); margin-top: 6px; }

/* 数字统计 */
.stats { display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat .num { font-family: var(--font-mono); font-size: 36px; font-weight: 700; color: var(--primary); }
.stat .num span { font-size: 18px; }
.stat .label { color: var(--text-light); font-size: 13.5px; margin-top: 2px; }

/* 首页业务受理卡片 */
.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 26px 28px;
  backdrop-filter: blur(4px);
  color: #fff;
}
.hero-card h3 { font-size: 18px; margin-bottom: 2px; }
.hero-card > p { font-size: 12.5px; opacity: 0.75; margin-bottom: 16px; font-family: var(--font-mono); letter-spacing: 1px; }
.hero-card .hc-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
  font-size: 13.5px;
}
.hero-card .hc-row:last-of-type { border-bottom: none; }
.hero-card .hc-row span { opacity: 0.7; flex-shrink: 0; }
.hero-card .hc-row b { font-weight: 600; text-align: right; font-family: var(--font-mono); font-size: 13px; }

/* 新闻列表（紧凑） */
.news-item {
  display: flex; gap: 18px; padding: 15px 4px;
  border-bottom: 1px solid var(--border); align-items: flex-start;
}
.news-item:last-child { border-bottom: none; }
.news-item .date-box {
  min-width: 68px; text-align: center; background: var(--bg);
  border-radius: 8px; padding: 9px 6px; border: 1px solid var(--border);
}
.news-item .date-box .d { font-family: var(--font-mono); font-size: 21px; font-weight: 700; color: var(--primary); line-height: 1.15; }
.news-item .date-box .m { font-size: 11px; color: var(--text-light); font-family: var(--font-mono); }
.news-item h3 { font-size: 15.5px; color: var(--text); margin-bottom: 4px; font-weight: 600; }
.news-item h3 a:hover { color: var(--primary); }
.news-item .tag {
  display: inline-block; font-size: 11.5px; color: var(--accent);
  background: var(--accent-light); border-radius: 4px; padding: 1px 8px; margin-right: 8px;
  font-family: var(--font-mono);
}
.news-item p { font-size: 13.5px; color: var(--text-light); }

/* 公示表格 */
.notice-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.notice-table th {
  background: var(--bg); color: var(--text-light); padding: 11px 14px;
  font-size: 12.5px; font-weight: 600; text-align: left;
  font-family: var(--font-mono); letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.notice-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.notice-table tr:last-child td { border-bottom: none; }
.notice-table tr:hover td { background: #f8fafc; }
.notice-table a { color: var(--primary); }
.notice-table a:hover { text-decoration: underline; }

/* 表单 */
.form-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; border: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; color: var(--text); margin-bottom: 5px; font-weight: 600; }
.form-group label .req { color: #d9534f; margin-left: 2px; }
.form-group input, .form-group textarea, .form-group select {
  padding: 10px 13px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 14.5px; font-family: inherit; outline: none; transition: border 0.15s;
  background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); background: #fff; }
.form-group textarea { min-height: 104px; resize: vertical; }
.form-tip { font-size: 13px; color: var(--text-light); margin-top: 12px; }

/* 文章详情 */
.article { max-width: 800px; margin: 0 auto; }
.article h1 { font-size: 25px; color: var(--text); margin-bottom: 10px; font-weight: 700; }
.article .meta { color: var(--text-light); font-size: 13px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; font-family: var(--font-mono); }
.article .body { font-size: 15.5px; line-height: 1.9; color: #334155; }
.article .body p { margin-bottom: 16px; text-indent: 2em; }

/* 课程卡片 */
.course-card { position: relative; }
.course-card .badge {
  position: absolute; top: 18px; right: 18px; background: var(--accent);
  color: #fff; font-size: 11.5px; border-radius: 999px; padding: 2px 11px;
  font-family: var(--font-mono);
}
.course-card .cdate { color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 5px; font-family: var(--font-mono); }
.course-card .meta { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }

/* 联系页 */
.contact-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.contact-item .ci { font-size: 19px; width: 38px; height: 38px; flex-shrink: 0; border-radius: 9px; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.contact-item h4 { font-size: 14.5px; color: var(--primary-dark); }
.contact-item p { font-size: 14px; color: var(--text-light); font-family: var(--font-mono); }

/* 内联代码 / API 页 */
.code {
  background: var(--code-bg); border: 1px solid var(--code-border);
  color: #d8e2f0; border-radius: 9px; font-family: var(--font-mono);
  font-size: 12.8px; line-height: 1.75; padding: 13px 16px;
  overflow-x: auto; white-space: pre; position: relative;
}
.code .c { color: #5b708f; } .code .g { color: #4ade80; } .code .b { color: #7dd3fc; } .code .y { color: #fbbf24; }
.inline-code {
  font-family: var(--font-mono); font-size: 12.8px;
  background: var(--accent-light); color: var(--primary-dark);
  padding: 1.5px 7px; border-radius: 5px;
}
.api-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.api-table th { background: var(--bg); padding: 10px 14px; text-align: left; font-size: 12.5px; color: var(--text-light); font-family: var(--font-mono); border-bottom: 1px solid var(--border); }
.api-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13.8px; vertical-align: top; }
.api-table tr:last-child td { border-bottom: none; }
.method {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 5px; display: inline-block; margin-right: 8px;
}
.method.get { background: #dbeafe; color: #1d4ed8; }
.method.post { background: #dcfce7; color: #15803d; }
.method.put { background: #fef3c7; color: #b45309; }
.method.del { background: #fee2e2; color: #b91c1c; }
.api-path { font-family: var(--font-mono); font-size: 13px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-family: var(--font-mono); }
.tag.ok { background: #dcfce7; color: #15803d; }
.tag.off { background: #f1f5f9; color: #64748b; }
.copy-btn {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-light);
  background: var(--bg); border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 10px; cursor: pointer; transition: all 0.15s;
}
.copy-btn:hover { color: var(--primary); border-color: var(--primary); }

/* 状态页 */
.status-banner {
  border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px;
  display: flex; align-items: center; gap: 14px; background: var(--white); box-shadow: var(--shadow);
}
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); } 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.06); } }
.status-banner h3 { font-size: 16px; font-weight: 650; }
.status-banner .sub { font-size: 12.5px; color: var(--text-light); font-family: var(--font-mono); }
.latency-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 8px; }
.latency-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s; }

/* 页脚 */
.footer { background: var(--footer-bg); color: rgba(255, 255, 255, 0.75); padding: 44px 0 0; }
.footer .cols { display: grid; grid-template-columns: 1.6fr 0.9fr 1.4fr; gap: 32px; padding-bottom: 36px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; font-weight: 600; }
.footer p, .footer a { font-size: 13.5px; line-height: 2; color: rgba(255, 255, 255, 0.68); }
.footer a:hover { color: #fff; }
.footer .copy { border-top: 1px solid rgba(255, 255, 255, 0.10); padding: 16px 0; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, 0.45); font-family: var(--font-mono); }

/* 提示 */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 24px; border-radius: 7px;
  font-size: 14px; z-index: 999; display: none; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.toast.show { display: block; animation: fadein 0.25s; }
.toast.err { background: #c0392b; }
.toast.suc { background: var(--accent); }
@keyframes fadein { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 滚动触发轻量动画 ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 主题切换器 ---------- */
.theme-switch {
  position: fixed; right: 22px; bottom: 26px; z-index: 300;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.theme-switch .ts-panel {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.16); padding: 14px;
  display: none; min-width: 168px;
}
.theme-switch.open .ts-panel { display: block; animation: fadein 0.2s; }
.theme-switch .ts-title { font-size: 12px; color: var(--text-light); margin-bottom: 10px; letter-spacing: 1px; font-family: var(--font-mono); }
.theme-switch .ts-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: none; background: transparent; border-radius: 8px;
  font-size: 14px; color: var(--text); cursor: pointer; text-align: left; font-family: inherit;
}
.theme-switch .ts-item:hover { background: var(--bg); }
.theme-switch .ts-item.active { background: var(--accent-light); font-weight: 600; }
.theme-switch .ts-dot {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55), 0 1px 4px rgba(0, 0, 0, 0.2);
}
.theme-switch .ts-check { margin-left: auto; color: var(--accent); font-size: 13px; visibility: hidden; }
.theme-switch .ts-item.active .ts-check { visibility: visible; }
.theme-switch .ts-item.active .ts-dot {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55), 0 0 0 2px var(--accent-light), 0 0 0 3.5px var(--accent);
}
.theme-switch .ts-btn {
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--g2), var(--accent));
  color: #fff; font-size: 20px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  display: flex; align-items: center; justify-content: center; transition: transform 0.2s;
}
.theme-switch .ts-btn:hover { transform: scale(1.08); }

@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-2, .metric-row { grid-template-columns: 1fr; }
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 29px; }
  .nav { display: none; }
  .nav-dev { display: none; }
  .footer .cols { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stats { gap: 36px; }

  /* 移动端导航：折叠为下拉面板 */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex-shrink: 0; cursor: pointer;
    border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: var(--text); font-size: 17px; line-height: 1;
  }
  .nav-toggle:hover { border-color: var(--primary); color: var(--primary); }
  .header .container { position: relative; }
  .nav.open {
    display: flex; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10); padding: 6px 0; z-index: 99;
  }
  .nav.open a { padding: 13px 22px; border-radius: 0; font-size: 15px; }
  .nav.open a.active { background: var(--accent-light); }
  .nav.open a.active::after { display: none; }
}

/* 桌面端隐藏汉堡按钮（用 min-width 反向覆盖，避免与移动端规则冲突） */
@media (min-width: 901px) {
  .nav-toggle { display: none; }
}
