/* 返回键定位：让绝对定位的返回按钮锚定在头部 */
.header { position: relative; }
.formulas-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}
.formula-grade {
  margin-bottom: 30px;
}
.formula-grade__title {
  font-size: 22px;
  font-weight: 800;
  color: #333;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid #667eea;
}
.formula-subtitle {
  font-size: 16px;
  font-weight: 700;
  color: #764ba2;
  margin: 18px 0 10px;
  padding-left: 10px;
  border-left: 4px solid #764ba2;
}
.formula-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.formula-card {
  background: white;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border-left: 4px solid #e0e4f0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.formula-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.formula-card--important {
  border-left-color: #667eea;
  background: linear-gradient(135deg, #f8f9ff, #eef0ff);
}
.formula-name {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}
.formula-text {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}
.header p {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 2px;
}
.btn-back-home {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 12px;
  z-index: 20;
}
.btn-back-home:hover { opacity: 1; }

@media (max-width: 500px) {
  .formula-cards { grid-template-columns: 1fr; }
}
