/* ===========================================
   玩具法规合规助手 — 主样式
   配色:深红 + 琥珀 + 蓝色(玩具警示 + 紧迫感)
   =========================================== */

:root {
  --primary: #DC2626;        /* 主色 - 深红(警示) */
  --primary-dark: #991B1B;
  --primary-light: #FCA5A5;
  --accent: #F59E0B;         /* 琥珀(风险) */
  --secondary: #2563EB;      /* 深蓝(专业) */
  --secondary-light: #DBEAFE;
  --success: #059669;        /* 绿色(低风险/合规) */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #1E293B;
  --text-light: #64748B;
  --text-muted: #94A3B8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ============ 导航 ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 18px;
}

.navbar-brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.navbar-menu {
  display: flex;
  gap: 4px;
  list-style: none;
}

.navbar-menu a {
  color: var(--text-light);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--primary);
  background: rgba(220, 38, 38, 0.06);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* ============ Hero ============ */
.hero {
  background:
    linear-gradient(135deg, rgba(153, 27, 27, 0.95) 0%, rgba(220, 38, 38, 0.85) 50%, rgba(245, 158, 11, 0.8) 100%),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1), transparent 40%);
  color: white;
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 19px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
  max-width: 720px;
  margin-bottom: 36px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  margin-top: 48px;
  max-width: 720px;
}

.hero-stat {
  text-align: left;
}

.hero-stat-num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.hero-stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-outline {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #047857;
  color: white;
}

/* ============ Section ============ */
.section {
  padding: 72px 0;
}

.section-alt {
  background: white;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-eyebrow {
  display: inline-block;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-light);
  max-width: 720px;
  margin-bottom: 40px;
}

/* ============ 市场卡片(首页) ============ */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.market-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.market-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

.market-card-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.market-card-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.market-card-count {
  font-size: 13px;
  color: var(--text-light);
}

/* ============ 法规动态 ============ */
.updates-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.update-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  border: 1px solid var(--border);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: var(--transition);
}

.update-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.update-date {
  background: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.update-body {
  flex: 1;
}

.update-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.update-impact {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 4px;
  line-height: 1.6;
}

.update-action {
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
}

/* ============ 工具卡片 ============ */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: var(--transition);
}

.tool-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  background: rgba(220, 38, 38, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.tool-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.tool-card-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ============ 法规卡片(知识库) ============ */
.reg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.reg-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.reg-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.reg-card.highlight::before {
  content: "★ 推荐";
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: white;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.reg-market {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(220, 38, 38, 0.08);
  color: var(--primary-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  width: fit-content;
}

.reg-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}

.reg-code {
  font-family: "Consolas", "Monaco", monospace;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.reg-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.reg-cat-tag {
  background: var(--bg);
  color: var(--text-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.reg-requirements {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.6;
}

.reg-requirements li {
  padding: 2px 0 2px 16px;
  position: relative;
}

.reg-requirements li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--primary);
  font-weight: 700;
}

.reg-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ 风险等级 ============ */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.risk-high {
  background: rgba(220, 38, 38, 0.1);
  color: var(--primary-dark);
}

.risk-mid {
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
}

.risk-low {
  background: rgba(5, 150, 105, 0.1);
  color: var(--success);
}

.risk-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.risk-high::before { background: var(--primary); }
.risk-mid::before { background: var(--accent); }
.risk-low::before { background: var(--success); }

/* ============ 筛选条 ============ */
.filter-bar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
}

.filter-input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

.filter-select {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.filter-reset {
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.filter-reset:hover {
  background: white;
  color: var(--primary);
}

/* ============ 自检工具 ============ */
.tool-container {
  max-width: 880px;
  margin: 0 auto;
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  background: var(--surface);
  padding: 16px 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.step-item {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 14px;
  color: var(--text-muted);
}

.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: -1;
}

.step-item.active {
  color: var(--primary);
  font-weight: 700;
}

.step-item.active:not(:last-child)::after {
  background: var(--primary);
}

.step-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--border);
  color: white;
  border-radius: 50%;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
}

.step-item.active .step-circle {
  background: var(--primary);
}

.step-item.done .step-circle {
  background: var(--success);
}

.step-pane {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.step-pane h2 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--text);
}

.step-pane > p {
  color: var(--text-light);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--primary);
  margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.checkbox-item:hover {
  border-color: var(--primary);
  background: rgba(220, 38, 38, 0.04);
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.checkbox-item.checked {
  border-color: var(--primary);
  background: rgba(220, 38, 38, 0.06);
}

.step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ============ 报告样例 ============ */
.report-sample {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  max-width: 920px;
  margin: 0 auto;
}

.report-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 28px 36px;
}

.report-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.report-subtitle {
  font-size: 13px;
  opacity: 0.9;
}

.report-section {
  padding: 24px 36px;
  border-bottom: 1px solid var(--border);
}

.report-section:last-of-type {
  border-bottom: none;
}

.report-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-section-num {
  background: var(--primary);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.report-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.report-info-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.report-info-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.report-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.report-risk-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-risk-item {
  background: var(--bg);
  border-left: 4px solid;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.report-risk-item.high { border-color: var(--primary); }
.report-risk-item.mid { border-color: var(--accent); }
.report-risk-item.low { border-color: var(--success); }

.report-risk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.report-risk-title {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.report-risk-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-family: "Consolas", "Monaco", monospace;
}

.report-risk-suggest {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

.report-disclaimer {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
}

.report-disclaimer strong {
  color: #B45309;
}

/* ============ 表格 ============ */
.table-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
}

th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

tbody tr:hover {
  background: rgba(220, 38, 38, 0.03);
}

tbody tr:last-child {
  border-bottom: none;
}

td {
  padding: 14px 16px;
  color: var(--text);
  vertical-align: top;
}

td code {
  font-family: "Consolas", "Monaco", monospace;
  background: rgba(220, 38, 38, 0.08);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ============ Callout ============ */
.callout {
  background: rgba(220, 38, 38, 0.04);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
}

.callout strong {
  color: var(--primary-dark);
}

.callout-warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: var(--accent);
}

.callout-warning strong {
  color: #B45309;
}

.callout-info {
  background: rgba(37, 99, 235, 0.04);
  border-color: var(--secondary);
}

.callout-info strong {
  color: var(--secondary);
}

/* ============ 案例卡 ============ */
.case-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}

.case-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.case-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.case-summary {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
  line-height: 1.6;
}

.case-lesson {
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

/* ============ Footer ============ */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 0 20px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 24px;
}

.footer-title {
  color: white;
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 14px;
}

.footer-link {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 4px 0;
  font-size: 13px;
  transition: var(--transition);
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

/* ============ 工具类 ============ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.hidden { display: none; }

/* ============ 空状态 ============ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 15px;
}

/* ============ Modal ============ */
#detailModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 28px 32px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h2 {
  font-size: 22px;
  margin: 8px 0 6px;
}

.modal-header .reg-code {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
}

.modal-header .reg-market {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.modal-body {
  padding: 24px 32px;
}

.modal-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 20px 0 10px;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body ul {
  list-style: none;
  font-size: 14px;
  line-height: 1.7;
}

.modal-body ul li {
  padding: 4px 0 4px 20px;
  position: relative;
}

.modal-body ul li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--primary);
  font-weight: 700;
}

.modal-body table {
  font-size: 13px;
}

.modal-body td {
  padding: 8px 12px;
}

.modal-body td:first-child {
  font-weight: 600;
  color: var(--text-light);
  width: 140px;
}

.modal-body a {
  color: var(--secondary);
  text-decoration: none;
  word-break: break-all;
}

.modal-body a:hover {
  text-decoration: underline;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .hero {
    padding: 60px 0 72px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 26px;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: white;
    padding: 16px;
    box-shadow: var(--shadow);
    border-top: 1px solid var(--border);
  }

  .navbar-menu.open {
    display: flex;
  }

  .navbar-toggle {
    display: block;
  }

  .step-indicator {
    padding: 12px;
    font-size: 12px;
  }

  .step-item span:not(.step-circle) {
    display: none;
  }

  .step-pane {
    padding: 24px 20px;
  }

  .report-header,
  .report-section {
    padding: 24px 20px;
  }

  .checkbox-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===========================================
   v2 新增样式 — 5 步流程 + 风险摘要 + 整改建议
   =========================================== */

/* 5 步指示器 */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  padding: 24px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.step-indicator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  transition: var(--transition);
}

.step-item.active .step-circle {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.step-item.done .step-circle {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.step-item span {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

.step-item.active span {
  color: var(--primary-dark);
  font-weight: 700;
}

.step-item.done span {
  color: var(--success);
}

/* 表单行(双列布局) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .step-indicator {
    padding: 16px 8px;
  }
  .step-item span {
    font-size: 11px;
  }
  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* Chip 标签 */
.chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--secondary-light);
  color: var(--secondary);
  border-radius: 12px;
  font-size: 12px;
  margin: 2px;
  font-weight: 600;
}

/* 风险摘要卡片 */
.risk-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 24px 36px;
  background: linear-gradient(135deg, #FEF2F2 0%, #F8FAFC 100%);
}

.risk-summary-card {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow-sm);
}

.risk-summary-card .num {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.risk-summary-card.high .num { color: var(--primary); }
.risk-summary-card.mid .num { color: var(--accent); }
.risk-summary-card.low .num { color: var(--success); }

.risk-summary-card .label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .risk-summary-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

/* 整改建议块 */
.remediation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.remediation-block {
  border-left: 4px solid var(--secondary);
  background: var(--bg);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.remediation-block:has(.priority-tag:contains("P0-URGENT")),
.remediation-block:has(.priority-tag:contains("P0")) {
  border-left-color: var(--primary);
  background: #FEF2F2;
}

.remediation-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.priority-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--secondary);
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.remediation-block:has(.priority-tag:contains("P0")) .priority-tag {
  background: var(--primary);
}

.remediation-block ul {
  margin: 8px 0 0 0;
  padding-left: 24px;
}

.remediation-block li {
  margin-bottom: 4px;
  line-height: 1.7;
}

/* 化学限值表 */
.limit-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.limit-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: center;
}

.limit-row:last-child {
  border-bottom: none;
}

.limit-row:nth-child(even) {
  background: var(--bg);
}

.limit-row span:nth-child(2) {
  font-weight: 700;
  color: var(--primary);
}

.limit-ref {
  color: var(--text-muted);
  font-size: 11px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
}

@media (max-width: 640px) {
  .limit-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* 报告按钮组 */
.report-sample .btn {
  margin-bottom: 0;
}

/* 风险点项目 */
.report-risk-item {
  background: white;
  border-left: 4px solid var(--border);
  padding: 14px 18px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.report-risk-item.high {
  border-left-color: var(--primary);
  background: linear-gradient(90deg, #FEF2F2 0%, white 30%);
}

.report-risk-item.mid {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, #FEF3C7 0%, white 30%);
}

.report-risk-item.low {
  border-left-color: var(--success);
  background: linear-gradient(90deg, #D1FAE5 0%, white 30%);
}

.report-risk-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.risk-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.risk-badge.risk-high { background: var(--primary); color: white; }
.risk-badge.risk-mid { background: var(--accent); color: white; }
.risk-badge.risk-low { background: var(--success); color: white; }

.report-risk-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  flex: 1;
}

.report-risk-meta {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}

/* 报告基本信息网格 */
.report-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.report-info-item {
  background: var(--bg);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.report-info-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.report-info-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  word-break: break-all;
}

/* 报告大容器 */
.report-sample {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 0 auto;
}

.report-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 32px 36px;
}

.report-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.report-subtitle {
  font-size: 14px;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.report-subtitle .risk-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: white !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.report-section {
  padding: 24px 36px;
  border-top: 1px solid var(--border);
}

.report-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
}

.report-disclaimer {
  background: #FEF3C7;
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.8;
  color: #78350F;
}

@media (max-width: 768px) {
  .report-header, .report-section {
    padding: 20px 16px;
  }
  .report-title {
    font-size: 22px;
  }
}

/* 步骤面板 */
.step-pane {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.step-pane h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.step-pane > p {
  margin-bottom: 24px;
  color: var(--text-light);
}

.step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* checkbox-grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  background: white;
  font-size: 14px;
}

.checkbox-item:hover {
  border-color: var(--secondary);
  background: var(--secondary-light);
}

.checkbox-item.checked {
  background: var(--secondary-light);
  border-color: var(--secondary);
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--secondary);
}

/* callouts */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border-left: 4px solid var(--text-light);
  margin: 16px 0;
  font-size: 14px;
}

.callout.callout-info {
  background: #DBEAFE;
  border-left-color: var(--secondary);
}

.callout.callout-warning {
  background: #FEF3C7;
  border-left-color: var(--accent);
}

.callout.callout-success {
  background: #D1FAE5;
  border-left-color: var(--success);
}


/* ===========================================
   v2.1 新增样式 — 市场分区 + 报告卡 + 模板网格 + 速查表
   =========================================== */

/* 市场按地区分组 */
.market-regions {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.market-region {
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.market-region-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

/* 统计卡片网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--secondary);
}

.stat-card.stat-danger { border-left-color: var(--primary); }
.stat-card.stat-warn { border-left-color: var(--accent); }
.stat-card.stat-success { border-left-color: var(--success); }

.stat-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card.stat-danger .stat-num { color: var(--primary); }
.stat-card.stat-warn .stat-num { color: var(--accent); }
.stat-card.stat-success .stat-num { color: var(--success); }

.stat-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

/* Tab 切换 */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane {
  background: white;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* 模板卡片网格 */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--bg);
  padding: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.template-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.template-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.template-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.template-card p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 12px;
  min-height: 50px;
}

/* 合规速查表 */
.cheatsheet-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cs-row {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1.5fr 1.5fr 1fr 0.8fr;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: center;
}

.cs-row:last-child {
  border-bottom: none;
}

.cs-row.cs-header {
  background: var(--primary-dark);
  color: white;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cs-row:nth-child(even):not(.cs-header) {
  background: var(--bg);
}

@media (max-width: 768px) {
  .cs-row {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .cs-row.cs-header {
    display: none;
  }
}

/* 报告卡片 */
.report-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  border-left: 4px solid var(--secondary);
  transition: var(--transition);
}

.report-card:hover {
  box-shadow: var(--shadow);
}

.report-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.report-card-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.report-card-body {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 12px;
}

.report-card-body div {
  margin-bottom: 4px;
}

.report-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-card-actions .btn {
  padding: 6px 14px;
  font-size: 12px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--text-light);
}

.empty-state p {
  margin: 8px 0;
}

.empty-state a.btn {
  display: inline-block;
  text-decoration: none;
}

/* 文本工具类 */
.text-center { text-align: center; }
.mt-6 { margin-top: 24px; }

/* 风险卡片(报告中的风险点) */
.report-risk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.callout-info {
  background: var(--secondary-light);
  border-left-color: var(--secondary);
  color: #1E3A8A;
}

.callout-warning {
  background: #FEF3C7;
  border-left-color: var(--accent);
  color: #78350F;
}

.callout-success {
  background: #D1FAE5;
  border-left-color: var(--success);
  color: #064E3B;
}

/* 复选框选中状态 */
.checkbox-item.checked {
  background: var(--secondary-light);
  border-color: var(--secondary);
}

/* 表单输入聚焦样式增强 */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 隐藏类 */
.hidden {
  display: none !important;
}

/* 步骤面板过渡 */
.step-pane {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式 */
@media (max-width: 640px) {
  .template-grid {
    grid-template-columns: 1fr;
  }
  .market-region {
    padding: 16px;
  }
  .tab-pane {
    padding: 16px;
  }
}
