/* ===== 选型工具栏目（/tools/） ===== */

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

.tools-header {
  text-align: center;
  margin-bottom: 40px;
}

.tools-header .hero-title {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 12px;
}

.tools-header .hero-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0;
}

.tools-back-link {
  color: var(--primary, #6366f1);
  text-decoration: none;
}

/* --- 工具卡片 --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--card-bg, #fff);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}

.tool-card-live:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, .15);
  border-color: var(--primary, #6366f1);
}

.tool-card-soon {
  opacity: .65;
}

.tool-card-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.tool-card-title {
  margin: 0 0 6px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #16a34a;
}

.tool-badge-soon {
  background: #f3f4f6;
  color: #6b7280;
}

.tool-card-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tool-card-arrow {
  margin-left: auto;
  font-size: 20px;
  color: var(--primary, #6366f1);
}

/* --- 热门对比 --- */
.section-title {
  font-size: 22px;
  margin: 0 0 20px;
}

.hot-compare {
  margin-bottom: 48px;
}

.hot-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.hot-pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  background: var(--card-bg, #fff);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}

.hot-pair:hover {
  border-color: var(--primary, #6366f1);
}

.hot-pair-side {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hot-pair-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.hot-pair-name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-pair-vs {
  font-size: 12px;
  font-weight: 800;
  color: #ef4444;
  flex-shrink: 0;
}

/* --- CTA --- */
.tools-cta {
  text-align: center;
  padding: 32px;
  border-radius: 16px;
  background: var(--card-bg, #f8fafc);
  border: 1px dashed var(--border, #e5e7eb);
}

.tools-cta p {
  margin: 0 0 14px;
  color: var(--text-secondary);
}

.tools-cta-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--primary, #6366f1);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

/* ===== 对比器 ===== */
.compare-picker {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--card-bg, #fff);
}

.compare-slot {
  flex: 1;
  min-width: 200px;
}

.compare-slot-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.compare-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 10px;
  background: #fff;
  color: inherit;
}

.compare-share-btn {
  padding: 10px 18px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.compare-share-btn:hover {
  border-color: var(--primary, #6366f1);
  color: var(--primary, #6366f1);
}

.compare-share-btn.copied {
  border-color: #16a34a;
  color: #16a34a;
}

.compare-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  border: 1px dashed var(--border, #e5e7eb);
  border-radius: 16px;
}

.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--card-bg, #fff);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border, #eef0f3);
  font-size: 14px;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table thead th {
  border-bottom: 2px solid var(--border, #e5e7eb);
}

.compare-row-label {
  width: 110px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
  background: var(--card-bg, #fafbfc);
  position: sticky;
  left: 0;
}

.compare-product-head {
  min-width: 200px;
}

.compare-product-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}

.compare-product-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.compare-product-maker {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 4px;
}

.compare-tagline {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.compare-rating-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}

.compare-rating-label {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.compare-score-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-score-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #eef0f3;
  overflow: hidden;
}

.compare-score-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.compare-score-num {
  font-weight: 700;
  font-size: 13.5px;
  min-width: 28px;
  text-align: right;
}

.compare-cell-best {
  background: #f0fdf4;
}

.compare-cell-best .compare-score-fill {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.compare-price-plan {
  font-size: 13px;
  margin: 2px 0;
}

.compare-price-note {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 6px;
}

.compare-free-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: #dcfce7;
  color: #16a34a;
  margin-bottom: 6px;
}

.compare-paid-badge {
  background: #fef3c7;
  color: #b45309;
}

.compare-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.8;
}

.compare-list li::marker {
  color: #16a34a;
}

.compare-list-cons li::marker {
  color: #ef4444;
}

.compare-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compare-links a {
  font-size: 13px;
  color: var(--primary, #6366f1);
  text-decoration: none;
}

.compare-links a:hover {
  text-decoration: underline;
}

.compare-tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 4px 4px 0;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
}

@media (max-width: 768px) {
  .tools-header .hero-title {
    font-size: 26px;
  }

  .compare-picker {
    flex-direction: column;
    align-items: stretch;
  }

  .compare-share-btn {
    width: 100%;
  }
}

/* ===== 选型向导 ===== */
.wizard-box {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--card-bg, #fff);
}

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.wizard-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #f3f4f6;
  color: #9ca3af;
}

.wizard-dot.current {
  background: var(--primary, #6366f1);
  color: #fff;
}

.wizard-dot.done {
  background: #dcfce7;
  color: #16a34a;
}

.wizard-line {
  width: 28px;
  height: 2px;
  background: var(--border, #e5e7eb);
}

.wizard-q {
  font-size: 20px;
  text-align: center;
  margin: 0 0 22px;
}

.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wizard-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.wizard-option:hover {
  border-color: var(--primary, #6366f1);
  background: #eef2ff;
}

.wizard-option-t {
  font-size: 15px;
  font-weight: 600;
  color: inherit;
}

.wizard-option-d {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.wizard-back {
  margin-top: 18px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}

.wizard-back:hover {
  color: var(--primary, #6366f1);
}

.wizard-result-title {
  text-align: center;
  font-size: 24px;
  margin: 0 0 24px;
}

.wizard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.wizard-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--card-bg, #fff);
}

.wizard-card-medal {
  position: absolute;
  top: -12px;
  left: 20px;
  font-size: 26px;
}

.wizard-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  margin-top: 6px;
}

.wizard-card-name {
  font-size: 16px;
  font-weight: 700;
}

.wizard-card-maker {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.wizard-card-head .compare-rating-badge {
  margin-left: auto;
}

.wizard-card-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 12px;
}

.wizard-card-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.wizard-reason {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #16a34a;
}

.wizard-card-actions {
  display: flex;
  gap: 16px;
}

.wizard-card-actions a {
  font-size: 13px;
  color: var(--primary, #6366f1);
  text-decoration: none;
}

.wizard-card-actions a:hover {
  text-decoration: underline;
}

.wizard-result-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== 成本计算器 ===== */
.calc-controls {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  background: var(--card-bg, #fff);
}

.calc-seat-box {
  width: 160px;
}

.calc-add-box {
  flex: 1;
  min-width: 220px;
}

.calc-seats {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 10px;
}

.calc-note {
  width: 100%;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.calc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.calc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  background: var(--card-bg, #fff);
}

.calc-item-main {
  flex: 1;
  min-width: 0;
}

.calc-item-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}

.calc-plan-select {
  max-width: 420px;
}

.calc-item-cost {
  text-align: right;
  flex-shrink: 0;
}

.calc-cost-num {
  font-size: 18px;
  font-weight: 800;
}

.calc-cost-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.calc-cost-note {
  font-size: 11.5px;
  color: var(--text-secondary);
  max-width: 240px;
}

.calc-uncomputable {
  font-size: 13px;
  color: #b45309;
}

.calc-remove {
  border: none;
  background: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 14px;
  padding: 6px;
}

.calc-remove:hover {
  color: #ef4444;
}

.calc-summary {
  margin-bottom: 24px;
}

.calc-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calc-bar-name {
  width: 180px;
  flex-shrink: 0;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-bar-track {
  flex: 1;
  height: 22px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
}

.calc-bar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
  transition: width .3s ease;
}

.calc-bar-num {
  width: 110px;
  flex-shrink: 0;
  text-align: right;
  font-size: 13.5px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .calc-bar-name {
    width: 100px;
  }

  .calc-bar-num {
    width: 80px;
  }

  .calc-item {
    flex-wrap: wrap;
  }

  .calc-item-cost {
    text-align: left;
    width: 100%;
  }
}
