/* Dimensional Analysis Grid (Apple-style minimalist) */
.dim-analysis {
  margin: 2.5rem auto;
  max-width: 100%;
  width: calc(100% - 24px);
  /* Align with chart left margin if possible, but centering is safer */
  margin-left: auto; 
  margin-right: auto;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
}

.dim-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.dim-cell {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.dim-cell:hover {
  background: #fafafa;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.04);
  border-color: #d1d5db;
}

.dim-cell:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.dim-cell-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.25;
}

.dim-detail {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.dim-detail.visible {
  opacity: 1;
  transform: translateY(0);
}

.dim-detail-header {
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.dim-detail-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0;
  letter-spacing: -0.01em;
}

.dim-section {
  margin-bottom: 20px;
}

.dim-section:last-child {
  margin-bottom: 0;
}

.dim-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.dim-section-content {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #374151;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dim-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

