/* 通用组件：按钮 / Pill / 卡片 / Note / Grid / 工具类 / 图标系统 / 响应式 / 打印
   拆分自 assets/css/design-system.css（2026-08-30）
   依赖 tokens.css + base.css。 */

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Gold - 主行动色 */
.btn-gold {
  background: var(--gold-500);
  color: #fff;
  box-shadow: 0 1px 3px rgba(201, 138, 43, 0.25), 0 2px 8px rgba(201, 138, 43, 0.12);
}
.btn-gold:hover:not(:disabled) {
  background: var(--gold-600);
  box-shadow: 0 2px 6px rgba(201, 138, 43, 0.3), 0 6px 16px rgba(201, 138, 43, 0.18);
}
.btn-gold:active:not(:disabled) {
  background: var(--gold-700);
  box-shadow: var(--shadow-inner);
}

/* Navy - 深色行动 */
.btn-primary {
  background: var(--navy-700);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--navy-800);
}
.btn-primary:active:not(:disabled) {
  background: var(--navy-900);
}

/* Ghost - 线框按钮 */
.btn-ghost {
  background: transparent;
  color: var(--navy-700);
  border-color: var(--line-200);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--navy-400);
  background: var(--bg-soft);
}
.btn-ghost:active:not(:disabled) {
  background: var(--line-100);
}

/* Ghost-light - 深底上的线框按钮 */
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.btn-ghost-light:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.06);
}
.btn-ghost-light:active:not(:disabled) {
  background: rgba(255,255,255,0.1);
}

.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; font-weight: 700; }
.btn-lg { height: 50px; padding: 0 28px; font-size: 16px; font-weight: 800; }
.btn-block { width: 100%; }
   Hero 行动按钮组（胶囊描边 + 图标前置）
   ============================================================ */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-4);
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}
.hero-pill .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.hero-pill:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
  transform: translateY(-1px);
}
.hero-pill.is-primary {
  background: var(--gold-500);
  color: #fff;
  border-color: var(--gold-500);
  box-shadow: 0 2px 8px rgba(201, 138, 43, 0.22), 0 6px 20px rgba(201, 138, 43, 0.14);
}
.hero-pill.is-primary:hover {
  background: var(--gold-600);
  border-color: var(--gold-600);
  box-shadow: 0 4px 12px rgba(201, 138, 43, 0.3), 0 10px 28px rgba(201, 138, 43, 0.2);
}
.hero-pill.is-primary .icon { color: #fff; }

@media (max-width: 1180px) {
  .hero-pill {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    gap: 6px;
  }
  .hero-pill .icon { width: 15px; height: 15px; }
}
@media (max-width: 920px) {
  .hero-actions {
    gap: 8px;
    margin-bottom: var(--sp-3);
  }
  .hero-pill {
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }
}
@media (max-width: 480px) {
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .hero-pill {
    justify-content: center;
    height: 44px;
    padding: 0 8px;
    font-size: 14px;
  }
  .hero-pill.is-primary {
  }
}

/* ===== Pill / 标签 ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 12px;
  background: var(--gold-50);
  color: var(--gold-700);
  border-radius: var(--r-full);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.pill.teal {
  background: var(--teal-100);
  color: var(--teal-600);
}
.pill.danger {
  background: var(--danger-100);
  color: var(--danger-600);
}
.pill.gold-outline {
  background: rgba(217,177,102,0.12);
  color: var(--gold-200);
  border: 1px solid rgba(217,177,102,0.25);
  height: 26px;
}

/* ===== Card ===== */
.card {
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--r-m);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}
.card:hover {
  border-color: #D3DCE6;
  box-shadow: 0 4px 12px rgba(15, 31, 51, 0.08), 0 2px 4px rgba(15, 31, 51, 0.04);
}
.card.dim { background: var(--bg-soft); }
.card.good {
  background: var(--gold-50);
  border-color: var(--gold-100);
}
.card.good:hover {
  border-color: var(--gold-200);
}

/* ===== Note 提示框 ===== */
.note {
  padding: var(--sp-3) var(--sp-4);
  background: var(--gold-50);
  border-left: 3px solid var(--gold-400);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  font-size: 14px;
  color: var(--ink-700);
  line-height: 1.7;
}
.note.teal {
  background: var(--bg-tint);
  border-left-color: var(--teal-500);
}
.note.danger {
  background: var(--danger-100);
  border-left-color: var(--danger-500);
  color: var(--ink-700);
}

/* ===== Grid ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-gold { color: var(--gold-500); }
.text-navy { color: var(--navy-700); }
.text-muted { color: var(--muted-500); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--sp-1); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }

/* ===== 减少动画偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 920px) {
  body { font-size: 15.5px; }
  .module { padding: 48px 0; }
  .module-head { margin-bottom: 36px; }
  .module-head h2 { font-size: 24px; letter-spacing: -0.015em; }
  .module-head .lead { font-size: 15.5px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container, .container-narrow { padding: 0 20px; }
  .btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
}

@media (max-width: 480px) {
  .module { padding: 40px 0; }
  .module-head h2 { font-size: 22px; }
  .container, .container-narrow { padding: 0 16px; }
  .btn { height: 44px; }
  .btn-lg { height: 44px; }
}

/* ===== 打印 ===== */
@media print {
  .module { break-inside: avoid; page-break-inside: avoid; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* ===== Icon System (Lucide-style inline SVG) ===== */
.icon {
  width: 1em;
  height: 1em;
  stroke-width: 1.75;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: -0.125em;
}
.icon-xs { width: 13px; height: 13px; stroke-width: 2.25; }
.icon-sm { width: 16px; height: 16px; stroke-width: 1.75; }
.icon-md { width: 20px; height: 20px; stroke-width: 1.75; }
.icon-lg { width: 24px; height: 24px; stroke-width: 1.75; }
.icon-xl { width: 32px; height: 32px; stroke-width: 1.75; }

.icon-gold { color: var(--gold-500); }
.icon-navy { color: var(--navy-700); }
.icon-muted { color: var(--muted-500); }
.icon-white { color: #fff; }

/* 图标容器（卡片顶部圆形/方形背景） */
.icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--r-m);
  background: var(--gold-50);
  color: var(--gold-600);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-box.teal {
  background: var(--teal-100);
  color: var(--teal-600);
}
.icon-box.navy {
  background: rgba(18, 58, 95, 0.08);
  color: var(--navy-700);
}
.icon-box.soft {
  background: var(--bg-soft);
  color: var(--muted-500);
}
