﻿/* ============================================================
   药才通 · 官网 v2.0「深山本草 · 东方现代」
   设计方向：墨绿 + 宣纸白 + 朱砂红，宋体标题，标本盒，时间轴
   ============================================================ */

:root {
  --c-ink: #1A3C34;
  --c-ink-deep: #122A24;
  --c-paper: #F9F7F2;
  --c-cinnabar: #C23B22;
  --c-text: #2C2C2C;
  --c-text-2: #5A6B66;
  --c-text-3: #8A9B95;
  --c-line: #E5E0D8;
  --c-white: #FFFFFF;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* ===== 旧设计系统变量兼容映射（让残留旧引用自动解析为新视觉） ===== */
  --brand-50: #F2F9F5;
  --brand-100: #D5E8DD;
  --brand-500: #1A3C34;
  --brand-600: #153029;
  --brand-700: #122A24;
  --brand-900: #122A24;
  --gray-50: #F9F7F2;
  --gray-100: #F1EDE4;
  --gray-200: #E5E0D8;
  --gray-300: #D8D2C6;
  --gray-400: #8A9B95;
  --gray-500: #5A6B66;
  --gray-700: #2C2C2C;
  --gray-900: #1A3C34;
  --text-primary: #2C2C2C;
  --text-secondary: #5A6B66;
  --text-disabled: #8A9B95;
  --border: #E5E0D8;
  --bg-page: #F9F7F2;
  --bg-card: #FFFFFF;
  --success-500: #1A3C34;
  --warning-500: #B98A2A;
  --danger-500: #C23B22;
  --info-500: #1A3C34;
  --purple-500: #5B4B8A;
  --radius-sm: 2px;
  --radius: 2px;
  --radius-lg: 2px;
  --shadow-card: 0 24px 48px rgba(26,60,52,0.07);
}

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

html {
  scroll-behavior: smooth;
  /* 始终预留滚动条沟槽：有无滚动条页面宽度一致，切换不跳动 */
  scrollbar-gutter: stable;
}

body {
  background-color: var(--c-paper);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

a { color: inherit; }

/* ============ 顶栏 ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: #F9F7F2;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-line);
  z-index: 100;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo {
  font-family: var(--font-serif); font-size: 22px; font-weight: 700;
  color: var(--c-ink); text-decoration: none; letter-spacing: 2px;
  display: flex; align-items: baseline; gap: 8px;
}
.logo-sub {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--c-text-3); letter-spacing: 3px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--c-text); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color 0.2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--c-ink); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--c-cinnabar);
}
.btn-enter {
  padding: 8px 22px !important; border: 1px solid var(--c-ink); color: var(--c-ink) !important;
  font-size: 13px; border-radius: 2px; transition: all 0.2s;
}
.btn-enter:hover { background: var(--c-ink); color: var(--c-paper) !important; }
.btn-enter::after { display: none !important; }

/* ============ Hero ============ */
.hero { padding: 170px 0 110px; }
.hero-inner { display: flex; align-items: center; gap: 80px; }
.hero-copy { flex: 1.15; }
.hero-tag {
  display: inline-block; padding: 5px 14px; border: 1px solid var(--c-cinnabar);
  color: var(--c-cinnabar); font-size: 12px; font-weight: 500; letter-spacing: 3px;
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--font-serif); font-size: 58px; font-weight: 700;
  color: var(--c-ink); line-height: 1.18; margin-bottom: 26px; letter-spacing: -1px;
}
.hero-sub {
  font-family: var(--font-serif); font-size: 18px; color: var(--c-text-2);
  margin-bottom: 42px; max-width: 500px; line-height: 1.9;
}
.hero-actions { display: flex; gap: 16px; margin-bottom: 40px; }
.btn-primary {
  display: inline-block; padding: 15px 34px; background: var(--c-ink); color: var(--c-paper);
  text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 2px;
  border: none; cursor: pointer; transition: opacity 0.2s; font-family: var(--font-sans);
}
.btn-primary:hover { opacity: 0.88; }
.btn-ghost {
  display: inline-block; padding: 15px 34px; border: 1px solid var(--c-line); color: var(--c-text);
  text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 2px;
  transition: border-color 0.2s; background: transparent;
}
.btn-ghost:hover { border-color: var(--c-ink); }
.hero-points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hero-points li {
  font-size: 13.5px; color: var(--c-text-2); padding-left: 22px; position: relative;
}
.hero-points li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 10px; height: 10px; border: 2px solid var(--c-cinnabar); border-radius: 50%;
}

/* ============ 标本盒 ============ */
.specimen-box {
  flex: 1; background: var(--c-white); border: 1px solid var(--c-line);
  padding: 34px; position: relative;
  box-shadow: 0 24px 48px rgba(26, 60, 52, 0.07);
}
.specimen-box::before {
  content: ''; position: absolute; top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 1px solid var(--c-line); pointer-events: none;
}
.specimen-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--c-line);
}
.specimen-title { font-family: var(--font-serif); font-size: 19px; font-weight: 600; color: var(--c-ink); }
.specimen-no { font-family: var(--font-mono); font-size: 11px; color: var(--c-text-3); letter-spacing: 1px; }

.dual-codes { display: flex; gap: 22px; margin-bottom: 8px; }
.code-item { flex: 1; text-align: center; }
.code-frame {
  background: var(--c-paper); border: 1px solid var(--c-line);
  aspect-ratio: 1; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
}
.code-frame img, .code-frame canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.code-placeholder { background: repeating-linear-gradient(45deg, var(--c-paper), var(--c-paper) 8px, #F1EDE4 8px, #F1EDE4 16px); }
.code-placeholder-text {
  font-family: var(--font-serif); font-size: 14px; color: var(--c-text-3);
  text-align: center; line-height: 1.8;
}
.code-label { font-size: 12px; color: var(--c-text-2); line-height: 1.6; }
.code-label strong {
  display: block; font-family: var(--font-serif); font-size: 14.5px;
  color: var(--c-ink); margin-bottom: 3px; font-weight: 600;
}

.code-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0 18px; color: var(--c-text-3); font-size: 12px;
}
.code-divider::before, .code-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--c-line);
}

.hero-form { display: flex; gap: 10px; }
.hero-input {
  flex: 1; height: 44px; padding: 0 16px;
  border: 1px solid var(--c-line); border-radius: 2px;
  font-family: var(--font-mono); font-size: 14px; color: var(--c-ink);
  background: var(--c-paper); outline: none; transition: border-color 0.2s;
  letter-spacing: 1px;
}
.hero-input:focus { border-color: var(--c-ink); }
.hero-input.invalid { border-color: var(--c-cinnabar); }
.hero-input::placeholder { color: var(--c-text-3); font-family: var(--font-sans); letter-spacing: 0; }
.btn-query { height: 44px; padding: 0 26px; }
.hero-tip {
  display: none; margin-top: 8px; font-size: 12px; color: var(--c-cinnabar);
}
.hero-tip.show { display: block; }

.specimen-footer {
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--c-line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.seal {
  width: 52px; height: 52px; border: 2px solid var(--c-cinnabar); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--c-cinnabar); font-family: var(--font-serif); font-size: 11px; font-weight: 700;
  transform: rotate(-12deg); opacity: 0.85; text-align: center; line-height: 1.3;
}
.scan-hint { font-size: 12px; color: var(--c-text-3); line-height: 1.6; }

/* ============ 信任条 / 统计 ============ */
.trust-bar {
  border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  padding: 36px 0; background: rgba(255,255,255,0.5);
}
.stats-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.stat-item { text-align: center; flex: 1; min-width: 120px; }
.stat-num {
  font-family: var(--font-mono); font-size: 30px; font-weight: 500;
  color: var(--c-ink); line-height: 1.2; font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 12.5px; color: var(--c-text-3); margin-top: 6px; letter-spacing: 1px;
}

/* ============ 通用区块 ============ */
.section { padding: 110px 0; }
.section-alt { background: rgba(255,255,255,0.55); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.section-title {
  font-family: var(--font-serif); font-size: 38px; font-weight: 700;
  color: var(--c-ink); text-align: center; margin-bottom: 18px; letter-spacing: 1px;
}
.section-desc { text-align: center; color: var(--c-text-2); margin-bottom: 64px; font-size: 15px; }

/* ============ 角色卡片 ============ */
.role-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--c-line); border: 1px solid var(--c-line);
}
.role-card {
  background: var(--c-paper); padding: 44px 40px; text-decoration: none;
  transition: background 0.25s; position: relative; display: block;
}
.role-card:hover { background: var(--c-white); }
.role-num {
  font-family: var(--font-mono); font-size: 13px; color: var(--c-cinnabar);
  letter-spacing: 2px; margin-bottom: 18px;
}
.role-card h3 {
  font-family: var(--font-serif); font-size: 22px; font-weight: 600;
  color: var(--c-ink); margin-bottom: 14px;
}
.role-card p { font-size: 14px; color: var(--c-text-2); line-height: 1.8; margin-bottom: 20px; }
.role-more {
  font-size: 13px; color: var(--c-ink); font-weight: 500;
  border-bottom: 1px solid var(--c-cinnabar); padding-bottom: 2px;
}

/* ============ 流程网格（JS 渲染 #flowGrid）============ */
.flow-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--c-line); border: 1px solid var(--c-line);
}
.flow-item {
  background: var(--c-paper); padding: 34px 26px; text-decoration: none;
  transition: background 0.25s; display: block;
}
.flow-item:hover { background: var(--c-white); }
.flow-icon { font-size: 26px; margin-bottom: 16px; }
.flow-name {
  font-family: var(--font-serif); font-size: 17px; font-weight: 600;
  color: var(--c-ink); margin-bottom: 8px;
}
.flow-desc { font-size: 12.5px; color: var(--c-text-2); line-height: 1.7; margin-bottom: 14px; }
.flow-link { font-size: 12px; color: var(--c-cinnabar); font-weight: 500; }

/* ============ 政策卡片 ============ */
.policy-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
}
.policy-card {
  background: var(--c-white); border: 1px solid var(--c-line);
  padding: 36px 34px; position: relative;
}
.policy-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 40px; height: 3px;
  background: var(--c-cinnabar);
}
.policy-year {
  font-family: var(--font-mono); font-size: 12px; color: var(--c-cinnabar);
  letter-spacing: 2px; margin-bottom: 14px;
}
.policy-card h3 {
  font-family: var(--font-serif); font-size: 19px; font-weight: 600;
  color: var(--c-ink); margin-bottom: 12px;
}
.policy-card p { font-size: 13.5px; color: var(--c-text-2); line-height: 1.8; }

/* ============ CTA ============ */
.cta-band {
  background: var(--c-ink); color: var(--c-paper);
  padding: 110px 0; text-align: center;
}
.cta-band h2 {
  font-family: var(--font-serif); font-size: 40px; font-weight: 700;
  margin-bottom: 16px; letter-spacing: 2px;
}
.cta-band p { color: rgba(249,247,242,0.65); font-size: 15px; margin-bottom: 40px; }
.cta-actions { display: flex; justify-content: center; gap: 16px; }
.btn-light {
  display: inline-block; padding: 15px 36px; background: var(--c-paper); color: var(--c-ink);
  text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 2px;
  transition: opacity 0.2s;
}
.btn-light:hover { opacity: 0.9; }
.btn-outline {
  display: inline-block; padding: 15px 36px; border: 1px solid rgba(249,247,242,0.4);
  color: var(--c-paper); text-decoration: none; font-size: 14px; font-weight: 500;
  border-radius: 2px; transition: border-color 0.2s;
}
.btn-outline:hover { border-color: var(--c-paper); }

/* ============ 底部 ============ */
.footer {
  background: var(--c-ink-deep); color: rgba(249,247,242,0.55);
  padding: 48px 0; text-align: center; font-size: 13px;
}
.footer-brand {
  font-family: var(--font-serif); font-size: 16px; color: var(--c-paper);
  margin-bottom: 12px; letter-spacing: 1px;
}
.footer-note { margin-top: 6px; }
.footer-note a { color: rgba(249,247,242,0.55); text-decoration: none; transition: color 0.2s; }
.footer-note a:hover { color: var(--c-paper); }

/* ============ SVG 图标尺寸规范 ============ */
svg.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; color: #1A3C34; }
/* 默认尺寸（正文内联） */
svg.ic { width: 1.15em; height: 1.15em; }
/* 大图标容器（功能卡、案例卡、价值卡等） */
.feature-icon svg.ic, .case-icon svg.ic, .value-icon svg.ic, .trust-icon svg.ic,
.stage-hero-icon svg.ic, .f-icon svg.ic, .v-icon svg.ic, .role-hero-title .emoji svg.ic {
  width: 30px; height: 30px;
}
.case-icon svg.ic, .stage-hero-icon svg.ic { width: 34px; height: 34px; }
/* 角色切换 / 流程步骤图标 */
.tab-icon svg.ic, .step-num svg.ic { width: 24px; height: 24px; }
/* 标题内联图标（h2/h3 前） */
h2 svg.ic, h3 svg.ic, .card-title svg.ic { width: 1.2em; height: 1.2em; vertical-align: -0.2em; }
/* 品牌 logo 图标 */
.brand-mark svg.ic { width: 22px; height: 22px; }
/* 时间轴 / 列表内联图标 */
.tl-title svg.ic, .result-section h3 svg.ic { width: 1.15em; height: 1.15em; }

' + $anchor
@media (max-width: 1000px) {
  .hero-inner { flex-direction: column; gap: 56px; }
  .hero { padding: 140px 0 80px; }
  .hero-title { font-size: 42px; }
  .role-grid, .policy-grid { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 18px; }
  .nav-links a:not(.btn-enter) { display: none; }
  .nav-links a:nth-child(-n+3) { display: inline; }
  .section { padding: 80px 0; }
  .container { padding: 0 24px; }
}
@media (max-width: 560px) {
  .dual-codes { flex-direction: column; }
  .code-frame { max-width: 200px; margin-left: auto; margin-right: auto; margin-bottom: 12px; }
  .flow-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .stats-bar { gap: 20px; }
  .stat-item { min-width: 45%; }
}